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

Pedro/fix dashes azure #1606

Closed
wants to merge 3 commits into from
Closed

Pedro/fix dashes azure #1606

wants to merge 3 commits into from

Conversation

otherview
Copy link
Contributor

Why this change is needed

Please provide a description and a link to the underlying ticket

What changes were made as part of this PR

Please provide a high level list of the changes made

PR checks pre-merging

Please indicate below by ticking the checkbox that you have read and performed the required
PR checks

  • PR checks reviewed and performed

@otherview otherview requested a review from moraygrieve October 16, 2023 16:21
@coderabbitai
Copy link

coderabbitai bot commented Oct 16, 2023

Walkthrough

The changes across all the files primarily involve adding escaped double quotes around the ${{env.RESOURCE_TAG_NAME}} variable in the az resource list and az vm create commands. This is done to ensure proper parsing of the tag value and prevent potential issues with command execution in the GitHub Actions workflows.

Changes

File Summary
.github/workflows/manual-deploy-obscuro-gateway-database.yml Added escaped double quotes around ${{env.RESOURCE_TAG_NAME}} in az resource list command.
.github/workflows/manual-deploy-obscuro-gateway.yml Added escape characters to ${{env.RESOURCE_TAG_NAME}} in az resource list command in two places.
.github/workflows/manual-deploy-testnet-l1.yml Added escaped double quotes around ${{env.RESOURCE_TAG_NAME}} in az resource list and az vm create commands.
.github/workflows/manual-deploy-testnet-l2.yml Added escaped double quotes around ${{vars.RESOURCE_TAG_NAME}} in az resource list command in two places.

Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • Mention @coderabbitai in any review comment for bot assistance.
  • Note: Review comments are made on code diffs or files, not on the PR overview.

Pause Incremental Reviews

  • Insert @coderabbitai: ignore in the PR description to halt the bot's ongoing reviews. Remove the line to resume.
  • Additionally, enter @coderabbitai pause to halt the bot's ongoing reviews as any issue or review comment. To
    resume reviews, enter @coderabbitai resume as any issue or review comment.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Commits Files that changed from the base of the PR and between d1036cf and 3f91f08.
Files selected for processing (4)
  • .github/workflows/manual-deploy-obscuro-gateway-database.yml (1 hunks)
  • .github/workflows/manual-deploy-obscuro-gateway.yml (1 hunks)
  • .github/workflows/manual-deploy-testnet-l1.yml (2 hunks)
  • .github/workflows/manual-deploy-testnet-l2.yml (1 hunks)
Files skipped from review due to trivial changes (3)
  • .github/workflows/manual-deploy-obscuro-gateway-database.yml
  • .github/workflows/manual-deploy-obscuro-gateway.yml
  • .github/workflows/manual-deploy-testnet-l2.yml
Additional comments (Suppressed): 2
.github/workflows/manual-deploy-testnet-l1.yml (2)
  • 88-95: The addition of escaped double quotes around ${{env.RESOURCE_TAG_NAME}} in the az resource list command ensures that the tag value is correctly parsed and passed to the Azure CLI command. This change prevents potential execution issues if the tag value contains special characters or whitespace. However, the same command is duplicated in lines 88-89 and 94-95. If the purpose of both commands is the same, consider removing the duplicate to adhere to the DRY principle.
         uses: azure/CLI@v1
         with:
           inlineScript: |
            $(az resource list --tag \"${{env.RESOURCE_TAG_NAME}}\"=true --query '[]."id"' -o tsv | xargs -n1 az resource delete --verbose -g Testnet --ids) || true
 
       # This will clean up any lingering dependencies - might fail if there are no resources to cleanup
       - name: 'Delete VMs dependencies'
         uses: azure/CLI@v1
         with:
           inlineScript: |
            $(az resource list --tag \"${{env.RESOURCE_TAG_NAME}}\"=true --query '[]."id"' -o tsv | xargs -n1 az resource delete --verbose -g Testnet --ids) || true
       
 
       - name: 'Create VM for "${{env.RESOURCE_NAME}}-${{ GITHUB.RUN_NUMBER }}" on Azure'
  • 105-105: The addition of escaped double quotes around ${{env.RESOURCE_TAG_NAME}} in the az vm create command ensures that the tag value is correctly parsed and passed to the Azure CLI command. This change prevents potential execution issues if the tag value contains special characters or whitespace.

@otherview otherview closed this Oct 16, 2023
@otherview otherview deleted the pedro/fix_dashes_azure branch October 16, 2023 16:50
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.

2 participants