-
Notifications
You must be signed in to change notification settings - Fork 26
WIP: [ART-3965] scan-sources: Use repoquery for rpm change detection #783
Conversation
Build #1
|
35c153c
to
e4543ab
Compare
Build #2
|
Needs more testing to see if this will cause unnecessary rebuild before deploying this to production. Cases to consider:
|
In openshift-eng#764, the idea of using repoquery to detect outdated rpms has been proved in `gen-payload`. This PR will adopt the same approach in `scan_sources`.
e4543ab
to
6e23bcb
Compare
Build #3
|
arch_rpms[arch].append(rpm_entry) | ||
|
||
self.logger.info(f'Checking whether any of the installed rpms {len(arch_rpms)} is outdated') | ||
loop = asyncio.new_event_loop() |
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.
calling asyncio.new_event_loop()
within a synchronous function has shown to be problematic in the past. I think we should make does_image_need_change
async, and with it config_scan_source_changes
that calls it. We might even replace current runtime.parallel_exec with a cleaner asyncio.gather
if feasible, but since we're quering koji API this might make the process slower. It might even be a nice chance to look into how to wrap those synchronous API and make them async
@@ -1077,6 +973,6 @@ async def find_non_latest_rpms(self) -> Dict[str, List[Tuple[str, str, str]]]: | |||
for arch in arches: | |||
iar = self.get_image_archive_inspector(arch) | |||
assert iar is not None |
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.
We might use an error message in case the assertion fails that explains what is causing it and how it could be addressed
Build #4
|
Build #5
|
Build #6
|
Build #7
|
Build #8
|
Build #9
|
Build #10
|
Replaced by a new PR. |
In #764, the idea of using repoquery to detect outdated rpms has been proved in
gen-payload
. This PR will adopt the same approach inscan_sources
.Example run: