Skip to content

[ContainerApp] Bugfix - Remove pre-existing containers for source to cloud flow #7293

Merged
wangzelin007 merged 66 commits intoAzure:mainfrom
snehapar9:snehapar/fix-port-error
Feb 29, 2024
Merged

[ContainerApp] Bugfix - Remove pre-existing containers for source to cloud flow #7293
wangzelin007 merged 66 commits intoAzure:mainfrom
snehapar9:snehapar/fix-port-error

Conversation

@snehapar9
Copy link
Copy Markdown
Contributor


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Feb 16, 2024

️✔️Azure CLI Extensions Breaking Change Test
️✔️Non Breaking Changes

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Hi @snehapar9,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Feb 16, 2024

Thank you for your contribution! We will review the pull request and get back to you soon.

@snehapar9 snehapar9 changed the title Bugfix - Remove bootstrapped container for source to cloud flow [ContainerApp] Bugfix - Remove bootstrapped container for source to cloud flow Feb 16, 2024
if self.get_argument_max_inactive_revisions() is not None:
safe_set(self.new_containerapp, "properties", "configuration", "maxInactiveRevisions", value=self.get_argument_max_inactive_revisions())

def set_up_containers_for_private_registry_image(self):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: please consider renaming "private registry" to "default registry" as it's the wording we're pushing for now (and it is what is used in the UI)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks Dan! This change is not valid anymore in my latest commits.

@Greedygre
Copy link
Copy Markdown
Contributor

LGTM, please rerun tests relate to az containerapp up/update with --live.

@Greedygre
Copy link
Copy Markdown
Contributor

Hi @zhoxing-ms @yanzhudd

Can you help to review and merge this PR when you have chance? Thanks.

@Greedygre
Copy link
Copy Markdown
Contributor

The credential Scan is Pass before.

image

@yonzhan yonzhan requested a review from wangzelin007 February 28, 2024 10:13
@zhoxing-ms
Copy link
Copy Markdown
Contributor

The credential Scan is Pass before.

Known issue, @wangzelin007 has sent an email to Microsoft Security Code Analysis Support for help.

@Greedygre
Copy link
Copy Markdown
Contributor

Hi @wangzelin007 @zhoxing-ms

Can you help to merge this PR? Thanks. Hope the Credential Scan not block this.

@gitguardian
Copy link
Copy Markdown

gitguardian bot commented Feb 29, 2024

⚠️ GitGuardian has uncovered 138 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_patch_list_and_apply_with_python310_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_get_customdomainverificationid_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_get_customdomainverificationid_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerappjob_create_with_environment_id.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerappjob_create_with_environment_id.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_up_image_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_up_image_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_env_storage.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_patch_list_and_apply_with_node18_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_identity_system.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_identity_system.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_preview_create_with_environment_id.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_preview_create_with_environment_id.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerappjob_create_with_yaml.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_env_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_env_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_env_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_env_mtls.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_up_source_with_bookworm_buildpack_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_up_source_with_bookworm_buildpack_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerappjob_create_with_yaml.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerappjob_create_with_yaml.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_create_with_vnet_yaml.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_create_with_vnet_yaml.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_patch_list_and_apply_with_node18_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_patch_list_and_apply_with_node18_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_env_certificate_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_java_component.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_java_component.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_patch_list_and_apply_with_show_all_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_patch_list_and_apply_with_show_all_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_up_source_with_dockerfile_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_up_source_with_dockerfile_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_up_source_with_bullseye_buildpack_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_resiliency.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_resiliency.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_env_update_custom_domains.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_env_update_custom_domains.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_custom_domains_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_dev_add_on_binding_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_resiliency.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_container_app_mount_secret_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_container_app_mount_secret_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_up_on_arc_auto_install_extension_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_dapr_component_resiliency.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_dapr_component_resiliency.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_patch_list_and_apply_with_environment_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_patch_list_and_apply_with_environment_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_patch_list_and_apply_with_python310_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_patch_list_and_apply_with_python310_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_managed_service_binding_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_managed_service_binding_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_custom_domains_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_custom_domains_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_patch_list_and_apply_without_arguments_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_up_on_arc_auto_install_extension_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_env_usages.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerappjob_create_with_environment_id.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_dapr_component_resiliency.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_java_component.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_up_source_with_multiple_environments_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_up_source_with_multiple_environments_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_up_source_with_multiple_environments_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_up_source_with_multiple_environments_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_patch_list_and_apply_with_environment_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_env_custom_domains.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_up_image_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_up_source_with_default_registry_image.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_env_update_custom_domains.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_patch_list_and_apply_with_resource_group_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_patch_list_and_apply_with_resource_group_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_env_custom_domains.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_env_custom_domains.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_env_custom_domains.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_container_app_mount_secret_update_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_container_app_mount_secret_update_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_patch_list_and_apply_with_show_all_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_dev_service_binding_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_dev_service_binding_e2e.yaml View secret
- Microsoft Azure Storage Account Key e14a0ec src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_patch_list_and_apply_with_resource_group_e2e.yaml View secret

and 58 others.

🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

@Greedygre Greedygre force-pushed the snehapar/fix-port-error branch from fd5d95f to e14a0ec Compare February 29, 2024 01:14
@Greedygre
Copy link
Copy Markdown
Contributor

Hi @wangzelin007

d6a8f0c

Can you help to review and merge this PR? I have remove all secrets in the yaml file, but the GitGuardian Security Checks is still failed. These secrets are always existing before, and they are deleted and out of date.

Thanks for your help.

@wangzelin007
Copy link
Copy Markdown
Member

Hi @wangzelin007

d6a8f0c

Can you help to review and merge this PR? I have remove all secrets in the yaml file, but the GitGuardian Security Checks is still failed. These secrets are always existing before, and they are deleted and out of date.

Thanks for your help.

Please fix the Integration Tests first, I can help bypass other security checks.

@wangzelin007 wangzelin007 merged commit 7b2ba86 into Azure:main Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants