Skip to content

JFMIG-145 - Batch Docker dir-content AQL in transfer-files Files Diff phase - #1630

Merged
amithins merged 1 commit into
jfrog:masterfrom
amithins:bugfix/JFMIG-145-docker-aql-batching
Nov 10, 2026
Merged

amithins merged 1 commit into
jfrog:masterfrom
amithins:bugfix/JFMIG-145-docker-aql-batching

Conversation

@amithins

@amithins amithins commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

Problem

JFMIG-145: for Docker repos, the Files Diff phase sends a single AQL with one $or clause per changed manifest.json in a 15-minute window (generateGetDirContentAqlQuery). With roughly 40-60+ changed tags the query exceeds Artifactory's artifactory.aql.search.query.size.limit (default 6000) and the server returns 400 AQL query is too long. The window fails, the diff is never marked complete, and every re-run fails the same way (and blocks the repos after it).

Fix

getDockerTimeFrameFilesDiff now splits the manifest paths with splitPathsForDirContentAql into batches whose generated query is at most 5000 chars, runs one AQL per batch and merges the results. A single path longer than the budget is sent alone, never dropped. Behaviour for small windows is unchanged (one query).

Tests

  • TestSplitPathsForDirContentAql: every batch query is within budget; batches are complete and ordered (0, 1, 10, 70 and 10,000 paths).
  • TestSplitPathsForDirContentAqlOversizedPath.
  • TestGetDockerTimeFrameFilesDiffManyManifests: mock server rejects queries over 7000 chars; 500 manifests, all 1000 files returned.
  • E2E (source/target Artifactory 7.171.2, default 6000 limit, jfrog-cli v2.131.0, 100 tags in one window): base fails with the 400 and leaves 200 files untransferred; with this change the delta completes and source and target match (206/206). The same result was confirmed with this patch on top of the plugin-removal (GET/PUT) branch.

Checklist

  • All tests passed. New tests added.
  • Static analysis checks (CI).
  • This pull request is on the master branch.
  • I used gofmt.

@amithins
amithins deployed to build-gate November 6, 2026 08:55 — with GitHub Actions Active
@amithins
amithins force-pushed the bugfix/JFMIG-145-docker-aql-batching branch from 1e6b7bc to c31d138 Compare November 6, 2026 09:27
@amithins
amithins deployed to build-gate November 6, 2026 09:28 — with GitHub Actions Active
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

👍 Frogbot scanned this pull request and did not find any new security issues.


@amithins
amithins merged commit 1f307dd into jfrog:master Nov 10, 2026
13 checks passed

This branch was successfully deployed

1 active deployment
build-gate — c31d1388 Deployed Nov 6, 2026 by amithins via gate #177
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.

2 participants