Skip to content
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

Introduce DialogModel #589

Merged
merged 5 commits into from
Jan 15, 2020
Merged

Introduce DialogModel #589

merged 5 commits into from
Jan 15, 2020

Conversation

fernflower
Copy link
Member

@fernflower fernflower commented Jan 2, 2020

Every time a Dialog.request_answers method is called
the corresponding dialog becomes registered with the
workflow and a DialogModel message containing specific
data is produced.
A connected patch in leapp-repository will introduce
an actor that would collect all messages of such kind
and produce proper Report messages with all the information
necessary for leapp answer\leapp upgrade stages.

@fernflower fernflower added the wip label Jan 2, 2020
@centos-ci
Copy link

Can one of the admins verify this patch?

@fernflower fernflower force-pushed the dialogmodel branch 2 times, most recently from ec04e28 to b33473a Compare January 2, 2020 18:04
@fernflower fernflower added Requries Repo PR Use it when leapp-deps is changed and removed Requries Repo PR Use it when leapp-deps is changed labels Jan 2, 2020
fernflower added a commit to fernflower/leapp-repository that referenced this pull request Jan 6, 2020
Add an actor that collects information about dialogs
to answer during leapp answer stage.
Also this patch will contain minimal changes to existing
actors with dialogs (ntpd->chrony) to reflect changes in
leapp dialogs processing and API.

Depends-On: oamg/leapp#589
Every time a Dialog.request_answers method is called
the corresponding dialog becomes registered with the
workflow and a DialogModel message containing specific
data is produced.
A connected patch in leapp-repository will introduce
an actor that would collect all messages of such kind
and produce proper Report messages with all the information
necessary for leapp answer\leapp upgrade stages.
In order to respect leapp preupgrade\upgrade non-interactivity
agreements request_answers won't be blocking any longer but will
return saved choice from answerfile or empty dict straightaway.
This way actor writers don't need to make any adjustments to the
way they used the dialogs.

Also DialogModel messages will be raised only for the dialogs that
don't have answers stored in answerfile. This will allow easier
management of questions-still-to-answer if verifydialogs actor.
@fernflower fernflower removed the wip label Jan 6, 2020
@fernflower fernflower changed the title WIP: Introduce DialogModel Introduce DialogModel Jan 6, 2020
vinzenz
vinzenz previously approved these changes Jan 9, 2020
fernflower added a commit to fernflower/leapp-repository that referenced this pull request Jan 9, 2020
Add an actor that collects information about dialogs
to answer during leapp answer stage.
Also this patch will contain minimal changes to existing
actors with dialogs (ntpd->chrony) to reflect changes in
leapp dialogs processing and API.

Depends-On: oamg/leapp#589
fernflower added a commit to fernflower/leapp-repository that referenced this pull request Jan 10, 2020
Add an actor that collects information about dialogs
to answer during leapp answer stage.
Also this patch will contain minimal changes to existing
actors with dialogs (ntpd->chrony) to reflect changes in
leapp dialogs processing and API.

Depends-On: oamg/leapp#589
fernflower added a commit to fernflower/leapp that referenced this pull request Jan 10, 2020
A super POC implementation. The real one should require
only answerfile as a prerequisite and don't actually run
the workflow.
Some refactoring to existing cli commands will also be
carried out as part of this patch.
Depends-On: oamg#589
fernflower added a commit to fernflower/leapp-repository that referenced this pull request Jan 13, 2020
Add an actor that collects information about dialogs
to answer during leapp answer stage.
Also this patch will contain minimal changes to existing
actors with dialogs (ntpd->chrony) to reflect changes in
leapp dialogs processing and API.

Depends-On: oamg/leapp#589
Change dialog API by removing the blocking interactive
request_answers actor method and suggesting that actors
writers use non-blocking get_answers instead.
The docs have been updated to reflect the change.
Earlier commit added a skip_dialogs workflow parameter
that is passed to the actor but didn't update the docstring.
This commit also set skip_dialogs=True for leapp preupgrade.
fernflower added a commit to fernflower/leapp that referenced this pull request Jan 13, 2020
A super POC implementation. The real one should require
only answerfile as a prerequisite and don't actually run
the workflow.
Some refactoring to existing cli commands will also be
carried out as part of this patch.
Depends-On: oamg#589
Previously answerfile was created from scratch every
preupgrade run which made it impossible to use preupgrade
step as intended "update success chance checker".
Along with this change a small bug with storing answers in
boolean component was fixed and save-answerfile/load-answerfile
options removed from leapp preupgrade and leapp upgrade cli
commands.
fernflower added a commit to fernflower/leapp that referenced this pull request Jan 15, 2020
A super POC implementation. The real one should require
only answerfile as a prerequisite and don't actually run
the workflow.
Some refactoring to existing cli commands will also be
carried out as part of this patch.
Depends-On: oamg#589
fernflower added a commit to fernflower/leapp that referenced this pull request Jan 15, 2020
A super POC implementation. The real one should require
only answerfile as a prerequisite and don't actually run
the workflow.
Some refactoring to existing cli commands will also be
carried out as part of this patch.
Depends-On: oamg#589
Copy link
Member

@Rezney Rezney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, seems to be working fine. There is going to be a follow-up patch to improve the solution further as discussed.

@Rezney Rezney merged commit aa8d026 into oamg:master Jan 15, 2020
Rezney pushed a commit to oamg/leapp-repository that referenced this pull request Jan 15, 2020
Add an actor that collects information about dialogs
to answer during leapp answer stage.
Also this patch will contain minimal changes to existing
actors with dialogs (ntpd->chrony) to reflect changes in
leapp dialogs processing and API.

Depends-On: oamg/leapp#589
fernflower added a commit to fernflower/leapp that referenced this pull request Jan 16, 2020
A super POC implementation. The real one should require
only answerfile as a prerequisite and don't actually run
the workflow.
Some refactoring to existing cli commands will also be
carried out as part of this patch.
Depends-On: oamg#589
fernflower added a commit to fernflower/leapp that referenced this pull request Jan 22, 2020
A super POC implementation. The real one should require
only answerfile as a prerequisite and don't actually run
the workflow.
Some refactoring to existing cli commands will also be
carried out as part of this patch.
Depends-On: oamg#589
pirat89 added a commit to pirat89/leapp that referenced this pull request Apr 7, 2020
## Packaging
- Add BuildRequires on python2-setuptools
- Add new dependency on python?-requests
- Add unversioned dependency on leapp-repository and provide
  the leapp-framework capability in python2-leapp (see docs about
  "new dependency mechanism") (oamg#591)
- Move all leapp and snactor files into related rpms istead of python?-leapp (oamg#591)
- Remove dependency on Jinja2

## Framework
### Fixes
- Fix json export capabilities using serialization (oamg#598)

### Enhancements
- Add the DESKTOP tag for the leapp report (oamg#612)
- Dialogs are non-interactive and redesigned significantly; but in beta support
  (see the known issue)
- Introduce DialogModel that could be processed by actors to add related
  information into the report (oamg#589)
- Introduce Workflow API (see the tutorial) (oamg#618)
- Report inhibitors seprately from errors on stdout (oamg#620)
- Show progress in non verbose executions (oamg#621)

### Known issue
- The answerfile is not generated on some machines after the run of leapp.
  Currently it's under investigation and it will be fixed definitely in the
  next release.

## Leapp
### Fixes
- Print message about generated report when `leapp upgrade` ends, as we do for
  `leapp preupgrade` (oamg#573)

### Enhancements
- Add `leapp answer` to answer Dialog questions on CLI (oamg#592)
- Add the --no-rhsm option for (pre)upgrade commands (oamg#622)
- Display warning when leapp is used in unsupported (devel/testing) mode (oamg#577)
- Print errors on stdout in pretty format (oamg#593)
- The error messages are part of the preupgrade report
- The verbosity options (--verbose | --debug) are available for leapp commands as well

## Snactor
### Fixes
### Enhancements

## stdlib
### Fixes

### Enhancements
- Add `stdin` and `encoding` parameters in the run function (oamg#583, oamg#595)

## Modifications
- Code is compatible with Python3 pylint
pirat89 added a commit to pirat89/leapp that referenced this pull request Apr 16, 2020
## Packaging
- Add BuildRequires on python2-setuptools
- Add new dependency on python2-requests
- Add unversioned dependency on leapp-repository and provide
  the leapp-framework capability in python2-leapp (see docs about
  "new dependency mechanism") (oamg#591)
- Move all leapp and snactor files into related rpms instead of python?-leapp (oamg#591)
- Remove dependency on Jinja2

## Framework
### Fixes
- Fix json export capabilities using serialization (oamg#598)

### Enhancements
- Add the DESKTOP tag for the leapp report (oamg#612)
- Dialogs are non-interactive and redesigned significantly; but in beta support
  (see the known issue)
- Introduce DialogModel that could be processed by actors to add related
  information into the report (oamg#589)
- Introduce Workflow API (see the Workflow APIs tutorial) (oamg#618)
- Report inhibitors separately from errors on stdout (oamg#620)
- Show progress in non-verbose executions (oamg#621)

### Known issue
- The answerfile is not generated on some machines after the run of leapp.
  Currently it's under investigation.

## Leapp
### Fixes
- Print message about generated report when `leapp upgrade` ends, as we do for
  `leapp preupgrade` (oamg#573)

### Enhancements
- Add `leapp answer` to answer Dialog questions in CLI (oamg#592)
- Add the --no-rhsm option for (pre)upgrade commands (oamg#622)
- Add the --enablerepo option for Leapp to use an existing custom yum/dnf
repository during the upgrade
- Display a warning when leapp is used in an unsupported (devel/testing) mode (oamg#577)
- Print errors on stdout in pretty format (oamg#593)
- Error messages are now part of the preupgrade report
- The verbosity options (--verbose | --debug) are available for leapp commands as well

## stdlib
### Enhancements
- Add `stdin` and `encoding` parameters in the run function (oamg#583, oamg#595)

## Modifications
- Code is compatible with Python3 pylint
@pirat89 pirat89 mentioned this pull request Apr 16, 2020
pirat89 added a commit that referenced this pull request Apr 16, 2020
## Packaging
- Add BuildRequires on python2-setuptools
- Add new dependency on python2-requests
- Add unversioned dependency on leapp-repository and provide
  the leapp-framework capability in python2-leapp (see docs about
  "new dependency mechanism") (#591)
- Move all leapp and snactor files into related rpms instead of python?-leapp (#591)
- Remove dependency on Jinja2

## Framework
### Fixes
- Fix json export capabilities using serialization (#598)

### Enhancements
- Add the DESKTOP tag for the leapp report (#612)
- Dialogs are non-interactive and redesigned significantly; but in beta support
  (see the known issue)
- Introduce DialogModel that could be processed by actors to add related
  information into the report (#589)
- Introduce Workflow API (see the Workflow APIs tutorial) (#618)
- Report inhibitors separately from errors on stdout (#620)
- Show progress in non-verbose executions (#621)

### Known issue
- The answerfile is not generated on some machines after the run of leapp.
  Currently it's under investigation.

## Leapp
### Fixes
- Print message about generated report when `leapp upgrade` ends, as we do for
  `leapp preupgrade` (#573)

### Enhancements
- Add `leapp answer` to answer Dialog questions in CLI (#592)
- Add the --no-rhsm option for (pre)upgrade commands (#622)
- Add the --enablerepo option for Leapp to use an existing custom yum/dnf
repository during the upgrade
- Display a warning when leapp is used in an unsupported (devel/testing) mode (#577)
- Print errors on stdout in pretty format (#593)
- Error messages are now part of the preupgrade report
- The verbosity options (--verbose | --debug) are available for leapp commands as well

## stdlib
### Enhancements
- Add `stdin` and `encoding` parameters in the run function (#583, #595)

## Modifications
- Code is compatible with Python3 pylint
MichalHe pushed a commit to MichalHe/leapp that referenced this pull request Aug 12, 2021
## Packaging
- Add dependency on python2-leapp and leapp-framework
- Add python-requests as dependency (oamg#407)
- Drop leapp sos plugin (it's part of the sos rpm in RHEL 7.7+)
- Remove dependency on Jinja2 related packages (oamg#407)

## Fixes
- Do not mount pseudo and unsupposrted FS to overlayfs (e.g. proc)
- Evaluate PES events transitively to create correct data for the upgrade transaction
- Fix boot order on EFI systems
- Fix checking of kernel drivers (oamg#400)
- Fix failures caused by local rpms added into the upgrade transaction
- Fix getting mount information with mountpoints with spaces in the path
- Fix handling of XFS without ftype for every such mounted FS
- Fix issue with random booting into old RHEL 7 kernel after the upgrade
- Fix issues on systems with statically mapped IPs in /etc/hosts
- Fix issues with device mapper and udev in a container
- Fix issues with failing rpm transaction calculation because of duplicate instructions for dnf
- Fix various issues related to RHSM (e.g. https://bugzilla.redhat.com/show_bug.cgi?id=1702691)
- Fix yum repository scan in case of repositories with invalid URL
- Inhibit the upgrade if multiple kernel-devel rpms are installed
- Inhibit the upgrade when links on root dir '/' are not absolute to save the world
- Parse correctly kernel cmdline inside the initrd (oamg#383) (fixes various issues on s390x)
- Print warnings instead of a hard failure when expected rpms cannot be found (e.g. python3-nss inside an rpm module) (oamg#405)
- Remove java11-openjdk-headless during the upgrade (https://bugzilla.redhat.com/show_bug.cgi?id=1820172)
- Throw a nice error when invalid locale is set (oamg#430)

## Enhancements
- Add initial multipath support (it doesn't handle all cases yet)
- Changed upgrade paths: RHEL-ALT 7.6 -> 8.2; RHEL 7.8 -> 8.2
- Check if the latest installed kernel is booted before the upgrade
- Check that the system satisfies minimum memory requirements for the upgrade (oamg#413)
- Dump `grub2-editenv list` output to help with issues related to the default kernel for the boot
- Improved report related to KDE/GNOME
- Inhibit the upgrade for ipa-server (oamg#481)
- Inhibit the upgrade on EFI systems when efibootmgr is not installed
- Inhibit the upgrade on FIPS systems
- Inhibit the upgrade when the raised dialogs are missing answers (oamg#589)
- Introduce new ways of using custom repositories during the transaction
- Make report messages more explicit about Dialogs (oamg#600)
- Migrate SpamAssassin
- Migrate cups-filters
- Migrate sane-backend
- Modify vim configuration to keep the original behaviour
- Report changes in wireshark
- Support the upgrade without the use of subscription-manager
- The name and baseurl field in the CustomTargetRepository message are optional now
- Use the new framework mechanism to inhibit the upgrade without reporting errors
- Various texts are improved based on the feedback

## Additional changes interesting for devels
- Add new functions in the config library to get envars related to leapp
- Add support for testing with Beta and HTB systems
- LEAPP_SKIP_CHECK_OS_RELEASE has been renamed to LEAPP_DEVEL_SKIP_CHECK_OS_RELEASE
- Provide info about kernel cmdline via KernelCmdline message
- The IPUConfig message contains information about booted kernel
- The code is mostly Py2/Py3 compatible now and all PRs are tested on Py2 and Py3 compatibility (linters, unit-tests)
- The config.version library contains is_rhel_alt() for detection of RHEL-ALT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants