Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
cdavernas authored May 17, 2024
2 parents 2d9cc48 + ca10bc3 commit 993915b
Show file tree
Hide file tree
Showing 42 changed files with 502 additions and 466 deletions.
1 change: 1 addition & 0 deletions .ci/examples-readme-hydration/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const disclaimer = `<!--
console.error('Enable to parse JSON or convert it to YAML, output as it is.', ex);
}
}
fileContent = fileContent.trim() + '\n';
readMe = readMe.replace(include[0], fileContent);
};
await fs.promises.writeFile(readMeOutputPath, disclaimer + readMe, { encoding: 'utf8', flag: 'w' });
Expand Down
8 changes: 4 additions & 4 deletions .ci/validation/package-lock.json

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

2 changes: 1 addition & 1 deletion .ci/validation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"author": "CNCF Serverless Workflow Specification",
"license": "ISC",
"devDependencies": {
"@types/jest": "^29.5.10",
"@types/jest": "^29.5.12",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"typescript": "^5.3.2"
Expand Down
2 changes: 1 addition & 1 deletion .ci/validation/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export module SWSchemaValidator {
addFormats(ajv)


const workflowSchemaId = 'https://serverlessworkflow.io/schemas/0.8/workflow.json'
const workflowSchemaId = 'https://serverlessworkflow.io/schemas/0.9/workflow.json'
const schemaPath = '../../../schema'
export const defaultEncoding = 'utf-8'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/schema-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ jobs:
node-version: [21.x]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
Expand Down
67 changes: 28 additions & 39 deletions GOVERNANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,48 +13,38 @@ You can contact the project maintainers at any time by sending an email to the

Main responsibilities of maintainers include:

1) They share responsibility in the project's success.
2) They have made a long-term, recurring time investment to improve the project.
3) They spend that time doing whatever needs to be done, not necessarily what
is the most interesting or fun.
1) Sharing responsibility for the project's success.
2) Making a long-term, recurring time investment to improve the project.
3) Performing necessary tasks, even if they are not the most interesting or fun.

## Reviewers

A reviewer is a core role within the project.
They share in reviewing issues and pull requests. Their pull request approvals
are needed to merge a large code change into the project.
A reviewer is a core role within the project. They share in reviewing issues and pull requests.
Their pull request approvals are needed to merge code changes into the project.

## Emeritus Maintainers

Emeritus maintainers are retired maintainers who have provided valuable contributions to the project in the past but are not able to dedicate the time necessary to be fully active maintainers going forward. While their efforts will be focused elsewhere, it is hoped that they will try to find the time to continue to be active participants in the community by:

1) Providing guidance and mentorship to current maintainers and contributors.
2) Offering historical context and insights based on their past experiences.
3) Participating in discussions and reviews on an advisory basis, without the obligations of active maintainers.

## Adding maintainers

Maintainers are first and foremost contributors that have shown they are
committed to the long term success of a project. Contributors wanting to become
maintainers are expected to be deeply involved in contributing code, pull
request review, and triage of issues in the project for more than three months.

Just contributing does not make you a maintainer, it is about building trust
with the current maintainers of the project and being a person that they can
depend on and trust to make decisions in the best interest of the project.

Periodically, the existing maintainers curate a list of contributors that have
shown regular activity on the project over the prior months. From this list,
maintainer candidates are selected and proposed on the project mailing list.
Only one maintainer per organization is allowed to avoid taking over votes in case of conflicts.

After a candidate has been announced on the project mailing list, the
existing maintainers are given fourteen business days to discuss the candidate,
raise objections and cast their vote. Votes may take place on the mailing list
or via pull request comment. Candidates must be approved by at least 66% of the
current maintainers by adding their vote on the mailing list. The reviewer role
has the same process but only requires 33% of current maintainers. Only
maintainers of the repository that the candidate is proposed for are allowed to
vote.

If a candidate is approved, a maintainer will contact the candidate to invite
the candidate to open a pull request that adds the contributor to the
MAINTAINERS file. The voting process may take place inside a pull request if a
maintainer has already discussed the candidacy with the candidate and a
maintainer is willing to be a sponsor by opening the pull request. The candidate
becomes a maintainer once the pull request is merged.
Maintainers are primarily contributors who have shown a strong commitment to the long-term success of the project. Contributors aspiring to become maintainers are expected to be actively involved in coding, reviewing pull requests, and managing issues for over three months.

Becoming a maintainer is not just about contributing; it involves building trust with the current maintainers and proving to be a reliable decision-maker for the project.

Periodically, the existing maintainers compile a list of contributors who have been consistently active in recent months. From this list, maintainer candidates are selected and proposed via a pull request. To avoid conflicts of interest, only one maintainer per organization is allowed.

Once a candidate is proposed by adding them to the MAINTAINERS file via a pull request, the existing maintainers have fourteen business days to discuss, raise objections, and vote. Votes are cast through pull request comments, and candidates must receive at least 66% approval from the current maintainers.

The process for the reviewer role is similar but requires only 33% approval from current maintainers. Voting is restricted to maintainers of the repository for which the candidate is proposed.

## Adding Emeritus Maintainers

To transition a maintainer to an emeritus role, the process follows the same voting and approval procedures as adding new maintainers, a new PR is created that requires a 66% approval vote from the current maintainers. Once approved, the emeritus maintainer is added to the EMERITUS file and announced to the community.

## Subprojects

Expand Down Expand Up @@ -140,9 +130,8 @@ document for more information about opening pull requests.

## Conflict Resolution

At least 66% approval from the project's maintainers is necessary to merge changes
in the specification. [Lazy consensus](http://communitymgt.wikia.com/wiki/Lazy_consensus)
is considered by maintainers that do not directly express their opinions in the pull request.
To merge changes into the specification, approval from at least one maintainer, other than the pull request's author, is required.
Maintainers who do not explicitly voice their opinions on the pull request within the two-day approval period are assumed to agree through [lazy consensus](http://communitymgt.wikia.com/wiki/Lazy_consensus).

Discussions and voting can be posponed in case one of the maintainers expressed that
they won't be available for personal reasons, e.g. parental leave, vacations, sick leave, etc.
Expand Down
1 change: 0 additions & 1 deletion examples/README_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,6 @@ events:
- contextAttributeName: accountId
- name: ConfirmationCompletedEvent
type: payment.confirmation
kind: produced

```

Expand Down
3 changes: 1 addition & 2 deletions examples/accumulate-room-readings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"id": "roomreadings",
"name": "roomreadings",
"name": "room-readings",
"description": "Room Temp and Humidity Workflow",
"version": "1.0.0",
"specVersion": "0.8",
Expand Down
1 change: 0 additions & 1 deletion examples/applicant-request-decision.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"id": "applicantrequest",
"version": "1.0.0",
"specVersion": "0.8",
"name": "applicant-request-decision-workflow",
Expand Down
1 change: 0 additions & 1 deletion examples/async-function-invocation.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"id": "sendcustomeremail",
"version": "1.0.0",
"specVersion": "0.8",
"name": "send-customer-email-workflow",
Expand Down
1 change: 0 additions & 1 deletion examples/async-subflow-invocation.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"id": "onboardcustomer",
"version": "1.0.0",
"specVersion": "0.8",
"name": "onboard-customer",
Expand Down
18 changes: 9 additions & 9 deletions examples/book-lending.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"id": "booklending",
"name": "booklending",
"name": "book-lending",
"description": "Book Lending Workflow",
"version": "1.0.0",
"specVersion": "0.8",
"start": "book-lending-request",
"constants" : { "WAIT_BEFORE_POLL" : "PT2W"},
"states": [
{
"name": "book-lending-request",
Expand Down Expand Up @@ -101,10 +101,13 @@
"bookid": "${ .book.id }",
"lender": "${ .lender }"
}
},
"sleep" : {
"after" : "$CONST.WAIT_BEFORE_POLL"
}
}
],
"transition": "sleep-two-weeks"
"transition": "get-book-status"
},
{
"name": "cancel-request",
Expand All @@ -118,15 +121,12 @@
"bookid": "${ .book.id }",
"lender": "${ .lender }"
}
},
"sleep" : {
"after" : "$CONST.WAIT_BEFORE_POLL"
}
}
],
"transition": "sleep-two-weeks"
},
{
"name": "sleep-two-weeks",
"type": "sleep",
"duration": "PT2W",
"transition": "get-book-status"
},
{
Expand Down
3 changes: 1 addition & 2 deletions examples/car-vitals-checks-subflow.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"id": "vitalscheck",
"name": "vitalscheck",
"name": "vitals-check",
"description": "Car Vitals Check",
"version": "1.0.0",
"specVersion": "0.8",
Expand Down
3 changes: 1 addition & 2 deletions examples/car-vitals-checks.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"id": "checkcarvitals",
"name": "checkcarvitals",
"name": "check-car-vitals",
"description": "Check Car Vitals Workflow",
"version": "1.0.0",
"specVersion": "0.8",
Expand Down
1 change: 0 additions & 1 deletion examples/check-inbox-periodically.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"id": "check-inbox",
"name": "check-inbox",
"version": "1.0.0",
"specVersion": "0.8",
Expand Down
3 changes: 1 addition & 2 deletions examples/continuing-as-a-new-execution.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"id": "notifycustomerworkflow",
"name": "notifycustomerworkflow",
"name": "notify-customer-workflow",
"description": "Notify Customer",
"version": "1.0.0",
"specVersion": "0.8",
Expand Down
35 changes: 35 additions & 0 deletions examples/curl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "curlgoogle",
"version": "1.0.0",
"specVersion": "0.8",
"description": "Curl Google",
"start": "curl",
"functions": [
{
"name": "curl-google",
"type": "http",
"operation": {
"method": "GET",
"uri": "https://www.google.com/search?q={query}"
}
}
],
"states": [
{
"name": "curl",
"type": "operation",
"actions": [
{
"name": "do-curl",
"functionRef": {
"refName": "curl-google",
"arguments": {
"query": "${ .query }"
}
}
}
],
"end": true
}
]
}
3 changes: 1 addition & 2 deletions examples/event-based-greeting.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"id": "eventbasedgreeting",
"version": "1.0.0",
"specVersion": "0.8",
"name": "Event Based Greeting Workflow",
"name": "event-based-greeting-workflow",
"description": "Event Based Greeting",
"start": "greet",
"events": [
Expand Down
20 changes: 11 additions & 9 deletions examples/event-based-service-invocation.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"id": "vet-appointment-workflow",
"name": "vet-appointment-workflow",
"description": "Vet service call via events",
"version": "1.0.0",
Expand All @@ -9,14 +8,12 @@
{
"name": "make-vet-appointment",
"source": "VetServiceSource",
"type": "events.vet.appointments",
"kind": "produced"
"type": "events.vet.appointments"
},
{
"name": "vet-appointment-info",
"source": "VetServiceSource",
"type": "events.vet.appointments",
"kind": "consumed"
"type": "events.vet.appointments"
}
],
"states": [
Expand All @@ -26,10 +23,15 @@
"actions": [
{
"name": "make-appointment-action",
"eventRef": {
"produceEventRef": "make-vet-appointment",
"data": "${ .patientInfo }",
"consumeEventRef": "vet-appointment-info"
"publish": {
"event": "make-vet-appointment",
"data": "${ .patientInfo }"
}
},
{
"name": "wait-appointement-confirmation",
"subscribe": {
"event": "vet-appointment-info"
},
"actionDataFilter": {
"results": "${ .appointmentInfo }"
Expand Down
1 change: 0 additions & 1 deletion examples/event-based-transitions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"id": "eventbasedswitchstate",
"version": "1.0.0",
"specVersion": "0.8",
"name": "event-based-switch-transitions",
Expand Down
3 changes: 1 addition & 2 deletions examples/filling-a-glass-of-water.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"id": "fillglassofwater",
"name": "fillglassofwater",
"name": "fill-glass-of-water",
"description": "Fill glass of water workflow",
"version": "1.0.0",
"specVersion": "0.8",
Expand Down
3 changes: 1 addition & 2 deletions examples/finalize-college-application.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"id": "finalize-college-application",
"name": "finalizeCollegeApplication",
"name": "finalize-college-application",
"version": "1.0.0",
"specVersion": "0.8",
"start": "finalize-application",
Expand Down
1 change: 0 additions & 1 deletion examples/greeting.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"id": "greeting",
"version": "1.0.0",
"specVersion": "0.8",
"name": "greeting-workflow",
Expand Down
1 change: 0 additions & 1 deletion examples/handle-car-auction-bids.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"id": "handle-car-auction-bid",
"version": "1.0.0",
"specVersion": "0.8",
"name": "handle-car-auction-bid",
Expand Down
3 changes: 1 addition & 2 deletions examples/hello-world.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"id": "helloworld",
"version": "1.0.0",
"specVersion": "0.8",
"name": "Hello World Workflow",
"name": "hello-world-workflow",
"description": "Inject Hello World",
"start": "hello-state",
"states": [
Expand Down
Loading

0 comments on commit 993915b

Please sign in to comment.