Conversation
Travis job passed, @whimboo, @andreieftimie please have a look. |
@@ -202,10 +202,14 @@ def on_build(self, data): | |||
target_platform = self.get_platform_identifier(data['platform']) | |||
|
|||
# Check locale restrictions and stop processing if locale is not wanted | |||
if target_branch['locales'] and \ | |||
if target_branch['locales'] and not target_branch['blacklist'] and \ |
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.
I don't see why this check has been put in here. It should really be part of the following if condition.
Build passed, please check it out when you have time. |
"fa", | ||
"ff", | ||
"ku" | ||
], |
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.
Not sure why those entries got added to the blacklist on staging only. You also want this for production.
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.
If we add the blacklist in production now too and we merge this, we'll run all locales except those blacklisted and we're not ready yet with the jobs retention.
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.
Why do we? There is still the white-list present, which skips locales, which are not wanted.
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 can't have both a blacklist
and a whitelist
simultaneously. That doesn't make any sense.
We're implementing a blacklist
to avoid a 90+ locale list for beta.
We still want to keep a whitelist
for nightly only to not maintain a 90+ locale list.
Thus one of them needs to obsolete the other. (I think it can work either way).
So if a blacklist
is present (or has items), we allow all builds that are inside. We don't check the whiltelist
at all in this case.
If there's no blacklist
(or empty) we proceed to check the whitelist
and allow only items from it to run.
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.
Well, then we also need no blacklist for the staging config. In that environment we only run a limited set of locales, here en-US only. So the changes as done in this PR already include a whitelist AND a blacklist.
In any case, both features will remain in the script file even they are not used simultaneously. Checking both lists I would call a feature here, also for safety. Keep in mind that having both lists e.g. for email filters is pretty common. BL is for definitive spam, and WL for always pass through. Everything else is handled by clients, which we don't explicitly have here.
Means we could leave the blacklist check in the white-list check, but it feels a bit off the place for me.
I wanted to go ahead with the locales property and have the blacklist and whitelist underneath as we do with platforms: The changes in the pulse script and the structure will be changed everywhere anyway in the next commit, but I refer to the blacklist addition. |
As discussed yesterday what we convened upon is the following:
For the config file I like the approach:
|
I just want to add that we might have different black lists in the future. Therefore it might be good to not have a separation as mentioned above, but something like:
That would clutter the config way lesser and keeps the blacklist stuff really optional. Means if no blacklist is needed, you also won't need a whitelist, but can directly use |
Also works to group all |
So Henrik and I discussed on IRC and seems the better way to go now is to add the remaining batches and have this PR cleaning everything after we confirm everything works well. |
91c36d6
to
90b7c88
Compare
@whimboo, @andreieftimie updated the PR:
|
"blacklist": { | ||
"locales": [ | ||
"az", | ||
"ku" |
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.
That looks beautiful! Lets hope we can keep this number that low.
Beside the mentioned review comments I have to add that the PR got bitrotted with the merge of the last two locale batches. So please refresh the config files too. |
3bcfb8d
to
0d7a47a
Compare
Updated as requested. |
if target_branch['locales'] and \ | ||
# Check the locale against the locales blacklist if one is present and | ||
# stop processing it if listed there | ||
if 'blacklist' in target_branch and 'locales' in target_branch['blacklist'] and \ |
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.
As mentioned in my last review please separate the checks for the blacklist in general and locales. Make the latter another if condition in the blacklist block. When we add more blacklist types later we can easily add one more if conditions, so we do not end-up with a huge list of conditions.
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.
When we add more items to the blacklist, we will change the pulse script anyway to handle those. I don't see why this change is important now.
Updated again. |
Looks fine. Can you please get the commits squashed? I will do a final test then, and get it landed on master. Thanks. |
a233608
to
cc9133f
Compare
@whimboo, all done! |
# stop processing it if listed there | ||
if 'locales' in target_branch['blacklist'] and \ | ||
data['locale'] in target_branch['blacklist']['locales']: | ||
return |
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.
Ouch. We missed something here... We cannot silently return, but have to give a proper log entry so that we know why the build has not been processed.
@whimboo added log entries. |
Sorry, I commented on the commit instead on the PR. Just nits. Once those are fixed we can get this PR landed. Thanks @andreeamatei |
@whimboo, updated again. |
This PR has been merged as b5be34d |
This is for issue #309. I added here the changes for the pulse script and also the blacklist for staging beta and release, for testing. So as discussed, the blacklist will have priority when there are both.