fix: paginate JCloudsStore listKeys and listFolders - #23978
Merged
Conversation
…occhino/sticky-pull-request-comment GitHub blocked actions-cool's repositories for a TOS violation on 2026-05-19, causing the Deploy/Destroy instance workflows to fail in "Set up job" with "Repository access blocked" before any step runs. Swap to marocchino/sticky-pull-request-comment@v2, which provides the same one-comment-per-PR semantics and supports delete: true. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pin marocchino/sticky-pull-request-comment to a full 40-char commit SHA instead of a floating tag. Two reasons: 1. Correctness: there is no `v2` ref on this repo (only specific tags like v2.9.4); the previous `@v2` would have failed to resolve. 2. Defense against tag-replacement supply-chain attacks like the one that just hit actions-cool (every tag re-pointed to imposter commits exfiltrating Runner.Worker memory). A SHA pin cannot be silently moved. The trailing `# v3.0.4` comment lets Dependabot continue to manage version updates. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
radnov
approved these changes
May 26, 2026
…dhis/jclouds/JCloudsStore.java Co-authored-by: David Mackessy <131455290+david-mackessy@users.noreply.github.com>
…dhis/jclouds/JCloudsStore.java Co-authored-by: David Mackessy <131455290+david-mackessy@users.noreply.github.com>
|
tonsV2
enabled auto-merge (squash)
May 27, 2026 10:58
david-mackessy
approved these changes
May 27, 2026
david-mackessy
left a comment
Contributor
There was a problem hiding this comment.
The PR section Fix needs updating to reflect the newer commits (JClouds listAll vs our own)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Problem
JCloudsStore.listKeysandlistFolderscallgetBlobStore().list(...)only once and convert the result to a list. JClouds returns a singlePageSetper call, which is capped by the provider's default page size (1000 keys on S3-compatible stores). For containers with more than 1000 keys/folders, only the first page is returned and the rest is silently dropped.Impact
JCloudsAppStorageService.deleteAppenumerates an app's files viablobStore.listKeys(folder.asPrefix())and deletes each. For bundled apps that ship more than 1000 files (e.g. metadata-management-app has ~1788), the cleanup deletes only the first 1000 (alphabetically) and leaves the remaining ~787 behind. The first step ofdeleteAppremovesmanifest.webapp, so the leftover dir is invisible todiscoverInstalledAppsafterwards and is never cleaned up.This is the root cause behind the orphan-app-dir accumulation we observed on long-running dev instances — filestores growing into the GBs with dozens of leftover copies of the same app under different random folder names.
Fix
Iterate every page returned by JClouds, following
nextMarkerviaListContainerOptions.afterMarkeruntil the store reports no more results. Same treatment for bothlistKeysandlistFolders.Verification
Added a
listKeys_paginatesPastDefaultPageSizetest toBlobStoreServiceContractTest, which writes 1100 blobs and assertslistKeysreturns all of them. The test runs against all three backends:S3BlobStoreServiceContractTest- passesFilesystemBlobStoreServiceContractTest- passesTransientBlobStoreServiceContractTest- passesFull contract suite stays green: 72 tests, 0 failures.
Locally reproduced the bundled-app cleanup bug end-to-end against MinIO in a testcontainers fixture before applying the fix - the old code left 787 blobs behind in the previous app dir after a reinstall; after the fix the previous dir is fully cleaned up.