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

Rework executor system #2303

Draft
wants to merge 14 commits into
base: release/current
Choose a base branch
from
Draft

Rework executor system #2303

wants to merge 14 commits into from

Conversation

RomuDeuxfois
Copy link
Member

No description provided.

Copy link

codecov bot commented Jan 27, 2025

Codecov Report

Attention: Patch coverage is 41.09589% with 43 lines in your changes missing coverage. Please review.

Project coverage is 36.33%. Comparing base (3854057) to head (9d62901).
Report is 2 commits behind head on release/current.

Files with missing lines Patch % Lines
...io/openbas/scheduler/jobs/InjectsExecutionJob.java 0.00% 17 Missing ⚠️
...i/src/main/java/io/openbas/executors/Executor.java 51.51% 14 Missing and 2 partials ⚠️
.../io/openbas/rest/inject/service/InjectService.java 70.58% 2 Missing and 3 partials ⚠️
.../src/main/java/io/openbas/utils/PayloadMapper.java 0.00% 4 Missing ⚠️
...rc/main/java/io/openbas/rest/inject/InjectApi.java 50.00% 1 Missing ⚠️
Additional details and impacted files
@@                  Coverage Diff                  @@
##             release/current    #2303      +/-   ##
=====================================================
+ Coverage              36.16%   36.33%   +0.16%     
+ Complexity              1653     1647       -6     
=====================================================
  Files                    589      589              
  Lines                  18066    17965     -101     
  Branches                1176     1173       -3     
=====================================================
- Hits                    6533     6527       -6     
+ Misses                 11207    11104     -103     
- Partials                 326      334       +8     

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


@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class StatusPayloadDocument {
Copy link
Contributor

Choose a reason for hiding this comment

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

should we move that to its own file ?


@JsonProperty("file_drop_file")
private Document fileDropFile;
private StatusPayloadDocument fileDropFile;
Copy link
Contributor

Choose a reason for hiding this comment

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

can we use a builder here ?

}
injectStatus.setName(status);
injectStatus.setTrackingSentDate(Instant.now());
injectStatus.setPayloadOutput(injectUtils.getStatusPayloadFromInject(inject));
injectStatusRepository.save(injectStatus);
InjectStatus injectStatusSaved = injectStatusRepository.save(injectStatus);
inject.setStatus(injectStatusSaved);
Copy link
Contributor

Choose a reason for hiding this comment

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

As you I don't like this approach of updating the object in the method as it can have non explicit impact. I know that is not an universal opinion but having both "return" + updating the inject seems more confusing to me.

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.

3 participants