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 17:58:54 UTC

[PR] fix(file-service, frontend): reject slash in version names [texera]

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

   ### What changes were proposed in this PR?
   
   Root cause. `createDatasetVersion` names a version `v{N} - {description}` from whatever the user typed, and the UI accepted a `/`. The version name is one segment of the logical path `/<prefix>/owner/resource/version/file`, and `FileResolver.parsePrefixedPath` splits that path on `/`. For the path in the issue, `/texera/bughunt-version-name/v1 - 2024/01 snapshot/second.csv`, the version becomes `v1 - 2024` and `01 snapshot/second.csv` becomes the file path, so the version lookup misses and `presign-download` returns a 500. `createModelVersion` builds its name the same way, so model versions have the same problem.
   
   Fix. `ResourceNaming.validateVersionDescription` rejects a description containing `/` with a 400. `createDatasetVersion` and `createModelVersion` call it right after the write-access check, before the LakeFS commit, so the staged files stay staged and the user can fix the description and retry. The version uploader, which datasets and models both use, shows the error under the input and disables Submit, and `Enter` no longer submits either.
   
   ```
   Before:  description "/"  ->  version "v3 - /"  ->  every file in it fails with presign-download 500
   After:   description "/"  ->  400 "Invalid version description"  (UI: inline error, Submit disabled)
   ```
   
   Not included. Versions already stored with a `/` in their name stay unopenable, and repairing them needs a data migration. A `%` or `+` in a name has a separate problem, because `resolveVersionedFile` URL-decodes `filePath` a second time.
   
   ### Any related issues, documentation, discussions?
   
   Closes #8882
   
   ### How was this PR tested?
   
   Tests were added for the validator, for both resources, and for the version uploader, and they were written first and failed against the old code.
   
   ```
   sbt "FileService/testOnly org.apache.texera.service.resource.ResourceNamingSpec org.apache.texera.service.resource.DatasetResourceSpec org.apache.texera.service.resource.ModelUploadResourceSpec"
   cd frontend && yarn ng test --watch=false --include='**/version-uploader.component.spec.ts'
   ```
   
   The first command passes 177 tests and the second passes 73. `scalafixAll`, `scalafmtAll`, `prettier-eslint` and `eslint` ran clean on the changed files.
   
   I have not checked the new inline error in a browser yet, so there are no before/after screenshots.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code, Claude Sonnet 5.5
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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, frontend): reject slash in version names [texera]

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


-- 
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, frontend): reject slash in version names [texera]

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

   <!-- 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/37507742125)._


-- 
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, frontend): reject slash in version names [texera]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #8883:
URL: https://github.com/apache/texera/pull/8883#discussion_r4239318833


##########
frontend/src/app/dashboard/component/user/version-uploader/version-uploader.component.html:
##########
@@ -161,11 +161,17 @@
           (keydown.enter)="onClickCreateVersion()"
           class="version-input" />
       </div>
+      <div
+        *ngIf="versionNameHasSlash"
+        class="version-name-error">
+        A version description cannot contain '/'.
+      </div>

Review Comment:
   The new validation error is only visual: it is neither associated with the input nor announced when it appears, so screen-reader users may encounter a disabled Submit button without learning why. Mark the input invalid, connect it to the message with `aria-describedby`, and expose the dynamic message as an alert.



##########
frontend/src/app/dashboard/component/user/version-uploader/version-uploader.component.html:
##########
@@ -161,11 +161,17 @@
           (keydown.enter)="onClickCreateVersion()"
           class="version-input" />
       </div>
+      <div
+        *ngIf="versionNameHasSlash"
+        class="version-name-error">
+        A version description cannot contain '/'.
+      </div>
       <div>
         <button
           nz-button
           nzType="primary"
           [nzLoading]="isCreatingVersion"
+          [disabled]="versionNameHasSlash"
           (click)="onClickCreateVersion()"

Review Comment:
   This changes the interactive Submit/Enter flow, but the PR's test section lists only automated commands and does not include the required manual click path, browser, and viewport details (AGENTS.md:231-234). Please add those verification details to the PR description.



-- 
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, frontend): reject slash in version names [texera]

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

   <!-- 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, frontend): reject slash in version names [texera]

Posted by "kunwp1 (via GitHub)" <gi...@apache.org>.
kunwp1 commented on code in PR #8883:
URL: https://github.com/apache/texera/pull/8883#discussion_r4239398703


##########
frontend/src/app/dashboard/component/user/version-uploader/version-uploader.component.html:
##########
@@ -161,11 +161,17 @@
           (keydown.enter)="onClickCreateVersion()"
           class="version-input" />
       </div>
+      <div
+        *ngIf="versionNameHasSlash"
+        class="version-name-error">
+        A version description cannot contain '/'.
+      </div>

Review Comment:
   Fixed



##########
frontend/src/app/dashboard/component/user/version-uploader/version-uploader.component.html:
##########
@@ -161,11 +161,17 @@
           (keydown.enter)="onClickCreateVersion()"
           class="version-input" />
       </div>
+      <div
+        *ngIf="versionNameHasSlash"
+        class="version-name-error">
+        A version description cannot contain '/'.
+      </div>
       <div>
         <button
           nz-button
           nzType="primary"
           [nzLoading]="isCreatingVersion"
+          [disabled]="versionNameHasSlash"
           (click)="onClickCreateVersion()"

Review Comment:
   Added.



-- 
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, frontend): reject slash in version names [texera]

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

   ## [Codecov](https://app.codecov.io/gh/apache/texera/pull/8883?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.60%. Comparing base ([`b43d465`](https://app.codecov.io/gh/apache/texera/commit/b43d46520365a42e8a5df892520bead6b2fb6cfe?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`3252798`](https://app.codecov.io/gh/apache/texera/commit/32527984648151845eda0395211ade5db2b77926?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##               main    #8883      +/-   ##
   ============================================
   - Coverage     92.60%   92.60%   -0.01%     
     Complexity     5044     5044              
   ============================================
     Files          1252     1252              
     Lines         53578    53577       -1     
     Branches       6671     6670       -1     
   ============================================
   - Hits          49615    49614       -1     
     Misses         2318     2318              
     Partials       1645     1645              
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/texera/pull/8883/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/8883/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `77.38% <ø> (ø)` | | |
   | [agent-service](https://app.codecov.io/gh/apache/texera/pull/8883/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 [b43d465](https://app.codecov.io/gh/apache/texera/commit/b43d46520365a42e8a5df892520bead6b2fb6cfe?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/8883/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 [b43d465](https://app.codecov.io/gh/apache/texera/commit/b43d46520365a42e8a5df892520bead6b2fb6cfe?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/8883/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 [b43d465](https://app.codecov.io/gh/apache/texera/commit/b43d46520365a42e8a5df892520bead6b2fb6cfe?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/8883/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `87.37% <ø> (ø)` | | |
   | [file-service](https://app.codecov.io/gh/apache/texera/pull/8883/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 [b43d465](https://app.codecov.io/gh/apache/texera/commit/b43d46520365a42e8a5df892520bead6b2fb6cfe?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/8883/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `96.59% <ø> (-0.01%)` | :arrow_down: | Carriedforward from [b43d465](https://app.codecov.io/gh/apache/texera/commit/b43d46520365a42e8a5df892520bead6b2fb6cfe?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/8883/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `83.73% <ø> (ø)` | | |
   | [pyamber](https://app.codecov.io/gh/apache/texera/pull/8883/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `98.58% <ø> (ø)` | | Carriedforward from [b43d465](https://app.codecov.io/gh/apache/texera/commit/b43d46520365a42e8a5df892520bead6b2fb6cfe?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/8883/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `74.09% <ø> (ø)` | | |
   
   *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/8883?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