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

Upgrade dependencies and update to pgx v5 #21

Closed
wants to merge 0 commits into from

Conversation

Mazafard
Copy link
Contributor

@Mazafard Mazafard commented Jul 19, 2024

Summary

This issue aims to address the need to upgrade the pgx library to v5 and update several other dependencies within the project. These updates are crucial for leveraging the latest features, improvements, and security patches offered by the newer versions of these libraries.

Details

The following updates are proposed:

  1. Upgrade pgx to v5:

    • Update import statement in adapter.go from github.com/jackc/pgx/v4/stdlib to github.com/jackc/pgx/v5/stdlib.
    • Modify the go.mod file to require github.com/jackc/pgx/v5 v5.6.0.
  2. Upgrade other dependencies:

    • Update entgo.io/ent from v0.8.0 to v0.13.1.
    • Update github.com/go-sql-driver/mysql from v1.5.1-0.20200311113236-681ffa848bae to v1.8.1.
    • Update github.com/stretchr/testify from v1.8.1 to v1.8.2.
  3. Add new indirect dependencies:

    • Add several new indirect dependencies to the go.mod file, including but not limited to:
      • ariga.io/atlas v0.19.1
      • filippo.io/edwards25519 v1.1.0
      • golang.org/x/crypto v0.25.0
      • golang.org/x/mod v0.17.0
      • golang.org/x/sync v0.7.0
      • golang.org/x/text v0.16.0
      • gopkg.in/yaml.v3 v3.0.1
  4. Miscellaneous changes:

    • Update toolchain to go1.22.5.

Rationale

  • The pgx library v5 introduces significant improvements and new features that we want to leverage.
  • Keeping dependencies up-to-date ensures compatibility, security, and performance improvements.
  • Reducing unnecessary dependencies simplifies the project and decreases potential attack surfaces.

Testing

  • Ensure all existing tests pass.
  • Manually test the integration with PostgreSQL and MySQL to verify that there are no regressions.

Additional Notes

Please review the proposed changes and provide feedback. If there are any concerns or additional requirements, let's discuss them here.

Related Issue

@CLAassistant
Copy link

CLAassistant commented Jul 19, 2024

CLA assistant check
All committers have signed the CLA.

@hsluoyz
Copy link
Member

hsluoyz commented Jul 19, 2024

@Mazafard

  1. Only upgrade what you need, pgx to v5
  2. Don't upgrade others you don't necessarily need.
  3. Don't upgrade Go
  4. Be conservative on it
  5. Make CI happy

@Mazafard
Copy link
Contributor Author

@hsluoyz
Changes have been made conservatively in PR #23:

  • Only upgraded pgx to v5.
  • No other dependencies were upgraded unnecessarily.
  • Go version remains unchanged.
  • Ensured CI passes.

Thank you for the feedback!

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.

3 participants