[FLINK-40248][ci] Add nightly snapshot publishing to GHA pipeline - #28831
Draft
dalelane wants to merge 4 commits into
Draft
[FLINK-40248][ci] Add nightly snapshot publishing to GHA pipeline#28831dalelane wants to merge 4 commits into
dalelane wants to merge 4 commits into
Conversation
Adding two jobs to the nightly GHA workflow that matches the cron_snapshot_deploment_binary and cron_snapshot_deployment_maven jobs that are in tools/azure-pipelines/build-nightly-dist.yml Both of these are using JDK 11 as the minimum supported version described in build-apache-repo.yml Signed-off-by: Dale Lane <dlane@confluent.io>
The create_binary_release.sh script is used in two ways: 1) manually, as part of creating a release 2) automated, as part of a nightly pipeline When run manually, there is a documented expectation (in the wiki) that a release manager will put the wheels in place ahead of running the script. When run as part of the pipeline, the wheels won't be there, and this causes the script to exit with an error. The wheels aren't needed for nightly builds, so this error is ignored. This commit changes that behaviour to be more intentional. It explicitly stops the automated build from requiring wheels, and starts checking exit codes so any other errors in future will not be ignored. Signed-off-by: Dale Lane <dlane@confluent.io>
If the deploy_nightly_to_s3.sh script is used by both overnight pipelines, then they need to write to separate locations to avoid them clobbering each other. I've left the AZP destination as-is, and added a prefix to the new GHA pipeline. If/when the AZP pipeline is retired, that prefix can be removed from the GHA call. Signed-off-by: Dale Lane <dlane@confluent.io>
Signed-off-by: Dale Lane <dale.lane@uk.ibm.com>
Collaborator
dalelane
commented
Jul 28, 2026
| name: snapshot-maven-jars-${{ github.run_number }} | ||
| path: ${{ env.STAGING_JARS_TARBALL }} | ||
| if-no-files-found: error | ||
| retention-days: 5 |
Contributor
Author
There was a problem hiding this comment.
I'm wondering whether it's feasible to have all the generated jars in a tar.gz build artifact or whether we hit some size limits here.
@XComp setting a retention time is a nod towards your comment on the storage requirements here. We could make this even shorter, I largely picked 5 days out of the air.
FWIW gzip'ping doesn't seem to make much difference.
I tried building a sample of modules - which suggests that the total size will be in the 1gb - 1.5gb ballpark. That is bigger than the snapshot binaries (which seem to be in the 600mb ballpark)
If this is too big, we could just tar the primary jars, and drop the sources/javadoc versions? Is that worth doing?
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 is the purpose of the change
The nightly Azure pipeline publishes two things that the GitHub Actions nightly
workflow currently doesn't: release binaries uploaded to S3, and snapshot jars
deployed to repository.apache.org. That gap needs closing before Flink can move off
Azure Pipelines (FLINK-27075).
Which pipeline publishes a given branch will be configuration held in the GHA nightly
workflow itself.
Because that workflow is versioned per branch, each branch can be switched over
independently, and a branch that hasn't been switched over yet still builds its
snapshots on GHA (keeping them as build artifacts of the workflow run rather than
publishing them).
The aim of this is to make sure that the new GHA jobs get exercised on every branch
before they become the canonical source of anything we publish.
masteris deliberately listed in both of the lists described below, which is thefirst phase of the rollout proposed on FLINK-40248: GHA publishes master's binaries
under a
gha-trial/prefix while Azure continues to publish to the bucket root, so thetwo can be compared over a series of nightly runs before anything depends on GHA's
output.
Removing master from the shadow list and removing Azure's
cron_snapshot_deploymentjob will be a follow-up, once the outputs have been confirmed to match.
Brief change log
snapshot_binaryandsnapshot_mavenjobs to.github/workflows/nightly.yml,mirroring the
cron_snapshot_deployment_binaryandcron_snapshot_deployment_mavenjobs in
tools/azure-pipelines/build-nightly-dist.yml. Both run on JDK 11, theminimum supported version, matching the Azure jobs.
PUBLISH_SNAPSHOT_BRANCHESlists branches whose snapshots this pipeline publishes.Because
nightly.ymlis versioned per branch, this is per-branch configuration,and a branch that has the change backported without being added to the list defaults
closed: it builds, but publishes nothing.
SHADOW_SNAPSHOT_BRANCHESlists branches that GHA and Azure are both publishingduring comparison. Binaries for those branches are uploaded to a
gha-trial/prefixin the S3 bucket rather than the bucket root, so the two pipelines can't overwrite
each other. Snapshot jars uploaded to Maven need no equivalent renaming, as they
already have timestamped names.
not it publishes, so its contents can be compared against what Azure produces.
-DaltDeploymentRepositoryand uploads that as a tarball artifact, instead ofdeploying to repository.apache.org.
tools/ci/deploy_nightly_to_s3.sh:upload_to_s3takes an optional destinationprefix, defaulting to the existing behaviour of writing to the bucket root.
tools/releasing/create_binary_release.sh: addsSKIP_PYTHON_WHEELS, defaulting tofalseso the manual release process is unaffected. Nightly builds set it totrue, so a binary release can be produced without the 12 platform wheels that arelease manager downloads by hand beforehand. Also enables
nullglobaround thewheel loop, so it doesn't iterate over a literal
*.whlwhen no wheels are present.tools/azure-pipelines/build-nightly-dist.yml: setsSKIP_PYTHON_WHEELS=true, andnow checks the exit code of
create_binary_release.sh. Previously the nightly Azurebuild depended on the missing-wheels check failing, with that failure masked by the
echo/findcommands following it in the same inline script — which meant anyother error in the script was silently ignored too.
Verifying this change
This change is a CI configuration change without test coverage. I'll verify by
running affected pipelines on my fork.
Does this pull request potentially affect one of the following parts:
@Public(Evolving): noCheckpointing, Kubernetes/Yarn, ZooKeeper: no
Documentation
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Sonnet 5