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

[backend] Fix NoSuchBeanDefinitionException in retrieving command line #1902

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

RomuDeuxfois
Copy link
Member

@RomuDeuxfois RomuDeuxfois commented Nov 21, 2024

@github-actions github-actions bot added the filigran team use to identify PR from the Filigran team label Nov 21, 2024
context.getBean(
injectorContract.getInjector().getType(), io.openbas.execution.Injector.class);
return executor.getCommandsLines(injectorContract.getId());
} catch (NoSuchBeanDefinitionException e) {
Copy link
Contributor

Choose a reason for hiding this comment

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

issue: You should log here that we are swallowing the exception

Copy link
Member Author

Choose a reason for hiding this comment

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

True, I add some details.
Is this consistent with the idea you had?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd probably escalate to Warning I suppose, it looks like a misconfiguration if the requested class is not available for loading.
Otherwise yes it's what I am referring to: no silently dropping an exception, so that we at least know from the logs that something is happening

Copy link

codecov bot commented Nov 21, 2024

Codecov Report

Attention: Patch coverage is 55.55556% with 4 lines in your changes missing coverage. Please review.

Project coverage is 33.61%. Comparing base (fe2e9ed) to head (317909d).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...pi/src/main/java/io/openbas/utils/InjectUtils.java 55.55% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1902      +/-   ##
============================================
- Coverage     33.61%   33.61%   -0.01%     
- Complexity     1682     1683       +1     
============================================
  Files           573      573              
  Lines         16748    16753       +5     
  Branches        976      976              
============================================
+ Hits           5630     5631       +1     
- Misses        10863    10867       +4     
  Partials        255      255              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@RomuDeuxfois RomuDeuxfois force-pushed the bugfix/injector-http-bean-not-found branch from a081b03 to 317909d Compare November 21, 2024 11:00
@RomuDeuxfois RomuDeuxfois merged commit f11fe0e into master Nov 21, 2024
7 checks passed
@RomuDeuxfois RomuDeuxfois deleted the bugfix/injector-http-bean-not-found branch November 21, 2024 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
filigran team use to identify PR from the Filigran team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants