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

CI: Helm chart should not be created if the container creation fails #136

Open
callumforrester opened this issue Apr 21, 2023 · 8 comments · May be fixed by #667
Open

CI: Helm chart should not be created if the container creation fails #136

callumforrester opened this issue Apr 21, 2023 · 8 comments · May be fixed by #667
Labels
bug Something isn't working github_actions Pull requests that update GitHub Actions code

Comments

@callumforrester
Copy link
Collaborator

callumforrester commented Apr 21, 2023

Currently there seems to be no link between the two actions

update: description - from @callumforrester

Typically in a Github release pipeline, you want actions to depend on one another so that broken artefacts are not published, for example there is no point in uploading to PyPi or publishing a container image if the tests won't even pass.
Currently we have a Github actions job for publishing the helm chart on a release, and it doesn't seem to have any dependencies because it will try to package and publish a chart even if other jobs fail. It should be one of the last steps in the pipeline and should depend on the container build at the very least.

Acceptance Criteria

  • Helm publishing job depends on container successfully building and publishing
    
  • If the container fails, no new helm chart is published
    
@callumforrester callumforrester added bug Something isn't working github_actions Pull requests that update GitHub Actions code labels Apr 21, 2023
@DiamondJoseph
Copy link
Collaborator

Also should wait until the container is finished creating

@keithralphs
Copy link
Contributor

Should we restructure using reusable workflows to achieve this, now that we know they work?

@callumforrester
Copy link
Collaborator Author

Potentially, there is also an argument for restructuring upstream in https://github.com/DiamondLightSource/python3-pip-skeleton and merging to here. @gilesknap any thoughts?

@callumforrester
Copy link
Collaborator Author

Plans for https://github.com/DiamondLightSource/python-copier-template align with this so should be resolved by #359

@stan-dot
Copy link
Collaborator

@callumforrester the issue description is unclear, I guess this is solved now with #359

@callumforrester
Copy link
Collaborator Author

@stan-dot this issue is not resolved and I agree it needs more description:

Typically in a Github release pipeline, you want actions to depend on one another so that broken artefacts are not published, for example there is no point in uploading to PyPi or publishing a container image if the tests won't even pass.
Currently we have a Github actions job for publishing the helm chart on a release, and it doesn't seem to have any dependencies because it will try to package and publish a chart even if other jobs fail. It should be one of the last steps in the pipeline and should depend on the container build at the very least.

Acceptance Criteria

  • Helm publishing job depends on container successfully building and publishing
  • If the container fails, no new helm chart is published

@DiamondJoseph
Copy link
Collaborator

We might still want to create a Helm chart as part of an earlier step in case we make a breaking change to it, but not publish unless everything works.

@callumforrester
Copy link
Collaborator Author

Agreed, there should be a job to lint the chart and another one to publish it

@stan-dot stan-dot linked a pull request Oct 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working github_actions Pull requests that update GitHub Actions code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants