Let pmm-agent have its own model and database table

Description

Problem

Currently, pmm-agent is treated by PMM like an agent even though it is not. Also, it shares the data model with other agents. Such architecture led to a few issues, namely:

  • pmm-agent database records are stored in the same table along with other agents

  • there is a lot of places in the code where pmm-agent receives a special treatment compared to other, regular agents

This makes the code a bit complicated and difficult to evolve or migrate, for example p.3 of PMM-12915 is being blocked by this ticket.

Solution

  • Define a separate data model dedicated just to pmm-agent

  • Migrate pmm-agent records to a dedicated pmm_agents table

  • Refactor the code to support these changes

  • Fix the tests

How to test

None

How to document

None

Activity

Details

Assignee

Reporter

Priority

Components

Needs QA

Needs Doc

Planned Version/s

Story Points

Created August 30, 2024 at 1:23 PM
Updated December 3, 2024 at 1:35 PM