CLI: Deploy straight from yaml - #1481
Draft
josephjclark wants to merge 10 commits into
Draft
Conversation
It's wrong, the mock must not change
Several things wrong
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Collaborator
Author
|
Right something I need to think about here if you post a yaml directly, how do we know it's a new project and you don't just want to force push an update? Presumanly you should be able to manuaally edit the yaml file and force push it from the file. A regular deploy will update from the file system but why not just edit the yaml? You can pass --new to force it but eh it should be obvious right? The project is new if either
So let's add a little automation around that |
…deploy Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Collaborator
Author
|
@midigofrank just a headsup that I'm close to getting this closed out - expecting to release tomorrow |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Short Description
This PR enables users to run a deploy from a file: either an exported project.yaml (from the app) or from A single v2 state file (the thing created when fetching a project).
Note that if you try and deploy a project to the same instance and the same UUID, it'll just override. In this case you have to pass
--newor set a new name.A side-effect of this work is that you can now edit a local project.yaml file and deploy it directly to lightning - previously the CLI didn't allow this because a deploy would re-build the project.yaml from the local filesystem. Being able to modify the yaml directly is probably a useful escape hatch. But one I'll leave undocumented for now.
Fixes #1264
QA Notes
To test this ( I recommend running against local or at least staging)
You can set
OPENFN_ENDPOINTandOPENFN_API_KEYenv vars to configure deploy targets and access and stuff..envfiles work.Scenario 1 - deploy an exported project
openfn project deploy downlaoded-project.yaml --name my-duplicateScenario 2 - re-deploy an existing project
openfn project pull <uuid> --alias ogog@app.openfn.org.yamlopenfn project deploy ./projects/og@app.openfn.org.yaml --name my-duplicateAI Usage
Please disclose whether you've used AI anywhere in this PR (it's cool, we just
want to know!):
You can read more details in our
Responsible AI Policy