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

[TT-1921] fix breaking changes detection #1529

Merged
merged 3 commits into from
Jan 8, 2025

Conversation

Tofel
Copy link
Contributor

@Tofel Tofel commented Jan 7, 2025

  1. Bump go version used to 1.23.3 in order to avoid errors like this:
Error: helper.go:2:1: package requires newer Go version go1.23
  1. Make the breakingchange tool smarter, so it understands retracted tags.
  2. Run go mod tidy in all projects.

Sample output for lib after my changes:

Retracted version: >=1.999.0-test-release <=1.999.999-test-release
Retracted version: >=1.99.1 <=1.99.9
Retracted version: >=1.50.0 <=1.50.0
Tag: 1.49.0
Tag: 1.50.0
Tag: 1.50.1
Tag: 1.50.10
Tag: 1.50.11
Tag: 1.50.12
Tag: 1.50.13
Tag: 1.50.14
Tag: 1.50.15
Tag: 1.50.16
Tag: 1.50.17
Tag: 1.50.18
Tag: 1.50.19
Tag: 1.50.2
Tag: 1.50.20
Tag: 1.50.3
Tag: 1.50.4
Tag: 1.50.5
Tag: 1.50.6
Tag: 1.50.7
Tag: 1.50.8
Tag: 1.50.9
Tag: 1.99.1
Tag: 1.99.2
Tag: 1.99.3
Found non-retracted tag: v1.50.20

Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.

Why

The changes across various .yaml, .go, and .mod files mainly revolve around updating Go version dependencies and refactoring the approach to identifying and handling retracted tags and breaking changes in Go modules. These updates ensure compatibility with newer Go versions and improve the accuracy of detecting breaking changes by accounting for retracted versions.

What

  • .github/workflows/rc-breaking-changes.yaml & .github/workflows/release-go-module.yml

    • Updated Go version from 1.22.6 to 1.23.3 to keep up with the latest Go releases for better features and security.
    • Modified the breaking changes script execution flow to accommodate changes in the breaking changes detection approach.
  • tools/breakingchanges/cmd/main.go

    • Introduced getRetractedTags function to identify retracted tags in go.mod files, improving the handling of module versions in the breaking changes detection process.
    • Changed getLastTag to getLatestTag and updated its logic to filter out retracted tags, ensuring the most recent and valid tag is used for comparison.
    • Added sorting and parsing for version tags using semver to accurately determine the latest version.
    • Modified isIgnoredDirPrefix to isIgnoredDirRegex, enhancing flexibility in specifying directories to ignore during the scan for breaking changes.
    • Included additional imports (sort, github.com/Masterminds/semver/v3, golang.org/x/mod/modfile) to support new functionality related to semantic versioning and module file parsing.
  • tools/breakingchanges/go.mod & tools/breakingchanges/go.sum

    • Updated Go version to 1.23.3 and added new module dependencies (github.com/Masterminds/semver/v3, golang.org/x/mod) required for the updated breaking changes detection logic.
    • Added retract directives for specific test versions, demonstrating the use of the retract feature in Go modules for managing incorrect or problematic releases.
  • wasp/examples/go.mod & wasp/examples/go.sum

    • Removed unused dependencies (github.com/c9s/goprocinfo, github.com/pbnjay/memory), likely as part of dependency cleanup to remove unnecessary modules.
  • wasp/go.mod & wasp/go.sum

    • Similar to wasp/examples, removed github.com/c9s/goprocinfo and github.com/pbnjay/memory from the dependencies, indicating a cleanup process.

@Tofel Tofel marked this pull request as ready for review January 7, 2025 16:49
@Tofel Tofel requested review from sebawo and a team as code owners January 7, 2025 16:49
@cl-sonarqube-production
Copy link

@Tofel Tofel merged commit f3dea2c into main Jan 8, 2025
51 of 54 checks passed
@Tofel Tofel deleted the tt-1921-fix-breaking-changes-detection branch January 8, 2025 10:41
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.

2 participants