Merge pull request #15492 from carlocab/no-run-attempt

github_runner_matrix: remove `GITHUB_RUN_ATTEMPT`
This commit is contained in:
Mike McQuaid 2023-05-29 16:22:21 +01:00 committed by GitHub
commit 33a3f72fbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 10 deletions

View File

@ -18,13 +18,13 @@ jobs:
strategy:
matrix:
include:
- runner: "13-arm64-${{github.run_id}}-${{github.run_attempt}}"
- runner: "12-arm64-${{github.run_id}}-${{github.run_attempt}}"
- runner: "12-${{github.run_id}}-${{github.run_attempt}}"
- runner: "13-arm64-${{ github.run_id }}"
- runner: "13-${{ github.run_id }}"
- runner: "12-arm64-${{ github.run_id }}"
- runner: "12-${{ github.run_id }}"
- runner: "11-arm64"
cleanup: true
- runner: "11-${{github.run_id}}-${{github.run_attempt}}"
- runner: "10.15-${{github.run_id}}-${{github.run_attempt}}"
- runner: "11-${{ github.run_id }}"
fail-fast: false
runs-on: ${{ matrix.runner }}
env:

View File

@ -112,11 +112,10 @@ class GitHubRunnerMatrix
@runners << create_runner(:linux, :x86_64, linux_runner_spec)
github_run_id = ENV.fetch("GITHUB_RUN_ID")
github_run_attempt = ENV.fetch("GITHUB_RUN_ATTEMPT")
timeout = ENV.fetch("HOMEBREW_MACOS_TIMEOUT").to_i
use_github_runner = ENV.fetch("HOMEBREW_MACOS_BUILD_ON_GITHUB_RUNNER", "false") == "true"
ephemeral_suffix = +"-#{github_run_id}-#{github_run_attempt}"
ephemeral_suffix = +"-#{github_run_id}"
ephemeral_suffix << "-deps" if @dependent_matrix
ephemeral_suffix.freeze

View File

@ -11,13 +11,12 @@ describe "brew determine-test-runners" do
let(:linux_runner) { "ubuntu-22.04" }
# We need to make sure we write to a different path for each example.
let(:github_output) { "#{TEST_TMPDIR}/github_output#{DetermineRunnerTestHelper.new.number}" }
let(:ephemeral_suffix) { "-12345-1" }
let(:ephemeral_suffix) { "-12345" }
let(:runner_env) do
{
"HOMEBREW_LINUX_RUNNER" => linux_runner,
"HOMEBREW_MACOS_TIMEOUT" => "90",
"GITHUB_RUN_ID" => ephemeral_suffix.split("-").second,
"GITHUB_RUN_ATTEMPT" => ephemeral_suffix.split("-").third,
}.freeze
end
let(:all_runners) do

View File

@ -9,7 +9,6 @@ describe GitHubRunnerMatrix do
allow(ENV).to receive(:fetch).with("HOMEBREW_MACOS_TIMEOUT").and_return("90")
allow(ENV).to receive(:fetch).with("HOMEBREW_MACOS_BUILD_ON_GITHUB_RUNNER", "false").and_return("false")
allow(ENV).to receive(:fetch).with("GITHUB_RUN_ID").and_return("12345")
allow(ENV).to receive(:fetch).with("GITHUB_RUN_ATTEMPT").and_return("1")
end
let(:newest_supported_macos) do