Skip to content

**ci(filters): update exclusion patterns for CI workflows**#35779

Merged
erickgonzalez merged 2 commits into
mainfrom
issue-35778-improvement-CI-tests
May 21, 2026
Merged

**ci(filters): update exclusion patterns for CI workflows**#35779
erickgonzalez merged 2 commits into
mainfrom
issue-35778-improvement-CI-tests

Conversation

@erickgonzalez
Copy link
Copy Markdown
Member

@erickgonzalez erickgonzalez commented May 20, 2026

  • Adjusted .github/filters.yaml to include refined exclusion patterns under specific directories:
    • Added dotCMS/src/main/webapp/WEB-INF/messages/!(Language*.properties) to avoid excluding language property files.
    • Updated patterns to ensure that non-relevant changes in src/main/webapp/html and WEB-INF/messages directories are correctly filtered.
  • Updated area_backend filters to align with the modified path matching rules for better targeting of backend-specific changes.

Fixes: #35778

This PR fixes: #35778

- Adjusted `.github/filters.yaml` to include refined exclusion patterns under specific directories:
  - Added `dotCMS/src/main/webapp/WEB-INF/messages/!(Language*.properties)` to avoid excluding language property files.
  - Updated patterns to ensure that non-relevant changes in `src/main/webapp/html` and `WEB-INF/messages` directories are correctly filtered.
- Updated `area_backend` filters to align with the modified path matching rules for better targeting of backend-specific changes.

ref: #35778
Signed-off-by: erickgonzalez <erick.gonzalez@dotcms.com>
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 20, 2026

Claude finished @erickgonzalez's task in 2m 54s —— View job


PR Review: ci(filters): update exclusion patterns for CI workflows

  • Read PR diff and .github/filters.yaml
  • Verify pattern semantics against dotCMS/src/main/webapp/WEB-INF/messages/ contents
  • Cross-check filter consumers (dorny/paths-filter@v3.0.1)
  • Post review

Intent (as I read it)

Skip backend CI and the Area : Backend label when a PR only touches translation files (Language*.properties) in WEB-INF/messages/. Other files in that directory (e.g. unescape.sh, en_US/*.tmpl) and everything else under dotCMS/ should keep triggering backend tests/labels.

Logic — looks correct

Walking through union-of-patterns semantics:

Path Line 17 match? Line 18 match? Net
messages/Language_en.properties no (excluded by !(Language*.properties)) no (excluded by !(...messages/)) skip backend
messages/unescape.sh yes no match
messages/en_US/init.html yes no match
dotCMS/src/main/java/Foo.java no yes match
dotCMS/src/main/webapp/html/foo.jsp no yes; also line 13 match
dotCMS/src/main/webapp/html/foo.css no no (line 18 excludes html/, line 13 excludes css/js) skip → goes to frontend

Same logic reproduces in area_backend, with the (intentional?) difference that area_backend does not exclude html/. That asymmetry was pre-existing and not introduced here.

Things worth a second look

  1. Picomatch extglob with slashes is the load-bearing assumption. Both dotCMS/!(src/main/webapp/html/|src/main/webapp/WEB-INF/messages/)** and the original dotCMS/!(src/main/webapp/html/)** rely on !(...) matching multi-segment substrings. Standard glob extglob is single-segment; picomatch happens to support slashes inside !(...) but it's not portable and not covered by your filter comments. Since the existing pattern presumably works in CI, extending it is reasonable — but this is not unit-tested anywhere. Recommend running a dry PR that touches only Language.properties and confirming backend / jvm_unit_test / area_backend all evaluate false before relying on it for cost savings. Without that, a silent regression here costs nothing visible and is hard to notice.

  2. Line 17 is redundant for the test-skip goal, but not for area_backend. In the backend: filter, line 18 already includes everything outside html/ and messages/. Line 17 only re-adds non-Language* files inside messages/, which means changes to (say) messages/unescape.sh still trigger backend tests. That's the intent — but it deserves a one-line comment in the YAML, otherwise the next person to touch this file will think the two lines contradict each other.

  3. area_backend change is broader than the PR description says. The description mentions filter refinement for messages, but the diff also implicitly narrows area_backend from dotCMS/** to dotCMS/!(.../messages/)**. Net effect: PRs that only change Language*.properties will no longer get the Area : Backend label at all. If labeling is used for routing/reviewers/release notes, confirm that's desired — a translation-only PR may legitimately want backend-team visibility.

  4. No test/example added. The file already documents (lines 78–93) that negation handling is fiddly. Adding a fragile new pattern without a verification step (even a comment block listing expected matches/non-matches) is the kind of thing that quietly breaks 3 months from now when someone refactors. Consider committing a small fixture or at minimum expanding the comment with "Language*.properties intentionally do not trigger backend CI — translation-only changes".

  5. Minor: ordering. The two new lines under backend: are added between e2e/** and dotcms-integration/**, splitting the visual grouping (dotCMS-related patterns mixed with other modules). Cosmetic, but moving them adjacent to dotCMS/src/main/webapp/html/... on line 13 would make the html/messages exclusion story read as a unit.

Nothing blocking

Pattern logic is sound under the picomatch-with-slashes assumption that the file already depends on. Suggest verifying with a translation-only test PR before merge and adding a comment explaining the messages/ rationale.
· branch: issue-35778-improvement-CI-tests

@github-actions github-actions Bot added the Area : CI/CD PR changes GitHub Actions/workflows label May 20, 2026
@erickgonzalez erickgonzalez enabled auto-merge May 20, 2026 18:33
- Updated `.github/filters.yaml` to broaden the exclusion pattern for `WEB-INF/messages/`:
  - Changed `WEB-INF/messages/!(Language*.properties)` to `WEB-INF/messages/**/!(Language*.properties)` to include nested directories.
- Ensures accurate filtering of localization files during CI runs.

ref: #35778
Signed-off-by: erickgonzalez <erick.gonzalez@dotcms.com>
@erickgonzalez erickgonzalez added this pull request to the merge queue May 20, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks May 21, 2026
@erickgonzalez erickgonzalez added this pull request to the merge queue May 21, 2026
Merged via the queue into main with commit 2045e32 May 21, 2026
29 checks passed
@erickgonzalez erickgonzalez deleted the issue-35778-improvement-CI-tests branch May 21, 2026 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI: Safe To Rollback Area : CI/CD PR changes GitHub Actions/workflows

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Skip backend CI tests for Language.properties-only PRs

2 participants