Reta Gasser
07/14/2025, 4:56 PMraise InvalidSelectorError(
07/10/2025 5:18:03 PM
elementary.monitor.data_monitoring.schema.InvalidSelectorError: ('Selector is invalid for report: ', 'tag:sae-syncouts')
I am running Elementary 0.19.0 and here is what I am running (parmeters are populated but not sharing for security purposes)
mkdir -p $(pwd)/service_accounts
printf "%s" "$GOOGLE_APPLICATION_CREDENTIALS_PASSWORD" > $(pwd)/service_accounts/elementary.json
# Set default app creds
export GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/service_accounts/elementary.json
# Generate and send report to Slack
edr send-report --select tag:sae-syncouts \
--google-service-account-path "$(pwd)/service_accounts/elementary.json" \
--gcs-bucket-name $GCS_BUCKET \
--bucket-file-path $GCS_URI \
--gcs-timeout-limit $GCS_TIMEOUT \
--slack-token $SLACK_TOKEN_PASSWORD \
--slack-channel-name $SLACK_CHANNEL \
--disable-passed-test-metrics $DISABLE_PASSED_TEST_METRICS \
--days-back $DAYS_BACK \
--project-name "$PROJECT_NAME" \
--env "$PROJECT_ENVIRONMENT" \
-p /app/src/slack_report \
-t prodkapa.ai
07/14/2025, 4:56 PMkapa.ai
07/14/2025, 4:56 PMraise InvalidSelectorError( elementary.monitor.data_monitoring.schema.InvalidSelectorError: ('Selector is invalid for report: ', 'tag:sae-syncouts') is due to a change in how Elementary handles selectors for the edr send-report command. As of recent versions (including 0.19.0), filtering reports by tag (e.g., --select tag:sae-syncouts) is not supported for the report itself—only certain selectors like last_invocation, invocation_id, and invocation_time are valid for reports. Tag-based filtering is only supported for the summary notification, and only if you disable the HTML report attachment. To filter the summary by tag, you must add --disable html_attachment to your command. This will allow the summary sent to Slack to be filtered by tag, owner, or model, but the full HTML report will not be attached or filtered. Here’s how you should modify your command: bash edr send-report --select tag:sae-syncouts \ --google-service-account-path "$(pwd)/service_accounts/elementary.json" \ --gcs-bucket-name $GCS_BUCKET \ --bucket-file-path $GCS_URI \ --gcs-timeout-limit $GCS_TIMEOUT \ --slack-token $SLACK_TOKEN_PASSWORD \ --slack-channel-name $SLACK_CHANNEL \ --disable-passed-test-metrics $DISABLE_PASSED_TEST_METRICS \ --days-back $DAYS_BACK \ --project-name "$PROJECT_NAME" \ --env "$PROJECT_ENVIRONMENT" \ --disable html_attachment \ -p /app/src/slack_report \ -t prod Key points: - The report itself cannot be filtered by tag; only the summary can be filtered this way. - You must use --disable html_attachment to enable summary filtering by tag, owner, or model. - If you want to filter the full report, you can only use selectors like last_invocation, invocation_id, or invocation_time [Send report summary notification to Slack](https://docs.elementary-data.com/oss/guides/share-observability-report/send-report-summary). This change was introduced to clarify the difference between filtering the summary and the full report, and to avoid confusion about what is actually being filtered. If you need the full report filtered by tag, this is currently not supported, but you can filter within the report UI after it is generated. If you need more advanced filtering, you may want to follow or contribute to the related feature requests on GitHub, as this is a known limitation [Filter send-report using multiple selectors](https://github.com/elementary-data/elementary/issues/1686). Let me know if you need further clarification!Reta Gasser
07/14/2025, 5:17 PM('Selector is invalid for report: ', 'tag:sae-syncouts') Do you need any more info to troubleshoot? Any other ideas about what might be going wrong?kapa.ai
07/14/2025, 5:17 PMkapa.ai
07/14/2025, 5:18 PM--disable html_attachment and are still seeing the same error: ('Selector is invalid for report: ', 'tag:sae-syncouts') Based on the knowledge sources, the expected behavior is that when you use --disable html_attachment, tag-based selectors (like --select tag:sae-syncouts) should be valid for filtering the summary notification sent to Slack, even though the full report itself cannot be filtered by tag. This was confirmed as a fix in recent versions after a period where this functionality was temporarily disabled and then restored in a later release. The fix specifically required the use of --disable html_attachment to enable tag-based filtering for the summary, as described by Elementary support staff and in the documentation [Send report summary notification to Slack](https://docs.elementary-data.com/oss/guides/share-observability-report/send-report-summary) and [Slack support thread](https://slack.com/archives/C02CTC89LAX/p1699885605498959). However, since you are still encountering the error in version 0.19.0, there are a few possibilities: 1. Version Mismatch or Regression: There may be a regression or a change in how selectors are validated in version 0.19.0. The knowledge sources confirm the fix was available in earlier versions (e.g., after 0.12.0), but do not provide explicit confirmation for 0.19.0. It's possible that a bug or change has reintroduced this issue. 2. Selector Syntax or Command Context: Double-check that there are no typos in your selector or command. The selector should be in the format tag:<tag_name>, which you have used correctly. 3. CLI Option Placement: Ensure that --disable html_attachment is not being overridden or ignored due to command structure or scripting issues. 4. Known Limitation: The knowledge sources do not mention any additional requirements or configuration for this feature beyond what you have already provided. Next Steps: - If possible, try running the same command with a different tag or a simpler selector (e.g., --select model:<model_name>) to see if the error persists. - Check your installed version of the Elementary CLI and ensure it matches the expected behavior described in the documentation and support threads. - If the issue persists, it may be a regression or bug in 0.19.0 that is not documented in the available knowledge sources. In this case, I recommend reaching out to the Elementary support team or checking the [GitHub issues](https://github.com/elementary-data/elementary/issues) for recent reports related to selector errors in the latest versions. Summary: According to the knowledge sources, your usage should work. Since it does not, and there is no further troubleshooting guidance in the sources, I cannot provide a definitive solution. This may be a bug or regression in the version you are using. If you can share your exact command and confirm the CLI version, that may help further. Otherwise, contacting support or checking for recent issues is the best next step. Let me know if you have more details or logs to share!Reta Gasser
07/14/2025, 5:42 PM