-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fix/entity name validation v2 #27886
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
Open
jaya6400
wants to merge
16
commits into
open-metadata:main
Choose a base branch
from
jaya6400:fix/entity-name-validation-v2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 11 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
d3a1abc
fix: update test assertion and EntityCsv string to match updated enti…
jaya6400 3dfaab2
fix: correct EntityCsv contains() string escaping for name validation…
jaya6400 d5c9c07
fix: convert CRLF to LF in ValidatorUtilTest.java
jaya6400 89d0cd3
fix(validation): reject reserved FQN characters in entity and column …
jaya6400 fcfc2a6
fix(validation): also block control characters in entity name pattern
jaya6400 ea38aad
fix(validation): extend entity name validation to cover additional sc…
jaya6400 d89fdff
fix(validation): add < and | to columnName pattern in table.json
jaya6400 dabd075
fix(lint): disable no-control-regex for intentional control char rang…
jaya6400 4e03649
fix(tests): add integration tests for entity name validation with res…
jaya6400 eebb577
fix(validation): add minLength:1 to pipeline task name and apply spot…
jaya6400 36d5ae3
fix: fix line endings and formatting in PipelineValidation spec
jaya6400 08cd15d
fix: add pipe character test case and clarify regex comment
jaya6400 88a756e
Merge branch 'main' into fix/entity-name-validation-v2
aniketkatkar97 7ca1365
style: apply spotless formatting
jaya6400 cfe03d4
fix(search): index classification display name for tags
jaya6400 1f1d3c0
fix(validation): use pydantic-compatible entity name pattern:
jaya6400 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
88 changes: 88 additions & 0 deletions
88
openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/PipelineValidation.spec.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| /* | ||
| * Copyright 2026 Collate. | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| import { expect, test, type APIRequestContext } from '@playwright/test'; | ||
| import { getDefaultAdminAPIContext, uuid } from '../../utils/common'; | ||
|
|
||
| test.use({ storageState: 'playwright/.auth/admin.json' }); | ||
|
|
||
| test.describe('Pipeline entity name validation', () => { | ||
| let apiContext: APIRequestContext; | ||
| let afterAction: () => Promise<void>; | ||
| let serviceFqn = ''; | ||
|
|
||
| test.beforeAll(async ({ browser }) => { | ||
| const response = await getDefaultAdminAPIContext(browser); | ||
| apiContext = response.apiContext; | ||
| afterAction = response.afterAction; | ||
|
|
||
| const serviceName = `pw-pipeline-validation-service-${uuid()}`; | ||
| const serviceResponse = await apiContext.post( | ||
| '/api/v1/services/pipelineServices', | ||
| { | ||
| data: { | ||
| name: serviceName, | ||
| serviceType: 'Dagster', | ||
| connection: { | ||
| config: { | ||
| type: 'Dagster', | ||
| host: 'admin', | ||
| token: 'admin', | ||
| timeout: '1000', | ||
| supportsMetadataExtraction: true, | ||
| }, | ||
| }, | ||
| }, | ||
| } | ||
| ); | ||
|
|
||
| expect(serviceResponse.status()).toBe(201); | ||
| const serviceData = await serviceResponse.json(); | ||
| serviceFqn = serviceData.fullyQualifiedName; | ||
| }); | ||
|
|
||
| test.afterAll(async () => { | ||
| if (serviceFqn) { | ||
| await apiContext.delete( | ||
| `/api/v1/services/pipelineServices/name/${encodeURIComponent( | ||
| serviceFqn | ||
| )}?recursive=true&hardDelete=true` | ||
| ); | ||
| } | ||
| await afterAction(); | ||
| }); | ||
|
|
||
| test('should reject pipeline creation when task name is empty', async () => { | ||
| const response = await apiContext.post('/api/v1/pipelines', { | ||
| data: { | ||
| name: `pw-pipeline-empty-task-${uuid()}`, | ||
| service: serviceFqn, | ||
| tasks: [{ name: '' }], | ||
| }, | ||
| }); | ||
|
|
||
| expect(response.status()).toBe(400); | ||
| }); | ||
|
|
||
| test('should reject pipeline creation when task name contains reserved FQN characters', async () => { | ||
| const response = await apiContext.post('/api/v1/pipelines', { | ||
| data: { | ||
| name: `pw-pipeline-invalid-task-${uuid()}`, | ||
| service: serviceFqn, | ||
| tasks: [{ name: 'task<invalid' }], | ||
| }, | ||
| }); | ||
|
|
||
| expect(response.status()).toBe(400); | ||
| }); | ||
| }); |
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.