Skip to content

fix: restore action SHA-pinning and drop unneeded fetch-depth in CI/release workflows - #441

Merged
bmtcril merged 2 commits into
openedx:masterfrom
irfanuddinahmad:irfanuddinahmad/release-workflow-conformance
Sep 2, 2026
Merged

fix: restore action SHA-pinning and drop unneeded fetch-depth in CI/release workflows#441
bmtcril merged 2 commits into
openedx:masterfrom
irfanuddinahmad:irfanuddinahmad/release-workflow-conformance

Conversation

@irfanuddinahmad

Copy link
Copy Markdown
Contributor

Summary

Follow-up audit of #425 (Python tooling modernization) against this org's
current gold-standard Phase 3 reference (openedx/sample-plugin's
release.yml). Found that release.yml had drifted from full SHA-pinning
over the course of #425/#434/#435/#436/#438 and picked up two other small
conformance gaps:

  • python-semantic-release/python-semantic-release, actions/upload-artifact,
    and actions/download-artifact were on floating tags (@v10.6.2, @v7,
    @v8) instead of pinned commit SHAs. This defeats the point of this repo's
    own prior pin-actions-to-sha effort (chore: pin GitHub Actions workflows to full commit SHAs #407) for the one workflow that runs
    unreviewed on every push to master. Pinned to:
    • python-semantic-release/python-semantic-release@9a026e9303981c866c3425723009becb2437c757 # v10.6.2
    • actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
    • actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
      All three verified via gh api repos/<owner>/<repo>/commits/<sha>, cross-
      checked against their claimed tags.
  • Dropped fetch-depth: 0 from the release job's checkout: python-semantic-
    release deepens a shallow clone itself before evaluating version history,
    so it's never needed there.
  • Added if-no-files-found: error to the dist upload step, and the
    github.ref_name == 'master' guard to publish_to_pypi's if:, both
    matching sample-plugin exactly.
  • Dropped fetch-depth: 0 from ci.yml's checkout too: nothing in this
    package reads __version__ at runtime (no analog to the openedx-events
    EventData.sourcelib case), and sample-plugin's own backend-ci.yml
    doesn't set it either.

Test plan

  • CI green on this PR
  • Next merge to master exercises the release job with the newly-pinned
    SHAs

irfanuddinahmad and others added 2 commits September 2, 2026 16:17
…ormance

release.yml (added in openedx#425, touched again in openedx#434/openedx#435/openedx#436/openedx#438) had
drifted from the org's gold-standard reference (sample-plugin's
release.yml): python-semantic-release, actions/upload-artifact and
actions/download-artifact were on floating version tags (@v10.6.2, @v7,
@v8) instead of pinned commit SHAs, defeating the whole point of the
pin-actions-to-sha effort (this repo's own openedx#407) for the one workflow
that runs unreviewed on every push to master.

Also:
- Drop `fetch-depth: 0` from the release job's checkout: python-semantic-
  release auto-deepens a shallow clone itself before evaluating version
  history, so it's never needed here (confirmed against sample-plugin).
- Add `if-no-files-found: error` to the dist upload step so a build that
  silently produces no artifacts fails loudly instead of shipping an
  empty release.
- Add the `github.ref_name == 'master'` guard to publish_to_pypi's `if:`,
  matching sample-plugin, even though this workflow currently only
  triggers on push to master.

All three added SHAs were independently verified against the upstream
repos via `gh api repos/<owner>/<repo>/commits/<sha>` and cross-checked
against their claimed tags (resolving through the annotated tag object
for python-semantic-release@v10.6.2, which points at commit
9a026e9303981c866c3425723009becb2437c757).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Nothing in this package reads __version__ at runtime (setuptools_scm's
dynamic version, with fallback_version = "0.0.0", is only ever consumed
via package metadata, never parsed from a module attribute), so there's
no analog to the openedx-events EventData.sourcelib case where a shallow
clone breaks version resolution. Sample-plugin's own backend-ci.yml
doesn't set fetch-depth: 0 either. A full clone on every CI run buys
nothing here and just makes checkout slower.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U core contributor PR author is a Core Contributor (who may or may not have write access to this repo). labels Sep 2, 2026
@openedx-webhooks

Copy link
Copy Markdown

Thanks for the pull request, @irfanuddinahmad!

This repository is currently maintained by @openedx/committers-events.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@bmtcril
bmtcril merged commit 6f42a99 into openedx:master Sep 2, 2026
3 checks passed
@github-project-automation github-project-automation Bot moved this from Needs Triage to Done in Contributions Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core contributor PR author is a Core Contributor (who may or may not have write access to this repo). open-source-contribution PR author is not from Axim or 2U

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants