Skip to content

Migrate workflow yaml - #904

Open
PiusKariuki wants to merge 3 commits into
mainfrom
migrate-workflow-yaml
Open

PiusKariuki wants to merge 3 commits into
mainfrom
migrate-workflow-yaml

Conversation

@PiusKariuki

Copy link
Copy Markdown
Contributor

Migrate workflows on between projects in Lightning.

A new section under docs/platform/build & manage workflows that illustrates how to migrate workflows from one project to another on Lightning by exporting and importing YAML.

Closes #903

AI Usage

Please disclose how you've used AI in this work (it's cool, we just want to
know!):

  • I have used Claude Code
  • I have used another model
  • I have not used AI

You can read more details in our
Responsible AI Policy

@lmac-1 lmac-1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Pius! Thank you so much for writing this new entry for the docs. It's looking great. I've added a few small nits that I think should be resolved before merging.

For context, since I wrote the house style document, Megan gave really good feedback that if we are including screenshots, we should add numbers and then text underneath so that we make sure to translate this information. So I think we should update a few of the screenshots to be like that.

Let me know if you have any further questions :)

## Steps to export a workflow
To export a workflow from the source Project:

1. Click on the workflow you want to export.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on Megan's feedback from yesterday, it would be ideal if the numbers match up with the numbers in the screenshots for translations. So, can you update the numbers inside the screenshot to match the numbers in the text?

Image

And perhaps move the screenshot to the end of the numbered instructions?

Comment thread docs/build/migrate-workflows.md Outdated

:::tip Activate workflows after import

Note that the workflow is disabled on import. Click on `Go live` to activate it.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. Not sure if we should be so specific on the button text. That text is there for users with Experimental Features switched on. For everyone else, they'll still see the switch. Not sure what's the best way to handle this. This is because the new sandboxes experience is not completely production-ready yet (which is what causes the "Live" / "Draft" badges)

Image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah sorry I missed this. Let me rectify.

I also noticed that if the workflow is enabled the YAML carries this with it so there is no need to turn it on.

Comment thread docs/build/migrate-workflows.md Outdated
5. Search for the target project in the dropdown and click on it. See that it is added below the dropdown and click on `Save credential`
![projects access](/img/project-added.webp)

If you need to create a new credential, got to your credentials page, then create your new credential and include your target project in the `Projects access` section.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be "go to", not "got to"


:::

![attach credential](/img/attach-credential.webp)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this screenshot, can we instead have numbers 1 and 2 and then underneath, in text you write out what 1 and 2 are, so when we translate it's not missed?

Comment thread docs/build/migrate-workflows.md Outdated
After importing a workflow, each step that referenced a credential on the
source will need to be reconfigured to restore them:

If you own a credential in the source project and you wish to re-use the same in the target project:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if instead, we should update the instructions in "Share Credentials" https://docs.openfn.org/documentation/user-credentials#share-credentials and then link to that, since we're repeating the same area of the app? That would mean moving lines 49-58 (the steps and screenshots) to that section, perhaps reframing in a more generic context, and keeping a one line link here. The part about attaching the credential to each step can stay on this page. What do you think?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I gave this a thought and now that you have raised it I think we should do it.

Comment thread docs/build/migrate-workflows.md Outdated
3. A `View your workflow as YAML code` link will appear on the pop-up. Click on it.
![export YAML](/img/export-yaml.webp)
4. Click on the `Copy Code` button to copy the YAML to your clipboard.
5. If you prefer to store it for later on your computer. Click on the `Download` button.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Step 5 feels like an option rather than a separate step. Could you fold it into step 4?

Click on the Copy Code button to copy the YAML to your clipboard, or the Download button to save the YAML as a file.


![attach credential](/img/attach-credential.webp)

## Common Pitfalls

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this section mainly for clients moving between instances, or between projects on the same instance? I'm asking because the adaptor version entry reads as cross-instance, but the rest of the page is about projects.

Also, line 73 says "the import will fail or the run will not fail". Is one of those clauses a typo?

@PiusKariuki PiusKariuki Oct 9, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is for users moving YAML across projects within an instance. When I think about it GitHub sync is more commonly used while moving workflows across instances. Removing this point.

@lmac-1 lmac-1 assigned PiusKariuki and unassigned lmac-1 Oct 8, 2026
@PiusKariuki
PiusKariuki requested a review from lmac-1 October 9, 2026 10:57
@PiusKariuki PiusKariuki assigned lmac-1 and PiusKariuki and unassigned PiusKariuki and lmac-1 Oct 9, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Write documentation for migrating workflow code

2 participants