Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remote attestations from pypi publication #83

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

mnbf9rca
Copy link
Owner

@mnbf9rca mnbf9rca commented Sep 12, 2024

Summary by Sourcery

Revise the CI workflow to allow conditional deployment to PyPi production either directly or after a test deployment, based on user input. Remove commented-out code related to OIDC debugging and attestations.

CI:

  • Update the deploy workflow to include separate jobs for deploying to PyPi production directly or after testing, based on the input parameter 'deploy_to_test'.

Copy link

sourcery-ai bot commented Sep 12, 2024

Reviewer's Guide by Sourcery

This pull request modifies the GitHub Actions workflow for building and publishing artifacts to PyPI. The changes primarily focus on improving the deployment process, adding conditional logic for test and production deployments, and adjusting the OIDC (OpenID Connect) configuration.

File-Level Changes

Change Details Files
Restructure deployment workflow to support both test and direct production deployments
  • Add conditional logic to deploy to PyPI test environment based on input
  • Create separate jobs for deploying to production after test and direct production deployment
  • Update job dependencies to ensure correct execution order
.github/workflows/deploy_workflow_wrapper.yml
Adjust OIDC configuration and attestation settings in PyPI deployment
  • Comment out OIDC debugger steps
  • Disable attestations due to a reported issue with PyPI
.github/workflows/deploy_to_pypi.yml
Clean up and improve workflow file structure
  • Remove commented out output section
  • Add newline characters for better readability
  • Update workflow trigger description
.github/workflows/deploy_workflow_wrapper.yml

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @mnbf9rca - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.


deploy_to_pypi_prod_direct:
needs: [build_artifacts]
if: ${{ github.event.inputs.deploy_to_test != 'true' }}
Copy link

Choose a reason for hiding this comment

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

suggestion (bug_risk): Make the condition for direct production deployment more explicit

The current condition will run whenever deploy_to_test is not 'true', including cases where it's false or not set. Consider using a more specific condition to avoid unintended direct production deployments.

Suggested change
if: ${{ github.event.inputs.deploy_to_test != 'true' }}
if: ${{ github.event.inputs.deploy_to_test == 'false' || github.event.inputs.deploy_to_test == '' }}

@mnbf9rca mnbf9rca merged commit d2e8dc6 into main Sep 12, 2024
7 checks passed
@mnbf9rca mnbf9rca deleted the chore/remove-attestation-from-pypi-publication branch September 12, 2024 22:00
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.

1 participant