#742 Filters are applied too early for local builds
Closed: Fixed 6 years ago Opened 6 years ago by jkaluza.

MockModuleBuilder's _createrepo filters out packages from repo based on mmd.filters. This is currently applied everytime we run this method, but instead it should be applied only to last createrepo call in the given module build to remove the filtered packages in the resulting repo.

Otherwise this code can remove dependencies of next batch before it is built.


@jkaluza Are you currently working on this? I'm interesting in it for the pythonX-ecosystem module builds, so I started looking at what would be involved in fixing it.

  1. MockModuleBuilder.buildroot_add_artifacts is the step that needs to know whether or not to apply filters, so I'd suggest a new apply_output_filters=True flag be added to that builder API method
  2. scheduler.handlers.components._finalize is the part that actually calls buildroot_add_artifacts, and hence would need a way to know whether or not the current batch is the final batch. The main things it has access to are the ComponentBuild and the related ModuleBuild

As far as I can tell, ModuleBuild doesn't currently include anything along the lines of "expected batch count", so in order to implement this, that would need to be added, and then the build finalizer could set apply_output_filters = (component_build.batch == parent.last_expected_batch )

Does that seem like a reasonable way to tackle it?

Metadata Update from @mprahl:
- Issue assigned to mcurlej
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

6 years ago

Login to comment on this ticket.

Metadata