Skip to content

Commit 326d04c

Browse files
Security updates + next release (#802)
* Bump axios from 1.15.2 to 1.16.0 (#795) Bumps [axios](https://github.com/axios/axios) from 1.15.2 to 1.16.0. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](axios/axios@v1.15.2...v1.16.0) --- updated-dependencies: - dependency-name: axios dependency-version: 1.16.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump shell-quote from 1.8.3 to 1.8.4 (#799) Bumps [shell-quote](https://github.com/ljharb/shell-quote) from 1.8.3 to 1.8.4. - [Changelog](https://github.com/ljharb/shell-quote/blob/main/CHANGELOG.md) - [Commits](ljharb/shell-quote@v1.8.3...v1.8.4) --- updated-dependencies: - dependency-name: shell-quote dependency-version: 1.8.4 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump uuid from 11.1.0 to 11.1.1 (#793) Bumps [uuid](https://github.com/uuidjs/uuid) from 11.1.0 to 11.1.1. - [Release notes](https://github.com/uuidjs/uuid/releases) - [Changelog](https://github.com/uuidjs/uuid/blob/v11.1.1/CHANGELOG.md) - [Commits](uuidjs/uuid@v11.1.0...v11.1.1) --- updated-dependencies: - dependency-name: uuid dependency-version: 11.1.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * update docusaurus * Bump webpack-dev-server from 5.2.2 to 5.2.4 (#791) Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 5.2.2 to 5.2.4. - [Release notes](https://github.com/webpack/webpack-dev-server/releases) - [Changelog](https://github.com/webpack/webpack-dev-server/blob/main/CHANGELOG.md) - [Commits](webpack/webpack-dev-server@v5.2.2...v5.2.4) --- updated-dependencies: - dependency-name: webpack-dev-server dependency-version: 5.2.4 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Joe Clark <joe@openfn.org> * Bump mermaid from 11.10.1 to 11.15.0 (#784) Bumps [mermaid](https://github.com/mermaid-js/mermaid) from 11.10.1 to 11.15.0. - [Release notes](https://github.com/mermaid-js/mermaid/releases) - [Commits](https://github.com/mermaid-js/mermaid/compare/mermaid@11.10.1...mermaid@11.15.0) --- updated-dependencies: - dependency-name: mermaid dependency-version: 11.15.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump brace-expansion from 1.1.11 to 5.0.6 (#782) Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 1.1.11 to 5.0.6. - [Release notes](https://github.com/juliangruber/brace-expansion/releases) - [Commits](juliangruber/brace-expansion@1.1.11...v5.0.6) --- updated-dependencies: - dependency-name: brace-expansion dependency-version: 5.0.6 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * basic docs for merge conflicts (#801) --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 266d2c6 commit 326d04c

4 files changed

Lines changed: 1005 additions & 762 deletions

File tree

docs/build-for-developers/cli-sync.md

Lines changed: 58 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ first (determined by the `start` key), and it defines a single edge to
143143

144144
The actual code for each step lives in its own .js file. You can modify the code
145145
freely and sync it back to the server any time. If you want to rename a step,
146-
make sure to update the file name of the step and the path in the
147-
`expression` key in `workflow.yaml`.
146+
make sure to update the file name of the step and the path in the `expression`
147+
key in `workflow.yaml`.
148148

149149
### openfn.yaml
150150

@@ -172,8 +172,8 @@ for help setting up a token.
172172

173173
If you connect to multiple OpenFn projects or apps, you can create a `.env` file
174174
and set any environment variables you need there. The CLI will load this file
175-
and report which keys it's using. Values in your `.env` file will be preferred to
176-
those defined in your system.
175+
and report which keys it's using. Values in your `.env` file will be preferred
176+
to those defined in your system.
177177

178178
You can also pass `--api-key` directly as a flag to most commands.
179179

@@ -339,6 +339,60 @@ You can merge two projects locally with `openfn project merge`, and deploy the
339339
resulting project to the app (you'll likely have to force push the change). This
340340
is useful for conflict resolution.
341341

342+
## Resolving Merge Conflicts
343+
344+
Sometimes merging a sandbox can risk overwriting changes in the target project.
345+
This can happen if a workflow in the main project changed _after_ the sandbox
346+
was recreated - so the sandbox doesn't know about it. Merging will cause that
347+
change on main to be lost.
348+
349+
You can resolve these conflicts locally using the CLI and git (or equivalent
350+
version control), then push the resolved project back to the app.
351+
352+
:::tip
353+
354+
You do not need GitHub repo to use git!
355+
356+
Git is a simply a program that runs in your shell on your local system.
357+
358+
GitHub is an application hosted in the cloud which a) provides remote access to
359+
git repositories and b) provides a rich UI on top of a git-controlled file
360+
system.
361+
362+
:::
363+
364+
Here's how to do it with git. This example assumes you are trying to merge a
365+
sandbox `dev` into your main project `main`.
366+
367+
- Make sure you have a local folder ready to work in. It needs to be a git
368+
repository. Run `git init` in any folder to set git up (you do not need a
369+
connected GitHub repo)
370+
- Pull your main project locally: `openfn project pull <main-uuid>` (assumes
371+
OPENFN_API_KEY is set)
372+
- Commit your changes to git:
373+
`git add . && git commit -m "checkout main project"`
374+
- Now pull your sandbox locally: `openfn project pull <dev-uuid>`
375+
- This will set your local `workflows/` folder to look like your sandbox
376+
- Running `git status` and `git diff` now will show you all the changes which
377+
would be applied to the main project once the merge is made
378+
- Check that you are happy with the diffs. You may want to revert some files to
379+
look like main (`git checkout main workflows/my-workflow/job.js`). Or you may
380+
want to manually mix changes from both projects.
381+
- Once you're done, push the project to the app with the CLI
382+
`openfn project deploy main`
383+
- You can commit your changes to git if you like (but for the purposes of this
384+
example it's not necessary)
385+
386+
For more complex changes, you might want to try the following approach:
387+
388+
- Pull and commit `main` locally
389+
- Create a new branch, and pull and commit `dev` to that branch
390+
- Checkout the main branch again: `git checkout main`
391+
- Merge the `dev` branch into main: `git merge dev`
392+
- Resolve any conflicts raised by git (the git conflict should represent any
393+
place where main and the sandbox have both made changes)
394+
- When you're finished, use the CLI to force-deploy your changes
395+
342396
## GitHub
343397

344398
You can configure a Project to sync automatically to GitHub. This means that

0 commit comments

Comments
 (0)