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

[frontend/backend] Adding platform messages if imap is not reachable #1284

Merged
merged 4 commits into from
Aug 1, 2024

Conversation

Dimfacion
Copy link
Member

@Dimfacion Dimfacion commented Aug 1, 2024

Proposed changes

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

Copy link

codecov bot commented Aug 1, 2024

Codecov Report

Attention: Patch coverage is 20.00000% with 28 lines in your changes missing coverage. Please review.

Project coverage is 28.55%. Comparing base (fc98339) to head (203209d).

Files Patch % Lines
...va/io/openbas/service/PlatformSettingsService.java 7.69% 12 Missing ⚠️
...o/openbas/injectors/email/service/ImapService.java 40.00% 9 Missing ⚠️
...enbas/rest/settings/response/PlatformSettings.java 0.00% 5 Missing ⚠️
...cutors/caldera/service/CalderaExecutorService.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1284      +/-   ##
============================================
- Coverage     28.78%   28.55%   -0.24%     
+ Complexity     1286     1283       -3     
============================================
  Files           507      507              
  Lines         13007    13022      +15     
  Branches        736      741       +5     
============================================
- Hits           3744     3718      -26     
- Misses         9105     9146      +41     
  Partials        158      158              

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

@Dimfacion Dimfacion marked this pull request as ready for review August 1, 2024 08:33
@Dimfacion Dimfacion added this to the Release 1.4.0 milestone Aug 1, 2024
@RomuDeuxfois
Copy link
Member

Look good to me.
The log will be full of this on the other hand

java.lang.IllegalStateException: Not connected
at org.eclipse.angus.mail.imap.IMAPStore.checkConnected(IMAPStore.java:1983) ~[jakarta.mail-2.0.2.jar:na]
at org.eclipse.angus.mail.imap.IMAPStore.getFolder(IMAPStore.java:1760) ~[jakarta.mail-2.0.2.jar:na]
at io.openbas.injectors.email.service.ImapService.syncFolders(ImapService.java:301) ~[classes/:na]
at io.openbas.injectors.email.service.ImapService.connectionListener(ImapService.java:325) ~[classes/:na]
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[na:na]
at org.springframework.scheduling.support.ScheduledMethodRunnable.runInternal(ScheduledMethodRunnable.java:130) ~[spring-context-6.1.1.jar:6.1.1]
at org.springframework.scheduling.support.ScheduledMethodRunnable.lambda$run$2(ScheduledMethodRunnable.java:124) ~[spring-context-6.1.1.jar:6.1.1]
at io.micrometer.observation.Observation.observe(Observation.java:499) ~[micrometer-observation-1.12.0.jar:1.12.0]
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:124) ~[spring-context-6.1.1.jar:6.1.1]
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) ~[spring-context-6.1.1.jar:6.1.1]
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[na:na]
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358) ~[na:na]
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[na:na]

@Dimfacion Dimfacion merged commit c050bb0 into master Aug 1, 2024
6 checks passed
@Dimfacion Dimfacion removed this from the Release 1.4.0 milestone Aug 1, 2024
@RomuDeuxfois RomuDeuxfois added this to the Release 1.4.0 milestone Aug 1, 2024
@RomuDeuxfois RomuDeuxfois added solved The issue has been solved feature use for describing a new feature to develop and removed feature use for describing a new feature to develop solved The issue has been solved labels Aug 1, 2024
@RomuDeuxfois RomuDeuxfois removed this from the Release 1.4.0 milestone Aug 1, 2024
@Dimfacion Dimfacion deleted the issue/1269 branch August 6, 2024 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants