Skip to content

RTECO-0000 - Fix flaky TestApkAdd_DepChecksums (order-dependent no-op install) - #3711

Merged
naveenku-jfrog merged 1 commit into
masterfrom
RTECO-0000-fix-apk-dep-checksums-test-order
Sep 15, 2026
Merged

naveenku-jfrog merged 1 commit into
masterfrom
RTECO-0000-fix-apk-dep-checksums-test-order

Conversation

@naveenku-jfrog

Copy link
Copy Markdown
Collaborator

Summary

  • TestApkAdd_DepChecksums was failing intermittently depending on test order (seen failing in jfrog-cli-artifactory PR #561 CI) because curl is already installed by TestApkAdd_BasicBuildInfo earlier in the same test binary run.
  • With curl already present, jf apk add curl becomes a no-op: nothing is downloaded into the fresh --cache-dir for that invocation, so there is no local .apk archive to compute checksums from. AQL enrichment does not help either, since these test packages are fetched directly from the Alpine CDN, not proxied through Artifactory.
  • Verified the checksum-matching logic itself (glob against name-version.<hash>.apk in build-info-go's ChecksumsFromCache) is correct against a real Alpine 3.18 container; this is purely a test-isolation issue.
  • Fix: uninstall curl before the test's apk add curl call, forcing a real download regardless of what earlier tests already installed.

Test plan

  • CI run confirms TestApkAdd_DepChecksums passes regardless of run order
  • go vet ./... and gofmt -l apk_test.go clean (verified locally)

Generated with Claude Code

…l install

TestApkAdd_DepChecksums asserts that at least one dependency has a
checksum after `jf apk add curl`, but curl is already installed by
TestApkAdd_BasicBuildInfo earlier in the same test binary run. That
makes the add a no-op that downloads nothing, so there's no cached
.apk archive left to compute checksums from, and AQL enrichment can't
help either since these packages are fetched directly from the CDN
rather than through Artifactory. Uninstall curl first so the test
always exercises a real download.
@naveenku-jfrog naveenku-jfrog added the ignore for release Automatically generated release notes label Sep 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@naveenku-jfrog
naveenku-jfrog merged commit 3d2f8a4 into master Sep 15, 2026
133 checks passed
@naveenku-jfrog
naveenku-jfrog deleted the RTECO-0000-fix-apk-dep-checksums-test-order branch September 15, 2026 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ignore for release Automatically generated release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants