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

ENT-11771: Fix windows-acceptance job to run more tests #3

Closed
wants to merge 439 commits into from

Conversation

craigcomstock
Copy link
Owner

  • Add CodeQL workflow for GitHub code scanning
  • Added MakeParentDirectoryPerms()
  • Added fifo_file write access for cf-reactor
  • ENT-9605: Added setopt for cf-hub connecting to cf-serverd
  • Added condition to runalerts service to require stamp directory
  • Bumped .CFVERSION to 3.22.0
  • Adjust github workflows (ci) after 3.21.0 release
  • Added --help option to cf-support and aligned output with other components
  • Updated copyright notices to 2023
  • Attempt to fix build for CodeQL
  • Skipped after prepare step
  • Added dependencies
  • Changed bootstrap policy to preserve log level for debug, verbose, and info
  • Enabled install-time selinux policy compiling
  • cf-support: Aligned copyright notice with other places
  • Updated getusers() example to illustrate the filtering capabilities
  • Added needed selinux class lockdown for latest rhel-9 hosts
  • Fixed debug module expand logging for scalars
  • Fixed syntax description of validjson()
  • Add valgrind tests to github actions
  • move valgrind.sh to .github/workflows
  • Adjust cf-support for exotic/legacy POSIX systems
  • Added shellcheck cf-support to github actions
  • Fixed cf-support shellcheck check target
  • Started checking status of all cf- prefixed systemd services in cf-support
  • Fixed --with-libxml2=no case in configure.ac
  • Updated libntech submodule for autotools fix
  • Log msg now mentions filetype when changing perms
  • Included platform.h in evalfunction.c
  • Enabled expireafter attribute for custom promise modules
  • Expired agents now terminate custom promise modules
  • Added acceptance test for expireafter with commands promise
  • Adjust configure.ac to better recognize openssl with macos homebrew
  • Fixed unused variable warning in unix_iface.c
  • Fixed segfault caused by empty array in CMDB class specification
  • Created new policy function isreadable
  • Added acceptance test testing isreadable
  • Added isreadable policy example
  • Adjusted INSTALL instructions fo MacOS
  • Now prints problematic value when too many elements in CMDB class spec
  • Directories are now created with correct perms
  • ci: enable custom CodeQL queries
  • ci: codeql config fix
  • add missing workflow names
  • Added native core dump handling in cf-support for solaris
  • Bumped libntech submodule to master
  • validjson() no longer accepts trailing bogus data
  • Adjust cf-support for hpux mktemp command
  • Moved OS detection earlier in cf-support
  • test(static-check): adjust exclude folders list
  • ci: run static check on GitHub Actions
  • ci: run valgrind check on GitHub Actions
  • Fixed compiler warnings about unused variables
  • Fixed deprecated-non-prototype compiler warnings
  • Updated to latest libntech version
  • cf_remote_demo.sh: Commented out masterfiles deploy
  • cf_remote_demo.sh: Removed CentOS 6 and RHEL 6
  • cf_remote_demo.sh: Updated Debian 9 to Debian 10
  • cf_remote_demo.sh: Updated hub to Ubuntu 22
  • Updated links to bug tracker
  • Initialize the have_component array to zeroes/false in GetNameInfo3()
  • Add a couple more suppressions for cppcheck
  • Make TLSSetCipherList() more robust
  • Default Fedora release for static checks to 37
  • Added use of together action to do multi-repo workflows
  • Upgraded actions/checkout from v2 to v3
  • ci: update submodules with dependabot
  • Symlink rpmvercmp only when needed
  • Prevented cf-support from searching more than 1 level for core files
  • Bump libntech from b005906 to d39ee5e
  • Added classes and vars to cf-support
  • Upgraded together javascript action
  • Fixed workflow refs for push events
  • Added mctp_socket class to selinux policy
  • Make the new functions from Two new utility functions related to CMDB data processing NorthernTechHQ/libntech#181 available
  • Update install-masterfiles-stage.sh
  • Pull libntech into core
  • Variables & Classes Modules automatically tagged
  • Fixed test to pass with new default tag
  • Update libntech to master
  • Fixed misleading error message when adding CMDB classes
  • Added changelog for 3.22.0
  • 3.22 changelog: Review fixes
  • ChangeLog: Fixed inconsistent use of tabs and spaces
  • ChangeLog: Fixed inconsistent use of tabs and spaces
  • ChangeLog: Removed unnecessary newlines
  • ChangeLog: Corrected CFEngine capitalization
  • ChangeLog: Updated old changelog entries to match more recent ones
  • 3.0.2 changelog: removed irrelevant list of files
  • 3.0.2 changelog: Fixed style to match other entries
  • Bumped .CFVERSION number to 3.23.0
  • Improved syntax description for validjson()
  • Added test for with attribute being namespace aware
  • package[update]smatching now looks for software inventory databases
  • Removed LGTM banner that no longer works
  • Create SECURITY.md
  • Amend acceptance tests for testsuite to pass on Windows
  • Add .gitattributes file to mark all files as binary
  • GH Actions: add workflow to run acceptance test on Windows
  • Removed push event handling in github actions workflow
  • Define WITH_PCRE for libntech
  • Add a new small compatibility library
  • Create an AM conditional for having system getopt.h
  • Use xasprintf() instead of asprintf() in cf-testd.c
  • Avoid using xasprintf() with a non-literal format string
  • Switch together-javascript-action to main to avoid dependency update work
  • Added details about running in-source-directory and debugging with libtool
  • remove .gitattributes file
  • un-soft-fail passing tests
  • Convert win lineendings to Unix for tests which need it on Windows
  • Modified classesmatching() function to search parent bundles with inherit => true
  • Avoid using our getopt.h on systems that have their own
  • UPDATEME: Update to libntech with no GPL code
  • Soft failed isreadable() on aix and hpux
  • Bump libntech from 769e7f1 to 36c24bc
  • Added RvalWriteRaw function that doesn't escape quotes
  • Bump libntech from 36c24bc to 85fcb1b
  • Removed references to travis
  • Re-enabled passopenfile_test after migrating to github actions
  • Revert "Re-enabled passopenfile_test after migrating to github actions"
  • Bump libntech from 85fcb1b to b6245f1
  • Fix RlistEqual comparison on lists of different lengths
  • Added the function name to the result cache key
  • Moved asserts to top of EvalContextFunctionCache functions
  • Change suppress fail to soft fail on known failing tests
  • Bump libntech to master
  • Add missing #include's previously pulled in by libntech
  • Allow inheriting attributes using global variables in bodies having local parameters.
  • Do not #include libcrypto-compat
  • Bump libntech to latest master
  • Added selinux policy to allow cf-hub to initiate scheduled reports
  • Small suggestions from code review
  • Made cf-support use coredumpctl for core analysis only when configured in kerenl.core_pattern
  • Bump libntech from 49cd554 to 8545ebb
  • Modify all calls to WriterWriteHelp to adapt to API change
  • Use libntech to print help in cf-check
  • Updated links to libntech after move
  • Disable win-acceptance tests for now due to two issues
  • Improved locale override in masterfiles stage scripts
  • Updated source install instructions for RedHat/CentOS/Debian
  • Fixed two acceptance tests which could only run once before failing
  • Bump libntech from 8545ebb to 303bccb
  • Added version_compare() policy function
  • AUTHORS: Added Lars to list of authors
  • fix help text for cf-check
  • Formatted InitIgnoreInterfaces() with clang-format
  • Moved ignore_interfaces.rx to $(sys.workdir)
  • Added error message based on errno to InitIgnoreInterfaces()
  • Fixed infinite loop on error bug while reading interface exception file
  • Bump libntech from 303bccb to 469add7
  • Do not add our services to cfengine3.service.wants on enable
  • Skip failing tests on Debian 12
  • Allow CFEngine daemons to access to proc_security_t files
  • Allow cf-hub to request loading of the TLS kernel module
  • Add missing SELinux rules for httpd querying users
  • Various small SELinux fixes
  • Enable building platform-specific SELinux policies
  • Introduce RHEL 9 specific SELinux policy
  • Relax the condition for matching LMDB file in cf-check dump
  • Drop VerifyThatDatabaseIsNotCorrupt() on locks DB
  • Make RestoreLockDatabase() a non-static function
  • Only kill potential CFEngine lock holders
  • Fixed inventoried policy release id when masterfiles-stage.sh deploys with cfbs
  • Do aligned access to LMDB data in cf-check
  • Use CF_LOCKHORIZON to check whether to purge locks
  • Added acceptance test for IP-address classes
  • Added new platform-agnostic constant linesep
  • Added linesep to constants example
  • Added acceptance test for linesep constant
  • Add GetDBUsagePercentage() function
  • Make lock purging react to locks DB usage
  • Improve code quality of PurgeLocks()
  • Rotate almost full LMDB files in cf-check repair
  • Handle MDB_MAP_FULL
  • Add --test-write to cf-check repair
  • Show DB usage as part of DB status in cf-check diagnose
  • Fix a couple bad strncpy() calls
  • Use CURLOPT_PROTOCOLS_STR instead of CURLOPT_PROTOCOLS
  • Avoid string truncation and overflows on cf-monitord observables
  • Tell GCC in static checks to ignore enum-int-mismatch
  • Use Fedora 39 for static checks by default
  • Fallback to /usr/bin/getent when /bin/getent doesn't exist
  • Specify disk cache for the vagrant CI VMs in a supported way
  • Make sure libtool is always installed on vagrant CI machines
  • Install perl(IPC::Cmd) on the full-build vagrant CI VM
  • Added changelog for 3.23.0
  • cf_remote_demo.sh: Updated demo script with newer platforms
  • Fixed changing perms noise in no-noise sequential test
  • Bumped .CFVERSION number to 3.24.0
  • Use Ubuntu 22.04 for valgrind checks
  • Do OSSL_PROVIDER_unload() on the providers that we load
  • Migrate to PCRE2
  • Do not finalize things before printing digest in cf-key
  • Use the new Regex type for compiled regular expressions
  • Fix an off-by-one in the comment about ovector in FirstBackReference()
  • Adjusted static-check/run.sh to expose errors in create_image()
  • Added arglist argument to ArgSplitCommand function
  • Added arglist argument to cf_popensetuid()
  • The arglist attribute now preserves spaces in arguments
  • Added test checking that spaces are preserved by arglist
  • Fixed cf-support call to cf-promises to collect all classes and vars
  • Removed cifuzz job as we cannot update the external details
  • Allow httpd to run ps and get info about processes
  • More SELinux policy changes for httpd/php to run ps
  • Bump libntech from 1899478 to ddc25a6
  • Updated copyright headers to 2024
  • Fixed static-check job by forcing inclusion of config.h
  • Fixed a few problems found by cppcheck
  • Bump libntech from ddc25a6 to cc1540a
  • In configure.ac, force with-systemd-socket=no when with-systemd-service=no
  • Bump libntech from cc1540a to 8b72e12
  • CONTRIBUTING.md: Rephrased the wording on the type cast whitespace formatting
  • Add options to skip loading augments and host-specific data to cf-agent
  • Make sure the dbid enum starts at 0
  • Add explanation of possible return values of GetDBUsagePercentage()
  • API for testing local DBs
  • Add Python bindings for testing local DBs
  • Pass the actual simulation threads to pthread_join functions
  • The agent no longer warns when there are no actions in a files promise
  • Added new parser warning type -Wsanity-check
  • Added warning to parser on promises with no actions
  • Updated benchmark.cf to perform an action in order to slience warning
  • Fixed memory leak in PolicyFromJson
  • Fix condition for the simulation threads being started after a join attempt
  • Carefully handle symlinks at the last phase of VerifyFilePromise()
  • Remove commented out test for CFE-4148 which was rejected
  • Bump libntech from 8b72e12 to 61d6baa
  • Move vagrant-ci from CentOS 7 to CentOS 9 Stream
  • Fixed implicit declaration due to missing include
  • Adjusted INSTALL instructions for OpenBSD 7.4
  • Adjusted openssl ifdefs to support building on OpenBSD
  • Removed soft fail for brace support test in glob patterns
  • Removed soft fail for findfiles acceptance tests
  • Added test testing square brackets in glob patterns
  • Added include <glob_lib.h> where needed after moving GlobFileList()
  • findfiles.cf: Fixed wrong assumption acceptance test
  • Added #include<sequence.h> to getopt_test.c
  • Fixed incorrect sed command for cf-support filtering syslog output
  • Fixed bug related to backwards directory traversial in findfiles_up()
  • Reworked the acceptance test for findfiles_up()
  • Bumped libntech to master
  • Modified package promise default. If platform_default is present use that package module.
  • Added warning log message when OS is not recognized
  • Update BSD.md
  • Corrected typo in warning message s/Unkown/Unknown/
  • Added standard OS name & version variables for Amazon
  • Added instructions on building for NetBSD and OpenBSD
  • Add Arch to the list of OSes recognized by SysOSNameHuman
  • Core examples for simple small examples to files promise tyupe docs
  • Adjusted package module inventory to include quotes around fields when needed
  • Added sys.os_name_human for Alpine, postmarketOS, OpenBSD and NetBSD
  • Prevent systemctl from asking for password after installing unit files
  • Added container chroot agent materials to contrib
  • Bumped libntech to master
  • Bump libntech from 58705c5 to 412f6b3
  • Changed cf-apache systemd unit to reload configuration gracefully
  • Bump libntech version
  • GH Actions macOS: Fixed installation and PATH for libtool and autoconf
  • GH Actions macOS: Use brew --prefix to locate LMDB, OpenSSL, and pcre
  • README.md: Simplified hello world example
  • Nick added ./ in front of hello.cf
  • Drop cf-runalerts.service
  • Allow httpd to open tmp files
  • Adapt SELinux policy to cf-reactor running alerts periodically
  • Switch static checks to Fedora 40
  • Bump libntech from 28df3c4 to 329361a
  • Try to acquire file lock when closing DB
  • Changed cf-execd's sleep behavior so it attempts to wake up at the beginning of every minute
  • Improve and re-enable windows acceptance test workflow
  • Adjust expectations of windows acceptance tests
  • Support libntech's new efficient file/data copying
  • Adapt files_copy_test.c to efficient data/file copying in libntech
  • Run valgrind checks in GH actions on Ubuntu 22.04
  • Adjust windows-acceptance test to use C: partition
  • Fixed mistakenly committed test change

vpodzime and others added 30 commits August 21, 2023 08:48
…libntech-85fcb1b

Bump libntech from `36c24bc` to `85fcb1b`
Ticket: ENT-10447
Changelog: none
In travis this test didn't pass

Ticket: ENT-10447
Changelog: none
This reverts commit dbda08a.

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] <support@github.com>
…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 <lars.erik.wik@northern.tech>
Co-authored-by: Alexis Mousset <alexis.mousset@rudder.io>
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 <lars.erik.wik@northern.tech>
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 <alexis.mousset@rudder.io>
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] <support@github.com>
olehermanse and others added 26 commits April 25, 2024 15:48
Bump libntech and fix GH Actions failures
There's no need to try to introduce as much syntax as possible
in this example. Hello world can and should be simple.

Changelog: None
Ticket: None
Signed-off-by: Ole Herman Schumacher Elgesem <ole@northern.tech>
Co-authored-by: Nick Anderson <nick@cmdln.org>
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] <support@github.com>
…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 <ole@northern.tech>
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
@craigcomstock
Copy link
Owner Author

don't know what's up with this branch/PR, abandonding :)

@craigcomstock craigcomstock deleted the ENT-11771-2/master branch May 23, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants