Skip to content

fix(website): Don't error on missing plugin version for new plugins#5170

Merged
kodiakhq[bot] merged 5 commits intocloudquery:mainfrom
erezrokah:chore/dont_error_missing_version
Nov 30, 2022
Merged

fix(website): Don't error on missing plugin version for new plugins#5170
kodiakhq[bot] merged 5 commits intocloudquery:mainfrom
erezrokah:chore/dont_error_missing_version

Conversation

@erezrokah
Copy link
Copy Markdown
Member

@erezrokah erezrokah commented Nov 30, 2022

Summary

When adding a new plugin the version file doesn't exist yet, so the build fails.
This defaults to v1.0.0 instead of failing the build, only for new plugins
See failure:
https://vercel.com/cloudquery/cloudquery-web/52G1znzrGcKCidgcvhCfKk5WZAhD
PR #5096

@cq-bot cq-bot added the website label Nov 30, 2022
@erezrokah erezrokah added the automerge Automatically merge once required checks pass label Nov 30, 2022
@hermanschaaf
Copy link
Copy Markdown
Contributor

I may not have the full picture, but erroring on missing version seems like a pretty good safeguard to have in place, so we don't run the risk of injecting incorrect versions if there is something wrong with the version file.

Could we maybe manually add the new plugin's version the first time instead?

@erezrokah
Copy link
Copy Markdown
Member Author

I may not have the full picture, but erroring on missing version seems like a pretty good safeguard to have in place, so we don't run the risk of injecting incorrect versions if there is something wrong with the version file.

Could we maybe manually add the new plugin's version the first time instead?

Good point, however I think it will be quite easy to miss adding the version file and understanding where to add it for someone who's not familiar with the Website code.
I'm assuming we'll always have a v1.0.0 of a plugin so even if something is wrong with the version files it will still point to an existing plugin.

@erezrokah
Copy link
Copy Markdown
Member Author

Maybe we can detect it's a new plugin somehow

@erezrokah erezrokah force-pushed the chore/dont_error_missing_version branch from dc6b692 to 4ba54a0 Compare November 30, 2022 10:06
@erezrokah erezrokah changed the title fix(website): Don't error on missing plugin version fix(website): Don't error on missing plugin version for new plugins Nov 30, 2022
@erezrokah erezrokah force-pushed the chore/dont_error_missing_version branch from 4ba54a0 to 16e1a17 Compare November 30, 2022 10:08
@erezrokah
Copy link
Copy Markdown
Member Author

OK so I think https://github.com/cloudquery/cloudquery/pull/5170/files#diff-02a351de4c8e66a0c9e62bd22b54e65e3ff7133ab407a20b8b82f006bb22feaeR27 should work for both cases (throwing an error when we need to, and allowing new plugins)

Copy link
Copy Markdown
Contributor

@hermanschaaf hermanschaaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, looks good

Co-authored-by: Herman Schaaf <hermanschaaf@gmail.com>
@kodiakhq kodiakhq bot merged commit 4b1e73e into cloudquery:main Nov 30, 2022
@erezrokah erezrokah deleted the chore/dont_error_missing_version branch November 30, 2022 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Automatically merge once required checks pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants