Skip to content

[FLINK-40248][ci] Add nightly snapshot publishing to GHA pipeline - #28831

Draft
dalelane wants to merge 4 commits into
apache:masterfrom
dalelane:FLINK-40248
Draft

[FLINK-40248][ci] Add nightly snapshot publishing to GHA pipeline#28831
dalelane wants to merge 4 commits into
apache:masterfrom
dalelane:FLINK-40248

Conversation

@dalelane

Copy link
Copy Markdown
Contributor

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.

master is deliberately listed in both of the lists described below, which is the
first 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 the
two 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_deployment
job will be a follow-up, once the outputs have been confirmed to match.

Brief change log

  • Adds snapshot_binary and snapshot_maven jobs to .github/workflows/nightly.yml,
    mirroring the cron_snapshot_deployment_binary and cron_snapshot_deployment_maven
    jobs in tools/azure-pipelines/build-nightly-dist.yml. Both run on JDK 11, the
    minimum supported version, matching the Azure jobs.
  • PUBLISH_SNAPSHOT_BRANCHES lists branches whose snapshots this pipeline publishes.
    Because nightly.yml is 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_BRANCHES lists branches that GHA and Azure are both publishing
    during comparison. Binaries for those branches are uploaded to a gha-trial/ prefix
    in 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.
  • The binary release is uploaded as a GHA build artifact on every branch, whether or
    not it publishes, so its contents can be compared against what Azure produces.
  • When a branch isn't publishing, the Maven job deploys into a local repository via
    -DaltDeploymentRepository and uploads that as a tarball artifact, instead of
    deploying to repository.apache.org.
  • tools/ci/deploy_nightly_to_s3.sh: upload_to_s3 takes an optional destination
    prefix, defaulting to the existing behaviour of writing to the bucket root.
  • tools/releasing/create_binary_release.sh: adds SKIP_PYTHON_WHEELS, defaulting to
    false so the manual release process is unaffected. Nightly builds set it to
    true, so a binary release can be produced without the 12 platform wheels that a
    release manager downloads by hand beforehand. Also enables nullglob around the
    wheel loop, so it doesn't iterate over a literal *.whl when no wheels are present.
  • tools/azure-pipelines/build-nightly-dist.yml: sets SKIP_PYTHON_WHEELS=true, and
    now checks the exit code of create_binary_release.sh. Previously the nightly Azure
    build depended on the missing-wheels check failing, with that failure masked by the
    echo/find commands following it in the same inline script — which meant any
    other 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:

  • Dependencies (does it add or upgrade a dependency): no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): no
  • The serializers: no
  • The runtime per-record code paths (performance sensitive): no
  • Anything that affects deployment or recovery: JobManager (and its components),
    Checkpointing, Kubernetes/Yarn, ZooKeeper: no
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? not applicable

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: Claude Sonnet 5

dalelane and others added 4 commits July 28, 2026 09:42
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>
@flinkbot

flinkbot commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

name: snapshot-maven-jars-${{ github.run_number }}
path: ${{ env.STAGING_JARS_TARBALL }}
if-no-files-found: error
retention-days: 5

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re: dalelane#1 (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?

@github-actions github-actions Bot added the community-reviewed PR has been reviewed by the community. label Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-reviewed PR has been reviewed by the community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants