Skip to content

Publish bindings to pypi #637

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

git-hyagi
Copy link
Collaborator

@git-hyagi git-hyagi commented Aug 20, 2025

ref: https://issues.redhat.com/browse/PULP-690

Summary by Sourcery

Parameterize the binding workflows in the pulp-deploy-and-test pipeline and add a new Tekton task to automate generation and publishing of Python client bindings to PyPI

New Features:

  • Introduce a publish-bindings-to-pypi Tekton task to fetch API JSON artifacts from Pulp, generate Python client bindings via openapi-generator, and upload them to PyPI

CI:

  • Add PULP_BINDINGS_COMPONENTS, BINDINGS_TEMPLATES, TEMPLATE_VERSION, and PYPI_API_TOKEN parameters to the pulp-deploy-and-test pipeline
  • Refactor existing binding generation and upload steps to use the new component and template parameters
  • Integrate the publish-bindings-to-pypi task into the pulp-deploy-and-test pipeline after the test-metadata step for push events

Copy link
Contributor

red-hat-konflux bot commented Aug 20, 2025

Caution

There are some errors in your PipelineRun template.

PipelineRun Error
pulp-deploy-and-test.yaml yaml validation error: line 1000: found a tab character where an indentation space is expected

Copy link
Contributor

sourcery-ai bot commented Aug 20, 2025

Reviewer's Guide

This PR parameterizes binding generation loops with new pipeline vars and adds an integrated Tekton task that fetches, generates, and publishes Python client bindings to PyPI.

File-Level Changes

Change Details Files
Parameterize component list and mustache templates
  • Introduce PULP_BINDINGS_COMPONENTS and BINDINGS_TEMPLATES params
  • Replace hardcoded TEMPLATE and PACKAGE arrays with param-driven loops
  • Ensure dash conversion for package names during waits and installs
.tekton/pulp-deploy-and-test.yaml
Refactor existing binding steps to use new params
  • Inject PULP_BINDINGS_COMPONENTS and BINDINGS_TEMPLATES into all binding-related container env
  • Update loops for downloading templates, creating PVCs, applying jobs, waiting and installs to iterate over params
  • Remove fixed package lists
.tekton/pulp-deploy-and-test.yaml
Add publish-bindings-to-pypi Tekton task
  • Define new task with credentials, domain and snapshot params
  • Implement steps: obtain Pulp token, compute commit hash, list/download API JSON
  • Download templates, generate bindings via openapi-generator, build packages
  • Upload generated wheels to PyPI using twine with secret token
.tekton/pulp-deploy-and-test.yaml
Integrate publish-bindings-to-pypi into existing pipeline
  • Place task after test-metadata with runAfter and when condition on push events
  • Propagate required params from pipeline to new task
.tekton/pulp-deploy-and-test.yaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@git-hyagi git-hyagi force-pushed the publish-bindings-pypi branch 10 times, most recently from 394f5f6 to 720fad8 Compare August 20, 2025 14:33
@git-hyagi
Copy link
Collaborator Author

/retest

@git-hyagi git-hyagi force-pushed the publish-bindings-pypi branch 8 times, most recently from f6a8c1a to f5dbfa6 Compare August 21, 2025 18:02
@git-hyagi git-hyagi marked this pull request as ready for review August 21, 2025 19:43
Copy link
Contributor

@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 there - I've reviewed your changes and they look great!


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 and I'll use the feedback to improve your reviews.

@git-hyagi
Copy link
Collaborator Author

@sourcery-ai summary

@git-hyagi git-hyagi force-pushed the publish-bindings-pypi branch from f5dbfa6 to 80fbfff Compare August 21, 2025 19:58
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