GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Running the Docs workflow via workflow_dispatch always fails · Issue #103884 · python/cpython

Running the Docs workflow via workflow_dispatch always fails #103884

New issue
Copy link
New issue
Copy link
Closed
Closed
Running the Docs workflow via workflow_dispatch always fails#103884
Copy link

Description

@AlexWaygood
AlexWaygood
opened on Apr 26, 2023
Issue body actions

Our Docs workflow file allows people to manually trigger the workflow on arbitrary branches in their GitHub fork of CPython:

cpython/.github/workflows/doc.yml

Lines 1 to 4 in 6c4124d

name: Docs
on:
workflow_dispatch:

This is a useful feature that I like to use in order to test possible changes prior to filing a PR. However, on latest main, while it is still possible to run the Docs workflow via the workflow_dispatch, it now always fails if you try to do so. Example failing run on my GitHub fork: https://github.com/AlexWaygood/cpython/actions/runs/4803232831/jobs/8547528105.

The error occurs in the "Get list of changed files" step here (added to the workflow in #102513):

cpython/.github/workflows/doc.yml

Lines 57 to 62 in 6c4124d

# Add pull request annotations for Sphinx nitpicks (missing references)
- name: 'Get list of changed files'
id: changed_files
uses: Ana06/[email protected]
with:
filter: "Doc/**"

The error message is:

Run Ana06/get-changed-files@v[2](https://github.com/AlexWaygood/cpython/actions/runs/4803232831/jobs/8547528105#step:8:2).2.0
  with:
    filter: Doc/**
    token: ***
    format: space-delimited
  env:
    pythonLocation: /opt/hostedtoolcache/Python/[3](https://github.com/AlexWaygood/cpython/actions/runs/4803232831/jobs/8547528105#step:8:3).11.3/x6[4](https://github.com/AlexWaygood/cpython/actions/runs/4803232831/jobs/8547528105#step:8:4)
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.3/x[6](https://github.com/AlexWaygood/cpython/actions/runs/4803232831/jobs/8547528105#step:8:6)4/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.[11](https://github.com/AlexWaygood/cpython/actions/runs/4803232831/jobs/8547528105#step:8:11).3/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.3/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.3/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.3/x64/lib
Error: This action only supports pull requests and pushes, workflow_dispatch events are not supported. Please submit an issue on this action's GitHub repo if you believe this in correct.
Base commit: undefined
Head commit: undefined
Error: The base and head commits are missing from the payload for this workflow_dispatch event. Please submit an issue on this action's GitHub repo.
Error: Not Found

While this isn't a huge problem, it would be nice if we could continue to be able to run the Docs workflow via the workflow_dispatch trigger without it failing.

Cc. @hugovk, @ezio-melotti, @CAM-Gerlach

Linked PRs

  • gh-103884: Docs CI: Only attempt nit-picky PR annotations for PRs #103889
Reacted by Hugo van Kemenade

Activity

  1. hugovk commented on Apr 26, 2023

    @hugovk
    hugovk
    on Apr 26, 2023
    Member
    More actions

    Yep, we can't get the list of files changed in a PR, when not running as a PR :)

    Let's add some logic to skip this bit for non-PRs:

    cpython/.github/workflows/doc.yml

    Lines 57 to 70 in d45225b

    # Add pull request annotations for Sphinx nitpicks (missing references)
    - name: 'Get list of changed files'
    id: changed_files
    uses: Ana06/[email protected]
    with:
    filter: "Doc/**"
    - name: 'Build changed files in nit-picky mode'
    continue-on-error: true
    run: |
    # Mark files the pull request modified
    touch ${{ steps.changed_files.outputs.added_modified }}
    # Build docs with the '-n' (nit-picky) option; convert warnings to annotations
    make -C Doc/ PYTHON=../python SPHINXOPTS="-q -n --keep-going" html 2>&1 |
    python Doc/tools/warnings-to-gh-actions.py

    Reacted by Carol Willing and Alex Waygood
  2. hugovk
    added a commit that references this issue on Apr 26, 2023

    gh-103884: Docs CI: Only attempt nit-picky PR annotations for PRs (#1…

    842daa5
  3. hugovk commented on Apr 26, 2023

    @hugovk
    hugovk
    on Apr 26, 2023
    Member
    More actions

    Fixed in #103889, thanks for the report!

    Reacted by Alex Waygood
  4. hugovk
    closed this as completedon Apr 26, 2023
  5. itamaro
    added a commit that references this issue on Apr 26, 2023

    pythongh-103884: Docs CI: Only attempt nit-picky PR annotations for P…

    4d8f9f2
  6. AlexWaygood commented on Apr 26, 2023

    @AlexWaygood
    AlexWaygood
    on Apr 26, 2023
    MemberAuthor
    More actions

    Thanks for the lightning-quick fix!

    Reacted by Hugo van Kemenade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.