Skip to content

Commit

Permalink
Merge branch 'main' into replace-table
Browse files Browse the repository at this point in the history
  • Loading branch information
ananzh committed Dec 24, 2022
2 parents 6894833 + 100a41a commit e313f68
Show file tree
Hide file tree
Showing 11 changed files with 102 additions and 641 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/build_and_test_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ jobs:
id: linter
run: yarn lint

- name: Validate NOTICE file
id: notice-validate
run: yarn notice:validate

- name: Run unit tests with coverage
id: unit-tests
run: yarn test:jest:ci:coverage
Expand Down Expand Up @@ -107,6 +111,10 @@ jobs:
id: linter
run: yarn lint

- name: Validate NOTICE file
id: notice-validate
run: yarn notice:validate

- name: Run unit tests with coverage
id: unit-tests
run: yarn test:jest:ci:coverage
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/changelog_verifier.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: "Changelog Verifier"
on:
pull_request:
branches: [ '**', '!feature/**' ]
types: [opened, edited, review_requested, synchronize, reopened, ready_for_review, labeled, unlabeled]

jobs:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,13 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Corrected README and help command of osd-plugin-helpers ([#2810](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2810))
- Add `current-usage.md` and more details to `README.md` of `charts` plugin ([#2695](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2695))
- [Doc] Add readme for global query persistence ([#3001](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3001))
- Updates NOTICE file, adds validation to GitHub CI ([#3051](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3051))

### 馃洜 Maintenance

- Adding @zhongnansu as maintainer. ([#2590](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2590))
- Removes `minimatch` manual resolution ([#3019](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3019))
- Remove `github-checks-reporter`, an unused dependency ([#3126](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3126))

### 馃獩 Refactoring

Expand Down
124 changes: 12 additions & 112 deletions NOTICE.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
OpenSearch
Copyright 2021 OpenSearch Contributors
This product includes software, including Kibana source code, developed by Elasticsearch (http://www.elastic.co).
Copyright 2012-2021 Elasticsearch B.V.
OpenSearch (https://opensearch.org/)
Copyright OpenSearch Contributors

This product includes software, including Kibana source code,
developed by Elasticsearch (http://www.elastic.co).
Copyright 2009-2018 Elasticsearch B.V.

This product includes software developed by The Apache Software
Foundation (http://www.apache.org/)

This product includes software developed by
Joda.org (http://www.joda.org/).
---
Pretty handling of logarithmic axes.
Copyright (c) 2007-2014 IOLA and Ole Laursen.
Expand Down Expand Up @@ -115,10 +123,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

---
This product uses Noto fonts that are licensed under the SIL Open
Font License, Version 1.1.

---
Based on the scroll-into-view-if-necessary module from npm
https://github.com/stipsan/compute-scroll-into-view/blob/master/src/index.ts#L269-L340
Expand All @@ -145,70 +149,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

---
Detection Rules
Copyright 2020 Elasticsearch B.V.

---
This product bundles rules based on https://github.com/BlueTeamLabs/sentinel-attack
which is available under a "MIT" license. The files based on this license are:

- defense_evasion_via_filter_manager
- discovery_process_discovery_via_tasklist_command
- persistence_priv_escalation_via_accessibility_features
- persistence_via_application_shimming
- defense_evasion_execution_via_trusted_developer_utilities

MIT License

Copyright (c) 2019 Edoardo Gerosa, Olaf Hartong

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

---
This product bundles rules based on https://github.com/FSecureLABS/leonidas
which is available under a "MIT" license. The files based on this license are:

- credential_access_secretsmanager_getsecretvalue.toml

MIT License

Copyright (c) 2020 F-Secure LABS

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

---
MIT License

Expand Down Expand Up @@ -306,43 +246,3 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

---
This product includes code in the function applyCubicBezierStyles that was
inspired by a public Codepen, which was available under a "MIT" license.

Copyright (c) 2020 by Guillaume (https://codepen.io/guillaumethomas/pen/xxbbBKO)
MIT License http://www.opensource.org/licenses/mit-license

---
This product includes code that is adapted from mapbox-gl-js, which is
available under a "BSD-3-Clause" license.
https://github.com/mapbox/mapbox-gl-js/blob/master/src/util/image.js

Copyright (c) 2016, Mapbox

All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of Mapbox GL JS nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
"test:ftr:server": "node scripts/functional_tests_server",
"test:ftr:runner": "node scripts/functional_test_runner",
"checkLicenses": "node scripts/check_licenses --dev",
"notice:validate": "node scripts/notice --validate",
"notice:generate": "node scripts/notice",
"build-platform": "node scripts/build",
"build": "node scripts/build --all-platforms",
"start": "node scripts/opensearch_dashboards --dev",
Expand Down Expand Up @@ -227,7 +229,6 @@
"@elastic/eslint-config-kibana": "0.15.0",
"@elastic/eslint-plugin-eui": "0.0.2",
"@elastic/filesaver": "1.1.2",
"@elastic/github-checks-reporter": "0.0.20b3",
"@elastic/makelogs": "^6.1.0",
"@microsoft/api-documenter": "^7.13.78",
"@microsoft/api-extractor": "^7.19.3",
Expand Down
2 changes: 1 addition & 1 deletion src/dev/build/tasks/notice_file_task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const CreateNoticeFile: Task = {
log.info('Generating notice from source');
log.indent(4);
const noticeFromSource = await generateNoticeFromSource({
productName: 'OpenSearch',
productName: 'OpenSearch (https://opensearch.org/)',
directory: build.resolvePath(),
log,
});
Expand Down
23 changes: 1 addition & 22 deletions src/dev/ci_setup/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,13 @@ yarn config set yarn-offline-mirror "$cacheDir/yarn-offline-cache"
yarnGlobalDir="$(yarn global bin)"
export PATH="$PATH:$yarnGlobalDir"

# TODO: Find out if these are OSD's or if this entire file should be removed
# use a proxy to fetch chromedriver/geckodriver asset
export GECKODRIVER_CDNURL="https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache"
export CHROMEDRIVER_CDNURL="https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache"
export RE2_DOWNLOAD_MIRROR="https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache"
export CYPRESS_DOWNLOAD_MIRROR="https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/cypress"

export CHECKS_REPORTER_ACTIVE=false

# This is mainly for release-manager builds, which run in an environment that doesn't have Chrome installed
if [[ "$(which google-chrome-stable)" || "$(which google-chrome)" ]]; then
echo "Chrome detected, setting DETECT_CHROMEDRIVER_VERSION=true"
Expand All @@ -143,26 +142,6 @@ else
echo "Chrome not detected, installing default chromedriver binary for the package version"
fi

### only run on pr jobs for opensearch-project/OpenSearch-Dashboards, checks-reporter doesn't work for other repos
if [[ "$ghprbPullId" && "$ghprbGhRepository" == 'opensearch-project/OpenSearch-Dashboards' ]] ; then
export CHECKS_REPORTER_ACTIVE=true
fi

###
### Implements github-checks-reporter kill switch when scripts are called from the command line
### $@ - all arguments
###
function checks-reporter-with-killswitch() {
if [ "$CHECKS_REPORTER_ACTIVE" == "true" ] ; then
yarn run github-checks-reporter "$@"
else
arguments=("$@");
"${arguments[@]:1}";
fi
}

export -f checks-reporter-with-killswitch

source "$OPENSEARCH_DASHBOARDS_DIR/src/dev/ci_setup/load_env_keys.sh"

OPENSEARCH_DIR="$WORKSPACE/opensearch"
Expand Down
2 changes: 1 addition & 1 deletion src/dev/notice/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ if (opts.help) {
(async function run() {
const path = resolve(REPO_ROOT, 'NOTICE.txt');
const newContent = await generateNoticeFromSource({
productName: 'OpenSearch Dashboards source code',
productName: 'OpenSearch (https://opensearch.org/)',
directory: REPO_ROOT,
log,
});
Expand Down
34 changes: 18 additions & 16 deletions src/dev/notice/generate_notice_from_source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ import { ToolingLog } from '@osd/dev-utils';

const NOTICE_COMMENT_RE = /\/\*[\s\n\*]*@notice([\w\W]+?)\*\//g;
const NEWLINE_RE = /\r?\n/g;
const NOTICE_TEXT = `Copyright OpenSearch Contributors
This product includes software, including Kibana source code,
developed by Elasticsearch (http://www.elastic.co).
Copyright 2009-2018 Elasticsearch B.V.
This product includes software developed by The Apache Software
Foundation (http://www.apache.org/)
This product includes software developed by
Joda.org (http://www.joda.org/).`;

interface Options {
/**
Expand Down Expand Up @@ -89,17 +100,10 @@ export async function generateNoticeFromSource({ productName, directory, log }:
.on('end', resolve);
});

let noticeText = '';
noticeText += `${productName}\n`;
noticeText += `Copyright ${new Date().getUTCFullYear()} OpenSearch Contributors\n\n`;
noticeText += `This product includes software developed by Elasticsearch (http://www.elastic.co).\n`;
noticeText += `Copyright 2009-2018 Elasticsearch\n\n`;
noticeText += `This product includes software developed by The Apache Software Foundation (http://www.apache.org/)\n\n`;
noticeText += `This product includes software developed by Joda.org (http://www.joda.org/).\n`;

let notice = `${productName}\n` + NOTICE_TEXT;
for (const comment of noticeComments.sort()) {
noticeText += '\n---\n';
noticeText += comment
notice += '\n---\n';
notice += comment
.split(NEWLINE_RE)
.map((line) =>
line
Expand All @@ -110,11 +114,9 @@ export async function generateNoticeFromSource({ productName, directory, log }:
)
.join('\n')
.trim();
noticeText += '\n';
notice += '\n';
}

noticeText += '\n';

log.debug(`notice text:\n\n${noticeText}`);
return noticeText;
notice += '\n';
log.debug(`notice text:\n\n${notice}`);
return notice;
}
Loading

0 comments on commit e313f68

Please sign in to comment.