Skip to content

Skip artifact uploads on PR smoke builds to cut quota usage - #179

Merged
ptr727 merged 1 commit into
developfrom
reduce-smoke-artifact-uploads
Jun 22, 2026
Merged

Skip artifact uploads on PR smoke builds to cut quota usage#179
ptr727 merged 1 commit into
developfrom
reduce-smoke-artifact-uploads

Conversation

@ptr727

@ptr727 ptr727 commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Reduces GitHub Actions artifact-storage quota usage by not uploading artifacts during PR smoke builds, where nothing consumes them.

Problem

test-pull-request.yml runs build-release-task.yml with smoke: true. On smoke, every consumer of build artifacts is skipped - github-release and the executable aggregation job are gated if: !smoke, and publish-pypi runs only on a real publish. But three build tasks still uploaded during smoke, orphaning the artifacts:

Task Artifact Consumer on smoke
build-nugetlibrary-task release-asset-<branch>-nugetlibrary none (github-release is !smoke)
build-pypilibrary-task pypilibrary-build-<branch> none (publish-pypi is publish-only)
build-executable-task publish-<branch>-<runtime> (matrix) none (aggregation job is !smoke)

Every target-touching PR therefore churned the artifact quota (they have retention-days: 1 but still count against the live quota for the day). This is the recurring source behind the storage-quota CI failures.

Fix

Gate the uploads on !inputs.smoke so smoke builds still compile/lint/test (full validation) but persist nothing; publish runs (smoke: false) upload and consume exactly as before:

  • build-nugetlibrary-task.yml: add a smoke input; skip the zip + release-asset upload.
  • build-pypilibrary-task.yml: add a smoke input; skip the wheel/sdist upload.
  • build-executable-task.yml: skip the per-runtime publish-* matrix upload (its release-asset-* upload was already !smoke).
  • build-release-task.yml: forward smoke to the nuget and pypi tasks.

build-docker-task.yml creates no artifacts; nothing to change there.

Verification

  • actionlint (Docker) clean; all four workflows parse as YAML; CRLF preserved per .editorconfig.
  • Publish path unaffected: publish-release.yml calls with smoke: false, so release-asset-* / pypilibrary-build-* are uploaded and consumed by github-release / publish-pypi as before.

PR smoke builds (test-pull-request.yml -> build-release-task.yml smoke:true)
uploaded build artifacts that nothing consumes on a PR: the github-release and
executable-aggregation jobs are gated `!smoke`, and publish-pypi runs only on a
real publish. Those orphaned uploads (release-asset-*, pypilibrary-build-*,
publish-*) churn the Actions artifact-storage quota on every target-touching PR.

Gate the uploads on `!inputs.smoke` so smoke builds still compile/lint/test but
persist nothing; publish runs (smoke:false) upload and consume as before:
- build-nugetlibrary-task: add smoke input; skip the zip + release-asset upload.
- build-pypilibrary-task: add smoke input; skip the wheel/sdist upload.
- build-executable-task: skip the per-runtime publish-* matrix upload (the
  release-asset upload was already `!smoke`).
- build-release-task: forward smoke to the nuget and pypi tasks.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 22, 2026 16:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR reduces GitHub Actions artifact-storage quota usage by skipping artifact uploads during PR smoke builds, where downstream jobs that would consume those artifacts are intentionally not run.

Changes:

  • Forward smoke into the NuGet and PyPI reusable build tasks from build-release-task.yml.
  • Add smoke inputs to the NuGet/PyPI reusable workflows and gate their artifact upload (and NuGet zip) steps on !inputs.smoke.
  • Gate the per-runtime executable matrix artifact upload on !inputs.smoke (the aggregation job was already smoke-gated).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
.github/workflows/build-release-task.yml Forwards smoke into NuGet/PyPI build tasks so smoke runs can suppress uploads end-to-end.
.github/workflows/build-pypilibrary-task.yml Adds smoke input and skips wheel/sdist artifact upload during smoke runs.
.github/workflows/build-nugetlibrary-task.yml Adds smoke input and skips release-asset zip + upload during smoke runs.
.github/workflows/build-executable-task.yml Skips per-runtime matrix artifact upload during smoke runs to avoid orphaned artifacts.

@ptr727
ptr727 merged commit 402e862 into develop Jun 22, 2026
9 checks passed
@ptr727
ptr727 deleted the reduce-smoke-artifact-uploads branch June 22, 2026 16:20
ptr727 added a commit that referenced this pull request Jun 22, 2026
… quota (#180)

Promote accumulated `develop` work to `main` so derived repos can
re-sync from `main` (the stable ref) rather than tracking `develop`.
Docs / CI / config only — no `version.json` bump (no functional change).

## Notable contents

- **Consolidate code style + carry contract** (#178, closes #175): one
root `CODESTYLE.md` (General → .NET → Python, droppable sections);
`PyPiLibrary/CODESTYLE.md` removed; `CODESTYLE.md` +
`.vscode/tasks.json` added to the verbatim-carry list; official-tooling
casing (`.Net*` → `.NET*`); clean-compile rule; brownfield/suppression
scope hierarchy; `dependsOrder: sequence` on the `.NET Format` task.
- **Clarify project-rule home + harden Copilot runbook** (#173): project
conventions/API contracts live in `AGENTS.md`, not
`.github/copilot-instructions.md`; a no-inline-comment review is a clean
pass; poll for the auto-review before self-triggering.
- **Cut Actions artifact-storage quota usage** (#179): PR smoke builds
no longer upload artifacts nothing consumes.
- Plus prior develop work: docs/comment cleanup (#167),
`check-upstream-version-task` structured multi-key state (#169) + CRLF
state file (#172), `publish-docker-readme-task`, and routine codegen
updates.

## Notes

- develop → main is **merge-commit only** (preserves develop's commit
list as a second-parent reference on `main`).
- Merging closes #173 and #175 (their `Closes` keywords reach the
default branch).
- After merge, the downstream re-sync issues (each updated with the
current state) can point at `main`.
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.

2 participants