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

Allow the GetDependenciesList for Go to accept an error handler #255

Merged
merged 5 commits into from
Jun 9, 2024

Conversation

asafambar
Copy link
Contributor

@asafambar asafambar commented May 23, 2024

…n when building go tree

  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • All static analysis checks passed.
  • This pull request is on the dev branch.
  • I used gofmt for formatting the code before submitting the pull request.

The PR introduces support for recognizing errors that occur while building the Go dependency tree. The primary reason for adding this support is to detect errors originating from the curation service. It's essential to catch these errors during the tree-building process, as they can occur when fetching dependencies from Artifactory as a result of running the go list command. The code changes involve passing a function to handle these errors, allowing the libraries that use it to manage error handling and reduce code duplication.

Copy link
Contributor

@attiasas attiasas left a comment

Choose a reason for hiding this comment

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

  • Update PR description
  • Update branch to latest dev.
  • Please change the name of the PR to be more general. like "Handle specific errors when getting Go dependencies"
  • Please add tests to this new cases

utils/goutils.go Show resolved Hide resolved
utils/goutils.go Show resolved Hide resolved
@attiasas attiasas added the improvement Automatically generated release notes label May 29, 2024
@asafambar asafambar changed the title Curation go support - Add the ability to recognize error from curatio… Curation go support - Handle specific errors when getting Go dependencies May 30, 2024
@asafambar
Copy link
Contributor Author

asafambar commented May 30, 2024

PR description:
The PR introduces support for recognizing errors that occur while building the Go dependency tree. The primary reason for adding this support is to detect errors originating from the curation service. It's essential to catch these errors during the tree-building process, as they can occur when fetching dependencies from Artifactory as a result of running the go list command. The code changes involve passing a function to handle these errors, allowing the libraries that use it to manage error handling and reduce code duplication.

Copy link

👍 Frogbot scanned this pull request and did not find any new security issues.


@eyalbe4 eyalbe4 self-requested a review June 7, 2024 08:50
utils/goutils_test.go Outdated Show resolved Hide resolved
@eyalbe4 eyalbe4 changed the title Curation go support - Handle specific errors when getting Go dependencies Allow the GetDependenciesList for Go to accept an error handler Jun 8, 2024
@eyalbe4 eyalbe4 merged commit f93a07f into jfrog:dev Jun 9, 2024
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Automatically generated release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants