Skip to content

Conversation

victormlg
Copy link
Contributor

@victormlg victormlg commented Aug 27, 2025

@victormlg victormlg requested review from larsewi and jakub-nt August 27, 2025 11:20
Copy link
Contributor

@larsewi larsewi left a comment

Choose a reason for hiding this comment

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

Could you create an acceptance test using variablesmatching(). E.g., variablesmatching() on sys.time_based_dom should return a list of length 1 and the value should match ^Day[1-3][0-9]?$ Similarly classesmatching() should return list of length 1.

@larsewi
Copy link
Contributor

larsewi commented Aug 29, 2025

Please rebase with upstream master, now that libntech module is updated.

@victormlg victormlg force-pushed the sys_time_vars branch 2 times, most recently from 2ecf21f to 5e2c5cc Compare August 29, 2025 11:53
Ticket: CFE-4000
Signed-off-by: Victor Moene <[email protected]>
@larsewi
Copy link
Contributor

larsewi commented Aug 29, 2025

@cf-bottom Jenkins please :)

@cfengine cfengine deleted a comment from cf-bottom Aug 29, 2025
@cfengine cfengine deleted a comment from cf-bottom Aug 29, 2025
@cf-bottom
Copy link

Copy link
Contributor

@larsewi larsewi left a comment

Choose a reason for hiding this comment

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

19:10:11 scheduled-reports.c:686:35: error: initialization of ‘StringSet *’ from incompatible pointer type ‘StringMap *’ [-Wincompatible-pointer-types]
19:10:11   686 |         StringSet *time_classes = GetTimeClasses(time);
19:10:11       |                                   ^~~~~~~~~~~~~~

Looks like the GetTimeClasses() function is used in more places

@victormlg
Copy link
Contributor Author

19:10:11 scheduled-reports.c:686:35: error: initialization of ‘StringSet *’ from incompatible pointer type ‘StringMap *’ [-Wincompatible-pointer-types]
19:10:11   686 |         StringSet *time_classes = GetTimeClasses(time);
19:10:11       |                                   ^~~~~~~~~~~~~~

Looks like the GetTimeClasses() function is used in more places

Fix here https://github.com/cfengine/nova/pull/2448

@larsewi
Copy link
Contributor

larsewi commented Sep 2, 2025

Build Status

@larsewi
Copy link
Contributor

larsewi commented Sep 3, 2025

1:11:00 scheduled-reports.c: In function ‘ScheduledReportsExecutor’:
11:11:00 scheduled-reports.c:709:35: error: initialization of ‘StringMap *’ from incompatible pointer type ‘StringSet *’ [-Wincompatible-pointer-types]
11:11:00   709 |         StringMap *time_classes = StringMapToStringSet(GetTimeClasses(time), false);
11:11:00       |                                   ^~~~~~~~~~~~~~~~~~~~
11:11:00 scheduled-reports.c:713:58: error: passing argument 1 of ‘StringSetToBuffer’ from incompatible pointer type [-Wincompatible-pointer-types]
11:11:00   713 |             Buffer *time_classes_buf = StringSetToBuffer(time_classes, ',');
11:11:00       |                                                          ^~~~~~~~~~~~
11:11:00       |                                                          |
11:11:00       |                                                          StringMap *
11:11:00 In file included from /home/jenkins/workspace/testing-pr/label/PACKAGES_HUB_arm_64_linux_ubuntu_24/nova/../core/libpromises/eval_context.h:31,
11:11:00                  from scheduled-reports.c:5:
11:11:00 /home/jenkins/workspace/testing-pr/label/PACKAGES_HUB_arm_64_linux_ubuntu_24/nova/../core/libntech/libutils/set.h:142:38: note: expected ‘StringSet *’ but argument is of type ‘StringMap *’
11:11:00   142 | Buffer *StringSetToBuffer(StringSet *set, const char delimiter);
11:11:00       |                           ~~~~~~~~~~~^~~
11:11:00 scheduled-reports.c:730:30: error: passing argument 1 of ‘StringSetDestroy’ from incompatible pointer type [-Wincompatible-pointer-types]
11:11:00   730 |             StringSetDestroy(time_classes);
11:11:00       |                              ^~~~~~~~~~~~
11:11:00       |                              |
11:11:00       |                              StringMap *
11:11:00 /home/jenkins/workspace/testing-pr/label/PACKAGES_HUB_arm_64_linux_ubuntu_24/nova/../core/libntech/libutils/set.h:70:42: note: expected ‘StringSet *’ but argument is of type ‘StringMap *’
11:11:00    70 |     void Prefix##SetDestroy(Prefix##Set *set);                          \
11:11:00       |                                          ^
11:11:00 /home/jenkins/workspace/testing-pr/label/PACKAGES_HUB_arm_64_linux_ubuntu_24/nova/../core/libntech/libutils/set.h:138:1: note: in expansion of macro ‘TYPED_SET_DECLARE’
11:11:00   138 | TYPED_SET_DECLARE(String, char *)
11:11:00       | ^~~~~~~~~~~~~~~~~
11:11:00 scheduled-reports.c:735:37: error: passing argument 1 of ‘ResetExecutedSchedules’ from incompatible pointer type [-Wincompatible-pointer-types]
11:11:00   735 |         if (!ResetExecutedSchedules(time_classes, conn))
11:11:00       |                                     ^~~~~~~~~~~~
11:11:00       |                                     |
11:11:00       |                                     StringMap *
11:11:00 scheduled-reports.c:69:16: note: expected ‘StringSet *’ but argument is of type ‘StringMap *’
11:11:00    69 |     StringSet *time_classes, CFDB_Connection *conn)
11:11:00       |     ~~~~~~~~~~~^~~~~~~~~~~~
11:11:00 scheduled-reports.c:738:30: error: passing argument 1 of ‘StringSetDestroy’ from incompatible pointer type [-Wincompatible-pointer-types]
11:11:00   738 |             StringSetDestroy(time_classes);
11:11:00       |                              ^~~~~~~~~~~~
11:11:00       |                              |
11:11:00       |                              StringMap *
11:11:00 /home/jenkins/workspace/testing-pr/label/PACKAGES_HUB_arm_64_linux_ubuntu_24/nova/../core/libntech/libutils/set.h:70:42: note: expected ‘StringSet *’ but argument is of type ‘StringMap *’
11:11:00    70 |     void Prefix##SetDestroy(Prefix##Set *set);                          \
11:11:00       |                                          ^
11:11:00 /home/jenkins/workspace/testing-pr/label/PACKAGES_HUB_arm_64_linux_ubuntu_24/nova/../core/libntech/libutils/set.h:138:1: note: in expansion of macro ‘TYPED_SET_DECLARE’
11:11:00   138 | TYPED_SET_DECLARE(String, char *)
11:11:00       | ^~~~~~~~~~~~~~~~~
11:11:00 scheduled-reports.c:744:44: error: passing argument 1 of ‘CFDB_QueryPendingSchedulesList’ from incompatible pointer type [-Wincompatible-pointer-types]
11:11:00   744 |             CFDB_QueryPendingSchedulesList(time_classes, conn);
11:11:00       |                                            ^~~~~~~~~~~~
11:11:00       |                                            |
11:11:00       |                                            StringMap *
11:11:00 scheduled-reports.c:127:16: note: expected ‘StringSet *’ but argument is of type ‘StringMap *’
11:11:00   127 |     StringSet *time_classes, CFDB_Connection *conn)
11:11:00       |     ~~~~~~~~~~~^~~~~~~~~~~~
11:11:00 scheduled-reports.c:748:30: error: passing argument 1 of ‘StringSetDestroy’ from incompatible pointer type [-Wincompatible-pointer-types]
11:11:00   748 |             StringSetDestroy(time_classes);
11:11:00       |                              ^~~~~~~~~~~~
11:11:00       |                              |
11:11:00       |                              StringMap *
11:11:00 /home/jenkins/workspace/testing-pr/label/PACKAGES_HUB_arm_64_linux_ubuntu_24/nova/../core/libntech/libutils/set.h:70:42: note: expected ‘StringSet *’ but argument is of type ‘StringMap *’
11:11:00    70 |     void Prefix##SetDestroy(Prefix##Set *set);                          \
11:11:00       |                                          ^
11:11:00 /home/jenkins/workspace/testing-pr/label/PACKAGES_HUB_arm_64_linux_ubuntu_24/nova/../core/libntech/libutils/set.h:138:1: note: in expansion of macro ‘TYPED_SET_DECLARE’
11:11:00   138 | TYPED_SET_DECLARE(String, char *)
11:11:00       | ^~~~~~~~~~~~~~~~~
11:11:00 scheduled-reports.c:757:26: error: passing argument 1 of ‘StringSetDestroy’ from incompatible pointer type [-Wincompatible-pointer-types]
11:11:00   757 |         StringSetDestroy(time_classes);
11:11:00       |                          ^~~~~~~~~~~~
11:11:00       |                          |
11:11:00       |                          StringMap *
11:11:00 /home/jenkins/workspace/testing-pr/label/PACKAGES_HUB_arm_64_linux_ubuntu_24/nova/../core/libntech/libutils/set.h:70:42: note: expected ‘StringSet *’ but argument is of type ‘StringMap *’
11:11:00    70 |     void Prefix##SetDestroy(Prefix##Set *set);                          \
11:11:00       |                                          ^
11:11:00 /home/jenkins/workspace/testing-pr/label/PACKAGES_HUB_arm_64_linux_ubuntu_24/nova/../core/libntech/libutils/set.h:138:1: note: in expansion of macro ‘TYPED_SET_DECLARE’
11:11:00   138 | TYPED_SET_DECLARE(String, char *)
11:11:00       | ^~~~~~~~~~~~~~~~~
11:11:00 gmake[1]: *** [Makefile:680: scheduled-reports.o] Error 1

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.

3 participants