Skip to content

humctl fails to deploy when additional property is all numbers (edge case) #1

@OnLocation-ikokotskyi-contractor

Description

we use TAG/ COMMIT_HASH variable (first 7 symbols of git commit hash) to populate property during deployment, and this way 'insert' tag into env variable of Application.

      humctl score deploy \
        --token ${{ secrets.HUMANITEC_TOKEN }} \
        --org ${{ vars.HUMANITEC_ORG_ID }} \
        --app ${{ env.APP_NAME }} \
        --env staging \
        -f score.yaml \
        --workload-source-url "https://github.com/${{ github.repository }}/blob/${{ github.ref_name }}/score.yaml" \
        --image $CONTAINER_REGISTRY/$IMAGE:$TAG \
        --message "$COMMIT_MESSAGE" \
        --property containers.application1.variables.COMMIT_HASH=$TAG \
        --wait

Today first 7 symbols of commit hash happened to be all numbers and deployment failed with the below error.

Unexpected error occurred.
failed to convert score to delta: unexpected api response when converting score workload: 400, {"error":"HTTP-400","message":"invalid spec: '/containers/application1/variables/COMMIT_HASH' does not validate with https://score.dev/schemas/score#/properties/containers/additionalProperties/$ref/properties/variables/additionalProperties/type: expected string, but got number"}

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