Skip to content

Add soft deletion for contracts #6970

Add soft deletion for contracts

Add soft deletion for contracts #6970

Triggered via pull request September 16, 2024 14:43
Status Failure
Total duration 15m 14s
Artifacts

test.yml

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

Annotations

29 errors and 2 warnings
test (ubuntu-latest, 1.22)
1/2 tests failed
Test go.sia.tech/renterd/internal/test/e2e/TestNewTestCluster failed in 24.33s: internal/test/e2e/log.go#L100
2024-09-16T14:58:26Z WARN main sql/log.go:100 slow exec {"query": "-- 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` JSON,\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 `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` JSON,\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 `resolved_addresses` varchar(255) NOT NULL DEFAULT '',\n PRIMARY KEY (`id`),\n UNIQUE KEY `public_key` (`public_key`),\n KEY `idx_hosts_public_key` (`public_key`),\n KEY `idx_hosts_last_scan` (`last_scan`),\n KEY `idx_hosts_scanned` (`scanned`),\n KEY `idx_hosts_recent_downtime` (`recent_downtime`),\n KEY `idx_hosts_recent_scan_failures` (`recent_scan_failures`),\n KEY `idx_hosts_net_address` (`net_address`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n\n-- dbContract\nCREATE TABLE `contracts` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `fcid` varbinary(32) NOT NULL,\n `host_id` bigint unsigned DEFAULT NULL,\n `host_key` varbinary(32),\n\n `archival_reason` varchar(191) DEFAULT NULL,\n `proof_height` bigint unsigned DEFAULT '0',\n `renewed_from` varbinary(32) DEFAULT NULL,\n `renewed_to` varbinary(32) DEFAULT NULL,\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 `state` tinyint unsigned NOT NULL DEFAULT '0',\n `window_start` bigint unsigned NOT NULL DEFAULT '0',\n `window_end` bigint unsigned NOT NULL DEFAULT '0',\n\n `contract_price` longtext,\n `initial_renter_funds` longtext,\n\n `delete_spending` longtext,\n `fund_account_spending` longtext,\n `sector_roots_spending` longtext,\n `upload_spending` longtext,\n PRIMARY KEY (`id`),\n UNIQUE KEY `fcid` (`fcid`),\n KEY `idx_contracts_archival_reason` (`archival_reason`),\n KEY `idx_contracts_fcid` (`fcid`),\n KEY `idx_contracts_host_id` (`host_id`),\n KEY `idx_contracts_host_key` (`host_key`),\n KEY `idx_contracts_proof_height` (`proo
Test go.sia.tech/renterd/internal/test/e2e/TestNewTestCluster failed in 24.33s: internal/test/e2e/log.go#L100
`leaf_index` bigint,\n `merkle_proof` longblob NOT NULL,\n `value` longtext,\n `address` varbinary(32) DEFAULT NULL,\n `maturity_height` bigint unsigned DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `output_id` (`output_id`),\n KEY `idx_wallet_outputs_maturity_height` (`maturity_height`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n\n-- create default bucket\nINSERT INTO buckets (created_at, name) VALUES (CURRENT_TIMESTAMP, 'default');\n", "elapsed": 0.338616523, "stack": "go.sia.tech/renterd/internal/sql.(*loggedTxn).Exec\n\t/home/runner/work/renterd/renterd/internal/sql/log.go:100\ngo.sia.tech/renterd/internal/sql.execSQLFile\n\t/home/runner/work/renterd/renterd/internal/sql/migrations.go:334\ngo.sia.tech/renterd/internal/sql.PerformMigrations.initSchema.func2\n\t/home/runner/work/renterd/renterd/internal/sql/migrations.go:343\ngo.sia.tech/renterd/internal/sql.(*DB).transaction\n\t/home/runner/work/renterd/renterd/internal/sql/sql.go:223\ngo.sia.tech/renterd/internal/sql.(
Test go.sia.tech/renterd/internal/test/e2e/TestNewTestCluster failed in 24.33s: internal/test/e2e/sql.go#L151
*DB).Transaction\n\t/home/runner/work/renterd/renterd/internal/sql/sql.go:151\ngo.sia.tech/renterd/internal/sql.initSchema\n\t/home/runner/work/renterd/renterd/internal/sql/migrations.go:341\ngo.sia.tech/renterd/internal/sql.PerformMigrations\n\t/home/runner/work/renterd/renterd/internal/sql/migrations.go:295\ngo.sia.tech/renterd/stores/sql/mysql.(*MainDatabase).Migrate\n\t/home/runner/work/renterd/renterd/stores/sql/mysql/main.go:80\ngo.sia.tech/renterd/stores.NewSQLStore\n\t/home/runner/work/renterd/renterd/stores/sql.go:88\ngo.sia.tech/renterd/internal/test/e2e.newTestBus\n\t/home/runner/work/renterd/renterd/internal/test/e2e/cluster.go:556\ngo.sia.tech/renterd/internal/test/e2e.newTestCluster\n\t/home/runner/work/renterd/renterd/internal/test/e2e/cluster.go:367\ngo.sia.tech/renterd/internal/test/e2e.TestNewTestCluster\n\t/home/runner/work/renterd/renterd/internal/test/e2e/cluster_test.go:175\ntesting.tRunner\n\t/home/runner/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.0.linux-amd64/src/testing/testing.go:1690"}
Test go.sia.tech/renterd/internal/test/e2e/TestNewTestCluster failed in 24.33s: internal/test/e2e/contractor.go#L522
2024-09-16T14:58:29Z WARN autopilot.autopilot.contractor.performContractMaintenance.ec08f03ded55e2d6515fea49343512b1.calculateMinScore contractor/contractor.go:522 min host score is set to the smallest non-zero float because there are no candidate hosts {"contractSet": "testset", "remainingAllowance": "1 KS"}
Test go.sia.tech/renterd/internal/test/e2e/TestNewTestCluster failed in 24.33s: internal/test/e2e/contractor.go#L1127
2024-09-16T14:58:29Z WARN autopilot.autopilot.contractor.performContractMaintenance.ec08f03ded55e2d6515fea49343512b1 contractor/contractor.go:1127 not enough candidates to form new contracts {"contractSet": "testset", "remainingAllowance": "1 KS", "candidates": 0}
Test go.sia.tech/renterd/internal/test/e2e/TestNewTestCluster failed in 24.33s: internal/test/e2e/contractor.go#L714
2024-09-16T14:58:29Z WARN autopilot.autopilot.contractor.performContractMaintenance.ec08f03ded55e2d6515fea49343512b1 contractor/contractor.go:714 contractset after maintenance {"contractSet": "testset", "remainingAllowance": "1 KS", "contracts": 0, "added": 0, "removed": 0}
Test go.sia.tech/renterd/internal/test/e2e/TestNewTestCluster failed in 24.33s: internal/test/e2e/contractor.go#L522
2024-09-16T14:58:29Z WARN autopilot.autopilot.contractor.performContractMaintenance.3ee1850961aa971e83e6d47b84e1624e.calculateMinScore contractor/contractor.go:522 min host score is set to the smallest non-zero float because there are no candidate hosts {"contractSet": "testset", "remainingAllowance": "1 KS"}
Test go.sia.tech/renterd/internal/test/e2e/TestNewTestCluster failed in 24.33s: internal/test/e2e/contractor.go#L1127
2024-09-16T14:58:29Z WARN autopilot.autopilot.contractor.performContractMaintenance.3ee1850961aa971e83e6d47b84e1624e contractor/contractor.go:1127 not enough candidates to form new contracts {"contractSet": "testset", "remainingAllowance": "1 KS", "candidates": 0}
Test go.sia.tech/renterd/internal/test/e2e/TestNewTestCluster failed in 24.33s: internal/test/e2e/contractor.go#L714
2024-09-16T14:58:29Z WARN autopilot.autopilot.contractor.performContractMaintenance.3ee1850961aa971e83e6d47b84e1624e contractor/contractor.go:714 contractset after maintenance {"contractSet": "testset", "remainingAllowance": "1 KS", "contracts": 0, "added": 0, "removed": 0}
test (ubuntu-latest, 1.23)
The job was canceled because "ubuntu-latest_1_22" failed.
test (ubuntu-latest, 1.23)
1/2 tests failed
Test go.sia.tech/renterd/internal/test/e2e/TestNewTestCluster failed in 24.26s: internal/test/e2e/log.go#L100
2024-09-16T14:58:26Z WARN main sql/log.go:100 slow exec {"query": "-- 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` JSON,\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 `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` JSON,\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 `resolved_addresses` varchar(255) NOT NULL DEFAULT '',\n PRIMARY KEY (`id`),\n UNIQUE KEY `public_key` (`public_key`),\n KEY `idx_hosts_public_key` (`public_key`),\n KEY `idx_hosts_last_scan` (`last_scan`),\n KEY `idx_hosts_scanned` (`scanned`),\n KEY `idx_hosts_recent_downtime` (`recent_downtime`),\n KEY `idx_hosts_recent_scan_failures` (`recent_scan_failures`),\n KEY `idx_hosts_net_address` (`net_address`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n\n-- dbContract\nCREATE TABLE `contracts` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `created_at` datetime(3) DEFAULT NULL,\n `fcid` varbinary(32) NOT NULL,\n `host_id` bigint unsigned DEFAULT NULL,\n `host_key` varbinary(32),\n\n `archival_reason` varchar(191) DEFAULT NULL,\n `proof_height` bigint unsigned DEFAULT '0',\n `renewed_from` varbinary(32) DEFAULT NULL,\n `renewed_to` varbinary(32) DEFAULT NULL,\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 `state` tinyint unsigned NOT NULL DEFAULT '0',\n `window_start` bigint unsigned NOT NULL DEFAULT '0',\n `window_end` bigint unsigned NOT NULL DEFAULT '0',\n\n `contract_price` longtext,\n `initial_renter_funds` longtext,\n\n `delete_spending` longtext,\n `fund_account_spending` longtext,\n `sector_roots_spending` longtext,\n `upload_spending` longtext,\n PRIMARY KEY (`id`),\n UNIQUE KEY `fcid` (`fcid`),\n KEY `idx_contracts_archival_reason` (`archival_reason`),\n KEY `idx_contracts_fcid` (`fcid`),\n KEY `idx_contracts_host_id` (`host_id`),\n KEY `idx_contracts_host_key` (`host_key`),\n KEY `idx_contracts_proof_height` (`proo
Test go.sia.tech/renterd/internal/test/e2e/TestNewTestCluster failed in 24.26s: internal/test/e2e/log.go#L100
`leaf_index` bigint,\n `merkle_proof` longblob NOT NULL,\n `value` longtext,\n `address` varbinary(32) DEFAULT NULL,\n `maturity_height` bigint unsigned DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `output_id` (`output_id`),\n KEY `idx_wallet_outputs_maturity_height` (`maturity_height`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n\n-- create default bucket\nINSERT INTO buckets (created_at, name) VALUES (CURRENT_TIMESTAMP, 'default');\n", "elapsed": 0.295457912, "stack": "go.sia.tech/renterd/internal/sql.(*loggedTxn).Exec\n\t/home/runner/work/renterd/renterd/internal/sql/log.go:100\ngo.sia.tech/renterd/internal/sql.execSQLFile\n\t/home/runner/work/renterd/renterd/internal/sql/migrations.go:334\ngo.sia.tech/renterd/internal/sql.PerformMigrations.initSchema.func2\n\t/home/runner/work/renterd/renterd/internal/sql/migrations.go:343\ngo.sia.tech/renterd/internal/sql.(*DB).transaction\n\t/home/runner/work/renterd/renterd/internal/sql/sql.go:223\ngo.sia.tech/renterd/internal/sql.(
Test go.sia.tech/renterd/internal/test/e2e/TestNewTestCluster failed in 24.26s: internal/test/e2e/sql.go#L151
*DB).Transaction\n\t/home/runner/work/renterd/renterd/internal/sql/sql.go:151\ngo.sia.tech/renterd/internal/sql.initSchema\n\t/home/runner/work/renterd/renterd/internal/sql/migrations.go:341\ngo.sia.tech/renterd/internal/sql.PerformMigrations\n\t/home/runner/work/renterd/renterd/internal/sql/migrations.go:295\ngo.sia.tech/renterd/stores/sql/mysql.(*MainDatabase).Migrate\n\t/home/runner/work/renterd/renterd/stores/sql/mysql/main.go:80\ngo.sia.tech/renterd/stores.NewSQLStore\n\t/home/runner/work/renterd/renterd/stores/sql.go:88\ngo.sia.tech/renterd/internal/test/e2e.newTestBus\n\t/home/runner/work/renterd/renterd/internal/test/e2e/cluster.go:556\ngo.sia.tech/renterd/internal/test/e2e.newTestCluster\n\t/home/runner/work/renterd/renterd/internal/test/e2e/cluster.go:367\ngo.sia.tech/renterd/internal/test/e2e.TestNewTestCluster\n\t/home/runner/work/renterd/renterd/internal/test/e2e/cluster_test.go:175\ntesting.tRunner\n\t/opt/hostedtoolcache/go/1.23.1/x64/src/testing/testing.go:1690"}
Test go.sia.tech/renterd/internal/test/e2e/TestNewTestCluster failed in 24.26s: internal/test/e2e/contractor.go#L522
2024-09-16T14:58:29Z WARN autopilot.autopilot.contractor.performContractMaintenance.bac2d7bc290d581886dd5f89bd0ee1bd.calculateMinScore contractor/contractor.go:522 min host score is set to the smallest non-zero float because there are no candidate hosts {"contractSet": "testset", "remainingAllowance": "1 KS"}
Test go.sia.tech/renterd/internal/test/e2e/TestNewTestCluster failed in 24.26s: internal/test/e2e/contractor.go#L1127
2024-09-16T14:58:29Z WARN autopilot.autopilot.contractor.performContractMaintenance.bac2d7bc290d581886dd5f89bd0ee1bd contractor/contractor.go:1127 not enough candidates to form new contracts {"contractSet": "testset", "remainingAllowance": "1 KS", "candidates": 0}
Test go.sia.tech/renterd/internal/test/e2e/TestNewTestCluster failed in 24.26s: internal/test/e2e/contractor.go#L714
2024-09-16T14:58:29Z WARN autopilot.autopilot.contractor.performContractMaintenance.bac2d7bc290d581886dd5f89bd0ee1bd contractor/contractor.go:714 contractset after maintenance {"contractSet": "testset", "remainingAllowance": "1 KS", "contracts": 0, "added": 0, "removed": 0}
Test go.sia.tech/renterd/internal/test/e2e/TestNewTestCluster failed in 24.26s: internal/test/e2e/contractor.go#L522
2024-09-16T14:58:30Z WARN autopilot.autopilot.contractor.performContractMaintenance.9c3ec8b6f627af5d810af051881b9669.calculateMinScore contractor/contractor.go:522 min host score is set to the smallest non-zero float because there are no candidate hosts {"contractSet": "testset", "remainingAllowance": "1 KS"}
Test go.sia.tech/renterd/internal/test/e2e/TestNewTestCluster failed in 24.26s: internal/test/e2e/contractor.go#L1127
2024-09-16T14:58:30Z WARN autopilot.autopilot.contractor.performContractMaintenance.9c3ec8b6f627af5d810af051881b9669 contractor/contractor.go:1127 not enough candidates to form new contracts {"contractSet": "testset", "remainingAllowance": "1 KS", "candidates": 0}
Test go.sia.tech/renterd/internal/test/e2e/TestNewTestCluster failed in 24.26s: internal/test/e2e/contractor.go#L714
2024-09-16T14:58:30Z WARN autopilot.autopilot.contractor.performContractMaintenance.9c3ec8b6f627af5d810af051881b9669 contractor/contractor.go:714 contractset after maintenance {"contractSet": "testset", "remainingAllowance": "1 KS", "contracts": 0, "added": 0, "removed": 0}
test (windows-latest, 1.22)
The job was canceled because "ubuntu-latest_1_22" failed.
test (windows-latest, 1.22)
The operation was canceled.
test (windows-latest, 1.23)
The job was canceled because "ubuntu-latest_1_22" failed.
test (windows-latest, 1.23)
The operation was canceled.
test (macos-latest, 1.22)
The job was canceled because "ubuntu-latest_1_22" failed.
test (macos-latest, 1.22)
The operation was canceled.
test (macos-latest, 1.23)
The job was canceled because "ubuntu-latest_1_22" failed.
test (macos-latest, 1.23)
The operation was canceled.
analyze
The following actions use a deprecated Node.js version and will be forced to run on node20: golangci/golangci-lint-action@v3, SiaFoundation/action-golang-analysis@HEAD. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
test (ubuntu-latest, 1.22)
The following actions use a deprecated Node.js version and will be forced to run on node20: n8maninger/action-golang-test@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/