Skip to content

ci: publish S3 via geniex repo to satisfy OIDC trust#1102

Merged
RemiliaForever (RemiliaForever) merged 2 commits into
mainfrom
ci/publish-s3-via-geniex
Jun 26, 2026
Merged

ci: publish S3 via geniex repo to satisfy OIDC trust#1102
RemiliaForever (RemiliaForever) merged 2 commits into
mainfrom
ci/publish-s3-via-geniex

Conversation

@RemiliaForever

Copy link
Copy Markdown
Contributor

Why

After the qcom-ai-hub/geniexqualcomm/nexa-sdk migration, the publish-s3
job can no longer push to S3: the github-bitsyfactory IAM role's OIDC trust
only allows repo:qcom-ai-hub/geniex, not qualcomm/nexa-sdk. We are not
allowed to touch the trust policy.

What

Instead of touching IAM, the still-trusted geniex repo publishes on our behalf:

  • This repo: publish-s3 no longer uploads to S3 directly. It dispatches
    geniex's chore/publish-s3 workflow (via GH_PAT, --ref chore/publish-s3),
    passing the tag and this run's run_id, then gh run watch --exit-status
    watches the geniex run so an S3 failure still fails this job rather than
    passing silently. package-release is unchanged — its release-assets
    artifact is the cross-repo data source.
  • Removed the now-unused AWS actions (configure-multiple-aws-roles,
    configure-aws-profile) and release_s3_manifest.py — they live on the
    geniex chore/publish-s3 branch now.

The geniex side is a trimmed, single-job release.yml on a long-lived
chore/publish-s3 branch (never merged to geniex main); it downloads our
release-assets artifact cross-repo and uploads to
s3://qaihub-public-assets/qai-hub-geniex/ under geniex's trusted identity.

Verified

Smoke-tested the full cross-repo path end to end with a synthetic
release-assets artifact + a v0.0.0-rc.test prerelease dispatch:

  • ✅ cross-repo artifact download (GH_PAT, actions:read on nexa-sdk)
  • ✅ AWS OIDC role assumption from the chore/publish-s3 branch (trust is not
    ref-pinned)
  • ✅ manifest generation + S3 upload; objects publicly reachable; is_prerelease
    / llama_sha / htp_signed propagate correctly; latest pointers correctly
    skipped for the prerelease

Requires

  • GH_PAT secret in both repos must be a token with actions:write on
    geniex + actions:read on nexa-sdk (already configured).

Notes

  • release-assets retention is 1 day; geniex must run shortly after dispatch
    (job ordering ensures this).
  • The IAM role has an explicit DenyDeleteS3 — publish-s3 can only upload, never
    delete (matches the "published assets are immutable" constraint).

The bitsyfactory IAM role's OIDC trust only allows repo:qcom-ai-hub/geniex,
so after the qualcomm/nexa-sdk migration the publish-s3 job can no longer
assume it. Replace the inline S3 upload with a dispatch to geniex's
chore/publish-s3 workflow (PAT with actions:rw on geniex), passing this
run's id; geniex pulls our release-assets artifact cross-repo and uploads
to S3 under its own trusted identity. We then watch the geniex run with
--exit-status so an S3 failure still fails this job.

Remove the now-unused AWS actions (configure-multiple-aws-roles,
configure-aws-profile) and release_s3_manifest.py — they moved to the
geniex chore/publish-s3 branch. Requires a new GENIEX_PUBLISH_PAT secret.

Signed-off-by: RemiliaForever <remilia@koumakan.cc>

Copilot AI left a comment

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.

Pull request overview

Routes S3 publishing through the still-trusted qcom-ai-hub/geniex repository to satisfy the existing AWS OIDC trust policy after the geniexnexa-sdk migration, while keeping nexa-sdk as the source of release artifacts.

Changes:

  • Reworks publish-s3 to dispatch and then watch a qcom-ai-hub/geniex workflow run (using GH_PAT) instead of uploading to S3 directly.
  • Removes local AWS credential/config actions and the local S3 manifest generator script (now hosted in geniex on chore/publish-s3).
  • Updates release documentation to point to the relocated manifest schema/script.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
notes/release.md Updates the manifest/schema documentation to reflect cross-repo S3 publishing and link to geniex’s script.
.github/workflows/release.yml Changes publish-s3 to dispatch and watch the geniex workflow instead of assuming AWS role and uploading directly.
.github/scripts/release_s3_manifest.py Removes the local manifest generator (moved to geniex branch).
.github/actions/configure-multiple-aws-roles/action.yml Removes the unused composite action previously used for AWS role configuration.
.github/actions/configure-aws-profile/index.js Removes the unused AWS profile configurator implementation.
.github/actions/configure-aws-profile/cleanup.js Removes the unused cleanup script tied to the AWS profile action.
.github/actions/configure-aws-profile/action.yml Removes the unused AWS profile action definition.

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

Comment on lines +409 to +416
target=""
for _ in $(seq 1 12); do
target=$(gh run list --repo qcom-ai-hub/geniex --workflow release.yml \
--branch chore/publish-s3 --json databaseId,displayTitle \
--jq "[.[] | select(.displayTitle | contains(\"run ${RUN_ID}\"))][0].databaseId")
[ -n "${target}" ] && break
sleep 5
done
…x dispatch

The submodule-recursive checkout in build/test/lint reused GH_PAT, which
this branch repurposed for dispatching geniex's publish-s3. Move all
checkout tokens to a dedicated CLONE_PAT so the two roles no longer
collide; CLONE_PAT becomes droppable once the repos go public.

Signed-off-by: RemiliaForever <remilia@koumakan.cc>
@RemiliaForever RemiliaForever (RemiliaForever) merged commit f758439 into main Jun 26, 2026
94 of 108 checks passed
@RemiliaForever RemiliaForever (RemiliaForever) deleted the ci/publish-s3-via-geniex branch June 26, 2026 08:52
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.

2 participants