Commit 4af5674
Fix ChefUtils migration PR
Summary:
It turns out there's a far cleaner way to do this migration. We can
reference ChefUtils.<function> directly from anywhere.
So, convert the only two callers in the codebase. Cannot yet remove
the proxy since callers are not all in the same cookbook and cookbook
uploads are not atomic. Next PR will remove the class. Then I'll update
my other PRs.
I tested this in Chef 16 and Chef 18, here's the 16 version for
reference:
```
[2026-06-02T14:23:36-07:00] INFO: *** Cinc Client 16.18.0 ***
CU-TEST:ATTRIBUTES
ChefUtils.rhel? false
[fb_helpers:rhel_family] rhel? false
[fb_helpers:rhel_family] node.rhel? false
CU-TEST:RECIPE
ChefUtils.rhel? false
rhel? false
[fb_helpers:rhel_family] node.rhel? false
ChefUtils.windows? false
windows? false
[fb_helpers:windows] node.windows? false
ChefUtils.debian? true
debian? true
[fb_helpers:debian] node.debian? true
CU-TEST:LIBRARY
ChefUtils.rhel? false
rhel? false
[fb_helpers:rhel_family] node.rhel? false
ChefUtils.windows? false
windows? false
[fb_helpers:windows] node.windows? false
ChefUtils.debian? true
debian? true
[fb_helpers:debian] node.debian? true
CU-TEST:FB_HELPERS_NODE_LIBRARY
ChefUtils.rhel? false
[fb_helpers:rhel_family] rhel? false
[fb_helpers:rhel_family] node.rhel? false
ChefUtils.windows? false
[fb_helpers:windows] windows? false
[fb_helpers:windows] node.windows? false
ChefUtils.debian? true
[fb_helpers:debian] debian? true
[fb_helpers:debian] node.debian? true
CU-TEST:TEMPLATE
ChefUtils.rhel? false
rhel? <cannot be called from a template>
[fb_helpers:rhel_family] node.rhel? false
ChefUtils.windows? false
windows? <cannot be called from a template>
[fb_helpers:windows] node.windows? false
ChefUtils.debian? true
debian? <cannot be called from a template>
[fb_helpers:debian] node.windows? true
```
Signed-off-by: Phil Dibowitz <phil@ipom.com>
X-link: facebook/chef-cookbooks#376
Reviewed By: dafyddcrosby
Differential Revision: D107317380
Pulled By: davide125
fbshipit-source-id: 9195316c9e29d9b5064cca436e8ac0777a5670981 parent 1308537 commit 4af5674
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1346 | 1346 | | |
1347 | 1347 | | |
1348 | 1348 | | |
1349 | | - | |
| 1349 | + | |
1350 | 1350 | | |
1351 | 1351 | | |
1352 | 1352 | | |
1353 | 1353 | | |
1354 | 1354 | | |
1355 | 1355 | | |
1356 | 1356 | | |
1357 | | - | |
| 1357 | + | |
1358 | 1358 | | |
1359 | 1359 | | |
1360 | 1360 | | |
| |||
0 commit comments