Skip to content

Backfill 'account' field on sources under aws-observability collectors with respective aws account alias - #297

Merged
sachin-sumologic merged 10 commits into
masterfrom
backfill-account-alias
Sep 23, 2026
Merged

sachin-sumologic merged 10 commits into
masterfrom
backfill-account-alias

Conversation

@sachin-sumologic

Copy link
Copy Markdown
Collaborator

Backfill 'account' field on sources under aws-observability collectors with respective aws account alias

@sachin-sumologic
sachin-sumologic requested a review from a team as a code owner August 28, 2026 07:55
Comment thread aws-observability/scripts/BACKFILL_ACCOUNT_ALIAS_README.md Outdated
Comment thread aws-observability/scripts/BACKFILL_ACCOUNT_ALIAS_README.md Outdated
Comment thread aws-observability/scripts/backfill_aws_account_alias.py Outdated
Comment thread aws-observability/scripts/backfill_aws_account_alias.py Outdated
…as validation improvements to backfill script
Comment thread aws-observability/scripts/backfill_aws_account_alias.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.py implementing 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.

Comment thread aws-observability/scripts/backfill_aws_account_alias.py
Comment thread aws-observability/scripts/backfill_aws_account_alias.py
Comment thread aws-observability/scripts/backfill_aws_account_alias.py Outdated
Comment thread aws-observability/scripts/BACKFILL_ACCOUNT_ALIAS_README.md
Comment thread aws-observability/scripts/BACKFILL_ACCOUNT_ALIAS_README.md Outdated
sachin-sumologic and others added 4 commits September 10, 2026 17:15
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>

@akhil-sumologic akhil-sumologic left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sachin-sumologic
sachin-sumologic merged commit 53ec3c3 into master Sep 23, 2026
3 checks passed
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.

4 participants