Skip to content

Fix quoting in .gitlab/ci/scripts/regeneration-check

Peter Leitzen requested to merge pl-fix-regenerate-check into master

What does this MR do and why?

Previously, a path list of (a b) was quoted as "a b" leads to an invalid path cause "git diff" to fail. See 🔴 https://gitlab.com/gitlab-org/quality/triage-ops/-/jobs/6165783977.

Follow-up of !2672 (merged).

Reproduction

# On master
git revert c46d046a

.gitlab/ci/scripts/regeneration-check
...
Generating /home/peter/devel/gitlab/triage-ops/.gitlab/ci/generated/bug-prioritization.yml.erb.yml
Generating /home/peter/devel/gitlab/triage-ops/.gitlab/ci/generated/team-summary.yml.erb.yml
warning: could not open directory '.gitlab/ci/generated policies/generated/': No such file or directory
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)

nothing to commit, working tree clean
Some generated files are outdated.
Please check README for how to regenerate them: https://gitlab.com/gitlab-org/quality/triage-ops/-/blob/master/doc/scheduled/index.md#generated-policies
# On this branch
git revert c46d046a

.gitlab/ci/scripts/regeneration-check
...

Generating /home/peter/devel/gitlab/triage-ops/.gitlab/ci/generated/bug-prioritization.yml.erb.yml
Generating /home/peter/devel/gitlab/triage-ops/.gitlab/ci/generated/team-summary.yml.erb.yml
diff --git a/.gitlab/ci/generated/bug-prioritization.yml.erb.yml b/.gitlab/ci/generated/bug-prioritization.yml.erb.yml
index 4410a083..0184f764 100644
--- a/.gitlab/ci/generated/bug-prioritization.yml.erb.yml
+++ b/.gitlab/ci/generated/bug-prioritization.yml.erb.yml
@@ -120,6 +120,14 @@ container_registry-bug-prioritization:
     - if: '$TRIAGE_BUG_PRIORITIZATION_REPORT_CONTAINER_REGISTRY'
   variables:
     TRIAGE_POLICY_FILE: policies/generated/bug-prioritization.yml.erb/container_registry.yml
+custom_models-bug-prioritization:
+  extends: .run
+  stage: report
+  rules:
+    - if: '$TRIAGE_BUG_PRIORITIZATION_REPORT'
+    - if: '$TRIAGE_BUG_PRIORITIZATION_REPORT_CUSTOM_MODELS'
+  variables:
+    TRIAGE_POLICY_FILE: policies/generated/bug-prioritization.yml.erb/custom_models.yml
 database-bug-prioritization:
   extends: .run
   stage: report
diff --git a/.gitlab/ci/generated/merge-requests-needing-attention.yml.erb.yml b/.gitlab/ci/generated/merge-requests-needing-attention.yml.erb.yml
index 5414a6c9..39796f47 100644
--- a/.gitlab/ci/generated/merge-requests-needing-attention.yml.erb.yml
+++ b/.gitlab/ci/generated/merge-requests-needing-attention.yml.erb.yml
@@ -120,6 +120,14 @@ container_registry-merge-requests-needing-attention:
     - if: '$TRIAGE_MERGE_REQUESTS_NEEDING_ATTENTION_CONTAINER_REGISTRY'
   variables:
     TRIAGE_POLICY_FILE: policies/generated/merge-requests-needing-attention.yml.erb/container_registry.yml
+custom_models-merge-requests-needing-attention:
+  extends: .run
+  stage: report
+  rules:
+    - if: '$TRIAGE_MERGE_REQUESTS_NEEDING_ATTENTION'
+    - if: '$TRIAGE_MERGE_REQUESTS_NEEDING_ATTENTION_CUSTOM_MODELS'
+  variables:
+    TRIAGE_POLICY_FILE: policies/generated/merge-requests-needing-attention.yml.erb/custom_models.yml
 database-merge-requests-needing-attention:
   extends: .run
   stage: report
diff --git a/.gitlab/ci/generated/prompt-for-slipping-triage.yml.erb.yml b/.gitlab/ci/generated/prompt-for-slipping-triage.yml.erb.yml
index 2559f8ae..0b6e58bc 100644
--- a/.gitlab/ci/generated/prompt-for-slipping-triage.yml.erb.yml
+++ b/.gitlab/ci/generated/prompt-for-slipping-triage.yml.erb.yml
@@ -128,6 +128,14 @@ contributor_success-prompt-for-slipping-triage:
     - if: '$PROMPT_FOR_SLIPPING_TRIAGE_CONTRIBUTOR_SUCCESS'
   variables:
     TRIAGE_POLICY_FILE: policies/generated/prompt-for-slipping-triage.yml.erb/contributor_success.yml
+custom_models-prompt-for-slipping-triage:
+  extends: .run
+  stage: report
+  rules:
+    - if: '$PROMPT_FOR_SLIPPING_TRIAGE'
+    - if: '$PROMPT_FOR_SLIPPING_TRIAGE_CUSTOM_MODELS'
+  variables:
+    TRIAGE_POLICY_FILE: policies/generated/prompt-for-slipping-triage.yml.erb/custom_models.yml
 database-prompt-for-slipping-triage:
   extends: .run
   stage: report
diff --git a/.gitlab/ci/generated/team-summary.yml.erb.yml b/.gitlab/ci/generated/team-summary.yml.erb.yml
index eecd710e..eb276031 100644
--- a/.gitlab/ci/generated/team-summary.yml.erb.yml
+++ b/.gitlab/ci/generated/team-summary.yml.erb.yml
@@ -150,6 +150,16 @@ container_registry-team-summary:
     - if: '$TRIAGE_TEAM_SUMMARY_CONTAINER_REGISTRY'
   variables:
     TRIAGE_POLICY_FILE: policies/generated/team-summary.yml.erb/container_registry.yml
+custom_models-team-summary:
+  extends: .run
+  stage: report
+  rules:
+    - if: '$EXCLUDE_TRIAGE_TEAM_SUMMARY_CUSTOM_MODELS'
+      when: never
+    - if: '$TRIAGE_TEAM_SUMMARY'
+    - if: '$TRIAGE_TEAM_SUMMARY_CUSTOM_MODELS'
+  variables:
+    TRIAGE_POLICY_FILE: policies/generated/team-summary.yml.erb/custom_models.yml
 database-team-summary:
   extends: .run
   stage: report
On branch pl-fix-regenerate-check
Your branch is ahead of 'origin/pl-fix-regenerate-check' by 1 commit.
  (use "git push" to publish your local commits)

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   .gitlab/ci/generated/bug-prioritization.yml.erb.yml
        modified:   .gitlab/ci/generated/merge-requests-needing-attention.yml.erb.yml
        modified:   .gitlab/ci/generated/prompt-for-slipping-triage.yml.erb.yml
        modified:   .gitlab/ci/generated/team-summary.yml.erb.yml

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        policies/generated/bug-prioritization.yml.erb/custom_models.yml
        policies/generated/default-labels.yml.erb/custom_models.yml
        policies/generated/merge-requests-needing-attention.yml.erb/custom_models.yml
        policies/generated/prompt-for-slipping-triage.yml.erb/custom_models.yml
        policies/generated/team-summary.yml.erb/custom_models.yml

no changes added to commit (use "git add" and/or "git commit -a")
Some generated files are outdated.
Please check README for how to regenerate them: https://gitlab.com/gitlab-org/quality/triage-ops/-/blob/master/doc/scheduled/index.md#generated-policies

Expected impact & dry-runs

These are strongly recommended to assist reviewers and reduce the time to merge your change.

See https://gitlab.com/gitlab-org/quality/triage-ops/-/tree/master/doc/scheduled#testing-policies-with-a-dry-run on how to perform dry-runs for new policies.

See https://gitlab.com/gitlab-org/quality/triage-ops/-/blob/master/doc/reactive/best_practices.md#use-the-sandbox-to-test-new-processors on how to make sure a new processor can be tested.

Action items

Edited by Peter Leitzen

Merge request reports