Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
0ee9996
test: pin quoted-dotted and struct-grandchild getParentEntityFQN inputs
Shreyansh100704 Sep 11, 2026
0e2cf3c
test: characterize FieldPathUtils nested-container behavior
Shreyansh100704 Sep 11, 2026
13a9a49
test: characterize LineageRepository.getChildrenNames per entity type
Shreyansh100704 Sep 11, 2026
fd712bd
test: characterize DataContract schema-validation extractors
Shreyansh100704 Sep 11, 2026
ac2fb93
test: pin grid aggregator coverage sets and ES/OS divergence
Shreyansh100704 Sep 11, 2026
90785cc
feat(spec): Task and MlFeature implement FieldInterface
Shreyansh100704 Sep 11, 2026
d827e8c
feat: add ChildFieldResolver registry for inline-array child collections
Shreyansh100704 Sep 11, 2026
fb82ee4
fix: remove dead METRIC arm from getParentEntityFQN
Shreyansh100704 Sep 11, 2026
fb27976
refactor: getParentEntityFQN delegates to ChildFieldResolver
Shreyansh100704 Sep 11, 2026
ffa26a6
refactor: FieldPathUtils nested containers resolve via ChildFieldReso…
Shreyansh100704 Sep 11, 2026
1f50282
fix: columns resolves to each entity type's child container
Shreyansh100704 Sep 11, 2026
291872e
refactor: LineageRepository children names read ChildFieldResolver re…
Shreyansh100704 Sep 11, 2026
708e007
refactor: DataContract schema validation reads ChildFieldResolver reg…
Shreyansh100704 Sep 11, 2026
6cb7091
refactor: ES column-grid configs derive from ChildFieldResolver registry
Shreyansh100704 Sep 11, 2026
2d1968a
fix: OpenSearch column grid queries per-type child field paths instea…
Shreyansh100704 Sep 11, 2026
288d9cd
refactor: ColumnRepository internals read ChildFieldResolver (wire fr…
Shreyansh100704 Sep 11, 2026
f669e2f
test: add shared UriTestUtils helper for raw-HTTP integration tests
Shreyansh100704 Sep 11, 2026
30e2f07
test: add DenyPolicyPrincipals helper for negative-authz integration …
Shreyansh100704 Sep 11, 2026
f0c3b3f
feat: /v1/columns reads and writes all inline-child entity types
Shreyansh100704 Sep 11, 2026
3fcc557
test: freeze paginated column wire shape for table and dashboardDataM…
Shreyansh100704 Sep 11, 2026
774c894
fix: persist child display names and change source on inline-child en…
Shreyansh100704 Sep 11, 2026
28d0ac5
feat: generic paginated child read with per-entity columns endpoints
Shreyansh100704 Sep 11, 2026
d3f7cfe
test: edge matrix for child-field resolution and response typing
Shreyansh100704 Sep 11, 2026
c3b1834
test: cover every per-entity child columns endpoint
Shreyansh100704 Sep 11, 2026
b85ccc7
Merge remote-tracking branch 'origin/main' into feat/generalize-ai-au…
Shreyansh100704 Sep 25, 2026
6fb5f77
Merge remote-tracking branch 'origin/main' into feat/generalize-ai-au…
Shreyansh100704 Sep 28, 2026
b1ac82a
fix(ui): render AI suggestions on every data asset page, not only tables
Shreyansh100704 Sep 28, 2026
00ab46e
fix: refuse an ambiguous child name instead of writing to the first m…
Shreyansh100704 Sep 28, 2026
f823e21
chore(playwright): auto-refresh impact-map.generated.json
github-actions[bot] Sep 28, 2026
c88f0b4
Update generated TypeScript types and dereferenced schemas
github-actions[bot] Sep 28, 2026
082b442
Refuse an ambiguous child-field name on the tag path as well as the d…
Shreyansh100704 Sep 28, 2026
1c8e06e
fix(ui): sort the withSuggestions import into place on the seven asse…
Shreyansh100704 Sep 28, 2026
b27ecbc
Merge branch 'main' into feat/generalize-ai-automations
Shreyansh100704 Sep 29, 2026
07c9be9
Give mlFeature a displayName like every other child type and drop the…
Shreyansh100704 Sep 29, 2026
77bf233
Update generated TypeScript types and dereferenced schemas
github-actions[bot] Sep 29, 2026
e9d9f29
Merge branch 'main' into feat/generalize-ai-automations
Shreyansh100704 Sep 30, 2026
5af33d8
Merge branch 'feat/generalize-ai-automations' of https://github.com/o…
Shreyansh100704 Sep 30, 2026
ac37177
Index ML feature tags in tag_usage like every other type's inline chi…
Shreyansh100704 Sep 30, 2026
3e82daa
Index feature tags on the bulk create path and fail the backfill inst…
Shreyansh100704 Sep 30, 2026
22facfb
test(migration): mock MlFeatureTagBackfill in the v210 entry point test
Shreyansh100704 Sep 30, 2026
2b02b34
fix(mlmodel): normalize feature tags on write so a read and a write a…
Shreyansh100704 Sep 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
package org.openmetadata.it.tests;

import static org.awaitility.Awaitility.await;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.time.Duration;
import java.util.List;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.parallel.Execution;
import org.junit.jupiter.api.parallel.ExecutionMode;
import org.openmetadata.it.factories.PipelineServiceTestFactory;
import org.openmetadata.it.util.SdkClients;
import org.openmetadata.it.util.TestNamespace;
import org.openmetadata.it.util.TestNamespaceExtension;
import org.openmetadata.schema.api.data.ColumnGridResponse;
import org.openmetadata.schema.api.data.CreatePipeline;
import org.openmetadata.schema.entity.services.PipelineService;
import org.openmetadata.schema.type.Task;
import org.openmetadata.sdk.client.OpenMetadataClient;
import org.openmetadata.sdk.network.HttpMethod;

/**
* Proves /v1/columns/grid serves a type the grid never served before.
*
* <p>Deriving the grid's index configs from the child-field registry admitted three new types:
* pipeline, mlmodel and worksheet. A mapping survey shows their child-name keyword subfields exist,
* but that is not proof the aggregation returns rows. ColumnGridResourceIT cannot supply that proof
* either: it is a frozen contract and every one of its tests queries table or
* table,dashboardDataModel, so it never exercises even the legacy topic, searchIndex or container
* types. Hence this separate file, alongside it rather than inside it.
*
* <p>If this test cannot be made to pass, the correct response is to narrow GRID_EXCLUDED_TYPES to
* what is actually verified rather than leave an unverified type admitted to a public endpoint.
*/
@Execution(ExecutionMode.CONCURRENT)
@ExtendWith(TestNamespaceExtension.class)
public class ColumnGridNewTypesIT {

private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();

@Test
void grid_returnsRowsForPipeline(TestNamespace ns) throws Exception {
// pipeline is one of the three types admitted to the grid for the first time. Its
// tasks.name.keyword subfield exists but has no lowercase_normalizer, which is the documented
// case-sensitivity caveat, so the pattern below matches the task name exactly as stored.
OpenMetadataClient client = SdkClients.adminClient();
PipelineService service = PipelineServiceTestFactory.createAirflow(ns);
String taskName = ns.prefix("extract").replace('-', '_');

client
.pipelines()
.create(
new CreatePipeline()
.withName(ns.prefix("grid_etl"))
.withService(service.getFullyQualifiedName())
.withTasks(List.of(new Task().withName(taskName))));
waitForSearchIndexRefresh(ns);

await("Wait for the pipeline task to appear in the column grid")
.atMost(Duration.ofSeconds(60))
.pollInterval(Duration.ofSeconds(2))
.ignoreExceptions()
.untilAsserted(
() -> {
ColumnGridResponse response =
getColumnGrid(client, "entityTypes=pipeline&columnNamePattern=" + taskName);
assertNotNull(response.getColumns(), "Columns should not be null");
assertFalse(
response.getColumns().isEmpty(), "grid must return a row for a pipeline task");
assertEquals(taskName, response.getColumns().getFirst().getColumnName());
});
}

// Copied verbatim from ColumnGridResourceIT, which stays byte-unmodified as the frozen contract
// for the legacy grid behavior.
private ColumnGridResponse getColumnGrid(OpenMetadataClient client, String queryParams)
throws Exception {
String response =
client
.getHttpClient()
.executeForString(HttpMethod.GET, "/v1/columns/grid?" + queryParams, null);

return OBJECT_MAPPER.readValue(response, ColumnGridResponse.class);
}

private void waitForSearchIndexRefresh(TestNamespace ns) {
String namespaceMarker = ns.prefix("");
await("Wait for a namespace entity to appear in search")
.atMost(Duration.ofSeconds(60))
.pollInterval(Duration.ofSeconds(2))
.ignoreExceptions()
.untilAsserted(
() -> {
String response =
SdkClients.adminClient()
.search()
.query(namespaceMarker)
.index("dataAsset")
.size(100)
.execute();
JsonNode hits = OBJECT_MAPPER.readTree(response).path("hits").path("hits");
boolean namespaceEntityFound = false;
for (JsonNode hit : hits) {
if (hit.path("_source")
.path("fullyQualifiedName")
.asText()
.contains(namespaceMarker)) {
namespaceEntityFound = true;
break;
}
}
assertTrue(
namespaceEntityFound,
"Search did not return an entity from namespace " + namespaceMarker);
});
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
package org.openmetadata.it.util;

import java.util.ArrayList;
import java.util.List;
import org.openmetadata.schema.api.policies.CreatePolicy;
import org.openmetadata.schema.api.teams.CreateRole;
import org.openmetadata.schema.api.teams.CreateTeam;
import org.openmetadata.schema.api.teams.CreateUser;
import org.openmetadata.schema.entity.policies.Policy;
import org.openmetadata.schema.entity.policies.accessControl.Rule;
import org.openmetadata.schema.entity.teams.Role;
import org.openmetadata.schema.entity.teams.Team;
import org.openmetadata.schema.entity.teams.User;
import org.openmetadata.schema.type.MetadataOperation;
import org.openmetadata.sdk.client.OpenMetadataClient;

/**
* Builds a principal that is genuinely denied one operation on one resource, for negative-authz
* tests.
*
* <p>Needed because the data-consumer client is NOT denied: DataConsumerPolicy grants ViewAll and
* EditDescription on resource "all", and the default organization policy grants broad view access
* even to a user with no role. An expected 403 from either principal would never arrive.
*
* <p>Wiring copied from TaskPermissionsIT (policy to role to team to user). The rule is
* deliberately different: that file's deny is conditional on isTaskFiler(); this one is
* unconditional, because there is no case in which the denied principal should succeed.
*/
public final class DenyPolicyPrincipals {

private DenyPolicyPrincipals() {}

/**
* Returns a client denied {@code operation} on {@code resource}, unconditionally.
*
* <p>When the denied operation is not itself a read, the policy also grants ViewAll so the
* principal can still see the entity. Without that grant a test cannot tell a denied write from a
* denied read: both surface as 403 on the same call.
*/
public static OpenMetadataClient clientDenied(
String uniquePrefix, String resource, MetadataOperation operation) {
OpenMetadataClient admin = SdkClients.adminClient();
List<Rule> rules = new ArrayList<>();
if (!isReadOperation(operation)) {
rules.add(
new Rule()
.withName(uniquePrefix + "_view")
.withResources(List.of("All"))
.withOperations(List.of(MetadataOperation.VIEW_ALL))
.withEffect(Rule.Effect.ALLOW));
}
rules.add(
new Rule()
.withName(uniquePrefix + "_deny")
.withResources(List.of(resource))
.withOperations(List.of(operation))
.withEffect(Rule.Effect.DENY));

Policy policy =
admin
.policies()
.create(
new CreatePolicy()
.withName(uniquePrefix + "_policy")
.withDescription("Unconditional deny for a child-field negative-authz IT")
.withRules(rules));
Role role =
admin
.roles()
.create(
new CreateRole()
.withName(uniquePrefix + "_role")
.withPolicies(List.of(policy.getFullyQualifiedName())));

CreateTeam createTeam = new CreateTeam();
createTeam.setName(uniquePrefix + "_team");
createTeam.setTeamType(CreateTeam.TeamType.GROUP);
createTeam.setDefaultRoles(List.of(role.getId()));
Team team = admin.teams().create(createTeam);

CreateUser createUser = new CreateUser();
createUser.setName(uniquePrefix + "_user");
createUser.setEmail(uniquePrefix + "_user@test.openmetadata.org");
createUser.setTeams(List.of(team.getId()));
User denied = admin.users().create(createUser);
return SdkClients.createClient(denied.getName(), denied.getEmail(), new String[] {});
}

private static boolean isReadOperation(MetadataOperation operation) {
return operation.value().startsWith("View");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package org.openmetadata.it.util;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.fail;

import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import org.openmetadata.sdk.client.OpenMetadataClient;
import org.openmetadata.sdk.exceptions.OpenMetadataException;
import org.openmetadata.sdk.network.HttpMethod;

/**
* Shared raw-HTTP test helpers for integration tests that call an endpoint outside the SDK's fluent
* surface. Consolidates what would otherwise be a per-file copy of URL-encoding and status-code
* assertions: ColumnResourceIT and ColumnCustomPropertiesIT each already carry their own private
* copy of the encoder, left in place because those files are frozen contracts.
*/
public final class UriTestUtils {

private UriTestUtils() {}

/** Percent-encodes a URL path segment (dots, quotes, spaces) for a raw REST call. */
public static String encodeURIComponent(String value) {
return URLEncoder.encode(value, StandardCharsets.UTF_8).replace("+", "%20");
}

/** Asserts that the admin client's call to {@code url} fails with exactly {@code expectedStatus}. */
public static void assertHttpStatus(
int expectedStatus, HttpMethod method, String url, Object body) {
assertHttpStatusFor(SdkClients.adminClient(), expectedStatus, method, url, body);
}

/** Same as {@link #assertHttpStatus} but against an arbitrary client, such as a denied principal. */
public static void assertHttpStatusFor(
OpenMetadataClient client, int expectedStatus, HttpMethod method, String url, Object body) {
try {
client.getHttpClient().executeForString(method, url, body);
fail(
"Expected HTTP "
+ expectedStatus
+ " for "
+ method
+ " "
+ url
+ " but the call succeeded");
} catch (OpenMetadataException e) {
assertEquals(expectedStatus, e.getStatusCode(), e.getMessage());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ private void fetchAndSetSchemaFieldTagsInBatch(List<APIEndpoint> apiEndpoints) {
@Override
public EntityRepository<APIEndpoint>.EntityUpdater getUpdater(
APIEndpoint original, APIEndpoint updated, Operation operation, ChangeSource changeSource) {
return new APIEndpointUpdater(original, updated, operation);
return new APIEndpointUpdater(original, updated, operation, changeSource);
}

private void setDefaultFields(APIEndpoint apiEndpoint) {
Expand Down Expand Up @@ -549,8 +549,9 @@ public List<TagLabel> getAllTags(EntityInterface entity) {
public class APIEndpointUpdater extends EntityUpdater {
public static final String FIELD_DATA_TYPE_DISPLAY = "dataTypeDisplay";

public APIEndpointUpdater(APIEndpoint original, APIEndpoint updated, Operation operation) {
super(original, updated, operation);
public APIEndpointUpdater(
APIEndpoint original, APIEndpoint updated, Operation operation, ChangeSource changeSource) {
super(original, updated, operation, changeSource);
}

@Transaction
Expand Down
Loading
Loading