Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor reporter for unseal setup #20296

Merged
merged 2 commits into from
Apr 21, 2023
Merged

Refactor reporter for unseal setup #20296

merged 2 commits into from
Apr 21, 2023

Conversation

mpalmi
Copy link
Contributor

@mpalmi mpalmi commented Apr 21, 2023

@mpalmi mpalmi requested review from raskchanky, miagilepner, hghaf099, akshya96 and a team April 21, 2023 17:05
@mpalmi mpalmi added this to the 1.14 milestone Apr 21, 2023
@@ -2362,6 +2365,11 @@ func (s standardUnsealStrategy) unseal(ctx context.Context, logger log.Logger, c
if err := c.setupAuditedHeadersConfig(ctx); err != nil {
return err
}

if err := c.setupCensusAgent(); err != nil {
c.logger.Error("skipping reporting for nil agent", "error", err)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Won't this code run in ent as well? How do we know this is a "nil agent"?

Copy link
Contributor Author

@mpalmi mpalmi Apr 21, 2023

Choose a reason for hiding this comment

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

Good question. If setupCensusAgent errors out, the agent will be nil, so this assertion holds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants