#1239 BuildChroot should have direct relation to CoprChroot, not MockChroot
Closed: Fixed 3 years ago by praiskup. Opened 4 years ago by praiskup.

Does that make sense? Turns out it is pretty complicated to get info
about CoprChroot from BuildChroot now, we need to do:
CoprChrootsLogic.get_by_name_safe(bch.build.copr, bch.mock_chroot.name)

While with the proposed fix, it would be just:
build_chroot.copr_chroot
And the mock_croot:
build_chroot.copr_chroot.mock_chroot


It makes sense, but it is redundant information. I think that space for storing it is no factor here, but the worst-case scenario is the possibility of having a bug that stores incompatible pair of build_chroot.build_id and build_chroot.copr_chroot. Which is IMHO very unlikely, so I don't see a problem with this RFE.

My question is though, I this very troubling for us? We seem to use CoprChrootsLogic.get_by_name_safe only in three places in the whole codebase.

My question is though, I this very troubling for us?

It is less effective (some ugly sql query instead of quick search by foreign key).

It is hard to read the data flow/db desing. We spent about hour deciphering
the proper way to get CoprChroot info from BuildChroot (while intuitively
it should be completely trivial).

That said, this doesn't have priority - but instead of wasting another hour of
our lives, it would be nice to invest it into fix instead.

Ok, as I said, I see no problem with this, so whoever is interested in implementing it, go for it :-)

Metadata Update from @schlupov:
- Issue assigned to schlupov

4 years ago

Metadata Update from @praiskup:
- Issue assigned to praiskup (was: schlupov)

3 years ago

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #1356 Merged 3 years ago
  • #1323 Closed 3 years ago