You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PR to update this repository to libcnb 0.18.0 (which includes the switch to Buildpack API 0.10 and thus targets) is currently failing: #195
...with this error:
---- buildpacks::test::test_read_image_repository_metadata_empty stdout ----
thread 'buildpacks::test::test_read_image_repository_metadata_empty' panicked at src/buildpacks.rs:117:80:
called `Result::unwrap()` on an `Err` value: Error { inner: Error { inner: TomlError { message: "data did not match any variant of untagged enum BuildpackDescriptor", original: None, keys: [], span: None } } }
---- buildpacks::test::test_read_image_repository_metadata stdout ----
thread 'buildpacks::test::test_read_image_repository_metadata' panicked at src/buildpacks.rs:97:80:
called `Result::unwrap()` on an `Err` value: Error { inner: Error { inner: TomlError { message: "data did not match any variant of untagged enum BuildpackDescriptor", original: None, keys: [], span: None } } }
The reason they are failing is since the test uses a buildpack.toml that contains the no longer supported [[stacks]] TOML table, and the implementation in this repository uses the libcnb BuildpackDescriptor type to deserialise the buildpack.toml.
One way to fix the failures would be to update the Dependabot PR with changes to the test fixtures to use [[targets]] instead of [[stacks]].
However, once the changes are released, this will break all CNBs using the automation in this repository until they update to newer libcnb themselves (which is something they won't be able to do immediately, since they'll need to make their own changes for compatibility with stacks->targets). We could of course pre-emptively pin every buildpack's usage of the shared workflow to @<version> and then switch back to @<latest> later, but (a) that seems like a bit of a hassle, (b) it means some buildpacks might be stuck using an older version of the automation for some time, until they can be updated (eg the procfile CNB which is stuck on old libcnb).
Another option would be to make the buildpack.toml parser used in this repository more lax - and have a custom type in this repo that only contains the fields actually used by the automation? That way it will work with both new and libcnb versions, giving more flexibility both now and in the future.
Much longer term I think this issue highlights the need to push more of the Rust code in this repo upstream into eg libcnb-cargo, so we don't have such a hard coupling in APIs between this repo and libcnb's.
While I was reading your comment, I mentally prepared my answer which is pretty much what you wrote in the end:
Much longer term I think this issue highlights the need to push more of the Rust code in this repo upstream into eg libcnb-cargo, so we don't have such a hard coupling in APIs between this repo and libcnb's.
I'm not sure how "long term" this really is though. This isn't the first time this coupling causes issues. IMO, we should prioritize making this change.
To unblock both this repository and buildpacks that will update to 0.10 buildpack API, relaxing the requirements for buildpack.toml in this repository makes sense to me.
The PR to update this repository to libcnb 0.18.0 (which includes the switch to Buildpack API 0.10 and thus targets) is currently failing:
#195
...with this error:
See:
https://github.com/heroku/languages-github-actions/actions/runs/7873635043/job/21481438671?pr=195#step:5:64
The tests in question are here:
languages-github-actions/src/buildpacks.rs
Lines 81 to 119 in db2870c
The reason they are failing is since the test uses a
buildpack.toml
that contains the no longer supported[[stacks]]
TOML table, and the implementation in this repository uses the libcnbBuildpackDescriptor
type to deserialise thebuildpack.toml
.One way to fix the failures would be to update the Dependabot PR with changes to the test fixtures to use
[[targets]]
instead of[[stacks]]
.However, once the changes are released, this will break all CNBs using the automation in this repository until they update to newer libcnb themselves (which is something they won't be able to do immediately, since they'll need to make their own changes for compatibility with stacks->targets). We could of course pre-emptively pin every buildpack's usage of the shared workflow to
@<version>
and then switch back to@<latest>
later, but (a) that seems like a bit of a hassle, (b) it means some buildpacks might be stuck using an older version of the automation for some time, until they can be updated (eg the procfile CNB which is stuck on old libcnb).Another option would be to make the
buildpack.toml
parser used in this repository more lax - and have a custom type in this repo that only contains the fields actually used by the automation? That way it will work with both new and libcnb versions, giving more flexibility both now and in the future.Much longer term I think this issue highlights the need to push more of the Rust code in this repo upstream into eg
libcnb-cargo
, so we don't have such a hard coupling in APIs between this repo and libcnb's.@Malax What are your thoughts?
The text was updated successfully, but these errors were encountered: