Skip to content

fix: error thrown on Approve quick app 2.0 with Context files #1732#1733

Open
astsiapanay wants to merge 5 commits into
developmentfrom
fix/issue-1732
Open

fix: error thrown on Approve quick app 2.0 with Context files #1732#1733
astsiapanay wants to merge 5 commits into
developmentfrom
fix/issue-1732

Conversation

@astsiapanay

Copy link
Copy Markdown
Collaborator

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

  • ListCollector now deduplicates collected resource URLs (backed by a LinkedHashSet instead of a plain ArrayList), so an attachment referenced more than once via schema combinators (oneOf/anyOf) is only copied once during publish approval.
  • ApplicationService.copyApplication now 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).
  • Added ListCollectorTest (unit test for the dedup behavior), ApplicationSchemaServiceTest#getFiles_dedupsDuplicateFileReferences, and PublicationApiTest#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.

…#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.
@ai-dial-actions

This comment has been minimized.

@astsiapanay

astsiapanay commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator Author

/deploy-review

GitHub actions run: 29585725448

Stage Status
deploy-review Success ✅
chat Success ✅

@ai-dial-actions

This comment has been minimized.

@ai-dial-actions

This comment has been minimized.

@ai-dial-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

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.

[Quick app 2.0]: error thrown on Approve quick app 2.0 with attached Context files

3 participants