#2496 hub: extract cg_name from build in policy_get_cgs
Closed by tkopecek. Opened by tkopecek.
tkopecek/koji issue2251  into  master

Download 2496.patch

Fixes: https://pagure.io/koji/issue/2251

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

:thumbsup:

build is undefined if data['build'] is not a string. Otherwise, :thumbsup:

1 new commit added

  • check types

1 new commit added

  • check types

rebased onto 9ac0652945fa1ed23d30363de84eac177acddef5

updated

it could be an int as build_id

rebased onto c5f35758f264abc2e5516638502b237af0dd779d

rebased onto 53d57f2a6f4d0acbbc626ff04d5aa5318c2721d2

:thumbsup:

Metadata Update from @mfilip:
- Pull-request tagged with: testing-done

Note that in light of #2511, this change is of questionable value at the moment.

Unless we can address #2511, likely we'll have to take an approach more like policy_get_brs where we examine the build components. This would be most in line with the policy at CG Import time.

Metadata Update from @tkopecek:
- Pull-request untagged with: testing-done, testing-ready

Moved to 1.24 (with #2511) as it needs more work.

Unless we can address #2511, likely we'll have to take an approach more like policy_get_brs where we examine the build components. This would be most in line with the policy at CG Import time.

I think when I looked at this before, I must not have looked at enough diff context. The existing policy test does look at buildroot data and has for years.

Looking at build.cg_name is faster, but less reliable. When we added the field, we did not provide a mechanism to populate it for existing data, so there are old content generator builds where the only way to determine this is to look at the buildroots.

The current change overrides the buildroot check for such builds, even when cg_id is not set for the build. So looks like this will return {} in cases where the old code would return a more correct answer.

:thumbsdown:

It looks that we've solved most problems with other PRs. Let's close this one for now.

Pull-Request has been closed by tkopecek

Metadata