Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions .github/actions/update-viablestrict/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,6 @@ runs:
with:
python-version: '3.11'

- name: Checkout test-infra for the fetch_latest_green_commit scripts
uses: actions/checkout@v3
with:
repository: ${{ inputs.test-infra-repository }}
ref: ${{ inputs.test-infra-ref }}
path: test-infra

- uses: actions/checkout@v3
with:
repository: ${{ inputs.repository }}
Expand All @@ -85,8 +78,14 @@ runs:
run: |
set -ex

output=$(python ${GITHUB_WORKSPACE}/test-infra/.github/scripts/fetch_latest_green_commit.py --requires "${{ inputs.requires }}")
TEST_INFRA_PATH="${GITHUB_ACTION_PATH}/../../.."
Copy link
Contributor

Choose a reason for hiding this comment

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

I have an uneasy feeling about this. My understanding is that the runner keeps all the GHA it needs locally, and because we don't have ephemeral runner, test-infra is there because some other jobs have already fetched it. The problem here is that I'm not sure if the version of test-infra is correct, and we could end up with a stale GHA

Copy link
Contributor

Choose a reason for hiding this comment

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

You could test this out on an ephemeral linux runner and see if test-infra is there I think

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The run I linked as the test uses runs-on: ubuntu-20.04, I assume gha runners are as ephemeral as our linux runners? Unless maybe gha runners are more special

The version did run my the code in my branch (it errored when the argument flags were wrong)


output=$(python ${TEST_INFRA_PATH}/tools/scripts/fetch_latest_green_commit.py \
--required-checks "${{ inputs.requires }}" \
--viable-strict-branch "viable/strict" \
--main-branch "master")
echo "latest_viable_sha=$output" >> "${GITHUB_OUTPUT}"
echo $output

- name: Push SHA to viable/strict branch
if: steps.get-latest-commit.outputs.latest_viable_sha != 'None'
Expand Down
156 changes: 0 additions & 156 deletions .github/scripts/fetch_latest_green_commit.py

This file was deleted.

Loading
Loading