Hi all,
While testing the upgrade from 3.9.11 to 3.13.4, we run the Label Migration tool(with 3.13 war file) to convert all labels to Submit Requirements(SR) and we had a couple of issues after that.
As a note, we have a small set of repositories(~1500) still using Prolog.
Below are some questions that we would like to have the community feedback.
1. Label Migration Tool and Prolog
The code mentions that it should only be run if a "gerrit installation has no Prolog submit rules".
IMO this piece of information should be part of the tool documentation page.
Should the Label migration tool be run on a Gerrit server that contains even just 1 prolog rule?
2. SRs glob pattern support
SRs supports regex `^ref/heads/.*` from [dk.brics.automaton library](
http://www.brics.dk/automaton/) as mentioned in the documentation [here](
https://gerrit-documentation.storage.googleapis.com/Documentation/3.13.4/config-submit-requirements.html#query_expression_syntax) and [here] (
https://gerrit-documentation.storage.googleapis.com/Documentation/3.13.4/user-search.html#branch).
SRs documentation also mentions support exact values like `refs/heads/master`.
No mention to glob pattern matching.
Does SRs support glob pattern matching(`refs/heads/*`)?
3. Why there is a mismatch in terms of pattern matching support between labels and SRs, specially when the label migration tool will "copy paste" the labels(which supports exact, glob and regex patterns) configuration to the SRs.
4. Is the Label migration tool suppose to convert glob to regex from labels to SRs?
5. SR migration strategy
What is the suggested approach to migrate to SRs!?
1. Downstream repos to upstream repos?
2. Upstream to downstream?
For example migrating All-Projects will affect all downstream repositories.
Downstream will always need to exclude the SR's that comes from upstream, to keep their repo workflow if they did not yet migrate to SRs.
3. All in one go?
4. Something else?
6. Can owners plugin be affected by the migration?
We found this error when the Code review label is set in All-Projects and also at the project level with noblock function(as a result of the migration tool).
The only difference between the All-Projects label and the child repo, was that branch parameter was set in the label and SR, at the repo level.
In the end, we fixed the problem by removing branch parameter from the label and SR at the repo level and inherit the label from All-Projects.
What made this confusing was that it was Owners class that triggered the error. There is no OWNERS or
rules.pl files configured in the entire hierarchy of the child repo.
```
com.googlesource.gerrit.owners.restapi.GetFilesOwners$LabelNotFoundException: Project some/project/here has no Code-Review label defined
```
fyi, I created 2 bug reports for the Label migration tool:
https://issues.gerritcodereview.com/issues/493952648https://issues.gerritcodereview.com/issues/493953333Thanks,
Nuno