Skip to content

Commit e70c704

Browse files
authored
document release process (#541)
1 parent 577d3dc commit e70c704

2 files changed

Lines changed: 61 additions & 10 deletions

File tree

CONTRIBUTING.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,28 @@ Want to contribute to OpenFn Apollo? Read on.
55
For technical details about the server architecture (including how the JS server
66
calls python modules), see the main readme.
77

8+
## Pull requests
9+
10+
When your fix or feature is completed, raise a pull request against
11+
[openfn/apollo](https://www.github.com/openfn/apollo).
12+
13+
Make sure to include a changeset: run `bun changeset`, follow the prompts, and
14+
commit the changes.
15+
16+
Changesets are release notes which are saved to a file in the repo. When the
17+
release is prepared, all changesets are assembled into the changelog and the
18+
server version is increased automatically.
19+
20+
To write a good changeset:
21+
22+
- Keep it short, usually just one sentence.
23+
- Only include a single feature/fix/change per changeset
24+
- You can include as many different changesets as you like
25+
- Describe of the changes from the end user's perspective.
26+
- Do not make it a sales pitch, do not sell the change.
27+
- Do not justify or explain the change. No why or because.
28+
- If there are breaking changes for users, include a migration guide.
29+
830
## Adding a Python Module
931

1032
Your python service can be your own little world inside Apollo. We give you a
@@ -139,8 +161,3 @@ To add models as python packages:
139161
- Copy the `.whl` file to `/models` at the repo root
140162
- Add the file to poetry (you should be able to do
141163
`poetry add models/<my-model>.whl`)
142-
143-
## Releasing
144-
145-
When your contribution is ready, please open a Pull Request at
146-
[openfn/gen](https://www.github.com/openfn/gen)

README.md

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ To see an index of the available language services, head to `localhost:3000`.
4747

4848
## Debugging
4949

50-
The server defaults to port 3000. You can test any service directly with curl to confirm Apollo is working independently of Lightning (or any other client).
50+
The server defaults to port 3000. You can test any service directly with curl to
51+
confirm Apollo is working independently of Lightning (or any other client).
5152

5253
For example, to trigger a `workflow_chat` stream:
5354

@@ -57,13 +58,22 @@ curl -N -X POST http://localhost:3000/services/workflow_chat/stream \
5758
-d '{"content":"make a simple http workflow","history":[],"api_key":"<your-anthropic-api-key>"}'
5859
```
5960

60-
The `api_key` field is your Anthropic API key. If `ANTHROPIC_API_KEY` is already set in your `.env`, you can omit it. In Lightning, this is configured via the `ANTHROPIC_API_KEY` environment variable and passed through to Apollo on each request.
61+
The `api_key` field is your Anthropic API key. If `ANTHROPIC_API_KEY` is already
62+
set in your `.env`, you can omit it. In Lightning, this is configured via the
63+
`ANTHROPIC_API_KEY` environment variable and passed through to Apollo on each
64+
request.
6165

62-
The `-N` flag disables buffering so SSE events appear as they arrive. You should see a stream of `event: log` lines followed by `event: complete`. An `event: error` response means the issue is inside Apollo.
66+
The `-N` flag disables buffering so SSE events appear as they arrive. You should
67+
see a stream of `event: log` lines followed by `event: complete`. An
68+
`event: error` response means the issue is inside Apollo.
6369

64-
If the stream returns successfully here but Lightning isn't receiving it, the issue is on the Lightning side -- check that `APOLLO_ENDPOINT=http://localhost:3000` is set correctly in Lightning's environment (no trailing slash).
70+
If the stream returns successfully here but Lightning isn't receiving it, the
71+
issue is on the Lightning side -- check that
72+
`APOLLO_ENDPOINT=http://localhost:3000` is set correctly in Lightning's
73+
environment (no trailing slash).
6574

66-
To check API key connectivity (Anthropic, OpenAI, Pinecone), hit the status service:
75+
To check API key connectivity (Anthropic, OpenAI, Pinecone), hit the status
76+
service:
6777

6878
```bash
6979
curl http://localhost:3000/services/status
@@ -224,3 +234,27 @@ docker run -p 3000:3000 openfn-apollo
224234

225235
See the Contribution Guide for more details about how and where to contribute to
226236
the Apollo platform.
237+
238+
## Release
239+
240+
New releases are assembled as Docker images whenever a version tag of the form
241+
`@openfn/apollo@x.y.x` is pushed to GitHub.
242+
243+
This tag is automatically generated upon merging to main.
244+
245+
Github's `main` should represent the latest production version of apollo.
246+
Ideally, releases should be assembled on a branch - usually `release/next` or
247+
`release/1.2.3`. But this is not required - releases can be cut straight from a
248+
fix or feature branch, or even from main.
249+
250+
To release a new apollo version:
251+
252+
- Checkout the branch that contains the release
253+
- Run `bun changeset version`
254+
- (if there are no changesets, you can either run `bun changeset` to create one,
255+
or manually bump `package.json` and update `changelog.md`)
256+
- Sanity check the new version number and changelog updates, just to be sure
257+
there's no funny stuff.
258+
- Commit changes and push
259+
- When the PR is merged to main, a new tag is generated and a new Docker image
260+
is built

0 commit comments

Comments
 (0)