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

feat!: Upgrade rev.2 #467

Merged
merged 5 commits into from
Dec 19, 2024
Merged

feat!: Upgrade rev.2 #467

merged 5 commits into from
Dec 19, 2024

Conversation

digimaun
Copy link
Member

@digimaun digimaun commented Dec 19, 2024

  • Checkpoint PR to merge upgrade revision 2.
    • Replaces existing implementation. Module temporarily called upgrade2.
  • Upgrade allows configuration of settings, version and release train for any AIO related extension.
  • Unit tests adding 98% code coverage, with Test Scenario pattern established in prior work module unit test refresh.
  • Adds parse_kvp_nargs util function. This should be the go forward for parsing any kvp nargs based args we support. It is superior to the carry over assemble_nargs_to_dict in every way. assemble_nargs_to_dict should eventually be deleted.
  • Table display "The Upgrade Story" by default which shows a clear upgrade strategy.

Follow ups:

  • System extension TBD.
  • Some handling of non-success starting state of an extension.
  • Look into extension status and determine if a status of error can occur with a success http response code.
  • Future of packaging use.
  • QOL and nits.

@digimaun digimaun requested a review from c-ryan-k December 19, 2024 00:17
@digimaun digimaun marked this pull request as ready for review December 19, 2024 00:18
transient=True,
disable=bool(self.no_progress),
) as progress:
_ = progress.add_task("Analyzing cluster...", total=None)
Copy link
Contributor

Choose a reason for hiding this comment

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

can you just do progress.add_task("Analyzing cluster...", total=None) - the wildcard is extra

Copy link
Member

Choose a reason for hiding this comment

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

I can't remember if it was, or still is, a thing - but I think there was a linter rule regarding calling functions that return a value without assigning that value to something?

get_mock_instance_record,
)

T = TypeVar("T", bound="UpgradeScenario")
Copy link
Contributor

Choose a reason for hiding this comment

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

prob use something more descriptive than just T (you can do US or UpScen or something if you want to keep it short)

no_progress: Optional[bool] = None,
confirm_yes: Optional[bool] = None,
ops_config: Optional[List[str]] = None,
Copy link
Contributor

Choose a reason for hiding this comment

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

do we have a list of key value pairs that are actually accepted by the service? or do we assume that the service teams are the main consumers for this (and they would know the kv pairs themselves)

Copy link
Member Author

Choose a reason for hiding this comment

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

Some user kvp's are described in AIO learn documentation intended for end users. Kvp's can be provided and used both internally and externally (power uses, troubleshooting etc) for whatever reasons.

Copy link
Contributor

Choose a reason for hiding this comment

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

would be nice to include these in the long help but not necessary

cluster_name=self.resource_map.connected_cluster.cluster_name, resource_group_name=resource_group_name
)
self.init_version_map: Dict[str, dict] = {}
self.init_version_map.update(self.targets.get_extension_versions())
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: could combine this line with the one above

@@ -58,6 +58,7 @@ def update_cluster_extension(
cluster_name: str,
extension_name: str,
update_payload: dict,
**client_kwargs,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: can prob remove line 54

return bool(self.override.config)


def get_default_table() -> Table:
Copy link
Contributor

@vilit1 vilit1 Dec 19, 2024

Choose a reason for hiding this comment

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

nit: please add screenshot of examples upgrade runs

@digimaun digimaun merged commit 8db0fda into Azure:dev Dec 19, 2024
22 checks passed
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.

3 participants