Skip to content

Commit c5656f7

Browse files
authored
fixing lint on stripping metadata from dataclass types (#626) (#6177) (#631)
## Overview Fixing the[ lint errors](#6177) from upstreaming [this PR](https://github.com/unionai/flyte/pull/626). This means that OSS and the fork remain consistent. ## Test Plan This was tested as part of the original work. ## Rollout Plan (if applicable) This PR does not effect functionality at all, it is purely cosmetic. ## Upstream Changes Should this change be upstreamed to OSS (flyteorg/flyte)? If not, please uncheck this box, which is used for auditing. Note, it is the responsibility of each developer to actually upstream their changes. See [this guide](https://unionai.atlassian.net/wiki/spaces/ENG/pages/447610883/Flyte+-+Union+Cloud+Development+Runbook/#When-are-versions-updated%3F). - [ ] To be upstreamed to OSS ## Issue https://linear.app/unionai/issue/COR-2720/strip-metadata-from-dataclass-types-in-flyteworkflow-crd-interfaces ## Checklist * [ ] Added tests * [ ] Ran a deploy dry run and shared the terraform plan * [ ] Added logging and metrics * [ ] Updated [dashboards](https://unionai.grafana.net/dashboards) and [alerts](https://unionai.grafana.net/alerting/list) * [ ] Updated documentation
1 parent 57134f5 commit c5656f7

File tree

1 file changed

+4
-4
lines changed
  • flytepropeller/pkg/compiler/transformers/k8s

1 file changed

+4
-4
lines changed

flytepropeller/pkg/compiler/transformers/k8s/utils.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@ func StripTypeMetadata(t *core.LiteralType) *core.LiteralType {
9898
}
9999

100100
// strip metadata from dataclass types
101-
if c.Structure != nil && len(c.Structure.DataclassType) > 0 {
102-
dataclassTypes := make(map[string]*core.LiteralType, len(c.Structure.DataclassType))
103-
for k, v := range c.Structure.DataclassType {
101+
if c.GetStructure() != nil && len(c.GetStructure().GetDataclassType()) > 0 {
102+
dataclassTypes := make(map[string]*core.LiteralType, len(c.GetStructure().GetDataclassType()))
103+
for k, v := range c.GetStructure().GetDataclassType() {
104104
dataclassTypes[k] = StripTypeMetadata(v)
105105
}
106106

107-
c.Structure.DataclassType = dataclassTypes
107+
c.GetStructure().DataclassType = dataclassTypes
108108
}
109109

110110
switch underlyingType := c.Type.(type) {

0 commit comments

Comments
 (0)