Skip to content

Commit

Permalink
Merge branch 'main' into AddUpdatedAtColumnToObjectsTables
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwin-pc committed Sep 17, 2022
2 parents d5ba653 + b5d529a commit 7580cec
Show file tree
Hide file tree
Showing 479 changed files with 22,434 additions and 6,738 deletions.
27 changes: 22 additions & 5 deletions .github/workflows/build_and_test_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@

name: Build and test

# trigger on every commit push and PR for all branches except feature branches
# trigger on every commit push and PR for all branches except feature branches and pushes for backport branches
on:
push:
branches: [ '**', '!feature/**' ]
branches: [ '**', '!feature/**', '!backport/**' ]
paths-ignore:
- '**/*.md'
pull_request:
branches: [ '**', '!feature/**' ]
paths-ignore:
- '**/*.md'

env:
TEST_BROWSER_HEADLESS: 1
Expand Down Expand Up @@ -75,7 +79,7 @@ jobs:
name: Run functional tests
strategy:
matrix:
group: [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ]
group: [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 ]
steps:
- run: echo Running functional tests for ciGroup${{ matrix.group }}

Expand Down Expand Up @@ -182,7 +186,7 @@ jobs:
working-directory: ./artifacts
strategy:
matrix:
version: [ osd-2.0.0 ]
version: [ osd-2.0.0, osd-2.1.0, osd-2.2.0 ]
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand Down Expand Up @@ -221,6 +225,10 @@ jobs:
- name: Skipping tests
if: steps.verify-opensearch-exists.outputs.version-exists != 'true'
run: echo Tests were skipped because an OpenSearch release build does not exist for this version yet!

- name: Setting environment variable to run tests for ${{ matrix.version }}
if: steps.verify-opensearch-exists.outputs.version-exists == 'true'
run: echo "BWC_VERSIONS=${{ matrix.version }}" >> $GITHUB_ENV

- name: Download OpenSearch Dashboards
uses: actions/download-artifact@v3
Expand All @@ -233,4 +241,13 @@ jobs:
- name: Run tests
if: steps.verify-opensearch-exists.outputs.version-exists == 'true'
run: |
./bwctest.sh -s false -o ${{ env.OPENSEARCH_URL }} -d ${{ steps.download.outputs.download-path }}/opensearch-dashboards-${{ env.VERSION }}-linux-x64.tar.gz
./bwctest.sh -s false -o ${{ env.OPENSEARCH_URL }} -d ${{ steps.download.outputs.download-path }}/opensearch-dashboards-${{ env.VERSION }}-linux-x64.tar.gz
- uses: actions/upload-artifact@v3
if: ${{ failure() && steps.verify-opensearch-exists.outputs.version-exists == 'true' }}
with:
name: ${{ matrix.version }}-test-failures
path: |
./artifacts/bwc_tmp/test/cypress/videos/without-security/*
./artifacts/bwc_tmp/test/cypress/screenshots/without-security/*
retention-days: 1
2 changes: 1 addition & 1 deletion .github/workflows/create_doc_issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
with:
title: Add documentation related to new feature
content-filepath: ./.github/doc_issue_template.md
labels: documentation
labels: dashboards
repository: opensearch-project/documentation-website
token: ${{ steps.github_app_token.outputs.token }}

Expand Down
1 change: 1 addition & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"interpreter": "src/legacy/core_plugins/interpreter",
"osd": "src/legacy/core_plugins/opensearch-dashboards",
"osdDocViews": "src/legacy/core_plugins/osd_doc_views",
"osdDocViewsLinks": "src/legacy/core_plugins/osd_doc_views_links",
"management": [
"src/legacy/core_plugins/management",
"src/plugins/management"
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.19.1
14.20.0
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.19.1
14.20.0
29 changes: 4 additions & 25 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,4 @@

This code of conduct applies to all spaces provided by the OpenSource project including in code, documentation, issue trackers, mailing lists, chat channels, wikis, blogs, social media and any other communication channels used by the project.


**Our open source communities endeavor to:**

* Be Inclusive: We are committed to being a community where everyone can join and contribute. This means using inclusive and welcoming language.
* Be Welcoming: We are committed to maintaining a safe space for everyone to be able to contribute.
* Be Respectful: We are committed to encouraging differing viewpoints, accepting constructive criticism and work collaboratively towards decisions that help the project grow. Disrespectful and unacceptable behavior will not be tolerated.
* Be Collaborative: We are committed to supporting what is best for our community and users. When we build anything for the benefit of the project, we should document the work we do and communicate to others on how this affects their work.


**Our Responsibility. As contributors, members, or bystanders we each individually have the responsibility to behave professionally and respectfully at all times. Disrespectful and unacceptable behaviors include, but are not limited to:**

* The use of violent threats, abusive, discriminatory, or derogatory language;
* Offensive comments related to gender, gender identity and expression, sexual orientation, disability, mental illness, race, political or religious affiliation;
* Posting of sexually explicit or violent content;
* The use of sexualized language and unwelcome sexual attention or advances;
* Public or private harassment of any kind;
* Publishing private information, such as physical or electronic address, without permission;
* Other conduct which could reasonably be considered inappropriate in a professional setting;
* Advocating for or encouraging any of the above behaviors.
* Enforcement and Reporting Code of Conduct Issues:

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported. [Contact us](mailto:opensource-codeofconduct@amazon.com). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.
## Code of Conduct
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
opensource-codeofconduct@amazon.com with any additional questions or comments.
4 changes: 2 additions & 2 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,8 @@ variable can’t be null has changed (potentially even due to changes in compelt
assertion would now wrongly disable proper type checking for us.
If you’re not using non-null assertions in your plugin or are starting a new plugin, consider enabling the
[`@typescript-eslint/no-non-null-assertion`](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-non-null-assertion.md)
linting rule for you plugin in the [`.eslintrc.js`](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/master/.eslintrc.js) config.
[`@typescript-eslint/no-non-null-assertion`](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-non-null-assertion.md)
linting rule for you plugin in the [`.eslintrc.js`](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/.eslintrc.js) config.
### Return/throw early from functions
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG NODE_VERSION=14.19.1
ARG NODE_VERSION=14.20.0
FROM node:${NODE_VERSION} AS base

ENV HOME '.'
Expand Down
1 change: 1 addition & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def functionalDynamicParallelSteps(image){
"ciGroup10",
"ciGroup11",
"ciGroup12",
"ciGroup13",
]
for (int i = 0; i < ciGroups.size(); i++) {
def currentCiGroup = ciGroups[i];
Expand Down
19 changes: 17 additions & 2 deletions TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ In general, we recommend four tiers of tests:

# Requirements
* Install the latest NodeJS, [NPM](https://www.npmjs.com/get-npm) and [Yarn](https://classic.yarnpkg.com/en/docs/install/#mac-stable)
* `nvm install v14.19.1`
* `nvm install v14.20.0`
* `npm install -g yarn`

# Running tests
Expand All @@ -50,7 +50,7 @@ To run specific functional tests, you can run by CI group:

To debug functional tests:
Say that you would want to debug a test in CI group 1, you can run the following command in your environment:
`node --debug-brk --inspect scripts/functional_tests.js --config test/functional/config.js --include ciGroup1 --debug`
`node --inspect-brk --inspect scripts/functional_tests.js --config test/functional/config.js --include ciGroup1 --debug`

This will print off an address, to which you could open your chrome browser on your instance and navigate to `chrome://inspect/#devices` and inspect the functional test runner `scripts/functional_tests.js`.

Expand Down Expand Up @@ -89,9 +89,24 @@ Automated testing is provided with Jenkins for Continuous Integration. Jenkins e
Selenium tests are run in headless mode on CI. Locally the same tests will be executed in a real browser. You can activate headless mode by setting the environment variable:
`export TEST_BROWSER_HEADLESS=1`

Since local Selenium tests are run in a real browser, the dev environment should have a desktop environment and Google Chrome or Chromium installed to run the tests.

By default the version of OpenSearch Dashboards will pull the snapshot of the same version of OpenSearch if available while running a few integration tests and for running functional tests. However, if the version of OpenSearch Dashboards is not available, you can build OpenSearch locally and point the functional test runner to the executable with:
`export TEST_OPENSEARCH_FROM=[local directory of OpenSearch executable]`

Selinium tests require a chromedriver and a corresponding version of chrome to run properly. Depending on the version of chromedriver used, you may need to use a version of Google Chrome that is not the latest version. You can do this by running:

```sh
# Enter the version of chrome that you want to install
CHROME_VERSION=100.0.4896.127-1

# Download Chrome to a temp directory
curl -sSL "https://dl.google.com/linux/linux_signing_key.pub" | sudo apt-key add - && wget -O /tmp/chrome.deb "https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb"

# Install/Downgrade Chrome
sudo apt-get install -y --allow-downgrades /tmp/chrome.deb
```

# Misc
Although Jest is the standard for this project, there are a few Mocha tests that still exist. You can run these tests by running:
`yarn test:mocha`
Expand Down
2 changes: 1 addition & 1 deletion bwctest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

set -e

DEFAULT_VERSIONS="osd-2.0.0,"
DEFAULT_VERSIONS="osd-2.0.0,osd-2.1.0,osd-2.2.0"

function usage() {
echo ""
Expand Down
50 changes: 45 additions & 5 deletions config/opensearch_dashboards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@
# This node attribute should assign all nodes of the same cluster an integer value that increments with each new cluster that is spun up
# e.g. in opensearch.yml file you would set the value to a setting using node.attr.cluster_id:
# Should only be enabled if there is a corresponding node attribute created in your OpenSearch config that matches the value here
#opensearch.optimizedHealthcheckId: "cluster_id"
#opensearch.optimizedHealthcheck.id: "cluster_id"
#opensearch.optimizedHealthcheck.filters: {
# attribute_key: "attribute_value",
#}

# If your OpenSearch is protected with basic authentication, these settings provide
# the username and password that the OpenSearch Dashboards server uses to perform maintenance on the OpenSearch Dashboards
Expand Down Expand Up @@ -131,8 +134,9 @@
# Set the allowlist to check input graphite Url. Allowlist is the default check list.
#vis_type_timeline.graphiteAllowedUrls: ['https://www.hostedgraphite.com/UID/ACCESS_KEY/graphite']

# Set the blocklist to check input graphite Url. Blocklist is an IP list.
# Set the denylist to check input graphite Url. Denylist is an IP list.
# Below is an example for reference

# vis_type_timeline.graphiteBlockedIPs: [
# //Loopback
# '127.0.0.0/8',
Expand Down Expand Up @@ -161,7 +165,37 @@
# '2001:db8::/32',
# 'ff00::/8',
# ]
#vis_type_timeline.graphiteBlockedIPs: []

# vis_type_timeline.graphiteDeniedIPs: []

# vis_type_timeline.graphiteDeniedIPs: [
# //Loopback
# '127.0.0.0/8',
# '::1/128',
# //Link-local Address for IPv6
# 'fe80::/10',
# //Private IP address for IPv4
# '10.0.0.0/8',
# '172.16.0.0/12',
# '192.168.0.0/16',
# //Unique local address (ULA)
# 'fc00::/7',
# //Reserved IP address
# '0.0.0.0/8',
# '100.64.0.0/10',
# '192.0.0.0/24',
# '192.0.2.0/24',
# '198.18.0.0/15',
# '192.88.99.0/24',
# '198.51.100.0/24',
# '203.0.113.0/24',
# '224.0.0.0/4',
# '240.0.0.0/4',
# '255.255.255.255/32',
# '::/128',
# '2001:db8::/32',
# 'ff00::/8',
# ]

# opensearchDashboards.branding:
# logo:
Expand All @@ -175,11 +209,17 @@
# darkModeUrl: ""
# faviconUrl: ""
# applicationTitle: ""
# useExpandedHeader: false

# Set the value of this setting to true to capture region blocked warnings and errors
# Set the value of this setting to true to capture region denied warnings and errors
# for your map rendering services.
# map.showRegionBlockedWarning: false

# map.showRegionDeniedWarning: false

# Set the value of this setting to false to suppress search usage telemetry
# for reducing the load of OpenSearch cluster.
# data.search.usageTelemetry.enabled: false

# Set the value of this setting to true to start exploring wizard
# functionality in Visualization.
# wizard.enabled: false
4 changes: 3 additions & 1 deletion cypress/integration/with-security/check_filter_and_query.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import {
const miscUtils = new MiscUtils(cy);
const commonUI = new CommonUI(cy);
const loginPage = new LoginPage(cy);
const startDate = 'Nov 1, 2016 @ 00:00:00.000';
const endDate = `Dec 31, ${new Date().getFullYear()} @ 00:00:00.000`;

describe('check dashboards filter and query', () => {
beforeEach(() => {
Expand Down Expand Up @@ -66,7 +68,7 @@ describe('check dashboards filter and query', () => {
.find('[class="osdSavedQueryListItem__labelText"]')
.should('have.text', 'test-query')
.click();
commonUI.setDateRange('Dec 1, 2021 @ 00:00:00.000', 'Jan 1, 2021 @ 00:00:00.000');
commonUI.setDateRange(endDate, startDate);

//[Logs] vistor chart should show osx 100%
cy.get('[data-title="[Logs] Visitors by OS"]')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import {

const miscUtils = new MiscUtils(cy);
const commonUI = new CommonUI(cy);
const startDate = 'Nov 1, 2016 @ 00:00:00.000';
const endDate = `Dec 31, ${new Date().getFullYear()} @ 00:00:00.000`;

describe('check dashboards filter and query', () => {
beforeEach(() => {
Expand Down Expand Up @@ -56,7 +58,7 @@ describe('check dashboards filter and query', () => {
.find('[class="osdSavedQueryListItem__labelText"]')
.should('have.text', 'test-query')
.click();
commonUI.setDateRange('Dec 1, 2021 @ 00:00:00.000', 'Jan 1, 2021 @ 00:00:00.000');
commonUI.setDateRange(endDate, startDate);

//[Logs] vistor chart should show osx 100%
cy.get('[data-title="[Logs] Visitors by OS"]')
Expand Down
Binary file added cypress/test-data/with-security/osd-2.1.0.tar.gz
Binary file not shown.
Binary file added cypress/test-data/with-security/osd-2.2.0.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/bfetch_explorer/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export class BfetchExplorerPlugin implements Plugin {
{
label: 'README',
href:
'https://github.com/opensearch-project/OpenSearch-Dashboards/blob/master/src/plugins/bfetch/README.md',
'https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/src/plugins/bfetch/README.md',
iconType: 'logoGithub',
size: 's',
target: '_blank',
Expand Down
2 changes: 1 addition & 1 deletion examples/developer_examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ services. Add your a link to your example using the developerExamples `register`
links: [
{
label: 'README',
href: 'https://github.com/opensearch-project/OpenSearch-Dashboards/tree/master/src/plugins/foo/README.md',
href: 'https://github.com/opensearch-project/OpenSearch-Dashboards/tree/main/src/plugins/foo/README.md',
iconType: 'logoGithub',
target: '_blank',
size: 's',
Expand Down
2 changes: 1 addition & 1 deletion examples/embeddable_explorer/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class EmbeddableExplorerPlugin implements Plugin<void, void, {}, StartDep
{
label: 'README',
href:
'https://github.com/opensearch-project/OpenSearch-Dashboards/tree/master/src/plugins/embeddable/README.md',
'https://github.com/opensearch-project/OpenSearch-Dashboards/tree/main/src/plugins/embeddable/README.md',
iconType: 'logoGithub',
target: '_blank',
size: 's',
Expand Down
2 changes: 1 addition & 1 deletion examples/expressions_example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ An OpenSearch Dashboards example plugin to demonstrate the expressions plugin
## Development

See the [OpenSearch Dashboards contributing
guide](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/master/CONTRIBUTING.md) for instructions
guide](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/CONTRIBUTING.md) for instructions
setting up your development environment.
2 changes: 1 addition & 1 deletion examples/routing_example/public/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function RoutingExplorer({
{
label: 'Conventions',
href:
'https://github.com/opensearch-project/OpenSearch-Dashboards/tree/master/DEVELOPER_GUIDE.md#api-endpoints',
'https://github.com/opensearch-project/OpenSearch-Dashboards/tree/main/DEVELOPER_GUIDE.md#api-endpoints',
iconType: 'logoGithub',
target: '_blank',
size: 's',
Expand Down
2 changes: 1 addition & 1 deletion examples/search_examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

## Development

See the [opensearchDashboards contributing guide](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/master/CONTRIBUTING.md) for instructions setting up your development environment.
See the [opensearchDashboards contributing guide](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/CONTRIBUTING.md) for instructions setting up your development environment.
6 changes: 3 additions & 3 deletions examples/state_containers_examples/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class StateContainersExamplesPlugin implements Plugin {
{
label: 'README',
href:
'https://github.com/opensearch-project/OpenSearch-Dashboards/tree/master/src/plugins/opensearch_dashboards_utils/docs/state_containers/README.md',
'https://github.com/opensearch-project/OpenSearch-Dashboards/tree/main/src/plugins/opensearch_dashboards_utils/docs/state_containers/README.md',
iconType: 'logoGithub',
size: 's',
target: '_blank',
Expand All @@ -110,7 +110,7 @@ export class StateContainersExamplesPlugin implements Plugin {
{
label: 'README',
href:
'https://github.com/opensearch-project/OpenSearch-Dashboards/tree/master/src/plugins/opensearch_dashboards_utils/docs/state_containers/README.md',
'https://github.com/opensearch-project/OpenSearch-Dashboards/tree/main/src/plugins/opensearch_dashboards_utils/docs/state_containers/README.md',
iconType: 'logoGithub',
size: 's',
target: '_blank',
Expand All @@ -128,7 +128,7 @@ export class StateContainersExamplesPlugin implements Plugin {
{
label: 'README',
href:
'https://github.com/opensearch-project/OpenSearch-Dashboards/blob/master/src/plugins/data/public/query/state_sync/README.md',
'https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/src/plugins/data/public/query/state_sync/README.md',
iconType: 'logoGithub',
size: 's',
target: '_blank',
Expand Down
2 changes: 1 addition & 1 deletion examples/ui_actions_explorer/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export class UiActionsExplorerPlugin implements Plugin<void, void, {}, StartDeps
{
label: 'README',
href:
'https://github.com/opensearch-project/OpenSearch-Dashboards/blob/master/src/plugins/ui_actions/README.md',
'https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/src/plugins/ui_actions/README.md',
iconType: 'logoGithub',
size: 's',
target: '_blank',
Expand Down
Loading

0 comments on commit 7580cec

Please sign in to comment.