Skip to content

update: publish artifacts nightlies#148

Open
kiran-thumma wants to merge 12 commits intomainfrom
kithumma/upload-packages-s3-nightlies
Open

update: publish artifacts nightlies#148
kiran-thumma wants to merge 12 commits intomainfrom
kithumma/upload-packages-s3-nightlies

Conversation

@kiran-thumma
Copy link
Collaborator

Motivation

Add AWS S3 publishing support to the FlyDSL CI workflow for distributing nightly wheel builds.

Technical Details

  • Added OIDC AWS credentials step, AWS CLI install, and aws s3 cp to publish .whl artifacts to s3://framework-whls-nightlies/flydsl/.
  • Added id-token: write permission for GitHub Actions OIDC federation with IAM role framework-flydsl-nightlies.
  • Added scripts/install_awscli.sh for portable AWS CLI installation on runners.

Test Plan

  • Verify workflow runs successfully on linux-flydsl-mi325-1 and linux-flydsl-mi355-1 runners and wheels are uploaded to S3.

Test Result

  • Pending first CI run after OIDC IAM role and S3 bucket are provisioned via Terraform.

Submission Checklist

Copilot AI review requested due to automatic review settings February 25, 2026 00:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds AWS S3 publishing plumbing to the FlyDSL GitHub Actions CI workflow, aiming to distribute nightly wheel builds via OIDC-authenticated AWS credentials.

Changes:

  • Added job-level id-token: write permissions and steps to configure AWS credentials via OIDC.
  • Added an AWS CLI installation script intended for CI runners.
  • Added a (currently stubbed) step intended to publish wheel artifacts to an S3 bucket path.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
scripts/install_awscli.sh New helper script to download/install AWS CLI v2 on Linux CI runners.
.github/workflows/flydsl.yaml Adds OIDC permissions and AWS credential/config/publish steps to the FlyDSL CI workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +176 to +180
- name: Publish packages to S3
if: ${{ always() && !github.event.pull_request.head.repo.fork }}
run: |
# aws s3 cp ${{ github.workspace }}/dist/ s3://framework-whls-nightlies/flydsl/ --recursive --exclude "*" --include "*.whl"

Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

The publish step is currently a no-op (the aws s3 cp command is commented out), so no wheels will be uploaded despite the PR goal. Also, the source path uses ${{ github.workspace }}/dist/, but this workflow checks out the repo into flydsl-test/, so wheel artifacts would typically be under ${{ github.workspace }}/flydsl-test/dist/ (and there is no step here that actually builds wheels into dist/). Please add/enable the wheel build step (e.g., run the existing wheel build script) and upload from the correct dist directory.

Copilot uses AI. Check for mistakes.
Comment on lines +166 to +177
if: ${{ always() && !github.event.pull_request.head.repo.fork }}
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-1
role-to-assume: arn:aws:iam::661452401056:role/framework-flydsl-nightlies

- name: Install AWS CLI
if: always()
run: bash ./flydsl-test/scripts/install_awscli.sh

- name: Publish packages to S3
if: ${{ always() && !github.event.pull_request.head.repo.fork }}
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

always() here means AWS role assumption / publishing can run even when tests or builds fail, and it will also run on pull_request events for branches within the same repo (non-forks). For an artifact publishing role, it’s safer to gate this to successful runs on trusted events only (e.g., push to main and/or workflow_dispatch) to avoid uploading unreviewed PR artifacts or partial/failed outputs.

Suggested change
if: ${{ always() && !github.event.pull_request.head.repo.fork }}
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-1
role-to-assume: arn:aws:iam::661452401056:role/framework-flydsl-nightlies
- name: Install AWS CLI
if: always()
run: bash ./flydsl-test/scripts/install_awscli.sh
- name: Publish packages to S3
if: ${{ always() && !github.event.pull_request.head.repo.fork }}
if: ${{ success() && (github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main')) }}
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-1
role-to-assume: arn:aws:iam::661452401056:role/framework-flydsl-nightlies
- name: Install AWS CLI
if: ${{ success() && (github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main')) }}
run: bash ./flydsl-test/scripts/install_awscli.sh
- name: Publish packages to S3
if: ${{ success() && (github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main')) }}

Copilot uses AI. Check for mistakes.
Comment on lines +173 to +174
if: always()
run: bash ./flydsl-test/scripts/install_awscli.sh
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

This installs AWS CLI on the runner on every run (if: always()), even when publishing is skipped. On self-hosted runners this mutates the host environment across jobs and can introduce flaky behavior/version drift. Consider installing into a job-local directory (or using an action-provided AWS CLI) and gate the step to the same condition as publishing (and ideally only after wheel build succeeds).

Suggested change
if: always()
run: bash ./flydsl-test/scripts/install_awscli.sh
if: ${{ always() && !github.event.pull_request.head.repo.fork }}
uses: aws-actions/aws-cli-setup@v4

Copilot uses AI. Check for mistakes.
Comment on lines +13 to +23
curl --silent --fail --show-error --location \
"https://awscli.amazonaws.com/awscli-exe-linux-${ARCH}.zip" \
--output "awscliv2.zip"

unzip -qq awscliv2.zip

if [ "$EUID" -ne 0 ]; then
sudo ./aws/install --update
else
./aws/install --update
fi
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

This script installs AWS CLI system-wide via ./aws/install --update and leaves the downloaded zip/extracted aws/ directory behind. On CI (especially self-hosted runners) that can cause cross-job side effects and workspace bloat. Consider installing into a temporary directory (e.g., under $RUNNER_TEMP) with a trap-based cleanup, and exposing it via PATH for the remainder of the job instead of updating the host installation.

Copilot uses AI. Check for mistakes.
@coderfeli
Copy link
Collaborator

@gyohuangxin
Copy link
Member

@kiran-thumma You mentioned this is for nightly wheel builds, but these changes will publish packages in every PR tests?

@coderfeli
Copy link
Collaborator

still failed @kiran-thumma

Copy link
Member

@gyohuangxin gyohuangxin left a comment

Choose a reason for hiding this comment

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

LGTM, just a minor question.

echo "logs.tgz not found; skipping log extraction"
fi

- name: Configure AWS credentials
Copy link
Member

Choose a reason for hiding this comment

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

Need we still need those steps in PR tests since we have a nightly one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants