Skip to content

IGNITE-28821 Protected Classes CI check: report as warning instead of failing the PR build#13279

Open
anton-vinogradov wants to merge 2 commits into
apache:masterfrom
anton-vinogradov:ignite-28821
Open

IGNITE-28821 Protected Classes CI check: report as warning instead of failing the PR build#13279
anton-vinogradov wants to merge 2 commits into
apache:masterfrom
anton-vinogradov:ignite-28821

Conversation

@anton-vinogradov

@anton-vinogradov anton-vinogradov commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

What

The Protected Classes workflow no longer fails the PR build when a change touches @Order-annotated (protected) classes. Instead it publishes a separate, non-blocking check Rolling upgrade compatibility with the neutral conclusion, keeping the existing PR comment and compatibility label.

Why

A hard failure (exit 1) red-flagged PRs even for intentional, compatible changes, creating friction (the check was disabled manually on 2026-05-27 for this reason). A non-blocking advisory check surfaces the rolling-upgrade risk for reviewer attention without failing the build.

Why neutral (and not action_required)

GitHub's Checks API has no dedicated "warning" conclusion. action_required is intended for GitHub Apps that attach a remediation action: it renders as a red ✕ with a "Resolve" button in the Checks tab and is dropped from the PR merge-box rollup entirely (so the warning becomes invisible there). neutral is the proper primitive for an advisory result — it shows in its own non-blocking "neutral" group in the merge box and as a grey marker in the Checks tab, and it never blocks merging.

Notes

  • The Rolling Upgrade check job now always succeeds.
  • The new check is non-blocking unless added to required status checks.
  • checks: write permission added for the Checks API call.

Jira: https://issues.apache.org/jira/browse/IGNITE-28821

🤖 Generated with Claude Code

… failing the PR build

Replace the hard `exit 1` with a separate non-blocking check "Rolling upgrade compatibility" (action_required conclusion), keeping the existing PR comment and `compatibility` label. The main "Rolling Upgrade check" job now always succeeds.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
anton-vinogradov added a commit that referenced this pull request Jun 30, 2026
…of the detection script (#13280)

## What
Simplify the detection logic in the `Rolling Upgrade check` step so it
reads as a sequence of named steps:
- Split it into small functions — `changed_java_files`,
`is_protected_class`, `filter_protected` — with a top-level
`changed_java_files | filter_protected > "$HITS_FILE"`.
- Collapse the two near-identical loops (added/deleted vs modified
files) into that single pass; the revision inspected per file status is
`A` → head, `D`/`M` → base.
- Drop the string accumulation with literal `\n` + `printf '%b'`, the
process substitution and the parallel `HITS` variable; matches go
straight to the output file, detected with `[ -s ]`.

## Why
The two loops differed only in the diff filter and the grepped revision
(duplication); the `\n`/`%b` and process-substitution idioms add reader
friction. The named functions make the top level read as intent, halve
the cyclomatic/cognitive complexity and remove the duplication.

## Behaviour
Verified equivalent to the previous logic on add / modify / delete /
rename scenarios, and that a PR with no hits still exits 0 under `set
-eo pipefail`. One intentional difference: the content-based grep no
longer flags add/delete of the annotation's own definition file
`org/apache/ignite/internal/Order*.java` — the previous diff-based grep
matched the file *path* in diff headers (the regex dots match slashes),
a false positive, since that file is the `@Order` definition, not a
protected class.

## Notes
- Independent of [#13279](#13279)
(different hunk of the same file); no conflict expected.

Jira: https://issues.apache.org/jira/browse/IGNITE-28822

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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