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

validate the latest version when new connector version is released #460

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

codingkarthik
Copy link
Collaborator

@codingkarthik codingkarthik commented Feb 7, 2025

Same as title

Copy link
Member

@m-Bilal m-Bilal left a comment

Choose a reason for hiding this comment

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

rubberstamp

@@ -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 {
Copy link
Member

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 invoke validate command as the first thing in the ci command) - Trying to arrive at some way where we can run the validation separately and also along with the updates.

Copy link
Collaborator Author

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.

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