-
Notifications
You must be signed in to change notification settings - Fork 7
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
validate the latest version when new connector version is released #460
base: main
Are you sure you want to change the base?
Conversation
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.
rubberstamp
registry-automation/cmd/ci.go
Outdated
@@ -245,6 +250,61 @@ func processChangedFiles(changedFiles ChangedFiles) ProcessedChangedFiles { | |||
return result | |||
} | |||
|
|||
// validateLatestVersion checks if the latest version in metadata.json matches | |||
// the actual latest version from the releases directory | |||
func validateLatestVersion(connector Connector, declaredLatestVersion string) error { |
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.
The logic of this function looks good to me 👍
Could we move this function to the validate
package here?
Rationale behind it:
- We introduced a new command called "validate" here.
- The validate command gets run on all commits (even before someone from Hasura adds approval to a PR) via this GitHub action. That way a connector author can get immediate feedback and fix all the validation errors even before someone from Hasura takes a look at this PR for approval.
- I see that you would like to run the validations before we go for an update in the DB etc. Could we run the validate command before invoking the
ci
command to get all the validations? (or perhaps internally invokevalidate
command as the first thing in theci
command) - Trying to arrive at some way where we can run the validation separately and also along with the updates.
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, I will move the function to the validate
package and I think it should be fine only to run the validations once every commit and not worry about running the validations with the updates.
Same as title