-
Notifications
You must be signed in to change notification settings - Fork 69
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
SPIKE: What's involved in serving multiple versions of the Hub API? #1444
Comments
FYI @edgarrmondragon I've added to the engineering board cc @seth-meltano |
Because the https://github.com/meltano/hub/tree/99731c055bc1a1513228745db673aab789d4047c/_data/meltano directory is the source of truth for the API, with the current process any changes to the source files will be reflected in the API responses. To support multiple versions of the API and have updates to plugin data reflect in all of them (meaning
With this approach, no changes are required to our infra and changes can be tested in the staging environment. Step 1 above involves the bulk of the effort and about ~1 week of work. |
@edgarrmondragon is this something we actually need? I'd say after we switch to using sensitive we wouldn't need to update v1 anymore. But maybe I'm wrong there. cc @pnadolny13 if you have a thought |
@tayloramurphy the alternative is to freeze v1. New plugins would not be available there, so users would have to update Meltano to be able to |
@edgarrmondragon how would we determine if the metadata was appropriate for It seems like it'd be easier to do a freeze for v1 but maybe I'm over thinking it. |
@tayloramurphy I think in an ideal world both API versions would still continue to update as plugin metadata changes. If its too complex then freezing it would be the backup plan but it feels pretty harsh. To me the benefits of this sensitive/hidden feature dont outweigh the negative affects of freezing the API. It might be a little more overhead but I was thinking along the same lines as Edgar described above:
This doesnt sound like a lot of work to me especially because in the API generation script we're already reading every plugin definition and deleting properties that are only for rendering the hub pages like One other thing to consider is that we might want another schema change like this in the near future for settings group validation improvements, like if we support json schema format instead of our custom format. |
@tayloramurphy what I imagine is that we build the Pydantic models for v1 and v2 plugins. For each plugin from the source data, we instantiate a v2 plugin and also create a v1 instance from that. We save both in their respective directory and push to S3. |
@edgarrmondragon thanks for the explanation. I think that makes sense. I think we'll need to pick a level of long term support for earlier versions of the API at some point. Perhaps v1 and v2 are deprecated at a Meltano v4 launch (or something like that). At some point we won't want to maintain them. But I like the proposed approach for supporting both for now! |
See #1418 (comment)
The text was updated successfully, but these errors were encountered: