Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Implementing extension sequencing in azure linux agent #1298
Implementing extension sequencing in azure linux agent #1298
Changes from all commits
8e3ba2f
d32fafd
77bab20
670b5bd
ded2e0a
7056831
ca0453e
8a0c6ee
3cff99a
c5d5bf1
a8f6a4b
ab4741e
dc0ec36
849e3e0
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 do not think this comment is entirely accurate.
"install and enable" refer to transition steps that handle_ext_handler performs to bring an extension from the uninstalled state to the disabled/installed state and from the disabled/installed state to the enabled state.
handle_ext_handler
takes care of these steps.sort_key
is based on the goal state for the extension ("enabled" or not "enabled" which is either "disabled" or "uninstall"). If an extension is uninstalled and the goal state is "disabled", thenhandle_ext_handler
will install but not enable the extension.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 initial ask for a comment similar to this was to clarify the intention of the "dep_level >= 0" check... we wait only when the extension was installed or enabled. As it is currently phrased it seems like it is not helping so feel free to remove it or change it accordingly.
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.
we should change this status... this gives the impression that the extension is reporting a warning when in actuality there is no status file. I would suggest return something like "status file not found" or similar
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.
This value is verified against a set of valid values. I think we should adhere to those values. Also it is clearly commented above that condition in which it can occur.
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.
My concern is that if we reach this path, then the status in this message:
"Extension {0} did not reach a terminal state within the allowed timeout. Last status was {1}".
will be "warning". When looking at the log, it'll seem like the extension actually reported a warning, when in actuality it didn't report any status. That may be confusing.
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.
We need to pass up the entire status, not just the status field, to give a more complete log message and add a
__str__
toExtStatus
so that it logs something sensible