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

CFE-4408: Fixed package promises with only promisers and no other attributes #5552

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

craigcomstock
Copy link
Contributor

CFE-4315 introduced a behavior change so that in the case of a simple package promise with only a promiser:

packages:
"ed";

Things would just work in the case where there was no default package manager defined with package_module_knowledge.platform_default.

In the case where package_module_knowledge.platform_default was defined this simple case would cause errors.

This change fixes this second case as well as modifies and adds some logging around the choosing of v1 or v2 package promise implementation.

Ticket: CFE-4408
Changelog: title

@craigcomstock craigcomstock marked this pull request as draft June 24, 2024 19:52
@craigcomstock
Copy link
Contributor Author

github CI is green, let's try jenkins @cf-bottom, thanks!

@cf-bottom
Copy link

@craigcomstock
Copy link
Contributor Author

@cf-bottom jenkins on lots of platforms to check this change.

@cf-bottom
Copy link

@craigcomstock
Copy link
Contributor Author

CI was unstable but won't really test this fix anyway. I will manually test packages generated. I don't think there is a reliable way to automate a test since it depends on actual packages.

@craigcomstock
Copy link
Contributor Author

get a package with these changes Build Status

@basvandervlies
Copy link
Contributor

This will also fix: https://northerntech.atlassian.net/browse/CFE-4398

@craigcomstock
Copy link
Contributor Author

@basvandervlies maybe take another look at this PR. I have done some testing and think it is good and like you said should resolve two bugs with one stone! 😹

Copy link
Member

@nickanderson nickanderson left a comment

Choose a reason for hiding this comment

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

Love the log messages!

I do question checking package_module_knowledge.platform_default (an MPFism) vs default:control_common.package_module (a coreism)

libpromises/attributes.c Outdated Show resolved Hide resolved
libpromises/attributes.c Outdated Show resolved Hide resolved
larsewi
larsewi previously approved these changes Jul 4, 2024
vpodzime
vpodzime previously approved these changes Jul 5, 2024
Copy link
Contributor

@vpodzime vpodzime left a comment

Choose a reason for hiding this comment

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

ACK

@craigcomstock craigcomstock dismissed stale reviews from vpodzime and larsewi via 7aedf6c July 8, 2024 16:13
Copy link
Member

@nickanderson nickanderson left a comment

Choose a reason for hiding this comment

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

Looks good to my naive eyes.

libpromises/attributes.c Show resolved Hide resolved
@craigcomstock
Copy link
Contributor Author

@cf-bottom jenkins exotics please

@cf-bottom
Copy link

@craigcomstock
Copy link
Contributor Author

Only failure in CI is process_test on rhel-7, known issue https://northerntech.atlassian.net/browse/ENT-10994

…ributes

CFE-4315 introduced a behavior change so that in the case of a simple package promise with only a promiser:

packages:
  "ed";

Things would just work in the case where there was no default package manager defined with package_module_knowledge.platform_default.

In the case where package_module_knowledge.platform_default was defined this simple case would cause errors.

This change fixes this second case as well as improves logging around the choosing of v1 and v2 package promise implementations.

Some of these changes fix CFE-4398 which noted that too many INFO level messages were produced. These messages are moved to DEBUG and VERBOSE level as appropriate.

Also added "packages" promises to list of exceptions so that a bare promiser-only package promise does not cause warnings.

Ticket: CFE-4408
Changelog: title
@craigcomstock craigcomstock merged commit 349fea1 into cfengine:master Jul 9, 2024
10 of 13 checks passed
@craigcomstock craigcomstock deleted the CFE-4408/master branch July 9, 2024 15:39
@craigcomstock
Copy link
Contributor Author

cherry picked to 3.21.x: #5573

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

6 participants