Skip to content

Fix job conditions and artifact handling in pypi_release workflow for workflow_dispatch#4273

Merged
copybara-service[bot] merged 1 commit into
mainfrom
pypi_release_fix
Jun 25, 2026
Merged

Fix job conditions and artifact handling in pypi_release workflow for workflow_dispatch#4273
copybara-service[bot] merged 1 commit into
mainfrom
pypi_release_fix

Conversation

@SurbhiJainUSC

@SurbhiJainUSC SurbhiJainUSC commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR fixes several job conditions, input type mismatches, and artifact handling issues in the pypi_release GitHub Actions workflow to ensure it executes successfully when triggered manually via workflow_dispatch.

Key Changes:

  1. Fix workflow_dispatch Run ID Handling:

    • Configured promote_docker_images to fallback to inputs.run_id as the GITHUB_RUN_ID when the workflow is manually triggered. This is necessary because client_payload is unavailable in workflow_dispatch contexts.
  2. Refine release_approval Trigger Conditions:

    • Restricted the release_approval job to only run under repository_dispatch or when inputs.publish is explicitly requested.
  3. Correct Input Type Definition:

    • Changed the default value of the publish input parameter from the string 'false' to the boolean false.
  4. Fix Artifact Download & Job Dependencies in PyPI Publishing:

    • Updated the publish_maxtext_to_pypi job to download the built package artifact using actions/download-artifact instead of performing an unnecessary actions/checkout.
    • Added build_maxtext_package as an explicit dependency (needs) for the publishing job to guarantee the package is built before publishing is attempted.
  5. Simplify Boolean Conditionals:

    • Streamlined various if conditions throughout the workflow to evaluate inputs.publish natively as a boolean value.

Tests

Checklist

Before submitting this PR, please make sure:

  • I have performed a self-review of my code. For an optional AI review, add the gemini-review label.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed, including adding new documentation pages to the relevant Table of Contents (toctree directive) as explained in our documentation.

@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Comment thread .github/workflows/pypi_release.yml Outdated
@copybara-service copybara-service Bot merged commit b8e0c23 into main Jun 25, 2026
45 of 47 checks passed
@copybara-service copybara-service Bot deleted the pypi_release_fix branch June 25, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants