Skip to content

Standardize logging when publishing a checkpoint#555

Merged
AlCutter merged 1 commit into
transparency-dev:mainfrom
Hayden-IO:patch-2
Mar 27, 2025
Merged

Standardize logging when publishing a checkpoint#555
AlCutter merged 1 commit into
transparency-dev:mainfrom
Hayden-IO:patch-2

Conversation

@Hayden-IO

@Hayden-IO Hayden-IO commented Mar 25, 2025

Copy link
Copy Markdown
Contributor

All storage backends will log when a new checkpoint is published.

Tiny change to standardize logging message for integration as well.

@Hayden-IO Hayden-IO requested a review from a team as a code owner March 25, 2025 17:45
@Hayden-IO Hayden-IO requested a review from phbnf March 25, 2025 17:45
Comment thread storage/posix/files.go
if err := a.s.overwrite(layout.CheckpointPath, cpRaw); err != nil {
return fmt.Errorf("overwrite(%s): %v", layout.CheckpointPath, err)
}
klog.Infof("Published latest checkpoint")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Rather than remove it entirely, how about making it a klog.V(1).Infof (or even V(2)) and include the tree size in the logged line?

@roger2hk roger2hk Mar 25, 2025

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.

@roger2hk roger2hk Mar 25, 2025

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.

The same info logging cannot be found in AWS and GCP storage implementation of publishCheckpoint. If this info log stays, should we add the same to the rest of the storage implementations?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

^ was the reason I chose to delete it, and there's already logging for when a new tree state is published with the new tree size - https://github.com/transparency-dev/trillian-tessera/blob/a60c8d23e801e11eb7511a623d144d6a7da3d0d4/storage/posix/files.go#L346

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Integration != Publishing in Tessera, and in fact these are asynchronous processes.

Tessera is not yet at a point in its maturity cycle where I'm happy for debug logging to be entirely removed, if there's a disparity between events logged in different storage backends I'd argue for adding similar logging in the other storage implementations as opposed to removing, as @roger2hk's comment above also suggests.

I am happy for debug logging to have its level moved up so that it can be enabled/disabled, which was the suggestion.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@AlCutter Added logging for checkpoint publishing for all backends.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ace, thanks!

All storage backends will log when a new checkpoint is published.

Tiny change to standardize logging message for integration as well.

Signed-off-by: Hayden B <8418760+haydentherapper@users.noreply.github.com>
@Hayden-IO Hayden-IO changed the title [Posix]: Remove log line for checkpoint publishing Standardize logging when publishing a checkpoint Mar 27, 2025
Comment thread storage/posix/files.go
if err := a.s.overwrite(layout.CheckpointPath, cpRaw); err != nil {
return fmt.Errorf("overwrite(%s): %v", layout.CheckpointPath, err)
}
klog.Infof("Published latest checkpoint")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ace, thanks!

@AlCutter AlCutter merged commit a95e1dc into transparency-dev:main Mar 27, 2025
@Hayden-IO Hayden-IO deleted the patch-2 branch March 27, 2025 14:17
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.

3 participants