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-3292: Removed soft fail related to the use of globs #5413

Merged
merged 9 commits into from
Feb 26, 2024

Conversation

larsewi
Copy link
Contributor

@larsewi larsewi commented Jan 4, 2024

Merge together:

TODO:

  • Manually test on Windows
  • Fix findfiles_up.cf acceptance test on windows

@larsewi larsewi force-pushed the win-glob-compat branch 3 times, most recently from e5b5a64 to 2148b93 Compare January 19, 2024 10:51
@cfengine cfengine deleted a comment from cf-bottom Jan 23, 2024
@larsewi larsewi changed the title CFE-3292: Removed soft fail for brace support in globs CFE-3292: Removed soft fail related to the use of globs Jan 23, 2024
@larsewi larsewi marked this pull request as ready for review January 23, 2024 08:36
@olehermanse
Copy link
Member

@cf-bottom jenkins, please

@cf-bottom
Copy link

@craigcomstock
Copy link
Contributor

Build Status

@craigcomstock
Copy link
Contributor

@cf-bottom jenkins with exotics (jenkins upgrade test and re-run of aborted CI due to upgrade)

@cf-bottom
Copy link

@craigcomstock
Copy link
Contributor

hpux failure

19:11:04 ERROR: glob_lib_test.c:394 Failure!

suse-15 errors are all jenkins upgrade related, lack of 'sys' group and such.

@larsewi
Copy link
Contributor Author

larsewi commented Feb 7, 2024

@cf-bottom, I tried to fix a bug on Windows, can I have a new build in Jenkins to test if it works?

@cf-bottom
Copy link

craigcomstock
craigcomstock previously approved these changes Feb 7, 2024
Copy link
Contributor

@craigcomstock craigcomstock left a comment

Choose a reason for hiding this comment

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

Cool.

tests/acceptance/01_vars/02_functions/findfiles.cf Outdated Show resolved Hide resolved
@larsewi larsewi force-pushed the win-glob-compat branch 5 times, most recently from 09b2237 to e84e8f4 Compare February 14, 2024 10:04
Ticket: CFE-3292
Changelog: None
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
@olehermanse
Copy link
Member

@cf-bottom Jenkins, please

@cf-bottom
Copy link

Ticket: None
Changelog: None
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
Previously the shell pattern `**` matched from one to six
subdirectories, while it should match any number of subdirectories from
zero. NorthernTechHQ/libntech#207 patrially
fixes this problem by making it match from zero to six subdirectories,
with a note to fix the limit (six) in CFE-4317. This fix caused this
acceptance test to break, as it now also include the test directory
itself (`"$(G.testdir)"`) in the actual result when testing the
`"$(G.testdir)/**"` shell pattern. It was easily fixed by modifying the
shell pattern to `"$(G.testdir)/*/**"`.

Ticket: None
Changelog: None
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
Before this dependency was indirectly included from `string_lib.c`. This
is no longer the case.

Signed-off-by: larsewi <lars.erik.wik@northern.tech>
@larsewi larsewi force-pushed the win-glob-compat branch 4 times, most recently from fffa0e8 to 66df370 Compare February 21, 2024 12:02
@craigcomstock
Copy link
Contributor

@cf-bottom jenkins please with exotics

@cf-bottom
Copy link

@larsewi larsewi force-pushed the win-glob-compat branch 2 times, most recently from 8ab44da to ea91b10 Compare February 22, 2024 14:11
@larsewi
Copy link
Contributor Author

larsewi commented Feb 22, 2024

@cf-bottom Jenkins with exotics please :)

@cf-bottom
Copy link

@larsewi
Copy link
Contributor Author

larsewi commented Feb 23, 2024

HP-UX failure looks like rsync failures. Sequential test is marked as unstable.

The backwards directory traversial in policy function findfiles_up() did
not work properly when using forward slashes in the path argument on
Windows. Fixed this issue by changing forward slashes to backslashes in
the path argument before performing the backwards traversial.

Ticket: None
Changelog: Fixed bug related to failing backwards directory traversial
           when using forward slashes in path argument of the
           findfiles_up() policy function on Windows.
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
Resolved acceptance test failure on Windows caused by invalid use of
regular expressions consisting of paths with backslashes. The paths were
triggering illegal escape sequence errors in PCRE2. Recognizing the
complexity of the existing test, I opted for a complete rewrite.
Additionally, I eliminated all dependencies to facilitate a standalone
file that can easily be run on Windows.

Ticket: None
Changelog: None
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
Ticket: None
Changelog: None
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
@larsewi
Copy link
Contributor Author

larsewi commented Feb 23, 2024

@cf-bottom Jenkins with exotics please :)

@cf-bottom
Copy link

@larsewi
Copy link
Contributor Author

larsewi commented Feb 26, 2024

HP-UX is flaky rsync errors, otherwise all green 💚

@larsewi larsewi merged commit bca1a81 into cfengine:master Feb 26, 2024
52 of 53 checks passed
craigcomstock pushed a commit to craigcomstock/core that referenced this pull request Jun 26, 2024
Ticket: None
Changelog: None
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
(cherry picked from commit a95b724)
@craigcomstock
Copy link
Contributor

cherry picked to 3.21.x
#5555

craigcomstock pushed a commit to craigcomstock/core that referenced this pull request Jul 24, 2024
Ticket: None
Changelog: None
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
(cherry picked from commit 2340098)
@larsewi larsewi deleted the win-glob-compat branch December 3, 2024 14:51
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.

4 participants