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-4315: Modified packages promise default to use module if present #5434

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

craigcomstock
Copy link
Contributor

@craigcomstock craigcomstock commented Jan 19, 2024

@craigcomstock craigcomstock marked this pull request as draft January 19, 2024 23:02
@cf-bottom
Copy link

Thanks for submitting a PR! Maybe @larsewi can review this?

@craigcomstock
Copy link
Contributor Author

@cf-bottom jenkins please

@cf-bottom
Copy link

@craigcomstock
Copy link
Contributor Author

@cf-bottom jenkins no tests

@cf-bottom
Copy link

@craigcomstock
Copy link
Contributor Author

@cf-bottom jenkins

@cf-bottom
Copy link

@craigcomstock
Copy link
Contributor Author

@cf-bottom jenkins please, thanks

@cf-bottom
Copy link

@craigcomstock
Copy link
Contributor Author

@cf-bottom jenkins no tests please, thanks
and p.s. I know you are in shutdown mode and can't start new jobs so I am curious what you will say, if anything :)

@cf-bottom
Copy link

@craigcomstock
Copy link
Contributor Author

@cf-bottom jenkins no tests

@cf-bottom
Copy link

@craigcomstock
Copy link
Contributor Author

@cf-bottom jenkins with exotics

@craigcomstock craigcomstock marked this pull request as ready for review February 21, 2024 22:06
@cf-bottom
Copy link

nickanderson
nickanderson previously approved these changes Feb 22, 2024
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.

Seems OK.

In the end, this only changes behavior for a very specific case:

With this change the following policy would use the default package_module instead of the default package_method if it could.

packages:
  "ed";

Any case where more info is supplied to the promise (like use of package_method, or package_policy) would cause the package_method implementation to be used.

cf-agent/verify_packages.c Outdated Show resolved Hide resolved
libpromises/attributes.c Outdated Show resolved Hide resolved
larsewi
larsewi previously approved these changes Feb 26, 2024
libpromises/attributes.c Outdated Show resolved Hide resolved
…that package module.

Previously if a policy that only specified the promiser:

packages:
  "ed";

It will default to package_method generic in our C code.

Now it will look for package_module_knowledge.platform_default and if present make the package promise use package module instead.

Ticket: CFE-4315
Changelog: title

Co-authored-by: Lars Erik Wik <53906608+larsewi@users.noreply.github.com>
@craigcomstock
Copy link
Contributor Author

I was going to work on changing documentation to match the switch from old->v1 and new->v2 but found the change to be quite difficult due to auto-linking between page names/headers and such. So will go ahead and merge and cherry pick this change as-is and make a ticket to fix the names in docs.

@craigcomstock craigcomstock merged commit 0f4b7d7 into cfengine:master Mar 19, 2024
12 checks passed
@craigcomstock craigcomstock deleted the CFE-4315/master branch March 19, 2024 16:56
@craigcomstock
Copy link
Contributor Author

cherry picks
#5473
#5472

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