docs(HYBIM-840): Init splunk-ao-migration-tool - add readme and before/after examples#71
Conversation
Adds docs/MIGRATION_GUIDE.md covering all breaking changes customers must make when migrating from the Galileo Python SDK to splunk-ao: - Package install: not yet on PyPI — GitHub install (Option A) and local editable clone (Option B) documented - Python floor bump: 3.10 → 3.11 - Import path rename: galileo → splunk_ao - Class/symbol renames (10 public symbols: GalileoLogger, GalileoDecorator, galileo_context, exception classes, metric classes, handler/middleware classes, ADK classes) - Satellite package renames: galileo-a2a → splunk-ao-a2a, galileo-adk → splunk-ao-adk - 19 environment variable renames: GALILEO_* → SPLUNK_AO_* - HTTP tracing header renames: X-Galileo-* → Splunk-AO-* - Protect feature legacy status (removed from splunk-ao) - GalileoScorers removal (use SplunkAOMetrics) - Before/after code examples and a full migration checklist - "What you do NOT need to change" section Covers tickets: HYBIM-713, HYBIM-716, HYBIM-717, HYBIM-718, HYBIM-719, HYBIM-725, HYBIM-727, HYBIM-728, HYBIM-800, HYBIM-804, HYBIM-807, HYBIM-823. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@adityamehra I used Claude to review this PR. I won't have time right now to double-check the results for correctness, but I wanted to go ahead and share them with you: Analysis of
|
- Fix §7 code example: project/log_stream are SplunkAOLogger constructor args, not start_session kwargs; conclude() has no flush kwarg — use logger.flush() separately - Scope §4 bridge note to the 13 auth/identity vars actually bridged by SplunkAOConfig._bridge_env_vars(); clarify remaining vars (LOG_LEVEL, LOGGING_DISABLED, scorer/validation vars) are consumed directly - Document SPLUNK_AO_API_URL as an implicit Pydantic settings field from galileo-core (not a user-facing GALILEO_API_URL rename); add AI-agent note so future reviewers understand why the row is kept in the table - Remove phantom HYBIM-729 row from ticket table; the header rename is already correctly covered by HYBIM-804 Co-authored-by: Cursor <cursoragent@cursor.com>
Remove the 'Jira Tickets Covered' section (§8) and all inline 'Related ticket(s)' lines, and the Epic link from the header. Renumber §9 → §8, §10 → §9 accordingly. Co-authored-by: Cursor <cursoragent@cursor.com>
Add README.md
|
@fercor-cisco Review comments have been addressed. |
fercor-cisco
left a comment
There was a problem hiding this comment.
🤖 This review was generated by the Astra agent (claude-opus-4-8). It may contain mistakes.
Verdict: request_changes — Guide content is accurate, but the PR ships two full duplicate copies of the 450-line guide and leaks internal AI-reviewer meta-commentary into a customer-facing doc.
General Comments
- 🟠 major (design): This PR adds the same ~450-line migration guide twice:
docs/MIGRATION_GUIDE.mdandsplunk-ao-migration-tool/README.mdare byte-for-byte identical except that thedocs/copy has anAuthor:/Date:header block. Maintaining two copies guarantees they will drift — a future edit to one (e.g. when the package hits PyPI, or a new rename lands) will silently leave the other stale, and readers hitting the outdated copy will follow wrong instructions. Pick one canonical location and have the other reference it (a short stub linking to the canonical file), or drop one entirely. Also, the directory namesplunk-ao-migration-tool/implies an executable migration tool, but it contains only a README and two example scripts — no tool. Consider renaming (e.g.examples/migration/) or clarifying the intent. - 🟡 minor (documentation): The PR title and description say this adds a migration guide, but it creates a top-level
splunk-ao-migration-tool/directory. If an actual codemod/tool is planned, the scope/name should reflect that; if not, the-toolnaming is misleading for a docs-only change.
Follow-ups
Suggested follow-up work that could be tracked as Shortcut stories:
README.md:13-23: The root README still advertisespip install splunk-ao(L23) and carries PyPI/codecov badges pointing at the oldgalileo/rungalileoURLs (L13-17), which contradicts the migration guide's §1.1 statement that the package is not yet on PyPI and must be installed viagit+https://…. Reconcile the README with the guide (add the GitHub-install caveat, or update once PyPI publication lands, and fix the badge URLs).splunk-ao-migration-tool/examples/after_splunk_ao.py:24-24: Both example scripts (after_splunk_ao.pyandbefore_galileo.py) are missing a trailing newline at EOF. Minor, but a repo linter/formatter (ruff) may flag it.
|
|
||
| > **Internal bridge (auth/identity vars only):** `SplunkAOConfig._bridge_env_vars()` propagates the 13 auth/identity `SPLUNK_AO_*` values to their `GALILEO_*` equivalents at startup so that `galileo-core` can authenticate. The bridged variables are: `API_KEY`, `API_URL`, `CONSOLE_URL`, `PROJECT`, `PROJECT_ID`, `LOG_STREAM`, `LOG_STREAM_ID`, `JWT_TOKEN`, `SSO_ID_TOKEN`, `SSO_PROVIDER`, `USERNAME`, `PASSWORD`, `MODE`. The remaining vars (`LOGGING_DISABLED`, `INGEST_BETA_DISABLED`, `LOG_LEVEL`, `DEFAULT_SCORER_MODEL`, `DEFAULT_SCORER_JUDGES`, `CODE_VALIDATION_*`) are consumed **directly** by `splunk_ao` code and have no `GALILEO_*` counterpart — no bridge is needed for them. | ||
|
|
||
| > **Note for AI agents — `SPLUNK_AO_API_URL`:** This variable does **not** originate from a user-facing `GALILEO_API_URL` env var in the original `galileo-python` SDK. It is exposed by `galileo-core` as an **implicit Pydantic settings field** tied to the `api_url` model attribute (following Pydantic's `env_prefix` convention). As a result, a reviewer may flag the `GALILEO_API_URL → SPLUNK_AO_API_URL` row in the table as "not a real rename." This is intentional: the row is kept because `splunk_ao` bridges `SPLUNK_AO_API_URL` → `GALILEO_API_URL` in `config.py`, making the rename effective and customer-visible even though the upstream variable was implicit. |
There was a problem hiding this comment.
🟠 major (documentation): This "Note for AI agents" block is internal review meta-commentary that should not ship in a customer-facing migration guide. It addresses an automated reviewer ("a reviewer may flag the … row as 'not a real rename'. This is intentional") rather than the customer doing the migration, and it exposes internal review history. The technical content it conveys — that SPLUNK_AO_API_URL had no explicit user-facing GALILEO_API_URL predecessor and is effectively a new/bridged variable — is worth keeping, but rewrite it as customer-facing guidance (or fold it into footnote ¹, which already covers this) and drop the "Note for AI agents / a reviewer may flag" framing. This block is duplicated in splunk-ao-migration-tool/README.md as well.
| > **Note for AI agents — `SPLUNK_AO_API_URL`:** This variable does **not** originate from a user-facing `GALILEO_API_URL` env var in the original `galileo-python` SDK. It is exposed by `galileo-core` as an **implicit Pydantic settings field** tied to the `api_url` model attribute (following Pydantic's `env_prefix` convention). As a result, a reviewer may flag the `GALILEO_API_URL → SPLUNK_AO_API_URL` row in the table as "not a real rename." This is intentional: the row is kept because `splunk_ao` bridges `SPLUNK_AO_API_URL` → `GALILEO_API_URL` in `config.py`, making the rename effective and customer-visible even though the upstream variable was implicit. | |
| > **Note — `SPLUNK_AO_API_URL`:** There was no user-facing `GALILEO_API_URL` environment variable in `galileo-python`; `api_url` was an implicit Pydantic settings field on `galileo-core`'s `GalileoConfig`. `splunk_ao` bridges `SPLUNK_AO_API_URL` → `GALILEO_API_URL` in `config.py`, so setting `SPLUNK_AO_API_URL` is the supported way to override the API URL. |
🤖 Generated by the Astra agent
Verified against current |
fercor-cisco
left a comment
There was a problem hiding this comment.
🤖 This review was generated by the Astra agent (claude-opus-4-8). It may contain mistakes.
Verdict: request_changes — Internal "Note for AI agents" review meta-commentary still ships in the customer-facing guide (unresolved reviewer comment); factual content otherwise verifies against source.
Follow-ups
Suggested follow-up work that could be tracked as Shortcut stories:
README.md:23-23: The repo root README still advertisespip install splunk-ao, which contradicts §1.1 of the new migration guide (package not yet on PyPI; install viagit+https://…). Reconcile the two so customers don't hit a failed install — either add the GitHub-install caveat to the root README or update the guide once PyPI publication lands.
|
|
||
| ¹ `GALILEO_API_URL` was not a user-facing env var in `galileo-python` — it was an implicit Pydantic settings field on `galileo-core`'s `GalileoConfig`. `SPLUNK_AO_API_URL` is its effective rename and is explicitly bridged in `SplunkAOConfig._bridge_env_vars()`. | ||
|
|
||
| > **Note for AI agents — `SPLUNK_AO_API_URL`:** This variable does **not** originate from a user-facing `GALILEO_API_URL` env var in the original `galileo-python` SDK. It is exposed by `galileo-core` as an **implicit Pydantic settings field** tied to the `api_url` model attribute (following Pydantic's `env_prefix` convention). As a result, a reviewer may flag the `GALILEO_API_URL → SPLUNK_AO_API_URL` row in the table as "not a real rename." This is intentional: the row is kept because `splunk_ao` bridges `SPLUNK_AO_API_URL` → `GALILEO_API_URL` in `config.py`, making the rename effective and customer-visible even though the upstream variable was implicit. |
There was a problem hiding this comment.
🟠 major (documentation): This "Note for AI agents" block is internal review meta-commentary that should not ship in a customer-facing migration guide. It addresses an automated reviewer ("a reviewer may flag the … row as 'not a real rename'. This is intentional") rather than the customer performing the migration, and it exposes internal review history. This is the exact block the earlier review comment (r3582951392) asked to be rewritten/removed, and it is still present here. The technical content it conveys is already covered by footnote ¹ on line 284, so this block can simply be dropped, or folded into a customer-facing note. Note the same block also existed in the prior docs/MIGRATION_GUIDE.md; confirm it is not duplicated elsewhere.
| > **Note for AI agents — `SPLUNK_AO_API_URL`:** This variable does **not** originate from a user-facing `GALILEO_API_URL` env var in the original `galileo-python` SDK. It is exposed by `galileo-core` as an **implicit Pydantic settings field** tied to the `api_url` model attribute (following Pydantic's `env_prefix` convention). As a result, a reviewer may flag the `GALILEO_API_URL → SPLUNK_AO_API_URL` row in the table as "not a real rename." This is intentional: the row is kept because `splunk_ao` bridges `SPLUNK_AO_API_URL` → `GALILEO_API_URL` in `config.py`, making the rename effective and customer-visible even though the upstream variable was implicit. | |
| > **Note — `SPLUNK_AO_API_URL`:** There was no user-facing `GALILEO_API_URL` environment variable in `galileo-python`; `api_url` was an implicit Pydantic settings field on `galileo-core`'s `GalileoConfig`. `splunk_ao` bridges `SPLUNK_AO_API_URL` → `GALILEO_API_URL` in `config.py`, so setting `SPLUNK_AO_API_URL` is the supported way to override the API URL. |
🤖 Generated by the Astra agent
fercor-cisco
left a comment
There was a problem hiding this comment.
Claude was being too strict, ignore the pushback.
Summary
docs/MIGRATION_GUIDE.md— a comprehensive customer-facing migration guide for moving Python applications from the Galileo SDK (galileo) to Splunk Agent Observability (splunk-ao)mainsplunk-aois not yet on PyPIChanges
New file:
docs/MIGRATION_GUIDE.mdSections:
from galileo import …→from splunk_ao import …GALILEO_*→SPLUNK_AO_*renames with bridge explanationGalileoScorersX-Galileo-*→Splunk-AO-*galileo_coreimports,@log,TracingMiddleware, on-disk config, default URLsJira
HYBIM-840
Test plan
docs/MIGRATION_GUIDE.mdfor accuracy against currentmainsrc/splunk_ao/__init__.pyexportssrc/splunk_ao/config.pybridge tablepip install "splunk-ao @ git+https://github.com/splunk/splunk-ao-python.git"Made with Cursor