Conversation
The shared library was built downstream: a consumer cloned this repo inside its own Docker build, at a commit named in an ARG it bumped by hand, and tagged the result with its own commit sha. So the image's identity said nothing about which engine was in it, and the ARG drifted three releases behind -- shipping a library with neither ends_with nor the JSON lookup functions -- without anything failing, because the ARG was the only thing asserting what it contained. Building it here removes the class. The image is produced by the source it ships, tagged with the version that source declares, and pushed alongside the crate by the same workflow that already verifies the tag matches Cargo.toml. Multi-arch on native runners: this is a Rust release build, and under QEMU it does not finish inside a sane timeout. Each arch pushes by digest and a second job merges them, because one tag cannot name two single-arch manifests without the second replacing the first. The index digest is printed to the step summary so consumers can pin it instead of the tag. workflow_dispatch takes an image-version input because 0.7.4 shipped before this job existed, and its image has to be publishable without inventing a crate release to carry it. Layout is unchanged at /tmp/libwirefilter_ffi.so, so existing `COPY --from=wirefilter` consumers keep working. Verified by building the image and linking rules-validator against the library it contains: all five functions 0.7.4 exports validate (lookup_json_string, lookup_json_integer, to_string, upper, remove_query_args), as do 0.7.2's ends_with and the smart_firewall scheme's ids.sids.
Collaborator
Author
|
Closing: the image release belongs with the consuming repo's tag train, not in the engine repo. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The FFI shared library is currently built downstream: a consumer clones this repo inside its own Docker build, at a commit named in an
ARGit bumps by hand, and tags the result with its commit sha.Two consequences, both of which have already happened:
ARGdrifted three releases behind — shipping a library with neitherends_with(0.7.2) nor the JSON lookup functions (0.7.4) — and nothing failed, because thatARGwas the only thing asserting what the image contained.Building it here removes the class: the image is produced by the source it ships, tagged with the version that source declares, by the same workflow that already verifies the tag matches
Cargo.toml.Shape
workflow_dispatchtakes animage-versioninput, because 0.7.4 shipped before this job existed and its image must be publishable without inventing a crate release to carry it./tmp/libwirefilter_ffi.so, so existingCOPY --from=wirefilterconsumers keep working.Verification
Built the image locally and linked
rules-validatoragainst the library it contains. All five functions 0.7.4 exports validate against the real engine:shellcheckover the newrun:blocks is clean and the workflow parses with the expected job graph.The push path itself cannot be exercised by a PR — it needs a tag or a dispatch. First real test is publishing 0.7.4's image via
workflow_dispatch.Base branch
Targets
release/v0.7.3, becausev0.7.4exists only there and a workflow runs as it exists at the tagged commit. That leavesmasterwithout this job — reconciling the two is a follow-up, not something to smuggle into this PR.