-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
job: Validate job.OneShot name #10
job: Validate job.OneShot name #10
Conversation
/cc @joamaki |
15f74e6
to
10486e3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should do the same for all job types (Timer, Observer).
10486e3
to
f291110
Compare
Would you prefer to extract the fn as an common interface to avoid the |
”fn” is very specific to the job type and I can imagine we’d at some point have jobs that don’t take an ”fn”. I’d keep the ”fn” validation in the job constructor itself. |
Adds validation for job.OneShot, job.Timer, job.Observer to match regex `^[a-z][a-z0-9_\-]{0,30}$`. It avoids construction of jobs that are not usable for metrics. Signed-off-by: Ovidiu Tirla <[email protected]>
f291110
to
d22a3f8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! 💯
The new version of hive have a new format for the job names to ensure the names are compliant with the prometheus metrics. This commit ensures that StateDB Reflector Job names are compliant with the new naming convention. See cilium/hive#10. Signed-off-by: Ovidiu Tirla <[email protected]>
The new version of hive have a new format for the job names to ensure the names are compliant with the prometheus metrics. This commit ensures that all jobs are compliant with the new naming convention. See cilium/hive#10. Signed-off-by: Ovidiu Tirla <[email protected]>
The max job name was bumped to 100. #14 |
The new version of hive have a new format for the job names to ensure the names are compliant with the prometheus metrics. This commit ensures that all jobs are compliant with the new naming convention. See cilium/hive#10. Signed-off-by: Ovidiu Tirla <[email protected]>
The new version of hive have a new format for the job names to ensure the names are compliant with the prometheus metrics. This commit ensures that StateDB Reflector Job names are compliant with the new naming convention. See cilium/hive#10. Signed-off-by: Ovidiu Tirla <[email protected]>
The new version of hive have a new format for the job names to ensure the names are compliant with the prometheus metrics. This commit ensures that all jobs are compliant with the new naming convention. See cilium/hive#10. Signed-off-by: Ovidiu Tirla <[email protected]>
The new version of hive have a new format for the job names to ensure the names are compliant with the prometheus metrics. This commit ensures that StateDB Reflector Job names are compliant with the new naming convention. See cilium/hive#10. Signed-off-by: Ovidiu Tirla <[email protected]>
The new version of hive have a new format for the job names to ensure the names are compliant with the prometheus metrics. This commit ensures that all jobs are compliant with the new naming convention. See cilium/hive#10. Signed-off-by: Ovidiu Tirla <[email protected]>
Adds validation for job.OneShot to match regex
^[a-z][a-z0-9_\-]{0,30}$
. It avoids construction of jobs that are not usable for metrics.