From 7a7d2590012f5455069b3a3d857a3875bd46ef4f Mon Sep 17 00:00:00 2001 From: Akash Verma Date: Fri, 6 Nov 2026 13:01:50 +0530 Subject: [PATCH 1/7] fix(sigma): make optional response fields optional in models Sigma's spec marks `total` on the workbook, page, element and query listings, `isArchived` on a workbook, and a query's `name` as optional. When one was missing, validation failed and the client returned no workbooks, elements or queries. Verified against Sigma's OpenAPI spec (downloaded 2026-11-06) and DataHub; not live-verified (no Sigma instance). --- .../ingestion/source/dashboard/sigma/models.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ingestion/src/metadata/ingestion/source/dashboard/sigma/models.py b/ingestion/src/metadata/ingestion/source/dashboard/sigma/models.py index b063ae6fa580..7f9192eaa3cb 100644 --- a/ingestion/src/metadata/ingestion/source/dashboard/sigma/models.py +++ b/ingestion/src/metadata/ingestion/source/dashboard/sigma/models.py @@ -35,13 +35,13 @@ class WorkbookDetails(BaseModel): url: str path: str | None = None ownerId: str | None = None # noqa: N815 - isArchived: bool # noqa: N815 + isArchived: bool | None = None # noqa: N815 description: str | None = None class WorkBookResponseDetails(BaseModel): entries: list[Workbook] | None = [] - total: int + total: int | None = None nextPage: str | None = None # noqa: N815 @@ -56,7 +56,7 @@ class WorkBookPage(BaseModel): class WorkBookPageResponse(BaseModel): entries: list[WorkBookPage] | None = [] - total: int + total: int | None = None nextPage: str | None = None # noqa: N815 @@ -69,7 +69,7 @@ class Elements(BaseModel): class ElementsResponse(BaseModel): entries: list[Elements] | None = [] - total: int + total: int | None = None nextPage: str | None = None # noqa: N815 @@ -122,12 +122,12 @@ def node_schema(self): class WorkbookQuery(BaseModel): elementId: str # noqa: N815 - name: str | None + name: str | None = None sql: str | None = None error: str | None = None class WorkbookQueriesResponse(BaseModel): entries: list[WorkbookQuery] | None = [] - total: int + total: int | None = None nextPage: str | None = None # noqa: N815 From 1c9d0b51e66a86bd69c296618184864c1417d760 Mon Sep 17 00:00:00 2001 From: Akash Verma Date: Sat, 7 Nov 2026 02:01:46 +0530 Subject: [PATCH 2/7] test(sigma): add a faked Sigma HTTP fixture to the connector tests The connector tests get a SigmaSource with its real client, whose HTTP is answered from Sigma-spec-shaped routes that a test can change. A `page` query parameter is part of the route key, and an int route answers with that HTTP status. --- .../unit/topology/dashboard/test_sigma.py | 128 ++++++++++++++++++ 1 file changed, 128 insertions(+) diff --git a/ingestion/tests/unit/topology/dashboard/test_sigma.py b/ingestion/tests/unit/topology/dashboard/test_sigma.py index 8dee29689169..be661e70ed02 100644 --- a/ingestion/tests/unit/topology/dashboard/test_sigma.py +++ b/ingestion/tests/unit/topology/dashboard/test_sigma.py @@ -13,9 +13,15 @@ Test sigma Dashboard using the topology """ +import json +from collections import Counter from types import SimpleNamespace from unittest import TestCase from unittest.mock import MagicMock, patch +from urllib.parse import urlparse + +import pytest +import requests from metadata.generated.schema.api.data.createChart import CreateChartRequest from metadata.generated.schema.api.data.createDashboard import CreateDashboardRequest @@ -45,6 +51,7 @@ from metadata.generated.schema.type.entityReference import EntityReference from metadata.ingestion.api.models import Either from metadata.ingestion.ometa.ometa_api import OpenMetadata +from metadata.ingestion.source.dashboard.sigma.client import SigmaApiClient from metadata.ingestion.source.dashboard.sigma.metadata import SigmaSource from metadata.ingestion.source.dashboard.sigma.models import ( Elements, @@ -669,3 +676,124 @@ def test_get_chart_details_empty_page_elements(self, mock_rest): # Should return empty list or handle gracefully assert result == [] + + +def sigma_workbook(workbook_id: str, owner_id: str) -> dict: + return { + "workbookId": workbook_id, + "workbookUrlId": f"url-{workbook_id}", + "name": f"Sales {workbook_id}", + "url": f"https://app.sigmacomputing.com/acme/workbook/{workbook_id}", + "path": "Shared/Finance", + "latestVersion": 3, + "ownerId": owner_id, + "createdBy": owner_id, + "updatedBy": owner_id, + "createdAt": "2026-01-01T00:00:00Z", + "updatedAt": "2026-01-02T00:00:00Z", + } + + +def sigma_member(member_id: str, email: str) -> dict: + return { + "organizationId": "org-1", + "memberId": member_id, + "memberType": "admin", + "firstName": "Ada", + "lastName": "Lovelace", + "email": email, + "profileImgUrl": None, + "createdBy": member_id, + "updatedBy": member_id, + "createdAt": "2026-01-01T00:00:00Z", + "updatedAt": "2026-01-02T00:00:00Z", + "homeFolderId": "folder-1", + "userKind": "internal", + } + + +SIGMA_WORKBOOKS = [ + sigma_workbook("wb-1", "member-1"), + sigma_workbook("wb-2", "member-1"), + sigma_workbook("wb-3", "member-2"), +] + + +def sigma_routes() -> dict: + """Sigma responses valid against its OpenAPI spec, keyed by (method, path)""" + routes = { + ("POST", "/v2/auth/token"): {"access_token": "token", "token_type": "bearer", "expires_in": 3600}, + ("GET", "/v2/workbooks"): {"entries": SIGMA_WORKBOOKS, "nextPage": None}, + ("GET", "/v2/connections"): {"entries": [], "nextPage": None}, + ("GET", "/v2/members/member-1"): sigma_member("member-1", "ada@example.com"), + ("GET", "/v2/members/member-2"): sigma_member("member-2", "grace@example.com"), + ("GET", "/v2/files/T1"): { + "id": "T1", + "urlId": "t1-url", + "name": "ORDERS", + "type": "table", + "parentId": "P1", + "parentUrlId": "p1-url", + "permission": "view", + "path": "Connection Root/ANALYTICS.PUBLIC", + "badge": None, + "isArchived": False, + "createdBy": "member-1", + "updatedBy": "member-1", + "createdAt": "2026-01-01T00:00:00Z", + "updatedAt": "2026-01-02T00:00:00Z", + }, + } + for workbook in SIGMA_WORKBOOKS: + workbook_path = f"/v2/workbooks/{workbook['workbookId']}" + element_id = f"el-{workbook['workbookId']}" + routes["GET", workbook_path] = workbook + routes["GET", f"{workbook_path}/pages"] = {"entries": [{"pageId": "page-1"}], "nextPage": None} + routes["GET", f"{workbook_path}/lineage"] = {"entries": [], "nextPage": None} + routes["GET", f"{workbook_path}/pages/page-1/elements"] = { + "entries": [{"elementId": element_id, "name": "Revenue", "vizualizationType": "bar"}], + "nextPage": None, + } + routes["GET", f"{workbook_path}/lineage/elements/{element_id}"] = { + "dependencies": {}, + "edges": [{"source": "inode-T1", "target": f"sheet-{element_id}", "type": "source"}], + } + return routes + + +@pytest.fixture +def routes() -> dict: + return sigma_routes() + + +@pytest.fixture +def sigma_over_http(routes): + """ + SigmaSource with its real client; HTTP is answered from `routes` and counted per (method, path). + A `page` query parameter is part of the route key, and an int route answers with that error status. + """ + calls = Counter() + + def request(method, url, params=None, **_): + path = urlparse(str(url)).path + calls[method, path] += 1 + page = (params or {}).get("page") + body = routes[(method, path, page) if page else (method, path)] + response = requests.Response() + response.status_code = body if isinstance(body, int) else 200 + response._content = b"" if isinstance(body, int) else json.dumps(body).encode() + return response + + with ( + patch("metadata.ingestion.source.dashboard.dashboard_service.run_test_connection"), + patch("metadata.ingestion.source.dashboard.dashboard_service.create_connection"), + ): + config = OpenMetadataWorkflowConfig.model_validate(mock_config) + source = SigmaSource.create(mock_config["source"], OpenMetadata(config.workflowConfig.openMetadataServerConfig)) + source.client = SigmaApiClient(source.service_connection) + source.client.client._session.request = request + # OpenMetadata's user lookup is the other boundary: no user matches unless a test says so + source.metadata.get_reference_by_email = lambda email: None + source.client.token_client._session.request = request + source.context.get().__dict__["dashboard_service"] = MOCK_DASHBOARD_SERVICE.fullyQualifiedName.root + return source, calls From 0b8bec4bb344b548990fba5144a9acb30a5b2dd9 Mon Sep 17 00:00:00 2001 From: Akash Verma Date: Fri, 6 Nov 2026 22:09:17 +0530 Subject: [PATCH 3/7] feat(sigma): set the workbook latestVersion as a dashboard property Sigma's workbook detail carries latestVersion, the most recently published version, which changes on every publish. It is patched onto the dashboard extension after the dashboard exists, behind includeCustomProperties, and registered once per run, as decided in ADR:2026-11-02-run-changing-dashboard-custom-properties-are-patched-after-the-dashboard The property is a number: the spec types it double and Sigma's docs show 1.1. DataHub reads it as int and emits it as free text. Verified against Sigma's OpenAPI spec (downloaded 2026-11-06) and DataHub 1329d8f73c; not live-verified (no Sigma instance). --- .../source/dashboard/sigma/metadata.py | 94 ++++++++++++ .../source/dashboard/sigma/models.py | 1 + .../unit/topology/dashboard/test_sigma.py | 134 +++++++++++++++++- .../public/locales/en-US/Dashboard/Sigma.md | 4 + 4 files changed, 232 insertions(+), 1 deletion(-) diff --git a/ingestion/src/metadata/ingestion/source/dashboard/sigma/metadata.py b/ingestion/src/metadata/ingestion/source/dashboard/sigma/metadata.py index 8f118ad03cae..d22cf4c16f6e 100644 --- a/ingestion/src/metadata/ingestion/source/dashboard/sigma/metadata.py +++ b/ingestion/src/metadata/ingestion/source/dashboard/sigma/metadata.py @@ -12,13 +12,18 @@ import traceback from collections.abc import Iterable +from functools import cached_property from metadata.generated.schema.api.data.createChart import CreateChartRequest +from metadata.generated.schema.api.data.createCustomProperty import ( + CreateCustomPropertyRequest, +) from metadata.generated.schema.api.data.createDashboard import CreateDashboardRequest from metadata.generated.schema.api.data.createDashboardDataModel import ( CreateDashboardDataModelRequest, ) from metadata.generated.schema.entity.data.chart import Chart +from metadata.generated.schema.entity.data.dashboard import Dashboard from metadata.generated.schema.entity.data.dashboardDataModel import ( DashboardDataModel, DataModelType, @@ -35,6 +40,7 @@ Source as WorkflowSource, ) from metadata.generated.schema.type.basic import ( + EntityExtension, EntityName, FullyQualifiedEntityName, Markdown, @@ -45,6 +51,11 @@ from metadata.ingestion.api.steps import InvalidSourceException from metadata.ingestion.lineage.models import ConnectionTypeDialectMapper, Dialect from metadata.ingestion.lineage.parser import LineageParser +from metadata.ingestion.models.custom_properties import ( + CustomPropertyDataTypes, + OMetaCustomProperties, +) +from metadata.ingestion.models.patch_request import PatchRequest from metadata.ingestion.ometa.ometa_api import OpenMetadata from metadata.ingestion.source.dashboard.dashboard_service import DashboardServiceSource from metadata.ingestion.source.dashboard.sigma.models import ( @@ -65,6 +76,10 @@ logger = ingestion_logger() +# Dashboard custom property set from the workbook (ADR:2026-11-02-run-changing-dashboard-custom-properties-are-patched-after-the-dashboard). +# The spec types it number(double), so it is not registered as an integer. +LATEST_VERSION = "latestVersion" + class SigmaSource(DashboardServiceSource): """ @@ -442,6 +457,85 @@ def yield_dashboard_lineage_details( ) ) + def yield_dashboard_extension(self, dashboard_details: WorkbookDetails) -> Iterable[Either[PatchRequest]]: + """The workbook's latest published version, which changes each time the workbook is published""" + if not ( + dashboard_details + and self.source_config.includeCustomProperties + and dashboard_details.latestVersion is not None + ): + return + try: + if not self._latest_version_defined: + return + dashboard = self.metadata.get_by_name( + entity=Dashboard, + fqn=fqn._build(vars(self.context.get())["dashboard_service"], dashboard_details.workbookId), + fields=["extension"], + ) + if not dashboard: + return + stored = dashboard.extension.root if dashboard.extension else {} + # The properties a user set on the dashboard are sent back as they are, so the patch only touches this one + yield Either( + left=None, + right=PatchRequest( + original_entity=dashboard, + new_entity=dashboard.model_copy( + update={ + "extension": EntityExtension({**stored, LATEST_VERSION: dashboard_details.latestVersion}) + } + ), + override_metadata=True, + ), + ) + except Exception as exc: + yield Either( + left=StackTraceError( + name=f"{dashboard_details.name} Custom Properties", + error=f"Error setting the latest version of Sigma workbook {dashboard_details.workbookId}: {exc}", + stackTrace=traceback.format_exc(), + ), + right=None, + ) + + @cached_property + def _latest_version_defined(self) -> bool: + """ + Whether dashboards hold LATEST_VERSION as a number, registering it once per run. A property of that name + with another type is left alone: changing its type would invalidate the value every dashboard holds. + """ + defined = { + prop.get("name"): (prop.get("propertyType") or {}).get("name") + for prop in self.metadata.get_entity_custom_properties(entity_type=Dashboard) or [] + } + if LATEST_VERSION in defined: + if defined[LATEST_VERSION] == CustomPropertyDataTypes.NUMBER.value: + return True + logger.warning( + "Dashboard custom property %s exists as %s, not %s; Sigma won't set it", + LATEST_VERSION, + defined[LATEST_VERSION], + CustomPropertyDataTypes.NUMBER.value, + ) + return False + try: + self.metadata.create_or_update_custom_property( + OMetaCustomProperties( + entity_type=Dashboard, + createCustomPropertyRequest=CreateCustomPropertyRequest( + name=EntityName(LATEST_VERSION), + description=Markdown("The most recently published version of the Sigma workbook"), + propertyType=self.metadata.get_property_type_ref(CustomPropertyDataTypes.NUMBER), + ), + ) + ) + except Exception as exc: + logger.debug(traceback.format_exc()) + logger.warning("Could not register dashboard custom property %s: %s", LATEST_VERSION, exc) + return False + return True + def get_column_info(self, element: Elements) -> list[Column] | None: """Build data model columns""" datamodel_columns = [] diff --git a/ingestion/src/metadata/ingestion/source/dashboard/sigma/models.py b/ingestion/src/metadata/ingestion/source/dashboard/sigma/models.py index 7f9192eaa3cb..3bcbf9de74fb 100644 --- a/ingestion/src/metadata/ingestion/source/dashboard/sigma/models.py +++ b/ingestion/src/metadata/ingestion/source/dashboard/sigma/models.py @@ -34,6 +34,7 @@ class WorkbookDetails(BaseModel): createdAt: str # noqa: N815 url: str path: str | None = None + latestVersion: int | float | None = None # noqa: N815 ownerId: str | None = None # noqa: N815 isArchived: bool | None = None # noqa: N815 description: str | None = None diff --git a/ingestion/tests/unit/topology/dashboard/test_sigma.py b/ingestion/tests/unit/topology/dashboard/test_sigma.py index be661e70ed02..eaf0e1496141 100644 --- a/ingestion/tests/unit/topology/dashboard/test_sigma.py +++ b/ingestion/tests/unit/topology/dashboard/test_sigma.py @@ -19,6 +19,7 @@ from unittest import TestCase from unittest.mock import MagicMock, patch from urllib.parse import urlparse +from uuid import NAMESPACE_URL, uuid5 import pytest import requests @@ -47,15 +48,22 @@ from metadata.generated.schema.metadataIngestion.workflow import ( OpenMetadataWorkflowConfig, ) -from metadata.generated.schema.type.basic import FullyQualifiedEntityName, Markdown +from metadata.generated.schema.type.basic import EntityExtension, FullyQualifiedEntityName, Markdown +from metadata.generated.schema.type.customProperty import PropertyType from metadata.generated.schema.type.entityReference import EntityReference from metadata.ingestion.api.models import Either +from metadata.ingestion.models.patch_request import ( + ALLOWED_COMMON_PATCH_FIELDS, + RESTRICT_UPDATE_LIST, + build_patch, +) from metadata.ingestion.ometa.ometa_api import OpenMetadata from metadata.ingestion.source.dashboard.sigma.client import SigmaApiClient from metadata.ingestion.source.dashboard.sigma.metadata import SigmaSource from metadata.ingestion.source.dashboard.sigma.models import ( Elements, NodeDetails, + Workbook, WorkbookDetails, WorkbookQueriesResponse, WorkbookQuery, @@ -797,3 +805,127 @@ def request(method, url, params=None, **_): source.client.token_client._session.request = request source.context.get().__dict__["dashboard_service"] = MOCK_DASHBOARD_SERVICE.fullyQualifiedName.root return source, calls + + +class FakeDashboardProperties: + """OpenMetadata's dashboard custom properties and the Sigma dashboard, as the server holds them""" + + def __init__(self, properties=(), extension=None): + self.properties = [{"name": name, "propertyType": {"name": data_type}} for name, data_type in properties] + self.registered = [] + self.dashboard = LineageDashboard( + id=uuid5(NAMESPACE_URL, "wb-1"), + name="wb-1", + fullyQualifiedName="mock_sigma.wb-1", + service=EntityReference(id=MOCK_DASHBOARD_SERVICE.id, type="dashboardService"), + extension=EntityExtension(extension) if extension else None, + ) + + def serve(self, source): + source.metadata.get_entity_custom_properties = lambda entity_type: self.properties + source.metadata.get_property_type_ref = lambda data_type: PropertyType( + EntityReference(id=uuid5(NAMESPACE_URL, data_type.value), type="type", name=data_type.value) + ) + source.metadata.create_or_update_custom_property = self.register + source.metadata.get_by_name = lambda entity, fqn, fields=None: ( + self.dashboard if fqn == self.dashboard.fullyQualifiedName.root else None + ) + + def register(self, record): + request = record.createCustomPropertyRequest + self.registered.append((request.name.root, request.propertyType.root.name)) + self.properties.append({"name": request.name.root, "propertyType": {"name": request.propertyType.root.name}}) + + +def patched_extension(source, workbook_id="wb-1"): + """The extension the dashboard holds once the sink applies the workbook's patch""" + details = source.get_dashboard_details(Workbook(workbookId=workbook_id)) + requests_sent = [either.right for either in source.yield_dashboard_extension(details)] + if not requests_sent: + return None + (request,) = requests_sent + dashboard_patch = build_patch( + source=request.original_entity, + destination=request.new_entity, + allowed_fields=ALLOWED_COMMON_PATCH_FIELDS, + restrict_update_fields=RESTRICT_UPDATE_LIST, + override_metadata=request.override_metadata, + ) + assert all(op["path"].startswith("/extension") and op["op"] != "remove" for op in dashboard_patch.patch) + return dashboard_patch.apply(request.original_entity.model_dump(mode="json", exclude_none=True))["extension"] + + +@pytest.mark.parametrize("version", [3, 1.1]) +def test_the_workbook_version_is_patched_onto_its_dashboard(sigma_over_http, routes, version): + source, _ = sigma_over_http + source.source_config.includeCustomProperties = True + routes["GET", "/v2/workbooks/wb-1"] = {**routes["GET", "/v2/workbooks/wb-1"], "latestVersion": version} + server = FakeDashboardProperties(extension={"team": "finance", "latestVersion": 2}) + server.serve(source) + + assert patched_extension(source) == {"team": "finance", "latestVersion": version} + assert patched_extension(source, "wb-2") is None + assert server.registered == [("latestVersion", "number")] + + +def test_a_latest_version_property_of_another_type_is_left_alone(sigma_over_http): + source, _ = sigma_over_http + source.source_config.includeCustomProperties = True + server = FakeDashboardProperties(properties=[("latestVersion", "string")]) + server.serve(source) + + assert patched_extension(source) is None + assert server.registered == [] + + +def test_no_workbook_version_is_set_without_custom_properties(sigma_over_http): + source, _ = sigma_over_http + server = FakeDashboardProperties() + server.serve(source) + + assert patched_extension(source) is None + assert server.registered == [] + + +def test_a_failed_registration_sets_no_version_and_is_not_retried(sigma_over_http): + source, _ = sigma_over_http + source.source_config.includeCustomProperties = True + server = FakeDashboardProperties() + server.serve(source) + attempts = [] + + def refuse(record): + attempts.append(record.createCustomPropertyRequest.name.root) + raise requests.HTTPError("403 Forbidden") + + source.metadata.create_or_update_custom_property = refuse + + assert patched_extension(source) is None + assert patched_extension(source, "wb-2") is None + assert attempts == ["latestVersion"] + + +def test_a_registered_latest_version_property_is_reused(sigma_over_http): + source, _ = sigma_over_http + source.source_config.includeCustomProperties = True + server = FakeDashboardProperties(properties=[("latestVersion", "number")]) + server.serve(source) + + assert patched_extension(source) == {"latestVersion": 3} + assert server.registered == [] + + +def test_a_failed_dashboard_read_is_reported_for_the_workbook(sigma_over_http): + source, _ = sigma_over_http + source.source_config.includeCustomProperties = True + FakeDashboardProperties().serve(source) + + def unreachable(entity, fqn, fields=None): + raise requests.ConnectionError("OpenMetadata unreachable") + + source.metadata.get_by_name = unreachable + details = source.get_dashboard_details(Workbook(workbookId="wb-1")) + + (either,) = source.yield_dashboard_extension(details) + assert either.right is None + assert "Sigma workbook wb-1: OpenMetadata unreachable" in either.left.error diff --git a/openmetadata-ui/src/main/resources/ui/public/locales/en-US/Dashboard/Sigma.md b/openmetadata-ui/src/main/resources/ui/public/locales/en-US/Dashboard/Sigma.md index c5d39bdcda6b..6054a03b75bd 100644 --- a/openmetadata-ui/src/main/resources/ui/public/locales/en-US/Dashboard/Sigma.md +++ b/openmetadata-ui/src/main/resources/ui/public/locales/en-US/Dashboard/Sigma.md @@ -46,6 +46,10 @@ Version of the Sigma REST API by default `v2`. To get to know the Sigma REST API Version visit here and look into the `Token URL` section. $$ +## Custom Properties + +When **Include Custom Properties** is on, each workbook's dashboard gets a `latestVersion` custom property: the most recently published version of the workbook in Sigma. The property is added to every dashboard in OpenMetadata, and is left alone when a property of that name already exists with another type. + ## Lineage The Sigma connector extracts lineage by parsing SQL queries from workbooks to identify source tables. If SQL queries are unavailable, it falls back to Sigma's lineage API to retrieve metadata-based lineage information. From e560f4abdf29f4ebba20b6dbb87dda5bd50c32d0 Mon Sep 17 00:00:00 2001 From: Akash Verma Date: Sat, 7 Nov 2026 14:17:35 +0530 Subject: [PATCH 4/7] docs(decisions): record the Sigma latestVersion custom property --- ...n-is-a-number-dashboard-custom-property.md | 36 +++++++++++++++++++ .../source/dashboard/sigma/metadata.py | 3 +- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 docs/decisions/2026-11-07-sigma-latest-version-is-a-number-dashboard-custom-property.md diff --git a/docs/decisions/2026-11-07-sigma-latest-version-is-a-number-dashboard-custom-property.md b/docs/decisions/2026-11-07-sigma-latest-version-is-a-number-dashboard-custom-property.md new file mode 100644 index 000000000000..e7e2401fb6cc --- /dev/null +++ b/docs/decisions/2026-11-07-sigma-latest-version-is-a-number-dashboard-custom-property.md @@ -0,0 +1,36 @@ +# A Sigma workbook's latest version is a number dashboard custom property + +- **Status:** Accepted +- **Revisions:** v1 2026-11-07 (initial) +- **Deciders:** Sigma connector maintainers (PR #37300) +- **Guard:** `ingestion/tests/unit/topology/dashboard/test_sigma.py` + (`test_the_workbook_version_is_patched_onto_its_dashboard`, + `test_a_latest_version_property_of_another_type_is_left_alone`, + `test_no_workbook_version_is_set_without_custom_properties`, + `test_a_failed_registration_sets_no_version_and_is_not_retried`, `test_a_registered_latest_version_property_is_reused`) +- **Related:** ADR:2026-11-02-run-changing-dashboard-custom-properties-are-patched-after-the-dashboard, PR #37300 + +## Context + +A Sigma workbook's `latestVersion` is its most recently published version, and it changes each time the workbook is +republished. The spec types it as `number` (`double`). A value that changes between runs is patched after the +dashboard, behind `includeCustomProperties` +(ADR:2026-11-02-run-changing-dashboard-custom-properties-are-patched-after-the-dashboard). A custom property definition +applies to every dashboard in the instance, whatever its service, so its name and type are shared with every +connector. + +## Decision + +- Sigma registers one dashboard custom property, `latestVersion`, of type `number`, because the spec types the value + as a double. Once per run, when the first workbook with a version is patched, Sigma looks the property up and + registers it if it is missing. +- An existing `latestVersion` property of type `number` is reused. One of another type is left alone: Sigma sets no + value, and the run logs a warning. +- A failed registration sets no value for the rest of the run and is not retried in that run. + +## Consequences + +- The name and the type are a contract. Renaming or retyping the property orphans the values stored under the old + definition. +- The name is generic. A `latestVersion` property that another connector or a user registered with another type turns + Sigma's value off until it is removed. diff --git a/ingestion/src/metadata/ingestion/source/dashboard/sigma/metadata.py b/ingestion/src/metadata/ingestion/source/dashboard/sigma/metadata.py index d22cf4c16f6e..0fc358732423 100644 --- a/ingestion/src/metadata/ingestion/source/dashboard/sigma/metadata.py +++ b/ingestion/src/metadata/ingestion/source/dashboard/sigma/metadata.py @@ -77,7 +77,8 @@ logger = ingestion_logger() # Dashboard custom property set from the workbook (ADR:2026-11-02-run-changing-dashboard-custom-properties-are-patched-after-the-dashboard). -# The spec types it number(double), so it is not registered as an integer. +# The spec types it number(double), so it is not registered as an integer +# (ADR:2026-11-07-sigma-latest-version-is-a-number-dashboard-custom-property). LATEST_VERSION = "latestVersion" From 452c8afb904cb56d2a9622c900b99ab663d1cb5f Mon Sep 17 00:00:00 2001 From: Akash Verma Date: Mon, 9 Nov 2026 21:31:26 +0530 Subject: [PATCH 5/7] fix(sigma): write latestVersion only when nothing changed since the read A latestVersion patch built from a dashboard read with no custom properties replaced the whole extension, so a property a user set after the read was lost. The create-or-update PUT also overwrote the description and display name of a latestVersion property an administrator registered after Sigma's check. Both writes now carry the version Sigma read as If-Match and, on 412, are retried after a fresh read, up to MAX_OPTIMISTIC_LOCK_RETRIES. Sigma patches the value itself, as a PatchRequest carries no If-Match, and adds the definition with a PATCH of the dashboard type. Checked against a local OpenMetadata server: a stale If-Match gets 412 and leaves the entity unchanged; the current one gets 200. --- ...n-is-a-number-dashboard-custom-property.md | 12 +- .../source/dashboard/sigma/metadata.py | 157 ++++++++----- .../unit/topology/dashboard/test_sigma.py | 216 +++++++++++++----- 3 files changed, 271 insertions(+), 114 deletions(-) diff --git a/docs/decisions/2026-11-07-sigma-latest-version-is-a-number-dashboard-custom-property.md b/docs/decisions/2026-11-07-sigma-latest-version-is-a-number-dashboard-custom-property.md index e7e2401fb6cc..a3f085af6125 100644 --- a/docs/decisions/2026-11-07-sigma-latest-version-is-a-number-dashboard-custom-property.md +++ b/docs/decisions/2026-11-07-sigma-latest-version-is-a-number-dashboard-custom-property.md @@ -7,7 +7,9 @@ (`test_the_workbook_version_is_patched_onto_its_dashboard`, `test_a_latest_version_property_of_another_type_is_left_alone`, `test_no_workbook_version_is_set_without_custom_properties`, - `test_a_failed_registration_sets_no_version_and_is_not_retried`, `test_a_registered_latest_version_property_is_reused`) + `test_a_failed_registration_sets_no_version_and_is_not_retried`, `test_a_registered_latest_version_property_is_reused`, + `test_a_property_a_user_sets_after_the_dashboard_read_is_kept`, + `test_a_latest_version_property_an_administrator_adds_after_the_read_is_left_as_it_is`) - **Related:** ADR:2026-11-02-run-changing-dashboard-custom-properties-are-patched-after-the-dashboard, PR #37300 ## Context @@ -27,6 +29,14 @@ connector. - An existing `latestVersion` property of type `number` is reused. One of another type is left alone: Sigma sets no value, and the run logs a warning. - A failed registration sets no value for the rest of the run and is not retried in that run. +- The value and the definition are written with the entity's version as `If-Match` (`W/""`), so nothing + written after Sigma's read is overwritten: a property a user sets on the dashboard is kept, and a `latestVersion` + an administrator registers is left as it is. On a 412 Sigma reads again and retries, up to + `MAX_OPTIMISTIC_LOCK_RETRIES` times; after that the run reports an error for the workbook, or logs a warning for + the definition. +- So Sigma patches the value itself instead of sending a `PatchRequest`, which carries no `If-Match` + (ADR:2026-11-02-run-changing-dashboard-custom-properties-are-patched-after-the-dashboard). It adds the definition + with a PATCH of the dashboard type, not the create-or-update PUT, which replaces a property of the same name. ## Consequences diff --git a/ingestion/src/metadata/ingestion/source/dashboard/sigma/metadata.py b/ingestion/src/metadata/ingestion/source/dashboard/sigma/metadata.py index 6713e3d97871..ab7b1f966569 100644 --- a/ingestion/src/metadata/ingestion/source/dashboard/sigma/metadata.py +++ b/ingestion/src/metadata/ingestion/source/dashboard/sigma/metadata.py @@ -10,10 +10,12 @@ # limitations under the License. """Sigma source module""" +import json import traceback from collections.abc import Iterable from datetime import datetime from functools import cached_property +from typing import cast from cachetools import LRUCache @@ -21,9 +23,6 @@ from metadata.entity_resolution.table_binding import TableLookup, UnsupportedTableReferenceError from metadata.entity_resolution.table_search import get_table_binding_resolution from metadata.generated.schema.api.data.createChart import CreateChartRequest -from metadata.generated.schema.api.data.createCustomProperty import ( - CreateCustomPropertyRequest, -) from metadata.generated.schema.api.data.createDashboard import CreateDashboardRequest from metadata.generated.schema.api.data.createDashboardDataModel import ( CreateDashboardDataModelRequest, @@ -60,12 +59,19 @@ from metadata.ingestion.api.steps import InvalidSourceException from metadata.ingestion.lineage.models import ConnectionTypeDialectMapper, Dialect from metadata.ingestion.lineage.parser import LineageParser -from metadata.ingestion.models.custom_properties import ( - CustomPropertyDataTypes, - OMetaCustomProperties, -) +from metadata.ingestion.models.custom_properties import CustomPropertyDataTypes from metadata.ingestion.models.ometa_lineage import OMetaLineageRequest -from metadata.ingestion.models.patch_request import PatchRequest +from metadata.ingestion.models.patch_request import ( + ALLOWED_COMMON_PATCH_FIELDS, + RESTRICT_UPDATE_LIST, + PatchRequest, +) +from metadata.ingestion.ometa.client import APIError +from metadata.ingestion.ometa.mixins.patch_mixin import ( + MAX_OPTIMISTIC_LOCK_RETRIES, + _entity_etag, + _is_precondition_failed, +) from metadata.ingestion.ometa.ometa_api import OpenMetadata from metadata.ingestion.ometa.utils import model_str from metadata.ingestion.source.dashboard.dashboard_service import DashboardServiceSource @@ -566,7 +572,11 @@ def yield_dashboard_lineage(self, dashboard_details: WorkbookDetails) -> Iterabl ) def yield_dashboard_extension(self, dashboard_details: WorkbookDetails) -> Iterable[Either[PatchRequest]]: - """The workbook's latest published version, which changes each time the workbook is published""" + """ + The workbook's latest published version, which changes each time the workbook is published. It is written + with the dashboard's version as If-Match: a patch built from a dashboard read with no properties replaces + them all, so one a user sets after the read would be lost. On a conflict the dashboard is read again. + """ if not ( dashboard_details and self.source_config.includeCustomProperties @@ -576,26 +586,43 @@ def yield_dashboard_extension(self, dashboard_details: WorkbookDetails) -> Itera try: if not self._latest_version_defined: return - dashboard = self.metadata.get_by_name( - entity=Dashboard, - fqn=fqn._build(vars(self.context.get())["dashboard_service"], dashboard_details.workbookId), - fields=["extension"], - ) - if not dashboard: - return - stored = dashboard.extension.root if dashboard.extension else {} - # The properties a user set on the dashboard are sent back as they are, so the patch only touches this one + dashboard_fqn = fqn._build(vars(self.context.get())["dashboard_service"], dashboard_details.workbookId) + for _ in range(MAX_OPTIMISTIC_LOCK_RETRIES): + dashboard = self.metadata.get_by_name(entity=Dashboard, fqn=dashboard_fqn, fields=["extension"]) + if not dashboard: + return + stored = dashboard.extension.root if dashboard.extension else {} + try: + # The properties a user set are sent back as they are, so the patch only touches this one + self.metadata.patch( + entity=Dashboard, + source=dashboard, + destination=dashboard.model_copy( + update={ + "extension": EntityExtension( + {**stored, LATEST_VERSION: dashboard_details.latestVersion} + ) + } + ), + allowed_fields=ALLOWED_COMMON_PATCH_FIELDS, + restrict_update_fields=RESTRICT_UPDATE_LIST, + override_metadata=True, + if_match=_entity_etag(dashboard), + ) + except APIError as exc: + if not _is_precondition_failed(exc): + raise + else: + return yield Either( - left=None, - right=PatchRequest( - original_entity=dashboard, - new_entity=dashboard.model_copy( - update={ - "extension": EntityExtension({**stored, LATEST_VERSION: dashboard_details.latestVersion}) - } + left=StackTraceError( + name=f"{dashboard_details.name} Custom Properties", + error=( + f"Error setting the latest version of Sigma workbook {dashboard_details.workbookId}: " + f"the dashboard changed before each of {MAX_OPTIMISTIC_LOCK_RETRIES} writes" ), - override_metadata=True, ), + right=None, ) except Exception as exc: yield Either( @@ -612,37 +639,59 @@ def _latest_version_defined(self) -> bool: """ Whether dashboards hold LATEST_VERSION as a number, registering it once per run. A property of that name with another type is left alone: changing its type would invalidate the value every dashboard holds. + It is added with the dashboard type's version as If-Match, as a create-or-update would overwrite the + description and display name of one an administrator adds after the read. On a conflict the type is + read again. """ - defined = { - prop.get("name"): (prop.get("propertyType") or {}).get("name") - for prop in self.metadata.get_entity_custom_properties(entity_type=Dashboard) or [] - } - if LATEST_VERSION in defined: - if defined[LATEST_VERSION] == CustomPropertyDataTypes.NUMBER.value: - return True - logger.warning( - "Dashboard custom property %s exists as %s, not %s; Sigma won't set it", - LATEST_VERSION, - defined[LATEST_VERSION], - CustomPropertyDataTypes.NUMBER.value, + for _ in range(MAX_OPTIMISTIC_LOCK_RETRIES): + # The type's JSON, with the version a conditional write needs + dashboard_type = cast( + "dict", self.metadata.client.get("/metadata/types/name/dashboard?fields=customProperties") ) - return False - try: - self.metadata.create_or_update_custom_property( - OMetaCustomProperties( - entity_type=Dashboard, - createCustomPropertyRequest=CreateCustomPropertyRequest( - name=EntityName(LATEST_VERSION), - description=Markdown("The most recently published version of the Sigma workbook"), - propertyType=self.metadata.get_property_type_ref(CustomPropertyDataTypes.NUMBER), - ), + defined = { + prop.get("name"): (prop.get("propertyType") or {}).get("name") + for prop in dashboard_type.get("customProperties") or [] + } + if LATEST_VERSION in defined: + if defined[LATEST_VERSION] == CustomPropertyDataTypes.NUMBER.value: + return True + logger.warning( + "Dashboard custom property %s exists as %s, not %s; Sigma won't set it", + LATEST_VERSION, + defined[LATEST_VERSION], + CustomPropertyDataTypes.NUMBER.value, ) - ) - except Exception as exc: - logger.debug(traceback.format_exc()) - logger.warning("Could not register dashboard custom property %s: %s", LATEST_VERSION, exc) - return False - return True + return False + new_property = { + "name": LATEST_VERSION, + "description": "The most recently published version of the Sigma workbook", + # The server looks the property type up by name + "propertyType": { + "id": model_str(self.metadata.get_property_type_ref(CustomPropertyDataTypes.NUMBER).root.id), + "type": "type", + "name": CustomPropertyDataTypes.NUMBER.value, + }, + } + try: + self.metadata.client.patch( + path=f"/metadata/types/{dashboard_type['id']}", + data=json.dumps([{"op": "add", "path": "/customProperties/-", "value": new_property}]), + headers={"If-Match": f'W/"{dashboard_type["version"]}"'}, + ) + except Exception as exc: + if _is_precondition_failed(exc): + continue + logger.debug(traceback.format_exc()) + logger.warning("Could not register dashboard custom property %s: %s", LATEST_VERSION, exc) + return False + else: + return True + logger.warning( + "Could not register dashboard custom property %s: the dashboard type changed before each of %d writes", + LATEST_VERSION, + MAX_OPTIMISTIC_LOCK_RETRIES, + ) + return False def get_column_info(self, element: Elements) -> list[Column] | None: """Build data model columns""" diff --git a/ingestion/tests/unit/topology/dashboard/test_sigma.py b/ingestion/tests/unit/topology/dashboard/test_sigma.py index 24728b24869f..b65b410bad41 100644 --- a/ingestion/tests/unit/topology/dashboard/test_sigma.py +++ b/ingestion/tests/unit/topology/dashboard/test_sigma.py @@ -13,6 +13,7 @@ Test sigma Dashboard using the topology """ +import copy import json from collections import Counter from fnmatch import fnmatch @@ -22,6 +23,7 @@ from urllib.parse import urlparse from uuid import NAMESPACE_URL, uuid5 +import jsonpatch import pytest import requests @@ -52,7 +54,7 @@ from metadata.generated.schema.metadataIngestion.workflow import ( OpenMetadataWorkflowConfig, ) -from metadata.generated.schema.type.basic import EntityExtension, FullyQualifiedEntityName +from metadata.generated.schema.type.basic import FullyQualifiedEntityName from metadata.generated.schema.type.customProperty import PropertyType from metadata.generated.schema.type.entityReference import EntityReference from metadata.generated.schema.type.entityReferenceList import EntityReferenceList @@ -62,8 +64,8 @@ from metadata.ingestion.models.patch_request import ( ALLOWED_COMMON_PATCH_FIELDS, RESTRICT_UPDATE_LIST, - build_patch, ) +from metadata.ingestion.ometa.client import APIError from metadata.ingestion.ometa.ometa_api import OpenMetadata from metadata.ingestion.source.dashboard.sigma.client import SigmaApiClient from metadata.ingestion.source.dashboard.sigma.metadata import SigmaSource @@ -1640,52 +1642,123 @@ def test_dashboard_records_when_the_workbook_was_created_and_updated(sigma_over_ ) -class FakeDashboardProperties: - """OpenMetadata's dashboard custom properties and the Sigma dashboard, as the server holds them""" +class FakeOpenMetadata: + """ + OpenMetadata's dashboard custom properties and the Sigma dashboard, as the server holds them, answering the + client's reads and writes. A write whose If-Match is not the current version is refused with 412, as the server + refuses it. `after_type_read` and `after_dashboard_read` run once after the next read, as an edit another user + makes between that read and the write. + """ def __init__(self, properties=(), extension=None): - self.properties = [{"name": name, "propertyType": {"name": data_type}} for name, data_type in properties] + self.dashboard_type = { + "id": str(uuid5(NAMESPACE_URL, "dashboard")), + "version": 0.1, + "customProperties": [{"name": name, "propertyType": {"name": data_type}} for name, data_type in properties], + } + self.dashboard = { + "id": str(uuid5(NAMESPACE_URL, "wb-1")), + "name": "wb-1", + "fullyQualifiedName": "mock_sigma.wb-1", + "service": {"id": str(MOCK_DASHBOARD_SERVICE.id.root), "type": "dashboardService"}, + "version": 0.1, + **({"extension": extension} if extension else {}), + } + self.after_type_read = None + self.after_dashboard_read = None + self.type_write_error = None self.registered = [] - self.dashboard = LineageDashboard( - id=uuid5(NAMESPACE_URL, "wb-1"), - name="wb-1", - fullyQualifiedName="mock_sigma.wb-1", - service=EntityReference(id=MOCK_DASHBOARD_SERVICE.id, type="dashboardService"), - extension=EntityExtension(extension) if extension else None, - ) + self.type_writes = 0 + self.dashboard_writes = 0 + self.refused = 0 def serve(self, source): - source.metadata.get_entity_custom_properties = lambda entity_type: self.properties source.metadata.get_property_type_ref = lambda data_type: PropertyType( - EntityReference(id=uuid5(NAMESPACE_URL, data_type.value), type="type", name=data_type.value) + EntityReference(id=uuid5(NAMESPACE_URL, data_type.value), type="type") ) - source.metadata.create_or_update_custom_property = self.register - source.metadata.get_by_name = lambda entity, fqn, fields=None: ( - self.dashboard if fqn == self.dashboard.fullyQualifiedName.root else None + source.metadata.get_by_name = self.get_dashboard + source.metadata.client = SimpleNamespace(get=self.get_type, put=self.put_property, patch=self.patch) + + @property + def extension(self): + return self.dashboard.get("extension") + + def get_type(self, path): + assert path.startswith("/metadata/types/name/dashboard") + read = copy.deepcopy(self.dashboard_type) + self.after_type_read, edit = None, self.after_type_read + if edit: + edit() + return read + + def get_dashboard(self, entity, fqn, fields=None): + read = LineageDashboard.model_validate(self.dashboard) if fqn == self.dashboard["fullyQualifiedName"] else None + self.after_dashboard_read, edit = None, self.after_dashboard_read + if edit: + edit() + return read + + def edit(self, target, **changes): + """Another user's change: the server bumps the version""" + target.update(changes, version=round(target["version"] + 0.1, 1)) + + def put_property(self, path, data): + """The custom property create-or-update: one already named so is replaced""" + self.type_writes += 1 + if self.type_write_error: + raise self.type_write_error + request = json.loads(data) + data_type = next( + name for name in ("number", "string") if str(uuid5(NAMESPACE_URL, name)) == request["propertyType"]["id"] ) - - def register(self, record): - request = record.createCustomPropertyRequest - self.registered.append((request.name.root, request.propertyType.root.name)) - self.properties.append({"name": request.name.root, "propertyType": {"name": request.propertyType.root.name}}) - - -def patched_extension(source, workbook_id="wb-1"): - """The extension the dashboard holds once the sink applies the workbook's patch""" + self.registered.append((request["name"], data_type)) + kept = [prop for prop in self.dashboard_type["customProperties"] if prop["name"] != request["name"]] + self.edit(self.dashboard_type, customProperties=[*kept, {**request, "propertyType": {"name": data_type}}]) + + def patch(self, path, data=None, headers=None): + is_type = path.startswith("/metadata/types/") + target = self.dashboard_type if is_type else self.dashboard + if is_type: + self.type_writes += 1 + if self.type_write_error: + raise self.type_write_error + if_match = (headers or {}).get("If-Match") + if if_match and if_match != f'W/"{target["version"]}"': + self.refused += 1 + raise APIError({"code": 412, "message": "Precondition Failed"}) + operations = json.loads(data) + if is_type: + self.registered += [ + (op["value"]["name"], op["value"]["propertyType"]["name"]) + for op in operations + if op["path"] == "/customProperties/-" + ] + else: + assert all(op["path"].startswith("/extension") and op["op"] != "remove" for op in operations) + self.dashboard_writes += 1 + patched = jsonpatch.apply_patch(target, operations) + patched["version"] = round(target["version"] + 0.1, 1) + if is_type: + self.dashboard_type = patched + else: + self.dashboard = patched + return copy.deepcopy(patched) + + +def stored_extension(source, server, workbook_id="wb-1"): + """The dashboard's custom properties once the workbook's custom property stage ran, the sink applying any patch""" details = source.get_dashboard_details(Workbook(workbookId=workbook_id)) - requests_sent = [either.right for either in source.yield_dashboard_extension(details)] - if not requests_sent: - return None - (request,) = requests_sent - dashboard_patch = build_patch( - source=request.original_entity, - destination=request.new_entity, - allowed_fields=ALLOWED_COMMON_PATCH_FIELDS, - restrict_update_fields=RESTRICT_UPDATE_LIST, - override_metadata=request.override_metadata, - ) - assert all(op["path"].startswith("/extension") and op["op"] != "remove" for op in dashboard_patch.patch) - return dashboard_patch.apply(request.original_entity.model_dump(mode="json", exclude_none=True))["extension"] + for either in source.yield_dashboard_extension(details): + if either.right: + source.metadata.patch( + entity=type(either.right.original_entity), + source=either.right.original_entity, + destination=either.right.new_entity, + allowed_fields=ALLOWED_COMMON_PATCH_FIELDS, + restrict_update_fields=RESTRICT_UPDATE_LIST, + override_metadata=either.right.override_metadata, + ) + return server.extension @pytest.mark.parametrize("version", [3, 1.1]) @@ -1693,65 +1766,90 @@ def test_the_workbook_version_is_patched_onto_its_dashboard(sigma_over_http, rou source, _ = sigma_over_http source.source_config.includeCustomProperties = True routes["GET", "/v2/workbooks/wb-1"] = {**routes["GET", "/v2/workbooks/wb-1"], "latestVersion": version} - server = FakeDashboardProperties(extension={"team": "finance", "latestVersion": 2}) + server = FakeOpenMetadata(extension={"team": "finance", "latestVersion": 2}) server.serve(source) - assert patched_extension(source) == {"team": "finance", "latestVersion": version} - assert patched_extension(source, "wb-2") is None + assert stored_extension(source, server) == {"team": "finance", "latestVersion": version} + # wb-2 has no dashboard: nothing is written, and the property is not registered again + stored_extension(source, server, "wb-2") + assert server.dashboard_writes == 1 assert server.registered == [("latestVersion", "number")] def test_a_latest_version_property_of_another_type_is_left_alone(sigma_over_http): source, _ = sigma_over_http source.source_config.includeCustomProperties = True - server = FakeDashboardProperties(properties=[("latestVersion", "string")]) + server = FakeOpenMetadata(properties=[("latestVersion", "string")]) server.serve(source) - assert patched_extension(source) is None + assert stored_extension(source, server) is None assert server.registered == [] def test_no_workbook_version_is_set_without_custom_properties(sigma_over_http): source, _ = sigma_over_http - server = FakeDashboardProperties() + server = FakeOpenMetadata() server.serve(source) - assert patched_extension(source) is None + assert stored_extension(source, server) is None assert server.registered == [] def test_a_failed_registration_sets_no_version_and_is_not_retried(sigma_over_http): source, _ = sigma_over_http source.source_config.includeCustomProperties = True - server = FakeDashboardProperties() + server = FakeOpenMetadata() + server.type_write_error = APIError({"code": 403, "message": "Forbidden"}) server.serve(source) - attempts = [] - def refuse(record): - attempts.append(record.createCustomPropertyRequest.name.root) - raise requests.HTTPError("403 Forbidden") + assert stored_extension(source, server) is None + assert stored_extension(source, server, "wb-2") is None + assert server.type_writes == 1 - source.metadata.create_or_update_custom_property = refuse - assert patched_extension(source) is None - assert patched_extension(source, "wb-2") is None - assert attempts == ["latestVersion"] +def test_a_registered_latest_version_property_is_reused(sigma_over_http): + source, _ = sigma_over_http + source.source_config.includeCustomProperties = True + server = FakeOpenMetadata(properties=[("latestVersion", "number")]) + server.serve(source) + + assert stored_extension(source, server) == {"latestVersion": 3} + assert server.registered == [] -def test_a_registered_latest_version_property_is_reused(sigma_over_http): +def test_a_property_a_user_sets_after_the_dashboard_read_is_kept(sigma_over_http): + source, _ = sigma_over_http + source.source_config.includeCustomProperties = True + server = FakeOpenMetadata(properties=[("latestVersion", "number")]) + server.after_dashboard_read = lambda: server.edit(server.dashboard, extension={"team": "finance"}) + server.serve(source) + + assert stored_extension(source, server) == {"team": "finance", "latestVersion": 3} + assert server.refused == 1 + + +def test_a_latest_version_property_an_administrator_adds_after_the_read_is_left_as_it_is(sigma_over_http): source, _ = sigma_over_http source.source_config.includeCustomProperties = True - server = FakeDashboardProperties(properties=[("latestVersion", "number")]) + administrators = { + "name": "latestVersion", + "displayName": "Workbook version", + "description": "Set by an administrator", + "propertyType": {"name": "number"}, + } + server = FakeOpenMetadata() + server.after_type_read = lambda: server.edit(server.dashboard_type, customProperties=[administrators]) server.serve(source) - assert patched_extension(source) == {"latestVersion": 3} + assert stored_extension(source, server) == {"latestVersion": 3} + assert server.dashboard_type["customProperties"] == [administrators] assert server.registered == [] def test_a_failed_dashboard_read_is_reported_for_the_workbook(sigma_over_http): source, _ = sigma_over_http source.source_config.includeCustomProperties = True - FakeDashboardProperties().serve(source) + FakeOpenMetadata(properties=[("latestVersion", "number")]).serve(source) def unreachable(entity, fqn, fields=None): raise requests.ConnectionError("OpenMetadata unreachable") From a77f09cdd65bb6e90fbcdcdc58a4908bb0579c86 Mon Sep 17 00:00:00 2001 From: Akash Verma Date: Mon, 9 Nov 2026 21:42:50 +0530 Subject: [PATCH 6/7] Revert "fix(sigma): write latestVersion only when nothing changed since the read" This reverts commit 452c8afb904cb56d2a9622c900b99ab663d1cb5f. --- ...n-is-a-number-dashboard-custom-property.md | 12 +- .../source/dashboard/sigma/metadata.py | 157 +++++-------- .../unit/topology/dashboard/test_sigma.py | 216 +++++------------- 3 files changed, 114 insertions(+), 271 deletions(-) diff --git a/docs/decisions/2026-11-07-sigma-latest-version-is-a-number-dashboard-custom-property.md b/docs/decisions/2026-11-07-sigma-latest-version-is-a-number-dashboard-custom-property.md index a3f085af6125..e7e2401fb6cc 100644 --- a/docs/decisions/2026-11-07-sigma-latest-version-is-a-number-dashboard-custom-property.md +++ b/docs/decisions/2026-11-07-sigma-latest-version-is-a-number-dashboard-custom-property.md @@ -7,9 +7,7 @@ (`test_the_workbook_version_is_patched_onto_its_dashboard`, `test_a_latest_version_property_of_another_type_is_left_alone`, `test_no_workbook_version_is_set_without_custom_properties`, - `test_a_failed_registration_sets_no_version_and_is_not_retried`, `test_a_registered_latest_version_property_is_reused`, - `test_a_property_a_user_sets_after_the_dashboard_read_is_kept`, - `test_a_latest_version_property_an_administrator_adds_after_the_read_is_left_as_it_is`) + `test_a_failed_registration_sets_no_version_and_is_not_retried`, `test_a_registered_latest_version_property_is_reused`) - **Related:** ADR:2026-11-02-run-changing-dashboard-custom-properties-are-patched-after-the-dashboard, PR #37300 ## Context @@ -29,14 +27,6 @@ connector. - An existing `latestVersion` property of type `number` is reused. One of another type is left alone: Sigma sets no value, and the run logs a warning. - A failed registration sets no value for the rest of the run and is not retried in that run. -- The value and the definition are written with the entity's version as `If-Match` (`W/""`), so nothing - written after Sigma's read is overwritten: a property a user sets on the dashboard is kept, and a `latestVersion` - an administrator registers is left as it is. On a 412 Sigma reads again and retries, up to - `MAX_OPTIMISTIC_LOCK_RETRIES` times; after that the run reports an error for the workbook, or logs a warning for - the definition. -- So Sigma patches the value itself instead of sending a `PatchRequest`, which carries no `If-Match` - (ADR:2026-11-02-run-changing-dashboard-custom-properties-are-patched-after-the-dashboard). It adds the definition - with a PATCH of the dashboard type, not the create-or-update PUT, which replaces a property of the same name. ## Consequences diff --git a/ingestion/src/metadata/ingestion/source/dashboard/sigma/metadata.py b/ingestion/src/metadata/ingestion/source/dashboard/sigma/metadata.py index ab7b1f966569..6713e3d97871 100644 --- a/ingestion/src/metadata/ingestion/source/dashboard/sigma/metadata.py +++ b/ingestion/src/metadata/ingestion/source/dashboard/sigma/metadata.py @@ -10,12 +10,10 @@ # limitations under the License. """Sigma source module""" -import json import traceback from collections.abc import Iterable from datetime import datetime from functools import cached_property -from typing import cast from cachetools import LRUCache @@ -23,6 +21,9 @@ from metadata.entity_resolution.table_binding import TableLookup, UnsupportedTableReferenceError from metadata.entity_resolution.table_search import get_table_binding_resolution from metadata.generated.schema.api.data.createChart import CreateChartRequest +from metadata.generated.schema.api.data.createCustomProperty import ( + CreateCustomPropertyRequest, +) from metadata.generated.schema.api.data.createDashboard import CreateDashboardRequest from metadata.generated.schema.api.data.createDashboardDataModel import ( CreateDashboardDataModelRequest, @@ -59,19 +60,12 @@ from metadata.ingestion.api.steps import InvalidSourceException from metadata.ingestion.lineage.models import ConnectionTypeDialectMapper, Dialect from metadata.ingestion.lineage.parser import LineageParser -from metadata.ingestion.models.custom_properties import CustomPropertyDataTypes -from metadata.ingestion.models.ometa_lineage import OMetaLineageRequest -from metadata.ingestion.models.patch_request import ( - ALLOWED_COMMON_PATCH_FIELDS, - RESTRICT_UPDATE_LIST, - PatchRequest, -) -from metadata.ingestion.ometa.client import APIError -from metadata.ingestion.ometa.mixins.patch_mixin import ( - MAX_OPTIMISTIC_LOCK_RETRIES, - _entity_etag, - _is_precondition_failed, +from metadata.ingestion.models.custom_properties import ( + CustomPropertyDataTypes, + OMetaCustomProperties, ) +from metadata.ingestion.models.ometa_lineage import OMetaLineageRequest +from metadata.ingestion.models.patch_request import PatchRequest from metadata.ingestion.ometa.ometa_api import OpenMetadata from metadata.ingestion.ometa.utils import model_str from metadata.ingestion.source.dashboard.dashboard_service import DashboardServiceSource @@ -572,11 +566,7 @@ def yield_dashboard_lineage(self, dashboard_details: WorkbookDetails) -> Iterabl ) def yield_dashboard_extension(self, dashboard_details: WorkbookDetails) -> Iterable[Either[PatchRequest]]: - """ - The workbook's latest published version, which changes each time the workbook is published. It is written - with the dashboard's version as If-Match: a patch built from a dashboard read with no properties replaces - them all, so one a user sets after the read would be lost. On a conflict the dashboard is read again. - """ + """The workbook's latest published version, which changes each time the workbook is published""" if not ( dashboard_details and self.source_config.includeCustomProperties @@ -586,43 +576,26 @@ def yield_dashboard_extension(self, dashboard_details: WorkbookDetails) -> Itera try: if not self._latest_version_defined: return - dashboard_fqn = fqn._build(vars(self.context.get())["dashboard_service"], dashboard_details.workbookId) - for _ in range(MAX_OPTIMISTIC_LOCK_RETRIES): - dashboard = self.metadata.get_by_name(entity=Dashboard, fqn=dashboard_fqn, fields=["extension"]) - if not dashboard: - return - stored = dashboard.extension.root if dashboard.extension else {} - try: - # The properties a user set are sent back as they are, so the patch only touches this one - self.metadata.patch( - entity=Dashboard, - source=dashboard, - destination=dashboard.model_copy( - update={ - "extension": EntityExtension( - {**stored, LATEST_VERSION: dashboard_details.latestVersion} - ) - } - ), - allowed_fields=ALLOWED_COMMON_PATCH_FIELDS, - restrict_update_fields=RESTRICT_UPDATE_LIST, - override_metadata=True, - if_match=_entity_etag(dashboard), - ) - except APIError as exc: - if not _is_precondition_failed(exc): - raise - else: - return + dashboard = self.metadata.get_by_name( + entity=Dashboard, + fqn=fqn._build(vars(self.context.get())["dashboard_service"], dashboard_details.workbookId), + fields=["extension"], + ) + if not dashboard: + return + stored = dashboard.extension.root if dashboard.extension else {} + # The properties a user set on the dashboard are sent back as they are, so the patch only touches this one yield Either( - left=StackTraceError( - name=f"{dashboard_details.name} Custom Properties", - error=( - f"Error setting the latest version of Sigma workbook {dashboard_details.workbookId}: " - f"the dashboard changed before each of {MAX_OPTIMISTIC_LOCK_RETRIES} writes" + left=None, + right=PatchRequest( + original_entity=dashboard, + new_entity=dashboard.model_copy( + update={ + "extension": EntityExtension({**stored, LATEST_VERSION: dashboard_details.latestVersion}) + } ), + override_metadata=True, ), - right=None, ) except Exception as exc: yield Either( @@ -639,59 +612,37 @@ def _latest_version_defined(self) -> bool: """ Whether dashboards hold LATEST_VERSION as a number, registering it once per run. A property of that name with another type is left alone: changing its type would invalidate the value every dashboard holds. - It is added with the dashboard type's version as If-Match, as a create-or-update would overwrite the - description and display name of one an administrator adds after the read. On a conflict the type is - read again. """ - for _ in range(MAX_OPTIMISTIC_LOCK_RETRIES): - # The type's JSON, with the version a conditional write needs - dashboard_type = cast( - "dict", self.metadata.client.get("/metadata/types/name/dashboard?fields=customProperties") + defined = { + prop.get("name"): (prop.get("propertyType") or {}).get("name") + for prop in self.metadata.get_entity_custom_properties(entity_type=Dashboard) or [] + } + if LATEST_VERSION in defined: + if defined[LATEST_VERSION] == CustomPropertyDataTypes.NUMBER.value: + return True + logger.warning( + "Dashboard custom property %s exists as %s, not %s; Sigma won't set it", + LATEST_VERSION, + defined[LATEST_VERSION], + CustomPropertyDataTypes.NUMBER.value, ) - defined = { - prop.get("name"): (prop.get("propertyType") or {}).get("name") - for prop in dashboard_type.get("customProperties") or [] - } - if LATEST_VERSION in defined: - if defined[LATEST_VERSION] == CustomPropertyDataTypes.NUMBER.value: - return True - logger.warning( - "Dashboard custom property %s exists as %s, not %s; Sigma won't set it", - LATEST_VERSION, - defined[LATEST_VERSION], - CustomPropertyDataTypes.NUMBER.value, - ) - return False - new_property = { - "name": LATEST_VERSION, - "description": "The most recently published version of the Sigma workbook", - # The server looks the property type up by name - "propertyType": { - "id": model_str(self.metadata.get_property_type_ref(CustomPropertyDataTypes.NUMBER).root.id), - "type": "type", - "name": CustomPropertyDataTypes.NUMBER.value, - }, - } - try: - self.metadata.client.patch( - path=f"/metadata/types/{dashboard_type['id']}", - data=json.dumps([{"op": "add", "path": "/customProperties/-", "value": new_property}]), - headers={"If-Match": f'W/"{dashboard_type["version"]}"'}, + return False + try: + self.metadata.create_or_update_custom_property( + OMetaCustomProperties( + entity_type=Dashboard, + createCustomPropertyRequest=CreateCustomPropertyRequest( + name=EntityName(LATEST_VERSION), + description=Markdown("The most recently published version of the Sigma workbook"), + propertyType=self.metadata.get_property_type_ref(CustomPropertyDataTypes.NUMBER), + ), ) - except Exception as exc: - if _is_precondition_failed(exc): - continue - logger.debug(traceback.format_exc()) - logger.warning("Could not register dashboard custom property %s: %s", LATEST_VERSION, exc) - return False - else: - return True - logger.warning( - "Could not register dashboard custom property %s: the dashboard type changed before each of %d writes", - LATEST_VERSION, - MAX_OPTIMISTIC_LOCK_RETRIES, - ) - return False + ) + except Exception as exc: + logger.debug(traceback.format_exc()) + logger.warning("Could not register dashboard custom property %s: %s", LATEST_VERSION, exc) + return False + return True def get_column_info(self, element: Elements) -> list[Column] | None: """Build data model columns""" diff --git a/ingestion/tests/unit/topology/dashboard/test_sigma.py b/ingestion/tests/unit/topology/dashboard/test_sigma.py index b65b410bad41..24728b24869f 100644 --- a/ingestion/tests/unit/topology/dashboard/test_sigma.py +++ b/ingestion/tests/unit/topology/dashboard/test_sigma.py @@ -13,7 +13,6 @@ Test sigma Dashboard using the topology """ -import copy import json from collections import Counter from fnmatch import fnmatch @@ -23,7 +22,6 @@ from urllib.parse import urlparse from uuid import NAMESPACE_URL, uuid5 -import jsonpatch import pytest import requests @@ -54,7 +52,7 @@ from metadata.generated.schema.metadataIngestion.workflow import ( OpenMetadataWorkflowConfig, ) -from metadata.generated.schema.type.basic import FullyQualifiedEntityName +from metadata.generated.schema.type.basic import EntityExtension, FullyQualifiedEntityName from metadata.generated.schema.type.customProperty import PropertyType from metadata.generated.schema.type.entityReference import EntityReference from metadata.generated.schema.type.entityReferenceList import EntityReferenceList @@ -64,8 +62,8 @@ from metadata.ingestion.models.patch_request import ( ALLOWED_COMMON_PATCH_FIELDS, RESTRICT_UPDATE_LIST, + build_patch, ) -from metadata.ingestion.ometa.client import APIError from metadata.ingestion.ometa.ometa_api import OpenMetadata from metadata.ingestion.source.dashboard.sigma.client import SigmaApiClient from metadata.ingestion.source.dashboard.sigma.metadata import SigmaSource @@ -1642,123 +1640,52 @@ def test_dashboard_records_when_the_workbook_was_created_and_updated(sigma_over_ ) -class FakeOpenMetadata: - """ - OpenMetadata's dashboard custom properties and the Sigma dashboard, as the server holds them, answering the - client's reads and writes. A write whose If-Match is not the current version is refused with 412, as the server - refuses it. `after_type_read` and `after_dashboard_read` run once after the next read, as an edit another user - makes between that read and the write. - """ +class FakeDashboardProperties: + """OpenMetadata's dashboard custom properties and the Sigma dashboard, as the server holds them""" def __init__(self, properties=(), extension=None): - self.dashboard_type = { - "id": str(uuid5(NAMESPACE_URL, "dashboard")), - "version": 0.1, - "customProperties": [{"name": name, "propertyType": {"name": data_type}} for name, data_type in properties], - } - self.dashboard = { - "id": str(uuid5(NAMESPACE_URL, "wb-1")), - "name": "wb-1", - "fullyQualifiedName": "mock_sigma.wb-1", - "service": {"id": str(MOCK_DASHBOARD_SERVICE.id.root), "type": "dashboardService"}, - "version": 0.1, - **({"extension": extension} if extension else {}), - } - self.after_type_read = None - self.after_dashboard_read = None - self.type_write_error = None + self.properties = [{"name": name, "propertyType": {"name": data_type}} for name, data_type in properties] self.registered = [] - self.type_writes = 0 - self.dashboard_writes = 0 - self.refused = 0 + self.dashboard = LineageDashboard( + id=uuid5(NAMESPACE_URL, "wb-1"), + name="wb-1", + fullyQualifiedName="mock_sigma.wb-1", + service=EntityReference(id=MOCK_DASHBOARD_SERVICE.id, type="dashboardService"), + extension=EntityExtension(extension) if extension else None, + ) def serve(self, source): + source.metadata.get_entity_custom_properties = lambda entity_type: self.properties source.metadata.get_property_type_ref = lambda data_type: PropertyType( - EntityReference(id=uuid5(NAMESPACE_URL, data_type.value), type="type") + EntityReference(id=uuid5(NAMESPACE_URL, data_type.value), type="type", name=data_type.value) ) - source.metadata.get_by_name = self.get_dashboard - source.metadata.client = SimpleNamespace(get=self.get_type, put=self.put_property, patch=self.patch) - - @property - def extension(self): - return self.dashboard.get("extension") - - def get_type(self, path): - assert path.startswith("/metadata/types/name/dashboard") - read = copy.deepcopy(self.dashboard_type) - self.after_type_read, edit = None, self.after_type_read - if edit: - edit() - return read - - def get_dashboard(self, entity, fqn, fields=None): - read = LineageDashboard.model_validate(self.dashboard) if fqn == self.dashboard["fullyQualifiedName"] else None - self.after_dashboard_read, edit = None, self.after_dashboard_read - if edit: - edit() - return read - - def edit(self, target, **changes): - """Another user's change: the server bumps the version""" - target.update(changes, version=round(target["version"] + 0.1, 1)) - - def put_property(self, path, data): - """The custom property create-or-update: one already named so is replaced""" - self.type_writes += 1 - if self.type_write_error: - raise self.type_write_error - request = json.loads(data) - data_type = next( - name for name in ("number", "string") if str(uuid5(NAMESPACE_URL, name)) == request["propertyType"]["id"] + source.metadata.create_or_update_custom_property = self.register + source.metadata.get_by_name = lambda entity, fqn, fields=None: ( + self.dashboard if fqn == self.dashboard.fullyQualifiedName.root else None ) - self.registered.append((request["name"], data_type)) - kept = [prop for prop in self.dashboard_type["customProperties"] if prop["name"] != request["name"]] - self.edit(self.dashboard_type, customProperties=[*kept, {**request, "propertyType": {"name": data_type}}]) - - def patch(self, path, data=None, headers=None): - is_type = path.startswith("/metadata/types/") - target = self.dashboard_type if is_type else self.dashboard - if is_type: - self.type_writes += 1 - if self.type_write_error: - raise self.type_write_error - if_match = (headers or {}).get("If-Match") - if if_match and if_match != f'W/"{target["version"]}"': - self.refused += 1 - raise APIError({"code": 412, "message": "Precondition Failed"}) - operations = json.loads(data) - if is_type: - self.registered += [ - (op["value"]["name"], op["value"]["propertyType"]["name"]) - for op in operations - if op["path"] == "/customProperties/-" - ] - else: - assert all(op["path"].startswith("/extension") and op["op"] != "remove" for op in operations) - self.dashboard_writes += 1 - patched = jsonpatch.apply_patch(target, operations) - patched["version"] = round(target["version"] + 0.1, 1) - if is_type: - self.dashboard_type = patched - else: - self.dashboard = patched - return copy.deepcopy(patched) - - -def stored_extension(source, server, workbook_id="wb-1"): - """The dashboard's custom properties once the workbook's custom property stage ran, the sink applying any patch""" + + def register(self, record): + request = record.createCustomPropertyRequest + self.registered.append((request.name.root, request.propertyType.root.name)) + self.properties.append({"name": request.name.root, "propertyType": {"name": request.propertyType.root.name}}) + + +def patched_extension(source, workbook_id="wb-1"): + """The extension the dashboard holds once the sink applies the workbook's patch""" details = source.get_dashboard_details(Workbook(workbookId=workbook_id)) - for either in source.yield_dashboard_extension(details): - if either.right: - source.metadata.patch( - entity=type(either.right.original_entity), - source=either.right.original_entity, - destination=either.right.new_entity, - allowed_fields=ALLOWED_COMMON_PATCH_FIELDS, - restrict_update_fields=RESTRICT_UPDATE_LIST, - override_metadata=either.right.override_metadata, - ) - return server.extension + requests_sent = [either.right for either in source.yield_dashboard_extension(details)] + if not requests_sent: + return None + (request,) = requests_sent + dashboard_patch = build_patch( + source=request.original_entity, + destination=request.new_entity, + allowed_fields=ALLOWED_COMMON_PATCH_FIELDS, + restrict_update_fields=RESTRICT_UPDATE_LIST, + override_metadata=request.override_metadata, + ) + assert all(op["path"].startswith("/extension") and op["op"] != "remove" for op in dashboard_patch.patch) + return dashboard_patch.apply(request.original_entity.model_dump(mode="json", exclude_none=True))["extension"] @pytest.mark.parametrize("version", [3, 1.1]) @@ -1766,90 +1693,65 @@ def test_the_workbook_version_is_patched_onto_its_dashboard(sigma_over_http, rou source, _ = sigma_over_http source.source_config.includeCustomProperties = True routes["GET", "/v2/workbooks/wb-1"] = {**routes["GET", "/v2/workbooks/wb-1"], "latestVersion": version} - server = FakeOpenMetadata(extension={"team": "finance", "latestVersion": 2}) + server = FakeDashboardProperties(extension={"team": "finance", "latestVersion": 2}) server.serve(source) - assert stored_extension(source, server) == {"team": "finance", "latestVersion": version} - # wb-2 has no dashboard: nothing is written, and the property is not registered again - stored_extension(source, server, "wb-2") - assert server.dashboard_writes == 1 + assert patched_extension(source) == {"team": "finance", "latestVersion": version} + assert patched_extension(source, "wb-2") is None assert server.registered == [("latestVersion", "number")] def test_a_latest_version_property_of_another_type_is_left_alone(sigma_over_http): source, _ = sigma_over_http source.source_config.includeCustomProperties = True - server = FakeOpenMetadata(properties=[("latestVersion", "string")]) + server = FakeDashboardProperties(properties=[("latestVersion", "string")]) server.serve(source) - assert stored_extension(source, server) is None + assert patched_extension(source) is None assert server.registered == [] def test_no_workbook_version_is_set_without_custom_properties(sigma_over_http): source, _ = sigma_over_http - server = FakeOpenMetadata() + server = FakeDashboardProperties() server.serve(source) - assert stored_extension(source, server) is None + assert patched_extension(source) is None assert server.registered == [] def test_a_failed_registration_sets_no_version_and_is_not_retried(sigma_over_http): source, _ = sigma_over_http source.source_config.includeCustomProperties = True - server = FakeOpenMetadata() - server.type_write_error = APIError({"code": 403, "message": "Forbidden"}) + server = FakeDashboardProperties() server.serve(source) + attempts = [] - assert stored_extension(source, server) is None - assert stored_extension(source, server, "wb-2") is None - assert server.type_writes == 1 + def refuse(record): + attempts.append(record.createCustomPropertyRequest.name.root) + raise requests.HTTPError("403 Forbidden") + source.metadata.create_or_update_custom_property = refuse -def test_a_registered_latest_version_property_is_reused(sigma_over_http): - source, _ = sigma_over_http - source.source_config.includeCustomProperties = True - server = FakeOpenMetadata(properties=[("latestVersion", "number")]) - server.serve(source) - - assert stored_extension(source, server) == {"latestVersion": 3} - assert server.registered == [] - - -def test_a_property_a_user_sets_after_the_dashboard_read_is_kept(sigma_over_http): - source, _ = sigma_over_http - source.source_config.includeCustomProperties = True - server = FakeOpenMetadata(properties=[("latestVersion", "number")]) - server.after_dashboard_read = lambda: server.edit(server.dashboard, extension={"team": "finance"}) - server.serve(source) + assert patched_extension(source) is None + assert patched_extension(source, "wb-2") is None + assert attempts == ["latestVersion"] - assert stored_extension(source, server) == {"team": "finance", "latestVersion": 3} - assert server.refused == 1 - -def test_a_latest_version_property_an_administrator_adds_after_the_read_is_left_as_it_is(sigma_over_http): +def test_a_registered_latest_version_property_is_reused(sigma_over_http): source, _ = sigma_over_http source.source_config.includeCustomProperties = True - administrators = { - "name": "latestVersion", - "displayName": "Workbook version", - "description": "Set by an administrator", - "propertyType": {"name": "number"}, - } - server = FakeOpenMetadata() - server.after_type_read = lambda: server.edit(server.dashboard_type, customProperties=[administrators]) + server = FakeDashboardProperties(properties=[("latestVersion", "number")]) server.serve(source) - assert stored_extension(source, server) == {"latestVersion": 3} - assert server.dashboard_type["customProperties"] == [administrators] + assert patched_extension(source) == {"latestVersion": 3} assert server.registered == [] def test_a_failed_dashboard_read_is_reported_for_the_workbook(sigma_over_http): source, _ = sigma_over_http source.source_config.includeCustomProperties = True - FakeOpenMetadata(properties=[("latestVersion", "number")]).serve(source) + FakeDashboardProperties().serve(source) def unreachable(entity, fqn, fields=None): raise requests.ConnectionError("OpenMetadata unreachable") From 59062f31228446d68275ba475154d8988680d2e1 Mon Sep 17 00:00:00 2001 From: Akash Verma Date: Mon, 9 Nov 2026 23:47:33 +0530 Subject: [PATCH 7/7] ci: retrigger checks skipped by the pull_request_target brownout