Skip to content

Commit

Permalink
Merge branch 'recent_assets' of github.com:Kapian1234/OpenSearch-Dash…
Browse files Browse the repository at this point in the history
…boards into recent_assets
  • Loading branch information
Kapian1234 committed Jan 9, 2025
2 parents 4d375a1 + d6ee2f1 commit bef66a3
Show file tree
Hide file tree
Showing 99 changed files with 5,530 additions and 963 deletions.
65 changes: 44 additions & 21 deletions .github/workflows/build_and_test_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,17 @@ jobs:
disk-root: 'C:'

- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup JDK (Windows only)
if: matrix.os == 'windows-latest'
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
Expand All @@ -88,7 +88,7 @@ jobs:
run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV

- name: Initialize Yarn Cache
uses: actions/cache@v3
uses: actions/cache@v4
if: matrix.os != 'windows-latest'
with:
path: ${{ env.YARN_CACHE_LOCATION }}
Expand Down Expand Up @@ -133,10 +133,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
Expand All @@ -151,7 +151,7 @@ jobs:
run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV

- name: Initialize Yarn Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ env.YARN_CACHE_LOCATION }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
Expand All @@ -161,6 +161,25 @@ jobs:
- name: Run bootstrap
run: yarn osd bootstrap

- name: Check for yarn.lock changes
run: |
if [[ `git status --porcelain yarn.lock` ]]; then
echo -e "\033[31mThe yarn.lock file is out of sync!\033[0m"
git diff
exit 1
fi
- name: Generate dev docs
run: yarn docs:generateDevDocs

- name: Check for dev docs changes
run: |
if [[ `git status --porcelain docs/_sidebar.md` ]]; then
echo -e "\033[31mThe dev docs are out of sync; run yarn docs:generateDevDocs and amend the PR.\033[0m"
git diff
exit 1
fi
- name: Run linter
id: linter
run: yarn lint
Expand All @@ -169,6 +188,10 @@ jobs:
id: notice-validate
run: yarn notice:validate

- name: Validate licenses
id: i18n-licenses
run: yarn checkLicenses

- name: Check i18n
id: i18n-check
run: yarn i18n:check
Expand Down Expand Up @@ -203,17 +226,17 @@ jobs:
disk-root: 'C:'

- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup JDK (Windows only)
if: matrix.os == 'windows-latest'
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
Expand All @@ -229,7 +252,7 @@ jobs:
run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV

- name: Initialize Yarn Cache
uses: actions/cache@v3
uses: actions/cache@v4
if: matrix.os != 'windows-latest'
with:
path: ${{ env.YARN_CACHE_LOCATION }}
Expand Down Expand Up @@ -319,17 +342,17 @@ jobs:
disk-root: 'C:'

- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup JDK (Windows only)
if: matrix.os == 'windows-latest'
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
Expand All @@ -345,7 +368,7 @@ jobs:
run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV

- name: Initialize Yarn Cache
uses: actions/cache@v3
uses: actions/cache@v4
if: matrix.os != 'windows-latest'
with:
path: ${{ env.YARN_CACHE_LOCATION }}
Expand Down Expand Up @@ -451,12 +474,12 @@ jobs:
disk-root: 'C:'

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

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: './artifacts/.nvmrc'
registry-url: 'https://registry.npmjs.org'
Expand All @@ -472,7 +495,7 @@ jobs:
run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV

- name: Initialize Yarn Cache
uses: actions/cache@v3
uses: actions/cache@v4
if: matrix.os != 'windows-latest'
with:
path: ${{ env.YARN_CACHE_LOCATION }}
Expand Down Expand Up @@ -540,15 +563,15 @@ jobs:
]
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ./artifacts

- run: echo Running backwards compatibility tests for version ${{ matrix.version }}
- run: echo [NOTE] These tests will be ran using Linux x64 release builds without security

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: './artifacts/.nvmrc'
registry-url: 'https://registry.npmjs.org'
Expand Down Expand Up @@ -583,7 +606,7 @@ jobs:
run: echo "BWC_VERSIONS=${{ matrix.version }}" >> $GITHUB_ENV

- name: Download OpenSearch Dashboards
uses: actions/download-artifact@v4.1.7
uses: actions/download-artifact@v4
id: download
with:
name: linux-x64-${{ env.VERSION }}
Expand Down
47 changes: 46 additions & 1 deletion DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,59 @@ $ yarn osd clean

### Run OpenSearch

OpenSearch Dashboards requires a running version of OpenSearch to connect to. In a separate terminal you can run the latest snapshot built using:
OpenSearch Dashboards requires a running version of OpenSearch to connect to. You can choose to run OpenSearch locally yourself or point to an existing cluster.

#### Run a local OpenSearch cluster

In a separate terminal you can run the latest snapshot built using:

_(Linux, Windows, Darwin (MacOS) only - for others, you'll need to [set up using Docker](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/docs/docker-dev/docker-dev-setup-manual.md) or [run OpenSearch from a tarball](#alternative---run-opensearch-from-tarball) instead)_

```bash
$ yarn opensearch snapshot
```

#### Alternative - Connect to an external OpenSearch cluster

Instead of running OpenSearch locally, you can point OpenSearch Dashboards to an existing OpenSearch cluster:

1. Clone the security dashboards plugin inside your OpenSearch Dashboards plugins folder and bootstrap:
```bash
$ cd plugins
$ git clone https://github.com/opensearch-project/security-dashboards-plugin.git
$ cd ..
$ yarn osd bootstrap --single-version=loose
```
2. Create a configuration directory outside your repository to avoid accidentally committing credentials. For example:
```bash
$ mkdir -p /configs/me
$ mkdir -p /configs/prod
```
3. Create `opensearch_dashboards.yml` file(s) in your config directories. Here's an example config:
```yaml
opensearch.hosts: ["https://your-opensearch-host"]
opensearch.username: 'admin'
opensearch.password: 'your-password'
opensearch.ignoreVersionMismatch: true
opensearch.ssl.verificationMode: none
opensearch.requestHeadersWhitelist: [authorization]
opensearch_security.multitenancy.enabled: false
opensearch_security.readonly_mode.roles: [kibana_read_only]
opensearch_security.cookie.secure: false
```
4. Set the `OSD_PATH_CONF` environment variable to point to your config directory:
```bash
$ export OSD_PATH_CONF=/absolute/path/to/configs/me
```

This approach allows you to:
- Develop against a production-like environment
- Avoid running resource-intensive local clusters
- Maintain different configurations for different environments
- Keep sensitive credentials out of your repository

Note: Make sure your OpenSearch cluster is accessible and credentials are valid before starting OpenSearch Dashboards.

### Run OpenSearch Dashboards

_**Warning:** Starting the OpenSearch Dashboards instance before the OpenSearch server is fully initialized can cause Dashboards to misbehave. Ensure that the OpenSearch server instance is up and running first. You can validate by running `curl localhost:9200` in another console tab or window (see [OpenSearch developer guide](https://github.com/opensearch-project/OpenSearch/blob/main/DEVELOPER_GUIDE.md#run-opensearch))._
Expand Down
2 changes: 2 additions & 0 deletions changelogs/fragments/8156.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- Fix the UI of recent assets in the header ([#8156](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8156))
2 changes: 2 additions & 0 deletions changelogs/fragments/8519.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- Adds badge when there are more than one workspaces and updates the icon ([#8519](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8519))
5 changes: 5 additions & 0 deletions changelogs/fragments/8837.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
fix:
- Fix a typo while inspecting values for large numerals in OSD and the JS client ([#8837](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8837))

feat:
- Add setting to turn extending numeric precision on or off ([#8837](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8837))
2 changes: 2 additions & 0 deletions changelogs/fragments/8838.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- [MDS] Fix showing DQS sources list in workspaces ([#8838](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8838))
2 changes: 2 additions & 0 deletions changelogs/fragments/9042.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
feat:
- Disable buttons in sample data cards for read-only users ([#9042](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/9042))
2 changes: 2 additions & 0 deletions changelogs/fragments/9058.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
chore:
- Update oui to 1.18 ([#9058](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/9058))
2 changes: 2 additions & 0 deletions changelogs/fragments/9059.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- Inactive manage link in the data source selector when opening DevTools ([#9059](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/9059))
9 changes: 9 additions & 0 deletions changelogs/fragments/9064.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
infra:
- Add checks for out of sync lockfile and dev docc to the CI ([#9064](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/9064))
- Validate the licensing imposed by dependencies during CI ([#9064](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/9064))

chore:
- Bump actions used by build and test workflows ([#9064](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/9064))

feat:
- Improve validation of the licensing imposed by dependencies. ([#9064](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/9064))
2 changes: 2 additions & 0 deletions changelogs/fragments/9065.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
refactor:
- Remove permission validation in workspace form ([#9065](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/9065))
2 changes: 2 additions & 0 deletions changelogs/fragments/9070.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
refactor:
- [Workspace] add missing method for workspace client interface ([#9070](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/9070))
2 changes: 2 additions & 0 deletions changelogs/fragments/9074.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
test:
- Query-enhancements testing utility updates and additions ([#9074](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/9074))
2 changes: 2 additions & 0 deletions changelogs/fragments/9080.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
doc:
- Update dev guide to connect to external cluster ([#9080](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/9080))
2 changes: 2 additions & 0 deletions changelogs/fragments/9082.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
test:
- Re-enable dataset_selector.spec.js under workspace in ciGroup10 ([#9082](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/9082))
2 changes: 2 additions & 0 deletions changelogs/fragments/9116.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- Hide collaborators page on nav when newHomePage is disabled ([#9116](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/9116))
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('No Index Pattern Check Test', () => {
describe('empty state', () => {
it('no index pattern', function () {
// Go to the Discover page
cy.waitForLoaderNewHeader();
cy.waitForLoader(true);
cy.getElementByTestId('discoverNoIndexPatterns');
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@

export const DATASOURCE_NAME = 'query-cluster';
export const WORKSPACE_NAME = 'query-workspace';
export const START_TIME = 'Jan 1, 2020 @ 00:00:00.000';
export const END_TIME = 'Jan 1, 2024 @ 00:00:00.000';
Loading

0 comments on commit bef66a3

Please sign in to comment.