Skip to content

Commit 0a4ce10

Browse files
lezzagoketanv3bowenlan-amznVachaShahdblock
authored
Merge 1.1 changes from main to 1.1 (#60)
* Enabled automated license header checks (#36) 1. Re-enabled the 'licenseHeaders' check in the build.gradle file. 2. Added an IntelliJ copyright profile to auto-generate the SPDX license header. Signed-off-by: Ketan Verma <[email protected]> * Release 1.0.0.0 (#40) Signed-off-by: bowenlan-amzn <[email protected]> * Using 1.1 snapshot version for OpenSearch (#48) Signed-off-by: Vacha <[email protected]> * Use standard snapshot build settings and OpenSearch 1.x. (#49) Signed-off-by: dblock <[email protected]> * Add `Getting Started` to Readme (#50) * added Getting Started section * Add release notes for version 1.1.0.0 * Update branches to 1.* Signed-off-by: Ashish Agrawal <[email protected]> * Update github workflow to depend on OpenSearch 1.1 Signed-off-by: Ashish Agrawal <[email protected]> * Fix LICENSE link and update link checker workflow to ignore a fake link Signed-off-by: Ashish Agrawal <[email protected]> Co-authored-by: Ketan Verma <[email protected]> Co-authored-by: Bowen Lan <[email protected]> Co-authored-by: Vacha <[email protected]> Co-authored-by: Daniel Doubrovkine (dB.) <[email protected]> Co-authored-by: Sriram <[email protected]>
1 parent 55c30fa commit 0a4ce10

16 files changed

+207
-198
lines changed

.github/workflows/links.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Link Checker
2+
on:
3+
push:
4+
branches: [ main, 1.* ]
5+
pull_request:
6+
branches: [ main, 1.* ]
7+
8+
jobs:
9+
linkchecker:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: lychee Link Checker
14+
id: lychee
15+
uses: lycheeverse/lychee-action@master
16+
with:
17+
args: --accept=200,403,429 "**/*.html" "**/*.md" "**/*.txt" "**/*.json" --exclude=file://\$\{plugin_zip_file_path\}
18+
env:
19+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
20+
- name: Fail if there were link errors
21+
run: exit ${{ steps.lychee.outputs.exit_code }}

.github/workflows/test-and-build-workflow.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,20 @@ jobs:
3030
uses: actions/checkout@v2
3131
with:
3232
repository: 'opensearch-project/OpenSearch'
33-
ref: '1.x'
33+
ref: '1.1'
3434
path: OpenSearch
3535
- name: Build OpenSearch
3636
working-directory: ./OpenSearch
37-
run: ./gradlew publishToMavenLocal -Dbuild.snapshot=false
37+
run: ./gradlew publishToMavenLocal
3838

3939
# job-scheduler
4040
- name: Build and Test
4141
run: |
42-
./gradlew build -Dbuild.snapshot=false
42+
./gradlew build -Dopensearch.version=1.1.0-SNAPSHOT
4343
4444
- name: Publish to Maven Local
4545
run: |
46-
./gradlew publishToMavenLocal -Dbuild.snapshot=false
46+
./gradlew publishToMavenLocal -Dopensearch.version=1.1.0-SNAPSHOT
4747
4848
- name: Upload Coverage Report
4949
uses: codecov/codecov-action@v1

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
.idea
1+
.idea/*
2+
!.idea/copyright
23
*.iml
34
.gradle
45
out

.idea/copyright/SPDX_ALv2.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/copyright/profiles_settings.xml

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ADMINS.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## Admins
2+
3+
| Admin | GitHub ID | Affiliation |
4+
| --------------- | --------------------------------------- | ----------- |
5+
| Henri Yandell | [hyandell](https://github.com/hyandell) | Amazon |
6+
7+
[This document](https://github.com/opensearch-project/.github/blob/main/ADMINS.md) explains what admins do in this repo. and how they should be doing it. If you're interested in becoming a maintainer, see [MAINTAINERS](MAINTAINERS.md). If you're interested in contributing, see [CONTRIBUTING](CONTRIBUTING.md).

CONTRIBUTING.md

+3-138
Original file line numberDiff line numberDiff line change
@@ -1,139 +1,4 @@
1-
# Contributing Guidelines
1+
# Contributing to this project
22

3-
Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
4-
documentation, we greatly value feedback and contributions from our community.
5-
6-
Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
7-
information to effectively respond to your bug report or contribution.
8-
9-
10-
## Reporting Bugs/Feature Requests
11-
12-
We welcome you to use the GitHub issue tracker to report bugs or suggest features.
13-
14-
When filing an issue, please check [existing open](https://github.com/opensearch-project/job-scheduler/issues), or [recently closed](https://github.com/opensearch-project/job-scheduler/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), issues to make sure somebody else hasn't already
15-
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
16-
17-
* A reproducible test case or series of steps
18-
* The version of our code being used
19-
* Any modifications you've made relevant to the bug
20-
* Anything unusual about your environment or deployment
21-
22-
23-
## Contributing via Pull Requests
24-
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
25-
26-
1. You are working against the latest source on the *main* branch.
27-
2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
28-
3. You open an issue to discuss any significant work - we would hate for your time to be wasted.
29-
30-
To send us a pull request, please:
31-
32-
1. Fork the repository.
33-
2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
34-
3. Ensure local tests pass.
35-
4. Commit to your fork using clear commit messages.
36-
5. Send us a pull request, answering any default questions in the pull request interface.
37-
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
38-
39-
GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
40-
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
41-
42-
43-
## Finding contributions to work on
44-
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/opensearch-project/job-scheduler/labels/help%20wanted) issues is a great place to start.
45-
46-
47-
## Code of Conduct
48-
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
49-
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
50-
[email protected] with any additional questions or comments.
51-
52-
## Developer Certificate of Origin
53-
54-
OpenSearch is an open source product released under the Apache 2.0 license (see either [the Apache site](https://www.apache.org/licenses/LICENSE-2.0) or the [LICENSE.txt file](./LICENSE.txt)). The Apache 2.0 license allows you to freely use, modify, distribute, and sell your own products that include Apache 2.0 licensed software.
55-
56-
We respect intellectual property rights of others and we want to make sure all incoming contributions are correctly attributed and licensed. A Developer Certificate of Origin (DCO) is a lightweight mechanism to do that.
57-
58-
The DCO is a declaration attached to every contribution made by every developer. In the commit message of the contribution, the developer simply adds a `Signed-off-by` statement and thereby agrees to the DCO, which you can find below or at [DeveloperCertificate.org](http://developercertificate.org/).
59-
60-
```
61-
Developer's Certificate of Origin 1.1
62-
By making a contribution to this project, I certify that:
63-
(a) The contribution was created in whole or in part by me and I
64-
have the right to submit it under the open source license
65-
indicated in the file; or
66-
(b) The contribution is based upon previous work that, to the
67-
best of my knowledge, is covered under an appropriate open
68-
source license and I have the right under that license to
69-
submit that work with modifications, whether created in whole
70-
or in part by me, under the same open source license (unless
71-
I am permitted to submit under a different license), as
72-
Indicated in the file; or
73-
(c) The contribution was provided directly to me by some other
74-
person who certified (a), (b) or (c) and I have not modified
75-
it.
76-
(d) I understand and agree that this project and the contribution
77-
are public and that a record of the contribution (including
78-
all personal information I submit with it, including my
79-
sign-off) is maintained indefinitely and may be redistributed
80-
consistent with this project or the open source license(s)
81-
involved.
82-
```
83-
We require that every contribution to OpenSearch is signed with a Developer Certificate of Origin. Additionally, please use your real name. We do not accept anonymous contributors nor those utilizing pseudonyms.
84-
85-
Each commit must include a DCO which looks like this
86-
87-
```
88-
Signed-off-by: Jane Smith <[email protected]>
89-
```
90-
You may type this line on your own when writing your commit messages. However, if your user.name and user.email are set in your git configs, you can use `-s` or `– – signoff` to add the `Signed-off-by` line to the end of the commit message.
91-
92-
## Security issue notifications
93-
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.
94-
95-
## Developer Certificate of Origin
96-
97-
OpenSearch Common Utils is an open source product released under the Apache 2.0 license (see either [the Apache site](https://www.apache.org/licenses/LICENSE-2.0) or the [LICENSE file](./LICENSE)). The Apache 2.0 license allows you to freely use, modify, distribute, and sell your own products that include Apache 2.0 licensed software.
98-
99-
We respect intellectual property rights of others and we want to make sure all incoming contributions are correctly attributed and licensed. A Developer Certificate of Origin (DCO) is a lightweight mechanism to do that.
100-
101-
The DCO is a declaration attached to every contribution made by every developer. In the commit message of the contribution, the developer simply adds a `Signed-off-by` statement and thereby agrees to the DCO, which you can find below or at [DeveloperCertificate.org](http://developercertificate.org/).
102-
103-
```
104-
Developer's Certificate of Origin 1.1
105-
By making a contribution to this project, I certify that:
106-
(a) The contribution was created in whole or in part by me and I
107-
have the right to submit it under the open source license
108-
indicated in the file; or
109-
(b) The contribution is based upon previous work that, to the
110-
best of my knowledge, is covered under an appropriate open
111-
source license and I have the right under that license to
112-
submit that work with modifications, whether created in whole
113-
or in part by me, under the same open source license (unless
114-
I am permitted to submit under a different license), as
115-
Indicated in the file; or
116-
(c) The contribution was provided directly to me by some other
117-
person who certified (a), (b) or (c) and I have not modified
118-
it.
119-
(d) I understand and agree that this project and the contribution
120-
are public and that a record of the contribution (including
121-
all personal information I submit with it, including my
122-
sign-off) is maintained indefinitely and may be redistributed
123-
consistent with this project or the open source license(s)
124-
involved.
125-
```
126-
We require that every contribution to OpenSearch Common Utils is signed with a Developer Certificate of Origin. Additionally, please use your real name. We do not accept anonymous contributors nor those utilizing pseudonyms.
127-
128-
Each commit must include a DCO which looks like this
129-
130-
```
131-
Signed-off-by: Jane Smith <[email protected]>
132-
```
133-
You may type this line on your own when writing your commit messages. However, if your user.name and user.email are set in your git configs, you can use `-s` or `– – signoff` to add the `Signed-off-by` line to the end of the commit message.
134-
135-
## Licensing
136-
137-
See the [LICENSE](https://github.com/opensearch-project/job-scheduler/blob/main/LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
138-
139-
We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.
3+
OpenSearch is a community project that is built and maintained by people just like **you**.
4+
[This document](https://github.com/opensearch-project/.github/blob/main/CONTRIBUTING.md) explains how you can contribute to this and related projects.

DEVELOPER_GUIDE.md

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
- [Developer Guide](#developer-guide)
2+
- [Forking and Cloning](#forking-and-cloning)
3+
- [Install Prerequisites](#install-prerequisites)
4+
- [JDK 14](#jdk-14)
5+
- [Setup](#setup)
6+
- [Build](#build)
7+
- [Building from the command line](#building-from-the-command-line)
8+
- [Debugging](#debugging)
9+
- [Using IntelliJ IDEA](#using-intellij-idea)
10+
- [Submitting Changes](#submitting-changes)
11+
12+
## Developer Guide
13+
14+
So you want to contribute code to this project? Excellent! We're glad you're here. Here's what you need to do.
15+
16+
### Forking and Cloning
17+
18+
Fork this repository on GitHub, and clone locally with `git clone`.
19+
20+
### Install Prerequisites
21+
22+
#### JDK 14
23+
24+
OpenSearch components build using Java 14 at a minimum. This means you must have a JDK 14 installed with the environment variable `JAVA_HOME` referencing the path to Java home for your JDK 14 installation, e.g. `JAVA_HOME=/usr/lib/jvm/jdk-14`.
25+
26+
## Setup
27+
28+
1. Check out this package from version control.
29+
2. Launch Intellij IDEA, choose **Import Project**, and select the `settings.gradle` file in the root of this package.
30+
3. To build from the command line, set `JAVA_HOME` to point to a JDK >= 14 before running `./gradlew`.
31+
- Unix System
32+
1. `export JAVA_HOME=jdk-install-dir`: Replace `jdk-install-dir` with the JAVA_HOME directory of your system.
33+
2. `export PATH=$JAVA_HOME/bin:$PATH`
34+
35+
- Windows System
36+
1. Find **My Computers** from file directory, right click and select **properties**.
37+
2. Select the **Advanced** tab, select **Environment variables**.
38+
3. Edit **JAVA_HOME** to path of where JDK software is installed.
39+
40+
## Build
41+
The JobScheduler plugin uses the [Gradle](https://docs.gradle.org/4.10.2/userguide/userguide.html)
42+
build system.
43+
1. Checkout this package from version control.
44+
1. To build from command line set `JAVA_HOME` to point to a JDK >=14
45+
1. Run `./gradlew build`
46+
47+
Then you will find the built artifact located at `build/distributions` directory
48+
49+
## Install
50+
Once you have built the plugin from source code, run
51+
```bash
52+
opensearch-plugin install file://${PLUGIN_ZIP_FILE_PATH}
53+
```
54+
to install the JobScheduler plugin to your OpenSearch.
55+
56+
## Develop a plugin that extends JobScheduler
57+
JobScheduler plugin provides a SPI for other plugins to implement. Essentially, you need to
58+
1. Define your *JobParameter* type by implementing `ScheduledJobParameter` interface
59+
1. Implement your JobParameter parser function that can deserialize your JobParameter from XContent
60+
1. Create your *JobRunner* implementation by implementing `ScheduledJobRunner` interface
61+
1. Create your own plugin which implements `JobSchedulerExtension` interface
62+
- don't forget to create the service provider configuration file in your resources folder and
63+
bundle it into your plugin artifact
64+
65+
Please refer to the `sample-extension-plugin` subproject in this project, which provides a complete
66+
example of using JobScheduler to run periodical jobs.
67+
68+
The sample extension plugin takes an index name as input and logs the index shards to opensearch
69+
logs according to the specified Schedule. And it also exposes a REST endpoint for end users to
70+
create/delete jobs.
71+
72+
73+
### Using IntelliJ IDEA
74+
75+
Launch Intellij IDEA, choose **Import Project**, and select the `settings.gradle` file in the root of this package.
76+
77+
### Submitting Changes
78+
79+
See [CONTRIBUTING](CONTRIBUTING.md).

MAINTAINERS.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# OpenSearch Job Scheduler Maintainers
2-
31
## Maintainers
42
| Maintainer | GitHub ID | Affiliation |
3+
| --------------- | --------- | ----------- |
54
| Ashish Agrawal | [lezzago](https://github.com/lezzago) | Amazon |
65
| Bowen Lan | [bowenlan-amzn](https://github.com/bowenlan-amzn) | Amazon |
76
| Drew Baugher | [dbbaughe](https://github.com/dbbaughe) | Amazon |
87
| Mohammad Qureshi | [qreshi](https://github.com/qreshi) | Amazon |
98
| Sriram Kosuri | [skkosuri-amzn](https://github.com/skkosuri-amzn) | Amazon |
10-
| --------------- | --------- | ----------- |
9+
10+
[This document](https://github.com/opensearch-project/.github/blob/main/MAINTAINERS.md) explains what maintainers do in this repo, and how they should be doing it. If you're interested in contributing, see [CONTRIBUTING](CONTRIBUTING.md).

0 commit comments

Comments
 (0)