fix: Use workflow_dispatch instead of workflow_call for OIDC compatibility#912
Conversation
…ility Co-Authored-By: AJ Steers <aj@airbyte.io>
Original prompt from AJ Steers |
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. Testing This PyAirbyte VersionYou can test this version of PyAirbyte using the following: # Run PyAirbyte CLI from this branch:
uvx --from 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1765671538-fix-prerelease-oidc' pyairbyte --help
# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1765671538-fix-prerelease-oidc'Helpful ResourcesPR Slash CommandsAirbyte Maintainers can execute the following slash commands on your PR:
Community SupportQuestions? Join the #pyairbyte channel in our Slack workspace. |
cd1b390
into
main
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThe changes reconfigure the prerelease workflow to dispatch the pypi_publish workflow using a dedicated workflow-dispatch action instead of inline usage, adding input parameters for git reference and version override, and introducing a blocking wait mechanism with timeout for the dispatched workflow to complete. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Fixes the
/prereleasecommand which was failing with OIDC attestation mismatch:The root cause: when using
workflow_call, PyPI's OIDC attestation sees the caller workflow (prerelease-command.yml) rather than the called workflow (pypi_publish.yml).The fix: use
the-actions-org/workflow-dispatch@v4to triggerpypi_publish.ymlviaworkflow_dispatchinstead. This makespypi_publish.ymlthe top-level workflow, so the OIDC attestation matches the trusted publisher config.Changes:
prerelease-command.yml: Replaceuses: ./.github/workflows/pypi_publish.ymlwithworkflow-dispatchactionpypi_publish.yml: Addworkflow_dispatch.inputs(mirroring existingworkflow_call.inputs)'true'for thepublishinputReview & Testing Checklist for Human
GITHUB_CI_WORKFLOW_TRIGGER_PATsecret exists with permissions to trigger workflowsref: mainparameter - This is intentional: the workflow runs from main (for OIDC) but builds code from the PR viagit_refinput@v4tag, unlike other actions in the repo which use pinned SHAs/prereleaseon a test PR - this is the only way to verify the OIDC fix worksNotes
workflow_calltrigger is preserved inpypi_publish.ymlfor backwards compatibility (though currently unused)publishinput uses string type forworkflow_dispatch(API limitation) but boolean forworkflow_call, hence the dual condition checkLink to Devin run: https://app.devin.ai/sessions/c86d36be59664129af00617d0e66bc4d
Requested by: AJ Steers (Aaron ("AJ") Steers (@aaronsteers))
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.