Skip to content

Conversation

@josephjclark
Copy link
Collaborator

@josephjclark josephjclark commented Jan 9, 2026

Short Description

This PR allows users to run a workflow within a project by name:

openfn process-patients

This is great because when you pull a project today, you have a super long command like:

openfn ./workflows/process-patients/process-patients.yaml 

This also gives us the opportunity to auto-load the credential map and collections config from the Workspace

Fixes #935 #621

Implementation Details

  • Uses the checked-out project on disk (not the project yaml)
  • Sets collections endpoint to match the project
  • Auto-loads the credential map
  • Credential map and collections can both work at the same time. This is a bit fiddly because they expect configuration to be a different shape

AI Usage

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

  • Code generation (copilot but not intellisense)
  • Learning or fact checking
  • Strategy / design
  • Optimisation / refactoring
  • Translation / spellchecking / doc gen
  • Other
  • I have not used AI

You can read more details in our Responsible AI Policy

@josephjclark josephjclark changed the base branch from main to release/next January 9, 2026 11:26
@github-project-automation github-project-automation bot moved this to New Issues in v2 Jan 9, 2026
@josephjclark
Copy link
Collaborator Author

josephjclark commented Jan 9, 2026

Still to do:

  • add credential map to a Workspace?, Project? and Workflow
  • default credentials endpoint from Project (but allow explicit override)

@josephjclark
Copy link
Collaborator Author

josephjclark commented Jan 12, 2026

Working great with staging now and a credential map:

joe@jc-mint:~/.../staging-joseph-demo$ openfnx creds-test
[CLI] ♦ Versions:
         ▸ node.js     22.12.0
         ▸ cli         branch/execute-project-2
[CLI] ♦ Imported 2 env vars from .env file
[CLI] ✔ Installing packages...
[CLI] ✔ Installation complete in 1ms
[CLI] ✔ Compiled all expressions in workflow
[JOB] ℹ {
  "credentials": {
    "user": "joe"
  }
}
[R/T] ✔ show creds completed in 306ms
[CLI] ✔ State written to creds-test/output.json
[CLI] ✔ Finished in 383ms ✨

@josephjclark
Copy link
Collaborator Author

execute should work perfectly well with v1 workflows, right? Let's make sure we have an integration test.

@josephjclark josephjclark marked this pull request as ready for review January 12, 2026 18:38
Turns out test order is important, so it was passing with .only but failing en masse
configuration uuids as numbers break things
@josephjclark josephjclark merged commit d1a0e7c into release/next Jan 13, 2026
6 checks passed
@josephjclark josephjclark deleted the execute-project-2 branch January 13, 2026 14:51
@github-project-automation github-project-automation bot moved this from New Issues to Done in v2 Jan 13, 2026
josephjclark added a commit that referenced this pull request Jan 14, 2026
* runtime: update error message

* changeset

* Include start node when pulling workflows, plus options refactor (#1214)

* runtime: support first-class start key

* drop requirement for top level workflow key

* project: refactor support for the start key

* fix tests

* fix an issue where input path isn't parsed correctly

* cli: suppress adaptor warning when running a yaml file

* new tests for running yaml files

* fix more tests

* handle options on a non-nested workflow yaml

* Execute workflow through a project (#1216)

* allow workflow to be executed directly through workspace

* types

* remove default job.js

* changeset

* integration test

* another integration test

* support credentials on workspace config

* remove mock

* project: better handling of start in workflow.yaml

* apply credentials map

* add integration test for execute + credetial map

* fix test

* remove unused test

* format

* go deep on input tests

* throw if workflow not found

* project: fix an issue loading alias for a v1 project

* update v1 integration test

* fix integration test

* better credential map handling

* fix test

It was secretly failing all along

* ensure collections and credential map can both be set

* changesets

* test tweak

* more integration test tweaks

* fix integration tests yet again

Turns out test order is important, so it was passing with .only but failing en masse

* change  v2 test order

* let -> const

* update v2 test

configuration uuids as numbers break things

* yet another test fix

* fix -o alias on output

* versions: cli@1.12.0, worker@1.21.1

* fix output

* add missing diff

* restore  env as an alias

* restore pull --beta

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

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants