Skip to content

Commit

Permalink
License header check (opensearch-project#142)
Browse files Browse the repository at this point in the history
* Provide default copyright header using IDE feature

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Address opensearch-project#103

history write index is rolled over even if the history indices are
disabled
  • Loading branch information
bowenlan-amzn committed Sep 10, 2021
1 parent d57938c commit f36416e
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.gradle/
build/
out/
.idea/
.idea/*
!.idea/copyright
*.ipr
*.iws
.DS_Store
Expand Down
6 changes: 6 additions & 0 deletions .idea/copyright/OpenSearch.xml

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

7 changes: 7 additions & 0 deletions .idea/copyright/profiles_settings.xml

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

5 changes: 5 additions & 0 deletions build-tools/coverage.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

/*
* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
Expand Down
5 changes: 5 additions & 0 deletions build-tools/pkgbuild.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

/*
* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class IndexStateManagementHistory(
override fun onMaster() {
try {
// try to rollover immediately as we might be restarting the cluster
rolloverHistoryIndex()
if (historyEnabled) rolloverHistoryIndex()
// schedule the next rollover for approx MAX_AGE later
scheduledRollover = threadPool.scheduleWithFixedDelay(
{ rolloverAndDeleteHistoryIndex() },
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package org.opensearch.indexmanagement.util;

/*
* Need to have a java file, so licenseHeaders task can function
*/
public class DummyFileForLicenseCheck {
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

/*
* Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
Expand Down

0 comments on commit f36416e

Please sign in to comment.