-
Notifications
You must be signed in to change notification settings - Fork 918
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into workspace_filter
Signed-off-by: Hailong Cui <[email protected]>
- Loading branch information
Showing
105 changed files
with
3,162 additions
and
323 deletions.
There are no files selected for viewing
This file contains 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 was deleted.
Oops, something went wrong.
This file contains 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,23 @@ | ||
name: OpenSearch Changelog Workflow | ||
|
||
on: | ||
pull_request_target: | ||
types: [opened, reopened, edited] | ||
|
||
permissions: | ||
contents: read | ||
issues: write | ||
pull-requests: write | ||
|
||
jobs: | ||
update-changelog: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
- name: Parse changelog entries and submit request for changset creation | ||
uses: BigSamu/[email protected] | ||
with: | ||
token: ${{secrets.GITHUB_TOKEN}} | ||
CHANGELOG_PR_BRIDGE_URL_DOMAIN: ${{secrets.CHANGELOG_PR_BRIDGE_URL_DOMAIN}} | ||
CHANGELOG_PR_BRIDGE_API_KEY: ${{secrets.CHANGELOG_PR_BRIDGE_API_KEY}} |
This file contains 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 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,5 @@ | ||
# Changelog and Release Notes | ||
|
||
For information regarding the changelog and release notes process, please consult the README in the GitHub Actions repository that this process utilizes. To view this README, follow the link below: | ||
|
||
[GitHub Actions Workflow README](https://github.com/BigSamu/OpenSearch_Change_Set_Create_Action/blob/main/README.md) |
This file contains 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 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,8 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
require('../src/setup_node_env'); | ||
require('../src/dev/generate_release_note'); | ||
require('../src/dev/generate_release_note_helper'); |
This file contains 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 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 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
59 changes: 59 additions & 0 deletions
59
src/core/server/saved_objects/import/validate_object_id.test.ts
This file contains 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,59 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { isSavedObjectWithDataSource } from './validate_object_id'; | ||
|
||
describe('isObjectWithDataSource', () => { | ||
test('should return false for valid object with data source ID but in wrong format', () => { | ||
// Valid ID with two parts separated by underscore, and both parts being UUIDs | ||
const inValidId = 'invalid_uuid_1234-invalid_uuid_5678'; | ||
expect(isSavedObjectWithDataSource(inValidId)).toBe(false); | ||
}); | ||
|
||
test('should return false for invalid IDs', () => { | ||
// Missing underscore | ||
const invalidId1 = 'missingunderscore'; | ||
expect(isSavedObjectWithDataSource(invalidId1)).toBe(false); | ||
|
||
// Invalid UUID in the second part | ||
const invalidId2 = 'valid_uuid_1234-invalid_uuid'; | ||
expect(isSavedObjectWithDataSource(invalidId2)).toBe(false); | ||
|
||
// Missing second part | ||
const invalidId3 = 'valid_uuid_1234'; | ||
expect(isSavedObjectWithDataSource(invalidId3)).toBe(false); | ||
|
||
// More than two parts | ||
const invalidId4 = 'valid_uuid_1234-valid_uuid_5678-extra_part'; | ||
expect(isSavedObjectWithDataSource(invalidId4)).toBe(false); | ||
}); | ||
|
||
test('should return false for non-UUID parts', () => { | ||
// First part is not a UUID | ||
const invalidId1 = 'not_a_uuid_valid_uuid_1234'; | ||
expect(isSavedObjectWithDataSource(invalidId1)).toBe(false); | ||
|
||
// Second part is not a UUID | ||
const invalidId2 = 'valid_uuid_1234_not_a_uuid'; | ||
expect(isSavedObjectWithDataSource(invalidId2)).toBe(false); | ||
|
||
// Both parts are not UUIDs | ||
const invalidId3 = 'not_a_uuid_not_a_uuid'; | ||
expect(isSavedObjectWithDataSource(invalidId3)).toBe(false); | ||
}); | ||
|
||
test('should return false for string with underscore but not with UUID', () => { | ||
// First part is not a UUID | ||
const invalidId = 'saved_object_with_index_pattern_conflict'; | ||
expect(isSavedObjectWithDataSource(invalidId)).toBe(false); | ||
}); | ||
|
||
test('should return false for string with underscore but with three UUIDs', () => { | ||
// First part is not a UUID | ||
const invalidId = | ||
'7cbd2350-2223-11e8-b802-5bcf64c2cfb4_7cbd2350-2223-11e8-b802-5bcf64c2cfb4_7cbd2350-2223-11e8-b802-5bcf64c2cfb4'; | ||
expect(isSavedObjectWithDataSource(invalidId)).toBe(false); | ||
}); | ||
}); |
Oops, something went wrong.