Backfill 'account' field on sources under aws-observability collectors with respective aws account alias - #297
Merged
Merged
Conversation
…s with respective aws account alias
npande
reviewed
Sep 9, 2026
…as validation improvements to backfill script
…as validation improvements to backfill script
npande
reviewed
Sep 9, 2026
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The script has a confirmed runtime robustness issue when parsing user-edited CSVs (possible None.strip() crash) and logging is currently configured in a way that can be silent in the terminal and can accumulate duplicate handlers across runs.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR adds a new AWS Observability utility script that prepares a CSV of candidate sources under aws-observability-* collectors and then applies user-provided AWS account aliases by updating the sources’ fields.account via the Sumo Logic API.
Changes:
- Added
backfill_aws_account_alias.pyimplementing a two-step (prepare/apply) CSV-driven backfill workflow with retry logic and logging. - Added a comprehensive pytest suite covering URL construction, collector parsing, alias validation, CSV I/O, prepare/apply flows, and log-dir behavior.
- Added a README documenting usage and parameters for the backfill workflow.
File summaries
| File | Description |
|---|---|
| aws-observability/scripts/backfill_aws_account_alias.py | Implements the backfill script (CSV generation + apply with validation/retries/logging). |
| aws-observability/scripts/test_backfill_aws_account_alias.py | Adds pytest coverage for the script’s key behaviors and edge cases. |
| aws-observability/scripts/BACKFILL_ACCOUNT_ALIAS_README.md | Documents prerequisites and operational steps for running the backfill script. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 5
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backfill 'account' field on sources under aws-observability collectors with respective aws account alias