Skip to content

ci: bump lock-threads to v6 so the scheduled lock job can run - #122131

Open
tushardev-365 wants to merge 1 commit into
getsentry:masterfrom
tushardev-365:fix/lock-threads-token-length
Open

ci: bump lock-threads to v6 so the scheduled lock job can run#122131
tushardev-365 wants to merge 1 commit into
getsentry:masterfrom
tushardev-365:fix/lock-threads-token-length

Conversation

@tushardev-365

@tushardev-365 tushardev-365 commented Aug 17, 2026

Copy link
Copy Markdown

The scheduled lock job has not locked a thread in months. Every run fails during input validation:

##[error]"github-token" length must be less than or equal to 100 characters long

The last 60 runs are all failures.

Why

lock-threads v4 validates its inputs with Joi, and the v4 schema is:

'github-token': Joi.string().trim().max(100),

The Actions token is now longer than 100 characters, so it fails that check and the step exits before doing any work. v6.0.2 raised the cap (v4, v5.0.x, v6.0.0 and v6.0.1 all still validate max(100), so v6.0.2 is the first safe pin):

'github-token': Joi.string().trim().max(1000),

Worth noting because it is the obvious first thing to try: dropping the github-token: line does not fix it on v4. action.yml declares default: '${{ github.token }}', so the runner substitutes the same token and it goes through the same validation.

I checked the five inputs this workflow passes against the v6 schema and all of them are still accepted, including the empty string for the two lock reasons:

'issue-lock-reason': Joi.string().valid('resolved', 'off-topic', 'too heated', 'spam', '').default('resolved'),

The action is pinned to the v6.0.2 commit, matching the existing pinning style.

The cron

The second line is a separate typo in the same file:

- cron: '* */12 * * *'

That is every minute of hours 0 and 12, not every 12 hours, so it schedules 120 runs a day instead of 2. It has been harmless so far only because all 120 fail immediately. Fixing the token without this would turn it into 120 real lock scans a day against the API, so the two belong together.

Changed to '0 */12 * * *'.

Testing

I have not run this against the repo, since the workflow only triggers on schedule or manual dispatch and I cannot dispatch it here. The failure message above is from run logs on master, and the two schema snippets are from the v4.0.1 and v6.0.2 tags of dessant/lock-threads. A workflow_dispatch run after merge would confirm it in one go.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

The v4 input schema caps github-token at 100 characters. The Actions token
now exceeds that, so every run fails validation before locking anything:

  ##[error]"github-token" length must be less than or equal to 100 characters long

v5 raised the cap to 1000. Removing the input does not help, since v4 sets
a default of ${{ github.token }} in action.yml and validates the default too.

Also corrects the cron. "* */12 * * *" is every minute of hours 0 and 12,
which is 120 runs a day rather than the 2 the */12 was reaching for.
@tushardev-365
tushardev-365 requested a review from a team as a code owner August 17, 2026 09:27

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5c461f0. Configure here.

runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@be8aa5be94131386884a6da4189effda9b14aa21 # v4.0.1
- uses: dessant/lock-threads@89ae32b08ed1a541efecbab17912962a5e38981c # v6.0.2

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.

Discussions locked after upgrade

Medium Severity

Bumping dessant/lock-threads from v4 to v6 picks up v5’s breaking change that processes discussions by default. This workflow only configures issues and PRs, and the repo actively uses Discussions for community feedback. Without process-only set to issues, prs, closed discussions can start getting locked, or the job can fail if the token lacks discussions: write.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5c461f0. Configure here.

@getsantry

getsantry Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you add the label WIP, I will leave it alone unless WIP is removed ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry Bot added the Stale label Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant