Skip to content

Update script to verify go modules to match hashes of all files#1157

Merged
katiewasnothere merged 2 commits intomicrosoft:masterfrom
katiewasnothere:update_ci_go_modules
Sep 10, 2021
Merged

Update script to verify go modules to match hashes of all files#1157
katiewasnothere merged 2 commits intomicrosoft:masterfrom
katiewasnothere:update_ci_go_modules

Conversation

@katiewasnothere
Copy link

This PR addresses an issue found in the CI pipeline in #1146. In that instance, the CI initially failed indicating that the test vendor modules were not up to date, which also led to test failures in the CI.

This was because the Verify-GoModules.ps1 script only validated that the code in the vendor directory of the package was unchanged. It did not, however, validate if the target go.sum file matched the expected one for the code. go mod tidy cleans up unnecessary references by removing their entries in the go.sum file, thereby changing its contents. This could cause the main modules and the test modules to become out of sync.

This PR addresses this issue by validating that all files in the target directory are as expected. This will include the go.mod and go.sum files.

Signed-off-by: Kathryn Baldauf kabaldau@microsoft.com

…e directory

Signed-off-by: Kathryn Baldauf <kabaldau@microsoft.com>
@katiewasnothere katiewasnothere requested a review from a team as a code owner September 9, 2021 20:44
@katiewasnothere
Copy link
Author

@SeanTAllen

Signed-off-by: Kathryn Baldauf <kabaldau@microsoft.com>
@SeanTAllen
Copy link
Contributor

Nice.

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.

4 participants