hashicorp / nomad

Nomad is an easy-to-use, flexible, and performant workload orchestrator that can deploy a mix of microservice, batch, containerized, and non-containerized applications. Nomad is easy to operate and scale and has native Consul and Vault integrations.
https://www.nomadproject.io/
Other
14.76k stars 1.94k forks source link

Inconsistent Spelling of Cancelled/Canceled #23431

Open lattwood opened 2 months ago

lattwood commented 2 months ago

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

tgross commented 2 months ago

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:

jrasell commented 2 months ago

🇬🇧

lattwood commented 2 months ago

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