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

[PR] fix(file-service): reject over-long dataset version names [texera]

kunwp1 opened a new pull request, #8875:
URL: https://github.com/apache/texera/pull/8875

   ### What changes were proposed in this PR?
   
   Root cause. `createDatasetVersion` builds the name `v{N} - {description}` and commits to LakeFS first, then inserts the `dataset_version` row (`DatasetResource.scala`). `dataset_version.name` is `VARCHAR(128)`, so a long description makes the insert fail after the commit, and the commit is outside the DB transaction. The request returns a 500, the staged files are already committed with no version row, and the dataset page then shows neither a pending change nor a version until the next version is created.
   
   Fix. `createDatasetVersion` now rejects a name longer than 128 characters with a 400 before it creates the LakeFS commit, using the same check `createModelVersion` already has. The length is counted in code points rather than UTF-16 code units, since `VARCHAR(n)` counts characters and an emoji would otherwise be rejected early. The staged files stay pending, so the user can shorten the description and submit again. The frontend already shows the message from the response, so it needs no change.
   
   ```
   Before:  Submit -> LakeFS commit -> INSERT dataset_version fails -> 500, files committed, no version row
   After:   Submit -> name over 128 characters -> 400 "Version name is too long: ..." -> files stay pending
   ```
   
   ### Any related issues, documentation, discussions?
   
   Closes #8873
   
   ### How was this PR tested?
   
   Added five tests to `DatasetResourceSpec`: version naming (null, empty and non-empty description), a name of exactly 128 characters (accepted), a name of 129 characters (rejected with a 400, nothing committed, and a retry succeeds), a 128-character name made of emoji (accepted) and a 129-character one (rejected), and the existing no-staged-changes 400. Before the fix, the over-long test failed with `org.jooq.exception.DataException` from the insert. A first version of the guard that used `String.length` failed the emoji test, which is why the length is counted in code points.
   
   `sbt "FileService/testOnly *DatasetResourceSpec"` gives 157 passed, 0 failed, and `scalafixAll` and `scalafmtAll` change nothing. This ran locally with a MinIO container in place of the RustFS image, which could not be pulled on that machine, so CI is the run against RustFS. It was not exercised through the UI.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code, Claude Sonnet 5.5
   


-- 
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: [PR] fix(file-service): reject over-long dataset version names [texera]

Posted by "kunwp1 (via GitHub)" <gi...@apache.org>.
kunwp1 merged PR #8875:
URL: https://github.com/apache/texera/pull/8875


-- 
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: [PR] fix(file-service): reject over-long dataset version names [texera]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8875:
URL: https://github.com/apache/texera/pull/8875#issuecomment-6011034226

   <!-- texera-reviewer-suggestion -->
   ### Automated Reviewer Suggestions
   
   Based on the `git blame` history of the changed files, we recommend the following reviewers:
   
   - **Contributors with relevant context:** `@tanishqgandhi1908`
     You can notify them by mentioning `@tanishqgandhi1908` in a comment.
   


-- 
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: [PR] fix(file-service): reject over-long dataset version names [texera]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8875:
URL: https://github.com/apache/texera/pull/8875#issuecomment-6011033941

   <!-- backport-auto-label-report -->
   ### Backport auto-label report
   
   This `fix:` PR was checked against each actively-supported release branch. A `release/*` label nominates a backport target; the branch's release manager approving this PR is what sends the fix there. The required **Backport Approvals** check stays red until every label below is approved, so each manager either approves or removes their own label — which is why the labels left on a merged PR are exactly the branches it reached.
   
   | Release branch | Analysis |
   | --- | --- |
   | ✅ `release/v1.3` | Change detected on this branch — label added; this fix is queued to backport here. @mengw15 decides: approving sends the fix here, removing this label declines it. The merge waits on one or the other. Review requested. |
   | ✅ `release/v1.2` | Change detected on this branch — label added; this fix is queued to backport here. @xuang7 decides: approving sends the fix here, removing this label declines it. The merge waits on one or the other. Review requested. |
   
   _[Auto-label run](https://github.com/apache/texera/actions/runs/37426261128)._


-- 
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: [PR] fix(file-service): reject over-long dataset version names [texera]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #8875:
URL: https://github.com/apache/texera/pull/8875#issuecomment-6011081383

   ## [Codecov](https://app.codecov.io/gh/apache/texera/pull/8875?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 92.62%. Comparing base ([`1df2c56`](https://app.codecov.io/gh/apache/texera/commit/1df2c567ac0f4b81862586927320733dcff9dee9?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`0c07054`](https://app.codecov.io/gh/apache/texera/commit/0c07054f5c64e57ef262d76c40b4896d24491244?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 1 commits behind head on main.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##               main    #8875      +/-   ##
   ============================================
   + Coverage     92.59%   92.62%   +0.02%     
   - Complexity     5044     5048       +4     
   ============================================
     Files          1252     1250       -2     
     Lines         53579    53757     +178     
     Branches       6671     6723      +52     
   ============================================
   + Hits          49613    49791     +178     
   - Misses         2320     2328       +8     
   + Partials       1646     1638       -8     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/texera/pull/8875/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | *Carryforward flag |
   |---|---|---|---|
   | [access-control-service](https://app.codecov.io/gh/apache/texera/pull/8875/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `79.63% <ø> (+2.25%)` | :arrow_up: | |
   | [agent-service](https://app.codecov.io/gh/apache/texera/pull/8875/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `99.16% <ø> (ø)` | | Carriedforward from [1df2c56](https://app.codecov.io/gh/apache/texera/commit/1df2c567ac0f4b81862586927320733dcff9dee9?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [amber](https://app.codecov.io/gh/apache/texera/pull/8875/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `88.08% <ø> (ø)` | | Carriedforward from [1df2c56](https://app.codecov.io/gh/apache/texera/commit/1df2c567ac0f4b81862586927320733dcff9dee9?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [computing-unit-managing-service](https://app.codecov.io/gh/apache/texera/pull/8875/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `60.41% <ø> (ø)` | | Carriedforward from [1df2c56](https://app.codecov.io/gh/apache/texera/commit/1df2c567ac0f4b81862586927320733dcff9dee9?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [config-service](https://app.codecov.io/gh/apache/texera/pull/8875/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `90.51% <ø> (+3.13%)` | :arrow_up: | |
   | [file-service](https://app.codecov.io/gh/apache/texera/pull/8875/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `81.53% <ø> (ø)` | | Carriedforward from [1df2c56](https://app.codecov.io/gh/apache/texera/commit/1df2c567ac0f4b81862586927320733dcff9dee9?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [frontend](https://app.codecov.io/gh/apache/texera/pull/8875/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `96.59% <ø> (ø)` | | Carriedforward from [1df2c56](https://app.codecov.io/gh/apache/texera/commit/1df2c567ac0f4b81862586927320733dcff9dee9?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [notebook-migration-service](https://app.codecov.io/gh/apache/texera/pull/8875/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `85.13% <ø> (+1.40%)` | :arrow_up: | |
   | [pyamber](https://app.codecov.io/gh/apache/texera/pull/8875/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `98.52% <ø> (ø)` | | Carriedforward from [1df2c56](https://app.codecov.io/gh/apache/texera/commit/1df2c567ac0f4b81862586927320733dcff9dee9?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [workflow-compiling-service](https://app.codecov.io/gh/apache/texera/pull/8875/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `77.19% <ø> (+3.09%)` | :arrow_up: | |
   
   *This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/texera/pull/8875?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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