Project

General

Profile

Actions

action #109789

closed

[qe-core] generate a list of installed packages in the system at the end of a test

Added by szarate over 2 years ago. Updated 11 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Refactor/Code Improvements
Start date:
2022-04-11
Due date:
% Done:

0%

Estimated time:
Difficulty:
Sprint:
QE-Core: August Sprint (Aug 03 - Aug 31)

Description

In order to understand better what parts of the Operating System are we testing, we need to know what packages are being installed during the lifecycle of a job. This will allow a PO, a QE Engineer, PM, or Release Manager to make a more informed decision when it comes to an ECO, or a feature, by allowing us to answer:

  • Are we testing this?
  • What version is currently available?
  • What tests are using this?.

Since we have two places where packages are handled, one being the zypper log, and another being calls to zypper_call. While this doesn't guarantee that we know for sure a package is being directly tested, we do know that a package will be at least indirectly tested if it's being pulled as a dependency.

Later, we will look into putting that data to use, in a document database (likely)

Acceptance criteria

  1. Write a hook in zypper_call to log in a variable: test_module and package installed or removed (and exports it, in a json, yaml or similar format, easy to parse by machine)
  2. Write test module that exports the zypper log (Packages installed + packages removed) at the end of the test
  3. The package information extractor is scheduled in the default scenarios and extra_test_* scenarios on OSD to start in the functional job group

Related issues 2 (0 open2 closed)

Related to openQA Tests (public) - action #109792: [qe-core] Offline extraction of logs from Serial consoleResolvedzluo2022-07-21

Actions
Related to openQA Tests (public) - action #115478: [qe-core] test fails in zypper_log_packages - uploading logs seems to fail due to WORKER_HOSTNAME not being always availableResolveddheidler2022-08-18

Actions
Actions #1

Updated by szarate over 2 years ago

  • Related to action #109792: [qe-core] Offline extraction of logs from Serial console added
Actions #2

Updated by szarate over 2 years ago

  • Subject changed from Generate a list of installed packages in the system at the end of a test to [qe-core] generate a list of installed packages in the system at the end of a test

A package in the zypper log, doesn't mean it's really tested (see user installed vs automatically selected as a dependency)

Actions #3

Updated by szarate over 2 years ago

  • Checklist item deleted (Task: write a hook in zypper_call to log in a variable: test_module and package installed or removed)
  • Checklist item deleted (Task: Write test module that exports the zypper log (Packages installed + packages removed) at the end of the test, scheduled in the default scenarios and extra_test_* scenarios)
  • Description updated (diff)
Actions #4

Updated by szarate over 2 years ago

  • Target version set to QE-Core: Ready
Actions #5

Updated by szarate over 2 years ago

  • Sprint set to QE-Core: April Sprint (Apr 13 - May 11)
Actions #6

Updated by szarate over 2 years ago

  • Status changed from New to Workable
Actions #7

Updated by akumar over 2 years ago

  • Description updated (diff)
Actions #8

Updated by akumar over 2 years ago

  • Assignee set to akumar
Actions #9

Updated by akumar over 2 years ago

  • Status changed from Workable to In Progress
Actions #10

Updated by szarate over 2 years ago

  • Sprint changed from QE-Core: April Sprint (Apr 13 - May 11) to QE-Core: May Sprint (May 11 - Jun 08)
Actions #12

Updated by szarate over 2 years ago

Need to sync with Avi on the status of this

Actions #13

Updated by szarate over 2 years ago

  • Sprint changed from QE-Core: May Sprint (May 11 - Jun 08) to QE-Core: June Sprint (Jun 08 - Jul 06)
Actions #14

Updated by akumar over 2 years ago

I have pushed the draft code I had written for getting the list of installed packages during the job - https://github.com/os-autoinst/os-autoinst-distri-opensuse/commit/df67214509acbb1b32a8d089163c06059333ff59
In the first step I was trying to get only the packages which are directly mentioned in zypper_call functions, and in second step to also parse the zypper_log to get the packages which are coming in as dependency packages.

Actions #15

Updated by szarate over 2 years ago

  • Status changed from In Progress to Workable
  • Assignee deleted (akumar)

Thanks @akumar! Looks like that's almost half of the work done! :D.

I think that the parsing of the zypper log can be done on a second step, but at this point I guess somebody else can follow up

Actions #16

Updated by szarate over 2 years ago

  • Sprint changed from QE-Core: June Sprint (Jun 08 - Jul 06) to QE-Core: July Sprint (Jul 06 - Aug 03)
Actions #17

Updated by dheidler over 2 years ago

  • Assignee set to dheidler
Actions #18

Updated by szarate over 2 years ago

  • Sprint changed from QE-Core: July Sprint (Jul 06 - Aug 03) to QE-Core: August Sprint (Aug 03 - Aug 31)
Actions #19

Updated by dheidler over 2 years ago

grep "|\(Installing:\|Removing\) .*} END" /var/log/zypper.log
Actions #20

Updated by dheidler over 2 years ago

  • Status changed from Workable to Feedback
Actions #21

Updated by dheidler over 2 years ago

  • Status changed from Feedback to Resolved
Actions #22

Updated by szarate over 2 years ago

  • Related to action #115478: [qe-core] test fails in zypper_log_packages - uploading logs seems to fail due to WORKER_HOSTNAME not being always available added
Actions #23

Updated by szarate 11 months ago

  • Parent task set to #124625
Actions

Also available in: Atom PDF