Let pmm-agent have its own model and database table
General
Escalation
General
Escalation
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
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 agentsthere is a lot of places in the code where
pmm-agent
receives a special treatment compared to other, regular agentsThis 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
tableRefactor the code to support these changes
Fix the tests