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

Improved efficiency of windows acceptance test workflow by not re-installing msys2 #5514

Draft
wants to merge 7,228 commits into
base: master
Choose a base branch
from

Conversation

craigcomstock
Copy link
Contributor

msys2 is included in github windows images, e.g. https://github.com/actions/runner-images/tree/main/images/windows

Ticket: ENT-11771
Changelog: none

craigcomstock and others added 30 commits August 25, 2023 09:50
This reverts commit a0f976e.

Ticket: CFE-4249
Changelog: none
Turns out it is still failing even in github. Already reverted in 3.18.x and 3.21.x.
CFE-4249: Revert "Re-enabled passopenfile_test after migrating to github actions"
Bumps [libntech](https://github.com/cfengine/libntech) from `85fcb1b` to `b6245f1`.
- [Commits](NorthernTechHQ/libntech@85fcb1b...b6245f1)

---
updated-dependencies:
- dependency-name: libntech
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
…libntech-b6245f1

Bump libntech from `85fcb1b` to `b6245f1`
The original issue that leads to this is the fact that the cache
for execresult and execresult_as_data were mixed. This is caused by two
separate issues:

* The function cache uses the args list as key and discards the function
  itself. This means different function with the same args are considered
  identical, and cache is reused.
* The args are passed as an Rlist, and the used Rlist comparison ignores the
  additional items of the longest list when comparing two lists of
  different lengths, leading to treating execresult and execresult_as_data
  as identical when using the same command and shell args.

This PR only fixes the specific case of execresult, but leaves other
function cache issues (e.g. host2ip vs. ip2host could be confused).
CFE-4244: Fix RlistEqual comparison on lists of different lengths
The function cache only used the args values, which in some cases could
lead to mixing results from different functions with the same arguments.

Ticket: CFE-4244
Changelog: Cashed policy function results now take into account number of arguments and function name.
Signed-off-by: Lars Erik Wik <[email protected]>
Co-authored-by: Alexis Mousset <[email protected]>
Two reasons for this:
 1. CONTRIBUTING.md says to do this at the top
 2. the `ctx` argument was actually used before the assert

Ticket: None
Changelog: None
Signed-off-by: Lars Erik Wik <[email protected]>
CFE-4244: Add the function name to the result cache key
Ticket: ENT-10470

Issue was that these failures were visible in Jenkins,
turning build "unstable".
With fixed headers not including <config.h>.
With libntech's headers no longer pulling in platform.h, we need
to add it together with some other headers to some places in the
codebase.
…_cleanup_fixes

Add missing #include's previously pulled in by libntech
Change suppress fail to soft fail on known failing tests
in bodies having local parameters.

This also prevents a memory corruption when
an attribute contains external vars but no
local vars.

Ticket: CFE-4254
Changelog: Bodies can now inherit attributes containing global variables

Signed-off-by: Alexis Mousset <[email protected]>
CFE-4254: Allow inheriting attributes using global variables in bodies having local parameters
We require OpenSSL 1.0.0 or newer so we don't need this
compatibility code for older versions.
With libcrypto-compat code removed.
…crypto_compat

Do not #include libcrypto-compat
cfengine/nova@8b8726e
changed cf-hub behavior for ENT-9825

This change fixes an issue with hubs that have SELinux set to enforce.
Hubs which do not have SELinux set to enforce are unaffected by this issue.

Ticket: ENT-10696
Changelog: title
ENT-10696: Added selinux policy to allow cf-hub to initiate scheduled reports
…d in kerenl.core_pattern

It's possible for coredumpctl to be present yet the system not correctly
configured to use systemd-coredump which results in coredumpctl not being able
to find core files. This change restricts the use of coredumpctl for when
systemd-coredump is present in sysctl kernel.core_pattern.

Ticket: ENT-9985
Changelog: Title
ENT-9985: Made cf-support use coredumpctl for core analysis only when configured in kerenl.core_pattern
Bumps [libntech](https://github.com/cfengine/libntech) from `49cd554` to `8545ebb`.
- [Commits](NorthernTechHQ/libntech@49cd554...8545ebb)

---
updated-dependencies:
- dependency-name: libntech
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Ole Herman Schumacher Elgesem <[email protected]>
olehermanse and others added 26 commits April 25, 2024 20:00
README.md: Simplified hello world example
It's now part of cf-reactor.

Ticket: ENT-11538
Changelog: cf-runalerts.service no longer exists, alerts are now
           periodically run by cf-reactor
This is needed for successful uploads of custom action scripts.
Bumps [libntech](https://github.com/NorthernTechHQ/libntech) from `28df3c4` to `329361a`.
- [Release notes](https://github.com/NorthernTechHQ/libntech/releases)
- [Commits](NorthernTechHQ/libntech@28df3c4...329361a)

---
updated-dependencies:
- dependency-name: libntech
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
…libntech-329361a

Bump libntech from `28df3c4` to `329361a`
…actor

Drop cf-runalerts.service + SELinux policy updates
To prevent multiple processes from opening/closing the DB at the
same time. From what we have seen, the *Invalid argument* issues
only happen when multiple processes try to work with the DB,
multiple threads inside a single process don't seem to hit the
trigger.

Also, we have seen that the issues happen when LMDB tries to use
a robust (shared inter-process) mutex that was already destroyed.

Ticket: ENT-11543
Changelog: CFEngine processes no longer suffer from the "Invalid
           argument" issues when working with LMDB
…file

Try to acquire file lock when closing DB
…ginning of every minute

This could fix issues if things are slow and agent runs end up
getting skipped if cf-execd wakes up too late.

Changelog: Title
Ticket: ENT-11765
Signed-off-by: Ole Herman Schumacher Elgesem <[email protected]>
Ticket: ENT-10699
Changelog: none
ENT-10699: Fixed windows acceptance test workflow
ENT-11765: Changed cf-execd's sleep behavior so it attempts to wake up at the beginning of every minute
We need to take care of the newly required checks in configure.ac
because we are responsible for producing config.h usable for both
us and libntech.

Ticket: CFE-4380
Changelog: File copying now uses more efficient implementation on
           Linux platforms
Copying should respect holes in sparse files, but if the original
file is not sparse, it's not a goal of the copy code to create a
sparse copy. So to test respecting holes in sparse files during
copying, we need to create the source files as sparse files.

Ticket: CFE-4380
Changelog: None
20.04 has an older version of valgrind that doesn't support the
`FICLONE` `ioctl()`.

Ticket: CFE-4380
Changelog: None
…ent_data_copying

Support libntech's new efficient file/data copying
There was an issue with 3.18.x version of this job which required this change.

Ticket: ENT-11771
Changelog: none
ENT-11771: Adjust windows acceptance test job workflow to use only C: partition
To make the windows acceptance workflow go faster I tested only one failing test.

This change wasn't noticed when committing the fix for using only C: partition.

Ticket: ENT-11771
Changelog: none
…talling msys2

msys2 is included in github windows images, e.g. https://github.com/actions/runner-images/tree/main/images/windows

Ticket: ENT-11771
Changelog: none
@cf-bottom
Copy link

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

@craigcomstock craigcomstock marked this pull request as draft May 24, 2024 14:58
@CLAassistant
Copy link

CLAassistant commented Jul 24, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ craigcomstock
✅ larsewi
❌ dependabot[bot]
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

10 participants