@cryptotaxi247 / netdata-1 / commits / 9868b90bd

Track LTS for Debian EOL status. (#18084)

Unlike most other platforms we support, it’s trivial for us to support Debian’s LTS distros, and we’ve effectively been doing that for quite some time now, so just make it official in the CI jobs.

Austin S. Hemmelgarn committed Jul 8, 2024 at 13:05 UTC 9868b90bd4e2c544b82ac6d6c38c0892c87803eb
4 files changed +15 -3
.github/data/distros.yml
+1
@@ -144,6 +144,7 @@ include:
144 notes: ''
145 base_image: debian:bookworm
146 eol_check: true
147 + eol_lts: true
148 bundle_sentry:
149 <<: *default_sentry
150 amd64: true
.github/scripts/gen-matrix-eol-check.py
+2 -1
@@ -21,7 +21,8 @@ for item in data['include']:
21 entries.append({
22 'distro': distro,
23 'release': item['version'],
24 - 'full_name': f'{ item["distro"] } { item["version"] }'
24 + 'full_name': f'{ item["distro"] } { item["version"] }',
25 + 'lts': 1 if 'eol_lts' in item and item['eol_lts'] else 0,
26 })
27
28 entries.sort(key=lambda k: (k['distro'], k['release']))
.github/scripts/platform-impending-eol.py
+11 -1
@@ -16,6 +16,7 @@ LEAD_DAYS = datetime.timedelta(days=30)
16
17 DISTRO = sys.argv[1]
18 RELEASE = sys.argv[2]
19 +LTS = sys.argv[3]
20
21 EXIT_NOT_IMPENDING = 0
22 EXIT_IMPENDING = 1
@@ -49,10 +50,19 @@ except urllib.error.HTTPError as e:
50
51 eol = datetime.date.fromisoformat(data['eol'])
52
53 +if LTS == '1' and 'extendedSupport' in data:
54 + datetime.date.fromisoformat(data['extendedSupport'])
55 +else:
56 + LTS = False
57 +
58 offset = abs(eol - NOW)
59
60 if offset <= LEAD_DAYS:
55 - print(data['eol'])
61 + if LTS:
62 + print(data['extendedSupport'])
63 + else:
64 + print(data['eol'])
65 +
66 sys.exit(EXIT_IMPENDING)
67 else:
68 sys.exit(EXIT_NOT_IMPENDING)
.github/workflows/platform-eol-check.yml
+1 -1
@@ -73,7 +73,7 @@ jobs:
73 id: check
74 shell: sh {0}
75 run: |
76 - d="$(.github/scripts/platform-impending-eol.py ${{ matrix.distro }} ${{ matrix.release }})"
76 + d="$(.github/scripts/platform-impending-eol.py ${{ matrix.distro }} ${{ matrix.release }}) ${{ matrix.lts }}"
77 case $? in
78 0) echo "pending=false" >> "${GITHUB_OUTPUT}" ;;
79 1)