Skip to content

OU-1472: lint tags - #1221

Open
PeterYurkovich wants to merge 1 commit into
mainfrom
lint-tags
Open

OU-1472: lint tags#1221
PeterYurkovich wants to merge 1 commit into
mainfrom
lint-tags

Conversation

@PeterYurkovich

@PeterYurkovich PeterYurkovich commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Stack created with GitHub Stacks CLIGive Feedback 💬

Summary by CodeRabbit

  • Testing

    • Improved Cypress test organization with clearer coverage labels for monitoring, alerting, metrics, virtualization, legacy dashboards, and Perses.
    • Added dedicated ACM test coverage and refined test command selection for more targeted runs.
    • Added automatic validation and correction for test tag ordering and array formatting.
    • Expanded supported test tag categories, including infrastructure, feature, modifier, and expected-failure tags.
  • Documentation

    • Updated available-tag documentation with clearer classifications and descriptions.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 1, 2026
@openshift-ci

openshift-ci Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 1, 2026
@PeterYurkovich PeterYurkovich changed the title lint tags OU-1472: lint tags Sep 1, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Sep 1, 2026
@openshift-ci-robot

openshift-ci-robot commented Sep 1, 2026

Copy link
Copy Markdown

@PeterYurkovich: This pull request references OU-1472 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.1.0" version, but no target version was set.

Details

In response to this:

Stack created with GitHub Stacks CLIGive Feedback 💬

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@PeterYurkovich
PeterYurkovich marked this pull request as ready for review September 1, 2026 19:27
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 1, 2026
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Walkthrough

Cypress tag definitions now use modifier, infrastructure, and feature categories. Two ESLint rules validate tag arrays and ordering. Cypress suites, commands, and documentation use the updated tags. The previous tag declaration file was removed.

Changes

Cypress tag governance

Layer / File(s) Summary
Tag contracts and ESLint rules
web/cypress/support/test-tags.ts, web/eslint-rules/*
Adds categorized tag types, Cypress tag context helpers, array validation, ordering checks, unknown-tag diagnostics, autofixes, and rule tests.
ESLint rule activation
web/eslint.config.ts
Enables both Cypress tag rules as errors for Cypress TypeScript files.
Cypress metadata normalization
web/cypress/e2e/coo/*, web/cypress/e2e/incidents/*, web/cypress/e2e/perses/*, web/cypress/e2e/virtualization/*
Updates suite tags and titles for ACM, COO, alerting, metrics, legacy dashboards, Perses dashboards, and normalized tag ordering.
Command filters and tag references
web/package.json, web/cypress/README.md, .claude/commands/cypress/cypress-run.md, web/cypress.config.ts
Updates Cypress command filters and tag references. Reorders benchmark reporter imports without changing behavior.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: 🔵 Low · up to 457d2

The change adds Cypress tag linting and updates test commands, but one test assertion may fail and the dashboard command can omit Perses suites while the new ACM command is not documented. The PR is otherwise mergeable with owner awareness and follow-up on these bounded issues.

Sequence Diagram(s)

sequenceDiagram
  participant CypressSource
  participant ESLintConfig
  participant CypressTagRules
  CypressSource->>ESLintConfig: load Cypress TypeScript rules
  ESLintConfig->>CypressTagRules: validate tags in Cypress call options
  CypressTagRules->>CypressSource: report diagnostics or apply autofixes
Loading

Possibly related PRs

Suggested reviewers: etmurasaki

🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 21 files. (3 skipped: 3… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (14 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the primary change: adding linting for Cypress tags. It is concise and relevant to the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed PASS. The committed change set contains no Go or Ginkgo files and adds no It, Describe, Context, When, or Specify titles with dynamic expressions. The changed Cypress describe titles and n…
Test Structure And Quality ✅ Passed PASS — The custom check targets Ginkgo test code, but this pull request changes no Go files and introduces only Cypress/ESLint TypeScript files. The changed test files use ESLint RuleTester with `desc…
Microshift Test Compatibility ✅ Passed PASS. The pull-request diff adds no Go or Ginkgo e2e tests. The changed Cypress suites only modify titles and tags, while the new describe/it calls are ESLint unit-test fixtures. The diff introduc…
Single Node Openshift (Sno) Test Compatibility ✅ Passed PASS: The check is not applicable. The diff against origin/main adds no Go or Ginkgo e2e tests. It only modifies existing Cypress TypeScript suites, mainly their tags and titles. No changed lines in…
Topology-Aware Scheduling Compatibility ✅ Passed PASS: The check is not applicable. The pull-request diff contains Cypress tests, tag types, ESLint rules, documentation, and configuration only. It adds or modifies no deployment manifests, operator c…
Ote Binary Stdout Contract ✅ Passed PASS — The check is not applicable to this pull request. The verified diff changes only Cypress documentation, TypeScript/ESLint files, and package configuration. It does not change an OTE binary or a…
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PASS: The check is not applicable to this pull request. The diff adds no Ginkgo or Go e2e tests. It only changes existing Cypress TypeScript tags/titles and adds ESLint rules and tests. Added lines co…
No-Weak-Crypto ✅ Passed PASS: The pull request changes Cypress tags, ESLint rules, documentation, and package scripts. The only credential-related code is the pre-existing getLoginCredentials context in `web/cypress.config…
Container-Privileges ✅ Passed No explicit container-privilege failure was introduced. The PR changes Cypress, ESLint, documentation, and web/package.json; it does not change a container or Kubernetes manifest. Added-line scans f…
No-Sensitive-Data-In-Logs ✅ Passed PASS. The pull request introduces Cypress tag metadata and ESLint rules. A direct diff review found no added console, logger, cy.log, Cypress.log, print, debug, warn, error, or info calls. The…
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 21 files. (3 skipped: 3 unsupported.)

Full details: Stable And Deterministic Test Names

Explanation

PASS. The committed change set contains no Go or Ginkgo files and adds no It, Describe, Context, When, or Specify titles with dynamic expressions. The changed Cypress describe titles and new ESLint test titles are static strings. The pull request changes tag arrays and a few descriptive suite titles only; no title contains a pod name, timestamp, UUID, node, namespace, IP address, or generated identifier.

Full details: Test Structure And Quality

Explanation

PASS — The custom check targets Ginkgo test code, but this pull request changes no Go files and introduces only Cypress/ESLint TypeScript files. The changed test files use ESLint RuleTester with describe/it and contain no Ginkgo constructs such as BeforeEach, AfterEach, Eventually, or Consistently. Therefore the stated Ginkgo quality requirements are not applicable.

Full details: Microshift Test Compatibility

Explanation

PASS. The pull-request diff adds no Go or Ginkgo e2e tests. The changed Cypress suites only modify titles and tags, while the new describe/it calls are ESLint unit-test fixtures. The diff introduces no MicroShift-unavailable OpenShift APIs, namespaces, or unsupported cluster assumptions. The check is therefore not applicable.

Full details: Single Node Openshift (Sno) Test Compatibility

Explanation

PASS: The check is not applicable. The diff against origin/main adds no Go or Ginkgo e2e tests. It only modifies existing Cypress TypeScript suites, mainly their tags and titles. No changed lines introduce multi-node or HA assumptions.

Full details: Topology-Aware Scheduling Compatibility

Explanation

PASS: The check is not applicable. The pull-request diff contains Cypress tests, tag types, ESLint rules, documentation, and configuration only. It adds or modifies no deployment manifests, operator code, controllers, or scheduling fields. The added code classifies and sorts test tags; the added-line scan found no scheduling constraints such as affinity, topology spread, replicas, node selectors, tolerations, or PDB settings.

Full details: Ote Binary Stdout Contract

Explanation

PASS — The check is not applicable to this pull request. The verified diff changes only Cypress documentation, TypeScript/ESLint files, and package configuration. It does not change an OTE binary or any Go process-level code. Repository searches found no RunSpecs, BeforeSuite, AfterSuite, SynchronizedBeforeSuite, or TestMain code. The only Go main() is unchanged and belongs to the backend server.

Full details: Ipv6 And Disconnected Network Test Compatibility

Explanation

PASS: The check is not applicable to this pull request. The diff adds no Ginkgo or Go e2e tests. It only changes existing Cypress TypeScript tags/titles and adds ESLint rules and tests. Added lines contain no IPv4 addresses, IPv4-only parsing, public URLs, registry pulls, or external service connections. The existing cy.visit('/') calls are unchanged.

Full details: No-Weak-Crypto

Explanation

PASS: The pull request changes Cypress tags, ESLint rules, documentation, and package scripts. The only credential-related code is the pre-existing getLoginCredentials context in web/cypress.config.ts; its diff only reorders imports. No changed lines use MD5, SHA1, DES, 3DES, RC4, Blowfish, ECB, cryptographic APIs, custom cryptography, or secret/token comparisons.

Full details: Container-Privileges

Explanation

No explicit container-privilege failure was introduced. The PR changes Cypress, ESLint, documentation, and web/package.json; it does not change a container or Kubernetes manifest. Added-line scans found no privileged: true, host namespace settings, SYS_ADMIN, allowPrivilegeEscalation: true, or root execution setting. Existing security-related YAML content is unchanged, and the only matching values are restrictive settings (allowPrivilegeEscalation: false, runAsNonRoot: true).

Full details: No-Sensitive-Data-In-Logs

Explanation

PASS. The pull request introduces Cypress tag metadata and ESLint rules. A direct diff review found no added console, logger, cy.log, Cypress.log, print, debug, warn, error, or info calls. The only changed Cypress configuration line reorders writeBenchmarkReport; existing log callbacks are unchanged. Added-line scanning also found no credential, token, API-key, password, PII, session-ID, hostname, or customer-data markers. Therefore, the pull request does not introduce logging that may expose sensitive data.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch lint-tags

Comment @coderabbitai help to get the list of available commands.

coderabbitai[bot]

This comment was marked as off-topic.

@PeterYurkovich

Copy link
Copy Markdown
Contributor Author

/pipeline required

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-agnostic-cmo
/test e2e-monitoring

@etmurasaki

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Sep 1, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification

No second-stage tests were triggered for this PR.

This can happen when:

  • The changed files don't match any pipeline_run_if_changed patterns
  • All files match pipeline_skip_if_only_changed patterns
  • No pipeline-controlled jobs are defined for the main branch

Use /test ? to see all available tests.

@openshift-ci

openshift-ci Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: etmurasaki, PeterYurkovich

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [PeterYurkovich,etmurasaki]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@etmurasaki

Copy link
Copy Markdown
Contributor

/test e2e-coo e2e-perses e2e-acm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants