mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-08 15:30:55 +00:00
fix (frontend): Partially fixes lineage issues and dataset API handling (#1874)
* Initial fix for lineage graph * Fixes broken test by lineage fix commit and returns empty response instead of 500 for upstreams
This commit is contained in:
parent
7c7de50be8
commit
84efa73098
@ -58,7 +58,7 @@ public class Dataset extends Controller {
|
||||
return internalServerError(ControllerUtil.errorResponse(e));
|
||||
}
|
||||
|
||||
return ok(Json.newObject().set("dataset", Json.toJson(view)));
|
||||
return ok(Json.toJson(view));
|
||||
}
|
||||
|
||||
@Security.Authenticated(Secured.class)
|
||||
@ -249,6 +249,11 @@ public class Dataset extends Controller {
|
||||
try {
|
||||
upstreams = _lineageDao.getUpstreamLineage(datasetUrn);
|
||||
} catch (Exception e) {
|
||||
if (ControllerUtil.checkErrorCode(e, 404)) {
|
||||
int[] emptyUpstreams = new int[0];
|
||||
return ok(Json.toJson(emptyUpstreams));
|
||||
}
|
||||
|
||||
Logger.error("Fetch Dataset upstreams error", e);
|
||||
return internalServerError(ControllerUtil.errorResponse(e));
|
||||
}
|
||||
|
||||
@ -148,25 +148,25 @@ export class DatasetEntity extends BaseEntity<Com.Linkedin.Dataset.Dataset> {
|
||||
/**
|
||||
* Whether or not the dataset has been deprecated
|
||||
*/
|
||||
@alias('entity.dataset.deprecated')
|
||||
@alias('entity.deprecated')
|
||||
deprecated?: boolean;
|
||||
|
||||
/**
|
||||
* Note attached to the deprecation process for this dataset
|
||||
*/
|
||||
@alias('entity.dataset.deprecationNote')
|
||||
@alias('entity.deprecationNote')
|
||||
deprecationNote?: string;
|
||||
|
||||
/**
|
||||
* Timestamp for when the dataset was deprecated
|
||||
*/
|
||||
@alias('entity.dataset.decommissionTime')
|
||||
@alias('entity.decommissionTime')
|
||||
decommissionTime?: number;
|
||||
|
||||
/**
|
||||
* Last timestamp for the modification of this dataset
|
||||
*/
|
||||
@oneWay('entity.dataset.modifiedTime')
|
||||
@oneWay('entity.modifiedTime')
|
||||
modifiedTime?: number;
|
||||
|
||||
/**
|
||||
@ -174,7 +174,7 @@ export class DatasetEntity extends BaseEntity<Com.Linkedin.Dataset.Dataset> {
|
||||
* Note: This overrides the BaseEntity implementation since DatasetEntity has a different behavior than
|
||||
* other entities
|
||||
*/
|
||||
@oneWay('entity.dataset.removed')
|
||||
@oneWay('entity.removed')
|
||||
removed!: boolean;
|
||||
|
||||
/**
|
||||
@ -187,7 +187,7 @@ export class DatasetEntity extends BaseEntity<Com.Linkedin.Dataset.Dataset> {
|
||||
/**
|
||||
* Description for the dataset that contains more information about the nature of the data or metadata
|
||||
*/
|
||||
@oneWay('entity.dataset.description')
|
||||
@oneWay('entity.description')
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
@ -202,7 +202,7 @@ export class DatasetEntity extends BaseEntity<Com.Linkedin.Dataset.Dataset> {
|
||||
/**
|
||||
* Reference to the data entity, is the data platform to which the dataset belongs
|
||||
*/
|
||||
@computed('entity.dataset.platform', 'urn')
|
||||
@computed('entity.platform', 'urn')
|
||||
get platform(): DatasetPlatform | undefined {
|
||||
const { urn, entity } = this;
|
||||
const parts = getDatasetUrnParts(urn);
|
||||
|
||||
@ -9,9 +9,7 @@ module('Integration | Component | dynamic-components/entity/field', function(hoo
|
||||
|
||||
test('it renders', async function(assert) {
|
||||
const fakeSeedInformation = {
|
||||
dataset: {
|
||||
description: `Pikachu's special dataset`
|
||||
}
|
||||
};
|
||||
const testUnderlyingDataset = new DatasetEntity(
|
||||
'pikachu',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user