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

Automatically detect classes where the backend code has been removed, but the detections still exist on the frontend #446

Open
Famlam opened this issue Jan 21, 2023 · 3 comments

Comments

@Famlam
Copy link
Contributor

Famlam commented Jan 21, 2023

From osm-fr/osmose-backend#1732

After a certain class has been removed from the backend (for example: after a mapcss update that removed the corresponding rule), the previously detected issues remain on the frontend unless manually detected and removed.

Ideally there should be a warning and/or automatic cleaning of such "ghost classes".

@frodrigo
Copy link
Member

frodrigo commented Feb 9, 2023

Here we have one real case osm-fr/osmose-backend#1735

Maybe we can use the output of backend/osmose_config.py and compare with data base content (but there is external analysers).

@jocelynj better idea?

@jocelynj
Copy link
Member

jocelynj commented Feb 9, 2023

I see we have a "timestamp" column on table "class" on frontend. Could it be used to remove old classes?

@frodrigo
Copy link
Member

frodrigo commented Feb 10, 2023

I see we have a "timestamp" column on table "class" on frontend. Could it be used to remove old classes?

Right. But it solves only one part of the issue. The timestamp is update each time the class get an update.
But we have sources/country with removed classes, but not for all countries.

Nevertheless, it is interesting to see we have so much old classes!

select item, class, title->>'en', timestamp from class where timestamp < now() - interval '2 months';

Got 809 rows!

select item, array_agg(DISTINCT class) as classes, max(title->>'en') as title, max(timestamp) as timestamp from class where timestamp < now() - interval '2 months' group by item;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants