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

Update Cue v0.9.0 -> v0.12.0 #575

Merged
merged 1 commit into from
Mar 7, 2025
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@

package config

import (
"time"
"github.com/tektoncd/pipeline/pkg/apis/pipeline/pod"
)
import "github.com/tektoncd/pipeline/pkg/apis/pipeline/pod"

// DefaultTimeoutMinutes is used when no timeout is specified.
#DefaultTimeoutMinutes: 60

// NoTimeoutDuration is used when a pipeline or task should never time out.
#NoTimeoutDuration: time.#Duration & 0
#NoTimeoutDuration: int & 0

// DefaultServiceAccountValue is the SA used when one is not specified.
#DefaultServiceAccountValue: "default"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ _#sinkKey: "sink"
#FormatTektonV1

// EventFormats is a set of event formats
#EventFormats: {[string]: {
}}
#EventFormats: {[string]: {}}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ package config

import sc "github.com/tektoncd/pipeline/pkg/spire/config"

_#cfgKey: {
}
_#cfgKey: {}

// Config holds the collection of configurations that we attach to contexts.
// +k8s:deepcopy-gen=false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ import (
spec?: #CustomRunSpec @go(Spec)

// +optional
status?: runv1beta1.#CustomRunStatus @go(Status)
status?: runv1beta1.#CustomRunStatus @go(Status,CustomRunStatus)
}

// CustomRunList contains a list of CustomRun
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ import (
description?: string @go(Description)

// Value the expression used to retrieve the value
value: #ParamValue @go(Value)
value: #ParamValue @go(Value,ResultValue)
}

// PipelineTaskMetadata contains the labels or annotations for an EmbeddedTask
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ import (
timeout?: null | metav1.#Duration @go(Timeout,*metav1.Duration)

// PodTemplate holds pod specific configuration
podTemplate?: null | pod.#Template @go(PodTemplate,*pod.Template)
podTemplate?: null | pod.#Template @go(PodTemplate,*pod.PodTemplate)

// Workspaces holds a set of workspace bindings that must match names
// with those declared in the pipeline.
Expand Down Expand Up @@ -327,7 +327,7 @@ import (
name: string @go(Name)

// Value is the result returned from the execution of this PipelineRun
value: #ParamValue @go(Value)
value: #ParamValue @go(Value,ResultValue)
}

// PipelineRunTaskRunStatus contains the name of the PipelineTask for this TaskRun and the TaskRun's Status
Expand All @@ -352,7 +352,7 @@ import (

// Status is the CustomRunStatus for the corresponding CustomRun or Run
// +optional
status?: null | v1beta1.#CustomRunStatus @go(Status,*github.com/tektoncd/pipeline/pkg/apis/run/v1beta1.CustomRunStatus)
status?: null | v1beta1.#CustomRunStatus @go(Status,*CustomRunStatus)

// WhenExpressions is the list of checks guarding the execution of the PipelineTask
// +optional
Expand Down Expand Up @@ -381,7 +381,7 @@ import (
#PipelineTaskRunSpec: {
pipelineTaskName?: string @go(PipelineTaskName)
taskServiceAccountName?: string @go(TaskServiceAccountName)
taskPodTemplate?: null | pod.#Template @go(TaskPodTemplate,*pod.Template)
taskPodTemplate?: null | pod.#Template @go(TaskPodTemplate,*pod.PodTemplate)

// +listType=atomic
stepOverrides?: [...#TaskRunStepOverride] @go(StepOverrides,[]TaskRunStepOverride)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import (
name: string @go(Name)

// Type is the type of the PipelineResource.
type: string @go(Type)
type: string @go(Type,PipelineResourceType)

// Optional declares the resource as optional.
// optional: true - the resource is considered optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ package v1beta1
type?: #ResultsType @go(Type)

// Value the given value of the result
value: #ParamValue @go(Value)
value: #ParamValue @go(Value,ResultValue)
}

// ResultValue is a type alias of ParamValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import (
timeout?: null | metav1.#Duration @go(Timeout,*metav1.Duration)

// PodTemplate holds pod specific configuration
podTemplate?: null | pod.#Template @go(PodTemplate,*pod.Template)
podTemplate?: null | pod.#Template @go(PodTemplate,*pod.PodTemplate)

// Workspaces is a list of WorkspaceBindings from volumes to workspaces.
// +optional
Expand Down Expand Up @@ -225,7 +225,7 @@ import (
// Deprecated: this field is not populated and is preserved only for backwards compatibility
// +optional
// +listType=atomic
resourcesResult?: [...result.#RunResult] @go(ResourcesResult,[]github.com/tektoncd/pipeline/pkg/result.RunResult)
resourcesResult?: [...result.#RunResult] @go(ResourcesResult,[]PipelineResourceResult)

// TaskRunResults are the list of results written out by the task's containers
// +optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
// do not have a status
//
// Deprecated: Unused, preserved only for backwards compatibility
#PipelineResourceStatus: {
}
#PipelineResourceStatus: {}

// PipelineResourceSpec defines an individual resources used in the pipeline.
//
Expand All @@ -50,7 +49,7 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
// used to populate a UI.
// +optional
description?: string @go(Description)
type: string @go(Type)
type: string @go(Type,PipelineResourceType)

// +listType=atomic
params: [...#ResourceParam] @go(Params,[]ResourceParam)
Expand Down Expand Up @@ -93,7 +92,7 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
name: string @go(Name)

// Type is the type of this resource;
type: string @go(Type)
type: string @go(Type,PipelineResourceType)

// Description is a user-facing description of the declared resource that may be
// used to populate a UI.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ import (
// provided instead of TriggerBinding, Interceptors and TriggerTemplate
#EventListenerTrigger: {
// +listType=atomic
bindings?: [...null | #TriggerSpecBinding] @go(Bindings,[]*TriggerSpecBinding)
template?: null | #TriggerSpecTemplate @go(Template,*TriggerSpecTemplate)
bindings?: [...null | #TriggerSpecBinding] @go(Bindings,[]*EventListenerBinding)
template?: null | #TriggerSpecTemplate @go(Template,*EventListenerTemplate)
triggerRef?: string @go(TriggerRef)

// +optional
name?: string @go(Name)

// +listType=atomic
interceptors?: [...null | #TriggerInterceptor] @go(Interceptors,[]*TriggerInterceptor)
interceptors?: [...null | #TriggerInterceptor] @go(Interceptors,[]*EventInterceptor)

// ServiceAccountName optionally associates credentials with each trigger;
// more granular authorization for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
}

// TriggerBindingStatus defines the observed state of TriggerBinding.
#TriggerBindingStatus: {
}
#TriggerBindingStatus: {}

// TriggerBinding defines a mapping of an input event to parameters. This is used
// to extract information from events to be passed to TriggerTemplates within a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
#TriggerResourceTemplate: _

// TriggerTemplateStatus describes the desired state of TriggerTemplate
#TriggerTemplateStatus: {
}
#TriggerTemplateStatus: {}

// TriggerTemplate takes parameters and uses them to create CRDs
//
Expand Down
21 changes: 3 additions & 18 deletions cue.mod/gen/k8s.io/api/core/v1/types_go_gen.cue
Original file line number Diff line number Diff line change
Expand Up @@ -5069,11 +5069,7 @@ import (

// for backwards compat
// +enum
#ServiceInternalTrafficPolicyType: #ServiceInternalTrafficPolicy // #enumServiceInternalTrafficPolicyType

#enumServiceInternalTrafficPolicyType:
#ServiceInternalTrafficPolicyCluster |
#ServiceInternalTrafficPolicyLocal
#ServiceInternalTrafficPolicyType: #ServiceInternalTrafficPolicy

// ServiceExternalTrafficPolicy describes how nodes distribute service traffic they
// receive on one of the Service's "externally-facing" addresses (NodePorts, ExternalIPs,
Expand All @@ -5097,13 +5093,7 @@ import (

// for backwards compat
// +enum
#ServiceExternalTrafficPolicyType: #ServiceExternalTrafficPolicy // #enumServiceExternalTrafficPolicyType

#enumServiceExternalTrafficPolicyType:
#ServiceExternalTrafficPolicyCluster |
#ServiceExternalTrafficPolicyLocal |
#ServiceExternalTrafficPolicyTypeLocal |
#ServiceExternalTrafficPolicyTypeCluster
#ServiceExternalTrafficPolicyType: #ServiceExternalTrafficPolicy

#ServiceExternalTrafficPolicyTypeLocal: #ServiceExternalTrafficPolicy & "Local"
#ServiceExternalTrafficPolicyTypeCluster: #ServiceExternalTrafficPolicy & "Cluster"
Expand Down Expand Up @@ -5206,12 +5196,7 @@ import (

// for backwards compat
// +enum
#IPFamilyPolicyType: #IPFamilyPolicy // #enumIPFamilyPolicyType

#enumIPFamilyPolicyType:
#IPFamilyPolicySingleStack |
#IPFamilyPolicyPreferDualStack |
#IPFamilyPolicyRequireDualStack
#IPFamilyPolicyType: #IPFamilyPolicy

// ServiceSpec describes the attributes that a user creates on a service.
#ServiceSpec: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,7 @@ import (
// * exposes a /status subresource for the custom resource
// * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza
// * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza
#CustomResourceSubresourceStatus: {
}
#CustomResourceSubresourceStatus: {}

// CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.
#CustomResourceSubresourceScale: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1206,8 +1206,7 @@ import (
}

// Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.
#Patch: {
}
#Patch: {}

// A label selector is a label query over a set of resources. The result of matchLabels and
// matchExpressions are ANDed. An empty label selector matches all objects. A null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ package runtime

// SimpleAllocator a wrapper around make([]byte)
// conforms to the MemoryAllocator interface
#SimpleAllocator: {
}
#SimpleAllocator: {}
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ _#base64Serializer: {
_#internalGroupVersionerIdentifier: "internal"
_#disabledGroupVersionerIdentifier: "disabled"

_#internalGroupVersioner: {
}
_#internalGroupVersioner: {}

_#disabledGroupVersioner: {
}
_#disabledGroupVersioner: {}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ package runtime
// MultiObjectTyper returns the types of objects across multiple schemes in order.
#MultiObjectTyper: [...#ObjectTyper]

_#defaultFramer: {
}
_#defaultFramer: {}

// WithVersionEncoder serializes an object and ensures the GVK is set.
#WithVersionEncoder: {
Expand Down
33 changes: 11 additions & 22 deletions cue.mod/gen/knative.dev/pkg/apis/contexts_go_gen.cue
Original file line number Diff line number Diff line change
Expand Up @@ -6,57 +6,46 @@ package apis

// This is attached to contexts passed to webhook interfaces when
// the receiver being validated is being created.
_#inCreateKey: {
}
_#inCreateKey: {}

// This is attached to contexts passed to webhook interfaces when
// the receiver being validated is being deleted.
_#inDeleteKey: {
}
_#inDeleteKey: {}

// This is attached to contexts passed to webhook interfaces when
// the receiver being validated is being updated.
_#inUpdateKey: {
}
_#inUpdateKey: {}

// This is attached to contexts passed to webhook interfaces when
// the receiver being validated is being created.
_#userInfoKey: {
}
_#userInfoKey: {}

// This is attached to contexts as they are passed down through a resource
// being validated or defaulted to signal the ObjectMeta of the enclosing
// resource.
_#parentMetaKey: {
}
_#parentMetaKey: {}

// This is attached to contexts as they are passed down through a resource
// being validated or defaulted to signal that we are within a Spec.
_#inSpec: {
}
_#inSpec: {}

// This is attached to contexts as they are passed down through a resource
// being validated or defaulted to signal that we are within a Status.
_#inStatus: {
}
_#inStatus: {}

// This is attached to contexts as they are passed down through a resource
// being validated to direct them to disallow deprecated fields.
_#disallowDeprecated: {
}
_#disallowDeprecated: {}

// This is attached to contexts as they are passed down through a resource
// being validated to direct them to allow namespaces (or missing namespace)
// outside the parent (as indicated by WithinParent.
_#allowDifferentNamespace: {
}
_#allowDifferentNamespace: {}

// This is attached to contexts passed to webhook interfaces when the user
// has requested DryRun mode.
_#isDryRun: {
}
_#isDryRun: {}

// This is attached to contexts passed to webhook interfaces with
// additional context from the HTTP request.
_#httpReq: {
}
_#httpReq: {}
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
package v1

// cdKey is used for associating a CronJobDefaulter with a context.Context
_#cdKey: {
}
_#cdKey: {}
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
package v1

// cvKey is used for associating a CronJobValidator with a context.Context
_#cvKey: {
}
_#cvKey: {}
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,4 @@ package v1
address?: null | string @go(Address,*string)
}

_#isGroupAllowed: {
}
_#isGroupAllowed: {}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
package v1

// psdKey is used for associating a PodSpecDefaulter with a context.Context
_#psdKey: {
}
_#psdKey: {}

// pdKey is used for associating a PodDefaulter with a context.Context
_#pdKey: {
}
_#pdKey: {}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
package v1

// psvKey is used for associating a PodSpecValidator with a context.Context
_#psvKey: {
}
_#psvKey: {}

// pvKey is used for associating a PodValidator with a context.Context
_#pvKey: {
}
_#pvKey: {}
Loading
Loading