-
Notifications
You must be signed in to change notification settings - Fork 618
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
taskresources: set terminal reason msg for all errors #2004
Conversation
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.
Neat!
// terminalReason should be set for resource creation failures. This ensures | ||
// the resource object carries some context for why provisoning failed. | ||
terminalReason string | ||
terminalReasonOnce sync.Once |
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.
Whats the rationale for including the sync.Once?
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.
hm it was in the existing codepaths that populated the terminalReason string. need to dig into the old ones to figure out why we added that in the first place 🤔
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.
sigh, noting outside of This field does not accept updates.
here
im thinking since its a public setter for terminal reason, we didn't want the field clobbered once it's been set
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.
do you think we should amend the related task resource tests? so we're checking for terminal string in tests that would have the terminalReason
populated.
yes I will add unit tests 👍 |
closes aws#1631 return a default terminal reason remove terminalReason code for cgroups based on PR review Test that volume errors are propogated
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.
changes lgtm, thanks for fixing/updating those tests.
Updating to go 1.12 Make CGroups CPU period configurable Signed-off-by: Mohamad Arab <boynux@gmail.com> taskresources: set terminal reason msg for all errors (aws#2004) * taskresources: set terminal reason msg for all errors closes aws#1631 return a default terminal reason remove terminalReason code for cgroups based on PR review Test that volume errors are propogated * fix cleanup error test and add string check Fix telemetry test for ws2019 On WS2019 functional test image mcr.microsoft.com/windows/servercore:ltsc2019, the behavior to handle path changed from ws2016 image, it needs to set entrypoint with absolute path or have entrypoint set to powershell to run executable without absolute path. Also removed unused binary in windows telemetry test. add storageReadBytes storageWriteBytes stats
* taskresources: set terminal reason msg for all errors closes aws#1631 return a default terminal reason remove terminalReason code for cgroups based on PR review Test that volume errors are propogated * fix cleanup error test and add string check
closes #1631
Summary
This adds a terminal reason to all relevant errors in taskresources
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.