Skip to content

fix: Do not overwrite ClassifierReport spec when collecting reports in agentless mode - #532

Merged
gianlucam76 merged 2 commits into
projectsveltos:mainfrom
gianlucam76:remove-classifier
Oct 31, 2026
Merged

gianlucam76 merged 2 commits into
projectsveltos:mainfrom
gianlucam76:remove-classifier

Conversation

@gianlucam76

Copy link
Copy Markdown
Member

In agentless mode sveltos-agent writes the ClassifierReport directly in the management cluster, so the report listed by the collection and the one in the management cluster are the same object. updateClassifierReport copied the listed Spec over the current one, with a fresh resourceVersion obtained by reading it again. When the agent had written Spec.Match since the report was listed, the stale value was written back. Nothing evaluates the Classifier again after that, so the cluster never got its labels.

In agentless mode collection now only marks the current report Processed.

gianlucam76 and others added 2 commits October 31, 2026 07:54
…n agentless mode

In agentless mode sveltos-agent writes the ClassifierReport directly in the
management cluster, so the report listed by the collection and the one in the
management cluster are the same object. updateClassifierReport copied the
listed Spec over the current one, with a fresh resourceVersion obtained by
reading it again. When the agent had written Spec.Match since the report was
listed, the stale value was written back. Nothing evaluates the Classifier
again after that, so the cluster never got its labels.

In agentless mode collection now only marks the current report Processed.
@gianlucam76
gianlucam76 merged commit 2f58144 into projectsveltos:main Oct 31, 2026
9 checks passed
@gianlucam76
gianlucam76 deleted the remove-classifier branch October 31, 2026 07:13
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.

1 participant