fix: error thrown on Approve quick app 2.0 with Context files #1732#1733
Open
astsiapanay wants to merge 5 commits into
Open
fix: error thrown on Approve quick app 2.0 with Context files #1732#1733astsiapanay wants to merge 5 commits into
astsiapanay wants to merge 5 commits into
Conversation
…#1732 Deduplicate resource URLs collected during app schema validation (ListCollector) so an attachment referenced twice via schema combinators isn't copied twice during publication approval, which failed on the second, already-existing destination. Also fix the thrown message to reference the actual attachment file instead of the application's own URL.
This comment has been minimized.
This comment has been minimized.
Oleksii-Klimov
approved these changes
Jul 17, 2026
Collaborator
Author
|
/deploy-review
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
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.
Fixes a publish-approval failure for schema-rich ("Quick App 2.0") applications that have attached Context files: approving the publication threw "Can't copy source file: ..." because the same attachment was discovered twice by the app-schema resource collector and copied twice, with the second copy failing against an already-existing destination.
Applicable issues
Description of changes
ListCollectornow deduplicates collected resource URLs (backed by aLinkedHashSetinstead of a plainArrayList), so an attachment referenced more than once via schema combinators (oneOf/anyOf) is only copied once during publish approval.ApplicationService.copyApplicationnow reports the actual attachment file's URL in the "Can't copy source file" error instead of the application's own URL, which previously made the error message misleading (it looked like DIAL Core was trying to copy the application resource itself).ListCollectorTest(unit test for the dedup behavior),ApplicationSchemaServiceTest#getFiles_dedupsDuplicateFileReferences, andPublicationApiTest#testApplicationWithTypeSchemaPublish_Ok_DuplicateFileReference(end-to-end reproduction of the issue).Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.