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

[PLA-2043] Use stable packages #67

Merged
merged 3 commits into from
Oct 16, 2024
Merged

Conversation

leonardocustodio
Copy link
Member

@leonardocustodio leonardocustodio commented Oct 16, 2024

PR Type

enhancement, configuration changes


Description

  • Updated the Go version in the GitHub Actions workflow from ^1.19 to ^1.23 to ensure compatibility with newer features and improvements.
  • Enhanced the Composer install command by adding flags to optimize the installation process and exclude unnecessary components.
  • Introduced a new step to update Composer packages, ensuring the latest versions are used.

Changes walkthrough 📝

Relevant files
Configuration changes
run_tests.yml
Update Go version and enhance Composer commands                   

.github/workflows/run_tests.yml

  • Updated Go version from ^1.19 to ^1.23.
  • Modified Composer install command with additional flags.
  • Added a new step to update packages using Composer.
  • +7/-3     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    Signed-off-by: Leonardo Custodio <leonardo@enjin.io>
    Signed-off-by: Leonardo Custodio <leonardo@enjin.io>
    Copy link

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Dependency Management
    The PR introduces a hard-coded dependency on 'enjin/platform-core:dev-master' which might lead to unstable builds due to changes in the master branch. Consider using a stable version.

    Version Downgrade
    The version of 'rebing/graphql-laravel' was downgraded from '^9.2' to '^9.0'. Ensure this change is intentional and compatible with other dependencies.

    Signed-off-by: Leonardo Custodio <leonardo@enjin.io>
    Copy link

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    Best practice
    Replace unstable package versions with stable versions

    Avoid using version constraints that rely on unstable versions in a production
    environment. Use stable versions instead of dev-master.

    .github/workflows/run_tests.yml [65]

    -composer require enjin/platform-core:dev-master --no-update
    +composer require enjin/platform-core:^1.0 --no-update
    Suggestion importance[1-10]: 8

    Why: The suggestion to replace dev-master with a stable version like ^1.0 is important for ensuring stability and predictability in production environments. It addresses a best practice by avoiding potential issues with unstable versions.

    8
    Use a specific version or version range for Go to enhance stability

    Specify a stable version for the Go language to ensure consistent, predictable
    builds.

    .github/workflows/run_tests.yml [49]

    -go-version: "^1.23"
    +go-version: "1.23.x"
    Suggestion importance[1-10]: 7

    Why: Specifying a more precise version range for Go, such as 1.23.x, can help ensure consistent builds and reduce the risk of unexpected changes. This is a good practice for maintaining build stability.

    7
    Maintainability
    Pin dependencies to specific minor versions to prevent breaking changes

    Pin the dependency versions to avoid potential breaking changes from automatic
    updates.

    composer.json [27-35]

    -"rebing/graphql-laravel": "^9.0",
    -"laravel/pint": "^1.0",
    -"nunomaduro/collision": "^8.0"
    +"rebing/graphql-laravel": "9.0.*",
    +"laravel/pint": "1.0.*",
    +"nunomaduro/collision": "8.0.*"
    Suggestion importance[1-10]: 6

    Why: Pinning dependencies to specific minor versions can prevent breaking changes from automatic updates, enhancing maintainability. However, it may limit flexibility in receiving minor updates that could include important fixes.

    6

    @leonardocustodio leonardocustodio merged commit eb22482 into master Oct 16, 2024
    7 checks passed
    @leonardocustodio leonardocustodio deleted the leonardocustodio-patch-1 branch October 16, 2024 13:44
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Development

    Successfully merging this pull request may close these issues.

    2 participants