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

[15.0][FIX] upgrade_analysis: new modules cannot be merged/renamed in same version #3142

Open
wants to merge 2 commits into
base: 15.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions upgrade_analysis/models/upgrade_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,16 @@

module_domain = [
("state", "=", "installed"),
("name", "not in", ["upgrade_analysis", "openupgrade_records"]),
(
"name",
"not in",
[
"upgrade_analysis",
"openupgrade_records",
"openupgrade_scripts",
"openupgrade_framework",
],
),
]

connection = self.config_id.get_connection()
Expand All @@ -552,16 +561,18 @@
module_descriptions = {}
for module in all_modules:
status = ""
is_new = False

Check warning on line 564 in upgrade_analysis/models/upgrade_analysis.py

View check run for this annotation

Codecov / codecov/patch

upgrade_analysis/models/upgrade_analysis.py#L564

Added line #L564 was not covered by tests
if module in all_local_modules and module in all_remote_modules:
module_description = " %s" % module
elif module in all_local_modules:
module_description = " |new| %s" % module
is_new = True

Check warning on line 569 in upgrade_analysis/models/upgrade_analysis.py

View check run for this annotation

Codecov / codecov/patch

upgrade_analysis/models/upgrade_analysis.py#L569

Added line #L569 was not covered by tests
else:
module_description = " |del| %s" % module

if module in compare.apriori.merged_modules:
if not is_new and module in compare.apriori.merged_modules:
status = "Merged into %s. " % compare.apriori.merged_modules[module]
elif module in compare.apriori.renamed_modules:
elif not is_new and module in compare.apriori.renamed_modules:
status = "Renamed to %s. " % compare.apriori.renamed_modules[module]
elif module in compare.apriori.renamed_modules.values():
status = (
Expand Down
Loading