Skip to content

Remove Python index generation(manage.py) from CI as it is moved over to S3-triggered Lambda#4900

Open
araravik-psd wants to merge 3 commits intomainfrom
users/arravikum/manage-filtering
Open

Remove Python index generation(manage.py) from CI as it is moved over to S3-triggered Lambda#4900
araravik-psd wants to merge 3 commits intomainfrom
users/arravikum/manage-filtering

Conversation

@araravik-psd
Copy link
Copy Markdown
Contributor

Removes manual index regeneration from CI workflows and shifts it to an S3 event-driven Lambda that invokes manage.py on object create/delete.

Key Changes:

  • Eliminates duplicate index generation across workflows

  • Avoids race conditions on shared prefixes

  • Removes CI dependency setup (boto3, packaging)

  • Centralizes and simplifies index updates

Scope

Covers both staging and release prefixes. Presently deployed in dev, nightly and prereleases for python buckets.

References
Resolves: #3321
Manage.py Refactor PR: #3737

Copy link
Copy Markdown
Contributor

@HereThereBeDragons HereThereBeDragons left a comment

Choose a reason for hiding this comment

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

you might want to update the readmes in

  • build_tools/third_party/s3_management/README.md
  • build_tools/packaging/how_to_do_release.md

Comment thread .github/workflows/copy_release.yml Outdated
run: |
pip install boto3 packaging
python ./build_tools/third_party/s3_management/manage.py ${CUSTOM_PREFIX}
--recursive --exclude "*" --include "*torch*${{ inputs.rocm_version }}*${{ env.cp_version }}*" No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

new line missing?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Running the pre-commit script seems to be removing the new line at the end of the file

Comment on lines -303 to -309
- name: (Re-)Generate Python package release index for staging
if: ${{ github.repository_owner == 'ROCm' }}
env:
# Environment variables to be set for `manage.py`
CUSTOM_PREFIX: "${{ inputs.s3_staging_subdir }}/${{ inputs.amdgpu_family }}"
run: |
python ./build_tools/third_party/s3_management/manage.py ${{ env.CUSTOM_PREFIX }}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We recently hit a CI failure where the index wasn't yet up to date (as we queue requests before generating server side). Eventually we should add a small sleep 45s or so here. @ScottTodd wdyt?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd rather not introduce a fixed artificial delay in workflows. Consider a few options and their tradeoffs:

  1. In build jobs: upload packages in a build job then wait
    • Test jobs can trust the package index to already exist
    • Test jobs can't start running/queuing until that wait completes
  2. In test jobs: attempt to install, retry/wait if failed or index does not yet exist
    • Each test jobs needs to know that the index might not yet exist
    • Test jobs can start running/queuing immediately

Comment thread .github/workflows/copy_release.yml Outdated
run: |
pip install boto3 packaging
python ./build_tools/third_party/s3_management/manage.py ${CUSTOM_PREFIX}
--recursive --exclude "*" --include "*torch*${{ inputs.rocm_version }}*${{ env.cp_version }}*" No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

Comment on lines -297 to -304
- name: (Re-)Generate Python package release index for staging
if: ${{ github.repository_owner == 'ROCm' }}
env:
# Environment variable to be set for `manage.py`
CUSTOM_PREFIX: "${{ env.S3_STAGING_SUBDIR }}/${{ matrix.target_bundle.amdgpu_family }}"
run: |
pip install boto3 packaging
python ./build_tools/third_party/s3_management/manage.py ${{ env.CUSTOM_PREFIX }}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same as above.

@marbre
Copy link
Copy Markdown
Member

marbre commented May 7, 2026

@araravik-psd Please rebase to mitigate the conflicts and fix the pre-commit errors. This shouldn't sit so long.

@araravik-psd araravik-psd force-pushed the users/arravikum/manage-filtering branch from 3603f3b to 4188d02 Compare May 7, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: TODO

Development

Successfully merging this pull request may close these issues.

Refactor manage.py to move server side

5 participants