-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix rust caching and duplicate buildpack compilation #91
Conversation
This is a restructuring of the whole release process to eliminate the issues outlines in #48 (buildpacks compiled multiple times could result in non-determinism) and #49 (rust caching isn't working due to non-unique keys). Many of the overall steps are still the same but the `detect` job has been replaced by a `compile` job which front loads all the rust and buildpack compilation and cached the compiled buildpack folder for later use. Compilation was previously handled in the `package` job which is no longer needed. To support this new flow, a `buildpack_output_dir` value had to be added to the generated buildpack matrix. This also allowed some simplification in terms of the assets cached since the OCI image and CNB file can be generated directly from the compiled `buildpack_output_dir` we don't need to store those values in the cache anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for doing this! I love the new combined shared workflow idea too - as you say, it should reduce the boilerplate in each buildpack's repo :-)
I presume the rollout plan for this is to merge this PR, switch the repos over to using the new workflow, then remove the old separated workflows afterwards? (If so, that sounds good to me - I was just initially wondering why the old workflows weren't deleted in this PR.)
@edmorley re: rollout plan - you are correct. merge this PR, switch the repos over to using the new workflow, then remove the old separated workflows afterwards. |
Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Incorporates changes from heroku/languages-github-actions#91
Incorporates changes from heroku/languages-github-actions#91
Incorporates changes from heroku/languages-github-actions#91
Incorporates changes from heroku/languages-github-actions#91
Incorporates changes from heroku/languages-github-actions#91
Switches to the new combined workflow approach added in: heroku/languages-github-actions#91
Switches to the new combined workflow approach added in: heroku/languages-github-actions#91
Switches to the new combined workflow approach added in: heroku/languages-github-actions#91
Switches to the new combined workflow approach added in: heroku/languages-github-actions#91
Switches to the new combined workflow approach added in: heroku/languages-github-actions#91
We can remove these separated workflows now that the following PRs have been merged: - heroku/buildpacks-jvm#554 - heroku/buildpacks-php#14 - heroku/buildpacks-go#123 - heroku/buildpacks-ruby#183 - heroku/buildpacks-nodejs#609 - heroku/buildpacks-python#58 - heroku/buildpacks-procfile#156
* Post PR #91 Cleanup We can remove these separated workflows now that the following PRs have been merged: - heroku/buildpacks-jvm#554 - heroku/buildpacks-php#14 - heroku/buildpacks-go#123 - heroku/buildpacks-ruby#183 - heroku/buildpacks-nodejs#609 - heroku/buildpacks-python#58 - heroku/buildpacks-procfile#156 * PR feedback
This is a restructuring of the whole release process to eliminate the issues outlines in #48 (buildpacks compiled multiple times could result in non-determinism) and #49 (rust caching isn't working due to non-unique keys).
Many of the overall steps are still the same but the
detect
job has been replaced by acompile
job which front loads all the rust and buildpack compilation and cached the compiled buildpack folder for later use. Compilation was previously handled in thepackage
job which is no longer needed.To support this new flow, a
buildpack_output_dir
value had to be added to the generated buildpack matrix. This also allowed some simplification in terms of the assets cached since the OCI image and CNB file can be generated directly from the compiledbuildpack_output_dir
we don't need to store those values in the cache anymore.Fixes #48 (W-13738777), fixes #49 (W-13738739)
Note - I discovered I was mistaken about how strategies and shared workflows interact. Turns out you can use them. The GitHub Actions docs make it sound like you can't and I must have messed up when I initially tried this. Using this new shared workflow should simplify the calling
release.yml
files in our buildpack repos 😄We'll also need to be careful with changes to buildpack output locations like heroku/libcnb.rs#583 and ensure these still line up with expectations in our release process.