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

Error handling, restored commented-out code #192

Merged
merged 1 commit into from
Nov 27, 2023
Merged

Conversation

amirmalka
Copy link
Contributor

@amirmalka amirmalka commented Nov 27, 2023

type:

bug_fix


description:

This PR includes several changes aimed at improving error handling in the codebase. It also restores some previously commented-out code. The main changes are:

  • Added error handling for the deleteCRDs and triggerScanFor functions in handlers.go.
  • Added error handling for the Handle function in service.go.
  • Restored previously commented-out error handling code in watcher.go.
  • Changed log level from Info to Error in several places in imageregistryhandlerhelper.go to better reflect the severity of the situation.
  • Ignored error check in service_test.go for createUnstructuredPod function.

main_files_walkthrough:

files:
  • continuousscanning/handlers.go: Added error handling for the deleteCRDs and triggerScanFor functions.
  • continuousscanning/service.go: Added error handling for the Handle function.
  • watcher/watcher.go: Restored previously commented-out error handling code.
  • mainhandler/imageregistryhandlerhelper.go: Changed log level from Info to Error in several places to better reflect the severity of the situation.
  • continuousscanning/service_test.go: Ignored error check for createUnstructuredPod function.

User Description:

Overview

This PR fixes #

Signed Commits

  • Yes, I signed my commits.

Copy link

PR Analysis

  • 🎯 Main theme: Error handling and restoring commented-out code
  • 📝 PR summary: This PR primarily focuses on improving error handling across several functions in the codebase. It also restores some previously commented-out code. The changes include adding error handling for functions in handlers.go and service.go, restoring error handling code in watcher.go, changing log levels in imageregistryhandlerhelper.go, and ignoring error checks in service_test.go.
  • 📌 Type of PR: Bug fix
  • 🧪 Relevant tests added: No
  • ⏱️ Estimated effort to review [1-5]: 3, because the PR involves changes in multiple files and functions, and the reviewer needs to understand the context and impact of these changes.
  • 🔒 Security concerns: No security concerns found

PR Feedback

How to use

Instructions

To invoke the PR-Agent, add a comment using one of the following commands:
/review: Request a review of your Pull Request.
/describe: Update the PR title and description based on the contents of the PR.
/improve [--extended]: Suggest code improvements. Extended mode provides a higher quality feedback.
/ask <QUESTION>: Ask a question about the PR.
/update_changelog: Update the changelog based on the PR's contents.
/add_docs: Generate docstring for new components introduced in the PR.
/generate_labels: Generate labels for the PR based on the PR's contents.
see the tools guide for more details.

To edit any configuration parameter from the configuration.toml, add --config_path=new_value.
For example: /review --pr_reviewer.extra_instructions="focus on the file: ..."
To list the possible configuration parameters, add a /config comment.

@amirmalka amirmalka added the release Create release label Nov 27, 2023
Copy link

Summary:

  • License scan: success
  • Credentials scan: success
  • Vulnerabilities scan: success
  • Unit test: success
  • Go linting: success

@amirmalka amirmalka merged commit db56b48 into main Nov 27, 2023
dwertent pushed a commit that referenced this pull request Jan 2, 2024
* update watcher

Signed-off-by: Daniel Grunberger <[email protected]>

* fix: reconcile dependencies to latest Storage

Signed-off-by: Vlad Klokun <[email protected]>

* fix tests

Signed-off-by: Daniel Grunberger <[email protected]>

* rename test var

Signed-off-by: Daniel Grunberger <[email protected]>

* update go version

Signed-off-by: Daniel Grunberger <[email protected]>

* error handling, restored commented-out code (#192)

Signed-off-by: Amir Malka <[email protected]>

* Create scorecard.yml (#177)

* Create scorecard.yml

Signed-off-by: David Wertenteil <[email protected]>

* Update README.md

Signed-off-by: David Wertenteil <[email protected]>

---------

Signed-off-by: David Wertenteil <[email protected]>

* comment delete (#193)

Signed-off-by: Amir Malka <[email protected]>

* bump version

Signed-off-by: David Wertenteil <[email protected]>

* update readme

Signed-off-by: Daniel Grunberger <[email protected]>

* adding makefile

Signed-off-by: David Wertenteil <[email protected]>

* bump k8s-interface pkg

Signed-off-by: David Wertenteil <[email protected]>

* fixed tests

Signed-off-by: David Wertenteil <[email protected]>

* bump to version 155 (#198)

* bump to version 155

Signed-off-by: David Wertenteil <[email protected]>

* fix hash

Signed-off-by: David Wertenteil <[email protected]>

---------

Signed-off-by: David Wertenteil <[email protected]>

* update watcher

Signed-off-by: Daniel Grunberger <[email protected]>

* fix: reconcile dependencies to latest Storage

Signed-off-by: Vlad Klokun <[email protected]>

* fix tests

Signed-off-by: Daniel Grunberger <[email protected]>

* rename test var

Signed-off-by: Daniel Grunberger <[email protected]>

* update go version

Signed-off-by: Daniel Grunberger <[email protected]>

* adding makefile

Signed-off-by: David Wertenteil <[email protected]>

* update watcher

Signed-off-by: Daniel Grunberger <[email protected]>

* fixed test

Signed-off-by: David Wertenteil <[email protected]>

---------

Signed-off-by: Daniel Grunberger <[email protected]>
Signed-off-by: Vlad Klokun <[email protected]>
Signed-off-by: Amir Malka <[email protected]>
Signed-off-by: David Wertenteil <[email protected]>
Co-authored-by: Daniel Grunberger <[email protected]>
Co-authored-by: Vlad Klokun <[email protected]>
Co-authored-by: Amir Malka <[email protected]>
Co-authored-by: David Wertenteil <[email protected]>
@dwertent dwertent deleted the error-handling branch February 6, 2024 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug_fix release Create release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants