-
Notifications
You must be signed in to change notification settings - Fork 112
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
Simple hosts masks. Question. #604
Comments
Yes, this is mostly how we use hostmasks, BUT we have a few cases where advanced users actually use regexes to pick out specific hosts they want. So, if you make this a global config flag, we will need to leave this to the more complex regex setting until we find a a good way to make all the users happy. I think this is valuable but for us it comes with a long migration path. |
Job can have a parameter (flag) use complex regex or simple "find". |
Sounds good! |
Now find function is used to match hosts mask and hosts exclude mask. This is the default behaviour for user, job and branch. You can configure user, job and branch to use Regular Expressions. If a new job does not have hosts_mask_type parameter, user host mask type will be used. References #604.
Now find function is used to match hosts mask and hosts exclude mask. ps |
Nice, does it already include the splitting at "|"? |
Yes, default separators are |
Hello! |
Yes, I agree. |
We have not tested yet, but will definately. Are you seeing performance improvements in prod? |
No. As we are using hosts masks not so often just in some special cases. ps |
I was testing this yesterday. It worked great. Thank you. I noticed, that our CPU usage did only go down slightly. Then I understood, this is because of the dependency masks. We have lots of Block dependency and job dependency masks like: |
Are you sure that block masks slows afserver? |
Hm ok, this makes it unlikely then. Could it be Job depend masks or global job depend mask? |
May be, job depend masks are regex only. |
It works fine for us. Issue can be closed. |
I think it will more handy if consts mask will use "contain" not "match".
If "contain" you can just write
my-blade
and notmy-blade.*
to render on allmy-blade-###
.It is more user-friendly, I think.
In most cases regular expressions are not needed.
We can just "find" some string, and not run heavy
std::regex::match
function.It will work tens times faster.
We can add an option, use "regex" or just "find". It can be a user or (and) job parameter.
Also we can use "find" with "split" by "|" (or just space or comma):
my-blade|his-blade
will run onmy-blade-###
andhis-blade-###
without regular expressions.What do you think?
The text was updated successfully, but these errors were encountered: