From 1c4b92273a9991964805ec52a00fbbfa6a2c5c42 Mon Sep 17 00:00:00 2001 From: Tianli Feng Date: Wed, 17 Mar 2021 20:06:41 -0700 Subject: [PATCH] [DOCS] Merge 'main' into 'oss-docs' - after DCO check was added (#349) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [PURIFY] Remove x-pack directory Signed-off-by: Peter Nied * [PURIFY] Remove docs directory (#3) This commit removes the doc directory Signed-off-by: Peter Nied * Cleanup build-scan, remove publish scan to elastic server (#1) (#4) Co-authored-by: Huan Jiang Signed-off-by: Peter Nied * [PURIFY] remove all trace of x-pack eql (#5) This commit removes all trace of EQL from the sanitized fork. Signed-off-by: Peter Nied * [PURIFY] remove issue, pr tempalte to avoid confusion, we could add olater (#10) (#6) Co-authored-by: Huan Jiang Signed-off-by: Peter Nied * [PURIFY] update build.gradle files to ensure build completes; gradle check fails (#7) Signed-off-by: Peter Nied * Cleanup build script to exclude security-authorization-engine (#8) (#8) * Cleanup build-scan, remove publish scan to elastic server * Cleanup build script to exclude security-authorization-engine which test has dependency on xpack * Cleanup build script to exclude security-authorization-engine which test has dependency on xpack Co-authored-by: Huan Jiang Signed-off-by: Peter Nied * [PURIFY] remove all trace of x-pack enrichment processor (#9) This commit removes all trace of the Elastic licensed enrichment processor. Signed-off-by: Peter Nied * [PURIFY] remove all trace of x-pack async-search (#10) This commit removes all trace of Elastic licensed asyc-search Signed-off-by: Peter Nied * [PURIFY] remove all trace of x-pack ccr (#11) This committ removes all trace of Elastic licensed CCR. Signed-off-by: Peter Nied * Remove the Elastic license file, all checks for this license and the license REST APIs. (#12) Co-authored-by: Rabi Panda Signed-off-by: Peter Nied * [PURIFY] remove all trace of x-pack graph (#13) This commit removes all trace of Elastic licensed graph feature Signed-off-by: Peter Nied * [PURIFY] remove all trace of x-pack ml (#14) This commit removes all trace of x-pack ml. Signed-off-by: Peter Nied * [PURIFY] Add InferenceConfig to org.elasticsearch.client.analytics (#15) This commits adds InferenceConfig back to org.elasticsearch.client.analytics for use in InferencePipelineAggregationBuilder. Signed-off-by: Peter Nied * [PURIFY] remove all trace of x-pack security (#16) This commit removes all trace of the security high level rest client and other reference to x-pack security Co-authored-by: Rabi Panda Signed-off-by: Peter Nied * [PURIFY] remove all trace of x-pack rollups (#17) This commit removes all trace of Elastic licensed rollups Signed-off-by: Peter Nied * [PURIFY] remove all trace of x-pack sql (#18) This commit removes all trace of Elastic licensed SQL Signed-off-by: Peter Nied * [PURIFY] remove all trace of x-pack migration (#19) This commit removes all trace of Elastic licensed Migration Signed-off-by: Peter Nied * [PURIFY] remove all trace of x-pack index lifecycle management (#20) This commit removes all trace of Elastic licensed ILM. Signed-off-by: Peter Nied * [PURIFY] remove all trace of x-pack watcher (#21) This commit removes all trace of Elastic licensed watcher Signed-off-by: Peter Nied * [PURIFY] remove all trace of x-pack monitoring (#22) This commit removes all trace of Elastic licensed monitoring Signed-off-by: Peter Nied * [PURIFY] Remove remaining x-pack license. (#25) Signed-off-by: Peter Nied * [PURIFY] Revert "Move data stream transport and rest action to xpack (#59593)" (#28) This commit reverts commit 2a89e13e43d62ec9c443bfaba42c9a1da7e81223. Relicensing data streams from OSS to XPack. Signed-off-by: Peter Nied * [PURIFY] remove all trace of x-pack transforms (#31) This commit removes all trace of Elastic licensed transforms. Signed-off-by: Peter Nied * [PURIFY] fix GetDataStreamsRequestTests build failure This fixes the constructor for IndexNameExpressionResolver to pass in Settings.EMPTY to a ThreadContext used by the resolver. Signed-off-by: Peter Nied * [PURIFY] Remove the AuthorizationEnginePlugin from examples. (#26) Signed-off-by: Peter Nied * Fix compilation issues for tests. (#29) Some of the tests that use the x-pack code are failing compilation. This PR cleans up the references to fix the issue. Signed-off-by: Peter Nied * [PURIFY] Cleanup build and unblock HLRC integration tests (#33) This commit cleans up the following: * Remove unused imports * Remove ILM settings in hlrc testCluster formation * Comment out security users settings in ElasticsearchNode creation for build-tools tests Signed-off-by: Peter Nied * Adding initial CI workflow for search (#35) Signed-off-by: Peter Nied * [TEST] Fix unit test failure in RestHighLevelClientTests (#36) * fix testProvidedNamedXContents by modifying the assertion Signed-off-by: Peter Nied * [TEST] fix DeleteDataStreamRequestTests failure (#37) This commit fixes DeleteDataStreamRequestTests.testDeleteSnapshottingDataStream unit test failure by passing SnapshotsInProgress.Entry.SUCCESS in the createEntrymethod. Signed-off-by: Peter Nied * Remove license option in gradlew command (#41) * Remove license option in gradlew command * Remove "This username and password is part of trial license. Let's remove this too" from TESTING.asciidoc Signed-off-by: Peter Nied * Remove x-pack from build, distribution and packaging. (#43) This PR removes references to x-pack from buildSrc, distribution and qa modules. Signed-off-by: Peter Nied * Removing _reload_search_analyzers related changes since the related x-pack support is removed (#48) Signed-off-by: Peter Nied * Fixing Rest Converters Tests after x-pack removal (#54) Signed-off-by: Peter Nied * Remove license statement from CONTRIBUTING.md (#58) Signed-off-by: Peter Nied * Revert back refresh policy in RequestConverters. (#55) This PR reverts back the deleted code (#16, #54) related to refresh policies. Signed-off-by: Peter Nied * Remove unused imports in RemoteClustersIT and InternalTestCluster This commit removes unused imports that are causing checkStyle failures. Signed-off-by: Peter Nied * [DOCS] temporarily comment verifyDocsLuceneVersion in qa:verify-version-constants Docs have temporarily been removed. This commit can be reverted if the OSS docs are restored. Signed-off-by: Peter Nied * Mute AnalyticsAggsIT test failure AnalyticsAggsIT needs to be removed. This mutes the test until removal is complete. Signed-off-by: Peter Nied * [MUTE] AwaitsFix failing tests This commit mutes failing tests in: * IndicesClientIT * SearchIT (Freeze/UnFreeze) * IndicesClientDocumentationIT Fixes are identified and will be merged in a followup PR. Signed-off-by: Peter Nied * Remove packaging tests for the x-pack command line tools. (#56) Signed-off-by: Peter Nied * Remove x-pack aggregations. (#59) This PR removes the x-pack aggregations: string_stats, top_metrics and inference. Resolves #51 Relates #2 Signed-off-by: Peter Nied * Remove x-pack data-frame analytics hlrc. (#62) This PR removes the hlrc for x-pack data-frame analytics. Relates #2 Signed-off-by: Peter Nied * Remove ILM policy from GetDataStreamAction Response. (#63) Signed-off-by: Peter Nied * Ensure ReplicationOperation notify listener once (#68256) ReplicationOperation can notify the listener twice if the primary shard is demoted after it has completed the primary operation. Closes #68049 Signed-off-by: Peter Nied * Fix search template request (#43509) A seed was hit in (#43157) that caused mutateInstance to generate an identical instance. This change prevents that. Signed-off-by: Peter Nied * Lower skip version for token_cound yaml test (#68583) Signed-off-by: Peter Nied * Revert previous change to fix import issue. Signed-off-by: Peter Nied * Remove unused imports in ArchiveTests Signed-off-by: Peter Nied * Fix unit test for removal of x-pack aggregations. (#65) This PR fixes the unit test which failed after removal of the x-pack aggregations #59. Signed-off-by: Peter Nied * [PURIFY] Remove ProtocolUtils, TimeUtils, and XContentSource from HLRC (#64) This commit removes the ProtocolUtils, TimeUtils, and XContentSource utility classes which is only used for xpack HLRC. Signed-off-by: Peter Nied * [PURIFY] Remove x-pack feature flag from yaml test (#68) This commit removes the xpack no_xpack feature flag from the yaml test suite. Signed-off-by: Peter Nied * Remove testcase testSearchWithBasicLicensedQuery since basic license is no longer applicable (#74) Signed-off-by: Peter Nied * Remove UnusedImports (#76) Signed-off-by: Peter Nied * Bring back the REST specs for data streams. (#78) Add back the REST specs for data streams which were moved to x-pack as part of the commit fe12217c Signed-off-by: Peter Nied * Remove unused imports after x-pack feature flag removed from yaml test (#81) Signed-off-by: Peter Nied * [TEST] Fix Feature Flags in Test Framework and SortTemplates yaml failure (#82) This commit adds parse logic to correctly parse feature flags in the test framework. It also fixes a test failure in cat.templates/Sort Templates yaml test. Signed-off-by: Peter Nied * Run precommit and unit tests as part of github actions. (#84) Signed-off-by: Peter Nied * Removing FreezeIndex related code since its x-pack counterpart is removed (#85) Signed-off-by: Peter Nied * Only run pre-commit checks in GitHub actions. (#94) Signed-off-by: Peter Nied * Fixing Bwc checks for 7.10.3 (#93) Signed-off-by: Peter Nied * Temporary fix for license check path for debian packaging. (#97) This currently unblocks the gradle check and subsequently will be removed by the meta issue https://github.com/opendistro-for-elasticsearch/search/issues/50 Signed-off-by: Peter Nied * Disable plugincli feature (#101) Plugins CLI - disable installing official plugins by name. Currently the plugin cli allows installation of a plugin by name in which case it downloads the plugin artifacts from the official elastic artifacts repository. We will enable it once we have the new official artifacts download URL (Tracking Issue: #100) Signed-off-by: Peter Nied * Support for continious integration with Jenkins (#96) Adding jenkinsfile to describe the build / test / deployment process for this repository Signed-off-by: Peter Nied * Remove any non oss from build, package, and distribution (#102) This commit changes the building, packaging, and testing framework to only support OSS on different distributions. Next steps: completely remove -oss flag dependencies in package and build tests move 6.x bwc testing to be an explicit option remove any references to elastic.co download site (or replace with downloads from the OSS website) Co-authored-by: Himanshu Setia Co-authored-by: Rabi Panda Co-authored-by: Himanshu Setia <58999915+setiah@users.noreply.github.com> Co-authored-by: Sarat Vemulapalli Signed-off-by: Peter Nied * Remove x-pact from RESI API username and password (#117) Signed-off-by: Peter Nied * Update signoff message (#121) Signed-off-by: Harold Wang Signed-off-by: Peter Nied * Update CI workflow to work on new infra (#123) * Update CI workflow to work on new infra - Backward compatability tests are disabled during CI by default #113 - Added property to allow for disabling bwc tests - Added agent label to use specific hardware https://www.jenkins.io/doc/book/pipeline/syntax/#agent Signed-off-by: Peter Nied * Disable BWC checks. (#130) As part of this PR, we are disabling the BWC checks. Once we have finalized the versions for the fork, we can re-enable it with right configurations. Relates #105 Signed-off-by: Rabi Panda Signed-off-by: Peter Nied * Create CODE_OF_CONDUCT.md (#124) Explicitly adding code of conduct from https://opendistro.github.io/for-elasticsearch/codeofconduct.html Signed-off-by: Peter Nied * Add script to perform signoff check between commits (#152) * Add script to perform signoff check between commits Signed-off-by: Peter Nied * [Rename] server/src/main/java/org/apache (#162) This commit refactors all instances of elasticsearch in server/src/main/java/org/apache to opensearch. Signed-off-by: Nicholas Knize Signed-off-by: Peter Nied * Revert "[Rename] server/src/main/java/org/apache (#162)" This reverts commit c50e8c83a2476ca4ca2f1dd05fa5a608bc0e9ef6 which went should have merged to the rename branch instead of the main branch. Signed-off-by: Peter Nied * Update CODE_OF_CONDUCT.md replaced renameme Signed-off-by: Peter Nied * Dummy commit to test the CI/CD workflow Signed-off-by: Peter Nied * Update .gitignore Signed-off-by: Peter Nied * Fixing transport deserialization with oss distribution (#218) Signed-off-by: Sarat Vemulapalli Signed-off-by: Peter Nied * Update LICENSE.txt (#227) updating to Apache 2.0 License from https://www.apache.org/licenses/LICENSE-2.0.txt Signed-off-by: Peter Nied * Update NOTICE.TXT with OpenSearch copyright (#232) This commit updates the NOTICE.txt file to include the OpenSearch copyright notice. Signed-off-by: Nicholas Knize Signed-off-by: Peter Nied * fixed reference to old repo (#333) This commit fixes the url reference to bwc disabled message. Signed-off-by: Kyle Davis Co-authored-by: nknize Co-authored-by: Huan Jiang Co-authored-by: Rabi Panda Co-authored-by: Rabi Panda Co-authored-by: nknize Co-authored-by: Sarat Vemulapalli Co-authored-by: Harold Wang <74381974+harold-wang@users.noreply.github.com> Co-authored-by: Himanshu Setia <58999915+setiah@users.noreply.github.com> Co-authored-by: Nhat Nguyen Co-authored-by: Jack Conradson Co-authored-by: Christoph Büscher Co-authored-by: Abbas Hussain Co-authored-by: Peter Nied Co-authored-by: Himanshu Setia Co-authored-by: Rabi Panda Co-authored-by: Peter Nied Co-authored-by: CEHENKLE Co-authored-by: Barani Co-authored-by: Peter Zhu Co-authored-by: Kyle J. Davis --- CODE_OF_CONDUCT.md | 25 +++ LICENSE.txt | 211 +++++++++++++++++- NOTICE.txt | 6 +- build.gradle | 2 +- ...tributionArchiveCheckPluginFuncTest.groovy | 2 +- ...nternalDistributionArchiveCheckPlugin.java | 2 +- dev-tools/signoff-check.sh | 31 +++ distribution/packages/build.gradle | 2 +- .../main/java/org/elasticsearch/Build.java | 9 +- 9 files changed, 273 insertions(+), 17 deletions(-) create mode 100644 CODE_OF_CONDUCT.md create mode 100755 dev-tools/signoff-check.sh diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000000..997bae660bc46 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,25 @@ + +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. diff --git a/LICENSE.txt b/LICENSE.txt index c1b552919e4f3..027d0f5d02ed3 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,10 +1,201 @@ -Source code in this repository is covered by one of three licenses: (i) the -Apache License 2.0 (ii) an Apache License 2.0 compatible license (iii) the -Elastic License. The default license throughout the repository is Apache License -2.0 unless the header specifies another license. Elastic Licensed code is found -only in the x-pack directory. - -The build produces two sets of binaries - one set that falls under the Elastic -License and another set that falls under Apache License 2.0. The binaries that -contain `-oss` in the artifact name are licensed under Apache License 2.0 and -these binaries do not package any code from the x-pack directory. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/NOTICE.txt b/NOTICE.txt index 9dd784d5a09ec..be83767d4d98a 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -1,4 +1,8 @@ -Elasticsearch +OpenSearch +Copyright 2021 OpenSearch Contributors + +This product includes software developed by +Elasticsearch (http://www.elastic.co). Copyright 2009-2018 Elasticsearch This product includes software developed by The Apache Software diff --git a/build.gradle b/build.gradle index 3acbb9c60fe19..5d970cb3e7aa6 100644 --- a/build.gradle +++ b/build.gradle @@ -172,7 +172,7 @@ tasks.register("verifyVersions") { boolean bwc_tests_enabled = false /* place a PR link here when committing bwc changes */ -final String bwc_tests_disabled_issue = "https://github.com/opendistro-for-elasticsearch/search/issues/105" +final String bwc_tests_disabled_issue = "https://github.com/opensearch-project/OpenSearch/issues/105" if (bwc_tests_enabled == false) { if (bwc_tests_disabled_issue.isEmpty()) { throw new GradleException("bwc_tests_disabled_issue must be set when bwc_tests_enabled == false") diff --git a/buildSrc/src/integTest/groovy/org/elasticsearch/gradle/internal/InternalDistributionArchiveCheckPluginFuncTest.groovy b/buildSrc/src/integTest/groovy/org/elasticsearch/gradle/internal/InternalDistributionArchiveCheckPluginFuncTest.groovy index 32b13ab9068fa..8493918424029 100644 --- a/buildSrc/src/integTest/groovy/org/elasticsearch/gradle/internal/InternalDistributionArchiveCheckPluginFuncTest.groovy +++ b/buildSrc/src/integTest/groovy/org/elasticsearch/gradle/internal/InternalDistributionArchiveCheckPluginFuncTest.groovy @@ -98,7 +98,7 @@ Copyright 2009-2018 Acme Coorp""" result.task(":darwin-tar:checkNotice").outcome == TaskOutcome.FAILED normalizedOutput(result.output).contains("> expected line [2] in " + "[./darwin-tar/build/tar-extracted/elasticsearch-${VersionProperties.getElasticsearch()}/NOTICE.txt] " + - "to be [Copyright 2009-2018 Elasticsearch] but was [Copyright 2009-2018 Acme Coorp]") + "to be [Copyright 2021 OpenSearch Contributors] but was [Copyright 2009-2018 Acme Coorp]") } void license(File file = file("licenses/APACHE-LICENSE-2.0.txt")) { diff --git a/buildSrc/src/main/java/org/elasticsearch/gradle/internal/InternalDistributionArchiveCheckPlugin.java b/buildSrc/src/main/java/org/elasticsearch/gradle/internal/InternalDistributionArchiveCheckPlugin.java index 623f3ce541ba0..35b6bb5e385d2 100644 --- a/buildSrc/src/main/java/org/elasticsearch/gradle/internal/InternalDistributionArchiveCheckPlugin.java +++ b/buildSrc/src/main/java/org/elasticsearch/gradle/internal/InternalDistributionArchiveCheckPlugin.java @@ -90,7 +90,7 @@ private TaskProvider registerCheckNoticeTask(Project project, TaskProvider task.doLast(new Action() { @Override public void execute(Task task) { - final List noticeLines = Arrays.asList("Elasticsearch", "Copyright 2009-2018 Elasticsearch"); + final List noticeLines = Arrays.asList("OpenSearch", "Copyright 2021 OpenSearch Contributors"); final Path noticePath = checkExtraction.get() .getDestinationDir() .toPath() diff --git a/dev-tools/signoff-check.sh b/dev-tools/signoff-check.sh new file mode 100755 index 0000000000000..56cb49455165e --- /dev/null +++ b/dev-tools/signoff-check.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +### Script to check for signoff presents on commits + +# Validate input parameters +if [ -z $1 ] || [ -z $2 ] +then + echo usage: ./signoff-check.sh commit1 commit2 + echo + echo Checks all of the commits between commit1 \(exclusive\) and commit2 \(inclusive\) + echo were made with the --signoff flag enabled + exit 1 +fi + +# Get the list of commit ids to check from git +commits=$(git rev-list $1..$2) + +# Scan each commit for the sign off message +missingSignoff=0 +for commitId in $commits; do + commitMessage=$(git rev-list --format=%B --max-count=1 $commitId) + signoffStringCount=$(echo $commitMessage | grep -c Signed-off-by) + if [ $signoffStringCount -eq 0 ]; then + echo !!! Commit "$commitId" is missing signoff, amend this commit with the --signoff flag + let "missingSignoff++" + fi +done + +# Return non-zero error code if any commits were missing signoff +exit $missingSignoff + diff --git a/distribution/packages/build.gradle b/distribution/packages/build.gradle index b97e6ffc5f215..1c7cb12c70f41 100644 --- a/distribution/packages/build.gradle +++ b/distribution/packages/build.gradle @@ -485,7 +485,7 @@ subprojects { (project.name.contains('deb') && dpkgExists.call(it)) || (project.name.contains('rpm') && rpmExists.call(it)) } doLast { - final List noticeLines = Arrays.asList("Elasticsearch", "Copyright 2009-2018 Elasticsearch") + final List noticeLines = Arrays.asList("OpenSearch", "Copyright 2021 OpenSearch Contributors") final Path noticePath = packageExtractionDir.toPath().resolve("usr/share/elasticsearch/NOTICE.txt") assertLinesInFile(noticePath, noticeLines) } diff --git a/server/src/main/java/org/elasticsearch/Build.java b/server/src/main/java/org/elasticsearch/Build.java index 43b2656bf6b53..472b7e8c87a33 100644 --- a/server/src/main/java/org/elasticsearch/Build.java +++ b/server/src/main/java/org/elasticsearch/Build.java @@ -186,7 +186,10 @@ public static Build readBuild(StreamInput in) throws IOException { final Type type; // The following block is kept for existing BWS tests to pass. // TODO - clean up this code when we remove all v6 bwc tests. - if (in.getVersion().onOrAfter(Version.V_6_3_0) && in.getVersion().onOrBefore(Version.V_7_0_0)) { + // TODO - clean this up when OSS flavor is removed in all of the code base + // (Integ test zip still write OSS as distribution) + // See issue: https://github.com/opendistro-for-elasticsearch/search/issues/159 + if (in.getVersion().onOrAfter(Version.V_6_3_0)) { flavor = in.readString(); } if (in.getVersion().onOrAfter(Version.V_6_3_0)) { @@ -211,7 +214,9 @@ public static Build readBuild(StreamInput in) throws IOException { public static void writeBuild(Build build, StreamOutput out) throws IOException { // The following block is kept for existing BWS tests to pass. // TODO - clean up this code when we remove all v6 bwc tests. - if (out.getVersion().onOrAfter(Version.V_6_3_0) && out.getVersion().onOrBefore(Version.V_7_0_0)) { + // TODO - clean this up when OSS flavor is removed in all of the code base + // See issue: https://github.com/opendistro-for-elasticsearch/search/issues/159 + if (out.getVersion().onOrAfter(Version.V_6_3_0)) { out.writeString("oss"); } if (out.getVersion().onOrAfter(Version.V_6_3_0)) {