-
Notifications
You must be signed in to change notification settings - Fork 85
update tables #1515
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
base: main
Are you sure you want to change the base?
update tables #1515
Conversation
I don't think we should do this, the |
Yeah, I agree: this is actually a feature of a layer. We do not want new packages for every path a package could exist at. |
That is fair, but now I'm left wondering if there is another way to handle this while also minimizing changes. One option I can think of is adding an This approach doesn't quite account for source packages, though, as we'd now give the package and source package the same ID... |
4c1f798
to
23b3372
Compare
@@ -0,0 +1,5 @@ | |||
-- The package table only save one copy for each unique name+version of a package (and a few more fields). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignore this comment for now
rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED Signed-off-by: RTann <[email protected]>
Signed-off-by: RTann <[email protected]> rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED Signed-off-by: RTann <[email protected]>
rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED Signed-off-by: RTann <[email protected]>
The ol' DB IDs in the user facing responses comes back to haunt us again. Technically the keying the packages (and environments) by the Another option is to append to the |
I did consider just using some random IDs in the coalescer, which I'm sure is doable. I did like the idea of the IDs being closely coupled with the DB for debugging purposes (to know exactly which row in the table this entry is associated with). I don't think this is urgent, but it'd be nice to figure out a solution sometime in the near future. We can talk more offline at some point |
I agree with using |
First:
scannerlist
is never used, so I figured why not remove it hereSecond: we noticed an issue when there are two packages with the same name/version in the same image in different locations, the Indexer only outputs one of them. That is because the
package
table does not account forpackage_db
(ie package location). When the coalescer gets all the packages for a layer, it will see the two unique packages with the same ID. The IndexReport's packages are keyed by the DB's package ID, so even though the coalescer knows about both packages, it is overwritten in the IndexReport.