Skip to content

feat: load OpenFn collections from GitHub JSON (#250) - #439

Open
Tarekchehahde wants to merge 1 commit into
MSF-OCG:mainfrom
Tarekchehahde:feat/250-openfn-collections-load
Open

feat: load OpenFn collections from GitHub JSON (#250)#439
Tarekchehahde wants to merge 1 commit into
MSF-OCG:mainfrom
Tarekchehahde:feat/250-openfn-collections-load

Conversation

@Tarekchehahde

Copy link
Copy Markdown

Summary

  • Add scripts/load_openfn_collections.sh (invoked after successful openfn deploy in run_msf_addons.sh).
  • Add scripts/prepare_openfn_collection_batches.py to chunk metadata JSON (arrays → *-value-N keys; size-limited --items batches per Aisha's comment on Add OpenFn Collections Loading from GitHub JSON to Deployment Script #250).
  • Document env vars in README §5.2.2.3; wire OPENFN_API_KEY in docker-compose-openfn.yml.

Behaviour

  • Skips when OPENFN_COLLECTIONS_JSON_URL is unset.
  • Verifies collection exists; prints guidance if missing (create via YAML + redeploy).
  • Clears existing items (openfn collections remove … '*') then uploads batches.
  • Errors are logged; deployment is not aborted.

Test plan

  • Set env vars in concatenated.env with a raw GitHub JSON URL
  • Run local deploy; confirm collection items appear in OpenFn UI
  • Local smoke: prepare_openfn_collection_batches.py batch expansion

Fixes #250

Made with Cursor

Add chunked collections seeding after openfn deploy, with env-driven
GitHub fetch, collection clear/set via CLI, and README documentation.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add OpenFn Collections Loading from GitHub JSON to Deployment Script

1 participant