Skip to content

OLS-3470: Add lint, i18n and unit tests to CI pipeline#63

Open
kyoto wants to merge 3 commits into
openshift:mainfrom
kyoto:add-lint-integration-test
Open

OLS-3470: Add lint, i18n and unit tests to CI pipeline#63
kyoto wants to merge 3 commits into
openshift:mainfrom
kyoto:add-lint-integration-test

Conversation

@kyoto

@kyoto kyoto commented Jun 25, 2026

Copy link
Copy Markdown
Member

No description provided.

@openshift-ci openshift-ci Bot requested review from joshuawilson and onmete June 25, 2026 05:59
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Adds a Tekton pre-commit pipeline that extracts snapshot metadata and runs lint/test/i18n, updates docs and locale text for the new CI flow and suspension state, and adds ESLint suppressions around existing React hook code.

Changes

Pre-commit pipeline and docs

Layer / File(s) Summary
Pipeline definition and validation flow
.tekton/integration-tests/lightspeed-agentic-console-pre-commit.yaml, .ai/spec/how/e2e-testing.md, .ai/spec/how/project-structure.md, .ai/spec/README.md
Adds the lightspeed-agentic-console-pre-commits Tekton pipeline with SNAPSHOT and test-name parameters, metadata extraction, repo checkout, and npm run lint, npm run test, and npm run i18n; docs add the Konflux CI pipeline description and new manifest references.
Suspension alert locale
locales/en/plugin__lightspeed-agentic-console-plugin.json
Adds the “Agentic system is suspended” label and guidance text, and removes the standalone “Approve with retries” entry.

React hook lint suppressions

Layer / File(s) Summary
Effect and callback suppression comments
src/components/configuration/AgentForm.tsx, src/components/configuration/ApprovalPolicyTab.tsx, src/components/proposals/ProposalDetailPage.tsx, src/components/proposals/SandboxLogViewer.tsx
Adds react-hooks/set-state-in-effect and react-hooks/exhaustive-deps disable comments around existing useEffect/useCallback code; ProposalDetailPage.tsx also reorders OverviewTab props without changing values.

Sequence Diagram(s)

sequenceDiagram
  participant Konflux
  participant extract-snapshot-metadata
  participant lint
  participant lightspeed-agentic-console

  Konflux->>extract-snapshot-metadata: SNAPSHOT JSON
  extract-snapshot-metadata->>extract-snapshot-metadata: jq extracts console-image and commit
  extract-snapshot-metadata->>lint: console-image, commit
  lint->>lightspeed-agentic-console: clone and checkout commit
  lint->>lint: npm ci, npm run lint, npm run test, npm run i18n
Loading

Metadata

  • Related issues: None referenced.
  • Related PRs: None referenced.
  • Suggested labels: ci, docs, i18n, lint
  • Suggested reviewers: None identified from the provided data.

Poem
A pipeline reads a JSON seed,
Checks out the SHA it’s told to need.
Docs point to CI, strings shift state,
Hook warnings quiet, props stay straight.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive No description was provided, so there is no meaningful summary to assess. Add a short description of the pipeline and file changes so reviewers can verify scope.
✅ Passed checks (3 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title accurately summarizes the main change: adding lint, i18n, and unit-test checks to the CI pipeline.

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.tekton/integration-tests/lightspeed-agentic-console-pre-commit.yaml:
- Around line 44-46: The Tekton step in lightspeed-agentic-console-pre-commit
currently writes the jq results directly into the console-image and commit
result files without verifying they are present. Add explicit checks around the
jq lookups for lightspeed-agentic-console in the snapshot, and if
.containerImage or .source.git.revision is empty or null, emit a clear error and
exit non-zero before writing results. Keep the validation in the same step
script so the failure is caught before later git commands consume bad values.
- Around line 10-12: The default SNAPSHOT payload is missing the
source.git.revision field that the commit extraction path expects, so the lint
task ends up with a null commit. Update the SNAPSHOT default in the pipeline
parameter definition to include a valid source.git.revision value that matches
what the extraction logic in the lint task reads, and keep the structure aligned
with the application snapshot consumed by the pre-commit flow.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: ab400503-5186-4177-a29f-632f45e0403f

📥 Commits

Reviewing files that changed from the base of the PR and between f2b5c33 and 382e0cf.

📒 Files selected for processing (4)
  • .tekton/integration-tests/lightspeed-agentic-console-pre-commit.yaml
  • locales/en/plugin__lightspeed-agentic-console-plugin.json
  • src/components/proposals/ProposalDetailPage.tsx
  • src/hooks/useStageApproval.ts

Comment thread .tekton/integration-tests/lightspeed-agentic-console-pre-commit.yaml Outdated
@kyoto kyoto force-pushed the add-lint-integration-test branch from 382e0cf to 811a227 Compare June 25, 2026 06:41
@JoaoFula

Copy link
Copy Markdown

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 25, 2026
@JoaoFula

Copy link
Copy Markdown

/retest

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 27, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kyoto kyoto force-pushed the add-lint-integration-test branch from 811a227 to ec9ac4d Compare July 6, 2026 07:33
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 6, 2026
@openshift-ci

openshift-ci Bot commented Jul 6, 2026

Copy link
Copy Markdown

New changes are detected. LGTM label has been removed.

@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 6, 2026
@kyoto kyoto added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 6, 2026
@openshift-ci

openshift-ci Bot commented Jul 6, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

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:

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

kyoto and others added 2 commits July 6, 2026 16:47
Runs lint, unit tests, and i18n validation on PRs via a Tekton
integration test pipeline, following the same pattern used in
lightspeed-console.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kyoto kyoto force-pushed the add-lint-integration-test branch from ec9ac4d to 4dc4b2c Compare July 6, 2026 07:47
@kyoto kyoto changed the title Add lint, i18n and unit tests to CI pipeline OLS-3470: Add lint, i18n and unit tests to CI pipeline Jul 6, 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 Jul 6, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 6, 2026

Copy link
Copy Markdown

@kyoto: This pull request references OLS-3470 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 story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

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.

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants