Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use MetadataAuditStamp instead of com.linkedin.common.AuditStamp #309

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
namespace com.linkedin.metadata.events

/**
* Data captured on a resource/association/sub-resource level giving insight into when that resource/association/sub-resource moved into a particular lifecycle stage, and who acted to move it into that specific lifecycle stage.
*/
record MetadataAuditStamp {

/**
* When did the resource/association/sub-resource move into the specific lifecycle stage represented by this MetadataAuditEvent.
* i.e. createdon column of a metadata entity table
*/
time: long

/**
* The entity (e.g. a member URN) which will be credited for moving the resource/association/sub-resource into the specific lifecycle stage. It is also the one used to authorize the change.
* i.e. createdby column of a metadata entity table
*/
actor: string

/**
* The entity (e.g. a service URN) which performs the change on behalf of the Actor and must be authorized to act as the Actor.
* i.e. createdfor column of a metadata entity table
*/
impersonator: optional string
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
namespace com.linkedin.testing.mxe.bar.annotatedAspectBar

import com.linkedin.avro2pegasus.events.KafkaAuditHeader
import com.linkedin.common.AuditStamp
import com.linkedin.metadata.events.ChangeType
import com.linkedin.metadata.events.IngestionTrackingContext
import com.linkedin.metadata.events.IngestionMode
import com.linkedin.metadata.events.MetadataAuditStamp
import com.linkedin.testing.BarUrn
import com.linkedin.testing.AnnotatedAspectBar

Expand Down Expand Up @@ -47,7 +47,7 @@ record MetadataAuditEvent {
/**
* Audit info (i.e. createdon, createdby, createdfor) to track the version history of metadata changes.
*/
auditStamp: union[null, AuditStamp] = null
auditStamp: union[null, MetadataAuditStamp] = null

/**
* Type of the ingestion. Allow null for backward compatibility. Downstream should treat null as live ingestion.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
namespace @(eventSpec.getNamespace())

import com.linkedin.avro2pegasus.events.KafkaAuditHeader
import com.linkedin.common.AuditStamp
import com.linkedin.metadata.events.ChangeType
import com.linkedin.metadata.events.IngestionTrackingContext
import com.linkedin.metadata.events.IngestionMode
import com.linkedin.metadata.events.MetadataAuditStamp
import @eventSpec.getUrnType()
import @eventSpec.getFullValueType()

Expand Down Expand Up @@ -50,7 +50,7 @@ record MetadataAuditEvent {
/**
* Audit info (i.e. createdon, createdby, createdfor) to track the version history of metadata changes.
*/
auditStamp: union[null, AuditStamp] = null
auditStamp: union[null, MetadataAuditStamp] = null

/**
* Type of the ingestion. Allow null for backward compatibility. Downstream should treat null as live ingestion.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ class MetadataEventsGeneratorPluginIntegTest extends Specification {
namespace com.linkedin.mxe.foo.testAspect

import com.linkedin.avro2pegasus.events.KafkaAuditHeader
import com.linkedin.common.AuditStamp
import com.linkedin.metadata.events.ChangeType
import com.linkedin.metadata.events.IngestionTrackingContext
import com.linkedin.metadata.events.IngestionMode
import com.linkedin.metadata.events.MetadataAuditStamp
import com.linkedin.testing.FooUrn
import com.linkedin.metadata.test.aspects.TestAspect

Expand Down Expand Up @@ -181,7 +181,7 @@ class MetadataEventsGeneratorPluginIntegTest extends Specification {
/**
* Audit info (i.e. createdon, createdby, createdfor) to track the version history of metadata changes.
*/
auditStamp: union[null, AuditStamp] = null
auditStamp: union[null, MetadataAuditStamp] = null

/**
* Type of the ingestion. Allow null for backward compatibility. Downstream should treat null as live ingestion.
Expand Down Expand Up @@ -261,10 +261,10 @@ class MetadataEventsGeneratorPluginIntegTest extends Specification {
namespace com.linkedin.mxe.foo.testTyperefAspect

import com.linkedin.avro2pegasus.events.KafkaAuditHeader
import com.linkedin.common.AuditStamp
import com.linkedin.metadata.events.ChangeType
import com.linkedin.metadata.events.IngestionTrackingContext
import com.linkedin.metadata.events.IngestionMode
import com.linkedin.metadata.events.MetadataAuditStamp
import com.linkedin.testing.FooUrn
import com.linkedin.metadata.test.aspects.TestTyperefAspect

Expand Down Expand Up @@ -307,7 +307,7 @@ class MetadataEventsGeneratorPluginIntegTest extends Specification {
/**
* Audit info (i.e. createdon, createdby, createdfor) to track the version history of metadata changes.
*/
auditStamp: union[null, AuditStamp] = null
auditStamp: union[null, MetadataAuditStamp] = null

/**
* Type of the ingestion. Allow null for backward compatibility. Downstream should treat null as live ingestion.
Expand Down
Loading