DB: Promote pausing schema from config-next to config (#7878)

This commit is contained in:
Samantha Frank 2024-12-11 14:38:55 -05:00 committed by GitHub
parent 40e100c297
commit 1ddd4633f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 34 additions and 36 deletions

View File

@ -1,20 +0,0 @@
-- +migrate Up
-- SQL in section 'Up' is executed when this migration is applied
-- This table has no auto-incrementing primary key because we don't plan to
-- partition it. This table expected to be < 800K rows initially and grow at a
-- rate of ~18% per year.
CREATE TABLE `paused` (
`registrationID` bigint(20) UNSIGNED NOT NULL,
`identifierType` tinyint(4) NOT NULL,
`identifierValue` varchar(255) NOT NULL,
`pausedAt` datetime NOT NULL,
`unpausedAt` datetime DEFAULT NULL,
PRIMARY KEY (`registrationID`, `identifierValue`, `identifierType`)
);
-- +migrate Down
-- SQL section 'Down' is executed when this migration is rolled back
DROP TABLE `paused`;

View File

@ -0,0 +1 @@
../../db/boulder_sa/20240514000000_Paused.sql

View File

@ -0,0 +1,20 @@
-- +migrate Up
-- SQL in section 'Up' is executed when this migration is applied
-- This table has no auto-incrementing primary key because we don't plan to
-- partition it. This table expected to be < 800K rows initially and grow at a
-- rate of ~18% per year.
CREATE TABLE `paused` (
`registrationID` bigint(20) UNSIGNED NOT NULL,
`identifierType` tinyint(4) NOT NULL,
`identifierValue` varchar(255) NOT NULL,
`pausedAt` datetime NOT NULL,
`unpausedAt` datetime DEFAULT NULL,
PRIMARY KEY (`registrationID`, `identifierValue`, `identifierType`)
);
-- +migrate Down
-- SQL section 'Down' is executed when this migration is rolled back
DROP TABLE `paused`;

View File

@ -104,7 +104,15 @@
"pendingAuthorizationLifetimeDays": 7,
"features": {
"ServeRenewalInfo": true,
"IncrementRateLimits": true
"IncrementRateLimits": true,
"CheckIdentifiersPaused": true
},
"unpause": {
"hmacKey": {
"keyFile": "test/secrets/sfe_unpause_key"
},
"jwtLifetime": "336h",
"url": "https://boulder.service.consul:4003"
}
},
"syslog": {

View File

@ -4,7 +4,6 @@ package integration
import (
"context"
"os"
"strconv"
"strings"
"testing"
@ -25,10 +24,6 @@ import (
func TestIdentifiersPausedForAccount(t *testing.T) {
t.Parallel()
if !strings.Contains(os.Getenv("BOULDER_CONFIG_DIR"), "test/config-next") {
t.Skip("Skipping test as it requires the next configuration")
}
tlsCerts := &cmd.TLSConfig{
CACertFile: "test/certs/ipki/minica.pem",
CertFile: "test/certs/ipki/ra.boulder/cert.pem",

View File

@ -409,16 +409,10 @@ func setupWFE(t *testing.T) (WebFrontEndImpl, clock.FakeClock, requestSigner) {
txnBuilder, err := ratelimits.NewTransactionBuilder("../test/config-next/wfe2-ratelimit-defaults.yml", "")
test.AssertNotError(t, err, "making transaction composer")
var unpauseSigner unpause.JWTSigner
var unpauseLifetime time.Duration
var unpauseURL string
if os.Getenv("BOULDER_CONFIG_DIR") == "test/config-next" {
unpauseSigner, err = unpause.NewJWTSigner(cmd.HMACKeyConfig{KeyFile: "../test/secrets/sfe_unpause_key"})
test.AssertNotError(t, err, "making unpause signer")
unpauseLifetime = time.Hour * 24 * 14
unpauseURL = "https://boulder.service.consul:4003"
}
unpauseSigner, err := unpause.NewJWTSigner(cmd.HMACKeyConfig{KeyFile: "../test/secrets/sfe_unpause_key"})
test.AssertNotError(t, err, "making unpause signer")
unpauseLifetime := time.Hour * 24 * 14
unpauseURL := "https://boulder.service.consul:4003"
wfe, err := NewWebFrontEndImpl(
stats,
fc,