fleet icon indicating copy to clipboard operation
fleet copied to clipboard

Feature branch for CP Exclude Labels

Open mna opened this issue 1 year ago • 2 comments

Feature branch for this story: #17315

mna avatar Jun 26 '24 14:06 mna

CI failure is this, unrelated and seems to be a new ~flaky test I think:

=== RUN   TestUpdateStatsOnReplica
2024-06-26T15:10:05.8959056Z {"instanceID":"TestIntegrationsMDM","level":"debug","msg":"done, tick received","schedule":"integrations"}
2024-06-26T15:10:05.8959714Z {"details":"select cron stats: sql: database is closed","err":"get cron stats","instanceID":"TestIntegrationsMDM","level":"error","schedule":"integrations"}
2024-06-26T15:10:05.8960363Z {"instanceID":"TestIntegrationsMDM","level":"debug","msg":"59.994044163s remaining until next tick","schedule":"integrations"}
2024-06-26T15:10:05.8970904Z     testing_utils.go:435: create replica attempt: 1 replica status: map[Auto_Position:0 Channel_Name: Connect_Retry:60 Exec_Master_Log_Pos:46817216 Executed_Gtid_Set: Last_Errno:1146 Last_Error:Error executing row event: 'Table 'server_vulnerabilities_oval_TestOvalAnalyzer_func1.software_cve' doesn't exist' Last_IO_Errno:0 Last_IO_Error: Last_IO_Error_Timestamp: Last_SQL_Errno:1146 Last_SQL_Error:Error executing row event: 'Table 'server_vulnerabilities_oval_TestOvalAnalyzer_func1.software_cve' doesn't exist' Last_SQL_Error_Timestamp:240626 15:09:02 Master_Bind: Master_Host:mysql_test Master_Info_File:/tmpfs/master.info Master_Log_File:bin.000003 Master_Port:3306 Master_Retry_Count:86400 Master_SSL_Allowed:No Master_SSL_CA_File: Master_SSL_CA_Path: Master_SSL_Cert: Master_SSL_Cipher: Master_SSL_Crl: Master_SSL_Crlpath: Master_SSL_Key: Master_SSL_Verify_Server_Cert:No Master_Server_Id:1 Master_TLS_Version: Master_UUID:5d962626-33cc-11ef-a4ae-0242ac120009 Master_User:replicator Read_Master_Log_Pos:47077395 Relay_Log_File:af9db0b678b8-relay-bin.000002 Relay_Log_Pos:314 Relay_Log_Space:260707 Relay_Master_Log_File:bin.000003 Replicate_Do_DB: Replicate_Do_Table: Replicate_Ignore_DB: Replicate_Ignore_Server_Ids: Replicate_Ignore_Table: Replicate_Rewrite_DB: Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table: Retrieved_Gtid_Set: SQL_Delay:0 SQL_Remaining_Delay:<nil> Seconds_Behind_Master:<nil> Skip_Counter:0 Slave_IO_Running:Yes Slave_IO_State:Waiting for master to send event Slave_SQL_Running:No Slave_SQL_Running_State: Until_Condition:None Until_Log_File: Until_Log_Pos:0]
2024-06-26T15:10:05.8972665Z     testing_utils.go:437: replica not running after attempt 1; Last_Error: Error executing row event: 'Table 'server_vulnerabilities_oval_TestOvalAnalyzer_func1.software_cve' doesn't exist'
2024-06-26T15:10:05.8984180Z     testing_utils.go:435: create replica attempt: 2 replica status: map[Auto_Position:0 Channel_Name: Connect_Retry:60 Exec_Master_Log_Pos:47739133 Executed_Gtid_Set: Last_Errno:1146 Last_Error:Error executing row event: 'Table 'server_vulnerabilities_oval_TestOvalAnalyzer_func1.software_cpe' doesn't exist' Last_IO_Errno:0 Last_IO_Error: Last_IO_Error_Timestamp: Last_SQL_Errno:1146 Last_SQL_Error:Error executing row event: 'Table 'server_vulnerabilities_oval_TestOvalAnalyzer_func1.software_cpe' doesn't exist' Last_SQL_Error_Timestamp:240626 15:09:05 Master_Bind: Master_Host:mysql_test Master_Info_File:/tmpfs/master.info Master_Log_File:bin.000003 Master_Port:3306 Master_Retry_Count:86400 Master_SSL_Allowed:No Master_SSL_CA_File: Master_SSL_CA_Path: Master_SSL_Cert: Master_SSL_Cipher: Master_SSL_Crl: Master_SSL_Crlpath: Master_SSL_Key: Master_SSL_Verify_Server_Cert:No Master_Server_Id:1 Master_TLS_Version: Master_UUID:5d962626-33cc-11ef-a4ae-0242ac120009 Master_User:replicator Read_Master_Log_Pos:47778642 Relay_Log_File:af9db0b678b8-relay-bin.000002 Relay_Log_Pos:314 Relay_Log_Space:40037 Relay_Master_Log_File:bin.000003 Replicate_Do_DB: Replicate_Do_Table: Replicate_Ignore_DB: Replicate_Ignore_Server_Ids: Replicate_Ignore_Table: Replicate_Rewrite_DB: Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table: Retrieved_Gtid_Set: SQL_Delay:0 SQL_Remaining_Delay:<nil> Seconds_Behind_Master:<nil> Skip_Counter:0 Slave_IO_Running:Yes Slave_IO_State:Waiting for master to send event Slave_SQL_Running:No Slave_SQL_Running_State: Until_Condition:None Until_Log_File: Until_Log_Pos:0]
2024-06-26T15:10:05.8985840Z     testing_utils.go:437: replica not running after attempt 2; Last_Error: Error executing row event: 'Table 'server_vulnerabilities_oval_TestOvalAnalyzer_func1.software_cpe' doesn't exist'
2024-06-26T15:10:05.8997580Z     testing_utils.go:435: create replica attempt: 3 replica status: map[Auto_Position:0 Channel_Name: Connect_Retry:60 Exec_Master_Log_Pos:48022250 Executed_Gtid_Set: Last_Errno:1146 Last_Error:Error executing row event: 'Table 'server_vulnerabilities_oval_TestOvalAnalyzer_func1.software_cve' doesn't exist' Last_IO_Errno:0 Last_IO_Error: Last_IO_Error_Timestamp: Last_SQL_Errno:1146 Last_SQL_Error:Error executing row event: 'Table 'server_vulnerabilities_oval_TestOvalAnalyzer_func1.software_cve' doesn't exist' Last_SQL_Error_Timestamp:240626 15:09:07 Master_Bind: Master_Host:mysql_test Master_Info_File:/tmpfs/master.info Master_Log_File:bin.000003 Master_Port:3306 Master_Retry_Count:86400 Master_SSL_Allowed:No Master_SSL_CA_File: Master_SSL_CA_Path: Master_SSL_Cert: Master_SSL_Cipher: Master_SSL_Crl: Master_SSL_Crlpath: Master_SSL_Key: Master_SSL_Verify_Server_Cert:No Master_Server_Id:1 Master_TLS_Version: Master_UUID:5d962626-33cc-11ef-a4ae-0242ac120009 Master_User:replicator Read_Master_Log_Pos:48281611 Relay_Log_File:af9db0b678b8-relay-bin.000002 Relay_Log_Pos:314 Relay_Log_Space:259889 Relay_Master_Log_File:bin.000003 Replicate_Do_DB: Replicate_Do_Table: Replicate_Ignore_DB: Replicate_Ignore_Server_Ids: Replicate_Ignore_Table: Replicate_Rewrite_DB: Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table: Retrieved_Gtid_Set: SQL_Delay:0 SQL_Remaining_Delay:<nil> Seconds_Behind_Master:<nil> Skip_Counter:0 Slave_IO_Running:Yes Slave_IO_State:Waiting for master to send event Slave_SQL_Running:No Slave_SQL_Running_State: Until_Condition:None Until_Log_File: Until_Log_Pos:0]
2024-06-26T15:10:05.8999087Z     testing_utils.go:437: replica not running after attempt 3; Last_Error: Error executing row event: 'Table 'server_vulnerabilities_oval_TestOvalAnalyzer_func1.software_cve' doesn't exist'
2024-06-26T15:10:05.8999428Z     service_campaign_test.go:364: Timeout waiting for aggregated stats
2024-06-26T15:10:05.8999842Z panic: runtime error: invalid memory address or nil pointer dereference
2024-06-26T15:10:05.9000374Z [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1bc28c7]
2024-06-26T15:10:05.9000394Z 
2024-06-26T15:10:05.9000568Z goroutine 366907 [running]:
2024-06-26T15:10:05.9000853Z github.com/fleetdm/fleet/v4/server/service.testUpdateStats.func3()
2024-06-26T15:10:05.9001212Z 	/home/runner/work/fleet/fleet/server/service/service_campaign_test.go:351 +0x1e7
2024-06-26T15:10:05.9002040Z created by github.com/fleetdm/fleet/v4/server/service.testUpdateStats in goroutine 366460
2024-06-26T15:10:05.9002597Z 	/home/runner/work/fleet/fleet/server/service/service_campaign_test.go:348 +0x1835
2024-06-26T15:10:05.9002902Z FAIL	github.com/fleetdm/fleet/v4/server/service	335.635s

mna avatar Jun 26 '24 15:06 mna

Codecov Report

Attention: Patch coverage is 74.74048% with 146 lines in your changes missing coverage. Please review.

Project coverage is 55.28%. Comparing base (fceff75) to head (3e98147). Report is 15 commits behind head on main.

Files Patch % Lines
server/service/mdm.go 39.50% 43 Missing and 6 partials :warning:
server/fleet/mdm.go 45.20% 36 Missing and 4 partials :warning:
server/datastore/mysql/apple_mdm.go 83.10% 13 Missing and 12 partials :warning:
server/service/apple_mdm.go 23.07% 8 Missing and 2 partials :warning:
...849_AddExcludeLabelToMDMProfilesAndDeclarations.go 42.85% 6 Missing and 2 partials :warning:
server/datastore/mysql/microsoft_mdm.go 73.07% 4 Missing and 3 partials :warning:
server/service/appconfig.go 76.47% 3 Missing and 1 partial :warning:
server/datastore/mysql/mdm.go 98.07% 2 Missing and 1 partial :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #20014      +/-   ##
==========================================
- Coverage   62.65%   55.28%   -7.37%     
==========================================
  Files        1405     1410       +5     
  Lines      131562   132352     +790     
  Branches     3216     3213       -3     
==========================================
- Hits        82429    73176    -9253     
- Misses      42810    53221   +10411     
+ Partials     6323     5955     -368     
Flag Coverage Δ
backend 55.40% <74.74%> (-8.02%) :arrow_down:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jun 26 '24 15:06 codecov[bot]