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

feat(BA-435): Implement GQL for querying and modifying AbusingReportConfig #3355

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

jopemachine
Copy link
Member

@jopemachine jopemachine commented Jan 3, 2025

Aims to resolve #3342 (BA-435).

How it works

In the case of configuration change mutations, only specific settings are modified through an RPC call named set_local_config.

The agent called via set_local_config updates its in-memory local_config and also updates the agent.toml file to ensure that the changed settings are retained even after a reboot.

Considerations

Note

Please note that settings used in initialization logic will not be applied immediately.

For example, in the case of modify_abusing_report_config, the initialization logic in AbstractAgent.__ainit__() that recursively creates the folder if the abuse-report-path does not exist will not be executed. Therefore, the directory for abuse-report-path must already exist.

Query example

query {
  abusing_report_config(agent_id: "<agent_id>") {
    abuse_report_path
    force_terminate_abusing_containers
  }
}

Mutation example

mutation {
  modify_abusing_report_config (agent_id: "<agent_id>", props: { abuse_report_path: "<abuse_report_path>" }) {
    ok
  }
}

Checklist: (if applicable)

  • Milestone metadata specifying the target backport version
  • Mention to the original issue
  • API server-client counterparts (e.g., manager API -> client SDK)
  • Test case(s) to:
    • Demonstrate the difference of before/after
    • Demonstrate the flow of abstract/conceptual models with a concrete implementation

📚 Documentation preview 📚: https://sorna--3355.org.readthedocs.build/en/3355/


📚 Documentation preview 📚: https://sorna-ko--3355.org.readthedocs.build/ko/3355/

@github-actions github-actions bot added area:docs Documentations comp:manager Related to Manager component comp:agent Related to Agent component size:M 30~100 LoC labels Jan 3, 2025
@jopemachine jopemachine changed the title feat: Implement AbusingReportConfig GQL feat(BA-435): Implement AbusingReportConfig GQL Jan 3, 2025
@jopemachine jopemachine added this to the 25Q1 milestone Jan 3, 2025
@github-actions github-actions bot added comp:common Related to Common component size:L 100~500 LoC and removed size:M 30~100 LoC labels Jan 7, 2025
@jopemachine jopemachine changed the title feat(BA-435): Implement AbusingReportConfig GQL feat(BA-435): Implement GQL for querying and modifying AbusingReportConfig Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:docs Documentations comp:agent Related to Agent component comp:common Related to Common component comp:manager Related to Manager component size:L 100~500 LoC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Guard tag (indicating of detecting abusing containers) not displayed in Control Panel Agent list
1 participant