Skip to content

[backend/frontend] Bring execution traces at asset/agent level #2976

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

Merged
merged 73 commits into from
Apr 29, 2025

Conversation

savacano28
Copy link
Contributor

@savacano28 savacano28 commented Apr 16, 2025

Proposed changes

Backend

  • Add enpoint to fetch executiontraces by target (service, repo)
  • Add enpoint to fetch global execution traces (service, repo)
  • Rename ExecutionTraces to executionTrace
  • Refact injectapi-> endpoint Scenario/simualtion moved to injectscenario/InjectSimulation api
  • Refact injectstatusMapper, agentMapper, agentUtils
  • Modify dto injectResultOverview to send a simple version of status (without traces)
  • Int test for endpoints

FrontEnd : based on https://www.figma.com/design/hDOleefK97Nj5PlHk0tENr/OBAS-2025---Q1?node-id=1040-850&p=f&t=X38kJlDP9qONjlcj-0

  • Refact inject/atomic overview: add tooltip with inject information, relocate result pie charts in header
  • Refact components: InjectHeader, InjectIndex, atomicIndex, atomicHeader
  • Create components: AtomicTitle, atomicHeader, atomicTabs, AtomicActions, AtomicRoutes, Inject*
  • Refact component traces: agenttraces, endpointtraces, executionstatusdetail

Attention:

  • Creation technical pain imp for : TargetResultsDetails.tsx, AtomicTesting.tsx

How can you test it?

  • Execute an inject as atomic testing and verify traces in overview and execution detail tabs.
  • Create an exercise with some injects, launch exercise and verify the injects.

Screenshoots Results:
image (1)
image
image

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
  • For bug fix -> I implemented a test that covers the bug

@savacano28 savacano28 changed the base branch from master to release/current April 16, 2025 09:16
@savacano28 savacano28 self-assigned this Apr 16, 2025
@savacano28 savacano28 added the filigran team use to identify PR from the Filigran team label Apr 16, 2025
@savacano28 savacano28 requested a review from MarineLeM April 16, 2025 12:53
@savacano28 savacano28 modified the milestone: PoC MSSP Apr 16, 2025
Copy link

codecov bot commented Apr 16, 2025

Codecov Report

Attention: Patch coverage is 48.88889% with 161 lines in your changes missing coverage. Please review.

Project coverage is 41.15%. Comparing base (8541b48) to head (55ff98b).
Report is 1 commits behind head on release/current.

Files with missing lines Patch % Lines
.../io/openbas/rest/inject/service/InjectService.java 34.23% 71 Missing and 2 partials ⚠️
...java/io/openbas/rest/inject/ExerciseInjectApi.java 48.43% 33 Missing ⚠️
...main/java/io/openbas/utils/InjectStatusMapper.java 75.00% 11 Missing and 1 partial ⚠️
.../java/io/openbas/injectors/ovh/OvhSmsExecutor.java 0.00% 11 Missing ⚠️
...java/io/openbas/rest/inject/ScenarioInjectApi.java 70.37% 6 Missing and 2 partials ⚠️
...pi/src/main/java/io/openbas/utils/AgentMapper.java 61.11% 6 Missing and 1 partial ⚠️
...va/io/openbas/service/InjectTestStatusService.java 0.00% 5 Missing ⚠️
...enbas/rest/inject/service/InjectStatusService.java 63.63% 2 Missing and 2 partials ⚠️
...i/src/main/java/io/openbas/executors/Executor.java 50.00% 2 Missing ⚠️
.../openbas/injectors/email/service/EmailService.java 33.33% 2 Missing ⚠️
... and 3 more
Additional details and impacted files
@@                  Coverage Diff                  @@
##             release/current    #2976      +/-   ##
=====================================================
+ Coverage              41.00%   41.15%   +0.14%     
- Complexity              2308     2324      +16     
=====================================================
  Files                    687      689       +2     
  Lines                  21146    21147       +1     
  Branches                1441     1440       -1     
=====================================================
+ Hits                    8671     8702      +31     
+ Misses                 11985    11954      -31     
- Partials                 490      491       +1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@savacano28 savacano28 force-pushed the issue/2833 branch 8 times, most recently from 6a710c6 to b97476d Compare April 24, 2025 07:13
@savacano28 savacano28 force-pushed the issue/2833 branch 3 times, most recently from 0e74a44 to 2dd4f97 Compare April 24, 2025 10:24
@savacano28 savacano28 marked this pull request as ready for review April 24, 2025 14:47
@antoinemzs antoinemzs self-requested a review April 25, 2025 14:59
@savacano28 savacano28 force-pushed the issue/2833 branch 2 times, most recently from e9e4ff4 to cc8fbe4 Compare April 28, 2025 06:57
@MarineLeM
Copy link
Contributor

There is layout problemes
image

As you can see on the image above :

  • The tab names are incomplete.
  • The button labels "relaunch now" should be on one line.
  • The search by target, based on the mockup, should be inside the targets card.
  • The descriptions in the results by target card should be aligned.

Moreover, based on the mockup, the execution status is inside the results by target card, and in the screenshot it's above the inject title. Is this normal?

@savacano28
Copy link
Contributor Author

Fixes:

  • The tab names are incomplete.
  • The button labels "relaunch now" should be on one line
  • Moreover, based on the mockup, the execution status is inside the results by target card, and in the screenshot it's above the inject title. Is this normal?: Fixed: status should be aside of title

These parts are no related to this pr:

  • The search by target, based on the mockup, should be inside the targets card
  • The descriptions in the results by target card should be aligned.

@MarineLeM
Copy link
Contributor

image

When there is no trace on a specific target, perhaps we should display a message saying "No trace on this target.' ?

@savacano28 savacano28 merged commit 6ebf65d into release/current Apr 29, 2025
3 of 5 checks passed
@savacano28 savacano28 deleted the issue/2833 branch April 29, 2025 14:40
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.

Bring execution traces at asset/agent level
4 participants