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

Pull in latest from Facebook #25

Merged
merged 189 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
189 commits
Select commit Hold shift + click to select a range
0456085
Fix lint fire on fbspec.rb
dafyddcrosby Apr 28, 2023
78d9eb5
fb_helpers: node.disruptable?, a method to define when a host can run…
joshuamiller01 Apr 28, 2023
3a90afc
fb_timers: refactor autostart handling for old systemd versions
joshuamiller01 May 1, 2023
8f90319
Support RHEL_Family in fbit_tmpclean cookbook
May 1, 2023
4b2b031
Support RHEL_Family in fb_chrony cookbook
May 1, 2023
6b12bc8
Support RHEL_Family in fb_fstab cookbook
May 1, 2023
9ef745c
Support RHEL_Family in fb_hosts cookbook
May 1, 2023
726049d
Support RHEL_Family in fb_limits cookbook
May 1, 2023
317bde7
Support RHEL_Family in fb_motd and fb_motd_settigns cookbooks
May 1, 2023
c737f35
Support RHEL_Family in fb_nsswitch cookbook
May 1, 2023
d74c386
Support RHEL_Family in fb_postfix cookbook
May 1, 2023
1940475
Support RHEL_Family in fb_profile cookbook
May 1, 2023
a8aa45e
Support RHEL_Family in fb_sysstat cookbook
May 1, 2023
21e1a11
Support RHEL_Family in fb_timer cookbook
May 1, 2023
b149ef6
Library functions, logic encoding raid disks, firmwares
May 2, 2023
3650020
fb_timers: manage timers directly through systemd rather than via nat…
joshuamiller01 May 2, 2023
45e9eae
fb_timers: CPU perf improvements via avoiding read-write loops and no…
joshuamiller01 May 2, 2023
a297ece
Add attribute to keep service alive
yee-unit May 3, 2023
2a8920d
fb_timers: fix require_relative path in libraries_spec to work in GH
joshuamiller01 May 3, 2023
e2f188a
Rollout fb_timers manage directly through systemd rather than via nat…
joshuamiller01 May 4, 2023
2528edf
Rollout fb_timers manage directly through systemd rather than via nat…
joshuamiller01 May 4, 2023
4af3177
Rollout fb_timers manage directly through systemd rather than via nat…
joshuamiller01 May 5, 2023
abf93e1
Rollout fb_timers manage directly through systemd rather than via nat…
joshuamiller01 May 8, 2023
a43f414
Rollout fb_timers manage directly through systemd rather than via nat…
joshuamiller01 May 8, 2023
152728b
Rollout fb_timers manage directly through systemd rather than via nat…
joshuamiller01 May 9, 2023
95b69df
Rollout fb_timers manage directly through systemd rather than via nat…
joshuamiller01 May 10, 2023
f69fe69
Pin c9 rsyslog version in image builds
May 10, 2023
9a5b077
Rollout fb_timers manage directly through systemd rather than via nat…
joshuamiller01 May 10, 2023
b35276e
Add disable PowerShell v2 feature
May 10, 2023
5ec6876
fb_helpers: include cookbook name in error message
davide125 May 10, 2023
4c4f02d
fb_grub: rework platform logic and add support for Fedora
davide125 May 10, 2023
3c08cea
New attribute search_enabled
May 12, 2023
a20e9ec
Remove deprecated allow_downgrade, correct version
May 12, 2023
821eaf1
Add whole disks instead of partitions in `devices_to_skip`
teknoraver May 16, 2023
b40e397
Remove Rubocop 0.55 shim
dafyddcrosby May 17, 2023
58bbbe8
Bump TargetChefVersion to 14.15.6
dafyddcrosby May 18, 2023
eca119d
fix wrong Chef/Meta/NoFileWrites warning
teknoraver May 18, 2023
a940d8d
Add helper function to check for arista os version
paqc5 May 22, 2023
a4e3a60
fb_fstab: stop setting up bpf mount point via fb_fstab
joshuamiller01 May 31, 2023
54065b2
Deal with stop_pending state on fluentbit
anotherjaymz Jun 1, 2023
18d346a
Allow mount point exclusions by regex
Jun 1, 2023
7b252fc
fb_systemd: add knob to control whether nspawn is installed
davide125 Jun 12, 2023
1e44fe6
Report to build dot file of cookbook dependencies
dafyddcrosby Jun 14, 2023
073e35c
fb_networking_settings/fb_fboss: helper+fix to make VLAN w/ networkd …
anitazha Jun 21, 2023
6e7a2a5
bump TargetRubyVersion to 2.5
dafyddcrosby Jun 23, 2023
f933c45
Delete fb_smartctl cookbook
mar-jac Jun 27, 2023
7cbfb03
Fix Rubocop lints
dafyddcrosby Jul 4, 2023
4e7e6e1
Cleanup uses of FB031
Jul 10, 2023
0f5330e
remove exclusion on Lint/BinaryOperatorWithIdenticalOperands
dafyddcrosby Jul 14, 2023
2ecede1
fb_syslog: add a knob to gate package managing and remove internal hack
davide125 Jul 14, 2023
4a3bccf
fb_helpers: make unit testing gated_template resource easier
joshuamiller01 Jul 17, 2023
43f95e7
fb_networkd: add unit tests for network, link, and netdev template re…
joshuamiller01 Jul 17, 2023
125d5dc
Get chef working for rhel 9
Jul 18, 2023
06352f5
fix(fb_modprobe, fb_systemd): updates to recipes for ubuntu jammy (#224)
PatrickDale Jul 19, 2023
e2ff147
Drop Ruby 2.4 CI test
dafyddcrosby Jul 25, 2023
75901a7
Add Ruby 2.7, 3.0, 3.1 CI tests
dafyddcrosby Jul 25, 2023
a8b18b7
bump to rubocop 1.25.1 and cookstyle 7.32.1
dafyddcrosby Jul 25, 2023
dd101d3
Change TargetChefVersion to 16.18.0
dafyddcrosby Jul 25, 2023
5cd7894
re-enable autocorrection on Lint/AmbiguousRegexpLiteral
dafyddcrosby Jul 26, 2023
52bcad1
fix core cookbooks
dafyddcrosby Jul 26, 2023
aad54d8
CPU perf improvements via avoiding read-write loops
dafyddcrosby Jul 27, 2023
08797d5
Turn off CommentSentenceSpacing for good
dafyddcrosby Jul 31, 2023
56404e9
fb_swap: when a label exists on a swap device, use that for the mount…
joshuamiller01 Aug 1, 2023
0b31992
fb_swap: prefer label as mount device for swap 1% -> 2%
joshuamiller01 Aug 1, 2023
0cba50c
fb_swap: prefer label as mount device for swap 2% -> 5%
joshuamiller01 Aug 1, 2023
4120802
fb_swap: prefer label as mount device for swap 5% -> 15%
joshuamiller01 Aug 2, 2023
69c8c45
fb_swap: prefer label as mount device for swap 15% -> 25%
joshuamiller01 Aug 2, 2023
a96480e
fb_swap: prefer label as mount device for swap 25% -> 40%
joshuamiller01 Aug 2, 2023
aa588fa
fb_swap: prefer label as mount device for swap 40% -> 60%
joshuamiller01 Aug 3, 2023
05c32f8
fb_networkd: add API to trigger notifications after networkd changes
joshuamiller01 Aug 3, 2023
f03ac7d
fb_swap: prefer label as mount device for swap 60% -> 80%
joshuamiller01 Aug 3, 2023
1099ab9
fb_swap: prefer label as mount device for swap 80% -> 100%
joshuamiller01 Aug 3, 2023
e65eeed
Explicitly disable some upstream cops
dafyddcrosby Aug 8, 2023
236ab71
Ratchet in more upstream lints
dafyddcrosby Aug 8, 2023
f869674
Disable lint FP
dafyddcrosby Aug 15, 2023
56b5304
Explicitly set pre-Chef 18 behaviour
dafyddcrosby Aug 15, 2023
4c557e9
Actions versions bumped to latest (#227)
dafyddcrosby Aug 21, 2023
25521f2
fb_smokeping: fix debian packages list (#219)
bwann Aug 22, 2023
f034ac9
Update CI to Chef 16, drop Ruby 2.5/2.6 support (#229)
dafyddcrosby Aug 25, 2023
f3af011
bump gems to 3.11 (#228)
dafyddcrosby Aug 30, 2023
4e01666
Enable basic macOS 14 Sonoma support
Aug 31, 2023
6baf374
fixes for antlir2
vmagro Aug 31, 2023
c746304
Back out "fixes for antlir2"
davide125 Sep 1, 2023
4e5669c
Chef Storage API: fix /dev/sdaa bug
maxxwizard Sep 14, 2023
e6320da
Update README.md (#231)
chantra Sep 20, 2023
ec34be9
Combine Cookstyle and Rubocop runs
dafyddcrosby Sep 20, 2023
8840563
manage /etc/stunnel in chef
vmagro Sep 21, 2023
9974b8f
Add :allow_clobber resource property to fb_powershell_module
Sep 25, 2023
9cfb6f3
WuFB - Adding Windows 11 Support, and => 22H2 to CPE
Oct 2, 2023
6d45c58
Clear out removal of fb_tmpreaper from /usr/bin/
mar-jac Oct 3, 2023
14db503
Memoize version casting + Windows Server/Desktop Distinction
Oct 4, 2023
d8d4c60
fb_powershell: Add feature to turn of pwsh telemtry
Oct 9, 2023
1032b11
if we find multiple swap partitions, tell us what they were
Oct 13, 2023
8d6c90f
Adopt fluent-bit name by default instead of td-agent-bit
Oct 19, 2023
337867f
fb_systemd: Don't call systemd-sysusers on older versions of systemd
Oct 20, 2023
453a3d1
fb_networkd: fix boot service ordering between udev, chef, network-on…
joshuamiller01 Oct 24, 2023
4ce0ced
fb_networkd: fix boot service ordering between udev, chef, network-on…
joshuamiller01 Oct 25, 2023
e830c9c
shipit-source-id: 96ee08d9a066e44d119817ac1db03e7a012f53d7
bigfootjon Oct 25, 2023
a879037
fbshipit-source-id: 96ee08d9a066e44d119817ac1db03e7a012f53d7
bigfootjon Oct 25, 2023
5c596f7
fb_networkd: fix boot service ordering to avoid races between udev, c…
joshuamiller01 Oct 24, 2023
626978b
fb_networkd: fix boot service ordering between udev, chef, network-on…
joshuamiller01 Oct 25, 2023
0b6e6d6
fb_networkd: fix boot service ordering between udev, chef, network-on…
joshuamiller01 Oct 25, 2023
912ddbd
fb_networkd: fix boot service ordering between udev, chef, network-on…
joshuamiller01 Oct 26, 2023
2ab53bf
support HyperNode provisioning on T5
Nov 2, 2023
dfcd3be
gpsd-clients -> gpsd-minimal-clients
pmazzini Nov 3, 2023
35fefd3
fb_network_scripts: add ability to configure system wide static defau…
joshuamiller01 Nov 9, 2023
d1b1a92
Cleanup homebrew from template
mar-jac Nov 15, 2023
83c704a
fb_systemd: make knob for mgmt of default target
joshuamiller01 Nov 29, 2023
3b9741a
Add proper support for USD on Artemis
Dec 6, 2023
30bb9ea
clean ntpchkng usages in opsfiles
leoleovich Dec 13, 2023
34d76b5
Move to overcommit.slice so it can see all the CPUs
Dec 13, 2023
350728c
Use dnf modularity only when needed
Dec 15, 2023
0f6aab9
fb_powershell_module: Use PowerShell exec for improved performance
Dec 21, 2023
e17c840
Report for cookbooks without recipes
dafyddcrosby Jan 2, 2024
0dec9d0
Enable Lint/Syntax
dafyddcrosby Jan 4, 2024
fc840bb
Add OEL 9 support to helpers, fbit_yum, fbit_repo
yee-unit Jan 5, 2024
bd500e3
Update node_methods for rpm_version and fb_slowroll for OEL9
yee-unit Jan 9, 2024
363bf82
Cleanup uses of FB031 (& 19,21,22,23,24,26)
Jan 13, 2024
613e802
Write datestamped profiles
dafyddcrosby Jan 17, 2024
2c9eab4
Mark ROU extra repos as antlir_extra_repo
Jan 26, 2024
6567b9a
Clean up manually a few of the rubocop / foodcritic exceptions
Jan 26, 2024
2db57f7
Apply the linter to remove all the foodcritic exemption for the ones …
Jan 26, 2024
916de38
Apply the linter to remove all the foodcritic exemption for the ones …
Jan 27, 2024
564dd0f
remove remaining core foodcritic annotations
dafyddcrosby Jan 29, 2024
65ec06e
Ratchet in Chef/Modernize/FoodcriticComments
dafyddcrosby Jan 31, 2024
9218cc5
fb_apt: Add ability to log output of `apt-get update` (#232)
adsr Feb 6, 2024
ceca0ed
fb_apt: correct multiline command proc for log_path to work
joshuamiller01 Feb 14, 2024
4306687
fb_iproute: ensure directory exists
davide125 Feb 22, 2024
3e25d03
fb_helpers: add helpers for new distro versions
davide125 Feb 22, 2024
5433642
fb_postfix: default to lmdb maps for el10 and later (#235)
davide125 Feb 23, 2024
e6d7e35
fb_logrotate: update rsyslog-logrotate removal logic for new versions
davide125 Feb 23, 2024
6e97aca
fb_systemd: add basic management for homed
davide125 Feb 28, 2024
e7b446b
fb_networkd: setup a way to stop and start services around a networkd…
joshuamiller01 Feb 28, 2024
344da65
fb_postfix: specify map type when rebuilding aliases too
davide125 Feb 29, 2024
7efa843
Shard out disabling `requires_enable` API (1%)
cooperlees Mar 6, 2024
f6816d7
Shard out disabling `requires_enable` API (2%)
cooperlees Mar 7, 2024
272061b
Shard out disabling `requires_enable` API (5%)
cooperlees Mar 7, 2024
96dc889
Shard out disabling `requires_enable` API (10%)
cooperlees Mar 8, 2024
c788f75
Shard out disabling `requires_enable` API (25%)
cooperlees Mar 11, 2024
a00f578
Shard out disabling `requires_enable` API (50%)
cooperlees Mar 12, 2024
e50ee35
Configure DNF on Arista EOS 4.31+
fabianishere Mar 12, 2024
8c586c6
Shard out disabling `requires_enable` API (75%)
cooperlees Mar 12, 2024
7a8b222
disable and remove `requires_enable` API
cooperlees Mar 12, 2024
76109bb
remove btrfs leaf size
Mar 18, 2024
5522a55
Remove some more fusionio bits
Mar 20, 2024
5960b3d
Stop trying to upgrade dnf on every chef run
epilatow Mar 20, 2024
7c455a2
Fix fb_systemd on hosts without networkd (#236)
jaymzh Mar 22, 2024
3ee3d06
Add 'disable_makecache' API
cooperlees Mar 25, 2024
2f830f4
memoize root_user/root_group methods
dafyddcrosby Mar 26, 2024
03ff688
Make the renable optional
cooperlees Mar 26, 2024
176ef30
fb_grub: support Fedora too for grub-install
davide125 Apr 5, 2024
a780272
Clean up mentions of tboot
u1f35c Apr 8, 2024
072b1a8
Setup slowroll for iptables-legacy
Apr 12, 2024
19ab77f
Exclude fedora from slowroll
Apr 12, 2024
3e3386a
Drop Fauxhai 6 code
dafyddcrosby Apr 15, 2024
84ecd11
Remove supermarket_push script (#237)
dafyddcrosby Apr 15, 2024
81c1737
Pair HyperNode partitions by partlabel for T5
Apr 15, 2024
3dfdb9f
Add profiling hooks
dafyddcrosby Apr 16, 2024
d81f5ca
Back out "'Exclude fedora from slowroll' and 'Setup slowroll for ipta…
Apr 18, 2024
b5406e6
Run NoOwnerGroupRoot on the entire codebase: core
Apr 19, 2024
e01ff12
fb_networkd/fb_networking_settings: extend support for multiple VLAN 1%
anitazha Apr 24, 2024
79bb1a3
expose is rhel 8.8 helper for later migration
Apr 25, 2024
110297b
Fix chocolatey.exe detection
May 3, 2024
d9c1d01
Ensure we rebuild dracut when changing /etc/fstab
May 15, 2024
63c6501
Remove over_provisioning_mapping from fb_storage
sjpark0605 May 17, 2024
3506390
Fix grammar in README
sjpark0605 May 17, 2024
61bcc51
Validate given IP addresses - 1%
joshuamiller01 May 22, 2024
46ccd8a
fb_networkd: Validate given IP addresses - 100%
joshuamiller01 May 22, 2024
59fa4c0
fb_networkd: extend validation logic to allow Address key to be a string
joshuamiller01 May 23, 2024
1b9ac4b
Update checkout GHA to avoid Node16 deprecation warnings (#239)
furan917 May 24, 2024
a2eb99b
Run NoOwnerGroupRoot on the entire codebase: github
May 28, 2024
32eaf4b
Fix all the uses of node.in_shard?(x) where x is a multiple of 5
May 28, 2024
9e171b3
Block homed from starting in presets, disable in Chef
Jun 3, 2024
26d8182
Enhance gated template to have content of changes
Jun 11, 2024
f41af66
Changes to support macOS 15
Jun 18, 2024
1eba098
special partition size handling for FBPN 01-005817, 01-005959
Jun 21, 2024
d6dd0cc
adding usage of DNF in Arista 4.30 and higher
Jul 2, 2024
0cfd81e
handle corrupt config
Jul 2, 2024
e478f19
Add splay to sysstat collection
Jul 3, 2024
66c88ad
Shard out disabling running during firstboot (provisioning)
cooperlees Jul 3, 2024
3a8fceb
Shard out disabling running during firstboot (provisioning) 1% -> 2%
cooperlees Jul 5, 2024
5ed0e3f
Shard out disabling running during firstboot (provisioning) 2% -> 5%
cooperlees Jul 8, 2024
f26148a
Shard out disabling running during firstboot (provisioning) 5% -> 15%
cooperlees Jul 8, 2024
3e68ebb
Shard out disabling running during firstboot (provisioning) 15% -> 25%
cooperlees Jul 8, 2024
24d06ef
Shard out disabling running during firstboot (provisioning) 25% -> 40%
cooperlees Jul 9, 2024
6807993
Shard out disabling running during firstboot (provisioning) 40% -> 60%
cooperlees Jul 9, 2024
16e1e79
Shard out disabling running during firstboot (provisioning) 60% -> 80%
cooperlees Jul 9, 2024
93b0328
Shard out disabling running during firstboot (provisioning) 80% -> 100%
cooperlees Jul 10, 2024
452a5bc
Merge remote-tracking branch 'origin/main' into HEAD
adsr Jul 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 88 additions & 6 deletions .cookstyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ AllCops:
# new cops and make upgrades easier (ie not dealing with a bunch of noise
# each Cookstyle update)
DisabledByDefault: true
TargetChefVersion: 13.10.0
TargetChefVersion: 16.18.0

# NOTE: this is also handled in regular RuboCop. T114949895
Lint/Syntax:
Enabled: true

Chef/Correctness/BlockGuardWithOnlyString:
Enabled: true
Expand All @@ -19,6 +23,8 @@ Chef/Correctness/DnfPackageAllowDowngrades:
Enabled: true
Chef/Correctness/IncorrectLibraryInjection:
Enabled: true
Chef/Correctness/InvalidCookbookName:
Enabled: true
Chef/Correctness/InvalidDefaultAction:
Enabled: true
Chef/Correctness/InvalidNotificationTiming:
Expand All @@ -43,8 +49,12 @@ Chef/Correctness/MacosUserdefaultsInvalidType:
Enabled: true
Chef/Correctness/MalformedPlatformValueForPlatformHelper:
Enabled: true
Chef/Correctness/MetadataMalformedDepends:
Enabled: true
Chef/Correctness/MetadataMissingName:
Enabled: true
Chef/Correctness/MetadataMissingVersion:
Enabled: true
Chef/Correctness/NodeNormal:
Enabled: true
Chef/Correctness/NodeNormalUnless:
Expand All @@ -55,6 +65,8 @@ Chef/Correctness/OctalModeAsString:
Enabled: true
Chef/Correctness/OpenSSLPasswordHelpers:
Enabled: true
Chef/Correctness/PowershellFileExists:
Enabled: true
Chef/Correctness/PowershellScriptDeleteFile:
Enabled: true
Chef/Correctness/ResourceSetsInternalProperties:
Expand Down Expand Up @@ -86,6 +98,8 @@ Chef/Deprecations/ChefSpecCoverageReport:
Enabled: true
Chef/Deprecations/ChefSpecLegacyRunner:
Enabled: true
Chef/Deprecations/ChefSugarHelpers:
Enabled: true
Chef/Deprecations/ChefWindowsPlatformHelper:
Enabled: true
Chef/Deprecations/Cheffile:
Expand All @@ -100,10 +114,18 @@ Chef/Deprecations/CookbookDependsOnPoise:
Enabled: true
Chef/Deprecations/CookbooksDependsOnSelf:
Enabled: true
Chef/Deprecations/DependsOnChefNginxCookbook:
Enabled: true
Chef/Deprecations/DependsOnChefReportingCookbook:
Enabled: true
Chef/Deprecations/DependsOnOmnibusUpdaterCookbook:
Enabled: true
Chef/Deprecations/DeprecatedPlatformMethods:
Enabled: true
Chef/Deprecations/DeprecatedShelloutMethods:
Enabled: true
Chef/Deprecations/DeprecatedSudoActions:
Enabled: true
Chef/Deprecations/DeprecatedWindowsVersionCheck:
Enabled: true
Chef/Deprecations/DeprecatedYumRepositoryProperties:
Expand All @@ -120,8 +142,12 @@ Chef/Deprecations/ExecutePathProperty:
Enabled: true
Chef/Deprecations/ExecuteRelativeCreatesWithoutCwd:
Enabled: true
Chef/Deprecations/FoodcriticFile:
Enabled: true
Chef/Deprecations/HWRPWithoutProvides:
Enabled: true
Chef/Deprecations/HWRPWithoutUnifiedTrue:
Enabled: true
Chef/Deprecations/IncludingXMLRubyRecipe:
Enabled: true
Chef/Deprecations/IncludingYumDNFCompatRecipe:
Expand All @@ -137,7 +163,7 @@ Chef/Deprecations/LibrarianChefSpec:
Chef/Deprecations/LocaleDeprecatedLcAllProperty:
Enabled: true
Chef/Deprecations/LogResourceNotifications:
Enabled: true
Enabled: false # TODO(T158851402) ratchet back in
Chef/Deprecations/MacosUserdefaultsGlobalProperty:
Enabled: true
Chef/Deprecations/NamePropertyWithDefaultValue:
Expand All @@ -156,6 +182,8 @@ Chef/Deprecations/PartialSearchHelperUsage:
Enabled: true
Chef/Deprecations/PoiseArchiveUsage:
Enabled: true
Chef/Deprecations/PolicyfileCommunitySource:
Enabled: true
Chef/Deprecations/PowershellCookbookHelpers:
Enabled: true
Chef/Deprecations/RequireRecipe:
Expand Down Expand Up @@ -201,6 +229,27 @@ Chef/Deprecations/WindowsTaskChangeAction:
Chef/Deprecations/WindowsVersionHelpers:
Enabled: true

# These cookbooks don't follow the Effortless Pattern
# See https://docs.chef.io/effortless/
Chef/Effortless/Berksfile:
Enabled: false
Chef/Effortless/ChefVaultUsed:
Enabled: false
Chef/Effortless/CookbookUsesDatabags:
Enabled: false
Chef/Effortless/CookbookUsesEnvironments:
Enabled: false
Chef/Effortless/CookbookUsesPolicygroups:
Enabled: false
Chef/Effortless/CookbookUsesRoles:
Enabled: false
Chef/Effortless/CookbookUsesSearch:
Enabled: false
Chef/Effortless/DependsChefVault:
Enabled: false
Chef/Effortless/SearchForEnvironmentsOrRoles:
Enabled: false

Chef/Modernize/ActionMethodInResource:
Enabled: true
Chef/Modernize/AllowedActionsFromInitialize:
Expand All @@ -217,10 +266,26 @@ Chef/Modernize/CustomResourceWithAttributes:
Enabled: true
Chef/Modernize/DatabagHelpers:
Enabled: true
Chef/Modernize/DeclareActionClass:
Enabled: true
Chef/Modernize/DefaultActionFromInitialize:
Enabled: true
Chef/Modernize/Definitions:
Enabled: true
Chef/Modernize/DependsOnChefVaultCookbook:
Enabled: true
Chef/Modernize/DependsOnChocolateyCookbooks:
Enabled: true
Chef/Modernize/DependsOnKernelModuleCookbook:
Enabled: true
Chef/Modernize/DependsOnLocaleCookbook:
Enabled: true
Chef/Modernize/DependsOnOpensslCookbook:
Enabled: true
Chef/Modernize/DependsOnTimezoneLwrpCookbook:
Enabled: true
Chef/Modernize/DependsOnWindowsFirewallCookbook:
Enabled: true
Chef/Modernize/DependsOnZypperCookbook:
Enabled: true
Chef/Modernize/DslIncludeInResource:
Expand All @@ -237,6 +302,8 @@ Chef/Modernize/ExecuteSysctl:
Enabled: true
Chef/Modernize/ExecuteTzUtil:
Enabled: true
Chef/Modernize/FoodcriticComments:
Enabled: true
Chef/Modernize/IfProvidesDefaultAction:
Enabled: true
Chef/Modernize/IncludingAptDefaultRecipe:
Expand Down Expand Up @@ -295,10 +362,16 @@ Chef/Modernize/SysctlParamResource:
Enabled: true
Chef/Modernize/UnnecessaryDependsChef14:
Enabled: true
Chef/Modernize/UnnecessaryDependsChef15:
Enabled: true
Chef/Modernize/UnnecessaryMixlibShelloutRequire:
Enabled: true
Chef/Modernize/UseBuildEssentialResource:
Enabled: true
Chef/Modernize/UseChefLanguageEnvHelpers:
Enabled: true
Chef/Modernize/UseChefLanguageSystemdHelper:
Enabled: true
Chef/Modernize/UseMultipackageInstalls:
Enabled: true
Chef/Modernize/UseRequireRelative:
Expand Down Expand Up @@ -361,25 +434,34 @@ Chef/RedundantCode/UnnecessaryNameProperty:
Chef/RedundantCode/UseCreateIfMissing:
Enabled: true

Chef/Security/SshPrivateKey:
Enabled: true

Chef/Sharing/DefaultMetadataMaintainer:
Enabled: true
Chef/Sharing/EmptyMetadataField:
Enabled: true
Chef/Sharing/IncludePropertyDescriptions:
Enabled: true
Enabled: false # TODO(T158836638) ratchet back in
Chef/Sharing/IncludeResourceDescriptions:
Enabled: true
Enabled: false # TODO(T158836638) ratchet back in
Chef/Sharing/IncludeResourceExamples:
Enabled: true
Enabled: false # TODO(T158836638) ratchet back in
Chef/Sharing/InsecureCookbookURL:
Enabled: true
Chef/Sharing/InvalidLicenseString:
Enabled: true

Chef/Style/AttributeKeys:
Enabled: true
Chef/Style/ChefWhaaat:
Enabled: false # Turned off intentionally, too opinionated/noisy
Chef/Style/CommentFormat:
Enabled: false # Turned off intentionally, too opinionated/noisy
Chef/Style/CommentSentenceSpacing:
Enabled: true
Enabled: false # Turned off intentionally, too opinionated/noisy
Chef/Style/CopyrightCommentFormat:
Enabled: false # Turned off intentionally, too opinionated/noisy
Chef/Style/DefaultCopyrightComments:
Enabled: true
Chef/Style/FileMode:
Expand Down
5 changes: 5 additions & 0 deletions .cookstyle_combined.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Combine the RuboCop and Cookstyle specific rules here (as opposed to directly
# including .rubocop.yml into .cookstyle.yml)
inherit_from:
- .rubocop.yml
- .cookstyle.yml
18 changes: 8 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [2.4, 2.5, 2.6]
ruby: ['2.7', '3.0', '3.1']
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
Expand All @@ -21,8 +21,6 @@ jobs:
run: bundle install
- name: Run rspec
run: ./scripts/run_chefspec
- name: Run rubocop
run: ./scripts/run_rubocop .rubocop.yml
- name: Run cookstyle
run: ./scripts/run_cookstyle
kitchen:
Expand All @@ -39,24 +37,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install Chef
uses: actionshub/chef-install@1.1.0
uses: actionshub/chef-install@2.0.4
with:
project: chef-workstation
version: 20.11.180
- name: Run Kitchen
uses: actionshub/test-kitchen@2.0.0
uses: actionshub/test-kitchen@2.1.0
with:
suite: default
os: ${{ matrix.os }}
env:
CHEF_LICENSE: accept-no-persist
CHEF_VERSION: 14.15.6
CHEF_VERSION: 16.18.0
shellcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Run Shellcheck
uses: ludeeus/action-shellcheck@0.3.0
uses: ludeeus/action-shellcheck@2.0.0
8 changes: 2 additions & 6 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AllCops:
DisabledByDefault: true
TargetRubyVersion: 2.4
TargetRubyVersion: 2.5
Exclude:
# template files named `rb` instead of `erb` are a sin against ruby-nature.
- '**/templates/**/*.rb'#
Expand Down Expand Up @@ -325,19 +325,15 @@ Lint/AmbiguousOperator:

Lint/AmbiguousRegexpLiteral:
Enabled: true
# TODO re-enable autocorrection on RuboCop >= v1.19 see https://github.com/rubocop/rubocop/issues/10002
AutoCorrect: false

Lint/AssignmentInCondition:
Enabled: true

Lint/BigDecimalNew:
Enabled: true

# TODO move exception to file after chef-workstation upgrade
Lint/BinaryOperatorWithIdenticalOperands:
Exclude:
- cookbooks/fb_helpers/spec/version_spec.rb
Enabled: true

Lint/BooleanSymbol:
Enabled: true
Expand Down
Loading
Loading