Skip to content

Commit 559104c

Browse files
authored
Merge branch 'main' into dependabot/maven/org.apache.maven.plugins-maven-resources-plugin-3.3.1
2 parents f954de7 + 7b9d020 commit 559104c

10 files changed

Lines changed: 264 additions & 61 deletions

File tree

MAINTAINERS.md

Lines changed: 1 addition & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,5 @@
11
# Maintainers
22

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

55
- [Pierangelo Di Pilato](https://github.com/pierDipi)
6-
7-
# Maintainer's Guide
8-
9-
## Release Process
10-
11-
The release process is automated with Github actions. In order to perform a release:
12-
13-
1. Check if main CI pass.
14-
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.
15-
1. Check the release PR, merge it and cleanup the created branch.
16-
1. Wait for the CI to complete the deploy of the modules to OSSRH.
17-
1. Using the Github UI, create a new release, specifying the release notes and the tag to use.
18-
1. Trigger again the workflow "Bump version" to bump versions back to a snapshot version.
19-
1. Check the snapshot release PR, merge it and cleanup the created branch.
20-
21-
## Tips
22-
23-
Here are a few tips for repository maintainers.
24-
25-
* Stay on top of your pull requests. PRs that languish for too long can become difficult to merge.
26-
* 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.
27-
* Try to proactively label issues and pull requests with labels
28-
* Actively review pull requests as they are submitted
29-
* Triage issues once in a while in order to keep the repository alive.
30-
* 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.
31-
* If some PRs are no longer valid due to conflicts, but the PR is still needed, ask the contributor to rebase their PR.
32-
* If some issues and PRs are still relevant, use labels to help organize tasks.
33-
* 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.
34-
35-
## Landing Pull Requests
36-
37-
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.
38-
39-
* No pull request may land without passing all automated checks
40-
* All pull requests require at least one approval from a maintainer before landing
41-
* A pull request author may approve their own PR, but will need an additional approval to land it
42-
* 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
43-
* If a pull request has both approvals and requested changes, it can't be landed until those requested changes are resolved
44-
45-
## Branch Management
46-
47-
The `main` branch is the bleeding edge. New major versions of the module
48-
are cut from this branch and tagged. If you intend to submit a pull request
49-
you should use `main HEAD` as your starting point.
50-
51-
Each major release will result in a new branch and tag. For example, the
52-
release of version 1.0.0 of the module will result in a `v1.0.0` tag on the
53-
release commit, and a new branch `v1.x.y` for subsequent minor and patch
54-
level releases of that major version. However, development will continue
55-
apace on `main` for the next major version - e.g. 2.0.0. Version branches
56-
are only created for each major version. Minor and patch level releases
57-
are simply tagged.

MAINTAINERS_GUIDE.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Maintainer's Guide
2+
3+
## Tips
4+
5+
Here are a few tips for repository maintainers.
6+
7+
* Stay on top of your pull requests. PRs that languish for too long can become difficult to merge.
8+
* 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.
9+
* Try to proactively label issues and pull requests with labels
10+
* Actively review pull requests as they are submitted
11+
* Triage issues once in a while in order to keep the repository alive.
12+
* 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.
13+
* If some PRs are no longer valid due to conflicts, but the PR is still needed, ask the contributor to rebase their PR.
14+
* If some issues and PRs are still relevant, use labels to help organize tasks.
15+
* 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.
16+
17+
## Landing Pull Requests
18+
19+
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.
20+
21+
* No pull request may land without passing all automated checks
22+
* All pull requests require at least one approval from a maintainer before landing
23+
* A pull request author may approve their own PR, but will need an additional approval to land it
24+
* 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
25+
* If a pull request has both approvals and requested changes, it can't be landed until those requested changes are resolved
26+
27+
## Branch Management
28+
29+
The `main` branch is the bleeding edge. New major versions of the module
30+
are cut from this branch and tagged. If you intend to submit a pull request
31+
you should use `main HEAD` as your starting point.
32+
33+
Each major release will result in a new branch and tag. For example, the
34+
release of version 1.0.0 of the module will result in a `v1.0.0` tag on the
35+
release commit, and a new branch `v1.x.y` for subsequent minor and patch
36+
level releases of that major version. However, development will continue
37+
apace on `main` for the next major version - e.g. 2.0.0. Version branches
38+
are only created for each major version. Minor and patch level releases
39+
are simply tagged.

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,16 @@ for how PR reviews and approval, and our
108108
[Code of Conduct](https://github.com/cloudevents/spec/blob/main/docs/GOVERNANCE.md#additional-information)
109109
information.
110110

111+
If there is a security concern with one of the CloudEvents specifications, or
112+
with one of the project's SDKs, please send an email to
113+
[cncf-cloudevents-security@lists.cncf.io](mailto:cncf-cloudevents-security@lists.cncf.io).
114+
115+
## Additional SDK Resources
116+
117+
- [List of current active maintainers](MAINTAINERS.md)
118+
- [How to contribute to the project](CONTRIBUTING.md)
119+
- [SDK's License](LICENSE)
120+
- [SDK's Release process](RELEASING.md)
121+
- [SDK Maintainer's guide](MAINTAINERS_GUIDE.md)
122+
111123
[http4k]: https://www.http4k.org/guide/reference/cloud_events/

RELEASING.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Release Process
2+
3+
The release process is automated with Github actions. In order to perform a release:
4+
5+
1. Check if main CI pass.
6+
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.
7+
1. Check the release PR, merge it and cleanup the created branch.
8+
1. Wait for the CI to complete the deploy of the modules to OSSRH.
9+
1. Using the Github UI, create a new release, specifying the release notes and the tag to use.
10+
1. Trigger again the workflow "Bump version" to bump versions back to a snapshot version.
11+
1. Check the snapshot release PR, merge it and cleanup the created branch.
12+

formats/avro-compact/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<dependency>
6666
<groupId>org.apache.avro</groupId>
6767
<artifactId>avro</artifactId>
68-
<version>1.11.2</version>
68+
<version>1.11.3</version>
6969
</dependency>
7070

7171
<!-- Test deps -->

formats/json-jackson/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<packaging>jar</packaging>
3232

3333
<properties>
34-
<jackson.version>2.13.3</jackson.version>
34+
<jackson.version>2.15.2</jackson.version>
3535
<module-name>io.cloudevents.formats.jackson</module-name>
3636
</properties>
3737

sql/src/test/java/io/cloudevents/sql/TCKTestSuite.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ public Stream<Map.Entry<String, TestCaseModel>> tckTestCases() {
115115
"parse_errors",
116116
"spec_examples",
117117
"string_builtin_functions",
118-
"sub_expression"
118+
"sub_expression",
119+
"subscriptions_api_recreations"
119120
).map(fileName -> "/tck/" + fileName + ".yaml");
120121

121122
return tckFiles

sql/src/test/resources/tck/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ Each test definition includes:
1111

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

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

sql/src/test/resources/tck/like_expression.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,26 @@ tests:
9393
eventOverrides:
9494
myext: "abc123123%456_dzf"
9595
result: false
96+
97+
- name: With type coercion from int (1)
98+
expression: "234 LIKE '23_'"
99+
result: true
100+
- name: With type coercion from int (2)
101+
expression: "2344 LIKE '23%'"
102+
result: true
103+
- name: With type coercion from int (3)
104+
expression: "2344 LIKE '23_'"
105+
result: false
106+
107+
- name: With type coercion from bool (1)
108+
expression: "TRUE LIKE 'tr%'"
109+
result: true
110+
- name: With type coercion from bool (2)
111+
expression: "TRUE LIKE '%ue'"
112+
result: true
113+
- name: With type coercion from bool (3)
114+
expression: "FALSE LIKE 'tr%'"
115+
result: false
116+
- name: With type coercion from bool (4)
117+
expression: "FALSE LIKE 'fal%'"
118+
result: true
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
name: SubscriptionsAPI Recreations
2+
tests:
3+
- name: Prefix filter (1)
4+
expression: "source LIKE 'https://%'"
5+
result: true
6+
eventOverrides:
7+
source: "https://example.com"
8+
- name: Prefix filter (2)
9+
expression: "source LIKE 'https://%'"
10+
result: false
11+
eventOverrides:
12+
source: "http://example.com"
13+
- name: Prefix filter on string extension
14+
expression: "myext LIKE 'custom%'"
15+
result: true
16+
eventOverrides:
17+
myext: "customext"
18+
- name: Prefix filter on missing string extension
19+
expression: "myext LIKE 'custom%'"
20+
error: missingAttribute
21+
22+
- name: Suffix filter (1)
23+
expression: "type like '%.error'"
24+
result: true
25+
eventOverrides:
26+
type: "com.github.error"
27+
- name: Suffix filter (2)
28+
expression: "type like '%.error'"
29+
result: false
30+
eventOverrides:
31+
type: "com.github.success"
32+
- name: Suffix filter on string extension
33+
expression: "myext LIKE '%ext'"
34+
result: true
35+
eventOverrides:
36+
myext: "customext"
37+
- name: Suffix filter on missing string extension
38+
expression: "myext LIKE '%ext'"
39+
error: missingAttribute
40+
41+
- name: Exact filter (1)
42+
expression: "id = 'myId'"
43+
result: true
44+
eventOverrides:
45+
id: "myId"
46+
- name: Exact filter (2)
47+
expression: "id = 'myId'"
48+
result: false
49+
eventOverrides:
50+
id: "notmyId"
51+
- name: Exact filter on string extension
52+
expression: "myext = 'customext'"
53+
result: true
54+
eventOverrides:
55+
myext: "customext"
56+
- name: Exact filter on missing string extension
57+
expression: "myext = 'customext'"
58+
error: missingAttribute
59+
60+
- name: Prefix filter AND Suffix filter (1)
61+
expression: "id LIKE 'my%' AND source LIKE '%.ca'"
62+
result: true
63+
eventOverrides:
64+
id: "myId"
65+
source: "http://www.some-website.ca"
66+
- name: Prefix filter AND Suffix filter (2)
67+
expression: "id LIKE 'my%' AND source LIKE '%.ca'"
68+
result: false
69+
eventOverrides:
70+
id: "myId"
71+
source: "http://www.some-website.com"
72+
- name: Prefix filter AND Suffix filter (3)
73+
expression: "myext LIKE 'custom%' AND type LIKE '%.error'"
74+
result: true
75+
eventOverrides:
76+
myext: "customext"
77+
type: "com.github.error"
78+
- name: Prefix AND Suffix filter (4)
79+
expression: "type LIKE 'example.%' AND myext LIKE 'custom%'"
80+
error: missingAttribute
81+
eventOverrides:
82+
type: "example.event.type"
83+
84+
- name: Prefix OR Suffix filter (1)
85+
expression: "id LIKE 'my%' OR source LIKE '%.ca'"
86+
result: true
87+
eventOverrides:
88+
id: "myId"
89+
source: "http://www.some-website.ca"
90+
- name: Prefix OR Suffix filter (2)
91+
expression: "id LIKE 'my%' OR source LIKE '%.ca'"
92+
result: true
93+
eventOverrides:
94+
id: "myId"
95+
source: "http://www.some-website.com"
96+
- name: Prefix OR Suffix filter (3)
97+
expression: "id LIKE 'my%' OR source LIKE '%.ca'"
98+
result: true
99+
eventOverrides:
100+
id: "notmyId"
101+
source: "http://www.some-website.ca"
102+
- name: Prefix OR Suffix filter (4)
103+
expression: "id LIKE 'my%' OR source LIKE '%.ca'"
104+
result: false
105+
eventOverrides:
106+
id: "notmyId"
107+
source: "http://www.some-website.com"
108+
109+
- name: Disjunctive Normal Form (1)
110+
expresion: "(id = 'myId' AND type LIKE '%.success') OR (id = 'notmyId' AND source LIKE 'http://%' AND type LIKE '%.warning')"
111+
result: true
112+
eventOverrides:
113+
id: "myId"
114+
type: "example.event.success"
115+
- name: Disjunctive Normal Form (2)
116+
expresion: "(id = 'myId' AND type LIKE '%.success') OR (id = 'notmyId' AND source LIKE 'http://%' AND type LIKE '%.warning')"
117+
result: true
118+
eventOverrides:
119+
id: "notmyId"
120+
type: "example.event.warning"
121+
source: "http://localhost.localdomain"
122+
- name: Disjunctive Normal Form (3)
123+
expresion: "(id = 'myId' AND type LIKE '%.success') OR (id = 'notmyId' AND source LIKE 'http://%' AND type LIKE '%.warning')"
124+
result: false
125+
eventOverrides:
126+
id: "notmyId"
127+
type: "example.event.warning"
128+
source: "https://localhost.localdomain"
129+
130+
- name: Conjunctive Normal Form (1)
131+
expression: "(id = 'myId' OR type LIKE '%.success') AND (id = 'notmyId' OR source LIKE 'https://%' OR type LIKE '%.warning')"
132+
result: true
133+
eventOverrides:
134+
id: "myId"
135+
type: "example.event.warning"
136+
source: "http://localhost.localdomain"
137+
- name: Conjunctive Normal Form (2)
138+
expression: "(id = 'myId' OR type LIKE '%.success') AND (id = 'notmyId' OR source LIKE 'https://%' OR type LIKE '%.warning')"
139+
result: true
140+
eventOverrides:
141+
id: "notmyId"
142+
type: "example.event.success"
143+
source: "http://localhost.localdomain"
144+
- name: Conjunctive Normal Form (3)
145+
expression: "(id = 'myId' OR type LIKE '%.success') AND (id = 'notmyId' OR source LIKE 'https://%' OR type LIKE '%.warning')"
146+
result: false
147+
eventOverrides:
148+
id: "notmyId"
149+
type: "example.event.warning"
150+
source: "http://localhost.localdomain"
151+
- name: Conjunctive Normal Form (4)
152+
expression: "(id = 'myId' OR type LIKE '%.success') AND (id = 'notmyId' OR source LIKE 'https://%' OR type LIKE '%.warning')"
153+
result: true
154+
eventOverrides:
155+
id: "myId"
156+
type: "example.event.success"
157+
source: "http://localhost.localdomain"
158+
- name: Conjunctive Normal Form (5)
159+
expression: "(id = 'myId' OR type LIKE '%.success') AND (id = 'notmyId' OR source LIKE 'https://%' OR type LIKE '%.warning') AND (myext = 'customext')"
160+
error: missingAttribute
161+
eventOverrides:
162+
id: "myId"
163+
type: "example.event.success"
164+
source: "http://localhost.localdomain"
165+
166+
167+
168+

0 commit comments

Comments
 (0)