Skip to content

Conversation

@sourikghosh
Copy link
Contributor

Signed-off-by: Sourik Ghosh sourikghosh31@gmail.com

What this PR does / why we need it:
adds a overwrite flag to az storage blob upload-batch to replace canary.
closes #10724

Special notes for your reviewer:

If applicable:

  • this PR contains documentation
  • this PR contains unit tests
  • this PR has been tested for backwards compatibility

Signed-off-by: Sourik Ghosh <sourikghosh31@gmail.com>
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 5, 2022
@yxxhero
Copy link
Member

yxxhero commented Mar 5, 2022

/lgtm
Thanks your PR.

@yxxhero yxxhero requested a review from jdolitsky March 5, 2022 06:09
@sourikghosh
Copy link
Contributor Author

@jdolitsky can you have a look at this

Copy link
Contributor

@jdolitsky jdolitsky left a comment

Choose a reason for hiding this comment

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

I was thinking about this. The new behavior actually protects from supply chain attacks.

Could you modify this to only add --overwrite if [[ "${VERSION}" == "canary" ]] ?

Signed-off-by: Sourik Ghosh <sourikghosh31@gmail.com>
Comment on lines 49 to 53
if [[ "${VERSION}" == "canary" ]]; then
az storage blob upload-batch -s _dist/ -d "$AZURE_STORAGE_CONTAINER_NAME" --pattern 'helm-*' --connection-string "$AZURE_STORAGE_CONNECTION_STRING" --overwrite
else
az storage blob upload-batch -s _dist/ -d "$AZURE_STORAGE_CONTAINER_NAME" --pattern 'helm-*' --connection-string "$AZURE_STORAGE_CONNECTION_STRING"
if
Copy link
Contributor

Choose a reason for hiding this comment

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

last thing, can we format this?

if [[ "${VERSION}" == "canary" ]]; then
  az storage blob upload-batch -s _dist/ -d "$AZURE_STORAGE_CONTAINER_NAME" --pattern 'helm-*' --connection-string "$AZURE_STORAGE_CONNECTION_STRING" --overwrite
else
  az storage blob upload-batch -s _dist/ -d "$AZURE_STORAGE_CONTAINER_NAME" --pattern 'helm-*' --connection-string "$AZURE_STORAGE_CONNECTION_STRING"
if

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ohhh snap,,, yeah yeah

Signed-off-by: Sourik Ghosh <sourikghosh31@gmail.com>
@sourikghosh sourikghosh requested a review from jdolitsky March 8, 2022 18:57
@jdolitsky
Copy link
Contributor

thanks @sourikghosh !

@jdolitsky jdolitsky merged commit d61b9be into helm:main Mar 8, 2022
@jdolitsky jdolitsky added this to the 3.8.1 milestone Mar 8, 2022
@mattfarina mattfarina added needs-pick Indicates that a PR needs to be cherry-picked into the next release candidate. picked Indicates that a PR has been cherry-picked into the next release candidate. labels Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-pick Indicates that a PR needs to be cherry-picked into the next release candidate. picked Indicates that a PR has been cherry-picked into the next release candidate. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New azure-cli requires --overwrite to replace canary

4 participants