Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug report] UI should allow hyphen in fileset name #6399

Closed
mchades opened this issue Feb 6, 2025 · 5 comments
Closed

[Bug report] UI should allow hyphen in fileset name #6399

mchades opened this issue Feb 6, 2025 · 5 comments
Assignees
Labels
0.8.1 0.9.0 Release v0.9.0 bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@mchades
Copy link
Contributor

mchades commented Feb 6, 2025

Version

main branch

Describe what's wrong

hyphen is allowed in the name spec:

/**
* Regular expression explanation:
*
* <p>^\w - Starts with a letter, digit, or underscore
*
* <p>[\w/=-]{0,63} - Followed by 0 to 63 characters (making the total length at most 64) of
* letters (both cases), digits, underscores, slashes, hyphens, or equals signs
*
* <p>$ - End of the string
*/
private static final String DEFAULT_NAME_PATTERN = "^\\w[\\w/=-]{0,63}$";

Error message and/or stacktrace

Image

How to reproduce

create a fileset by UI

Additional context

No response

@mchades mchades added the bug Something isn't working label Feb 6, 2025
@mchades
Copy link
Contributor Author

mchades commented Feb 6, 2025

@LauraXia123 cc

@jerryshao jerryshao added good first issue Good for newcomers help wanted Extra attention is needed labels Feb 6, 2025
@LauraXia123
Copy link
Collaborator

@mchades only fileset name or all the catalog name?

@mchades
Copy link
Contributor Author

mchades commented Feb 12, 2025

only fileset name or all the catalog name?

all catalogs, you can test by API

jerryshao pushed a commit that referenced this issue Feb 24, 2025
### What changes were proposed in this pull request?

The validation schema for the `key` field within the `propItems` array
was modified to allow hyphens in file names. The regular expression for
the `key` was updated to:

```js
/^[a-zA-Z_][a-zA-Z0-9_-]*$/
```
### Why are the changes needed?
Fix: issue #6399
The UI was incorrectly rejecting file names containing hyphens when
creating a fileset, even though hyphens were allowed in the name
specification. The changes ensure that hyphens are properly validated as
part of the file name.

### Does this PR introduce any user-facing change?
Yes, this PR allows users to use hyphens in file names when creating a
files

### How was this patch tested?
The changes were tested by creating filesets with hyphens in the names
via the UI, ensuring they were accepted correctly.

---------

Co-authored-by: Qian Xia <[email protected]>
github-actions bot pushed a commit that referenced this issue Feb 24, 2025
### What changes were proposed in this pull request?

The validation schema for the `key` field within the `propItems` array
was modified to allow hyphens in file names. The regular expression for
the `key` was updated to:

```js
/^[a-zA-Z_][a-zA-Z0-9_-]*$/
```
### Why are the changes needed?
Fix: issue #6399
The UI was incorrectly rejecting file names containing hyphens when
creating a fileset, even though hyphens were allowed in the name
specification. The changes ensure that hyphens are properly validated as
part of the file name.

### Does this PR introduce any user-facing change?
Yes, this PR allows users to use hyphens in file names when creating a
files

### How was this patch tested?
The changes were tested by creating filesets with hyphens in the names
via the UI, ensuring they were accepted correctly.

---------

Co-authored-by: Qian Xia <[email protected]>
@jerryshao jerryshao added 0.9.0 Release v0.9.0 0.8.1 labels Feb 24, 2025
@jerryshao
Copy link
Contributor

@Pranaykarvi can you please leave a message here, so that I can assign the issue to you?

@Pranaykarvi
Copy link
Contributor

@Pranaykarvi can you please leave a message here, so that I can assign the issue to you?
@jerryshao Sure!

jerryshao pushed a commit that referenced this issue Feb 24, 2025
### What changes were proposed in this pull request?

The validation schema for the `key` field within the `propItems` array
was modified to allow hyphens in file names. The regular expression for
the `key` was updated to:

```js
/^[a-zA-Z_][a-zA-Z0-9_-]*$/
```
### Why are the changes needed?
Fix: issue #6399
The UI was incorrectly rejecting file names containing hyphens when
creating a fileset, even though hyphens were allowed in the name
specification. The changes ensure that hyphens are properly validated as
part of the file name.

### Does this PR introduce any user-facing change?
Yes, this PR allows users to use hyphens in file names when creating a
files

### How was this patch tested?
The changes were tested by creating filesets with hyphens in the names
via the UI, ensuring they were accepted correctly.

Co-authored-by: Pranay Kumar Karvi <[email protected]>
Co-authored-by: Qian Xia <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.8.1 0.9.0 Release v0.9.0 bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants