Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,18 @@ update-crd: update-codegen-script update-codegen-crds
# Create CRD from scratch using the 'crd' generator instead of 'schemapatch'
# This target can regenerate the CRD even if it doesn't exist, unlike update-crd
# which uses 'schemapatch' and only patches existing CRDs.
#
# The 'crd' generator emits a different YAML format (leading '---', different list
# indentation and field ordering) than 'schemapatch', which is what CI verifies via
# verify-codegen-crds. Committing the raw 'crd' output therefore fails CI. To avoid
# that trap, always follow up with update-codegen-crds (schemapatch) to normalize the
# file into the canonical, CI-clean form before it lands in ./artifacts.
create-crd: update-codegen-script ensure-controller-gen
'$(CONTROLLER_GEN)' \
crd \
paths="./pkg/apis/release/v1alpha1" \
'output:crd:dir=./artifacts'
$(MAKE) update-codegen-crds
.PHONY: create-crd

sonar-reports:
Expand Down
2 changes: 1 addition & 1 deletion cmd/release-controller/audit_backend_gcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func NewGCSAuditStore(bucket string, prefix, userAgent, serviceAccountPath strin
options = append(options, option.WithUserAgent(userAgent))
}
if len(serviceAccountPath) > 0 {
options = append(options, option.WithCredentialsFile(serviceAccountPath))
options = append(options, option.WithAuthCredentialsFile(option.ServiceAccount, serviceAccountPath))
}
client, err := storage.NewClient(
context.Background(),
Expand Down
8 changes: 4 additions & 4 deletions cmd/release-controller/config_validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ func TestValidateQualifiersConfiguration(t *testing.T) {
},
Qualifiers: releasequalifiers.ReleaseQualifiers{
"test": {
Enabled: releasequalifiers.BoolPtr(false),
Enabled: new(false),
BadgeName: "TEST",
Description: "An updated description when displaying badge details",
PayloadBadgeStatus: releasequalifiers.BadgeStatusNo,
Expand All @@ -672,8 +672,8 @@ func TestValidateQualifiersConfiguration(t *testing.T) {
},
Qualifiers: releasequalifiers.ReleaseQualifiers{
"sdn-migration": {
Approval: releasequalifiers.BoolPtr(true),
Enabled: releasequalifiers.BoolPtr(true),
Approval: new(true),
Enabled: new(true),
BadgeName: "SDN Migration",
},
},
Expand All @@ -694,7 +694,7 @@ func TestValidateQualifiersConfiguration(t *testing.T) {
},
Qualifiers: releasequalifiers.ReleaseQualifiers{
"sdn-migration": {
Approval: releasequalifiers.BoolPtr(false),
Approval: new(false),
BadgeName: "SDN Migration",
},
},
Expand Down
4 changes: 2 additions & 2 deletions cmd/release-controller/sync_release.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,8 @@ func newReleaseJobBase(name, cliImage, pullSecretName string) (*batchv1.Job, str
Annotations: map[string]string{},
},
Spec: batchv1.JobSpec{
Parallelism: releasecontroller.Int32p(1),
BackoffLimit: releasecontroller.Int32p(3),
Parallelism: new(int32(1)),
BackoffLimit: new(int32(3)),
Template: corev1.PodTemplateSpec{
Spec: corev1.PodSpec{
ServiceAccountName: "builder",
Expand Down
14 changes: 7 additions & 7 deletions cmd/release-controller/sync_release_payload_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ func TestNewReleasePayload(t *testing.T) {
},
Qualifiers: releasequalifiers.ReleaseQualifiers{
"qual-a": releasequalifiers.ReleaseQualifier{
Enabled: releasequalifiers.BoolPtr(true),
Enabled: new(true),
BadgeName: "QA",
Summary: "Qualifier A",
},
Expand Down Expand Up @@ -665,7 +665,7 @@ func TestNewReleasePayload(t *testing.T) {
CIConfigurationJobName: "periodic-ci-openshift-release-master-nightly-4.12-e2e-aws-sdn-serial",
Qualifiers: releasequalifiers.ReleaseQualifiers{
"qual-a": releasequalifiers.ReleaseQualifier{
Enabled: releasequalifiers.BoolPtr(true),
Enabled: new(true),
BadgeName: "QA",
Summary: "Qualifier A",
},
Expand Down Expand Up @@ -697,7 +697,7 @@ func TestNewReleasePayload(t *testing.T) {
},
Qualifiers: releasequalifiers.ReleaseQualifiers{
"qual-b": releasequalifiers.ReleaseQualifier{
Enabled: releasequalifiers.BoolPtr(true),
Enabled: new(true),
BadgeName: "QB",
Summary: "Qualifier B",
},
Expand Down Expand Up @@ -735,7 +735,7 @@ func TestNewReleasePayload(t *testing.T) {
CIConfigurationJobName: "aggregated-job-with-qualifiers-release-openshift-release-analysis-aggregator",
Qualifiers: releasequalifiers.ReleaseQualifiers{
"qual-b": releasequalifiers.ReleaseQualifier{
Enabled: releasequalifiers.BoolPtr(true),
Enabled: new(true),
BadgeName: "QB",
Summary: "Qualifier B",
},
Expand All @@ -749,7 +749,7 @@ func TestNewReleasePayload(t *testing.T) {
AnalysisJobCount: 10,
Qualifiers: releasequalifiers.ReleaseQualifiers{
"qual-b": releasequalifiers.ReleaseQualifier{
Enabled: releasequalifiers.BoolPtr(true),
Enabled: new(true),
BadgeName: "QB",
Summary: "Qualifier B",
},
Expand All @@ -764,8 +764,8 @@ func TestNewReleasePayload(t *testing.T) {
},
},
{
name: "RealWorldExample",
release: &releasecontroller.Release{
name: "RealWorldExample",
release: &releasecontroller.Release{
Config: &releasecontroller.ReleaseConfig{
Name: "4.11-art-latest",
},
Expand Down
4 changes: 2 additions & 2 deletions cmd/release-controller/sync_verify_prow.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ func (c *Controller) ensureProwJobForReleaseTag(release *releasecontroller.Relea
periodicConfig, ok := hasProwJob(config, jobName)
if !ok {
err := fmt.Errorf("the prow job %s is not valid: no job with that name", jobName)
c.eventRecorder.Eventf(release.Source, corev1.EventTypeWarning, "ProwJobInvalid", err.Error())
c.eventRecorder.Event(release.Source, corev1.EventTypeWarning, "ProwJobInvalid", err.Error())
return nil, releasecontroller.CreateTerminalError(err)
}
if err := validateProwJob(periodicConfig); err != nil {
err := fmt.Errorf("the prowjob %s is not valid: %v", jobName, err)
c.eventRecorder.Eventf(release.Source, corev1.EventTypeWarning, "ProwJobInvalid", err.Error())
c.eventRecorder.Event(release.Source, corev1.EventTypeWarning, "ProwJobInvalid", err.Error())
return nil, releasecontroller.CreateTerminalError(err)
}

Expand Down
Loading