From 4ff81f4447b00845733dce2a9f48b88c3c6f0663 Mon Sep 17 00:00:00 2001 From: agrasth Date: Thu, 14 May 2026 02:06:05 +0530 Subject: [PATCH] RTECO-992 - Fix uv build command build-info and update jfrog-cli-artifactory dependency - Update jfrog-cli-artifactory to pick up fix for jf uv build build-info (restores module+dependencies, clears artifacts following Maven convention) - Fix TestUvArtifactTypeIsExtension: verify artifact types via jf uv publish instead of jf uv build since build uploads nothing to Artifactory --- go.mod | 2 +- go.sum | 4 ++-- uv_test.go | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 21027ded7..18f279ccb 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/jfrog/build-info-go v1.13.1-0.20260429070557-93b98034d295 github.com/jfrog/gofrog v1.7.6 github.com/jfrog/jfrog-cli-application v1.0.2-0.20260405065840-c930d515ef34 - github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260512080921-ec417dc1b7ee + github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260514080218-aef923f46e93 github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260430125911-ad12ac6f1316 github.com/jfrog/jfrog-cli-evidence v0.9.2 github.com/jfrog/jfrog-cli-platform-services v1.10.1-0.20260430094150-ce7d9b371c6f diff --git a/go.sum b/go.sum index 9117276d2..975dd6895 100644 --- a/go.sum +++ b/go.sum @@ -418,8 +418,8 @@ github.com/jfrog/jfrog-apps-config v1.0.1 h1:mtv6k7g8A8BVhlHGlSveapqf4mJfonwvXYL github.com/jfrog/jfrog-apps-config v1.0.1/go.mod h1:8AIIr1oY9JuH5dylz2S6f8Ym2MaadPLR6noCBO4C22w= github.com/jfrog/jfrog-cli-application v1.0.2-0.20260405065840-c930d515ef34 h1:qD53oDmaw7+5HjaU7FupqbB55saabNzMoMtu3kJfmg4= github.com/jfrog/jfrog-cli-application v1.0.2-0.20260405065840-c930d515ef34/go.mod h1:xum2HquWO5uExa/A7MQs3TgJJVEeoqTR+6Z4mfBr1Xw= -github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260512080921-ec417dc1b7ee h1:yPU08HBAYJJdVsgvdSrn1EUUHq9bhfRDTmMafaizEvA= -github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260512080921-ec417dc1b7ee/go.mod h1:kmU0BbU1hX5peleJ17QLNc0Y1NNBEGEH8MAd1qYDzb8= +github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260514080218-aef923f46e93 h1:5SjZGAsV0MDk5H8DK+7yBmbahdakfblRe0CW8Kp9vvk= +github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260514080218-aef923f46e93/go.mod h1:XESHQN9MEeje13fJaXtbljidwTqlJO+qhhUHHDxwntQ= github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260430125911-ad12ac6f1316 h1:xAl5D+SjLeRH1gCsSHFPpXJeQQBv2HDGqDTDkFOKJ2s= github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260430125911-ad12ac6f1316/go.mod h1:bjAkVD8c2W+jg4whqy10bSXDC/c+Se8/ll/GPp5F/+0= github.com/jfrog/jfrog-cli-evidence v0.9.2 h1:huiBzQSI9z3OF3l2RphthdXl1aH9zBsvAt+zLsApORI= diff --git a/uv_test.go b/uv_test.go index ff3e2720d..afe08fffa 100644 --- a/uv_test.go +++ b/uv_test.go @@ -381,6 +381,7 @@ func TestUvModuleTypeIsUv(t *testing.T) { // TestUvArtifactTypeIsExtension verifies artifact types are "wheel" (for .whl) // or "sdist" (for .tar.gz), as returned by getArtifactTypeFromName. +// Artifacts are only recorded after publish (nothing is uploaded to Artifactory by build). func TestUvArtifactTypeIsExtension(t *testing.T) { initUvTest(t) defer cleanUvTest(t) @@ -388,7 +389,8 @@ func TestUvArtifactTypeIsExtension(t *testing.T) { projectPath := createUvProject(t, "uv-art-type", "uvproject") buildNumber := "1" - assert.NoError(t, runUvCmd(t, projectPath, "build", + assert.NoError(t, runUvCmd(t, projectPath, "build")) + assert.NoError(t, runUvCmd(t, projectPath, "publish", "--build-name="+tests.UvBuildName, "--build-number="+buildNumber)) require.NoError(t, artifactoryCli.Exec("bp", tests.UvBuildName, buildNumber)) @@ -399,7 +401,6 @@ func TestUvArtifactTypeIsExtension(t *testing.T) { require.NotEmpty(t, publishedBuildInfo.BuildInfo.Modules) for _, a := range publishedBuildInfo.BuildInfo.Modules[0].Artifacts { - // getArtifactTypeFromName returns "wheel" for .whl files, "sdist" for .tar.gz files assert.True(t, a.Type == "wheel" || a.Type == "sdist", "artifact type %q should be 'wheel' (for .whl) or 'sdist' (for .tar.gz)", a.Type) }