[BREAKINGCHANGE] remove dashbaord resource dependecy#97
[BREAKINGCHANGE] remove dashbaord resource dependecy#97
Conversation
facc8a6 to
872354c
Compare
2f6e05e to
5b15e50
Compare
| import { DashboardSpec } from '@perses-dev/spec'; | ||
|
|
||
| export type DashboardKind = 'Dashboard' | 'EphemeralDashboard'; | ||
| export type DashboardMetaData = { name: string; project: string }; |
There was a problem hiding this comment.
Do we have this type as part of the spec? I believe we are using the same metadata for all resources, so define a new one only for this resource might create discrepancies
There was a problem hiding this comment.
We don't have them in the Spec as far as I know. And it seems they should not be part of the Spec as they are irrelevant there. At the moment the the original ones reside in the Core and should not be moved to the Spec. At least this is what I have understood. If we want to eventually drop the Core, we need to take care of the dependency in Shared.
A solution
What I can do is to flatten the DashboardMetaData and keep its filed in the main object (name and project). But, still not sure if this mitigate your concern. For the Kind however, there is nothing I can do. Kind has been used in the Shared, and has been exposed from the Shared. I am not sure what consequence we may encounter, if we drop it. > The main question is if removing the Kind would be a BREAKINGCHANGE which could be resolved.
There was a problem hiding this comment.
As discussed we can keep this intermediary type until we decide on a new location for it.
There was a problem hiding this comment.
To preserve backwards compatibility we should use
export type DashboardMetaData = { name: string; project: string, createdAt?: string, updatedAt?:string, version?: number};
| kind: DashboardResource['kind'] | EphemeralDashboardResource['kind']; | ||
| metadata: ProjectMetadata; | ||
| setDashboard: (dashboard: DashboardResource) => void; | ||
| dashboardName: string; |
There was a problem hiding this comment.
Do we need to duplicate the dashboardName here if its already in metadata?
Signed-off-by: Seyed Mahmoud SHAHROKNI <seyedmahmoud.shahrokni@amadeus.com> Signed-off-by: Seyed Mahmoud SHAHROKNI <seyedmahmoud.shahrokni@amadeus.com> Signed-off-by: Seyed Mahmoud SHAHROKNI <seyedmahmoud.shahrokni@amadeus.com> Signed-off-by: Seyed Mahmoud SHAHROKNI <seyedmahmoud.shahrokni@amadeus.com> Signed-off-by: Seyed Mahmoud SHAHROKNI <seyedmahmoud.shahrokni@amadeus.com> Signed-off-by: Seyed Mahmoud SHAHROKNI <seyedmahmoud.shahrokni@amadeus.com> Signed-off-by: Seyed Mahmoud SHAHROKNI <seyedmahmoud.shahrokni@amadeus.com> Signed-off-by: Seyed Mahmoud SHAHROKNI <seyedmahmoud.shahrokni@amadeus.com> Signed-off-by: Seyed Mahmoud SHAHROKNI <seyedmahmoud.shahrokni@amadeus.com> Signed-off-by: Seyed Mahmoud SHAHROKNI <seyedmahmoud.shahrokni@amadeus.com>
5b15e50 to
3f7a56c
Compare
Description
There is an ongoing effort to remove the core the dependency and replace them with what we have in the Spec.
This PR removes some of the dependencies (mostly DashboardResource, EphemeralDashboardResource) which have been already mentioned by @Nexucis
How does it replace the dependencies?
The PR introduces a new interface which represents an internal definition of any-Dashboard-Resource named DashboardMinimalResource.
Checklist
[<catalog_entry>] <commit message>naming convention using one of thefollowing
catalog_entryvalues:FEATURE,ENHANCEMENT,BUGFIX,BREAKINGCHANGE,DOC,IGNORE.UI Changes
See e2e docs for more details. Common issues include: