Skip to content

Remove old publish workflow and clean up the Rakefile#60

Merged
lloeki merged 6 commits into
mainfrom
lloeki/remove-old-publish
Jun 22, 2026
Merged

Remove old publish workflow and clean up the Rakefile#60
lloeki merged 6 commits into
mainfrom
lloeki/remove-old-publish

Conversation

@lloeki

@lloeki lloeki commented Jun 17, 2026

Copy link
Copy Markdown
Member

Why?

Now that gems are built from source and published by the reusable build workflow (build.yml), the standalone publish.yml workflow and the Rakefile flow that packaged gems from pre-built upstream binary artifacts are dead weight. The Rakefile and tasks/ had also drifted into duplicating each other during the migration.

What does this PR do?

CI:

  • Removes the standalone publish.yml (publishing lives in build.yml's publish job).
  • Adds a Build (complete) aggregation job that depends on the validate-* jobs (intentionally not the conditional publish, which is skipped on PRs).
  • Makes Main (complete) depend on the reusable build workflow.

Rakefile / tasks:

  • Removes the now-unused gem packaging from upstream binary artifacts (fetch/extract/package, LIB_GITHUB_RELEASES, the LIB_VERSION_TO_PACKAGE guard, spec_validate_permissions + spec/gem_packaging.rb). Building from source (rake libdatadog:build) + rake gem:package supersede this path; test.yml and the README are updated accordingly.
  • Reduces the Rakefile to glue that loads tasks/*.rake, and splits the remaining tasks one logical unit per file: tasks/spec.rake (spec/standard/default) and tasks/release.rake (push/build/release overrides). fix_file_permissions moves into tasks/build.rake (its only consumer).
  • Drops the stale "intentionally duplicates Rakefile logic" note in tasks/gem.rake.

Change log entry

None.

Additional Notes:

  • bundle exec rake -AT loads the full task graph; standard passes on all changed Ruby files.
  • Open question for a follow-up: can Build (complete) run when the conditional Build / Publish is skipped but fail when any earlier job failed? With needs: [validate-linux, validate-macos] and no if:, it already does exactly that (runs iff both validations pass, independent of the skipped publish).
  • AI was used to accelerate implementation; all code was reviewed and understood.

How to test the change?

CI. Locally: bundle exec rake -AT lists the tasks; bundle exec rake libdatadog:build && bundle exec rake gem:package builds gems; bundle exec rake gem:validate checks permissions.

@lloeki lloeki requested review from a team as code owners June 17, 2026 14:43
ivoanjo
ivoanjo previously approved these changes Jun 17, 2026
lloeki added 6 commits June 22, 2026 16:01
Publishing is handled by the publish job in the reusable build workflow
(build.yml), which builds, validates and pushes the gems in one place.
The separate workflow_dispatch-only publish.yml is redundant.
Add a synthetic terminal job that depends on the validate-* jobs so the
non-conditional part of the Build workflow has a single completion node.
It deliberately excludes the publish job, which is conditional (push to
main only) and would otherwise make this job skip on pull requests.
Add the reusable build workflow to Main (complete)'s dependencies so the
overall Main status reflects Build (complete) as well as test and nix.
Drop the Rakefile flow that downloaded pre-built libdatadog release
tarballs from GitHub (fetch/extract) and packaged gems from them
(package), along with its LIB_GITHUB_RELEASES table, the
LIB_VERSION_TO_PACKAGE guard, the spec_validate_permissions task and its
spec/gem_packaging.rb. Building from source (rake libdatadog:build) and
packaging (rake gem:package) in tasks/ supersede this path; the test
workflow's extract/package steps and the README are updated accordingly.
Helpers.fix_file_permissions is kept (still used by libdatadog:build).
Reduce the Rakefile to glue that loads tasks/*.rake, and split the
remaining tasks into one file per logical unit:

- tasks/spec.rake:    spec + standard + the default task
- tasks/release.rake: push_to_rubygems and the build/release overrides

Move Helpers.fix_file_permissions into tasks/build.rake (its only
consumer) as BuildFromSource::Permissions, removing the last shared
Rakefile helper.
The Rakefile gem-packaging originals it referred to are gone; gem:package
is now the sole packaging path, so the note no longer applies.
@lloeki lloeki force-pushed the lloeki/remove-old-publish branch from 77c1b23 to 89f603a Compare June 22, 2026 14:02
@lloeki lloeki requested a review from ivoanjo June 22, 2026 14:21
@lloeki lloeki merged commit bbb807d into main Jun 22, 2026
56 checks passed
@lloeki lloeki deleted the lloeki/remove-old-publish branch June 22, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants