-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
FIPS Compliance: Refactor Entrypoint, Remove zap Dependency & Update Build Checks #8544
base: main
Are you sure you want to change the base?
FIPS Compliance: Refactor Entrypoint, Remove zap Dependency & Update Build Checks #8544
Conversation
/kind-cleanup |
b4c40b2
to
d2c70d5
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
/test check-pr-has-kind-label |
@PuneetPunamiya: The specified target(s) for
The following commands are available to trigger optional jobs:
Use In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/retest |
/test check-pr-has-kind-label |
@PuneetPunamiya: The specified target(s) for
The following commands are available to trigger optional jobs:
Use In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/test all |
/kind cleanup |
The following is the coverage report on the affected files.
|
@@ -311,7 +307,8 @@ func (e Entrypointer) Go() error { | |||
resultPath = e.ResultsDirectory | |||
} | |||
if err := e.readResultsFromDisk(ctx, resultPath, result.TaskRunResultType); err != nil { | |||
logger.Fatalf("Error while handling results: %s", err) | |||
slog.Error("Error while substituting step artifacts: ", slog.Any("error", err)) | |||
return err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious why log.Fatalf
is replaced with logger.Fatalf
in other places, but why are slog.Error
used in these two instances?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah good catch, I did use log.Fatalf
but the issue was it was giving golang lint error as log.Fatalf will exit, and defer cancel() will not run
, hence I did use slog.Error
11834ef
to
d2c70d5
Compare
The following is the coverage report on the affected files.
|
/retest |
The following is the coverage report on the affected files.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PuneetPunamiya it doesn't compile with disable_tls
🤔
go build -tags disable_tls ./cmd/entrypoint
# github.com/tektoncd/pipeline/pkg/apis/version
pkg/apis/version/featureflags_validation.go:24:39: undefined: config.ValidateEnabledAPIFields
# github.com/tektoncd/pipeline/pkg/apis/pipeline/v1
pkg/apis/pipeline/v1/container_validation.go:35:28: undefined: config.ValidateEnabledAPIFields
pkg/apis/pipeline/v1/container_validation.go:45:28: undefined: config.ValidateEnabledAPIFields
pkg/apis/pipeline/v1/container_validation.go:49:30: undefined: config.FromContextOrDefaults
pkg/apis/pipeline/v1/container_validation.go:62:15: undefined: config.FromContextOrDefaults
pkg/apis/pipeline/v1/matrix_types.go:296:39: undefined: config.FromContextOrDefaults
pkg/apis/pipeline/v1/param_types.go:156:14: undefined: config.FromContextOrDefaults
pkg/apis/pipeline/v1/param_types.go:332:23: undefined: substitution.ExtractArrayIndexingParamsExpressions
pkg/apis/pipeline/v1/param_types.go:334:31: undefined: substitution.ExtractIndexString
pkg/apis/pipeline/v1/param_types.go:583:34: undefined: substitution.StripStarVarSubExpression
pkg/apis/pipeline/v1/param_types.go:663:35: undefined: substitution.ValidateWholeArrayOrObjectRefInStringVariable
pkg/apis/pipeline/v1/param_types.go:663:35: too many errors
) | ||
|
||
const ( | ||
TektonHermeticEnvVar = "TEKTON_HERMETIC" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is duplicated between here and pkg/pod
or did we move it from pkg/pod
to here ?
Ideally, if it's duplicated, we would need to move it to a constant
package that we can import without having other packages imported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it is duplicated
When you said we need to move it to a constant
package you mean under pkd/pod/constants
?
These errors are because of |
f73b726
to
54b6e02
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
54b6e02
to
2b76a2d
Compare
The following is the coverage report on the affected files.
|
2b76a2d
to
e6ffdb9
Compare
The following is the coverage report on the affected files.
|
/retest |
e6ffdb9
to
fd1176e
Compare
The following is the coverage report on the affected files.
|
/hold cancel |
go-version-file: "go.mod" | ||
- name: build | ||
run: | | ||
go build -v -tags "disable_spire,disable_tls" ./cmd/entrypoint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maye be we can check the build for tls symbols ?
go tool nm bin/entrypoint | grep -E 'tls'
Or may be we need to check for crypto once Vibhav PR is merged
go tool nm bin/entrypoint | grep -E 'crypto|tls'
Signed-off-by: PuneetPunamiya <[email protected]>
Signed-off-by: PuneetPunamiya <[email protected]>
Signed-off-by: PuneetPunamiya <[email protected]>
This will help to verify the build for entrypoint using `disable_tls` and `disable_spire` flags Signed-off-by: PuneetPunamiya <[email protected]>
fd1176e
to
e627e0d
Compare
The following is the coverage report on the affected files.
|
/approve |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jkhelil The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
apis/pipeline/v1/types
disable_tls
flagFixes: #8531 (one part of the issue)
Changes
corev1
API package is now split because it imports crypto-related functionsdisable_tls
to conditionally exclude crypto related dependenciesSubmitter Checklist
As the author of this PR, please check off the items in this checklist:
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes