Let downstreams tolerate a project-specific target without patching test-suite.yml

Open
#227 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
67/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
github-actions, python, yaml
Domain
ci-cd

Research direction

Start with .github/workflows/test-suite.yml and .github/workflows/main.yml, which the issue identifies as the reusable workflow and its caller. Check how workflow inputs are declared and passed, and how the existing pre-release tolerance is applied. Add a default-false input that callers can set per matrix entry; done means downstreams can tolerate a project-specific target without patching the reusable workflow.

Written by the indexing model from the issue text.

Description

(Rewritten — the original premise was wrong; see the correction in the comments.)

continue-on-error in test-suite.yml works as intended. What it can't express is a tolerated target that's specific to one downstream.

The flag has to live on the called job inside test-suite.yml, because continue-on-error isn't among the keys a uses: job accepts. That file is skeleton's, so a downstream that needs to tolerate its own target must patch a skeleton-owned file and carry the edit through every merge.

The case that prompted this, in jaraco/jaraco.develop: test (3.15t, windows-latest) fails because PyNaCl 1.6.2 publishes cp314-cp314t wheels (Windows included) but nothing for cp315t. Free-threaded builds can't fall back to its cp38-abi3 wheels, so it builds from source, and the Windows build fails with [WinError 193] %1 is not a valid Win32 application. The same target passes on ubuntu and macos, so it's genuinely platform-specific. The local edit is:

    continue-on-error: >-
      ${{ inputs.python == '3.16'
      || (inputs.python == '3.15t' && inputs.platform == 'windows-latest') }}

Comparable to #161 and #222, but those were addressed by installing build dependencies, which doesn't help when the build can't succeed on the platform at all.

Suggestion

Give test-suite.yml a continue-on-error input (default false), so the decision can be expressed per matrix entry in main.yml, where downstream customizations already live:

  test:
    strategy:
      matrix:
        ...
    uses: ./.github/workflows/test-suite.yml
    with:
      python: ${{ matrix.python }}
      platform: ${{ matrix.platform }}
      continue-on-error: >-
        ${{ matrix.python == '3.16'
        || (matrix.python == '3.15t' && matrix.platform == 'windows-latest') }}

Skeleton's own pre-release tolerance would move to the same place, keeping the reusable workflow free of version-specific knowledge and leaving downstream edits in the file they're expected to diverge in.

Not a workaround: alls-green's allowed-failures

Worth recording, since it looks like the obvious answer. Putting the tolerated targets in their own caller job and marking it allowed-failures in alls-green makes check green, but the tag-triggered release job is then skipped and the release doesn't publish. Per the needs docs, "a failure or skip applies to all jobs in the dependency chain from the point of failure or skip onwards" — check survives only because of its if: always(), and release has no always(). alls-green governs the reported status for branch protection, not the dependency graph. continue-on-error avoids this entirely, because the tolerated job never counts as failed in the first place.

Dominant language
No language data
Stars
152
Forks
38
Avg merge
6h 27m
Merged PRs (30d)
4

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from jaraco/skeleton

All issues in jaraco/skeleton

Similar issues

More DevOps issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.