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

Improve diff mode #46

Merged
merged 1 commit into from
Apr 12, 2024
Merged

Improve diff mode #46

merged 1 commit into from
Apr 12, 2024

Conversation

SethHollandsworth
Copy link
Owner

Diff mode now labels differences by the container's given name, not the image name. This allows for clearer messages when multiple containers in a single container group use the same image tag. Additionally, there's a better method to figure out which container was changed assuming it uses the same image.

ksayid
ksayid previously approved these changes Mar 25, 2024
Copy link
Collaborator

@ksayid ksayid left a comment

Choose a reason for hiding this comment

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

nit: In security_policy.py, I think docstring for validate could be updated to include the new logic for matching container IDs. There's a lot going on in validate.

manifest = load_json_from_file(manifest_path)
# if we match a RepoTag to the image, stop searching
for image in manifest:
if image_name in image.get("RepoTags"):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a chance the RepoTags key will be missing from image? I think it'd cause a type error in the if-statement.

That would lead to the manifest.json getting extracted but not cleaned up. A try-finally would help with that I think.

@ksayid ksayid dismissed their stale review March 25, 2024 14:19

Added new comment after approving.

@SethHollandsworth SethHollandsworth merged commit 06e6177 into main Apr 12, 2024
@SethHollandsworth SethHollandsworth deleted the improve_diff_mode branch April 26, 2024 14:00
SethHollandsworth pushed a commit that referenced this pull request Aug 14, 2024
* build: add cicd pipeline (#7)

* build: move update version logic to workflow (#8)

* build: Run CI on multiple python version (#38)

* build: Run CI in Python 3.8-3.11

* build: remove pull request event for CI to avoid duplicate runs

* test: add test cases for commands (#40)

* fix: error when register API with long description spec (#41)

* test: add test cases for optional parameters (#42)

* feat!: remove file name param (#43)

* fix: error not thrown when import spec with >3MB file (#44)

* feat!: remove state param for deployment commands (#46)

* fix: API title created by register command is not same with provided spec (#47)

* feat!: redesign parameters to specify APIM instance for import-from-apim command (#45)

* test: clean up legacy test cases (#48)

* test: add test cases for command examples (#49)

* docs: update help message per feedback (#50)

* build: bump version to 1.0.0 and add changelog (#51)

* fix: some parameters should be required in import-specification and deployment command (#53)

* feat!: rename parameter names to align with other Azure CLI command experience (#52)

* test: enable test for import-from-apim (#54)

* test: fix show service test case (#55)

* docs: update changelog for 1.0.0 (#56)

* Update HISTORY.rst - jukasper

updated changelog

* Update HISTORY.rst

* Update HISTORY.rst

* Update HISTORY.rst

* Update HISTORY.rst

* Update HISTORY.rst

* Update HISTORY.rst

* Update HISTORY.rst

* Update HISTORY.rst

* Update HISTORY.rst

* Update HISTORY.rst

* Update HISTORY.rst

* Update HISTORY.rst

* Update HISTORY.rst

* Update HISTORY.rst

* Update HISTORY.rst

* Update HISTORY.rst

* docs: update readme for apic-extension (#57)

* fix: cannot run create command against existing resource (#58)

* fix: cannot run create command against existing resource

* style: fix style

* build: remove cicd pipeline (#59)

* build: resolve review comments (#60)

---------

Co-authored-by: Julia Kasper <[email protected]>
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