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
Cannot use Interpolate in ChangeFilter #7548
Comments
What's the type of your repository=f'https://github.com/{github}' |
@tdesveaux Yes, that can do the trick, but I have many of them and some of them are more complicated, for example
|
You could use a regex in these cases with repository_re=re.compile(fr"https://username:.+@github\.com/{re.escape(github)}") If you have other cases that are more complicated, you can even use a function with (Side note, but you might be interested by PR #7543 as it would allow you to not set the secret in the URL in the future). PS: not weighting on the question of whether ChangeFilter should take renderable values, just trying to provide a solution that would work with the current release. |
Introduced in #6630. |
I have looked into this problem and unfortunately it would be complicated to re-add support of renderables to ChangeFilter and the benefit of doing so is small. Using renderable with ChangeFilter is a roundabout way of using the values directly, because the values will need to be rendered on master startup anyway. The only exception is secrets, because they come from a different source. However, if secrets are used in ChangeFilter, then the secret values are already present in various places, such as in the database and Buildbot logs. Therefore there's very little reduction of security if the secrets are specified directly in the Buildbot configuration file. I think the suggestions by @tdesveaux make sense, in particular the regex option. With that Buildbot will still perform the same filtering as before, but secret will not need to be provided at all. I have opened #7557 to improve documentation of the current behavior and the best practice. |
I think #7557 addressed this bug, please reopen if you disagree. Thanks! |
I recently upgrade buildbot to 3.11 and everything stopped working.
The error I'm getting is as below:
The line of code that had issue is
So, the issue is I'm using a method
create_job
to dynamically create my builders, and I used Interpolate to dynamically get the project name. However, in the new version it's expecting the repository to be either a string or a list of strings.How do I fix it?
The text was updated successfully, but these errors were encountered: