Skip to content

Filtering by dashboards in a specific dashboard list doe not work as expected #340

@booyaa

Description

@booyaa

Update: I've spoken to someone at Datadog Support and we've updated the commands (the outcome is still the same)

I want to import just the single Dashboard "Random" in a dashboard list called "Sync EU Test". Importing from US1 and trying to sync to EU1.

Using the docker image built from the latest commit in this repo (SHA1 f0d5cac)

docker run --rm -v "$(pwd)/datadog-sync-data:/datadog-sync:rw" \
-e DD_SOURCE_API_KEY="${DD_API_KEY}" \
-e DD_SOURCE_APP_KEY="${DD_APP_KEY}" \
-e DD_SOURCE_API_URL="${DD_SITE_URL}" \
datadog-sync:latest import \
--resources="dashboard_lists" \
--filter "Type=dashboard_lists;Name=name;Value=^Sync EU Test$" \
--verify-ddr-status=false \
--verbose --send-metrics=false

This appears to be correct I'm assuming one resource for the Dashboard and one resource for the Dashboard Lists.

2025-04-08 16:33:59,605 - WARNING - Defaulting to filter Operator `ExactMatch'. Please ensure the filter Value provided is updated as this behavior will be removed in the future. See the official README.md for more information.
2025-04-08 16:33:59,605 - INFO - Using local filesystem to store state files
2025-04-08 16:33:59,649 - DEBUG - Using selector: EpollSelector
2025-04-08 16:34:00,167 - INFO - clients validated successfully
2025-04-08 16:34:00,167 - WARNING - DDR verification skipped.
2025-04-08 16:34:00,167 - INFO - Starting import...
               --omitted progress bars-- 
2025-04-08 16:34:00,371 - INFO - Finished getting resources. Successes: 1, Failures: 0, Skipped: 0, Filtered: 0
2025-04-08 16:34:00,372 - INFO - importing individual resource items
2025-04-08 16:34:00,550 - DEBUG - Sent metrics to destination for dashboard_lists
               --omitted progress bars--                                               
2025-04-08 16:34:00,550 - DEBUG - Sent metrics to source for dashboard_lists
               --omitted progress bars--
2025-04-08 16:34:00,553 - INFO - finished importing individual resource items: Successes: 1, Failures: 0, Skipped: 0, Filtered: 19.
2025-04-08 16:34:00,764 - INFO - Finished import

Running diff fails to create the dashboard we wanted to import

docker run --rm -v "$(pwd)/datadog-sync-data:/datadog-sync:rw" \
  -e DD_DESTINATION_API_KEY="${DD_EU_API_KEY}" \
  -e DD_DESTINATION_APP_KEY="${DD_EU_APP_KEY}" \
  -e DD_DESTINATION_API_URL="${DD_EU_SITE_URL}" \
  datadog-sync:latest diffs \
--resources="dashboard_lists" \
--filter "Type=dashboard_lists;Name=name;Value=^Sync EU Test$" \
--verify-ddr-status=false \
--verbose --send-metrics=false

2025-04-08 16:36:44,786 - WARNING - Defaulting to filter Operator `ExactMatch'. Please ensure the filter Value provided is updated as this behavior will be removed in the future. See the official README.md for more information.
2025-04-08 16:36:44,786 - INFO - Using local filesystem to store state files
2025-04-08 16:36:44,833 - DEBUG - Using selector: EpollSelector
2025-04-08 16:36:44,973 - INFO - clients validated successfully
2025-04-08 16:36:44,973 - WARNING - DDR verification skipped.
2025-04-08 16:36:44,973 - INFO - Starting diffs...
2025-04-08 16:36:44,974 - INFO - [dashboard_lists - 548252] - skipping resource: Failed to connect resource. {'dashboards': ['nhi-422-6bk']}
2025-04-08 16:36:44,990 - INFO - Finished diffs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions