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-11566][TT-11953] upgraded go to 1.22 #6230

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

andrei-tyk
Copy link
Contributor

@andrei-tyk andrei-tyk commented Apr 18, 2024

User description

Description

This Pull Request introduces an upgrade to our Golang version and all required dependencies to 1.22.3. This upgrade is essential to keep our codebase up-to-date and benefit from the latest features, improvements, and security patches provided by the newer version. Changes include:
Upgraded the Golang version to 1.22.3.
Updated all dependencies to be compatible with the new Golang version.
Refactored some parts of the code to accommodate the changes in the new Golang version.
Added a new function setGODEBUG to handle deprecated ciphers in Golang 1.22.
Added unit tests for the setGODEBUG function.

MAIN TASK: https://tyktech.atlassian.net/browse/TT-11953

Related Issue

Motivation and Context

How This Has Been Tested

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactoring or add test (improvements in base code or adds test coverage to functionality)

Checklist

  • I ensured that the documentation is up to date
  • I explained why this PR updates go.mod in detail with reasoning why it's required
  • I would like a code coverage CI quality gate exception and have explained why

Type

enhancement


Description

  • Upgraded the Go version in go.mod from 1.21.0 to 1.22.2 to ensure compatibility with newer libraries and features.
  • Removed the explicit toolchain version to allow the use of the default toolchain provided with Go 1.22.2.

Changes walkthrough

Relevant files
Enhancement
go.mod
Upgrade Go Version and Remove Toolchain Specification       

go.mod

  • Upgraded Go version from 1.21.0 to 1.22.2.
  • Removed explicit toolchain version specification.
  • +1/-3     

    PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    Copy link
    Contributor

    PR Description updated to latest commit (c4f5044)

    Copy link
    Contributor

    github-actions bot commented Apr 18, 2024

    API Changes

    no api changes detected

    Copy link
    Contributor

    PR Review

    ⏱️ Estimated effort to review [1-5]

    1, because the PR involves a simple version upgrade in the go.mod file, which is straightforward to verify and does not involve complex code changes.

    🧪 Relevant tests

    No

    🔍 Possible issues

    No

    🔒 Security concerns

    No

    Code feedback:

    ✨ Review tool usage guide:

    Overview:
    The review tool scans the PR code changes, and generates a PR review which includes several types of feedbacks, such as possible PR issues, security threats and relevant test in the PR. More feedbacks can be added by configuring the tool.

    The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.

    • When commenting, to edit configurations related to the review tool (pr_reviewer section), use the following template:
    /review --pr_reviewer.some_config1=... --pr_reviewer.some_config2=...
    
    [pr_reviewer]
    some_config1=...
    some_config2=...
    

    See the review usage page for a comprehensive guide on using this tool.

    Copy link
    Contributor

    PR Code Suggestions

    CategorySuggestions                                                                                                                                                       
    Best practice
    Verify compatibility of all dependencies with the new Go version.

    Ensure to test and verify all dependencies for compatibility with the new Go version
    1.22.2. Upgrading the Go version can introduce breaking changes or deprecations that
    affect existing dependencies.

    go.mod [3]

     go 1.22.2
    +// Ensure all dependencies are tested for compatibility
     

    ✨ Improve tool usage guide:

    Overview:
    The improve tool scans the PR code changes, and automatically generates suggestions for improving the PR code. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on a PR.

    • When commenting, to edit configurations related to the improve tool (pr_code_suggestions section), use the following template:
    /improve --pr_code_suggestions.some_config1=... --pr_code_suggestions.some_config2=...
    
    [pr_code_suggestions]
    some_config1=...
    some_config2=...
    

    See the improve usage page for a comprehensive guide on using this tool.

    Copy link
    Contributor

    💥 CI tests failed 🙈

    git-state

    all ok

    Please look at the run or in the Checks tab.

    @andrei-tyk andrei-tyk requested review from a team as code owners May 10, 2024 07:43
    Copy link
    Contributor

    💥 CI tests failed 🙈

    git-state

    all ok

    Please look at the run or in the Checks tab.

    1 similar comment
    Copy link
    Contributor

    💥 CI tests failed 🙈

    git-state

    all ok

    Please look at the run or in the Checks tab.

    Copy link
    Contributor

    💥 CI tests failed 🙈

    git-state

    all ok

    Please look at the run or in the Checks tab.

    1 similar comment
    Copy link
    Contributor

    💥 CI tests failed 🙈

    git-state

    all ok

    Please look at the run or in the Checks tab.

    Copy link
    Contributor

    💥 CI tests failed 🙈

    git-state

    all ok

    Please look at the run or in the Checks tab.

    @@ -1582,6 +1582,13 @@ func Start() {
    os.Exit(0)
    }

    // https://github.com/golang/go/issues/63413
    Copy link
    Member

    @buger buger May 10, 2024

    Choose a reason for hiding this comment

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

    Pls add a bit more context to comment. That it required to enable RCA ciphers
    .

    Taskfile.yml Outdated Show resolved Hide resolved
    Taskfile.yml Outdated Show resolved Hide resolved
    ci/tests/plugin-compiler/README.md Outdated Show resolved Hide resolved
    ci/tests/plugin-compiler/Taskfile.yml Outdated Show resolved Hide resolved
    go.mod Outdated Show resolved Hide resolved
    andrei-tyk and others added 5 commits May 10, 2024 15:55
    Co-authored-by: Jeffy Mathew <jeffy.mathew100@gmail.com>
    Co-authored-by: Jeffy Mathew <jeffy.mathew100@gmail.com>
    Co-authored-by: Jeffy Mathew <jeffy.mathew100@gmail.com>
    Co-authored-by: Jeffy Mathew <jeffy.mathew100@gmail.com>
    Copy link

    sonarcloud bot commented May 10, 2024

    Please retry analysis of this Pull-Request directly on SonarCloud

    Copy link
    Contributor

    @jeffy-mathew jeffy-mathew left a comment

    Choose a reason for hiding this comment

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

    lgtm, we have to exclude releng files from this PR and get them updated via automation.

    @andrei-tyk andrei-tyk changed the title [DRAFT] TT-11566, upgraded go to 1.22.2 to run CI tests TT-11566, upgraded go to 1.22.2 to run CI tests May 13, 2024
    Copy link

    sonarcloud bot commented May 13, 2024

    @andrei-tyk andrei-tyk changed the title TT-11566, upgraded go to 1.22.2 to run CI tests [TT-11566][TT-11953] upgraded go to 1.22 May 13, 2024
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    3 participants