google / earthenterprise

Google Earth Enterprise - Open Source
Apache License 2.0
2.67k stars 890 forks source link

Setting an asset "Bad" sometimes blocks dependencies and sometimes doesn't #1981

Open tst-lsavoie opened 3 years ago

tst-lsavoie commented 3 years ago

Describe the bug

Open GEE has the option to indicate that an asset version is "Bad" via the UI or by using the gesetbad command line tool. The expectation is that anything that depends on that asset will become blocked unless you create a new version of the asset that is good. However, this is not always the case. For example, if you have an imagery resource that is part of an imagery project, you set the resource "Bad", and then you build the project, sometimes the project will report that it is blocked, and sometimes it will simply build or report that it is already built.

To Reproduce

The steps to reproduce this behavior aren't completely known, but a general description is written above.

Expected behavior

Assets always become blocked when you build them and they depend on an asset that has been marked bad.

At a minimum, the behavior should be consistent - either always block assets with bad dependencies, or never block them.

Additional Context

I suspect this has to do with the state of the asset hierarchy. If, for example, you have a database that depends on a project that depends on a resource, and the resource is bad, if you build the database it will tell you that it's already built and do nothing, because from the database's perspective, its inputs (the project) hasn't changed. However, if you rebuild the project, it will notice that one of its inputs is bad and go to a blocked state. I don't think this is a full description of the problem, however, because I think there are cases where even the project will simply tell you that it is up to date.