Skip to content

Generate coverage for Simulator based integration tests & ui tests in github actions#7784

Merged
yadvr merged 3 commits into
apache:mainfrom
shapeblue:ci-coverage
Sep 11, 2023
Merged

Generate coverage for Simulator based integration tests & ui tests in github actions#7784
yadvr merged 3 commits into
apache:mainfrom
shapeblue:ci-coverage

Conversation

@vishesh92

@vishesh92 vishesh92 commented Jul 27, 2023

Copy link
Copy Markdown
Member

Description

This PR generates coverage for Simulator based integration tests in github actions workflow and uploads the report to codecov.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

@vishesh92 vishesh92 changed the title Generate coverage for Simulator based integration tests Generate coverage for Simulator based integration tests in github actions Jul 27, 2023
@codecov

codecov Bot commented Jul 27, 2023

Copy link
Copy Markdown

Codecov Report

Merging #7784 (fbf5dfc) into main (8db8aa4) will increase coverage by 15.85%.
Report is 61 commits behind head on main.
The diff coverage is n/a.

❗ Current head fbf5dfc differs from pull request most recent head c944865. Consider uploading reports for the commit c944865 to get more accurate results

@@              Coverage Diff              @@
##               main    #7784       +/-   ##
=============================================
+ Coverage     13.42%   29.27%   +15.85%     
- Complexity     9383    30265    +20882     
=============================================
  Files          2747     5098     +2351     
  Lines        258827   357598    +98771     
  Branches      40318    52212    +11894     
=============================================
+ Hits          34748   104703    +69955     
- Misses       219694   238360    +18666     
- Partials       4385    14535    +10150     
Flag Coverage Δ
simulator-marvin-tests 25.29% <ø> (?)
uitests 4.85% <ø> (?)
unit-tests 14.38% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 3628 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@vishesh92 vishesh92 requested a review from borisstoyanov July 27, 2023 12:40
@vishesh92 vishesh92 closed this Jul 27, 2023
@vishesh92 vishesh92 reopened this Jul 27, 2023
@vishesh92 vishesh92 closed this Jul 27, 2023
@vishesh92 vishesh92 reopened this Jul 27, 2023
@vishesh92 vishesh92 requested a review from DaanHoogland July 28, 2023 05:40
@vishesh92 vishesh92 changed the title Generate coverage for Simulator based integration tests in github actions Generate coverage for Simulator based integration tests & ui tests in github actions Jul 28, 2023
@vishesh92 vishesh92 marked this pull request as ready for review July 28, 2023 08:17
@vishesh92

Copy link
Copy Markdown
Member Author

I found these tests that are not included in the ci.yml's test matrix.

broken/maint
component/maint
component/test_acquire_specified_public_ip
component/test_advancedsg_networks
component/test_affinity_groups
component/test_base_image_updation
component/test_blocker_bugs
component/test_browse_templates
component/test_browse_templates2
component/test_browse_volumes
component/test_edgezone_supportedoperations
component/test_escalations_instances
component/test_haproxy
component/test_hypervisor_capabilities
component/test_implicit_planner
component/test_interop_xd_ccp
component/test_interpod_migration
component/test_ldap
component/test_migrate_vol_to_maintained_pool
component/test_multiple_nic_support
component/test_multiple_physical_network_creation
component/test_multiple_subnets_in_isolated_network
component/test_multiple_subnets_in_isolated_network_rvr
component/test_multiple_subnets_in_vpc
component/test_multiple_subnets_in_vpc_rvr
component/test_network_mtu
component/test_organization_states
component/test_portable_ip
component/test_ps_domain_limits
component/test_ps_limits
component/test_ps_project_limits
component/test_redundant_router_cleanups
component/test_redundant_router_services
component/test_redundant_router_upgrades
component/test_resource_count_running_vms
component/test_shared_networks
component/test_storage_motion
component/test_template_access_across_domains
component/test_volume_destroy_recover
component/test_vpc_network_internal_lbrules
component/test_vpc_vms_deployment
plugins/ldap
plugins/linstor
plugins/scaleio
plugins/test_quota
smoke/test_gateway_on_shared_networks
smoke/test_guest_os
smoke/test_host_control_state
smoke/test_human_readable_logs
smoke/test_list_ids_parameter#
smoke/test_nonstrict_affinity_group
smoke/test_vm_autoscaling
testpaths/testpath_custom_disk_offering
testpaths/testpath_netmask
testpaths/testpath_queryAsyncJobResult
testpaths/testpath_stopped_vm
testpaths/testpath_usage
testpaths/testpath_uuid_event

@DaanHoogland

Copy link
Copy Markdown
Contributor

I found these tests that are not included in the ci.yml's test matrix.

I would not include any effort on those in this PR @vishesh92 . Best would be to create a tracking issue to decide which ones to delete/fix/add.

@borisstoyanov borisstoyanov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DaanHoogland DaanHoogland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6626

@yadvr

yadvr commented Aug 3, 2023

Copy link
Copy Markdown
Member

@vishesh92 good work and proposed PR, we may need a different way to track this perhaps? All tests in smoke should be ideally run against simulator/ci.yml, but other tests arne't included as they fail or amount of effort to stablise them would be huge.

smoke/test_gateway_on_shared_networks
smoke/test_guest_os
smoke/test_host_control_state
smoke/test_human_readable_logs
smoke/test_list_ids_parameter#
smoke/test_nonstrict_affinity_group
smoke/test_vm_autoscaling

Comment thread .github/workflows/ci.yml
- name: Start CloudStack Management Server with Simulator
run: |
export MAVEN_OPTS="-Xmx4096m -XX:MaxPermSize=800m -Djava.security.egd=file:/dev/urandom"
export MAVEN_OPTS="-Xmx4096m -XX:MaxPermSize=800m -Djava.security.egd=file:/dev/urandom -javaagent:jacoco/lib/jacocoagent.jar=address=*,port=36320,output=tcpserver"

@yadvr yadvr Aug 3, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps we can experiment this with our smoketests against actual environment and gather/publish the jacoco file separately cc @vishesh92 @borisstoyanov @vladimirpetrov @kiranchavala @DaanHoogland - so we've a unit test coverage stats and functional/marvin test coverage stats (discuss - if you think, combined is also okay?)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rohityadavcloud We can get the coverage from Blue Orangutan jobs. I can do that as well, but I don't have much idea about the setup as of now. So, I will need some time to look into it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would certainly like to have them separately, but nobody dies if we don't.

@yadvr

yadvr commented Aug 14, 2023

Copy link
Copy Markdown
Member

@vishesh92 Does this handle reports from multiple jobs and aggregate them somewhoe; could you look into (when you're free/have time): https://about.codecov.io/blog/uploading-code-coverage-in-a-separate-job-on-github-actions/

@vishesh92

Copy link
Copy Markdown
Member Author

@rohityadavcloud As per my understanding, codecov groups the coverage by flags.

See uploaded files for this PR here: https://app.codecov.io/gh/apache/cloudstack/commit/c944865bd84a1fab86755bc164123c64291adce1

@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6797

@DaanHoogland DaanHoogland reopened this Aug 16, 2023
@yadvr yadvr added this to the 4.19.0.0 milestone Sep 11, 2023

@yadvr yadvr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - changes are in the github actions

@yadvr yadvr merged commit 3ec3007 into apache:main Sep 11, 2023
@yadvr yadvr deleted the ci-coverage branch September 11, 2023 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants