feat: add digital-alnd-python feature branch option to publish workflow - #60
Open
tombrooks248 wants to merge 1 commit into
Open
feat: add digital-alnd-python feature branch option to publish workflow#60tombrooks248 wants to merge 1 commit into
tombrooks248 wants to merge 1 commit into
Conversation
tombrooks248
force-pushed
the
feat/add-dlp-branch-option-to-publish-workflow
branch
from
June 12, 2026 10:30
1d4abf3 to
ffd477d
Compare
tombrooks248
marked this pull request as ready for review
June 12, 2026 14:10
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.
What type of PR is this? (check all applicable)
Description
Add a 3rd user input option to the publish workflow in this repo (collection-task) for putting in a feature branch of digital-land-python.
Add a safeguard to prevent people published feature branches to Production.
Why
Currently in order to test some pipeline change in digital land python, in DEV or STAGING you need to create a PR in this repo (collection-task) which points the docker build for the task at your branch in digital-land-python this is annoying and complicated - this change will simplfy that process.
Related Tickets & Documents
QA Instructions, Screenshots, Recordings
Locally I have run some tests on the logic:
Test 1 —
requirements.txtref rewrite (sed)Verifies that the Dockerfile's
sedrewrites thedigital-land-pythondependency line to the requested ref, across the ref shapes we expect to use.main(default)-e git+https://github.com/digital-land/pipeline.git@main#egg=digital-landfeat/add-expectations-logging-e git+https://github.com/digital-land/pipeline.git@feat/add-expectations-logging#egg=digital-land162-add-data-command-1-e git+https://github.com/digital-land/pipeline.git@162-add-data-command-1#egg=digital-landTest 2 — "Block feature refs in production" guard
Verifies the guard step's condition (
publish.yml) blocks non-mainrefs from reachingproductionwhile leaving every other case free to build.main(default)mainfeat/add-expectations-loggingfeat/add-expectations-logging162-add-data-command-1All cases behave as intended: the guard only fires on the single dangerous combination (non-
mainref andproduction), and the normalmain-to-production path is unaffected.Test 3 — End-to-end Docker build (local)
Proves the
digital_land_python_refbuild-arg flows all the way through to the code installed in the image:--build-arg→ DockerfileARG→sedrewrite ofrequirements.txt→pip install -e git+…@<ref>→ the git ref checked out inside the image.Built two images locally and inspected the commit pip actually checked out at
/task/src/digital-land:Test 3 — End-to-end Docker build (local)
Proves the
digital_land_python_refbuild-arg flows all the way through to the code installed in the image:--build-arg→ DockerfileARG→sedrewrite ofrequirements.txt→pip install -e git+…@<ref>→ the git ref checked out inside the image.Built two images locally and inspected the commit pip actually checked out at
/task/src/digital-land:main(default/control)fb9f0013f0621bb643eec1088d3d883d5ee7cb1efb9f001(refs/heads/main)162-add-data-command-1(feature)6e904bbd206f0ffa5598e83d7490aeb162feb0f76e904bb(refs/heads/162-add-data-command-1)The control build (
main) confirms default behaviour is unchanged; the feature build confirms an arbitrarydigital-land-pythonref is baked into the image as intended.Test 4
Which I haven't done but will do before merging and the next time its not 3:30pm on a Friday afternoon.
I'm going, run the new workflow from branch and just deploy main of both collection-task and digital-land-python to PROD, and check it all runs fine.
I'm then going to run the new workflow from branch and deploy a digital-land-python feature branch to staging, and check all runs fine.
Added/updated tests?
We encourage you to keep the code coverage percentage at 80% and above. Please refer to the Digital Land Testing Guidance for more information.
[optional] Are there any post deployment tasks we need to perform?
[optional] Are there any dependencies on other PRs or Work?