Skip to content

Improve logging of resource sync #1570

Open
@arminfelder

Description

@arminfelder

Is your feature request related to a problem? Please describe.

  1. if a resource e.g. GrafanaDashboard, is skipped, because it lacks
spec.allowCrossNamespaceImport: true

no information hinting at the missing setting is logged.

I would like to see, an INFO line e.g.:

GrafanaDashboard skipped, because it is not in namespace xyz, and allowCrossNamespaceImport is not set or false
  1. I would like to see an INFO line, informing about the sync status, e.g.:
GrafanaDashboard xyz updated in Grafana-x
GrafanaDashboard zzz created in Grafana-x
GrafanaDashboad nnn removed from Grafana-x
GrafanaDashboard sss uptodate in Grafana-x

Activity

added
enhancementNew feature or request
needs triageIndicates an issue or PR lacks a `triage/foo` label and requires one.
on Jun 5, 2024
NissesSenap

NissesSenap commented on Jun 7, 2024

@NissesSenap
Collaborator

@arminfelder we are happy to take a PR around this.

added
triage/acceptedIndicates an issue or PR is ready to be actively worked on.
and removed
needs triageIndicates an issue or PR lacks a `triage/foo` label and requires one.
on Jun 10, 2024
Sheikh-Abubaker

Sheikh-Abubaker commented on Jun 17, 2024

@Sheikh-Abubaker

@NissesSenap I would like to work on this, can you please tell me which file should I look into ?

NissesSenap

NissesSenap commented on Jun 17, 2024

@NissesSenap
Collaborator

@Sheikh-Abubaker that is great. In this case it's probably in https://github.com/grafana/grafana-operator/blob/master/controllers/dashboard_controller.go, but this is something that needs to be improved in all the controllers.

But if you take a look in sure you will find a good row to add this info log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomerstriage/acceptedIndicates an issue or PR is ready to be actively worked on.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

      Participants

      @theSuess@arminfelder@NissesSenap@Sheikh-Abubaker

      Issue actions

        Improve logging of resource sync · Issue #1570 · grafana/grafana-operator