Skip to content

Migrate commands over to TLogPolicy - #1163

Merged
AlCutter merged 1 commit into
migrate_tlog_policy_3from
migrate_tlog_policy_4
Sep 10, 2026
Merged

Migrate commands over to TLogPolicy#1163
AlCutter merged 1 commit into
migrate_tlog_policy_3from
migrate_tlog_policy_4

Conversation

@AlCutter

@AlCutter AlCutter commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

This PR updates the binaries under cmd to use the formats/policy package.

Towards #1152

@AlCutter
AlCutter force-pushed the migrate_tlog_policy_4 branch from db2262b to 526581d Compare September 8, 2026 15:01
@AlCutter
AlCutter force-pushed the migrate_tlog_policy_4 branch from 526581d to 0a4839a Compare September 8, 2026 15:09
@AlCutter AlCutter changed the title migrate tlog policy 4 Migrate commands over to TLogPolicy Sep 8, 2026
@AlCutter
AlCutter force-pushed the migrate_tlog_policy_4 branch from 0a4839a to 78ef7c7 Compare September 8, 2026 15:23
@AlCutter
AlCutter requested a review from roger2hk September 8, 2026 15:28
@AlCutter
AlCutter marked this pull request as ready for review September 8, 2026 15:29
@AlCutter
AlCutter requested a review from a team as a code owner September 8, 2026 15:29
@AlCutter
AlCutter force-pushed the migrate_tlog_policy_4 branch from 78ef7c7 to 0d16e13 Compare September 9, 2026 11:27

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.50.

Benchmark suite Current: 359b214 Previous: f1f48c4 Ratio
BenchmarkDedup (github.com/transparency-dev/tessera) 5204525 ns/op 899884 B/op 18759 allocs/op 2207022 ns/op 886850 B/op 18650 allocs/op 2.36
BenchmarkDedup (github.com/transparency-dev/tessera) - ns/op 5204525 ns/op 2207022 ns/op 2.36
BenchmarkLeafBundle_UnmarshalText (github.com/transparency-dev/tessera/api) 11116 ns/op 6528 B/op 1 allocs/op 1351 ns/op 6528 B/op 1 allocs/op 8.23
BenchmarkLeafBundle_UnmarshalText (github.com/transparency-dev/tessera/api) - ns/op 11116 ns/op 1351 ns/op 8.23
BenchmarkProofBuilder/InclusionProof/WarmCache (github.com/transparency-dev/tessera/client) 147558 ns/op 15355 B/op 180 allocs/op 56548 ns/op 15353 B/op 180 allocs/op 2.61
BenchmarkProofBuilder/InclusionProof/WarmCache (github.com/transparency-dev/tessera/client) - ns/op 147558 ns/op 56548 ns/op 2.61
BenchmarkProofBuilder/InclusionProof/ColdCache (github.com/transparency-dev/tessera/client) 1597665 ns/op 689109 B/op 3555 allocs/op 554836 ns/op 689106 B/op 3555 allocs/op 2.88
BenchmarkProofBuilder/InclusionProof/ColdCache (github.com/transparency-dev/tessera/client) - ns/op 1597665 ns/op 554836 ns/op 2.88
BenchmarkProofBuilder/ConsistencyProof/WarmCache (github.com/transparency-dev/tessera/client) 141685 ns/op 15439 B/op 180 allocs/op 56420 ns/op 15411 B/op 180 allocs/op 2.51
BenchmarkProofBuilder/ConsistencyProof/WarmCache (github.com/transparency-dev/tessera/client) - ns/op 141685 ns/op 56420 ns/op 2.51

This comment was automatically generated by workflow using github-action-benchmark.

@AlCutter
AlCutter force-pushed the migrate_tlog_policy_4 branch from 0d16e13 to 3c80ce1 Compare September 9, 2026 11:31
if err != nil {
var wPol policy.TLogPolicy
if err := wPol.Unmarshal(f); err != nil {
slog.ErrorContext(ctx, "Failed to create witness group from policy", slog.Any("error", err))

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.

Suggested change
slog.ErrorContext(ctx, "Failed to create witness group from policy", slog.Any("error", err))
slog.ErrorContext(ctx, "Failed to parse witness policy", slog.Any("error", err))

t.Fatalf("NewWitnessGroupFromPolicy: %v", err)
var mirrorPolicy policy.TLogPolicy
if err := mirrorPolicy.Unmarshal(mirrorPolicyRaw); err != nil {
t.Fatalf("policy.Unmarshal: %v", err)

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.

Suggested change
t.Fatalf("policy.Unmarshal: %v", err)
t.Fatalf("mirrorPolicy.Unmarshal: %v", err)

@AlCutter
AlCutter force-pushed the migrate_tlog_policy_4 branch from 3c80ce1 to 359b214 Compare September 10, 2026 10:53
@AlCutter
AlCutter merged commit 7f49607 into main Sep 10, 2026
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants