-
Notifications
You must be signed in to change notification settings - Fork 0
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
Auto-generated Pull Request for feat/setup-dagger #129
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Upgrading to Go 1.22 ensures compatibility with the latest language features, performance improvements, and security patches. Additionally, updating the go-cmp dependency to include the new go.mod entry ensures that dependency management is accurate and up-to-date, reflecting the correct versions used in the project.
This update upgrades the `go-github` library from v32 to v62 and the `go-querystring` library from v1.0.0 to v1.1.0 across various internal applications and dependencies. The upgrade to `go-github` v62 ensures compatibility with the latest GitHub API changes and features, enhancing the stability and capabilities of our GitHub integrations. The update to `go-querystring` v1.1.0 introduces improvements and bug fixes that enhance query string handling in HTTP requests.
Removing the nlreturn linter from the GolangCI configuration as it was causing unnecessary noise in the linting process without significantly improving code quality.
…port The `go.mod` file has been updated to include several new libraries: - `github.com/google/go-github/v32` to support GitHub API interactions for an older API version. - Various compression and archive handling libraries like `github.com/andybalholm/brotli`, `github.com/bodgit/plumbing`, `github.com/bodgit/sevenzip`, and others to enhance the application's ability to handle different file formats and compression algorithms. - Error handling and multi-error libraries such as `github.com/hashicorp/errwrap` and `github.com/hashicorp/go-multierror` to improve error management in the application.
…g of dependency checksums
The downgrade of the go-github library from version 62 to version 32 across multiple files ensures compatibility with other project dependencies that require an older version of the library. Additionally, the introduction of the GetLegacyGithubClient function in client.go provides support for legacy systems that might not be compatible with the latest GitHub API changes, ensuring broader usability of the application.
…t tracking project-specific settings
…ement and binary setup This new Go file introduces a suite of utility functions designed to manage the Dagger tool within Go applications. It includes functionality to fetch the latest Dagger version, download the corresponding release from GitHub, verify checksums, and extract the binary to a specified directory.
This new command setup-dagger in dagger.go allows users to initialize the dagger command line interface with predefined flags for the dagger-file and checksum-file. This setup simplifies the process of configuring the dagger environment, ensuring users have a standard starting point with default values for necessary files.
… bytes copied The change from `io.Copy` to `io.CopyN` in the `extractTarball` function ensures that only a specific number of bytes (16 in this case) are copied, which can prevent potential issues related to excessive data copying or incorrect file sizes.
…pproach The file writing process in the `extractTarball` function is modified to write data in chunks of 1024 bytes instead of a single fixed size of 16 bytes.
…Binary function Returning binDir instead of binFileName provides the full path to the binary, which is necessary for subsequent operations that require the full path rather than just the file name.
Additionally, integrating GitHub Actions outputs allows for better automation and traceability in CI/CD pipelines by explicitly setting outputs such as the binary name, version, checksum, and path. This enhancement facilitates subsequent steps in workflows that depend on these outputs.
…etupDaggerBin for better modularity The SetupDagger function is refactored into two separate functions, SetupDaggerCheckSum and SetupDaggerBin, to enhance modularity and maintainability. This change allows each function to handle specific tasks: SetupDaggerCheckSum manages version and checksum outputs, while SetupDaggerBin focuses on fetching and setting up the binary.
… SetupDaggerBinCmd for better modularity The SetupDaggerCmd function is split into two separate commands: SetupDaggerChecksumCmd and SetupDaggerBinCmd. This change improves modularity and clarity of the command-line interface. SetupDaggerChecksumCmd specifically handles the setup of checksums for dagger binaries, making it easier to manage and verify binary integrity. SetupDaggerBinCmd focuses on setting up the dagger binary itself, with an added requirement for specifying the dagger version, enhancing the command's usability and specificity.
Introducing a new CLI flag `dagger-file` in the `SetupDaggerChecksumCmd` function allows users to specify the suffix of the dagger tarball file.
…ameters The fetchDaggerCheckSum function is refactored to accept explicit parameters for the checksum and dagger file names instead of extracting them from the cli.Context.
…ify binary compression step Updating the base image from golang:1.13.15-buster to golang:1.22-bullseye ensures the application is built with the latest features and security updates of the Go language and Debian Bullseye. Additionally, the binary compression step is simplified by removing the `strip` command and directly using `upx` for compression, which streamlines the build process and potentially reduces the Docker image size.
… tests The pull_request trigger is removed to streamline the CI process, ensuring that actions are only triggered on pushes to the 'develop' branch. This change reduces unnecessary builds on pull requests, focusing resources on integration after code merges. Additionally, a new job 'call-docker-build' is added to build a Docker image using the 'docker-publish.yaml' workflow from the 'dictyBase/workflows' repository. This step is dependent on the successful completion of the 'test' job, ensuring that Docker images are only built when tests pass. This integration enhances the CI pipeline by automating Docker image creation for successful builds, facilitating continuous deployment practices.
…requests The lint workflow configuration is simplified to trigger on any pull request, removing the previous restriction that ignored pull requests to the master branch.
… on PRs Introduces a GitHub Actions workflow to automatically run unit tests and report test coverage for each pull request. This ensures that all new code contributions are verified for quality and maintainability before merging.
The downgrade of the go-github library from version 62 to 32 across multiple files ensures compatibility with other project dependencies that require an older version of the library. Additionally, in `migrate.go`, the introduction of `GetLegacyGithubClient` instead of the standard client supports systems that rely on older GitHub API functionalities, enhancing backward compatibility.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #129 +/- ##
===========================================
- Coverage 23.13% 20.25% -2.89%
===========================================
Files 36 38 +2
Lines 1539 1758 +219
===========================================
Hits 356 356
- Misses 1142 1361 +219
Partials 41 41 ☔ View full report in Codecov by Sentry. |
Enabling the errcheck linter in the GolangCI configuration helps ensure that all error returns are checked. This is a crucial practice in Go to avoid unnoticed errors that could lead to unexpected behavior or crashes.
Updating the golangci-lint-action to version 1.58.2 ensures that the latest features, bug fixes, and performance improvements in the linter are utilized, leading to more efficient and effective code quality checks.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pulling 'feat/setup-dagger into develop. Please review and merge.