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

Fix issue when bootstrapping on 2.x #7901

Merged
merged 2 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/fragments/7901.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- Fix bootstrap errors in 2.x ([#7901](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7901))
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ describe('OpenSearchConfigStoreClient', () => {
hits: mockHits.map((hit) => ({
_index: getDynamicConfigIndexName(1),
_id: JSON.stringify(hit),
_version: 1,
_source: hit,
})),
},
Expand Down Expand Up @@ -299,6 +300,11 @@ describe('OpenSearchConfigStoreClient', () => {
{
create: {
_id: itemId,
_index: DYNAMIC_APP_CONFIG_ALIAS,
retry_on_conflict: 2,
routing: '',
version: 1,
version_type: 'external',
},
},
{
Expand All @@ -314,6 +320,11 @@ describe('OpenSearchConfigStoreClient', () => {
{
update: {
_id: JSON.stringify(configDocument),
_index: DYNAMIC_APP_CONFIG_ALIAS,
retry_on_conflict: 2,
routing: '',
version: 2,
version_type: 'external',
},
},
{
Expand Down Expand Up @@ -483,6 +494,11 @@ describe('OpenSearchConfigStoreClient', () => {
{
update: {
_id: JSON.stringify(oldConfig),
_index: DYNAMIC_APP_CONFIG_ALIAS,
retry_on_conflict: 2,
routing: '',
version: 2,
version_type: 'external',
},
},
{
Expand All @@ -503,6 +519,11 @@ describe('OpenSearchConfigStoreClient', () => {
{
create: {
_id: JSON.stringify(config),
_index: DYNAMIC_APP_CONFIG_ALIAS,
retry_on_conflict: 2,
routing: '',
version: 1,
version_type: 'external',
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,11 @@ export class OpenSearchConfigStoreClient implements IDynamicConfigStoreClient {
{
update: {
_id: config._id,
_index: DYNAMIC_APP_CONFIG_ALIAS,
retry_on_conflict: 2,
routing: '',
version: config._version! + 1,
version_type: 'external',
},
},
{
Expand Down Expand Up @@ -267,6 +272,11 @@ export class OpenSearchConfigStoreClient implements IDynamicConfigStoreClient {
{
create: {
_id: uniqueId(),
_index: DYNAMIC_APP_CONFIG_ALIAS,
retry_on_conflict: 2,
routing: '',
version: 1,
version_type: 'external',
},
},
newConfigDocument
Expand Down
Loading