operator-framework / catalogd

On-cluster FBC catalog content server
Apache License 2.0
14 stars 26 forks source link

:bug: When upgrading catalogd to a revision that uses HTTPS, content URLs of existing Catalog objects remain unchanged. #270

Open joelanford opened 1 month ago

joelanford commented 1 month ago

I believe this is because of this check:

https://github.com/operator-framework/catalogd/blob/b68cda46fc08b639264f3d414f65b5413621cd0c/pkg/controllers/core/catalog_controller.go#L135-L141

I think there are two things to fix:

  1. We should not read our own status to assess state. The Catalog status is where we write state after reading from elsewhere. In this case, we should read the actual source of truth (the cache?) to see if we have something unpacked.
  2. Even if we don't need to unpack again, that doesn't mean there is nothing to do. For this bug, the thing we are missing is updating the content URL now that we're serving it via https.
joelanford commented 1 month ago

Hmm. It seems there is no way for the LocalDir storage implementation to determine if what it has stored is actually up-to-date. Solving this problem may require a more invasive change.