Skip to content
Snippets Groups Projects

Drop Cinc EOL warning

Merged Stan Hu requested to merge sh-drop-chef-eol-message into master
3 files
+ 21
30
Compare changes
  • Side-by-side
  • Inline
Files
3
  • 40b4a31d
    Drop Cinc EOL warning · 40b4a31d
    Stan Hu authored
    Previously users would see this warning at the end of a reconfigure:
    
    ```
    WARN: This release of Cinc Client became end of life (EOL) on May 1st 2024
    ```
    
    This warning started to show up on a May 1, 2024, but the admin has no
    control over what version of Cinc is used. Disable this warning since
    it doesn't provide any useful information.
    
    Changelog: changed
From bedef6179381d1c8c2b13bf4328e8197c9c49cde Mon Sep 17 00:00:00 2001
From: Clemens Beck <cbeck@gitlab.com>
Date: Tue, 2 May 2023 11:04:44 +0200
Subject: [PATCH] Version 17 EOL detection
---
lib/chef/client.rb | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/chef/client.rb b/lib/chef/client.rb
index 743b5ec473..d65f9fbae3 100644
--- a/lib/chef/client.rb
+++ b/lib/chef/client.rb
@@ -343,6 +343,12 @@ class Chef
# the year it goes EOL
eol_year = 2006 + Gem::Version.new(Chef::VERSION).segments.first
+ # Increment the EOL year of version 17, as it's support has been extended by one year.
+ # See: https://www.chef.io/blog/announcement-about-change-in-infra-client-17-end-of-life-timeline
+ if Gem::Version.new(Chef::VERSION).segments.first == 17
+ eol_year += 1
+ end
+
if Time.now > Time.new(eol_year, 5, 01)
logger.warn("This release of #{ChefUtils::Dist::Infra::PRODUCT} became end of life (EOL) on May 1st #{eol_year}. Please update to a supported release to receive new features, bug fixes, and security updates.")
end
--
2.40.1
Loading