-
Notifications
You must be signed in to change notification settings - Fork 23
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
RHIROS-1411 Update recommendations job #149
RHIROS-1411 Update recommendations job #149
Conversation
bc83bde
to
549f0e0
Compare
549f0e0
to
e36037c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @saltgen code indentation in the PR is messed up can you please check.
func checkURLStatus() bool { | ||
|
||
url := cfg.KruizeUrl + "/updateRecommendations" | ||
resp, err := http.Get(url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tested this? I think kruize does not support GET
method for /updateRecommendations
API. So you will never get 200
response in return.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't want to repeat my testing cycles, additionally most of the code here is re-used. Hence the Do Not Merge label.
Now that the new Kruize image is available, I'll get these minor aspects checked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change pushed
panic(err.Error()) | ||
} | ||
|
||
if !reflect.ValueOf(recommendationSets).IsZero() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain why there is a need to this check over here? and anyway we will be running this job after truncating the recommendationSets table that means this will every time evaluate to False
and else
block will be executed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The exclamation symbol is more of a typo, I will revert that change.
- This check has been added to make the job idempotent, so that we can use this job in future if required.
- The recommendationSets table will be empty yes, but this job will look for recommendations for existing workloads, and then update those specifically
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change pushed
Instead of checking every 2 seconds for 10 attempts can we do: https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/ |
I have no clue why this happens, locally formatting seems fine, will check. |
e36037c
to
fa8df81
Compare
fa8df81
to
3fe8b15
Compare
/retest |
Closing out this PR as stale |
Job Steps
/updateRecommendations
is up every 2 seconds with 10 attemptsworkload.ExperimentName
andworkload.MetricsUploadAt