Track the last time when the entity was changed
See original GitHub issueFeature Suggestion
Track the last time when the entity was changed
Possible Implementation
Maybe a new db field like last_changed_at
can be added in refresh_state database table. Once an entity has been discovered, maybe based on whether the result_hash
in refresh_state
table is changed, the last_changed_at
can be updated accordingly.
Context
This will help track the freshness of the entity. If an entity was not updated for 1 month, it can be considered as outdated. We are trying to improve the entity update process like notifying entity owners if they haven’t update their entity for long time.
Issue Analytics
- State:
- Created a year ago
- Comments:19 (14 by maintainers)
Top Results From Across the Web
Using Entity Framework how can i find out when the last ...
1 Answer 1 ... Add a 'last updated' column to your table and query that one for the latest change. Update: If that...
Read more >Change Tracking in Entity Framework
Here, you will learn how Entity Framework tracks changes on entities during their life time. Entity Framework supports automatic change tracking of the...
Read more >Tracking vs. No-Tracking Queries - EF Core | Microsoft Learn
Tracking behavior controls if Entity Framework Core will keep information about an entity instance in its change tracker.
Read more >How to track the history of data changes using SQL Server ...
In this blog post, you are going to see how to track the history of data changes using SQL Server 2016 System-Versioned Temporal...
Read more >Entity Change Tracking using DbContext in Entity Framework 6
The method outlined about is a good way to track and audit changes made to existing entities. It allows you to record the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m arguing that instead, we should first make sure to track this in the catalog database tables. Putting (especially time based) volatile information in the catalog entities is probably unfortunate. Either way, after we have this info in the database, we could consider reading it up and adding it to entities as part of the stitching step later on.
Main task is to add columns to the proper tables (see the
migrations
directory), and then to make sure to write to those columns in the required places (see especially theDefaultEntitiesCatalog
andStitcher
classes).This might be as simple as adding the current timestamp to the entity around here. I think I’d vote for an annotation, e.g.
backstage.io/updated-at
. Not sure if it’s worth backfilling, but it could be done using a database migration of the final entities table.Is it worth it? What do you think @backstage/catalog-core?