Skip to content

Improve findAggregateContractMetric performance and introduce 30 second granularity for contract metrics #5073

Improve findAggregateContractMetric performance and introduce 30 second granularity for contract metrics

Improve findAggregateContractMetric performance and introduce 30 second granularity for contract metrics #5073

Re-run triggered February 28, 2024 08:59
Status Failure
Total duration 1m 36s
Artifacts

test.yml

on: pull_request
Matrix: test
Fit to window
Zoom out
Zoom in

Annotations

20 errors and 1 warning
test (ubuntu-latest, 1.21)
60/61 tests failed
Test go.sia.tech/renterd/stores/TestAutopilotStore failed in 0.42s: stores/migrations_utils.go#L18
2024-02-28T09:00:08Z WARN stores/migrations_utils.go:18 SLOW SQL >= 100ms {"elapsed": "328.536ms", "rows": 1, "sql": "-- dbArchivedContract\nCREATE TABLE `archived_contracts` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `fcid` varbinary(32) NOT NULL,\n `renewed_from` varbinary(32) DEFAULT NULL,\n `contract_price` longtext,\n `state` tinyint unsigned NOT NULL DEFAULT '0',\n `total_cost` longtext,\n `proof_height` bigint unsigned DEFAULT '0',\n `revision_height` bigint unsigned DEFAULT '0',\n `revision_number` varchar(191) NOT NULL DEFAULT '0',\n `size` bigint unsigned DEFAULT NULL,\n `start_height` bigint unsigned NOT NULL,\n `window_start` bigint unsigned NOT NULL DEFAULT '0',\n `window_end` bigint unsigned NOT NULL DEFAULT '0',\n `upload_spending` longtext,\n `download_spending` longtext,\n `fund_account_spending` longtext,\n `delete_spending` longtext,\n `list_spending` longtext,\n `renewed_to` varbinary(32) DEFAULT NULL,\n `host` varbinary(32) NOT NULL,\n `reason` longtext,\n PRIMARY KEY (`id`),\n UNIQUE KEY `fcid` (`fcid`),\n KEY `idx_archived_contracts_renewed_from` (`renewed_from`),\n KEY `idx_archived_contracts_proof_height` (`proof_height`),\n KEY `idx_archived_contracts_revision_height` (`revision_height`),\n KEY `idx_archived_contracts_start_height` (`start_height`),\n KEY `idx_archived_contracts_host` (`host`),\n KEY `idx_archived_contracts_fc_id` (`fcid`),\n KEY `idx_archived_contracts_state` (`state`),\n KEY `idx_archived_contracts_window_start` (`window_start`),\n KEY `idx_archived_contracts_window_end` (`window_end`),\n KEY `idx_archived_contracts_renewed_to` (`renewed_to`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n\n-- dbAutopilot\nCREATE TABLE `autopilots` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `identifier` varchar(191) NOT NULL,\n `config` longtext,\n `current_period` bigint unsigned DEFAULT '0',\n PRIMARY KEY (`id`),\n UNIQUE KEY `identifier` (`identifier`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n\n-- dbBucket\nCREATE TABLE `buckets` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `policy` longtext,\n `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `name` (`name`),\n KEY `idx_buckets_name` (`name`)\n) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n\n-- dbBufferedSlab\nCREATE TABLE `buffered_slabs` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `filename` longtext,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n\n-- dbConsensusInfo\nCREATE TABLE `consensus_infos` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `cc_id` longblob,\n `height` bigint unsigned DEFAULT NULL,\n `block_id` longblob,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n\n-- dbHost\nCREATE TABLE `hosts` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `public_key` varbinary(32) NOT NULL,\n `settings` longtext,\n `price_table` longtext,\n `price_table_expiry` datetime(3) DEFAULT NULL,\n `total_scans` bigint unsigned DEFAULT NULL,\n `last_scan` bigint DEFAULT NULL,\n `last_scan_success` tinyint(1) DEFAULT NULL,\n `second_to_last_scan_success` tinyint(1) DEFAULT NULL,\n `scanned` tinyint(1) DEFAULT NULL,\n `uptime` bigint DEFAULT NULL,\n `downtime` bigint DEFAULT NULL,\n `recent_downtime` bigint DEFAULT NULL,\n `recent_scan_failures` bigint unsigned DEFAULT NULL,\n `successful_interactions` double DEFAULT NULL,\n `failed_interactions` double DEFAULT NULL,\n `lost_sectors` bigint unsigned DEFAULT NULL,\n `last_announcement` datetime(3) DEFAULT NULL,\n `net_address` varchar(191) DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNI
Test go.sia.tech/renterd/stores/TestAutopilotStore failed in 0.42s: stores/migrations_utils.go#L18
2024-02-28T09:00:08Z ERROR stores/migrations_utils.go:18 Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'KEY `idx_contracts_fcid_timestamp` (`fcid`,`timestamp`) ) ENGINE=InnoDB DEFAULT ' at line 35 {"elapsed": "38.152ms", "rows": 0, "sql": "-- dbContractPruneMetric\nCREATE TABLE `contract_prunes` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `timestamp` bigint NOT NULL,\n `fcid` varbinary(32) NOT NULL,\n `host` varbinary(32) NOT NULL,\n `host_version` varchar(191) DEFAULT NULL,\n `pruned` bigint NOT NULL,\n `remaining` bigint NOT NULL,\n `duration` bigint NOT NULL,\n PRIMARY KEY (`id`),\n KEY `idx_contract_prunes_timestamp` (`timestamp`),\n KEY `idx_contract_prunes_fc_id` (`fcid`),\n KEY `idx_contract_prunes_host` (`host`),\n KEY `idx_contract_prunes_host_version` (`host_version`),\n KEY `idx_contract_prunes_pruned` (`pruned`),\n KEY `idx_contract_prunes_remaining` (`remaining`),\n KEY `idx_contract_prunes_duration` (`duration`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n\n-- dbContractSetMetric\nCREATE TABLE `contract_sets` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `timestamp` bigint NOT NULL,\n `name` varchar(191) NOT NULL,\n `contracts` bigint NOT NULL,\n PRIMARY KEY (`id`),\n KEY `idx_contract_sets_timestamp` (`timestamp`),\n KEY `idx_contract_sets_name` (`name`),\n KEY `idx_contract_sets_contracts` (`contracts`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n\n-- dbContractSetChurnMetric\nCREATE TABLE `contract_sets_churn` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `timestamp` bigint NOT NULL,\n `name` varchar(191) NOT NULL,\n `fc_id` varbinary(32) NOT NULL,\n `direction` varchar(191) NOT NULL,\n `reason` varchar(191) NOT NULL,\n PRIMARY KEY (`id`),\n KEY `idx_contract_sets_churn_timestamp` (`timestamp`),\n KEY `idx_contract_sets_churn_name` (`name`),\n KEY `idx_contract_sets_churn_fc_id` (`fc_id`),\n KEY `idx_contract_sets_churn_direction` (`direction`),\n KEY `idx_contract_sets_churn_reason` (`reason`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n\n-- dbContractMetric\nCREATE TABLE `contracts` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `timestamp` bigint NOT NULL,\n `fcid` varbinary(32) NOT NULL,\n `host` varbinary(32) NOT NULL,\n `remaining_collateral_lo` bigint NOT NULL,\n `remaining_collateral_hi` bigint NOT NULL,\n `remaining_funds_lo` bigint NOT NULL,\n `remaining_funds_hi` bigint NOT NULL,\n `revision_number` bigint NOT NULL,\n `upload_spending_lo` bigint NOT NULL,\n `upload_spending_hi` bigint NOT NULL,\n `download_spending_lo` bigint NOT NULL,\n `download_spending_hi` bigint NOT NULL,\n `fund_account_spending_lo` bigint NOT NULL,\n `fund_account_spending_hi` bigint NOT NULL,\n `delete_spending_lo` bigint NOT NULL,\n `delete_spending_hi` bigint NOT NULL,\n `list_spending_lo` bigint NOT NULL,\n `list_spending_hi` bigint NOT NULL,\n PRIMARY KEY (`id`),\n KEY `idx_contracts_fc_id` (`fcid`),\n KEY `idx_contracts_host` (`host`),\n KEY `idx_remaining_collateral` (`remaining_collateral_lo`,`remaining_collateral_hi`),\n KEY `idx_contracts_revision_number` (`revision_number`),\n KEY `idx_upload_spending` (`upload_spending_lo`,`upload_spending_hi`),\n KEY `idx_download_spending` (`download_spending_lo`,`download_spending_hi`),\n KEY `idx_fund_account_spending` (`fund_account_spending_lo`,`fund_account_spending_hi`),\n KEY `idx_contracts_timestamp` (`timestamp`),\n KEY `idx_remaining_funds` (`remaining_funds_lo`,`remaining_funds_hi`),\n KEY `idx_delete_spending` (`delete_spending_lo`,`delete_spending_hi`),\n KEY `idx_list_spending` (`list_spending_lo`,`list_spending_hi`)\n KEY `idx_contracts_fcid_timestamp` (`fcid`,`timestamp`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8m
Test go.sia.tech/renterd/stores/TestAutopilotStore failed in 0.42s: stores/autopilot_test.go#L14
autopilot_test.go:14: failed to create SQLStore failed to perform migrations for metrics db: failed to migrate: failed to init schema: Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'KEY `idx_contracts_fcid_timestamp` (`fcid`,`timestamp`) ) ENGINE=InnoDB DEFAULT ' at line 35
Test go.sia.tech/renterd/stores/TestSQLHostDB failed in 0.41s: stores/migrations_utils.go#L18
2024-02-28T09:00:09Z WARN stores/migrations_utils.go:18 SLOW SQL >= 100ms {"elapsed": "320.683ms", "rows": 1, "sql": "-- dbArchivedContract\nCREATE TABLE `archived_contracts` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `fcid` varbinary(32) NOT NULL,\n `renewed_from` varbinary(32) DEFAULT NULL,\n `contract_price` longtext,\n `state` tinyint unsigned NOT NULL DEFAULT '0',\n `total_cost` longtext,\n `proof_height` bigint unsigned DEFAULT '0',\n `revision_height` bigint unsigned DEFAULT '0',\n `revision_number` varchar(191) NOT NULL DEFAULT '0',\n `size` bigint unsigned DEFAULT NULL,\n `start_height` bigint unsigned NOT NULL,\n `window_start` bigint unsigned NOT NULL DEFAULT '0',\n `window_end` bigint unsigned NOT NULL DEFAULT '0',\n `upload_spending` longtext,\n `download_spending` longtext,\n `fund_account_spending` longtext,\n `delete_spending` longtext,\n `list_spending` longtext,\n `renewed_to` varbinary(32) DEFAULT NULL,\n `host` varbinary(32) NOT NULL,\n `reason` longtext,\n PRIMARY KEY (`id`),\n UNIQUE KEY `fcid` (`fcid`),\n KEY `idx_archived_contracts_renewed_from` (`renewed_from`),\n KEY `idx_archived_contracts_proof_height` (`proof_height`),\n KEY `idx_archived_contracts_revision_height` (`revision_height`),\n KEY `idx_archived_contracts_start_height` (`start_height`),\n KEY `idx_archived_contracts_host` (`host`),\n KEY `idx_archived_contracts_fc_id` (`fcid`),\n KEY `idx_archived_contracts_state` (`state`),\n KEY `idx_archived_contracts_window_start` (`window_start`),\n KEY `idx_archived_contracts_window_end` (`window_end`),\n KEY `idx_archived_contracts_renewed_to` (`renewed_to`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n\n-- dbAutopilot\nCREATE TABLE `autopilots` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `identifier` varchar(191) NOT NULL,\n `config` longtext,\n `current_period` bigint unsigned DEFAULT '0',\n PRIMARY KEY (`id`),\n UNIQUE KEY `identifier` (`identifier`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n\n-- dbBucket\nCREATE TABLE `buckets` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `policy` longtext,\n `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `name` (`name`),\n KEY `idx_buckets_name` (`name`)\n) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n\n-- dbBufferedSlab\nCREATE TABLE `buffered_slabs` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `filename` longtext,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n\n-- dbConsensusInfo\nCREATE TABLE `consensus_infos` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `cc_id` longblob,\n `height` bigint unsigned DEFAULT NULL,\n `block_id` longblob,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n\n-- dbHost\nCREATE TABLE `hosts` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `public_key` varbinary(32) NOT NULL,\n `settings` longtext,\n `price_table` longtext,\n `price_table_expiry` datetime(3) DEFAULT NULL,\n `total_scans` bigint unsigned DEFAULT NULL,\n `last_scan` bigint DEFAULT NULL,\n `last_scan_success` tinyint(1) DEFAULT NULL,\n `second_to_last_scan_success` tinyint(1) DEFAULT NULL,\n `scanned` tinyint(1) DEFAULT NULL,\n `uptime` bigint DEFAULT NULL,\n `downtime` bigint DEFAULT NULL,\n `recent_downtime` bigint DEFAULT NULL,\n `recent_scan_failures` bigint unsigned DEFAULT NULL,\n `successful_interactions` double DEFAULT NULL,\n `failed_interactions` double DEFAULT NULL,\n `lost_sectors` bigint unsigned DEFAULT NULL,\n `last_announcement` datetime(3) DEFAULT NULL,\n `net_address` varchar(191) DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNI
Test go.sia.tech/renterd/stores/TestSQLHostDB failed in 0.41s: stores/migrations_utils.go#L18
2024-02-28T09:00:09Z ERROR stores/migrations_utils.go:18 Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'KEY `idx_contracts_fcid_timestamp` (`fcid`,`timestamp`) ) ENGINE=InnoDB DEFAULT ' at line 35 {"elapsed": "43.039ms", "rows": 0, "sql": "-- dbContractPruneMetric\nCREATE TABLE `contract_prunes` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `timestamp` bigint NOT NULL,\n `fcid` varbinary(32) NOT NULL,\n `host` varbinary(32) NOT NULL,\n `host_version` varchar(191) DEFAULT NULL,\n `pruned` bigint NOT NULL,\n `remaining` bigint NOT NULL,\n `duration` bigint NOT NULL,\n PRIMARY KEY (`id`),\n KEY `idx_contract_prunes_timestamp` (`timestamp`),\n KEY `idx_contract_prunes_fc_id` (`fcid`),\n KEY `idx_contract_prunes_host` (`host`),\n KEY `idx_contract_prunes_host_version` (`host_version`),\n KEY `idx_contract_prunes_pruned` (`pruned`),\n KEY `idx_contract_prunes_remaining` (`remaining`),\n KEY `idx_contract_prunes_duration` (`duration`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n\n-- dbContractSetMetric\nCREATE TABLE `contract_sets` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `timestamp` bigint NOT NULL,\n `name` varchar(191) NOT NULL,\n `contracts` bigint NOT NULL,\n PRIMARY KEY (`id`),\n KEY `idx_contract_sets_timestamp` (`timestamp`),\n KEY `idx_contract_sets_name` (`name`),\n KEY `idx_contract_sets_contracts` (`contracts`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n\n-- dbContractSetChurnMetric\nCREATE TABLE `contract_sets_churn` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `timestamp` bigint NOT NULL,\n `name` varchar(191) NOT NULL,\n `fc_id` varbinary(32) NOT NULL,\n `direction` varchar(191) NOT NULL,\n `reason` varchar(191) NOT NULL,\n PRIMARY KEY (`id`),\n KEY `idx_contract_sets_churn_timestamp` (`timestamp`),\n KEY `idx_contract_sets_churn_name` (`name`),\n KEY `idx_contract_sets_churn_fc_id` (`fc_id`),\n KEY `idx_contract_sets_churn_direction` (`direction`),\n KEY `idx_contract_sets_churn_reason` (`reason`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n\n-- dbContractMetric\nCREATE TABLE `contracts` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `timestamp` bigint NOT NULL,\n `fcid` varbinary(32) NOT NULL,\n `host` varbinary(32) NOT NULL,\n `remaining_collateral_lo` bigint NOT NULL,\n `remaining_collateral_hi` bigint NOT NULL,\n `remaining_funds_lo` bigint NOT NULL,\n `remaining_funds_hi` bigint NOT NULL,\n `revision_number` bigint NOT NULL,\n `upload_spending_lo` bigint NOT NULL,\n `upload_spending_hi` bigint NOT NULL,\n `download_spending_lo` bigint NOT NULL,\n `download_spending_hi` bigint NOT NULL,\n `fund_account_spending_lo` bigint NOT NULL,\n `fund_account_spending_hi` bigint NOT NULL,\n `delete_spending_lo` bigint NOT NULL,\n `delete_spending_hi` bigint NOT NULL,\n `list_spending_lo` bigint NOT NULL,\n `list_spending_hi` bigint NOT NULL,\n PRIMARY KEY (`id`),\n KEY `idx_contracts_fc_id` (`fcid`),\n KEY `idx_contracts_host` (`host`),\n KEY `idx_remaining_collateral` (`remaining_collateral_lo`,`remaining_collateral_hi`),\n KEY `idx_contracts_revision_number` (`revision_number`),\n KEY `idx_upload_spending` (`upload_spending_lo`,`upload_spending_hi`),\n KEY `idx_download_spending` (`download_spending_lo`,`download_spending_hi`),\n KEY `idx_fund_account_spending` (`fund_account_spending_lo`,`fund_account_spending_hi`),\n KEY `idx_contracts_timestamp` (`timestamp`),\n KEY `idx_remaining_funds` (`remaining_funds_lo`,`remaining_funds_hi`),\n KEY `idx_delete_spending` (`delete_spending_lo`,`delete_spending_hi`),\n KEY `idx_list_spending` (`list_spending_lo`,`list_spending_hi`)\n KEY `idx_contracts_fcid_timestamp` (`fcid`,`timestamp`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8m
Test go.sia.tech/renterd/stores/TestSQLHostDB failed in 0.41s: stores/hostdb_test.go#L36
hostdb_test.go:36: failed to create SQLStore failed to perform migrations for metrics db: failed to migrate: failed to init schema: Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'KEY `idx_contracts_fcid_timestamp` (`fcid`,`timestamp`) ) ENGINE=InnoDB DEFAULT ' at line 35
Test go.sia.tech/renterd/stores/TestSQLHosts failed in 0.42s: stores/migrations_utils.go#L18
2024-02-28T09:00:09Z WARN stores/migrations_utils.go:18 SLOW SQL >= 100ms {"elapsed": "327.747ms", "rows": 1, "sql": "-- dbArchivedContract\nCREATE TABLE `archived_contracts` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `fcid` varbinary(32) NOT NULL,\n `renewed_from` varbinary(32) DEFAULT NULL,\n `contract_price` longtext,\n `state` tinyint unsigned NOT NULL DEFAULT '0',\n `total_cost` longtext,\n `proof_height` bigint unsigned DEFAULT '0',\n `revision_height` bigint unsigned DEFAULT '0',\n `revision_number` varchar(191) NOT NULL DEFAULT '0',\n `size` bigint unsigned DEFAULT NULL,\n `start_height` bigint unsigned NOT NULL,\n `window_start` bigint unsigned NOT NULL DEFAULT '0',\n `window_end` bigint unsigned NOT NULL DEFAULT '0',\n `upload_spending` longtext,\n `download_spending` longtext,\n `fund_account_spending` longtext,\n `delete_spending` longtext,\n `list_spending` longtext,\n `renewed_to` varbinary(32) DEFAULT NULL,\n `host` varbinary(32) NOT NULL,\n `reason` longtext,\n PRIMARY KEY (`id`),\n UNIQUE KEY `fcid` (`fcid`),\n KEY `idx_archived_contracts_renewed_from` (`renewed_from`),\n KEY `idx_archived_contracts_proof_height` (`proof_height`),\n KEY `idx_archived_contracts_revision_height` (`revision_height`),\n KEY `idx_archived_contracts_start_height` (`start_height`),\n KEY `idx_archived_contracts_host` (`host`),\n KEY `idx_archived_contracts_fc_id` (`fcid`),\n KEY `idx_archived_contracts_state` (`state`),\n KEY `idx_archived_contracts_window_start` (`window_start`),\n KEY `idx_archived_contracts_window_end` (`window_end`),\n KEY `idx_archived_contracts_renewed_to` (`renewed_to`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n\n-- dbAutopilot\nCREATE TABLE `autopilots` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `identifier` varchar(191) NOT NULL,\n `config` longtext,\n `current_period` bigint unsigned DEFAULT '0',\n PRIMARY KEY (`id`),\n UNIQUE KEY `identifier` (`identifier`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n\n-- dbBucket\nCREATE TABLE `buckets` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `policy` longtext,\n `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `name` (`name`),\n KEY `idx_buckets_name` (`name`)\n) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n\n-- dbBufferedSlab\nCREATE TABLE `buffered_slabs` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `filename` longtext,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n\n-- dbConsensusInfo\nCREATE TABLE `consensus_infos` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `cc_id` longblob,\n `height` bigint unsigned DEFAULT NULL,\n `block_id` longblob,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n\n-- dbHost\nCREATE TABLE `hosts` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `public_key` varbinary(32) NOT NULL,\n `settings` longtext,\n `price_table` longtext,\n `price_table_expiry` datetime(3) DEFAULT NULL,\n `total_scans` bigint unsigned DEFAULT NULL,\n `last_scan` bigint DEFAULT NULL,\n `last_scan_success` tinyint(1) DEFAULT NULL,\n `second_to_last_scan_success` tinyint(1) DEFAULT NULL,\n `scanned` tinyint(1) DEFAULT NULL,\n `uptime` bigint DEFAULT NULL,\n `downtime` bigint DEFAULT NULL,\n `recent_downtime` bigint DEFAULT NULL,\n `recent_scan_failures` bigint unsigned DEFAULT NULL,\n `successful_interactions` double DEFAULT NULL,\n `failed_interactions` double DEFAULT NULL,\n `lost_sectors` bigint unsigned DEFAULT NULL,\n `last_announcement` datetime(3) DEFAULT NULL,\n `net_address` varchar(191) DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNI
Test go.sia.tech/renterd/stores/TestSQLHosts failed in 0.42s: stores/migrations_utils.go#L18
2024-02-28T09:00:09Z ERROR stores/migrations_utils.go:18 Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'KEY `idx_contracts_fcid_timestamp` (`fcid`,`timestamp`) ) ENGINE=InnoDB DEFAULT ' at line 35 {"elapsed": "48.314ms", "rows": 0, "sql": "-- dbContractPruneMetric\nCREATE TABLE `contract_prunes` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `timestamp` bigint NOT NULL,\n `fcid` varbinary(32) NOT NULL,\n `host` varbinary(32) NOT NULL,\n `host_version` varchar(191) DEFAULT NULL,\n `pruned` bigint NOT NULL,\n `remaining` bigint NOT NULL,\n `duration` bigint NOT NULL,\n PRIMARY KEY (`id`),\n KEY `idx_contract_prunes_timestamp` (`timestamp`),\n KEY `idx_contract_prunes_fc_id` (`fcid`),\n KEY `idx_contract_prunes_host` (`host`),\n KEY `idx_contract_prunes_host_version` (`host_version`),\n KEY `idx_contract_prunes_pruned` (`pruned`),\n KEY `idx_contract_prunes_remaining` (`remaining`),\n KEY `idx_contract_prunes_duration` (`duration`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n\n-- dbContractSetMetric\nCREATE TABLE `contract_sets` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `timestamp` bigint NOT NULL,\n `name` varchar(191) NOT NULL,\n `contracts` bigint NOT NULL,\n PRIMARY KEY (`id`),\n KEY `idx_contract_sets_timestamp` (`timestamp`),\n KEY `idx_contract_sets_name` (`name`),\n KEY `idx_contract_sets_contracts` (`contracts`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n\n-- dbContractSetChurnMetric\nCREATE TABLE `contract_sets_churn` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `timestamp` bigint NOT NULL,\n `name` varchar(191) NOT NULL,\n `fc_id` varbinary(32) NOT NULL,\n `direction` varchar(191) NOT NULL,\n `reason` varchar(191) NOT NULL,\n PRIMARY KEY (`id`),\n KEY `idx_contract_sets_churn_timestamp` (`timestamp`),\n KEY `idx_contract_sets_churn_name` (`name`),\n KEY `idx_contract_sets_churn_fc_id` (`fc_id`),\n KEY `idx_contract_sets_churn_direction` (`direction`),\n KEY `idx_contract_sets_churn_reason` (`reason`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n\n-- dbContractMetric\nCREATE TABLE `contracts` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `timestamp` bigint NOT NULL,\n `fcid` varbinary(32) NOT NULL,\n `host` varbinary(32) NOT NULL,\n `remaining_collateral_lo` bigint NOT NULL,\n `remaining_collateral_hi` bigint NOT NULL,\n `remaining_funds_lo` bigint NOT NULL,\n `remaining_funds_hi` bigint NOT NULL,\n `revision_number` bigint NOT NULL,\n `upload_spending_lo` bigint NOT NULL,\n `upload_spending_hi` bigint NOT NULL,\n `download_spending_lo` bigint NOT NULL,\n `download_spending_hi` bigint NOT NULL,\n `fund_account_spending_lo` bigint NOT NULL,\n `fund_account_spending_hi` bigint NOT NULL,\n `delete_spending_lo` bigint NOT NULL,\n `delete_spending_hi` bigint NOT NULL,\n `list_spending_lo` bigint NOT NULL,\n `list_spending_hi` bigint NOT NULL,\n PRIMARY KEY (`id`),\n KEY `idx_contracts_fc_id` (`fcid`),\n KEY `idx_contracts_host` (`host`),\n KEY `idx_remaining_collateral` (`remaining_collateral_lo`,`remaining_collateral_hi`),\n KEY `idx_contracts_revision_number` (`revision_number`),\n KEY `idx_upload_spending` (`upload_spending_lo`,`upload_spending_hi`),\n KEY `idx_download_spending` (`download_spending_lo`,`download_spending_hi`),\n KEY `idx_fund_account_spending` (`fund_account_spending_lo`,`fund_account_spending_hi`),\n KEY `idx_contracts_timestamp` (`timestamp`),\n KEY `idx_remaining_funds` (`remaining_funds_lo`,`remaining_funds_hi`),\n KEY `idx_delete_spending` (`delete_spending_lo`,`delete_spending_hi`),\n KEY `idx_list_spending` (`list_spending_lo`,`list_spending_hi`)\n KEY `idx_contracts_fcid_timestamp` (`fcid`,`timestamp`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8m
Test go.sia.tech/renterd/stores/TestSQLHosts failed in 0.42s: stores/hostdb_test.go#L163
hostdb_test.go:163: failed to create SQLStore failed to perform migrations for metrics db: failed to migrate: failed to init schema: Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'KEY `idx_contracts_fcid_timestamp` (`fcid`,`timestamp`) ) ENGINE=InnoDB DEFAULT ' at line 35
test (windows-latest, 1.21)
The job was canceled because "ubuntu-latest_1_21" failed.
test (windows-latest, 1.21)
The operation was canceled.
test (windows-latest, 1.22)
The job was canceled because "ubuntu-latest_1_21" failed.
test (windows-latest, 1.22)
The operation was canceled.
test (ubuntu-latest, 1.22)
The job was canceled because "ubuntu-latest_1_21" failed.
test (ubuntu-latest, 1.22)
The operation was canceled.
test (macos-latest, 1.22)
The job was canceled because "ubuntu-latest_1_21" failed.
test (macos-latest, 1.22)
The operation was canceled.
test (macos-latest, 1.21)
The job was canceled because "ubuntu-latest_1_21" failed.
test (macos-latest, 1.21)
The operation was canceled.
test (ubuntu-latest, 1.21)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-go@v3, golangci/golangci-lint-action@v3, SiaFoundation/action-golang-analysis@HEAD, n8maninger/action-golang-test@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.