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

added missed binaries required to run ./tools/image-tag script #8640

Merged
merged 2 commits into from
Feb 27, 2023

Conversation

vlad-diachenko
Copy link
Contributor

What this PR does / why we need it:

This drone step had to prepare a config for the updater to update loki helm chart with the latest image version automatically. However, it failed due to an error:

+ RELEASE_TAG=$(./tools/image-tag)
env: can't execute 'bash': No such file or directory

I forgot to install bash and git before running this script inside alpine container.

@vlad-diachenko vlad-diachenko requested a review from a team as a code owner February 27, 2023 09:12
Copy link
Contributor

@kavirajk kavirajk left a comment

Choose a reason for hiding this comment

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

LGTM. 👍

Q: do we really need bash here? (I see only we use git)

@kavirajk
Copy link
Contributor

Ah. nvm. PR description make it clear.

@@ -707,6 +707,8 @@ local manifest_ecr(apps, archs) = pipeline('manifest-ecr') {
image: 'alpine',
depends_on: ['check-version-is-latest'],
commands: [
'apk add --no-cache bash git',
Copy link
Contributor

Choose a reason for hiding this comment

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

Out of interest, can we not just use ash instead?

Copy link
Contributor

Choose a reason for hiding this comment

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

You mean sh instead of bash?

+ RELEASE_TAG=$(./tools/image-tag)
env: can't execute 'bash': No such file or directory

I guess our image-tag requires bash looks like.

Copy link
Contributor

Choose a reason for hiding this comment

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

No, I mean ash which is the default shell of Alpine

Copy link
Contributor

Choose a reason for hiding this comment

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

We have #!/usr/bin/env bash in the header of image-tag, which is probably unnecessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have #!/usr/bin/env bash in the header of image-tag, which is probably unnecessary.

yep, nothing bash specific is used in the script )) so I believe we can remove the header from the script or make it flexible to be able to run in any terminal...

anyway, not only bash was missed, git is also required, so let's merge this PR and update ./tools/image-tag script when we have time and need ))

Copy link
Contributor

Choose a reason for hiding this comment

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

SGTM 👍

@vlad-diachenko vlad-diachenko merged commit 88120a0 into main Feb 27, 2023
@vlad-diachenko vlad-diachenko deleted the fix-helm-chart-auto-update-step branch February 27, 2023 10:16
@vlad-diachenko vlad-diachenko added type/bug Somehing is not working as expected backport release-2.7.x add to a PR to backport it into release 2.7.x labels Feb 27, 2023
@grafanabot
Copy link
Collaborator

The backport to release-2.7.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-8640-to-release-2.7.x origin/release-2.7.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 88120a0857af4e45e204185117d7a32bbca2478f
# Push it to GitHub
git push --set-upstream origin backport-8640-to-release-2.7.x
git switch main
# Remove the local backport branch
git branch -D backport-8640-to-release-2.7.x

Then, create a pull request where the base branch is release-2.7.x and the compare/head branch is backport-8640-to-release-2.7.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release-2.7.x add to a PR to backport it into release 2.7.x backport-failed size/XS type/bug Somehing is not working as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants