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

Add CI to validate extensions.json #32

Merged

Conversation

jtbandes
Copy link
Member

@jtbandes jtbandes commented Jun 28, 2024

Changelog

None

Docs

None

Description

Adds validation script to avoid future errors in extensions.json:

Checking the id values requires some more attention (and maybe changes to the app) so not solving that in this PR.

Example output:
image

Copy link

linear bot commented Jun 28, 2024

@indirectlylit
Copy link
Contributor

indirectlylit commented Jul 9, 2024

We could/should also enforce changelog and readme content in the form of https://raw.githubusercontent.com/.... Most are like this, but some use https://github.com/ domains.

related:

indirectlylit added a commit that referenced this pull request Jul 10, 2024
Updates readme and changelog to use correct URLs for two extensions.

Fixes FG-8025

see also related #32
@jtbandes jtbandes changed the title Validate and fix extensions.json Add CI to validate extensions.json Aug 1, 2024
@jtbandes jtbandes marked this pull request as ready for review August 1, 2024 15:19
Copy link

@bryfox bryfox left a comment

Choose a reason for hiding this comment

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

🎉 Couple of nitpicks, but this looks great.

I worry slightly that some extensions will never get updated with compression, that we'll get "warning fatigue" when reviewing, and that we'll miss new warnings. The only idea I can think of is to enumerate extensions already in the registry, and elevate that warning to an error if the extension isn't in that set.

@jtbandes
Copy link
Member Author

jtbandes commented Aug 1, 2024

The only idea I can think of is to enumerate extensions already in the registry, and elevate that warning to an error if the extension isn't in that set.

Sounds good - I can also key this on the SHA to ensure we use compression for future updates to existing extensions

@jtbandes jtbandes merged commit eaa6bbe into main Aug 1, 2024
1 check passed
@jtbandes jtbandes deleted the jacob/fg-8096-add-validation-for-extension-registry-json branch August 1, 2024 20:30
defunctzombie pushed a commit that referenced this pull request Sep 27, 2024
…ion minimum version (#37)

In #32, I added a CI check to validate that .foxe zip files actually use
compression (a bug fixed in
foxglove/create-foxglove-extension#147).
However, it turns out this check was broken because when loading a zip
file with JSZip, `zipObj.options.compression` is not set even if the
file was compressed. This PR replaces it with an alternative approach
where we read the version of `create-foxglove-extension` from the
extension's package.json and validate that it's >=1.0.3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants