Skip to content

Conversation

@clee2000
Copy link
Contributor

@clee2000 clee2000 commented Oct 7, 2024

I discovered that you don't actually have to check out the test-infra repository because it's already there?

Docs: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables

Only available for composite actions unfortunately

Testing: https://github.com/pytorch/pytorch/actions/runs/11225822033?pr=137454 (actual pushing is commented out)

There are also two fetch_latest_green_commit.py scripts in test-infra so I merged them and chose the location in tools/scripts. The logic between the two is pretty much the same. gitutils was copied from .github/scripts (but we don't need much of it)

There's also a reusable workflow update-viablestrict and a composite action update-viablestrict. The composite action is usually used, but there are some differences between the two, and vision uses the reusable workflow so I can't get rid of it just yet. (idk how much they care tho, I don't vision has succeeded updating viable/strict in a while). I also can't just make the reusable action call the composite action since the workflow uses an ssh key to check out but the action uses a token


If pytorch/vision#8676 gets merged, I'll remove the reusable workflow

@vercel
Copy link

vercel bot commented Oct 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
torchci ⬜️ Ignored (Inspect) Visit Preview Oct 8, 2024 1:19am

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 7, 2024
@clee2000 clee2000 marked this pull request as ready for review October 8, 2024 00:28
@clee2000 clee2000 requested a review from a team October 8, 2024 00:28
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)

@clee2000 clee2000 requested a review from huydhn October 8, 2024 15:44
@clee2000 clee2000 merged commit 40ac0e2 into main Oct 9, 2024
8 checks passed
@clee2000 clee2000 deleted the csl/viable_strict_dedup branch September 30, 2025 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants