Skip to content

ci: explicitly pass base-setup inputs to fix strict validation failures#1626

Open
Copilot wants to merge 1 commit into
mainfrom
copilot/update-python-tests-workflow
Open

ci: explicitly pass base-setup inputs to fix strict validation failures#1626
Copilot wants to merge 1 commit into
mainfrom
copilot/update-python-tests-workflow

Conversation

Copy link
Copy Markdown

Copilot AI commented May 1, 2026

jupyterlab/maintainer-tools/.github/actions/base-setup@v1 now enforces strict validation on python_package_manager and dependency_type, exiting with an error if either is empty or unrecognized. Jobs that invoked base-setup@v1 without a with: block were failing at setup before any tests ran.

Changes

  • All base-setup@v1 usages: explicitly set python_package_manager: pip and dependency_type: standard where no with: block existed
  • Matrix jobs (build, integration_check): additionally pin python_version: ${{ matrix.python-version }} so the action uses the intended matrix version
  • test_minimum_versions: added python_package_manager: pip alongside existing dependency_type: minimum
  • test_prereleases: added python_package_manager: pip alongside existing dependency_type: pre and python_version

Before (failing):

- name: Base Setup
  uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

After:

- name: Base Setup
  uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
  with:
    python_package_manager: pip
    dependency_type: standard
    python_version: ${{ matrix.python-version }}
Original prompt

CI is failing in PR #1621 due to the shared jupyterlab/maintainer-tools/.github/actions/base-setup@v1 action rejecting unknown/empty inputs for python_package_manager and/or dependency_type.

Evidence:

In this repo, .github/workflows/python-tests.yml uses base-setup@v1 in multiple jobs. At least the build job (and potentially others) invokes base-setup@v1 without explicitly passing these inputs, making it susceptible to upstream defaults/behavior changes.

Task:

  1. Update .github/workflows/python-tests.yml to explicitly pass supported values to the base-setup@v1 action wherever it is used, so the action does not see empty/unknown values.
    • Set python_package_manager: pip (or "uv pip" if preferred, but keep consistent with existing caches/behavior).
    • Set dependency_type: standard for normal jobs.
    • Also pass python_version: ${{ matrix.python-version }} in matrix jobs to ensure the action uses the intended version.
    • Preserve existing explicit overrides (e.g., dependency_type: minimum in test_minimum_versions, dependency_type: pre in test_prereleases if the action supports it; if not supported, adjust to a supported value or update workflow logic accordingly).
  2. Ensure the updated workflow remains valid YAML and still runs on Windows/macOS/Linux.
  3. After changes, confirm the failing job would proceed past base-setup.

Reference file:

Deliverable:

  • Open a PR against main with the workflow changes.
  • PR description should explain that we are pinning/setting explicit base-setup inputs to avoid failures from strict input validation in the shared action.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: Please find a solution for this failing job. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.

Assistant: The failure is happening in the Base Setup step (the jupyterlab/maintainer-tools/.github/actions/base-setup@v1 composite action), before any tests run. The snippet in the job log shows the action aborting with:

  • Unrecognized package manager $PYTHON_PACKAGE_MANAGER (guard clause)
  • and then logic that expects DEPENDENCY_TYPE to be either minimum or standard (and errors otherwise)

This strongly indicates the job is invoking base-setup@v1 with inputs that don’t match what that action expects (most commonly: python_package_manager is unset/empty or set to a new value, and/or dependency_type is unset/empty or set to something like default).

Fix (in this repo): explicitly pass valid base-setup inputs

In your workflow at:

  • https://github.com/jupyter-server/jupyter_server/blob/5527e74aaa13e6885a14a198bc3d62dbfd8dfce9/.github/workflows/python-tests.yml

the build job calls base-setup without any with: block:

- name: Base Setup
  uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

Update that to explicitly set supported values (based on the log guards: python_package_manager must be pip or uv pip; dependency_type must be standard or minimum).

Suggested patch

diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml
index 0000000..0000000 100644
--- a/.github/workflows/python-tests.yml
+++ b/.github/workflows/python-tests.yml
@@ -29,8 +29,14 @@ jobs:
       - name: Checkout
         uses: actions/checkout@v6
       - name: Base Setup
         uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
+        with:
+          # base-setup currently validates this input strictly
+          python_package_manager: pip
+          # base-setup currently only recognizes: "standard" and "minimum"
+          dependency_type: standard
+          # (optional) make the version explicit, since the build matrix defines it
+          python_version: ${{ matrix.python-version }}

Why this solves it:

  • It prevents the action from seeing empty/unknown values for PYTHON_PACKAGE_MANAGER / DEPENDENCY_TYPE, which is what triggers the “Unrecognized …” exits shown in the logs.

If you prefer uv instead of pip

Only use the exact string accepted by the action:

with:
  python_package_manager: "uv pip"
  dependency_type: standard
  python_version: ${{ matrix.python-ver...

</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

*This pull request was created from Copilot chat.*
>

Copilot AI changed the title [WIP] Update python-tests.yml to pass required inputs to base-setup action ci: explicitly pass base-setup inputs to fix strict validation failures May 1, 2026
Copilot finished work on behalf of Carreau May 1, 2026 16:41
Copilot AI requested a review from Carreau May 1, 2026 16:41
@Carreau Carreau force-pushed the copilot/update-python-tests-workflow branch from 4fcb17c to b48bc2d Compare May 4, 2026 08:31
@Carreau Carreau force-pushed the copilot/update-python-tests-workflow branch from b48bc2d to b3b35f0 Compare May 28, 2026 12:35
@Carreau Carreau marked this pull request as ready for review May 28, 2026 12:36
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.

2 participants