From 3a35e50fda6415d003a1037ec1e87475104f240a Mon Sep 17 00:00:00 2001 From: saurabh-prakash Date: Fri, 26 Jun 2026 15:55:53 +0530 Subject: [PATCH 1/2] [TE-10262]: version lt-reports fatjar publish & drop CI on push GitHub Packages rejects re-publishing an immutable version (HTTP 409), so the fixed `lt-reports` coordinate failed on every CD run after the first. Publish under ${project.version}.${lt.patch.version} instead: project.version tracks upstream karate unchanged, lt.patch.version is a new LambdaTest-fork counter in the root pom (added, not appended, so the Maven Central release coordinate stays clean). Bump it to republish. Also drop the push trigger on lt-reports-ci so the build check runs only on PRs and manual dispatch (CD still publishes on push to lt-reports). Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/lt-reports-cd.yml | 34 +++++++++++++++++++---------- .github/workflows/lt-reports-ci.yml | 3 --- pom.xml | 11 ++++++++++ 3 files changed, 33 insertions(+), 15 deletions(-) diff --git a/.github/workflows/lt-reports-cd.yml b/.github/workflows/lt-reports-cd.yml index 6f07557cfc..3a383b86b2 100644 --- a/.github/workflows/lt-reports-cd.yml +++ b/.github/workflows/lt-reports-cd.yml @@ -2,13 +2,17 @@ name: lt-reports-cd # Publishes the Karate report-integration fatjar to GitHub Packages on every # merge into lt-reports. The post-processing service (LambdatestIncPrivate/ -# hyperexecute-postprocessing-service) downloads it from a fixed coordinate at -# Docker build time, so there is nothing to version-bump or rename by hand: -# every merge overwrites the same coordinate, mirroring how the extent report -# jar is published (extentnativereports-1.10-stage). +# hyperexecute-postprocessing-service) downloads it from this coordinate at +# Docker build time. # -# coordinate: com.lambdatest:karate-reports:lt-reports -# url: https://maven.pkg.github.com/LambdaTest/karate/com/lambdatest/karate-reports/lt-reports/karate-reports-lt-reports.jar +# GitHub Packages rejects re-publishing an existing version (HTTP 409 Conflict), +# so the publish version is NOT fixed: it is ${project.version}.${lt.patch.version} +# where project.version tracks upstream karate (1.5.3) and lt.patch.version is a +# LambdaTest-fork counter in the root pom that must be bumped on each republish. +# The downstream consumer must reference the bumped version after each publish. +# +# coordinate: com.lambdatest:karate-reports:. (e.g. 1.5.3.1) +# url: https://maven.pkg.github.com/LambdaTest/karate/com/lambdatest/karate-reports/1.5.3.1/karate-reports-1.5.3.1.jar on: push: @@ -62,11 +66,14 @@ jobs: test -f "${FATJAR}" || { echo "fatjar not found at ${FATJAR}"; ls -lh karate-core/target; exit 1; } ls -lh "${FATJAR}" - # Deploy the fatjar to GitHub Packages under a fixed coordinate. deploy-file - # is used (instead of a plain deploy) so the karate-parent release version - # (1.5.x, used for Maven Central) is never touched. Only runs on lt-reports - # (not workflow_dispatch from other branches) so the package is published - # solely from merges into lt-reports. + # Deploy the fatjar to GitHub Packages. deploy-file is used (instead of a + # plain deploy) so the karate-parent release version (1.5.x, used for Maven + # Central) is never touched. The publish version is the upstream karate + # version with the LambdaTest-fork patch appended (project.version.lt.patch.version, + # e.g. 1.5.3.1); bump lt.patch.version in the root pom to republish, since + # GitHub Packages rejects overwriting an existing version (HTTP 409). Only + # runs on lt-reports (not workflow_dispatch from other branches) so the + # package is published solely from merges into lt-reports. - name: publish to GitHub Packages if: github.ref == 'refs/heads/lt-reports' env: @@ -74,13 +81,16 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | KARATE_VERSION="$(mvn -q -DforceStdout -f karate-core/pom.xml help:evaluate -Dexpression=project.version)" + LT_PATCH_VERSION="$(mvn -q -DforceStdout -f karate-core/pom.xml help:evaluate -Dexpression=lt.patch.version)" + PUBLISH_VERSION="${KARATE_VERSION}.${LT_PATCH_VERSION}" + echo "Publishing karate-reports version: ${PUBLISH_VERSION}" FATJAR="karate-core/target/karate-${KARATE_VERSION}.jar" mvn -B -ntp deploy:deploy-file \ --settings .github/settings.xml \ -Dfile="${FATJAR}" \ -DgroupId=com.lambdatest \ -DartifactId=karate-reports \ - -Dversion=lt-reports \ + -Dversion="${PUBLISH_VERSION}" \ -Dpackaging=jar \ -DrepositoryId=github \ -Durl=https://maven.pkg.github.com/LambdaTest/karate diff --git a/.github/workflows/lt-reports-ci.yml b/.github/workflows/lt-reports-ci.yml index 9fbb8a3a8e..ebf3f53119 100644 --- a/.github/workflows/lt-reports-ci.yml +++ b/.github/workflows/lt-reports-ci.yml @@ -7,9 +7,6 @@ name: lt-reports-ci # on PRs before they reach the publish-on-merge workflow. on: - push: - branches: - - lt-reports pull_request: branches: - lt-reports diff --git a/pom.xml b/pom.xml index edd1d69cf3..5dde3622e7 100644 --- a/pom.xml +++ b/pom.xml @@ -32,6 +32,17 @@ + + 1 UTF-8 17 3.13.0 From a724e43b2139eca5606acc96a771c1ae065b9810 Mon Sep 17 00:00:00 2001 From: saurabh-prakash Date: Fri, 26 Jun 2026 15:57:38 +0530 Subject: [PATCH 2/2] reverted remote version of lib to source version --- .github/workflows/lt-reports-cd.yml | 24 ++++++------------------ pom.xml | 13 +++---------- 2 files changed, 9 insertions(+), 28 deletions(-) diff --git a/.github/workflows/lt-reports-cd.yml b/.github/workflows/lt-reports-cd.yml index 3a383b86b2..3d9696c93b 100644 --- a/.github/workflows/lt-reports-cd.yml +++ b/.github/workflows/lt-reports-cd.yml @@ -1,18 +1,12 @@ name: lt-reports-cd # Publishes the Karate report-integration fatjar to GitHub Packages on every -# merge into lt-reports. The post-processing service (LambdatestIncPrivate/ -# hyperexecute-postprocessing-service) downloads it from this coordinate at -# Docker build time. +# merge into lt-reports, under coordinate: # -# GitHub Packages rejects re-publishing an existing version (HTTP 409 Conflict), -# so the publish version is NOT fixed: it is ${project.version}.${lt.patch.version} -# where project.version tracks upstream karate (1.5.3) and lt.patch.version is a -# LambdaTest-fork counter in the root pom that must be bumped on each republish. -# The downstream consumer must reference the bumped version after each publish. +# com.lambdatest:karate-reports:${project.version}.${lt.patch.version} # -# coordinate: com.lambdatest:karate-reports:. (e.g. 1.5.3.1) -# url: https://maven.pkg.github.com/LambdaTest/karate/com/lambdatest/karate-reports/1.5.3.1/karate-reports-1.5.3.1.jar +# project.version tracks upstream karate; lt.patch.version is a LambdaTest-fork +# counter in the root pom that must be bumped on each republish. on: push: @@ -66,14 +60,8 @@ jobs: test -f "${FATJAR}" || { echo "fatjar not found at ${FATJAR}"; ls -lh karate-core/target; exit 1; } ls -lh "${FATJAR}" - # Deploy the fatjar to GitHub Packages. deploy-file is used (instead of a - # plain deploy) so the karate-parent release version (1.5.x, used for Maven - # Central) is never touched. The publish version is the upstream karate - # version with the LambdaTest-fork patch appended (project.version.lt.patch.version, - # e.g. 1.5.3.1); bump lt.patch.version in the root pom to republish, since - # GitHub Packages rejects overwriting an existing version (HTTP 409). Only - # runs on lt-reports (not workflow_dispatch from other branches) so the - # package is published solely from merges into lt-reports. + # deploy-file (not a plain deploy) keeps the karate-parent release version + # untouched. Guarded to lt-reports so only merges publish, never dispatch. - name: publish to GitHub Packages if: github.ref == 'refs/heads/lt-reports' env: diff --git a/pom.xml b/pom.xml index 5dde3622e7..d334aaa06c 100644 --- a/pom.xml +++ b/pom.xml @@ -32,16 +32,9 @@ - + 1 UTF-8 17