Skip to content

Commit c352ebe

Browse files
authored
Merge branch 'main' into smoke_tests_cleanup
2 parents beb8c7e + 2542582 commit c352ebe

File tree

4,481 files changed

+164799
-51792
lines changed

Some content is hidden

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

4,481 files changed

+164799
-51792
lines changed

Diff for: .asf.yaml

+21-1
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,21 @@ github:
2727
- infrastructure
2828
- java
2929
- python
30-
- hosting
3130
- kvm
31+
- libvirt
3232
- vsphere
33+
- vmware
3334
- xenserver
3435
- xcp-ng
36+
- orchestration
37+
- virtualization
38+
- virtual-machine
39+
- kubernetes
3540

3641
features:
3742
wiki: true
3843
issues: true
44+
discussions: true
3945
projects: true
4046

4147
enabled_merge_buttons:
@@ -45,5 +51,19 @@ github:
4551

4652
collaborators:
4753
- acs-robot
54+
- rajujith
55+
- GaOrtiga
56+
- SadiJr
57+
- winterhazel
58+
- gpordeus
59+
- hsato03
60+
- bernardodemarco
61+
- abh1sar
4862

4963
protected_branches: ~
64+
65+
notifications:
66+
67+
68+
pullrequests: [email protected]
69+
discussions: [email protected]

Diff for: .github/linters/.flake8

+10-1
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,17 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18+
# E112 Expected an indented block
19+
# E113 Unexpected indentation
20+
# E133 Closing bracket is missing indentation
1821
# E223 Tab before operator
1922
# E224 Tab after operator
23+
# E227 Missing whitespace around bitwise or shift operator
2024
# E242 Tab after ','
2125
# E273 Tab after keyword
2226
# E274 Tab before keyword
27+
# E742 Do not define classes named 'I', 'O', or 'l'
28+
# E743 Do not define functions named 'I', 'O', or 'l'
2329
# E901 SyntaxError or IndentationError
2430
# E902 IOError
2531
# W291 Trailing whitespace
@@ -28,4 +34,7 @@
2834
# W391 Blank line at end of file
2935

3036
[flake8]
31-
select = E223,E224,E242,E273,E274,E901,E902,W291,W292,W293,W391
37+
exclude =
38+
.git,
39+
venv
40+
select = E112,E113,E133,E223,E224,E227,E242,E273,E274,E742,E743,E901,E902,W291,W292,W293,W391

Diff for: .github/linters/.markdown-lint.yml

+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
# MD001/heading-increment Heading levels should only increment by one level at a time
19+
MD001: false
20+
21+
# MD003/heading-style Heading style
22+
MD003: false
23+
24+
# MD004/ul-style Unordered list style
25+
MD004: false
26+
27+
# MD007/ul-indent Unordered list indentation
28+
MD007: false
29+
30+
# MD009/no-trailing-spaces Trailing spaces
31+
MD009: false
32+
33+
# MD010/no-hard-tabs Hard tabs
34+
MD010: false
35+
36+
# MD012/no-multiple-blanks Multiple consecutive blank lines
37+
MD012: false
38+
39+
# MD013/line-length Line length
40+
MD013: false
41+
42+
# MD014/commands-show-output Dollar signs used before commands without showing output
43+
MD014: false
44+
45+
# MD018/no-missing-space-atx No space after hash on atx style heading
46+
MD018: false
47+
48+
# MD019/no-multiple-space-atx Multiple spaces after hash on atx style heading
49+
MD019: false
50+
51+
# MD022/blanks-around-headings Headings should be surrounded by blank lines
52+
MD022: false
53+
54+
# MD023/heading-start-left Headings must start at the beginning of the line
55+
MD023: false
56+
57+
# MD024/no-duplicate-heading Multiple headings with the same content
58+
MD024: false
59+
60+
# MD025/single-title/single-h1 Multiple top-level headings in the same document
61+
MD025: false
62+
63+
# MD026/no-trailing-punctuation Trailing punctuation in heading
64+
MD026: false
65+
66+
# MD028/no-blanks-blockquote Blank line inside blockquote
67+
MD028: false
68+
69+
# MD029/ol-prefix Ordered list item prefix
70+
MD029: false
71+
72+
# MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines
73+
MD031: false
74+
75+
# MD032/blanks-around-lists Lists should be surrounded by blank lines
76+
MD032: false
77+
78+
# MD033/no-inline-html Inline HTML
79+
MD033: false
80+
81+
# MD034/no-bare-urls Bare URL used
82+
MD034: false
83+
84+
# MD036/no-emphasis-as-heading Emphasis used instead of a heading
85+
MD036: false
86+
87+
# MD037/no-space-in-emphasis Spaces inside emphasis markers
88+
MD037: false
89+
90+
# MD040/fenced-code-language Fenced code blocks should have a language specified
91+
MD040: false
92+
93+
# MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading
94+
MD041: false
95+
96+
# MD046/code-block-style Code block style
97+
MD046: false
98+
99+
# MD052/reference-links-images Reference links and images should use a label that is defined
100+
MD052: false

Diff for: .github/workflows/build.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,14 @@ concurrency:
2323
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
2424
cancel-in-progress: true
2525

26+
permissions:
27+
contents: read
28+
2629
jobs:
2730
build:
2831
runs-on: ubuntu-22.04
2932
steps:
30-
- uses: actions/checkout@v3
33+
- uses: actions/checkout@v4
3134

3235
- name: Set up JDK 11
3336
uses: actions/setup-java@v4
@@ -38,7 +41,7 @@ jobs:
3841
cache: maven
3942

4043
- name: Set up Python
41-
uses: actions/setup-python@v4
44+
uses: actions/setup-python@v5
4245
with:
4346
python-version: '3.8'
4447
architecture: 'x64'

Diff for: .github/workflows/ci.yml

+53-11
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ concurrency:
2323
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
2424
cancel-in-progress: true
2525

26+
permissions:
27+
contents: read
28+
2629
jobs:
2730
build:
2831
if: github.repository == 'apache/cloudstack'
@@ -51,6 +54,7 @@ jobs:
5154
smoke/test_deploy_vm_with_userdata
5255
smoke/test_deploy_vms_in_parallel
5356
smoke/test_deploy_vms_with_varied_deploymentplanners
57+
smoke/test_restore_vm
5458
smoke/test_diagnostics
5559
smoke/test_direct_download
5660
smoke/test_disk_offerings
@@ -59,7 +63,8 @@ jobs:
5963
smoke/test_domain_network_offerings
6064
smoke/test_domain_service_offerings
6165
smoke/test_domain_vpc_offerings",
62-
"smoke/test_dynamicroles
66+
"smoke/test_cluster_drs
67+
smoke/test_dynamicroles
6368
smoke/test_enable_account_settings_for_domain
6469
smoke/test_enable_role_based_users_in_projects
6570
smoke/test_events_resource
@@ -80,14 +85,16 @@ jobs:
8085
smoke/test_metrics_api
8186
smoke/test_migration
8287
smoke/test_multipleips_per_nic
83-
smoke/test_nested_virtualization",
88+
smoke/test_nested_virtualization
89+
smoke/test_set_sourcenat",
8490
"smoke/test_network
8591
smoke/test_network_acl
8692
smoke/test_network_ipv6
8793
smoke/test_network_permissions
8894
smoke/test_nic
8995
smoke/test_nic_adapter_type
9096
smoke/test_non_contigiousvlan
97+
smoke/test_object_stores
9198
smoke/test_outofbandmanagement
9299
smoke/test_outofbandmanagement_nestedplugin
93100
smoke/test_over_provisioning
@@ -106,7 +113,8 @@ jobs:
106113
smoke/test_reset_configuration_settings
107114
smoke/test_reset_vm_on_reboot
108115
smoke/test_resource_accounting
109-
smoke/test_resource_detail",
116+
smoke/test_resource_detail
117+
smoke/test_global_acls",
110118
"smoke/test_router_dhcphosts
111119
smoke/test_router_dns
112120
smoke/test_router_dnsservice
@@ -124,6 +132,7 @@ jobs:
124132
smoke/test_usage
125133
smoke/test_usage_events
126134
smoke/test_vm_deployment_planner
135+
smoke/test_vm_schedule
127136
smoke/test_vm_life_cycle
128137
smoke/test_vm_lifecycle_unmanage_import
129138
smoke/test_vm_snapshot_kvm
@@ -171,7 +180,8 @@ jobs:
171180
"component/test_project_usage
172181
component/test_protocol_number_security_group
173182
component/test_public_ip
174-
component/test_resource_limits",
183+
component/test_resource_limits
184+
component/test_resource_limit_tags",
175185
"component/test_regions_accounts
176186
component/test_routers
177187
component/test_snapshots
@@ -186,11 +196,20 @@ jobs:
186196
component/test_vpc_network
187197
component/test_vpc_offerings
188198
component/test_vpc_routers
189-
component/test_vpn_users",
190-
"component/test_vpc_network_lbrules" ]
199+
component/test_vpn_users
200+
component/test_vpc_network_lbrules",
201+
"smoke/test_list_accounts
202+
smoke/test_list_disk_offerings
203+
smoke/test_list_domains
204+
smoke/test_list_hosts
205+
smoke/test_list_service_offerings
206+
smoke/test_list_storage_pools
207+
smoke/test_list_volumes"]
191208

192209
steps:
193-
- uses: actions/checkout@v3
210+
- uses: actions/checkout@v4
211+
with:
212+
fetch-depth: 0
194213

195214
- name: Set up JDK
196215
uses: actions/setup-java@v4
@@ -201,7 +220,7 @@ jobs:
201220
cache: maven
202221

203222
- name: Set up Python
204-
uses: actions/setup-python@v4
223+
uses: actions/setup-python@v5
205224
with:
206225
python-version: '3.8'
207226
architecture: 'x64'
@@ -215,6 +234,11 @@ jobs:
215234
run: |
216235
python3 -m pip install --user --upgrade urllib3 lxml paramiko nose texttable ipmisim pyopenssl pycrypto mock flask netaddr pylint pycodestyle six astroid
217236
237+
- name: Install jacoco dependencies
238+
run: |
239+
wget https://github.com/jacoco/jacoco/releases/download/v0.8.10/jacoco-0.8.10.zip
240+
unzip jacoco-0.8.10.zip -d jacoco
241+
218242
- name: Env details
219243
run: |
220244
uname -a
@@ -247,16 +271,23 @@ jobs:
247271
mvn -q -Pdeveloper -pl developer -Ddeploydb
248272
mvn -q -Pdeveloper -pl developer -Ddeploydb-simulator
249273
274+
- name: Generate jacoco-coverage.sh
275+
run: |
276+
echo "java -jar jacoco/lib/jacococli.jar report jacoco-it.exec \\" > jacoco-report.sh
277+
find . | grep "target/classes" | sed 's/\/classes\//\/classes /g' | awk '{print "--classfiles", $1, "\\"}' | sort |uniq >> jacoco-report.sh
278+
find . | grep "src/main/java" | sed 's/\/java\//\/java /g' | awk '{print "--sourcefiles", $1, "\\"}' | sort | uniq >> jacoco-report.sh
279+
echo "--xml jacoco-coverage.xml" >> jacoco-report.sh
280+
250281
- name: Start CloudStack Management Server with Simulator
251282
run: |
252-
export MAVEN_OPTS="-Xmx4096m -XX:MaxPermSize=800m -Djava.security.egd=file:/dev/urandom"
283+
export MAVEN_OPTS="-Xmx4096m -XX:MaxPermSize=800m -Djava.security.egd=file:/dev/urandom -javaagent:jacoco/lib/jacocoagent.jar=address=*,port=36320,output=tcpserver"
253284
echo -e "\nStarting simulator"
254285
set +e
255286
mvn -Dsimulator -Dorg.eclipse.jetty.annotations.maxWait=120 -pl :cloud-client-ui jetty:run 2>&1 > /tmp/jetty-log || true &
256287
while ! nc -vzw 5 localhost 8096 2>&1 > /dev/null; do grep Exception /tmp/jetty-log; sleep 10; done
257288
set -e
258289
echo -e "\nStarting Advanced Zone DataCenter deployment"
259-
python3 tools/marvin/marvin/deployDataCenter.py -i setup/dev/advanced.cfg 2>&1 || true
290+
python3 tools/marvin/marvin/deployDataCenter.py -i setup/dev/advdualzone.cfg 2>&1 || true
260291
261292
- name: Run Integration Tests with Simulator
262293
run: |
@@ -269,14 +300,25 @@ jobs:
269300
TESTS=($(echo $TESTS | tr -d '\n' | tr -s ' '))
270301
for suite in "${TESTS[@]}" ; do
271302
echo -e "Currently running test: $suite\n"
272-
time nosetests-3.4 --with-xunit --xunit-file=integration-test-results/$suite.xml --with-marvin --marvin-config=setup/dev/advanced.cfg test/integration/$suite.py -s -a tags=advanced,required_hardware=false --zone=Sandbox-simulator --hypervisor=simulator || true ;
303+
time nosetests-3.4 --with-xunit --xunit-file=integration-test-results/$suite.xml --with-marvin --marvin-config=setup/dev/advdualzone.cfg test/integration/$suite.py -s -a tags=advanced,required_hardware=false --zone=zim1 --hypervisor=simulator || true ;
273304
done
274305
275306
echo -e "Stopping Simulator, integration tests run completed\n"
307+
java -jar jacoco/lib/jacococli.jar dump --address localhost --port 36320 --destfile jacoco-it.exec
308+
bash jacoco-report.sh
276309
mvn -Dsimulator -pl client jetty:stop 2>&1
277310
find /tmp//MarvinLogs -type f -exec echo -e "Printing marvin logs {} :\n" \; -exec cat {} \;
278311
279312
- name: Integration Tests Result
280313
run: |
281314
echo -e "Simulator CI Test Results: (only failures listed)\n"
282315
python3 ./tools/marvin/xunit-reader.py integration-test-results/
316+
317+
- uses: codecov/codecov-action@v4
318+
with:
319+
files: jacoco-coverage.xml
320+
fail_ci_if_error: true
321+
flags: simulator-marvin-tests
322+
verbose: true
323+
name: codecov
324+
token: ${{ secrets.CODECOV_TOKEN }}

Diff for: .github/workflows/codecov.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ jobs:
3232
name: codecov
3333
runs-on: ubuntu-22.04
3434
steps:
35-
- uses: actions/checkout@v3
35+
- uses: actions/checkout@v4
36+
with:
37+
fetch-depth: 0
3638

3739
- name: Set up JDK11
3840
uses: actions/setup-java@v4

Diff for: .github/workflows/docker-cloudstack-simulator.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- name: Set Docker repository name
4848
run: echo "DOCKER_REPOSITORY=apache" >> $GITHUB_ENV
4949

50-
- uses: actions/checkout@v3
50+
- uses: actions/checkout@v4
5151

5252
- name: Set ACS version
5353
run: echo "ACS_VERSION=$(grep '<version>' pom.xml | head -2 | tail -1 | cut -d'>' -f2 |cut -d'<' -f1)" >> $GITHUB_ENV

0 commit comments

Comments
 (0)