Skip to content

Commit 2677c26

Browse files
authored
fix(pre-release): update job dependencies and streamline version bump process (#17321)
1 parent 8797d16 commit 2677c26

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

.github/workflows/pre-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
# Do not need to lock trunk before Rust jobs since work is in a separate branch
2929
generate-rust-version:
3030
name: Generate Rust Version
31-
needs: parse-tag
31+
needs: [parse-tag, restrict-trunk]
3232
if: github.event.repository.fork == false && needs.parse-tag.outputs.language == 'all'
3333
uses: ./.github/workflows/bazel.yml
3434
with:
@@ -90,7 +90,7 @@ jobs:
9090

9191
update-versions:
9292
name: Bump Versions
93-
needs: [parse-tag, restrict-trunk]
93+
needs: [parse-tag, restrict-trunk, cleanup-rust-branch]
9494
uses: ./.github/workflows/bazel.yml
9595
with:
9696
name: Bump versions
@@ -148,7 +148,7 @@ jobs:
148148
with:
149149
name: Run dependency updates
150150
ref: staging/release-${{ needs.parse-tag.outputs.tag }}
151-
run: ./go ${{ needs.parse-tag.outputs.language }}:update
151+
run: ./go ${{ needs.parse-tag.outputs.language }}:update${{ needs.parse-tag.outputs.language == 'all' && ' && ./go rust:update' || '' }}
152152
artifact-name: patch-dep-updates
153153

154154
calculate-changelog-depth:

rake_tasks/rust.rake

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,4 @@ task :version, [:version] do |_task, arguments|
5757
text = File.read(file).gsub(old_version, new_version)
5858
File.open(file, 'w') { |f| f.puts text }
5959
end
60-
61-
# Repin cargo immediately after updating the version so Cargo.Bazel.lock is
62-
# never left in a stale state between jobs. Running CARGO_BAZEL_REPIN=true
63-
# against a Cargo.toml whose version has already changed (but whose lockfile
64-
# hasn't been updated yet) causes Bazel to detect a mid-evaluation file-hash
65-
# conflict and crash (rules_rust extensions.bzl reads the lockfile twice
66-
# within the same Bazel evaluation).
67-
# reenable is required because Rake::Task#invoke is a no-op if the task has
68-
# already run once in this Ruby process (e.g. when multiple tasks are chained
69-
# in a single ./go invocation).
70-
Rake::Task['rust:update'].reenable
71-
Rake::Task['rust:update'].invoke
7260
end

0 commit comments

Comments
 (0)