those constants are expected to be in the generated override pkgs. For instance,
const (
// Endpoint will have `http` traffic, typically on a TCP connection.
// It will be automaticaly promoted to `https` when the `secure` field is set to `true`
HTTPEndpointProtocolParentOverride EndpointProtocolParentOverride = "http"
// Endpoint will have `https` traffic, typically on a TCP connection
HTTPSEndpointProtocolParentOverride EndpointProtocolParentOverride = "https"
// Endpoint will have `ws` traffic, typically on a TCP connection
// It will be automaticaly promoted to `wss` when the `secure` field is set to `true`
WSEndpointProtocolParentOverride EndpointProtocolParentOverride = "ws"
// Endpoint will have `wss` traffic, typically on a TCP connection
WSSEndpointProtocolParentOverride EndpointProtocolParentOverride = "wss"
// Endpoint will have traffic on a TCP connection,
// without specifying an application protocol
TCPEndpointProtocolParentOverride EndpointProtocolParentOverride = "tcp"
// Endpoint will have traffic on an UDP connection,
// without specifying an application protocol
UDPEndpointProtocolParentOverride EndpointProtocolParentOverride = "udp"
)
Any logs, error output, screenshots etc? Provide the devfile that sees this bug, if applicable.
N/A
Additional context
Any workaround?
since those constants are string. can specify the string value directly, e.g. "http", "https".
/kind bug
Which area this bug is related to?
/area api
Bug Summary
Describe the bug:
all constants values are missing in the generated parent override & plugin override pkgs for example, endpoint protocols are defined as type
EndpointProtocol
with accepted values defined: https://github.com/devfile/api/blob/f78ab9de1a30ab6e7ebc16cbd570b3a65a3a407b/pkg/apis/workspaces/v1alpha2/endpoint.go#L10-L29but in parent/plugin override pkgs,
EndpointProtocolParentOverride
has been generated, but those constants are missing: https://github.com/devfile/api/blob/f78ab9de1a30ab6e7ebc16cbd570b3a65a3a407b/pkg/apis/workspaces/v1alpha2/zz_generated.parent_overrides.go#L597Expected behavior
those constants are expected to be in the generated override pkgs. For instance,
Any logs, error output, screenshots etc? Provide the devfile that sees this bug, if applicable.
N/A
Additional context
Any workaround?
since those constants are
string
. can specify the string value directly, e.g."http"
,"https"
.Suggestion on how to fix the bug
Roughly scanned through the code, need to edit the override/gen.go, since it only checks for
Type
's, soConst
's are skipped. https://github.com/devfile/api/blob/f78ab9de1a30ab6e7ebc16cbd570b3a65a3a407b/generator/overrides/gen.go#L84