Skip to content

fix(QTDI-3757): skip API tests on non-master branches in TCOMP-api-test pipeline - #1317

Merged
lxia-talend merged 4 commits into
masterfrom
lxia-talend/QTDI-3757_skip_api_tests
Nov 5, 2026
Merged

lxia-talend merged 4 commits into
masterfrom
lxia-talend/QTDI-3757_skip_api_tests

Conversation

@lxia-talend

@lxia-talend lxia-talend commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Requirements

  • Any code change adding any logic MUST be tested through a unit test executed with the default build
  • Any API addition MUST be done with a documentation update if relevant

Why this PR is needed?

The QA/TCOMP-api-test/pr-head check (Jenkins job TCOMP-api-test) fails on every PR (e.g. #1316) and blocks merge: the API Tester /license endpoint no longer trusts the caller blindly (QAPI-3138), so the Execute Test stage fails. Jira: QTDI-3757.

What does this PR adds (design/code thoughts)?

  • talend-component-maven-plugin/src/it/web/.jenkins/Jenkinsfile: new boolean parameter RUN_API_TESTS (default false). The server prepare/start/check, Execute Test stage and the related post steps only run when params.RUN_API_TESTS || BRANCH_NAME == 'master'; PRs and other branches end SUCCESS with a log message.
  • talend-component-maven-plugin/src/it/web/README.md: documents the behaviour.
  • Test projects/scripts are untouched. Fixing the tests for the new /license behaviour is a follow-up; master builds still run the API tests and may fail until then.
  • Not verifiable locally (Jenkins pipeline): re-trigger TCOMP-api-test on this PR / chore(QTDI-3758): use mirror #1316 to confirm the check goes green. No Java change. Unit test exception requested: the change is Jenkins pipeline Groovy only, which the default Maven build does not execute and cannot reasonably unit test; it is verified by re-triggering TCOMP-api-test.

AI contribution metrics

  • Code Generation % (this PR): 100% (153/153 changed lines)
  • Code Generation % (ticket-wide): 100%
  • Technical Design % (ticket-wide): ~75% (estimate, 1 revision)

AI generated code

https://internal.qlik.dev/general/ways-of-working/code-reviews/#guidelines-for-ai-generated-code

  • this PR has been written with the help of GitHub Copilot or another generative AI tool

🤖 Generated with Claude Code

…st pipeline

Add RUN_API_TESTS parameter (default false); API tests run on master or when forced.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@lxia-talend

Copy link
Copy Markdown
Contributor Author

Critic Round 1 — Scope & design review (QTDI-3757)

Files: Jenkinsfile (modified), README.md (modified). Braces/parens balanced; non-whitespace diff of the post block = only indentation + if wrapper; printf/sh content unchanged.

# Severity File Description Suggested Fix
1 MINOR Jenkinsfile Guard is BRANCH_NAME == 'master' only; maintenance/* branches skip API tests unless RUN_API_TESTS is ticked. Acceptable (documented).
2 MINOR Jenkinsfile If Prepare fails before runApiTests is set, post steps are skipped. Acceptable: no server started at that point.
3 MINOR Jenkinsfile "Prepare component-runtime server" also guarded (beyond plan) — post steps depend on its install dir. Noted.

Not verifiable locally: declarative linter / actual Jenkins run. Master builds still run API tests and may fail on /license until a follow-up fixes them (out of scope).

Approval gate: APPROVED — no Blocker or Major findings.

Signed: Claude Sonnet 5.5

@lxia-talend

Copy link
Copy Markdown
Contributor Author

Code Review / Compliance — QTDI-3757

Reviewed 2 files: talend-component-maven-plugin/src/it/web/.jenkins/Jenkinsfile, talend-component-maven-plugin/src/it/web/README.md.
No Java changes; java-/tck- rules not applicable. License header intact; no new dependencies; no secrets; scope matches approved plan.

Critical fixed: 0, Warnings: 0, Info: 1 (Prepare-server stage also guarded, beyond plan wording; justified).

Signed: Claude Sonnet 5.5

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Approval is blocked by an uncovered Jenkinsfile logic change and inaccurate documentation about when the API tests run.

2 open issues
What changed in this PR

This pull request updates the TCOMP-api-test Jenkins pipeline to skip API tests on non-master branches by default, while preserving execution on master and allowing explicit opt-in through RUN_API_TESTS.

Changes:

  • Adds branch- and parameter-based API-test execution gating.
  • Conditionally skips server setup, test execution, cleanup, and report publishing.
  • Documents the pipeline behavior and records the related CI context.
File Summary Review findings
talend-component-maven-plugin/​src/​it/​web/​README.md Documents behavior for master and non-master branches. Nit: Clarify wording that currently suggests API tests can no longer be launched from CI; they still run on master or when explicitly enabled.
talend-component-maven-plugin/​src/​it/​web/​.jenkins/​Jenkinsfile Adds RUN_API_TESTS and conditional API-test execution and post-processing. Moderate: The added executable logic is not covered by a unit test in the default build, contrary to the PR requirements. Add the required test or obtain an explicit exception.
repository-knowledge.md Records the TCOMP-api-test Jenkins pipeline behavior and context. No findings.

Review effort: Lite

@sonar-rnd

sonar-rnd Bot commented Nov 5, 2026

Copy link
Copy Markdown

@lxia-talend
lxia-talend merged commit fb46e06 into master Nov 5, 2026
10 checks passed
@lxia-talend
lxia-talend deleted the lxia-talend/QTDI-3757_skip_api_tests branch November 5, 2026 10:12
lxia-talend added a commit that referenced this pull request Nov 12, 2026
* fix(QTDI-3604): Skip invoker ITs during release build (#1295)

release:prepare runs verify at the release version without installing
the modules, so the uispec invoker IT cannot resolve
component-runtime-beam:<release> and fails the release job.

-DskipITs is not honored by maven-invoker-plugin, so pass
-Dinvoker.skip=true to release:prepare and release:perform.

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
(cherry picked from commit 26ea6ea)

* fix(QTDI-3604): Skip invoker ITs in release step scripts (#1296)

The previous fix only patched release_legacy.sh, which the release job
no longer runs. The job calls .jenkins/scripts/release/release-2-prepare.sh
and release-3-perform.sh, so the uispec invoker IT still ran during
release:prepare and failed to resolve component-runtime-beam:<release>.

Pass -Dinvoker.skip=true to release:prepare and release:perform there.

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
(cherry picked from commit 175823d)

* fix(QTDI-3757): skip API tests on non-master branches in TCOMP-api-test pipeline (#1317)

* fix(QTDI-3757): skip API tests on non-master branches in TCOMP-api-test pipeline

Add RUN_API_TESTS parameter (default false); API tests run on master or when forced.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* doc(QTDI-3757): Record TCOMP-api-test pipeline knowledge

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* fix(QTDI-3757): clarify README wording on API tests in CI

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
(cherry picked from commit fb46e06)

* chore(QTDI-3805): exclude antora 1.2610.1 (#1325)

* to unblock CI build

(cherry picked from commit c80b2ce)

* chore(QTDI-3640): publish Nexus artifacts to GitHub Packages (#1300)

* chore(QTDI-3640): publish Nexus artifacts to GitHub Packages

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chore(QTDI-3640): publish dev-branch qualified snapshots to GitHub Packages only on request

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
(cherry picked from commit 90cf8af)

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Oleksandr Zhelezniak <66320870+ozhelezniak-talend@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
lxia-talend added a commit that referenced this pull request Nov 20, 2026
…COMP-api-test #1317)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.

3 participants