Skip to content

Error setting integer-based env vars of a cf resource #73

@Spimtav

Description

@Spimtav

My partner (@athornton2012) and i ran into an interesting bug today when we

Version of concourse: 5.0.0

Background: Our team has a job which puts to a cf resource, and sets a number of env variables as it does so. We added a new env var this afternoon, which was a plain integer that represented the port of a server.

Expected: The resource upload to succeed without issue.

Actual: Received the following error message: error reading request from stdin: json: cannot unmarshal number into Go struct field Params.environment_variables of type string

As a workaround, we had to manually put the int in quotes for it to be interpolated as a string. When we did that, the error stopped and we were able to upload to the resource again

Our question is: is this intended behavior? Is the cf resource unable to process environment variables that are integers? Or is this a bug?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions