-
Notifications
You must be signed in to change notification settings - Fork 375
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
Consume IsVersionFromRSM Property #2934
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2934 +/- ##
===========================================
+ Coverage 72.02% 72.03% +0.01%
===========================================
Files 106 106
Lines 16063 16070 +7
Branches 2304 2306 +2
===========================================
+ Hits 11569 11576 +7
Misses 3962 3962
Partials 532 532
|
@@ -73,6 +73,8 @@ def __init__(self, name, version=None): | |||
self.name = name | |||
# This is the Requested version as specified by the Goal State, it defaults to 0.0.0.0 if not specified in GS | |||
self.requested_version_string = VERSION_0 if version is None else version | |||
# Set to False if the version from rsm property is not specified in the GS | |||
self.is_version_from_rsm = False |
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.
having is_version_from_rsm and is_requested_version_specified seems redundant/overcomplicated. can we simplify that?
@@ -295,23 +295,23 @@ def run(self, goal_state): | |||
requested_version = self.__get_requested_version(agent_family) | |||
agent_manifest = None # This is to make sure fetch agent manifest once per update | |||
warn_msg = "" | |||
if requested_version is None: | |||
if requested_version is not None and agent_family.is_version_from_rsm: |
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.
why is this even possible? if RSM is not requesting an update then we would simply get the version from the manifest, right?
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 condition exactly for that to go to else for doing manifest call. The requested version could None if GS itself don't have it or when we disable the GA versioning.
# Do not proceed with update if self-update needs to download the manifest again with in an hour | ||
if not self.__should_agent_attempt_manifest_download(): | ||
return | ||
if conf.get_enable_ga_versioning(): # log the warning only when ga versioning is enabled | ||
if conf.get_enable_ga_versioning() and not agent_family.is_version_from_rsm: # log the warning only when ga versioning is enabled |
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.
but aren't you planning on enabling ga versioning? (and hence this warning would always be there until RSM updates are enabled?)
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.
yet, I'll do it in separate PR. We only log the warning when RSM updates are enabled and still missing requested version
@@ -338,8 +338,8 @@ def run(self, goal_state): | |||
raise AgentUpdateError("The Agent received a request to downgrade to version {0}, but downgrading to a version less than " | |||
"the Agent installed on the image ({1}) is not supported. Skipping downgrade.".format(requested_version, daemon_version)) | |||
|
|||
msg = "Goal state {0} is requesting a new agent version {1}, will update the agent before processing the goal state.".format( | |||
self._gs_id, str(requested_version)) | |||
msg = "Goal state {0} is requesting a new agent version {1} [VersionFromRSM:{2}], will update the agent before processing the goal state.".format( |
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 "VersionFromRSM" to something like "Is RSM update"?
I'm working on new PR |
Description
Now GS sends IsVersionFromRSM property in agent family to tell requested version is from RSM or not. We use this flag and fall back to old behavior of agent update in non-rsm case.
The schema would be
ExtensionConfig.xml
Vmsettings.json
Issue #
PR information
Quality of Code and Contribution Guidelines