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

Support Curation to run after package manager installation failure #135

Merged
merged 14 commits into from
Aug 21, 2024

Conversation

asafambar
Copy link
Contributor

@asafambar asafambar commented Aug 5, 2024

Support Curation to run after package manager installation failure

  • The pull request is targeting the dev branch.
  • The code has been validated to compile successfully by running go vet ./....
  • The code has been formatted properly using go fmt ./....
  • All static analysis checks passed.
  • All tests have passed. If this feature is not already covered by the tests, new tests have been added.
  • All changes are detailed at the description. if not already covered at JFrog Documentation, new documentation have been added.

Description:
This PR introduces a wrapper for the curation command that handles failure errors from installation commands (such as go, mvn, pip, npm, etc.). If the error is deemed relevant to curation—specifically, a 403 error that might be due to curation—then the curation command will run on the project to provide the status of blocked packages.

Currently, the wrapper only supports cases where you have a valid curation entitlement on the JPD you are directly working with (smart to DMZ on other JPDs won't work). Additionally, it only runs during a GitHub Actions step, which requires a specific environment variable to be provided.

depends on:
jfrog/jfrog-cli-core#1225
jfrog/build-info-go#267
jfrog/jfrog-cli#2639

@asafambar asafambar added the safe to test Approve running integration tests on a pull request label Aug 5, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Aug 5, 2024
@attiasas attiasas self-requested a review August 6, 2024 08:24
@attiasas attiasas added the new feature Automatically generated release notes label Aug 6, 2024
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.

Nice! please take a look at my comments.

  • Please update PR description
  • Please add integration tests for this new cmd in scan_test.go (not including adding unit tests)

cli/scancommands.go Outdated Show resolved Hide resolved
cli/scancommands.go Outdated Show resolved Hide resolved
commands/curation/curationaudit.go Outdated Show resolved Hide resolved
commands/curation/curationaudit.go Outdated Show resolved Hide resolved
@asafambar asafambar added the safe to test Approve running integration tests on a pull request label Aug 7, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Aug 7, 2024
@asafambar asafambar changed the title Support Curation to run after package manager installation failure on… Support Curation to run after package manager installation failure Aug 13, 2024
@asafambar asafambar added the safe to test Approve running integration tests on a pull request label Aug 13, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Aug 13, 2024
cli/scancommands.go Outdated Show resolved Hide resolved
commands/curation/curationaudit.go Outdated Show resolved Hide resolved
cli/scancommands_test.go Outdated Show resolved Hide resolved
cli/scancommands_test.go Show resolved Hide resolved
cli/scancommands.go Show resolved Hide resolved
@attiasas attiasas added the safe to test Approve running integration tests on a pull request label Aug 19, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Aug 19, 2024
@asafambar asafambar added the safe to test Approve running integration tests on a pull request label Aug 19, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Aug 19, 2024
@asafambar asafambar added the safe to test Approve running integration tests on a pull request label Aug 21, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Aug 21, 2024
Copy link

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


@attiasas attiasas merged commit 6a461aa into jfrog:dev Aug 21, 2024
6 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature Automatically generated release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants