Drone build fails when Drone commit sha is all numbers

We’ve come across an issue where our drone build fails if the commit sha happens to be all numbers. Most of the time the tag is comprised of both numbers and letters, however, a couple times this past week when it would be all numbers it would happen to fail. In one particular case we received the error:

error: json: cannot unmarshal number into Go struct field Image.images.newTag of type string

The workaround we did was to simply commit and push changes to our code which kick started a new build and thus a new commit sha.

We have wrapped the “${DRONE_COMMIT_SHA:0:8}” with quotes as mentioned here:

Any idea what can be done to prevent this from recurring?

Best regards,
Sam

quoting the value ensures it is passed as a string instead of a number, which means parsing is the responsibility of the plugin.

error: json: cannot unmarshal number into Go struct field Image.images.newTag of type string

which plugin does this come from and how does the plugin parse its input?

the plugin is our own custom image which is a combination of plugins/docker and bitnami/kubectl:1.19.2. Not sure how it parses its input to be quite frank.

error: json: cannot unmarshal number into Go struct field Image.images.newTag of type string

this error looks like it comes from the plugin. so my recommendation would be to look at how the plugin unmarshals values.