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

Several places in the code use RpmBuild and should use Build #1793

Closed
bowlofeggs opened this Issue Sep 7, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@bowlofeggs
Member

bowlofeggs commented Sep 7, 2017

When we first converted the models to be multi-type capable, the Build.nvr field made sense to move into the new RpmBuild model. As a result, many usages of Build were replaced with RpmBuild througout the codebase because many places used the nvr field.

It was later determined that the field maps to Koji's unique build identifier, and that this identifier is still used for other types (like modules and containers). We decided to move the nvr field back to the Build superclass, but we forgot to replace all usages of RpmBuild in the code with Build.

It is important to fix this, as many queries will not operate on modules since they are querying for RpmBuilds.

@bowlofeggs bowlofeggs added the Critical label Sep 7, 2017

@bowlofeggs bowlofeggs referenced this issue Sep 11, 2017

Closed

Demonstrate modular bodhi in staging #1795

5 of 12 tasks complete

@bowlofeggs bowlofeggs self-assigned this Sep 11, 2017

@bowlofeggs

This comment has been minimized.

Show comment
Hide comment
@bowlofeggs

bowlofeggs Sep 11, 2017

Member

There are a couple places in the code that use RpmBuild that I believe should continue to do so:

  • bodhi.server.metadata: This file makes updateinfo.xml files, which are RPM-specific.
  • bodhi.server.validators.validate_request(): This function uses rpm.labelcompare() to find out if a proposed build is newer or older than the last build. We do need to expand this function to be able to compare other types, like modules: #1800
Member

bowlofeggs commented Sep 11, 2017

There are a couple places in the code that use RpmBuild that I believe should continue to do so:

  • bodhi.server.metadata: This file makes updateinfo.xml files, which are RPM-specific.
  • bodhi.server.validators.validate_request(): This function uses rpm.labelcompare() to find out if a proposed build is newer or older than the last build. We do need to expand this function to be able to compare other types, like modules: #1800

bowlofeggs added a commit to bowlofeggs/bodhi that referenced this issue Sep 12, 2017

Replace usages of RpmBuild and RpmPackage with superclasses.
fixes #1793

Signed-off-by: Randy Barlow <randy@electronsweatshop.com>

@bowlofeggs bowlofeggs closed this in #1801 Sep 15, 2017

bowlofeggs added a commit that referenced this issue Sep 15, 2017

Replace usages of RpmBuild and RpmPackage with superclasses.
fixes #1793

Signed-off-by: Randy Barlow <randy@electronsweatshop.com>

bowlofeggs added a commit that referenced this issue Oct 10, 2017

Replace usages of RpmBuild and RpmPackage with superclasses.
fixes #1793

Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment