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

[github-actions] Add index-monitor action #31378

Merged
merged 3 commits into from
Jan 16, 2025
Merged

[github-actions] Add index-monitor action #31378

merged 3 commits into from
Jan 16, 2025

Conversation

migruiz4
Copy link
Member

@migruiz4 migruiz4 commented Jan 15, 2025

Description of the change

Adds the new workflow 'index-monitor.yml'.

This new workflow will be executed in a schedule every 10 minutes and will be in charge of checking the integrity of the index.yaml file available at

Benefits

These changes aim to prevent the recent index failures, which we suspect may be related to the upload of the index.yaml available at 'http://charts.bitnami.com/bitnami/index.yaml'.

If consistent failures are detected (failed 3 times in a row), notifies the error and triggers a new index upload to immediately amend the issues.

Additional information

The workflow consists of 2 checks:

Checklist

  • Chart version bumped in Chart.yaml according to semver. This is not necessary when the changes only affect README.md files.
  • Variables are documented in the values.yaml and added to the README.md using readme-generator-for-helm
  • Title of the pull request follows this pattern [bitnami/<name_of_the_chart>] Descriptive title
  • All commits signed off and in agreement of Developer Certificate of Origin (DCO)

@github-actions github-actions bot added verify Execute verification workflow for these changes bitnami labels Jan 15, 2025
@github-actions github-actions bot requested a review from jotamartos January 15, 2025 11:04
@migruiz4 migruiz4 marked this pull request as ready for review January 15, 2025 16:06
carrodher
carrodher previously approved these changes Jan 15, 2025
@carrodher
Copy link
Member

mmm... Shouldn't this PR be created using the index branch as the reference?

Signed-off-by: Miguel Ruiz <[email protected]>
jotamartos
jotamartos previously approved these changes Jan 16, 2025
@migruiz4 migruiz4 merged commit 5b34d26 into main Jan 16, 2025
14 checks passed
@migruiz4 migruiz4 deleted the index-monitor branch January 16, 2025 10:17
Copy link
Collaborator

@fmulero fmulero left a comment

Choose a reason for hiding this comment

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

Just a little comment

Comment on lines +48 to +57
echo "result=${status}" >> $GITHUB_OUTPUT
- name: Show messages
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
with:
script: |
if ("${{ steps.integrity-check.outputs.result }}" != "ok" ) {
core.setFailed("Integrity check failed");
} else {
core.info("Integrity check succeeded")
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we could simplify this piece of code with something like this:

Suggested change
echo "result=${status}" >> $GITHUB_OUTPUT
- name: Show messages
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
with:
script: |
if ("${{ steps.integrity-check.outputs.result }}" != "ok" ) {
core.setFailed("Integrity check failed");
} else {
core.info("Integrity check succeeded")
}
if [[ "${status}" != "ok" ]]; then
echo "::error:: Integrity check failed"
else
echo "::info:: Integrity check succeeded"
fi
echo "result=${status}" >> $GITHUB_OUTPUT

Comment on lines +94 to +103
echo "result=${status}" >> $GITHUB_OUTPUT
- name: Show messages
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
with:
script: |
if ("${{ steps.validation-check.outputs.result }}" != "ok" ) {
core.setFailed("Validation check failed");
} else {
core.info("Validation check succeeded")
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here:

Suggested change
echo "result=${status}" >> $GITHUB_OUTPUT
- name: Show messages
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
with:
script: |
if ("${{ steps.validation-check.outputs.result }}" != "ok" ) {
core.setFailed("Validation check failed");
} else {
core.info("Validation check succeeded")
}
if [[ "${status}" != "ok" ]]; then
echo "::error:: Validation check failed"
else
echo "::info:: Validation check succeeded"
fi
echo "result=${status}" >> $GITHUB_OUTPUT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bitnami solved verify Execute verification workflow for these changes
Projects
None yet
4 participants