Skip to content

fix: use default version fallback for scheduled safe-settings runs - #219

Merged
marcusburghardt merged 1 commit into
complytime:mainfrom
marcusburghardt:fix/safe-settings-schedule-version
Sep 7, 2026
Merged

fix: use default version fallback for scheduled safe-settings runs#219
marcusburghardt merged 1 commit into
complytime:mainfrom
marcusburghardt:fix/safe-settings-schedule-version

Conversation

@marcusburghardt

Copy link
Copy Markdown
Member

Summary

Fix the daily scheduled Safe Settings Sync workflow which fails because
inputs.version is empty on schedule triggers (only workflow_dispatch
populates inputs).

Root Cause

With an empty ref, actions/checkout falls back to the upstream
repository default branch (main-enterprise), which uses Probot v14.
Probot v14 has a null logger bug
(#955)
that crashes immediately:

Fatal error during full sync: TypeError: Cannot read properties of null (reading 'info')

Fix

Extract the pinned version SHA into a SAFE_SETTINGS_DEFAULT_VERSION
env variable and use it as a fallback in the checkout step:

ref: ${{ inputs.version || env.SAFE_SETTINGS_DEFAULT_VERSION }}

This ensures scheduled runs use the same v2.1.18 pin as manual dispatch.

Upgrade tracking

The env variable comment documents both upstream bugs blocking an
upgrade, for periodic manual review:

  • #955 — Probot v14 null logger (blocks upgrading past v2.1.18)
  • #818 — check_suite crash in full-sync mode (blocks removing the patched script)

Failed run: https://github.com/complytime/.github/actions/runs/34018478903

gxmiranda
gxmiranda previously approved these changes Sep 7, 2026

@gxmiranda gxmiranda 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.

LGTM

Schedule triggers do not populate workflow_dispatch inputs, so
inputs.version is empty. This causes actions/checkout to fall back
to the repository default branch (main-enterprise), which uses
Probot v14 and crashes with the null logger bug (#955).

Extract the pinned version SHA into SAFE_SETTINGS_DEFAULT_VERSION
env variable and use it as a fallback in the checkout ref. This
ensures scheduled runs use the same v2.1.18 pin as manual dispatch.

The env variable comment documents both upstream bugs blocking an
upgrade (#955 and #818) for periodic manual review.

Also set persist-credentials: false on both checkout steps to
satisfy zizmor artipacked audit (credentials are not needed after
checkout).

Assisted-by: OpenCode (claude-opus-4-6)
Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
@marcusburghardt

Copy link
Copy Markdown
Member Author

@gxmiranda I needed to update the PR in order to solve the Lint issue. I basically included persist-credentials: false.

@marcusburghardt
marcusburghardt enabled auto-merge (rebase) September 7, 2026 11:23

@gxmiranda gxmiranda 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.

LGTM

@marcusburghardt
marcusburghardt merged commit 7734f2c into complytime:main Sep 7, 2026
14 checks passed
@marcusburghardt
marcusburghardt deleted the fix/safe-settings-schedule-version branch September 7, 2026 12:13
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.

3 participants