Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support adaptors with version @next #2208

Open
josephjclark opened this issue Jun 18, 2024 · 3 comments
Open

Support adaptors with version @next #2208

josephjclark opened this issue Jun 18, 2024 · 3 comments

Comments

@josephjclark
Copy link
Contributor

josephjclark commented Jun 18, 2024

I need help!

I am implementing a feature where adaptors may be pre-released with the version @next.

Background

Prerelease adaptors will be developed by an engineer and allow early-access to the adaptor. This lets us run QA inside lightning.

At the moment, we tend to release an adaptor, have implementation try it out in lightning, and then hive feedback which maybe results in a new PR. Not a good process.

Adaptors will be published to npm with the @next tag.

Not all adaptors will have @next tagged builds.

Implementation Notes

Worker support is added in OpenFn/kit#716

Lightning needs to provide access to the next release, if appropriate, in the adaptors dropdown. Something like this:

image

In the select, the next version should be at index 0, the latest version should be at index 1, and all other versions from 2+.

You can literally send next to the worker like a full semver string. The worker knows what to do with it and will handle caching and autoinstalling elegantly.

Lightning's adaptor picker should ignore versions with the -next-<hash> suffix. This is a redundancy that means if a version somehow fails to be deprecated by automation, it won't appear in the drop-down list. You need a regex like /-next-(.+)/

@josephjclark

This comment was marked as resolved.

@josephjclark
Copy link
Contributor Author

We may also have to solve this, otherwise we'll have to manually restart version every time we release a next #2209

Actually, it's only the FIRST prerelease that's sensitive. Once next is in the drop down list, the worker will handle versioning. We just need lightning to add next to the list as soon as possible, and also remove it from the list once it's released

@josephjclark
Copy link
Contributor Author

I am a little concerned about this use-case:

  • I write my step with the @next adaptor version
  • Everything goes great, the adaptor gets merged, the @next tag gets deprecated, a new @latest is released
  • But the step is still locked to @next, which no longer exists, so the workflow will fail.

I am not sure what to do about this one. I can't think of any way to auto-migrate steps from next to latest on release. It's going to have to be on the user to go in and update the version - which is annoying because last time they looked at the workflow, it worked great!

We also can't not deprecate the old @next packages - even if we did, the adaptor would slide onto the NEXT @next when it's released, which can also cause problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: New Issues
Development

No branches or pull requests

1 participant