Skip to content

WIP DO NOT MERGE: ci: report failing step name back to the PR - #29564

Draft
chrisnojima wants to merge 3 commits into
masterfrom
nojima/HOTPOT-more-jenkins-info
Draft

WIP DO NOT MERGE: ci: report failing step name back to the PR#29564
chrisnojima wants to merge 3 commits into
masterfrom
nojima/HOTPOT-more-jenkins-info

Conversation

@chrisnojima

Copy link
Copy Markdown
Contributor

Why

Jenkins currently tells GitHub only pass/fail. Nothing in this repo or in jenkins-helpers posts a commit status, so the single check comes from the GitHub Branch Source plugin and carries no detail beyond the state. A red build means opening Jenkins to find out which step broke.

What

reportStep(name, closure) wraps a step; if it throws, a commit status is posted under the context client/failed-step whose description is the literal step name, then the original exception is rethrown.

  • Only the hardcoded name passed at the call site is ever sent. No log output, no exception text, no paths, no credentials.
  • githubNotify reuses the job's existing GitHub credentials, so no new auth or GitHub App is involved.
  • The notify call is itself wrapped in try/catch, so reporting can never break a build or mask the underlying failure.

Wired around golangci-lint and the JS suite, plus a green seed at the start of the build so the context is present on passing runs rather than only appearing when something is red.

Testing the plumbing

This branch includes a deliberately misformatted Go file so golangci-lint fails once and the status has something to report. Expected result: client/failed-step goes red with the description go: golangci-lint.

If githubNotify cannot infer the account, repo, and sha from the job's SCM source, the console log will show reportStep: githubNotify failed, continuing and the build will fail normally on the lint error. That log line is the diagnostic either way.

Before this merges

Both the temporary Go file and any leftover test scaffolding come out. Do not merge as-is.

Routine dependency pass.

- expo 57.0.15 and the expo-* packages that moved with it
- @react-navigation alphas (bottom-tabs, core, native, native-stack)
- storybook 10.5.10, @vitejs/plugin-react 6.1.0, vite 8.2.2
- electron 43.4.1 with regenerated checksums
- immer 11.1.18

Regenerated the expo and native-stack patches for their new versions;
the patch contents are unchanged.

Re-ran the resolutions removal test: deepmerge-ts, serialize-javascript
and xcode/uuid all re-resolve to vulnerable versions without the pins,
so they stay. Bumped the xcode/uuid pin to 14.0.2.

Skipped as opt-in majors: @babel/* 8.x, react-native 0.87, typescript 7.
Skipped react-native-worklets 0.12 (needs a matching reanimated release)
and eslint-plugin-react-compiler (npm's "latest" is an older rc).
Jenkins currently tells GitHub only pass/fail: nothing in this repo or in
jenkins-helpers posts a status, so the single check comes from the GitHub
Branch Source plugin and carries no detail.

Add a reportStep() wrapper that, when the step it wraps throws, posts a
commit status under the context client/failed-step whose description is
the literal step name. Only that hardcoded name is ever sent - no log
output, exception text, paths, or credentials. githubNotify() reuses the
job's existing GitHub credentials, so no new auth is involved, and the
notify call is wrapped so reporting can never break or mask a build.

Wired up around golangci-lint and the JS suite, plus a green seed at the
start of the build so the context is present on passing runs.

Also adds a deliberately misformatted go file to make golangci-lint fail
once, to confirm the status actually lands. Both that file and this test
harness come out before merge.
@chrisnojima
chrisnojima marked this pull request as draft August 20, 2026 18:18
@chrisnojima
chrisnojima changed the base branch from master to nojima/HOTPOT-deps-8-20 August 20, 2026 18:18
githubNotify is unavailable on this controller -- github-plugin's step is
not among the registered DSL methods, so the build died with NoSuchMethod.
publishChecks and withChecks are registered, so use the Checks API plugin
instead. Same payload: only the literal step name, plus the build URL.

If no checks publisher is registered for the job, publishChecks logs and
returns rather than throwing, so this stays best-effort.
Base automatically changed from nojima/HOTPOT-deps-8-20 to master August 20, 2026 20:23
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.

1 participant