funkyfuture / deck-chores

A job scheduler for Docker containers, configured via labels.
https://deck-chores.readthedocs.io/
ISC License
197 stars 27 forks source link

_ are not allowed in job-name, but used as example #64

Closed Sadrak closed 3 years ago

Sadrak commented 3 years ago

https://github.com/funkyfuture/deck-chores/blob/master/docs/usage.rst#containers-without-an-enduring-main-process

      deck-chores.daily_job.interval: daily

VS

https://github.com/funkyfuture/deck-chores/blob/538d9f52b25c18cf36bb4c9aedc97e438fb9ec0e/deck_chores/parsers.py#L126

A job name can consist of lower-case letters, digits and dashes.

Sadrak commented 3 years ago

I really would love that deck-chores don't interfere in our naming convention and allow everything that is possible.

funkyfuture commented 3 years ago

good catch. i remember that i once explained the design decision in an issue, but can't find it atm.

what is your naming convention / would allowing underscores suffice to match it?

Sadrak commented 3 years ago

In #55 you explain your design decision.

Our naming convention is [a-zA-Z0-9_-] and it would be awesome if you could allow this.

funkyfuture commented 3 years ago

since i still find this rationale reasonable:

yes, this is intended (and not documented) to enforce a style i consider preferable and in alignment with the compose file schema. all-uppercase tokens should be used for environment variable names only. it also eliminates the slight risk of errors caused by mistakes by mistyping or the usage of different forms in various places (declarations in images and intended overrides for containers).

(yes, it reduces typo-induced bug reports ;-))

i'd say, i welcome a patch that makes that constraint configurable with the current one as default.

funkyfuture commented 3 years ago

an implementation of this is proposed in #65.