Skip to content

[code-gen] Scalar fields produce inconsistent capitalization in error messages between runs of the code-generator #2499

@knottnt

Description

@knottnt

Describe the bug
The error message produced for scalar fields in the boundary check for floats and ints has inconsistent capitalization of the field name between runs of the code-gen. This results in superfluous changes when making unrelated changes to controllers.

Steps to reproduce

  1. Pull the latest changes for the ecs-controller repo
  2. In code-generation re-run make build-controller
  3. See that some float/int field names will have changed in error messages for the boundary check. Note, the individual fields that have changed aren't consistent.

example field name change.

return nil, fmt.Errorf("error: field iops is of type int32") -> return nil, fmt.Errorf("error: field Iops is of type int32")

Expected outcome
No changes besides ack-generate-meta.yaml are made to the controller.

Environment

  • Kubernetes version: N/A
  • Using EKS (yes/no), if so version? N/A
  • AWS service targeted (S3, RDS, etc.) ECS, but this affects many controllers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/code-generationIssues or PRs as related to controllers or docs code generationkind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions