TykTechnologies / tyk

Tyk Open Source API Gateway written in Go, supporting REST, GraphQL, TCP and gRPC protocols
Other
9.76k stars 1.09k forks source link

[TT-13136] Adjust concurrency group to CI tests, extend to all workflows #6560

Closed titpetric closed 2 months ago

titpetric commented 2 months ago

User description

TT-13136
Summary If a PR is rebased, or new commits are added, cancel previous runs
Type Task Task
Status In Dev
Points N/A
Labels -

https://tyktech.atlassian.net/browse/TT-13136


PR Type

enhancement, configuration changes


Description


Changes walkthrough ๐Ÿ“

Relevant files
Enhancement
ci-tests.yml
Update concurrency settings in CI tests workflow                 

.github/workflows/ci-tests.yml
  • Updated concurrency group settings for CI tests.
  • Changed the method to cancel in-progress jobs based on event type.
  • +2/-6     
    codeql-analysis.yml
    Add concurrency settings to CodeQL analysis workflow         

    .github/workflows/codeql-analysis.yml
  • Added concurrency group settings.
  • Enabled cancellation of in-progress jobs for pull requests.
  • +4/-0     
    lint-swagger.yml
    Add concurrency and update Go version in Swagger lint workflow

    .github/workflows/lint-swagger.yml
  • Added concurrency group settings.
  • Enabled cancellation of in-progress jobs for pull requests.
  • Changed Go version to stable.
  • +5/-1     
    lint.yml
    Introduce new CI lint workflow with concurrency settings 

    .github/workflows/lint.yml
  • Added new CI lint workflow.
  • Included concurrency settings and job definitions for godoc and jira.
  • +33/-0   
    plugin-compiler-build.yml
    Add concurrency settings to plugin compiler build workflow

    .github/workflows/plugin-compiler-build.yml
  • Added concurrency group settings.
  • Enabled cancellation of in-progress jobs for pull requests.
  • +4/-0     
    release.yml
    Add concurrency settings to release workflow                         

    .github/workflows/release.yml
  • Added concurrency group settings.
  • Enabled cancellation of in-progress jobs for pull requests.
  • +5/-0     

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

    buger commented 2 months ago

    Knock Knock! ๐Ÿ”

    Just thought I'd let you know that your PR title and story title look quite different. PR titles that closely resemble the story title make it easier for reviewers to understand the context of the PR.

    An easy-to-understand PR title a day makes the reviewer review away! ๐Ÿ˜›โšก๏ธ
    Story Title If a PR is rebased, or new commits are added, cancel previous runs
    PR Title [TT-13136] Adjust concurrency group to CI tests, extend to all workflows

    Check out this guide to learn more about PR best-practices.

    github-actions[bot] commented 2 months ago

    API Changes

    no api changes detected
    github-actions[bot] commented 2 months ago

    PR Reviewer Guide ๐Ÿ”

    โฑ๏ธ Estimated effort to review: 2 ๐Ÿ”ต๐Ÿ”ตโšชโšชโšช
    ๐Ÿงช No relevant tests
    ๐Ÿ”’ No security concerns identified
    โšก Key issues to review

    Concurrency Group Change
    The concurrency group has been changed from a PR or commit-specific identifier to a more generic workflow and ref-based identifier. This might lead to unintended cancellations of jobs across different PRs if they share the same branch name or ref. Go Version Update
    The Go version has been updated to 'stable'. It's important to ensure that this version aligns with the project requirements and does not introduce compatibility issues.
    github-actions[bot] commented 2 months ago

    PR Code Suggestions โœจ

    CategorySuggestion                                                                                                                                    Score
    Enhancement
    Use the branch name instead of the full ref path in the concurrency group ___ **Replace the use of ${{ github.ref }} with ${{ github.head_ref }} in the concurrency
    group to ensure that the branch name is correctly used instead of the full ref path.** [.github/workflows/ci-tests.yml [21]](https://github.com/TykTechnologies/tyk/pull/6560/files#diff-03609cb60b0c6e92fb771eb8787d6722b8c31ca4c03eabc788e147acd8c6fb43R21-R21) ```diff -group: ${{ github.workflow }}-${{ github.ref }} +group: ${{ github.workflow }}-${{ github.head_ref }} ```
    Suggestion importance[1-10]: 8 Why: The suggestion to replace `${{ github.ref }}` with `${{ github.head_ref }}` is valid as it ensures that the branch name is used instead of the full ref path, which can improve clarity and prevent potential issues with concurrency groups in workflows triggered by pull requests. This change enhances the accuracy of the concurrency group definition.
    8
    sonarcloud[bot] commented 2 months ago

    Quality Gate Passed Quality Gate passed

    Issues
    0 New issues
    0 Accepted issues

    Measures
    0 Security Hotspots
    0.0% Coverage on New Code
    0.0% Duplication on New Code

    See analysis details on SonarCloud