Export projects as .zip (yaml, state, config)
Open
Nobody has claimed this yet.
- Dominant language
- Elixir
- Stars
- 296
- Forks
- 86
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 50
Description
User Story
- As a user that is setting up version control for an already existing project,
- I'd like to be able to export a whole directory that I can immediately use as a git repo
- To save time and make clearer the process for "linking an existing project" to git.
Details
- This builds on #249, which allows users to export their current project configuration as a
.yamlfile. That.yamlfile can be use to do new deployments but it can't be used to immediately start updating an existing project. (In this sense, it's good for portability but not adding version control to existing projects.) - The ideal repo structure for version controlling an OpenFn project includes at least a
project.yaml, a.state.jsonfile, and aconfiguration.jsonfile without an API token. (The API token will be passed in manually, or via GitHub secrets if this repo is being used with a GitHub action as in #250 ) - The project.yaml export functionality has been delivered in #249, the
.state.jsonfunctionality is available via the projects API (and is used by the CLI when deploying) and theconfiguration.jsoninformation can be inferred by the current Lightning deployment and decisions—e.g., what will we call the.state.jsonfile, what will we call theproject.yamlfile, and what is the api endpoint of the current instance:https://app.openfn.org/apior whatever.)
Implementation notes
- Start by reviewing the current export as YAML feature.
- Read through the export as ZIP feature from V1
- Test your zip export by opening the newly downloaded folder and running
OPENFN_API_KEY=<<yourkey>> openfn deploy -c configuration.json
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the current export-as-YAML feature, then read the linked V1 export-as-ZIP implementation in export_controller.ex. Confirm the project API data needed for .state.json and configuration.json, excluding the API token. Done means the downloaded ZIP contains project.yaml, .state.json, and configuration.json and works with the documented openfn deploy command.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100