Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DontReview Garnitin/add gke load testing/v1 #2225

Open
wants to merge 2 commits into
base: garnitin/add-gke-load-testing/enhancements/remove-mash-dependency
Choose a base branch
from

Conversation

gargnitingoogle
Copy link
Collaborator

Description

Link to the issue in case of a bug fix.

NA

Testing details

  1. Manual - NA
  2. Unit tests - NA
  3. Integration tests - NA

Copy link

codecov bot commented Jul 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.04%. Comparing base (17414f3) to head (a0b0096).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2225      +/-   ##
==========================================
+ Coverage   77.02%   77.04%   +0.01%     
==========================================
  Files         113      113              
  Lines       15910    15918       +8     
==========================================
+ Hits        12255    12264       +9     
+ Misses       3129     3128       -1     
  Partials      526      526              
Flag Coverage Δ
unittests 77.04% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

fi

function validateMachineConfig() {
echo "Validiting input parameters ..."
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

local cluster_name=${1}
local zone=${2}
local node_pool=${3}
if [ $(gcloud container node-pools list --cluster=${cluster_name} --zone=${zone} | grep -ow ${node_pool} | wc -l) -gt 0 ] ; then
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simplify this with grep -q

if ClusterExists ${cluster_name} ; then
gcloud container clusters update ${cluster_name} --location=${zone} --workload-pool=${project_id}.svc.id.goog
else
# gcloud container --project "${project_id}" clusters create ${cluster_name} --zone "${zone}" --cluster-version "${cluster_version}" --workload-pool=${project_id}.svc.id.goog
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented code

echo "Enabling/disabling csi add-on ..."
# By default, disable the managed csi driver.
if ${useCustomCsiDriver}; then
# gcloud -q container clusters update ${cluster_name} \
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-enable this

gcloud container clusters get-credentials ${cluster_name} --location=${zone}
kubectl create namespace ${appnamespace}
kubectl create serviceaccount ${ksa} --namespace ${appnamespace}
for workload_bucket in ${buckets} ; do
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add code to get buckets from somewhere.

}

# validateMachineConfig ${machine_type} ${num_nodes} ${num_ssd}
# installDependencies
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-enable all these disabled steps.

def get_cpu(pod_name: str, start: str, end: str) -> Tuple[float, float]:
# for some reason, the mash filter does not always work, so we fetch all the metrics for all the pods and filter later.
result = subprocess.run(["mash", "--namespace=cloud_prod", "--output=csv",
f"Query(Fetch(Raw('cloud.kubernetes.K8sContainer', 'kubernetes.io/container/cpu/core_usage_time'), {{'project': '927584127901'}})| Window(Rate('10m'))| GroupBy(['pod_name', 'container_name'], Max()), TimeInterval('{start}', '{end}'), '5s')"],
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put the project-number back to the original and change it by code during runtime and then revert it back when done during runtime.

function updateMachineTypeInPodConfigs() {
for file in ${gke_testing_dir}/examples/fio/loading-test/values.yaml ${gke_testing_dir}/examples/dlio/unet3d-loading-test/values.yaml ; do
test -f ${file}
sed -i -E "s/nodeType: [0-9a-z_-]+$/nodeType: ${machine_type}/g" ${file}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add code to revert this back

for file in ${gke_testing_dir}/examples/fio/loading-test/values.yaml ${gke_testing_dir}/examples/dlio/unet3d-loading-test/values.yaml ; do
test -f ${file}
# sed -i -E "s/mountOptions: [0-9a-zA-Z,\:\"-_]+$/mountOptions: \"${gcsfuse_mount_options}\"/g" ${file}
sed -i -E "s/mountOptions:[ \t]*\"?[a-zA-Z0-9,:_-]+\"? *$/mountOptions: \"${gcsfuse_mount_options}\"/g" "${file}"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add code to revert this back when done

@gargnitingoogle gargnitingoogle force-pushed the garnitin/add-gke-load-testing/v1 branch from 2958a3c to ad97f82 Compare July 29, 2024 10:47
return utc_timestamp_string

def standard_timestamp(timestamp: int) -> str:
return timestamp.split('.')[0].replace('T', ' ') + " UTC"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

insert newline after this line

@@ -0,0 +1,425 @@
#!/bin/bash

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a header and a help option at the top.

@gargnitingoogle gargnitingoogle force-pushed the garnitin/add-gke-load-testing/v1 branch 7 times, most recently from ff7ee55 to 478921c Compare August 6, 2024 09:53
@gargnitingoogle gargnitingoogle force-pushed the garnitin/add-gke-load-testing/v1 branch 9 times, most recently from 1e4353a to b6a0e76 Compare August 16, 2024 14:45
@gargnitingoogle gargnitingoogle force-pushed the garnitin/add-gke-load-testing/v1 branch 9 times, most recently from b62b517 to d008a84 Compare August 22, 2024 11:53
@gargnitingoogle gargnitingoogle force-pushed the garnitin/add-gke-load-testing/v1 branch from 0daf723 to 6dbb552 Compare August 26, 2024 09:05
@gargnitingoogle gargnitingoogle force-pushed the garnitin/add-gke-load-testing/v1 branch 2 times, most recently from a0b0096 to 4726215 Compare November 27, 2024 06:08
@gargnitingoogle gargnitingoogle changed the base branch from master to garnitin/add-gke-load-testing/enhancements/remove-mash-dependency November 27, 2024 19:59
@gargnitingoogle gargnitingoogle marked this pull request as ready for review November 27, 2024 19:59
@gargnitingoogle gargnitingoogle requested review from Tulsishah and a team as code owners November 27, 2024 19:59
@gargnitingoogle gargnitingoogle requested review from ankitaluthra1 and removed request for a team November 27, 2024 19:59
@gargnitingoogle gargnitingoogle force-pushed the garnitin/add-gke-load-testing/enhancements/remove-mash-dependency branch from 84a82e8 to 8b5355d Compare November 28, 2024 06:08
@gargnitingoogle gargnitingoogle force-pushed the garnitin/add-gke-load-testing/v1 branch from 4726215 to 0451ae5 Compare November 28, 2024 06:08
@gargnitingoogle gargnitingoogle force-pushed the garnitin/add-gke-load-testing/enhancements/remove-mash-dependency branch from 8b5355d to 23d7228 Compare November 29, 2024 06:08
@gargnitingoogle gargnitingoogle force-pushed the garnitin/add-gke-load-testing/v1 branch from 0451ae5 to e3f0a0a Compare November 29, 2024 06:08
@gargnitingoogle gargnitingoogle force-pushed the garnitin/add-gke-load-testing/enhancements/remove-mash-dependency branch from 23d7228 to 53def3b Compare November 30, 2024 06:08
@gargnitingoogle gargnitingoogle force-pushed the garnitin/add-gke-load-testing/v1 branch from e3f0a0a to ace404a Compare November 30, 2024 06:08
@gargnitingoogle gargnitingoogle force-pushed the garnitin/add-gke-load-testing/enhancements/remove-mash-dependency branch from 53def3b to d423275 Compare December 3, 2024 06:09
@gargnitingoogle gargnitingoogle force-pushed the garnitin/add-gke-load-testing/v1 branch from ace404a to 841048c Compare December 3, 2024 06:09
@gargnitingoogle gargnitingoogle force-pushed the garnitin/add-gke-load-testing/enhancements/remove-mash-dependency branch from d423275 to 711aa0f Compare December 4, 2024 06:09
@gargnitingoogle gargnitingoogle force-pushed the garnitin/add-gke-load-testing/v1 branch from 841048c to c1f5947 Compare December 4, 2024 06:09
@gargnitingoogle gargnitingoogle force-pushed the garnitin/add-gke-load-testing/enhancements/remove-mash-dependency branch from 711aa0f to 789b5f4 Compare December 5, 2024 06:09
@gargnitingoogle gargnitingoogle force-pushed the garnitin/add-gke-load-testing/v1 branch from c1f5947 to db9edf9 Compare December 5, 2024 06:09
@gargnitingoogle gargnitingoogle force-pushed the garnitin/add-gke-load-testing/enhancements/remove-mash-dependency branch from 789b5f4 to a3feb0d Compare December 6, 2024 06:09
@gargnitingoogle gargnitingoogle force-pushed the garnitin/add-gke-load-testing/v1 branch from db9edf9 to 1ea03c4 Compare December 6, 2024 06:09
@gargnitingoogle gargnitingoogle force-pushed the garnitin/add-gke-load-testing/enhancements/remove-mash-dependency branch from a3feb0d to 8294243 Compare December 6, 2024 08:53
@gargnitingoogle gargnitingoogle force-pushed the garnitin/add-gke-load-testing/v1 branch from 1ea03c4 to fab819c Compare December 6, 2024 08:53
@gargnitingoogle gargnitingoogle force-pushed the garnitin/add-gke-load-testing/enhancements/remove-mash-dependency branch from 8294243 to dcfb13b Compare December 6, 2024 10:13
@gargnitingoogle gargnitingoogle force-pushed the garnitin/add-gke-load-testing/v1 branch from fab819c to 137aed1 Compare December 6, 2024 10:13
@gargnitingoogle gargnitingoogle force-pushed the garnitin/add-gke-load-testing/enhancements/remove-mash-dependency branch from dcfb13b to 924758e Compare December 9, 2024 06:20
@gargnitingoogle gargnitingoogle force-pushed the garnitin/add-gke-load-testing/v1 branch from 137aed1 to 8c4d392 Compare December 9, 2024 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant