Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/maven/org.apache.maven.plugins-ma…
Browse files Browse the repository at this point in the history
…ven-resources-plugin-3.3.1
  • Loading branch information
pierDipi authored Feb 1, 2024
2 parents f954de7 + 7b9d020 commit 559104c
Show file tree
Hide file tree
Showing 10 changed files with 264 additions and 61 deletions.
54 changes: 1 addition & 53 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,5 @@
# Maintainers

Currently, active maintainers who may be found in the CNCF Slack.
Current active maintainers of this SDK:

- [Pierangelo Di Pilato](https://github.com/pierDipi)

# Maintainer's Guide

## Release Process

The release process is automated with Github actions. In order to perform a release:

1. Check if main CI pass.
1. Open the Github repository main page and go in the tab "Actions". Trigger the workflow "Bump version" and insert the new version to release. This will create a new release PR.
1. Check the release PR, merge it and cleanup the created branch.
1. Wait for the CI to complete the deploy of the modules to OSSRH.
1. Using the Github UI, create a new release, specifying the release notes and the tag to use.
1. Trigger again the workflow "Bump version" to bump versions back to a snapshot version.
1. Check the snapshot release PR, merge it and cleanup the created branch.

## Tips

Here are a few tips for repository maintainers.

* Stay on top of your pull requests. PRs that languish for too long can become difficult to merge.
* Work from your own fork. As you are making contributions to the project, you should be working from your own fork just as outside contributors do. This keeps the branches in github to a minimum and reduces unnecessary CI runs.
* Try to proactively label issues and pull requests with labels
* Actively review pull requests as they are submitted
* Triage issues once in a while in order to keep the repository alive.
* If some issues are stale for too long because they are no longer valid/relevant or because the discussion reached no significant action items to perform, close them and invite the users to reopen if they need it.
* If some PRs are no longer valid due to conflicts, but the PR is still needed, ask the contributor to rebase their PR.
* If some issues and PRs are still relevant, use labels to help organize tasks.
* If you find an issue that you want to create a pull request for, be sure to assign it to yourself so that other maintainers don't start working on it at the same time.

## Landing Pull Requests

When landing pull requests, be sure to check the first line uses an appropriate commit message prefix (e.g. docs, feat, lib, etc). If there is more than one commit, try to squash into a single commit. Usually this can just be done with the GitHub UI when merging the PR. Use "Squash and merge". To help ensure that everyone in the community has an opportunity to review and comment on pull requests, it's often good to have some time after a pull request has been submitted, and before it has landed. Some guidelines here about approvals and timing.

* No pull request may land without passing all automated checks
* All pull requests require at least one approval from a maintainer before landing
* A pull request author may approve their own PR, but will need an additional approval to land it
* If a maintainer has submitted a pull request and it has not received approval from at least one other maintainer, it can be landed after 72 hours
* If a pull request has both approvals and requested changes, it can't be landed until those requested changes are resolved

## Branch Management

The `main` branch is the bleeding edge. New major versions of the module
are cut from this branch and tagged. If you intend to submit a pull request
you should use `main HEAD` as your starting point.

Each major release will result in a new branch and tag. For example, the
release of version 1.0.0 of the module will result in a `v1.0.0` tag on the
release commit, and a new branch `v1.x.y` for subsequent minor and patch
level releases of that major version. However, development will continue
apace on `main` for the next major version - e.g. 2.0.0. Version branches
are only created for each major version. Minor and patch level releases
are simply tagged.
39 changes: 39 additions & 0 deletions MAINTAINERS_GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Maintainer's Guide

## Tips

Here are a few tips for repository maintainers.

* Stay on top of your pull requests. PRs that languish for too long can become difficult to merge.
* Work from your own fork. As you are making contributions to the project, you should be working from your own fork just as outside contributors do. This keeps the branches in github to a minimum and reduces unnecessary CI runs.
* Try to proactively label issues and pull requests with labels
* Actively review pull requests as they are submitted
* Triage issues once in a while in order to keep the repository alive.
* If some issues are stale for too long because they are no longer valid/relevant or because the discussion reached no significant action items to perform, close them and invite the users to reopen if they need it.
* If some PRs are no longer valid due to conflicts, but the PR is still needed, ask the contributor to rebase their PR.
* If some issues and PRs are still relevant, use labels to help organize tasks.
* If you find an issue that you want to create a pull request for, be sure to assign it to yourself so that other maintainers don't start working on it at the same time.

## Landing Pull Requests

When landing pull requests, be sure to check the first line uses an appropriate commit message prefix (e.g. docs, feat, lib, etc). If there is more than one commit, try to squash into a single commit. Usually this can just be done with the GitHub UI when merging the PR. Use "Squash and merge". To help ensure that everyone in the community has an opportunity to review and comment on pull requests, it's often good to have some time after a pull request has been submitted, and before it has landed. Some guidelines here about approvals and timing.

* No pull request may land without passing all automated checks
* All pull requests require at least one approval from a maintainer before landing
* A pull request author may approve their own PR, but will need an additional approval to land it
* If a maintainer has submitted a pull request and it has not received approval from at least one other maintainer, it can be landed after 72 hours
* If a pull request has both approvals and requested changes, it can't be landed until those requested changes are resolved

## Branch Management

The `main` branch is the bleeding edge. New major versions of the module
are cut from this branch and tagged. If you intend to submit a pull request
you should use `main HEAD` as your starting point.

Each major release will result in a new branch and tag. For example, the
release of version 1.0.0 of the module will result in a `v1.0.0` tag on the
release commit, and a new branch `v1.x.y` for subsequent minor and patch
level releases of that major version. However, development will continue
apace on `main` for the next major version - e.g. 2.0.0. Version branches
are only created for each major version. Minor and patch level releases
are simply tagged.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,16 @@ for how PR reviews and approval, and our
[Code of Conduct](https://github.com/cloudevents/spec/blob/main/docs/GOVERNANCE.md#additional-information)
information.

If there is a security concern with one of the CloudEvents specifications, or
with one of the project's SDKs, please send an email to
[[email protected]](mailto:[email protected]).

## Additional SDK Resources

- [List of current active maintainers](MAINTAINERS.md)
- [How to contribute to the project](CONTRIBUTING.md)
- [SDK's License](LICENSE)
- [SDK's Release process](RELEASING.md)
- [SDK Maintainer's guide](MAINTAINERS_GUIDE.md)

[http4k]: https://www.http4k.org/guide/reference/cloud_events/
12 changes: 12 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Release Process

The release process is automated with Github actions. In order to perform a release:

1. Check if main CI pass.
1. Open the Github repository main page and go in the tab "Actions". Trigger the workflow "Bump version" and insert the new version to release. This will create a new release PR.
1. Check the release PR, merge it and cleanup the created branch.
1. Wait for the CI to complete the deploy of the modules to OSSRH.
1. Using the Github UI, create a new release, specifying the release notes and the tag to use.
1. Trigger again the workflow "Bump version" to bump versions back to a snapshot version.
1. Check the snapshot release PR, merge it and cleanup the created branch.

2 changes: 1 addition & 1 deletion formats/avro-compact/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
<version>1.11.2</version>
<version>1.11.3</version>
</dependency>

<!-- Test deps -->
Expand Down
2 changes: 1 addition & 1 deletion formats/json-jackson/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<packaging>jar</packaging>

<properties>
<jackson.version>2.13.3</jackson.version>
<jackson.version>2.15.2</jackson.version>
<module-name>io.cloudevents.formats.jackson</module-name>
</properties>

Expand Down
3 changes: 2 additions & 1 deletion sql/src/test/java/io/cloudevents/sql/TCKTestSuite.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ public Stream<Map.Entry<String, TestCaseModel>> tckTestCases() {
"parse_errors",
"spec_examples",
"string_builtin_functions",
"sub_expression"
"sub_expression",
"subscriptions_api_recreations"
).map(fileName -> "/tck/" + fileName + ".yaml");

return tckFiles
Expand Down
10 changes: 5 additions & 5 deletions sql/src/test/resources/tck/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ Each test definition includes:

* `name`: Name of the test case
* `expression`: Expression to test.
* `result`: Expected result (optional). Can be a boolean, an integer or a string.
* `error`: Expected error (optional). If absent, no error is expected.
* `event`: Input event (optional). If present, this is a valid event serialized in JSON format. If absent, when testing
* `result`: Expected result (OPTIONAL). Can be a boolean, an integer or a string.
* `error`: Expected error (OPTIONAL). If absent, no error is expected.
* `event`: Input event (OPTIONAL). If present, this is a valid event serialized in JSON format. If absent, when testing
the expression, any valid event can be passed.
* `eventOverrides`: Overrides to the input event (optional). This might be used when `event` is missing, in order to
define only some specific values, while the other (required) attributes can be any value.
* `eventOverrides`: Overrides to the input event (OPTIONAL). This might be used when `event` is missing, in order to
define only some specific values, while the other (REQUIRED) attributes can be any value.

The `error` values could be any of the following:

Expand Down
23 changes: 23 additions & 0 deletions sql/src/test/resources/tck/like_expression.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,26 @@ tests:
eventOverrides:
myext: "abc123123%456_dzf"
result: false

- name: With type coercion from int (1)
expression: "234 LIKE '23_'"
result: true
- name: With type coercion from int (2)
expression: "2344 LIKE '23%'"
result: true
- name: With type coercion from int (3)
expression: "2344 LIKE '23_'"
result: false

- name: With type coercion from bool (1)
expression: "TRUE LIKE 'tr%'"
result: true
- name: With type coercion from bool (2)
expression: "TRUE LIKE '%ue'"
result: true
- name: With type coercion from bool (3)
expression: "FALSE LIKE 'tr%'"
result: false
- name: With type coercion from bool (4)
expression: "FALSE LIKE 'fal%'"
result: true
168 changes: 168 additions & 0 deletions sql/src/test/resources/tck/subscriptions_api_recreations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
name: SubscriptionsAPI Recreations
tests:
- name: Prefix filter (1)
expression: "source LIKE 'https://%'"
result: true
eventOverrides:
source: "https://example.com"
- name: Prefix filter (2)
expression: "source LIKE 'https://%'"
result: false
eventOverrides:
source: "http://example.com"
- name: Prefix filter on string extension
expression: "myext LIKE 'custom%'"
result: true
eventOverrides:
myext: "customext"
- name: Prefix filter on missing string extension
expression: "myext LIKE 'custom%'"
error: missingAttribute

- name: Suffix filter (1)
expression: "type like '%.error'"
result: true
eventOverrides:
type: "com.github.error"
- name: Suffix filter (2)
expression: "type like '%.error'"
result: false
eventOverrides:
type: "com.github.success"
- name: Suffix filter on string extension
expression: "myext LIKE '%ext'"
result: true
eventOverrides:
myext: "customext"
- name: Suffix filter on missing string extension
expression: "myext LIKE '%ext'"
error: missingAttribute

- name: Exact filter (1)
expression: "id = 'myId'"
result: true
eventOverrides:
id: "myId"
- name: Exact filter (2)
expression: "id = 'myId'"
result: false
eventOverrides:
id: "notmyId"
- name: Exact filter on string extension
expression: "myext = 'customext'"
result: true
eventOverrides:
myext: "customext"
- name: Exact filter on missing string extension
expression: "myext = 'customext'"
error: missingAttribute

- name: Prefix filter AND Suffix filter (1)
expression: "id LIKE 'my%' AND source LIKE '%.ca'"
result: true
eventOverrides:
id: "myId"
source: "http://www.some-website.ca"
- name: Prefix filter AND Suffix filter (2)
expression: "id LIKE 'my%' AND source LIKE '%.ca'"
result: false
eventOverrides:
id: "myId"
source: "http://www.some-website.com"
- name: Prefix filter AND Suffix filter (3)
expression: "myext LIKE 'custom%' AND type LIKE '%.error'"
result: true
eventOverrides:
myext: "customext"
type: "com.github.error"
- name: Prefix AND Suffix filter (4)
expression: "type LIKE 'example.%' AND myext LIKE 'custom%'"
error: missingAttribute
eventOverrides:
type: "example.event.type"

- name: Prefix OR Suffix filter (1)
expression: "id LIKE 'my%' OR source LIKE '%.ca'"
result: true
eventOverrides:
id: "myId"
source: "http://www.some-website.ca"
- name: Prefix OR Suffix filter (2)
expression: "id LIKE 'my%' OR source LIKE '%.ca'"
result: true
eventOverrides:
id: "myId"
source: "http://www.some-website.com"
- name: Prefix OR Suffix filter (3)
expression: "id LIKE 'my%' OR source LIKE '%.ca'"
result: true
eventOverrides:
id: "notmyId"
source: "http://www.some-website.ca"
- name: Prefix OR Suffix filter (4)
expression: "id LIKE 'my%' OR source LIKE '%.ca'"
result: false
eventOverrides:
id: "notmyId"
source: "http://www.some-website.com"

- name: Disjunctive Normal Form (1)
expresion: "(id = 'myId' AND type LIKE '%.success') OR (id = 'notmyId' AND source LIKE 'http://%' AND type LIKE '%.warning')"
result: true
eventOverrides:
id: "myId"
type: "example.event.success"
- name: Disjunctive Normal Form (2)
expresion: "(id = 'myId' AND type LIKE '%.success') OR (id = 'notmyId' AND source LIKE 'http://%' AND type LIKE '%.warning')"
result: true
eventOverrides:
id: "notmyId"
type: "example.event.warning"
source: "http://localhost.localdomain"
- name: Disjunctive Normal Form (3)
expresion: "(id = 'myId' AND type LIKE '%.success') OR (id = 'notmyId' AND source LIKE 'http://%' AND type LIKE '%.warning')"
result: false
eventOverrides:
id: "notmyId"
type: "example.event.warning"
source: "https://localhost.localdomain"

- name: Conjunctive Normal Form (1)
expression: "(id = 'myId' OR type LIKE '%.success') AND (id = 'notmyId' OR source LIKE 'https://%' OR type LIKE '%.warning')"
result: true
eventOverrides:
id: "myId"
type: "example.event.warning"
source: "http://localhost.localdomain"
- name: Conjunctive Normal Form (2)
expression: "(id = 'myId' OR type LIKE '%.success') AND (id = 'notmyId' OR source LIKE 'https://%' OR type LIKE '%.warning')"
result: true
eventOverrides:
id: "notmyId"
type: "example.event.success"
source: "http://localhost.localdomain"
- name: Conjunctive Normal Form (3)
expression: "(id = 'myId' OR type LIKE '%.success') AND (id = 'notmyId' OR source LIKE 'https://%' OR type LIKE '%.warning')"
result: false
eventOverrides:
id: "notmyId"
type: "example.event.warning"
source: "http://localhost.localdomain"
- name: Conjunctive Normal Form (4)
expression: "(id = 'myId' OR type LIKE '%.success') AND (id = 'notmyId' OR source LIKE 'https://%' OR type LIKE '%.warning')"
result: true
eventOverrides:
id: "myId"
type: "example.event.success"
source: "http://localhost.localdomain"
- name: Conjunctive Normal Form (5)
expression: "(id = 'myId' OR type LIKE '%.success') AND (id = 'notmyId' OR source LIKE 'https://%' OR type LIKE '%.warning') AND (myext = 'customext')"
error: missingAttribute
eventOverrides:
id: "myId"
type: "example.event.success"
source: "http://localhost.localdomain"




0 comments on commit 559104c

Please sign in to comment.