nomad icon indicating copy to clipboard operation
nomad copied to clipboard

Inconsistent Spelling of Cancelled/Canceled

Open lattwood opened this issue 1 year ago • 3 comments

Nomad version

N/A

Issue

I was digging into an unrelated issue around canceled evals and deployments, and discovered the use of inconsistent spelling for canceled!

~/src/hashicorp/nomad > ag canceled | wc -l
     166
~/src/hashicorp/nomad > ag cancelled | wc -l
     121

I would recommend going with canceled, as context.Canceled is used from the context package in the GO standard library.

Reproduction steps

See above

Expected Result

~/src/hashicorp/nomad > ag canceled | wc -l
     287
~/src/hashicorp/nomad > ag cancelled | wc -l
     0

Actual Result

See above

lattwood avatar Jun 25 '24 14:06 lattwood

Ha! Our internal style guide says to use the American spelling canceled but our team is spread across several countries and spelling habits die hard. In doc strings (which is most of the cases) it's not such a big deal. But I know the constant DeploymentStatusCanceled is spelled with two L's and that's persisted in the state store, so changing that at this point would involve a state migration. :facepalm:

tgross avatar Jun 25 '24 14:06 tgross

🇬🇧

jrasell avatar Jun 25 '24 14:06 jrasell

@tgross I got a chuckle out of EvalStatusCancelled = "canceled" :D

lattwood avatar Jun 25 '24 14:06 lattwood