-
Notifications
You must be signed in to change notification settings - Fork 839
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 check runtimes
GH Workflow
#2252
Conversation
@@ -0,0 +1,17 @@ | |||
{ | |||
"pallets": { | |||
"1": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we go by pallet name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this first version, I kept things simple and I am not interpreting the specs. This is why they must match 100% the format of the actuall metadata.
That could be improvement in the future but I would rather get started simple to have this check in place asap.
The benefit of the current option as well is that we can pretty much use the current metadata as spec, that would be may too strict but it works as a starting point.
|
||
"2": { | ||
"constants": { | ||
"MinimumPeriod": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it detect typos in the constant names?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the spec contains:
"2": {
"constants": {
"foo": { ... }
and the metadata :
"2": {
"constants": {
"foobar": { ... }
It will not detect a typo but it will not find foo
and fail.
@@ -0,0 +1,124 @@ | |||
#!/usr/bin/env python3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should put this into the pipeline-scripts
or releng-scripts
repo, since it will be useful in the runtimes repo as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes indeed, I would create a followup PR for the fellowship runtimes.
I think having this script in the polkadot-sdk
repo does also make sense since downstream repos will already likely depend on the polkadot-sdk
repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comments
@@ -0,0 +1,17 @@ | |||
{ | |||
"pallets": { | |||
"1": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this first version, I kept things simple and I am not interpreting the specs. This is why they must match 100% the format of the actuall metadata.
That could be improvement in the future but I would rather get started simple to have this check in place asap.
The benefit of the current option as well is that we can pretty much use the current metadata as spec, that would be may too strict but it works as a starting point.
|
||
"2": { | ||
"constants": { | ||
"MinimumPeriod": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the spec contains:
"2": {
"constants": {
"foo": { ... }
and the metadata :
"2": {
"constants": {
"foobar": { ... }
It will not detect a typo but it will not find foo
and fail.
@@ -0,0 +1,124 @@ | |||
#!/usr/bin/env python3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes indeed, I would create a followup PR for the fellowship runtimes.
I think having this script in the polkadot-sdk
repo does also make sense since downstream repos will already likely depend on the polkadot-sdk
repo.
This PR introduces:
rococo
andwestend
It brings a mechanism to check that part(s) of the runtimes' metadata that should not change over time, actually did not change over time.
Ideally, the GHW should trigger when a release is edited but GH seem to have an issue that prevents the trigger from working. This is why the check has been implemented as
workflow_dispatch
for a start.The
workflow_dispatch
requires arelease_id
that can be found using:as documented in the workflow.
A sample run can be seen here.