Skip to content

add: support agent group cron and update-to-latest handling#413

Merged
bjoernricks merged 1 commit into
mainfrom
add/agent-group-cron-update-to-latest
May 26, 2026
Merged

add: support agent group cron and update-to-latest handling#413
bjoernricks merged 1 commit into
mainfrom
add/agent-group-cron-update-to-latest

Conversation

@ozgen
Copy link
Copy Markdown
Member

@ozgen ozgen commented May 26, 2026

What

  • Updated modify_agent in gsad to support update_to_latest.
  • Made update_to_latest optional, so it is only sent when provided.
  • Updated create_agent_group and save_agent_group to send scheduler_cron_time.
  • Checked the generated payloads for agent updates and agent group create/save.

Why

  • Agents need support for enabling or disabling update-to-latest.
  • update_to_latest should not be sent when it was not changed.
  • Agent groups need to save their scheduler cron configuration.
  • gsad needs to match the updated frontend and gvmd command handling.

References

GEA-1791

depending on: greenbone/gvmd#2928

Update gsad command handling for agents and agent groups.

The modify_agent command now supports update_to_latest as an optional field,
so it is only included in the GMP request when provided by the frontend.

The create_agent_group and save_agent_group commands now forward
scheduler_cron_time to gvmd, allowing agent group scheduler cron settings to be
created and modified through gsad.

This keeps gsad aligned with the updated GMP command payloads used by the
frontend and avoids sending unrelated agent fields when only update_to_latest
should be changed.
@ozgen ozgen requested review from a team as code owners May 26, 2026 14:22
@greenbonebot greenbonebot enabled auto-merge (rebase) May 26, 2026 14:22
@ozgen ozgen disabled auto-merge May 26, 2026 14:22
@codecov
Copy link
Copy Markdown

codecov Bot commented May 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.06%. Comparing base (333cdc2) to head (7f85aab).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #413   +/-   ##
=======================================
  Coverage   95.06%   95.06%           
=======================================
  Files          32       32           
  Lines        5046     5047    +1     
  Branches      144      144           
=======================================
+ Hits         4797     4798    +1     
  Misses        180      180           
  Partials       69       69           
Flag Coverage Δ
unittests 95.06% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@bjoernricks bjoernricks merged commit 88ef642 into main May 26, 2026
21 checks passed
@bjoernricks bjoernricks deleted the add/agent-group-cron-update-to-latest branch May 26, 2026 14:31
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