8000 Deprecate Tags and Flags by fernflower · Pull Request #788 · oamg/leapp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Deprecate Tags and Flags #788

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

Merged
merged 1 commit into from
Aug 22, 2022
Merged

Conversation

fernflower
Copy link
Member

Apply official deprecation process for Tags and Flags
primitives that has been superseeded by Groups.

OAMG-7262

@github-actions
Copy link

Thank you for contributing to the Leapp project!

Please note that every PR needs to comply with the Leapp Guidelines and must pass all tests in order to be mergable.
If you want to request a review or rebuild a package in copr, you can use following commands as a comment:

  • review please to notify leapp developers of review request
  • /packit copr-build to submit a public copr build using packit

To launch regression testing public members of oamg organization can leave the following comment:

  • /rerun to schedule basic regression tests using this pr build and leapp-repository*master* as artifacts
  • /rerun 42 to schedule basic regression tests using this pr build and leapp-repository*PR42* as artifacts
  • /rerun-all to schedule all tests (including sst) using this pr build and leapp-repository*master* as artifacts
  • /rerun-all 42 to schedule all tests (including sst) using this pr build and leapp-repository*PR42* as artifacts

Please open ticket in case you experience technical problem with the CI. (RH internal only)

Note: In case there are problems with tests not being triggered automatically on new PR/commit or pending for a long time, please consider rerunning the CI by commenting leapp-ci build (might require several comments). If the problem persists, contact leapp-infra.

@centos-ci
Copy link

Can one of the admins verify this patch?

@fernflower fernflower force-pushed the deprecateflagstags branch from 5a36d65 to 37867ab Compare July 27, 2022 11:05
@fernflower
Copy link
Member Author

/rerun

@github-actions
Copy link

Copr build succeeded: https://copr.fedorainfracloud.org/coprs/build/4687736

@github-actions
Copy link

Testing Farm request for RHEL-8.6-rhui/4685924;4687736 regression testing has been created.
Once finished, results should be available here.
Full pipeline log.

@github-actions
Copy link

Testing Farm request for RHEL-7.9-rhui/4685924;4687736 regression testing has been created.
Once finished, results should be available here.
Full pipeline log.

@github-actions
Copy link

Testing Farm request for RHEL-8.6.0-Nightly/4685924;4687736 regression testing has been created.
Once finished, results should be available here.
Full pipeline log.

@github-actions
Copy link

Testing Farm request for RHEL-7.9-ZStream/4685924;4687736 regression testing has been created.
Once finished, results should be available here.
Full pipeline log.

Copy link
Member
@pirat89 pirat89 left a comment

Choose a reason for hiding this comment

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

@pirat89
Copy link
Member
pirat89 commented Aug 2, 2022

@fernflower also, if I understand the impact right, this change requires update of all actors now as well. Otherwise users will see a lot of deprecation reports each run of leapp

@fernflower
Copy link
Member Author

Document the deprecated entities here:

* https://leapp.readthedocs.io/en/latest/deprecation.html#list-of-deprecated-functionality-in-leapp

Here you can see how the deprecation looks like for leapp-repository:

* https://leapp.readthedocs.io/en/latest/el7toel8/deprecation.html#deprecated-functionality-in-the-el7toel8-repository

Should be ok now https://github.com/oamg/leapp/blob/e2505c40e5a91ae6729e3564553fc3046242381d/docs/source/deprecation.md

@@ -9,6 +9,7 @@
from leapp.models import fields, Model, ErrorModel
from leapp.topics import ReportTopic
from leapp.libraries.stdlib.api import produce
from leapp.utils.deprecation import deprecated
Copy link
Member

Choose a reason for hiding this comment

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

if we are not going to change actors now, the code change must be skipped. otherwise actors need to be updated first. tbh, i prefer to update the actors. it's not so be deal a believe.

Copy link
Member Author
@fernflower fernflower Aug 2, 2022

Choose a reason for hiding this comment

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

I have been down this road (all actor code update with Tags/Flags->Groups transition) with previous POC and unfortunately it is a big deal and it's getting worse with each new actor pr created or merged :(
If we are to do this - I will definitely need help. It's not only about actors, it's also about tests, and it's not only dumb substitution, but meaningful refactoring as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't want to rush code update to be honest, I'd rather hack our deprecation procedure a little to allow room for not-raising-a-warning-for-this-specific-model.

Copy link
Member

Choose a reason for hiding this comment

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

@fernflower that would mean to update each our actor anyway to suppress the warning - which means we can already update actors directly. creating additional mechanism on top of what exists already does not make sense from my pov and more logically could be to drop the code change raising the warning. The code change seems pretty simple in actors so I would go with that. I am going to open the pr

Copy link
Member

Choose a reason for hiding this comment

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

@fernflower I have opened the draft PR with the applied changes, so we could check how much stuff it affects in existing tests to have some data what else will be possibly needed on top of that change. See oamg/leapp-repository#932

In case we find there a lot of problems around, I would drop the change in the code regarding the deprecation directives, so customer will not see bunch of deprecations warnings. In case we find cheap to do the change, I prefer to do it. wdyt about that?

Copy link
Member
@pirat89 pirat89 Aug 2, 2022

Choose a reason for hiding this comment

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

P.S. I know that in this case we will have to deal with mass-lint-fix as well. But when we are already in state that change of majority actors is inevitable, I think it's good time to deal with that as well.

Apply official deprecation process for Tags and Flags
primitives that has been superseeded by Groups.

This change includes the update of the documentation that is
source of truth regarding the deprecated functionality.

OAMG-7262
@pirat89 pirat89 force-pushed the deprecateflagstags branch from d134f2f to d37c513 Compare August 22, 2022 14:44
@pirat89
Copy link
Member
pirat89 commented Aug 22, 2022

@fernflower I rebased & squashed commits. I was missing blob to be able to test qith up-to-date master

@pirat89
Copy link
Member
pirat89 commented Aug 22, 2022

With the old leapp-repository build, bunch of deprecation reports are generated, which means the deprecation delivered in this commit works as expected:

----------------------------------------
Risk Factor: medium
Title: Usage of deprecated class "Tags" at /etc/leapp/repos.d/system_upgrade/common/actors/unsupportedupgradecheck/actor.py:35
Summary: The primitive is deprecated as Tags and Flags have been joined into the Groups primitive.Please use Groups for report message typing instead.
Since: 2022-09-01
Location: /etc/leapp/repos.d/system_upgrade/common/actors/unsupportedupgradecheck/actor.py:35
Near:                 reporting.Tags([reporting.Tags.UPGRADE_PROCESS, reporting.Tags.SANITY]),

Key: 3a127f10711839a2fae566e69b05ab61c406f379

Jut for the completness, with the current upstream leapp-repository builds, no deprecation warning have been raised, so current changes in leapp-repository are correct as well.

Copy link
Member
@pirat89 pirat89 left a comment

Choose a reason for hiding this comment

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

lgtm and works well (tested manually)

@pirat89 pirat89 merged commit 8548856 into oamg:master Aug 22, 2022
@pirat89
Copy link
Member
pirat89 commented Aug 22, 2022

Merging!! @fernflower congratulation!! Happy to have this one long story around Flags/Tags finally finished after almost 2y 🎆 🍾

@pirat89 pirat89 added the changelog-checked The merger/reviewer checked the changelog draft document and updated it when relevant label Aug 23, 2022
pirat89 added a commit to pirat89/leapp that referenced this pull request Aug 23, 2022
## Packaging
-  bumped leapp-framework to 3.1 (oamg#677)

## Framework

### Fixes
- Fixed a problem where passing environment variables to an executed child process modified the environment variables of the parent process (​​oamg#784)
- Ignore invalid FQDNs (oamg#790)

### Enhancements
- Deprecate `reporting.(Tags|Flags)`, replaced by `reporting.Groups` (oamg#677, oamg#781, oamg#788)
- Introduce `is_inhibitor` function (oamg#677)
- Introduce a `Blob` model field (oamg#789)
- Introduce new report JSON schema v1.2.0 (default: 1.1.0) (oamg#677)

## Leapp (tool)

### Fixes
- Handle missing CLI commands gracefully (oamg#785)
- Requires to be executed by root only (oamg#775)
@pirat89 pirat89 mentioned this pull request Aug 23, 2022
pirat89 added a commit to pirat89/leapp that referenced this pull request Aug 23, 2022
## Packaging
-  bumped leapp-framework to 3.1 (oamg#677)

## Framework

### Fixes
- Fixed a problem where passing environment variables to an executed child process modified the environment variables of the parent process (​​oamg#784)
- Ignore invalid FQDNs (oamg#790)

### Enhancements
- Deprecate `reporting.(Tags|Flags)`, replaced by `reporting.Groups` (oamg#677, oamg#781, oamg#788)
- Introduce `is_inhibitor` function (oamg#677)
- Introduce a `Blob` model field (oamg#789)
- Introduce new report JSON schema v1.2.0 (default: 1.1.0) (oamg#677)

## Leapp (tool)

### Fixes
- Handle missing CLI commands gracefully (oamg#785)
- Requires to be executed by root only (oamg#775)

Signed-off-by: Petr Stodulka <pstodulk@redhat.com>
MichalHe pushed a commit that referenced this pull request Aug 23, 2022
## Packaging
-  bumped leapp-framework to 3.1 (#677)

## Framework

### Fixes
- Fixed a problem where passing environment variables to an executed child process modified the environment variables of the parent process (​​#784)
- Ignore invalid FQDNs (#790)

### Enhancements
- Deprecate `reporting.(Tags|Flags)`, replaced by `reporting.Groups` (#677, #781, #788)
- Introduce `is_inhibitor` function (#677)
- Introduce a `Blob` model field (#789)
- Introduce new report JSON schema v1.2.0 (default: 1.1.0) (#677)

## Leapp (tool)

### Fixes
- Handle missing CLI commands gracefully (#785)
- Requires to be executed by root only (#775)

Signed-off-by: Petr Stodulka <pstodulk@redhat.com>

Signed-off-by: Petr Stodulka <pstodulk@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-checked The merger/reviewer checked the changelog draft document and updated it when relevant
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0