OpenFn / lightning

OpenFn/Lightning ⚡️ is the newest version of the OpenFn DPG and provides a web UI to visually manage complex workflow automation projects.
https://openfn.github.io/lightning/
GNU Lesser General Public License v3.0
138 stars 39 forks source link

Finalize GitHub Sync #2352

Open christad92 opened 4 months ago

christad92 commented 4 months ago

Appetite: 5 days

See this example below, currently a job looks like this:

 Notify-CHW-upload-successful:
       name: Notify-CHW-upload-successful
       adaptor: @openfn/language-http@latest
       enabled: true
       credential:
       globals:
       body: |
         fn(state => state);
We'd expect users to set the body to the following, and for the deploy to still work. 

 Notify-CHW-upload-successful:
       name: Notify-CHW-upload-successful
       adaptor: @openfn/language-http@latest
       enabled: true
       credential:
       globals:
       body: Notify-CHW-upload-successful.js;

Notify-CHW-upload-successful.js should contain `fn(state => state)`;

Bugs to be fixed:

Nice to haves: The following issues are nice to have and should not be considered a priority for this building cycle

Other consideration based on thunderbolt and plan limits.

stuartc commented 4 months ago

Instead of putting a path directly in the body key (which would also be a string value), we use this pattern instead:

  job-xyz:
    ...
    body:
      path: ../my-job.js

That way we can tell that the body is not available directly under the key much more easily, and leaves room for other features.

If the body is an object, and doesn't have a path key then we throw an error.

Note that this path is relative to the project.yaml, and not the current working directory.

DrCord commented 3 months ago

The link to the issue GitHub sync button available, but subscription doesn't allow github sync issue above is broken. I am interested in the issue, but cannot find it when searching.

I've found a related bug: When the GitHub sync button is available without a subscription, while it does have an icon on hover that tells the user it they should not click it (circle with slash), it is still clickable and allows the user to go to GitHub to verify OAuth, which links back to the OpenFn instance on completion and then loads forever... However, if you refresh the page at that point, you get a page where GitHub sync says it's not enabled in the top banner, but you've got the options to select a GitHub installation - fairly confusing state too get a user into. image

christad92 commented 3 months ago

2462

taylordowns2000 commented 1 week ago

Noting that after #2707 and #2462 @midigofrank and @stuartc will reasses this epic to determine if/what still needs to be done.