Skip to content

Commit

Permalink
Merge pull request #4 from ajygupta/point-in-time
Browse files Browse the repository at this point in the history
Point in time
  • Loading branch information
bharath-techie authored Apr 10, 2023
2 parents 174756f + c54b96e commit ddd4c69
Show file tree
Hide file tree
Showing 36 changed files with 1,174 additions and 8 deletions.
72 changes: 71 additions & 1 deletion .github/workflows/build_and_test_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,78 @@ jobs:
path: ./artifacts/target/${{ env.ARTIFACT_BUILD_NAME }}
retention-days: 1

build-min-artifact-tests-windows:
runs-on: windows-latest
name: Build min release artifacts on Windows
defaults:
run:
working-directory: artifacts
strategy:
matrix:
include:
- name: Windows x64
ext: zip
suffix: windows-x64
script: build-platform --windows --skip-os-packages
steps:
- name: Configure git's autocrlf
run: |
git config --global core.autocrlf false
working-directory: .

- name: Checkout code
uses: actions/checkout@v3
with:
path: artifacts

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: 'artifacts/.nvmrc'
registry-url: 'https://registry.npmjs.org'

- name: Setup Yarn
run: |
npm uninstall -g yarn
npm i -g [email protected]
yarn config set network-timeout 1000000 -g
- name: Configure Yarn Cache
run: |
echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $env:GITHUB_ENV
echo C:\Program Files\Git\usr\bin>>"%GITHUB_PATH%"
- name: Initialize Yarn Cache
uses: actions/cache@v3
with:
path: ${{ env.YARN_CACHE_LOCATION }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-
- name: Get package version
run: |
echo "VERSION=$(yarn --silent pkg-version)" >> $env:GITHUB_ENV
- name: Get artifact build name
run: |
echo "ARTIFACT_BUILD_NAME=opensearch-dashboards-${{ env.VERSION }}-${{ matrix.suffix }}.${{ matrix.ext }}" >> $env:GITHUB_ENV
- name: Run bootstrap
run: yarn osd bootstrap

- name: Build `${{ matrix.name }}`
run: yarn ${{ matrix.script }} --release

- uses: actions/upload-artifact@v3
if: success()
with:
name: ${{ matrix.suffix }}-${{ env.VERSION }}
path: artifacts/target/${{ env.ARTIFACT_BUILD_NAME }}
retention-days: 1

bwc-tests:
needs: [build-min-artifact-tests]
needs: [build-min-artifact-tests-linux]
runs-on: ubuntu-latest
container:
image: docker://opensearchstaging/ci-runner:ci-runner-rockylinux8-opensearch-dashboards-integtest-v2
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- [Security] Bumps hapi/statehood to 7.0.4 ([#3411](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3411))
- [CVE-2023-25166] Bump formula to 3.0.1 ([#3416](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3416))
- [CVE-2023-25653] Bump node-jose to 2.2.0 ([#3445](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3445))
- [CVE-2023-26486][cve-2023-26487] Bump vega from 5.22.1 to 5.23.0 ([#3533](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3533))
- [CVE-2023-26486][CVE-2023-26487] Bump vega from 5.22.1 to 5.23.0 ([#3533](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3533))

### 📈 Features/Enhancements

Expand Down Expand Up @@ -63,6 +63,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- [Optimizer] Increase timeout waiting for the exiting of an optimizer worker ([#3193](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3193))
- [Data] Update `createAggConfig` so that newly created configs can be added to beginning of `aggConfig` array ([#3160](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3160))
- Add disablePrototypePoisoningProtection configuration to prevent JS client from erroring when cluster utilizes JS reserved words ([#2992](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2992))
- [Point in TIme] Add management plugin shell and empty state ([#2813](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2813))
- [Multiple DataSource] Add support for SigV4 authentication ([#3058](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3058))
- Make build scripts find and use the latest version of Node.js that satisfies `engines.node` ([#3467](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3467))
- [Multiple DataSource] Refactor test connection to support SigV4 auth type ([#3456](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3456))
Expand Down
1 change: 0 additions & 1 deletion DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ By default, the snapshot command will run [a minimal distribution of OpenSearch]
If you would like to run OpenSearch with a particular plugin installed on the cluster snapshot, pass the `--P` flag after `yarn opensearch snapshot`. You can use the flag multiple times to install multiple plugins. The argument value can be a URL to the plugin's zip file, maven coordinates of the plugin, or a local zip file path (use `file://` followed by the absolute or relative path, in that case). For example:

_(Linux, Windows, Darwin (MacOS) only - for others, you'll need to [run OpenSearch from a tarball](#alternative---run-opensearch-from-tarball) instead)_

```bash
$ yarn opensearch snapshot --P https://repo1.maven.org/maven2/org/opensearch/plugin/opensearch-test-plugin/2.4.0.0/opensearch-test-plugin-2.4.0.0.zip
```
Expand Down
13 changes: 9 additions & 4 deletions config/opensearch_dashboards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,14 @@

# Set the value of this setting to true to enable the experimental multiple data source
# support feature. Use with caution.
#data_source.enabled: false
data_source.enabled: false
# Set the value of these settings to customize crypto materials to encryption saved credentials
# in data sources.
#data_source.encryption.wrappingKeyName: 'changeme'
#data_source.encryption.wrappingKeyNamespace: 'changeme'
#data_source.encryption.wrappingKey: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
data_source.encryption.wrappingKeyName: 'changeme'
data_source.encryption.wrappingKeyNamespace: 'changeme'
data_source.encryption.wrappingKey: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
pit.enabled: true
opensearch.hosts: ["http://localhost:9200"]
opensearch.username: "admin" # Default username on the docker image
opensearch.password: "admin" # Default password on the docker image
opensearch.ssl.verificationMode: none
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"@hapi/podium": "^4.1.3",
"@hapi/vision": "^6.1.0",
"@hapi/wreck": "^17.1.0",
"@opensearch-project/opensearch": "^2.1.0",
"@opensearch-project/opensearch": "^2.2.0",
"@osd/ace": "1.0.0",
"@osd/analytics": "1.0.0",
"@osd/apm-config-loader": "1.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ opensearch_dashboards_vars=(
data_source.audit.appender.layout.kind
data_source.audit.appender.layout.highlight
data_source.audit.appender.layout.pattern
pit.enabled
)

longopts=''
Expand Down
18 changes: 18 additions & 0 deletions src/plugins/point_in_time_management/opensearch_dashboards.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"id": "pit",
"version": "1.0.0",
"opensearchDashboardsVersion": "opensearchDashboards",
"server": true,
"ui": true,
"requiredPlugins": [
"navigation",
"management",
"data"
],
"optionalPlugins": [
"dataSource"
],
"requiredBundles": [
"opensearchDashboardsReact"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

import { i18n } from '@osd/i18n';

export function getListBreadcrumbs() {
return [
{
text: i18n.translate('pitManagement.listBreadcrumb', {
defaultMessage: 'Point in time',
}),
href: `/`,
},
];
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

import React from 'react';
import { EmptyState } from './empty_state';
import { shallow } from 'enzyme';

describe('EmptyState', () => {
it('should render normally', () => {
const component = shallow(<EmptyState />);

expect(component).toMatchSnapshot();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

import React from 'react';
import { FormattedMessage } from '@osd/i18n/react';
import {
EuiPageContentHeader,
EuiPageContentHeaderSection,
EuiTitle,
EuiPageContent,
EuiSpacer,
EuiText,
EuiPageContentBody,
EuiFlexItem,
EuiFlexGroup,
EuiButton,
} from '@elastic/eui';

export const EmptyState = () => {
return (
<>
<EuiPageContent
className="pitEmptyState"
grow={false}
style={{ minHeight: '70vh' }}
horizontalPosition="center"
data-test-subj="pointInTimeEmptyState"
>
<EuiPageContentHeader>
<EuiPageContentHeaderSection>
<EuiTitle>
<h1>
<FormattedMessage
id="pointInTimeManagement.header.pointInTimeTitle"
defaultMessage="Point in Time"
/>
</h1>
</EuiTitle>
</EuiPageContentHeaderSection>
<EuiButton fill={true} iconType="plusInCircle" data-test-subj="createPITBtnInHeader">
<FormattedMessage
id="pointInTimeManagement.header.createPointInTimeButton"
defaultMessage="Create point in time"
/>
</EuiButton>
</EuiPageContentHeader>
<EuiText size="s">
<p>
<FormattedMessage
id="pointInTimeManagement.pointInTimeDescription"
defaultMessage="Create and manage point in time objects to help you retrieve data from OpenSearch."
/>
</p>
</EuiText>
<EuiSpacer size="m" />
<EuiPageContentBody>
<EuiFlexGroup
style={{ minHeight: '50vh' }}
alignItems="center"
justifyContent="center"
direction="column"
>
<EuiFlexItem grow={false}>No point in time objects have been created yet.</EuiFlexItem>
<EuiSpacer />
<EuiButton data-test-subj="createPITBtnInBody">
<FormattedMessage
id="pointInTimeManagement.createPointInTimeButton"
defaultMessage="Create point in time"
/>
</EuiButton>
</EuiFlexGroup>
</EuiPageContentBody>
</EuiPageContent>
</>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

export { EmptyState } from './empty_state';
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

export { PITTableWithRouter } from './pit_table';
Loading

0 comments on commit ddd4c69

Please sign in to comment.