Skip to content

Commit

Permalink
Add notes on disabling workflows and GH sync
Browse files Browse the repository at this point in the history
  • Loading branch information
ritazagoni committed Jan 27, 2025
1 parent 4342bf0 commit f473cf2
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 12 deletions.
27 changes: 23 additions & 4 deletions docs/migration/automated-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,36 @@ project configuration, including any Workflows already configured on v2).

![Workflows Added](/img/migration_workflow_pasted.png)

9. Finally, once you're happy with your new v2 `project.yaml` file, it's time to
deploy the new config to your v2. Run the following command in the CLI to
_deploy_.
9. You may want to disable all of your workflows at this point, so that when
they're deployed to v2 they are in a disabled state by default. This also
allows you to import all of your workflows regardless of how many active
workflows your v2 subscription allows for. To do this, find all the
`triggers` in your `project.yaml` (by default, they will be set to `true`),
and set them to `false`:

```yaml
workflows:
Sample-Workflow:
name: Sample Workflow
jobs:

triggers:
webhook:
type: webhook
enabled: false
```
10. Finally, once you're happy with your new v2 `project.yaml` file, it's time
to deploy the new config to your v2 project. Run the following command in
the CLI to _deploy_.

```
openfn deploy -c config.json
```
When prompted, confirm you want to deploy by typing `y` ("yes").
10. If successfully, verify the new Project config on your v2 app.
10. If successful, verify the new Project config on your v2 app.
:::tip Questions?
Expand Down
30 changes: 22 additions & 8 deletions docs/migration/migration-steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ decisions. For customized migration support, ask your questions on our
version control. Follow [this guide](../manage-projects/link-to-gh.md) to
learn how it works and set it up.

:::warning Turn off GitHub sync on v1 before setting it up on v2 If you're
using the same GitHub repo and branch for both your v1 and v2 project,
disable GitHub sync on v1 _before_ you enable it on v2. Otherwise every
change you still make on v1 will trigger a GitHub > OpenFn sync on v2,
overwriting any changes you may not have synced yet from your v2 project to GitHub.

:::

:::warning GitHub sync works differently in v2

Once the GitHub sync is live, consider that all changes will be synced with
Expand Down Expand Up @@ -72,21 +80,27 @@ decisions. For customized migration support, ask your questions on our
adjusted your Project Settings.
14. When all Workflows run successfully, update each Step in your Workflows to
use a "production" Credential to connect to live systems.
15. While you're testing, you may be using [Path Conditions](../build/paths.md) to allow
only test data, such as `test_case == yes`. If you then want to exclude test
data from your production systems, don't forget to update edge conditions,
eg. `test_case == no`. Check out [this guide(https://docs.openfn.org/documentation/converting-triggers#converting-message-filters)] for a specific example.
15. While you're testing, you may be using [Path Conditions](../build/paths.md)
to allow only test data, such as `test_case == yes`. If you then want to
exclude test data from your production systems, don't forget to update edge
conditions, eg. `test_case == no`. Check out [this
guide(https://docs.openfn.org/documentation/converting-triggers#converting-message-filters)]
for a specific example.
16. If webhooks are used in your source applications, update the webhook
configurations in these apps to point to your v2 OpenFn Workflows (you can
locate your Workflow's new webhook endpoint URL by clicking n the Trigger).
17. You’re now done with your new v2 Project setup! You can "turn on" your
Workflows and monitor usage on your
[Workflows Dashboard](../manage-projects/workflow-dashboard.md). Now time to
shut down your v1 project.
18. Turn "off" your Jobs on v1 and delete the GitHub connection in your v1
Project Settings to disable version control.
19. You have the option to export some of your v1 data: `Messages` and `Run History` for
reference or archival. To do this, visit the `Downloads` page in your v1 project. Your most recent downloadable `receipts archives` and `runs archives` are at the bottom of the export list. You can generate a new export by navigating to the `Inbox` or `Activity History` page, filtering your view to query the desired data to export, and then select the cloud ☁ icon to `Export to csv`.
18. Turn "off" your Jobs on v1.
19. You have the option to export some of your v1 data: `Messages` and
`Run History` for reference or archival. To do this, visit the `Downloads`
page in your v1 project. Your most recent downloadable `receipts archives`
and `runs archives` are at the bottom of the export list. You can generate a
new export by navigating to the `Inbox` or `Activity History` page,
filtering your view to query the desired data to export, and then select the
cloud ☁ icon to `Export to csv`.
20. Finally, when ready, request to delete your project on v1. To do this, go to
your v1 `Project Settings` and select the `Delete Project` button.

Expand Down

0 comments on commit f473cf2

Please sign in to comment.