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

Unhandled error #242

Closed
dholbach opened this issue Oct 27, 2021 · 0 comments · Fixed by #258
Closed

Unhandled error #242

dholbach opened this issue Oct 27, 2021 · 0 comments · Fixed by #258
Assignees

Comments

@dholbach
Copy link
Member

From Ada Logics:

Unhandled error in the image-automation controller, despite the error being assigned to a variable, which can lead to undefined behaviour.

var signingEntity *openpgp.Entity
if gitSpec.Commit.SigningKey != nil {
signingEntity, err = r.getSigningEntity(ctx, auto)
}

Recommendation
We propose to change the above code to the following:

var signingEntity *openpgp.Entity
if gitSpec.Commit.SigningKey != nil {
    if signingEntity, err = r.getSigningEntity(ctx, auto); err != nil {
        failWithError(err)
    }
}
@relu relu self-assigned this Nov 4, 2021
relu added a commit that referenced this issue Nov 4, 2021
Fixes #242

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
@relu relu closed this as completed in #258 Nov 5, 2021
souleb pushed a commit to souleb/image-automation-controller that referenced this issue Mar 12, 2024
Fixes fluxcd#242

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
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 a pull request may close this issue.

2 participants