Skip to content

Commit cf3bff2

Browse files
Merge branch 'main' into pt-debug
Signed-off-by: Nikita Korolev <[email protected]>
2 parents 8845576 + edb1350 commit cf3bff2

File tree

375 files changed

+12750
-3170
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

375 files changed

+12750
-3170
lines changed

.github/scripts/prs_notifier.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ function getPullRequestGroup(reviews, requestedReviewers) {
212212
}
213213

214214
const submittedAt = new Date(review.submitted_at)
215-
submittedAt.setDate(submittedAt.getDate() + 1);
215+
submittedAt.setTime(submittedAt.getTime() + 1.5 * 24 * 60 * 60 * 1000); // submittedAt + 1.5 days.
216216
if (now.getDay() !== 1 && submittedAt < now) {
217217
return STUCK;
218218
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Copyright 2024 Flant JSC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Check Changelog entry
16+
17+
on:
18+
pull_request:
19+
types: [opened, synchronize, reopened, edited]
20+
21+
# Cancel in-progress jobs for the same PR (pull_request_target event) or for the same branch (push event).
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
24+
cancel-in-progress: true
25+
26+
jobs:
27+
changelog:
28+
name: Check Changelog entry
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout
32+
uses: actions/[email protected]
33+
- name: Check Changelog entry
34+
id: entry-check
35+
uses: deckhouse/[email protected]
36+
with:
37+
validate_only: true
38+
allowed_sections: |
39+
api
40+
vm
41+
vmop
42+
vmbda
43+
vmclass
44+
vmip
45+
vmipl
46+
vdsnapshot
47+
vmsnapshot
48+
vmrestore
49+
disks
50+
vd
51+
images
52+
vi
53+
cvi
54+
core
55+
api-service:low
56+
vm-route-forge:low
57+
kubevirt:low
58+
kube-api-rewriter:low
59+
cdi:low
60+
dvcr:low
61+
module
62+
observability
63+
ci:low
64+
docs
65+
network

.github/workflows/cve-weekly.yaml

Lines changed: 0 additions & 64 deletions
This file was deleted.

.github/workflows/dev_build_precache.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ jobs:
5757
- name: Remove unwanted software
5858
uses: ./.github/actions/remove-unwanted-software
5959

60-
- uses: deckhouse/modules-actions/setup@v1
60+
- uses: deckhouse/modules-actions/setup@v2
61+
with:
62+
registry: ${{ vars.DEV_REGISTRY }}
63+
registry_login: ${{ vars.DEV_MODULES_REGISTRY_LOGIN }}
64+
registry_password: ${{ secrets.DEV_MODULES_REGISTRY_PASSWORD }}
6165

62-
- uses: deckhouse/modules-actions/build@v1
66+
- uses: deckhouse/modules-actions/build@v2
67+
with:
68+
module_source: ${{ vars.DEV_MODULE_SOURCE}}
69+
module_name: ${{ vars.MODULE_NAME }}
70+
module_tag: "$MODULES_MODULE_TAG"

.github/workflows/dev_module_build-and-registration.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ concurrency:
5353

5454
jobs:
5555
deploy-dev:
56-
runs-on: [self-hosted, regular, selectel]
56+
runs-on: [self-hosted, large]
5757
name: Deploy dev
5858
steps:
5959
- name: PRINT VARS
@@ -81,8 +81,22 @@ jobs:
8181
- name: Checkout specified tag
8282
run: git checkout tags/${{ github.event.inputs.tag }}
8383

84-
- uses: deckhouse/modules-actions/setup@v1
84+
- uses: deckhouse/modules-actions/setup@v2
85+
with:
86+
registry: ${{ vars.DEV_REGISTRY }}
87+
registry_login: ${{ vars.DEV_MODULES_REGISTRY_LOGIN }}
88+
registry_password: ${{ secrets.DEV_MODULES_REGISTRY_PASSWORD }}
89+
8590
- if: ${{ github.event.inputs.enableBuild == 'true' }}
86-
uses: deckhouse/modules-actions/build@v1
91+
uses: deckhouse/modules-actions/build@v2
92+
with:
93+
module_source: "$MODULES_MODULE_SOURCE"
94+
module_name: ${{ vars.MODULE_NAME }}
95+
module_tag: "$MODULES_MODULE_TAG"
8796

88-
- uses: deckhouse/modules-actions/deploy@v1
97+
- uses: deckhouse/modules-actions/deploy@v2
98+
with:
99+
module_source: "$MODULES_MODULE_SOURCE"
100+
module_name: ${{ vars.MODULE_NAME }}
101+
module_tag: "$MODULES_MODULE_TAG"
102+
release_channel: ${{ github.event.inputs.version }}

.github/workflows/dev_module_build.yml

Lines changed: 90 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ env:
2222
MODULES_REGISTRY_LOGIN: ${{ vars.DEV_MODULES_REGISTRY_LOGIN }}
2323
MODULES_REGISTRY_PASSWORD: ${{ secrets.DEV_MODULES_REGISTRY_PASSWORD }}
2424
GO_VERSION: "1.22.7"
25+
GOLANGCI_LINT_VERSION: "1.64.8"
2526
SOURCE_REPO: "${{secrets.SOURCE_REPO}}"
2627

2728
on:
@@ -177,10 +178,85 @@ jobs:
177178
with:
178179
ref: ${{ github.event.pull_request.head.sha || github.sha }}
179180

180-
- name: Run lint virtualization-controller
181+
- name: Install golangci-lint
181182
run: |
182-
task virtualization-controller:init
183-
task virtualization-controller:lint:go
183+
echo "Installing golangci-lint..."
184+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v${{ env.GOLANGCI_LINT_VERSION}}
185+
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
186+
echo "golangci-lint v${{ env.GOLANGCI_LINT_VERSION}} installed successfully!"
187+
188+
- name: Lint all directories with golangci-lint
189+
id: linters
190+
# continue-on-error: true
191+
shell: bash
192+
run: |
193+
# Find directories containing .golangci.yaml
194+
mapfile -t config_dirs < <(find . -type f -name '.golangci.yaml' -printf '%h\0' | xargs -0 -n1 | sort -u)
195+
count=${#config_dirs[@]}
196+
echo "::notice title=Lint Setup::🔍 Found $count directories with linter configurations"
197+
198+
report=""
199+
error_count=0
200+
find_errors=0
201+
202+
for dir in "${config_dirs[@]}"; do
203+
# echo "::group::📂 Linting directory: $dir"
204+
# cd "$dir" || { echo "::error::Failed to access directory $dir"; exit 1; }
205+
206+
cd "$dir" || { echo "::error::Failed to access directory $dir"; continue; }
207+
208+
# Run linter with multiple formats
209+
210+
output=$(golangci-lint run --out-format=json 2>/dev/null | jq '{warning: .Report.Warnings, error: .Report.Error}' || true)
211+
find_errors=$(echo $output | jq '.error | select(.!=null)' | wc -l)
212+
213+
# Track errors
214+
if [ $find_errors -ne 0 ]; then
215+
error_count=$(( error_count + 1 ))
216+
echo "::group::📂 Linting directory ❌: $dir"
217+
else
218+
echo "::group::📂 Linting directory ✅: $dir"
219+
fi
220+
221+
report_out_warning=$(echo $output | jq '.warning')
222+
report_out_error=$(echo $output | jq '.error')
223+
224+
# Build report section
225+
report+="\n\n### Directory: $dir\n"
226+
report+="Find Errors: $find_errors\n"
227+
report+="Output:\n\`\`\`\n$report_out_warning\n$report_out_error\n\`\`\`\n"
228+
report+="---\n"
229+
230+
cd - &>/dev/null
231+
232+
if [ $find_errors -ne 0 ]; then
233+
echo -e "⚠️ Warnings:\n$report_out_warning"
234+
echo -e "❌ Errors:\n$report_out_error\n"
235+
else
236+
echo -e "✅ All check passed\n"
237+
fi
238+
239+
echo "::endgroup::"
240+
done
241+
242+
echo "directory_count=$count" >> "$GITHUB_OUTPUT"
243+
244+
has_errors=$( [[ "$error_count" -gt 0 ]] && echo true || echo false)
245+
echo "has_errors=$has_errors" >> "$GITHUB_OUTPUT"
246+
247+
if [ $error_count -gt 0 ]; then
248+
exit 1
249+
fi
250+
251+
- name: Final status check
252+
if: always()
253+
run: |
254+
if ${{ steps.linters.outputs.has_errors }}; then
255+
echo "::error::🔥 Lint errors found in $error_count directories. Check step 'Lint all directories with golangci-lint' for details."
256+
exit 1
257+
else
258+
echo "::notice::✅ All linters passed successfully in ${{ steps.linters.outputs.directory_count }} directories"
259+
fi
184260
185261
lint_yaml:
186262
runs-on: ubuntu-latest
@@ -252,7 +328,17 @@ jobs:
252328
if: ${{ !contains(needs.set_vars.outputs.runner_type, 'self-hosted') }}
253329
uses: ./.github/actions/remove-unwanted-software
254330

255-
- uses: deckhouse/modules-actions/setup@v1
331+
- uses: deckhouse/modules-actions/setup@v2
332+
with:
333+
registry: ${{ vars.DEV_REGISTRY }}
334+
registry_login: ${{ vars.DEV_MODULES_REGISTRY_LOGIN }}
335+
registry_password: ${{ secrets.DEV_MODULES_REGISTRY_PASSWORD }}
336+
337+
- uses: deckhouse/modules-actions/build@v2
338+
with:
339+
module_source: ${{ vars.DEV_MODULE_SOURCE}}
340+
module_name: ${{ vars.MODULE_NAME }}
341+
module_tag: "$MODULES_MODULE_TAG"
256342

257343
- name: Set git postBuffer 1048576000
258344
run: |

.github/workflows/dev_registry-cleanup.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ jobs:
3838
name: Run cleanup
3939
steps:
4040
- uses: actions/checkout@v4
41-
- uses: deckhouse/modules-actions/setup@v1
41+
- uses: deckhouse/modules-actions/setup@v2
42+
with:
43+
registry: ${{ vars.DEV_REGISTRY }}
44+
registry_login: ${{ vars.DEV_MODULES_REGISTRY_LOGIN }}
45+
registry_password: ${{ secrets.DEV_MODULES_REGISTRY_PASSWORD }}
4246

4347
- name: Cleanup
4448
run: |

0 commit comments

Comments
 (0)