You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "aglinxinyuan (via GitHub)" <gi...@apache.org> on 2026/06/13 00:29:59 UTC

[I] add unit test coverage for HeaderField [texera]

aglinxinyuan opened a new issue, #5662:
URL: https://github.com/apache/texera/issues/5662

   ## Background
   
   `HeaderField` in `common/auth` (`auth/util/HeaderField.scala`) currently lacks a dedicated unit-spec. It is a small `object` that holds the canonical HTTP header names the auth layer reads from every request — drift in any constant silently breaks header-based authentication.
   
   ```scala
   object HeaderField {
     val UserComputingUnitAccess = "x-user-computing-unit-access"
     val UserId = "x-user-id"
     val UserName = "x-user-name"
     val UserEmail = "x-user-email"
   }
   ```
   
   ## Behavior to pin
   
   | Surface | Contract |
   | --- | --- |
   | `UserComputingUnitAccess` | equals `"x-user-computing-unit-access"` |
   | `UserId` | equals `"x-user-id"` |
   | `UserName` | equals `"x-user-name"` |
   | `UserEmail` | equals `"x-user-email"` |
   | Header-name format | every constant matches the `x-user-*` namespace and uses lowercase + hyphen-separated (RFC-7230 compatible) |
   | Distinctness | every constant has a distinct value (no accidental aliasing under refactor) |
   
   ## Scope
   
   - New spec file: `HeaderFieldSpec.scala` (matches the `<srcClassName>Spec.scala` convention).
   - No production-code changes.
   - This is a very small spec (~50 lines) — the value is regression coverage against accidental renames, not coverage of complex logic.
   
   ## Notes
   
   `common/auth` already has ScalaTest as a `% Test` dependency, so no build changes are needed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] add unit test coverage for HeaderField [texera]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #5662:
URL: https://github.com/apache/texera/issues/5662#issuecomment-4696748962

   <!-- texera:template-compliance -->
   👋 Thanks for opening this issue, @aglinxinyuan!
   
   It looks like the issue description doesn't quite follow our template yet:
   
   - This issue doesn't appear to use one of our templates (Bug, Feature, or Task). Please open it using a template so the required details are captured.
   
   Filling out the template helps reviewers understand and triage your contribution faster. Please edit the description to complete it. This message will disappear automatically once the template is followed.
   
   You can find the template prompts by editing the description, or see [CONTRIBUTING.md](https://github.com/apache/texera/blob/main/CONTRIBUTING.md) for the full contribution flow.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] add unit test coverage for HeaderField [texera]

Posted by "lalalastella (via GitHub)" <gi...@apache.org>.
lalalastella commented on issue #5662:
URL: https://github.com/apache/texera/issues/5662#issuecomment-4701660859

   /take


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org