Support using multiple images sources in our CLI#142
Merged
patrykkulik-microsoft merged 27 commits intomainfrom Mar 26, 2024
Merged
Support using multiple images sources in our CLI#142patrykkulik-microsoft merged 27 commits intomainfrom
patrykkulik-microsoft merged 27 commits intomainfrom
Conversation
Cyclam
reviewed
Mar 15, 2024
Cyclam
requested changes
Mar 19, 2024
src/aosm/azext_aosm/configuration_models/onboarding_cnf_input_config.py
Outdated
Show resolved
Hide resolved
| """Write the definition element to disk.""" | ||
| self.path.mkdir(exist_ok=True) | ||
| artifacts_list = [] | ||
| # TODO: Handle converting path to string that doesn't couple this code to the artifact. |
Collaborator
There was a problem hiding this comment.
Is this all fixed? Amazing!!! 😃
Do you know how well it's been tested / needs to be tested?
Collaborator
Author
There was a problem hiding this comment.
I have tested this for the RemoteACRArtifact class which is the one that gets created for CNF helm images. I have not tested with other artifacts so would be great if someone tests it, but I don't think it should cause any problems given it works for mine just fine
Collaborator
There was a problem hiding this comment.
Not sure what the next step is here. Do you think your live testing will cover this sufficiently?
src/aosm/azext_aosm/definition_folder/reader/artifact_definition.py
Outdated
Show resolved
Hide resolved
Cyclam
reviewed
Mar 25, 2024
Collaborator
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR is delivering the feature of allowing multiple image sources in our CLI and allow these sources to be registries other than Azure Container Registries (for example docker registries). Here is a link to the story: [Turtle 2Wk13 (Mar 10 - Mar 23) Taskboard - Boards (azure.com)](https://dev.azure.com/msazuredev/AzureForOperators/_sprints/taskboard/Turtle/AzureForOperators/Germanium/CY24Q1/2Wk/2Wk13%20(Mar%2010%20-%20Mar%2023)?workitem=1096825)
Changes
To achieve this, I have implemented the following:
registry.pyfile which contains all logic related to registriesartifact.pyfile and moved it to the new registry classesonboarding_cnf_handler. This will create individual registry objects based on the input “image_sources” listdockerinterface. This is hard to do without asking the users for credentials. Because of this, I do not check for all images in the docker registries. Instead, if an image is not in an ACR, we search the docker registries for that specific image. This means that the interfaces between two registry classes are different. Is this ok? Doing the same for ACRs would make the process much slower.find_registry_for_imageon the registry_handler class.Other things:
helm templatewith the assumption that the string after the final slash is the actual image name while everything before that is just namespace? Is that true? When searching for images in the Registries, I add the namespace based on the user input in the input config.artifacts.jsonfileTesting: