Testing new adaptor on local environment with Lightning

I really need help for this:

  • I have OpenFn/Lightning project running on my local machine [dockerized PosgreSQL (I got Postgres running on local environment, but doesn’t want to config the .env file for running on this Database), server runs by mix]
  • I have created a new adaptor following documents on OpenFN/adaptors [not yet public, still keep it locally]

→ How can I test this new adaptor on Lightning? I mean: create jobs based on functions I exported on my adaptor (for localize system with ngrok url)?

Hi, thanks for reaching out on community!

To answer you questions:

  1. If you would like to run Lightning using your .env variables, make sure you are running it with the command env $(cat .env | grep -v "#" | xargs ) iex -S mix phx.server (instead of iex -S mix phx.server)
  2. Currently, there is no set path to testing a locally-built adaptor on Lightning itself. You can instead test new adaptors by using the CLI, and specifying the path to the adaptor you would like to use with the -a flag (see here for more info).

Hope this helps!

Amber

Hi Amber,

Thank you for your quick answer, really appreciate this.

So, the only testing method now is to creating jobs and doing cli. I and my team would really love to see it in action, the credentials and all the views.

Thanks,
Nhatnm

Hi Nhat,

That’s correct, yes. If you would like to see your adaptor in action, please submit a pull request on the adaptors repository so that we can review and release it.

Alternatively, you could look into the Lightning AdaptorService and alter it so that it uses your local adaptor.

I’ve created an issue for testing new adaptors on a local Lightning instance, so that we can keep this request up for consideration as we progress through our backlog. However, please do note that Lightning is currently still in development - which means we have an existing list of features which need to be delivered so that we can get to production-readiness as soon as possible before we start considering new features and improvements.

On another note, I would love to ask you a few more questions to understand how you’re currently using Lightning - would you be free for a short user interview in the coming weeks? If so, I’ve linked my calendar - please do book in a slot: Calendly - Amber Rignell

All the best,

Amber

Hi Amber,

Already set a meeting, hope our conversation can be satisfied for both of us.

Best,

NhatNM

1 Like