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

Move Permissions definition in rockcraft schema to top scope #460

Conversation

linostar
Copy link
Collaborator

  • Have you signed the CLA?

This is to fix an issue in Rockcraft's schema.json, because Permissions needs to moved to the top scope definitions instead of being located inside Part's definitions.

@linostar linostar force-pushed the ROCKS-967/bugfix/move-permissions-definition-in-rockcraft-schema-to-top-scope branch from e394877 to 08e268e Compare January 24, 2024 08:59
@linostar
Copy link
Collaborator Author

@cjdcordeiro @tigarmo This should be ready for review.

Copy link
Collaborator

@cjdcordeiro cjdcordeiro left a comment

Choose a reason for hiding this comment

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

I can confirm it works.

For future reference, and possibly automation, is there an easy way to test this?

@linostar
Copy link
Collaborator Author

I can confirm it works.

For future reference, and possibly automation, is there an easy way to test this?

We can use this github action to validate our schema:
https://github.com/OrRosenblatt/validate-json-action

@cjdcordeiro
Copy link
Collaborator

Do you have an example of it passing & failing with this "Permissions definition" issue?

@linostar
Copy link
Collaborator Author

linostar commented Jan 24, 2024

Do you have an example of it passing & failing with this "Permissions definition" issue?

I have an example of it failing where it should have succeeded :-)
https://github.com/linostar/rockcraft/actions/runs/7638164257/job/20808486483

I'm not sure but I think it doesn't support the 2020-12 schema draft. I'm experimenting with alternatives now.

Copy link
Collaborator

@tigarmo tigarmo left a comment

Choose a reason for hiding this comment

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

thanks!
@cjdcordeiro @linostar do we want to do anything else on this PR before merging it?

@linostar
Copy link
Collaborator Author

thanks! @cjdcordeiro @linostar do we want to do anything else on this PR before merging it?

This should be good to merge, because it provides the needed fix. After discussing with Cris, I'll create another PR that provides automated validation of the generated rockcraft schema.

@tigarmo tigarmo merged commit f20689a into canonical:main Jan 24, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants