Skip to content

Commit 4b337eb

Browse files
authored
Merge branch 'main' into fix/test/fuzz-testing-fail
2 parents ec7a88a + 776e60f commit 4b337eb

File tree

652 files changed

+26381
-13247
lines changed

Some content is hidden

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

652 files changed

+26381
-13247
lines changed

.dmtlint.yaml

Lines changed: 0 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,4 @@
11
linters-settings:
2-
container:
3-
exclude-rules:
4-
liveness-probe:
5-
- kind: Deployment
6-
name: cdi-operator
7-
container: proxy
8-
- kind: Deployment
9-
name: cdi-operator
10-
namespace: d8-virtualization
11-
container: cdi-operator
12-
- kind: Deployment
13-
name: cdi-operator
14-
namespace: d8-virtualization
15-
container: proxy
16-
- kind: Deployment
17-
name: virtualization-api
18-
namespace: d8-virtualization
19-
container: virtualization-api
20-
- kind: Deployment
21-
name: virt-operator
22-
namespace: d8-virtualization
23-
container: virt-operator
24-
- kind: Deployment
25-
name: virtualization-controller
26-
namespace: d8-virtualization
27-
container: proxy
28-
- kind: Deployment
29-
name: virtualization-controller
30-
namespace: d8-virtualization
31-
container: virtualization-controller
32-
- kind: Deployment
33-
name: virtualization-controller
34-
namespace: d8-virtualization
35-
container: kube-rbac-proxy
36-
- kind: Deployment
37-
name: virt-operator
38-
namespace: d8-virtualization
39-
container: kube-rbac-proxy
40-
- kind: Deployment
41-
name: cdi-operator
42-
namespace: d8-virtualization
43-
container: kube-rbac-proxy
44-
- kind: Deployment
45-
name: dvcr
46-
namespace: d8-virtualization
47-
container: kube-rbac-proxy
48-
- kind: Deployment
49-
name: virt-operator
50-
namespace: d8-virtualization
51-
container: proxy
52-
readiness-probe:
53-
- kind: Deployment
54-
name: virtualization-controller
55-
namespace: d8-virtualization
56-
container: kube-rbac-proxy
57-
- kind: Deployment
58-
name: virt-operator
59-
namespace: d8-virtualization
60-
container: proxy
61-
- kind: Deployment
62-
name: cdi-operator
63-
namespace: d8-virtualization
64-
container: kube-rbac-proxy
65-
- kind: Deployment
66-
name: cdi-operator
67-
namespace: d8-virtualization
68-
container: cdi-operator
69-
- kind: Deployment
70-
name: virtualization-api
71-
namespace: d8-virtualization
72-
container: virtualization-api
73-
- kind: Deployment
74-
name: cdi-operator
75-
namespace: d8-virtualization
76-
container: proxy
77-
- kind: Deployment
78-
name: dvcr
79-
namespace: d8-virtualization
80-
container: kube-rbac-proxy
81-
- kind: Deployment
82-
name: virtualization-controller
83-
namespace: d8-virtualization
84-
container: virtualization-controller
85-
- kind: Deployment
86-
name: virtualization-controller
87-
namespace: d8-virtualization
88-
container: proxy
89-
- kind: Deployment
90-
name: virt-operator
91-
namespace: d8-virtualization
92-
container: kube-rbac-proxy
932
openapi:
943
exclude-rules:
954
enum:

.editorconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ indent_style = space
2424
;python pep8 indentation
2525
[*.py]
2626
indent_style = space
27-
indent_size = 4
27+
indent_size = 4
28+
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Copyright 2025 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: "Daily CVE tests"
16+
on:
17+
schedule:
18+
# Run at 2:00 every night (UTC).
19+
- cron: "0 02 * * *"
20+
workflow_dispatch:
21+
inputs:
22+
tag_type:
23+
type: choice
24+
description: Tag type
25+
required: false
26+
options:
27+
- release
28+
- dev
29+
tag_name:
30+
description: "release version in semver minor format (example: 1.68) or specified tag from dev registry"
31+
required: false
32+
33+
concurrency:
34+
group: cve-daily
35+
36+
jobs:
37+
cve_scan_daily:
38+
name: Trivy images check
39+
runs-on: [self-hosted, large]
40+
steps:
41+
- uses: actions/checkout@v4
42+
- uses: deckhouse/modules-actions/cve_scan@v5
43+
with:
44+
tag: ${{ github.event.inputs.tag_name || 'main' }}
45+
tag_type: ${{ github.event.inputs.tag_type }}
46+
module_name: ${{ vars.MODULE_NAME }}
47+
dd_url: ${{vars.DEFECTDOJO_HOST}}
48+
dd_token: ${{secrets.DEFECTDOJO_API_TOKEN}}
49+
prod_registry: ${{vars.TRIVY_REGISTRY}}
50+
prod_registry_user: ${{ secrets.PROD_READ_REGISTRY_USER }}
51+
prod_registry_password: ${{ secrets.PROD_READ_REGISTRY_PASSWORD }}
52+
dev_registry: ${{ vars.DEV_REGISTRY }}
53+
dev_registry_user: ${{ vars.DEV_MODULES_REGISTRY_LOGIN }}
54+
dev_registry_password: ${{ secrets.DEV_MODULES_REGISTRY_PASSWORD }}
55+
deckhouse_private_repo: ${{vars.DECKHOUSE_PRIVATE_REPO}}
56+
latest_releases_amount: 5

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ env:
2525
MODULES_MODULE_TAG: ${{ github.event.inputs.tag }}-dev
2626
SOURCE_REPO: "${{secrets.SOURCE_REPO}}"
2727
SOURCE_REPO_GIT: "${{secrets.SOURCE_REPO_GIT}}"
28-
GO_VERSION: "1.22.7"
28+
GO_VERSION: "1.24.5"
2929
MODULE_EDITION: "EE"
3030

3131
on:

.github/workflows/dev_module_build.yml

Lines changed: 48 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ env:
2121
MODULES_MODULE_SOURCE: ${{ vars.DEV_MODULE_SOURCE }}
2222
MODULES_REGISTRY_LOGIN: ${{ vars.DEV_MODULES_REGISTRY_LOGIN }}
2323
MODULES_REGISTRY_PASSWORD: ${{ secrets.DEV_MODULES_REGISTRY_PASSWORD }}
24-
GO_VERSION: "1.22.7"
24+
GO_VERSION: "1.24.5"
2525
GOLANGCI_LINT_VERSION: "1.64.8"
2626
SOURCE_REPO: "${{secrets.SOURCE_REPO}}"
2727
SOURCE_REPO_GIT: "${{secrets.SOURCE_REPO_GIT}}"
@@ -58,27 +58,58 @@ concurrency:
5858
jobs:
5959
set_vars:
6060
runs-on: ubuntu-latest
61-
name: Set MODULES_MODULE_TAG
61+
name: Get PR info and set vars
6262
outputs:
6363
modules_module_tag: ${{ steps.modules_module_tag.outputs.MODULES_MODULE_TAG }}
6464
module_edition: ${{ steps.modules_module_tag.outputs.MODULE_EDITION }}
6565
runner_type: ${{ steps.modules_module_tag.outputs.RUNNER_TYPE }}
66+
debug_component: ${{ steps.get-labels.outputs.debug_component }}
6667
steps:
6768
- name: Get Pull Request Labels
6869
id: get-labels
6970
uses: actions/github-script@v7
7071
with:
7172
script: |
73+
function processDelveLabels(labelList) {
74+
const delveLabels = labelList.filter(label => label.includes('delve'));
75+
76+
if (delveLabels.length === 0) {
77+
console.log("No delve labels found");
78+
return null;
79+
} else if (delveLabels.length === 1) {
80+
return delveLabels[0];
81+
} else {
82+
const errorMsg = "Error: Multiple delve labels found - " + delveLabels.join(', ');
83+
console.error(errorMsg);
84+
core.setFailed(errorMsg);
85+
return null;
86+
}
87+
}
88+
89+
let allLabels = [];
90+
let debug_component = '';
91+
7292
if (context.eventName === "pull_request" || context.eventName === "pull_request_target" ) {
73-
const prNumber = context.payload.pull_request.number;
74-
const { data: labels } = await github.rest.issues.listLabelsOnIssue({
75-
owner: context.repo.owner,
76-
repo: context.repo.repo,
77-
issue_number: prNumber,
78-
});
79-
return labels.map(label => label.name);
93+
let prNumber = context.payload.pull_request.number;
94+
try {
95+
let { data: labels } = await github.rest.issues.listLabelsOnIssue({
96+
owner: context.repo.owner,
97+
repo: context.repo.repo,
98+
issue_number: prNumber,
99+
});
100+
allLabels = labels.map(label => label.name);
101+
debug_component = processDelveLabels(allLabels);
102+
103+
// Set the outputs
104+
core.setOutput('debug_component', debug_component);
105+
core.setOutput('prLabels', allLabels);
106+
107+
} catch (error) {
108+
core.setFailed(`Script failed: ${error.message}`);
109+
}
80110
} else {
81-
return [];
111+
core.setOutput('debug_component', debug_component);
112+
core.setOutput('prLabels', allLabels);
82113
}
83114
result-encoding: string
84115

@@ -100,17 +131,17 @@ jobs:
100131
101132
echo "MODULES_MODULE_TAG=$MODULES_MODULE_TAG" >> "$GITHUB_OUTPUT"
102133
103-
# Slect edition for build, default EE
104-
if echo "${{ steps.get-labels.outputs.result }}" | grep -q "edition/ce"; then
134+
# Select edition for build, default EE
135+
if echo "${{ steps.get-labels.outputs.prLabels }}" | grep -q "edition/ce"; then
105136
echo "MODULE_EDITION=CE" >> $GITHUB_OUTPUT
106137
else
107138
echo "MODULE_EDITION=EE" >> "$GITHUB_OUTPUT"
108139
fi
109140
110141
# Select runner
111-
if echo "${{ steps.get-labels.outputs.result }}" | grep -q "build/github/ubuntu"; then
142+
if echo "${{ steps.get-labels.outputs.prLabels }}" | grep -q "build/github/ubuntu"; then
112143
echo "RUNNER_TYPE=[\"ubuntu-22.04\"]" >> "$GITHUB_OUTPUT"
113-
elif echo "${{ steps.get-labels.outputs.result }}" | grep -q "build/self-hosted/regular"; then
144+
elif echo "${{ steps.get-labels.outputs.prLabels }}" | grep -q "build/self-hosted/regular"; then
114145
echo "RUNNER_TYPE=[\"self-hosted\", \"regular\"]" >> "$GITHUB_OUTPUT"
115146
else
116147
echo "RUNNER_TYPE=[\"self-hosted\", \"large\"]" >> "$GITHUB_OUTPUT"
@@ -281,10 +312,6 @@ jobs:
281312
with:
282313
ref: ${{ github.event.pull_request.head.sha || github.sha }}
283314

284-
- name: Run test Python hooks
285-
run: |
286-
task hooks:test
287-
288315
- name: Run test GO hooks
289316
run: |
290317
task gohooks:test
@@ -302,6 +329,7 @@ jobs:
302329
MODULES_MODULE_TAG: ${{needs.set_vars.outputs.modules_module_tag}}
303330
MODULE_EDITION: ${{needs.set_vars.outputs.module_edition}}
304331
WERF_VIRTUAL_MERGE: 0
332+
DEBUG_COMPONENT: ${{needs.set_vars.outputs.component_debug}}
305333
steps:
306334
- name: Print vars
307335
run: |
@@ -311,6 +339,7 @@ jobs:
311339
echo MODULES_MODULE_SOURCE=$MODULES_MODULE_SOURCE
312340
echo MODULES_MODULE_TAG=$MODULES_MODULE_TAG
313341
echo MODULE_EDITION=$MODULE_EDITION
342+
echo DEBUG_COMPONENT=$DEBUG_COMPONENT
314343
315344
- uses: actions/checkout@v4
316345
with:
@@ -430,7 +459,7 @@ jobs:
430459
- dev_setup_build
431460
steps:
432461
- uses: actions/checkout@v4
433-
- uses: deckhouse/modules-actions/cve_scan@v3
462+
- uses: deckhouse/modules-actions/cve_scan@v5
434463
with:
435464
tag: ${{needs.set_vars.outputs.modules_module_tag}}
436465
module_name: ${{ vars.MODULE_NAME }}

.github/workflows/dev_validation.yaml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
name: Validations
1616

1717
env:
18-
GO_VERSION: "1.22.7"
19-
18+
GO_VERSION: "1.24.5"
2019
on:
2120
pull_request:
2221
types: [opened, synchronize, labeled, unlabeled]
@@ -159,9 +158,9 @@ jobs:
159158
matrix:
160159
# Define two groups of components with their respective Go versions
161160
components:
162-
- { component: virtualization-artifact, go-version: "1.23.9" }
163-
- { component: vm-route-forge, go-version: "1.23.9" }
164-
- { component: api, go-version: "1.22.7" }
161+
- { component: virtualization-artifact, go-version: "1.24.5" }
162+
- { component: vm-route-forge, go-version: "1.24.5" }
163+
- { component: api, go-version: "1.24.5" }
165164

166165
steps:
167166
- name: Set skip flag
@@ -240,12 +239,8 @@ jobs:
240239
export GOPATH=$(go env GOPATH)
241240
echo "GOPATH=$GOPATH" >> $GITHUB_ENV
242241
echo "Installing k8s tools..."
243-
go get k8s.io/[email protected]
244-
go install github.com/matryer/[email protected]
245-
246-
go install -mod=readonly sigs.k8s.io/controller-tools/cmd/[email protected]
247-
go install -mod=readonly k8s.io/kube-openapi/cmd/openapi-gen
248-
242+
go install tool
243+
249244
echo "Run generate"
250245
task generate
251246
# task controller:api:generate

.github/workflows/nightly_e2e_tests_main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ name: Nightly E2E tests(main)
1616

1717
env:
1818
CI_COMMIT_REF_NAME: ${{ github.ref_name }}
19-
GO_VERSION: "1.22.7"
19+
GO_VERSION: "1.24.5"
2020
TIMEOUT: "2h"
2121

2222
on:

.werf/consts.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Edition module settings
2+
{{- $_ := set . "MODULE_EDITION" (env "MODULE_EDITION" "EE") }}
3+
4+
# Component versions
5+
{{- $_ := set . "Firmware" dict -}}
6+
{{- $_ := set . "Package" dict -}}
7+
{{- $_ := set . "Core" dict -}}
8+
{{- $versions_path := "/build/components/versions.yml" -}}
9+
10+
{{- if .ModuleDir -}}
11+
{{- $versions_path = (printf "%s%s" (trimPrefix "/" .ModuleDir ) $versions_path) -}}
12+
{{- end -}}
13+
14+
{{- $versions_ctx := (.Files.Get $versions_path | fromYaml) -}}
15+
16+
{{- range $k, $v := $versions_ctx.firmware -}}
17+
{{- $_ := set $.Firmware $k $v -}}
18+
{{- end -}}
19+
20+
{{- range $k, $v := $versions_ctx.package -}}
21+
{{- $_ := set $.Package $k $v -}}
22+
{{- end -}}
23+
24+
{{- range $k, $v := $versions_ctx.core -}}
25+
{{- $_ := set $.Core $k $v -}}
26+
{{- end -}}

0 commit comments

Comments
 (0)