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

The saveChart API at /charts should be able to accept configs with old schema versions and migrate them #3936

Open
danyx23 opened this issue Sep 9, 2024 · 2 comments · May be fixed by #3967
Assignees

Comments

@danyx23
Copy link
Contributor

danyx23 commented Sep 9, 2024

In the ETL we have an updated cycle that only touches datasets once a year or less often. When writing partial grapher configs there, it is therefore normal for them to be written using an old schema version. The grapher API that the ETL uses to save the grapher configs defined in the ETL should thus be able to accept old versions and transparently update them to the new version wherever possible (usually this means dropping obsolete fields or rewriting renamed enums etc)

@danyx23
Copy link
Contributor Author

danyx23 commented Sep 10, 2024

I implemented a very basic version of this in the saveGrapher function in apiRouter.ts because a schema change made us bump to 005 and the ETL still produces 004 schemas in several places.

@toni-sharpe
Copy link
Contributor

toni-sharpe commented Sep 12, 2024

I felt this might be one I could take a stab at - since the PR @danyx23 and I worked on was complicated by this, so there's little context switching for me.

But maybe it's too much? I would commit to working on this w/c 16-sep if given the go ahead.

Else, I have time, point me at something

@sophiamersmann sophiamersmann self-assigned this Sep 17, 2024
@sophiamersmann sophiamersmann linked a pull request Sep 17, 2024 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants