fix(etl): declare UTF-8 for successful text responses - #341
Closed
seonghobae wants to merge 1 commit into
Closed
Conversation
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Collaborator
Author
Collaborator
Author
|
Superseded by canonical active owner PR #236; local evidence was handed off in the preceding comment. |
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.
What changed
The successful synchronous ETL response now declares its actual encoding:
The response body and newline-delimited plain-text representation are unchanged. Failure responses, idempotency headers, request handling, authentication, catalog behavior, and persistence are unchanged.
Why this change
Issue #235:
EtlController.processData(...)returned a JavaStringasMediaType.TEXT_PLAINwithout a charset. The ETL validation contract permits non-ASCII record identifiers, so a successful body such asProcessed: 레코드_αwas not self-describing at the HTTP boundary. Clients should not need to guess the encoding.The production change is limited to
EtlController.java:new MediaType(MediaType.TEXT_PLAIN, StandardCharsets.UTF_8). The focused regression test drives the real standalone MVC response boundary with a non-ASCII result and asserts the exact header plus body preservation.Test-first evidence (local, Temurin 25)
RED on exact protected
origin/develop@e550688cbefore the production change:EtlControllerTest1 failure / 24 tests, atdeclaresUtf8CharsetForNonAsciiSuccessBodybecause the successful response had no charset.GREEN after
ca0f326b: focusedEtlControllerTest24/24; fulletl-servicemodule 231 tests, 0 failures, 0 errors with the JaCoCo gate.Acceptance mapping (issue #235)
text/plain;charset=UTF-8response — covered by content type and raw header assertions.Processed: 레코드_αbody assertion.etl-servicesuite passed.200 text/plainrepresentation.Non-goals
Closes #235