feat(flightcheck): validate ServiceNow portal base URL env vars (US 7535608) - #174
feat(flightcheck): validate ServiceNow portal base URL env vars (US 7535608)#174srideshpande wants to merge 5 commits into
Conversation
…535608)
Adds SN-URL-001 (HRSD) and SN-URL-002 (ITSM) checks that verify each
ServiceNow extension pack's update-safe portal base URL environment variable
(msdyn_ServiceNow{HRSD,ITSM}PortalBaseURI) is present and a well-formed
absolute URL. An empty value is the root cause of ICM 820635151 (hyperlinks
only returned when explicitly requested).
Status mapping: PASSED (valid URL), FAILED (definition exists but no value -
the maker step was missed), WARNING (value set but not an absolute URL),
NotConfigured (pack not installed), SKIPPED (no Dataverse token). Wired into
run_servicenow_checks.
Test (test_servicenow_base_url.py) mirrors the Workday env-var pattern using
the documented-tier Dataverse mock: 6 cases covering both-set, missing-value,
per-pack independence, malformed URL, definition-absent, and no-token.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
👋 Friendly reminder: This PR has been inactive for a while. Could the author or reviewers take a look and either push it forward, request changes, or close it if it's no longer needed? Let's keep our PR queue healthy! 🚀 |
…hipped solution
The ESSVivaCopilot solution ships the portal base URL environment variables
without a publisher prefix (ServiceNow{HRSD,ITSM}PortalBaseURI), for consistency
with existing env var naming. Update the FlightCheck expected-schema constants,
test fixtures, and docs to match. The runtime lookup was already publisher-agnostic
(contains-filter + prefix-stripped substring match), so behavior is unchanged; this
keeps the declared schema names accurate.
…r (fix false positives found in PROD validation) Validated SN-CFG-002 against a real PROD tenant: of 21 ServiceNow-named template configs, only 2 (msdyn_ServiceNowHRSD / msdyn_ServiceNowITSM) carry the portal base URL as a ServiceNowPortalBaseURI field. The original check flagged all 21, producing 19 false positives. - Scope the check to only configs that carry a ServiceNowPortalBaseURI field; scenario/field-mapping configs never hold a URL and are ignored. - Validate the ServiceNowPortalBaseURI field value specifically rather than scanning the whole config blob for any URL. - Defer per-pack to the update-safe SN-URL env var (US 7535608, PR #174) when it holds a valid URL, so SN-CFG-002 and SN-URL-001/002 do not double-fire on tenants migrated to the env-var mechanism. - Rewrite SN-CFG-002 tests to the real config shape and add scoping and deference coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: cae8da1a-6f8b-44db-af8c-52a559fc6a94
…ull env-var scan) The ServiceNow portal base URL check pulled every environmentvariablevalues record in the environment and filtered client-side. Narrow the values query to only the PortalBaseURI definition ids found, and skip it entirely when no definitions exist. Behavior is unchanged; this avoids a full environment-variable scan on every run. Verified the _environmentvariabledefinitionid_value eq <id> filter returns the correct value against a live environment. Add a test asserting no environmentvariablevalues query is issued when no definitions are found. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 06a09025-d97f-4f25-97af-cf2e37ae1d6d
|
Review summary — SN-URL-001 / SN-URL-002 (ServiceNow portal base URL env vars) Verdict: Approve. I reviewed the design and logic, validated the checks against a live EmployeeHub environment, and applied one small efficiency fix with a test. Nothing else blocks merge. Design. Live validation (EmployeeHub tenant). Fix applied. Tests. The fix is pushed to this branch as commit 49e07b6. |
What & why
Adds ESS FlightCheck coverage for the update-safe ServiceNow portal base URL environment variables introduced for US 7535608 (Option B). An empty base URL is the root cause of ICM 820635151 — ServiceNow record hyperlinks only returned when explicitly requested.
Changes
SN-URL-001(HRSD) /SN-URL-002(ITSM) inservicenow.py, wired intorun_servicenow_checks. Each verifies its env var (msdyn_ServiceNow{HRSD,ITSM}PortalBaseURI) is present and a well-formed absolute URL:test_servicenow_base_url.py— 6 cases (both-set, missing-value, per-pack independence, malformed URL, definition-absent, no-token), mirroring the Workday env-var test and using the documented-tier Dataverse mock.Validation
pytest tests/flightcheck/checks/test_servicenow_base_url.py→ 6 passed. Full ServiceNow + role-enforcement suite (37 tests) green.Related
Pairs with the ESSVivaCopilot solution PR that creates these env vars + wires the orchestrator flows (US 7535608 Tasks 2–3).