From d6d5771aff7d720db791053c1b6dd6c6908c2633 Mon Sep 17 00:00:00 2001
From: Pepe Cano <825430+ppcano@users.noreply.github.com>
Date: Mon, 28 Apr 2025 10:42:37 +0200
Subject: [PATCH 1/5] alerting: update UI text to clarify recovery threshold
for pending state (#102788)
* alerting: update UI text to clarify recovery threshold for pending state
* Update recent translation
---
.../unified/GrafanaRuleQueryViewer.tsx | 4 ++-
.../expressions/components/Threshold.tsx | 35 +++++++++++++------
public/locales/en-US/grafana.json | 18 +++++-----
3 files changed, 37 insertions(+), 20 deletions(-)
diff --git a/public/app/features/alerting/unified/GrafanaRuleQueryViewer.tsx b/public/app/features/alerting/unified/GrafanaRuleQueryViewer.tsx
index 781726d1413..71dd85a6799 100644
--- a/public/app/features/alerting/unified/GrafanaRuleQueryViewer.tsx
+++ b/public/app/features/alerting/unified/GrafanaRuleQueryViewer.tsx
@@ -503,7 +503,9 @@ function ThresholdExpressionViewer({ model }: { model: ExpressionQuery }) {
{unloadEvaluator && (
<>
- Stop alerting when
+
+ Stop alerting (or pending state) when{' '}
+
{expression}
diff --git a/public/app/features/expressions/components/Threshold.tsx b/public/app/features/expressions/components/Threshold.tsx
index e3fa883d918..ebb9ae393aa 100644
--- a/public/app/features/expressions/components/Threshold.tsx
+++ b/public/app/features/expressions/components/Threshold.tsx
@@ -219,7 +219,7 @@ function RecoveryThresholdRow({ isRange, condition, onError, dispatch, allowOnbl
@@ -256,7 +256,7 @@ function RecoveryThresholdRow({ isRange, condition, onError, dispatch, allowOnbl
@@ -293,7 +293,7 @@ function RecoveryThresholdRow({ isRange, condition, onError, dispatch, allowOnbl
@@ -329,7 +329,7 @@ function RecoveryThresholdRow({ isRange, condition, onError, dispatch, allowOnbl
@@ -370,7 +370,10 @@ function RecoveryThresholdRow({ isRange, condition, onError, dispatch, allowOnbl
return (
Date: Mon, 28 Apr 2025 10:51:11 +0200
Subject: [PATCH 2/5] chore: Remove unused dependency (#104457)
---
public/app/plugins/datasource/tempo/package.json | 1 -
yarn.lock | 10 ----------
2 files changed, 11 deletions(-)
diff --git a/public/app/plugins/datasource/tempo/package.json b/public/app/plugins/datasource/tempo/package.json
index df81acbef1f..b9248534a4f 100644
--- a/public/app/plugins/datasource/tempo/package.json
+++ b/public/app/plugins/datasource/tempo/package.json
@@ -7,7 +7,6 @@
"@emotion/css": "11.13.5",
"@grafana/data": "workspace:*",
"@grafana/e2e-selectors": "workspace:*",
- "@grafana/lezer-logql": "0.2.6",
"@grafana/lezer-traceql": "0.0.21",
"@grafana/monaco-logql": "^0.0.8",
"@grafana/o11y-ds-frontend": "workspace:*",
diff --git a/yarn.lock b/yarn.lock
index 01e155919f1..bab3b3d8e73 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2823,7 +2823,6 @@ __metadata:
"@emotion/css": "npm:11.13.5"
"@grafana/data": "workspace:*"
"@grafana/e2e-selectors": "workspace:*"
- "@grafana/lezer-logql": "npm:0.2.6"
"@grafana/lezer-traceql": "npm:0.0.21"
"@grafana/monaco-logql": "npm:^0.0.8"
"@grafana/o11y-ds-frontend": "workspace:*"
@@ -3170,15 +3169,6 @@ __metadata:
languageName: node
linkType: hard
-"@grafana/lezer-logql@npm:0.2.6":
- version: 0.2.6
- resolution: "@grafana/lezer-logql@npm:0.2.6"
- peerDependencies:
- "@lezer/lr": ^1.0.0
- checksum: 10/09df02b9934f37e9e58731ce0806923618991dfb46510ab29299040860b590359c9083def93176b1076cb1880302a92e527fb5aad0cbf97557a8025c74a997ed
- languageName: node
- linkType: hard
-
"@grafana/lezer-logql@npm:0.2.7":
version: 0.2.7
resolution: "@grafana/lezer-logql@npm:0.2.7"
From d19f86a736bff6ac743af3e1e078b2604347ead9 Mon Sep 17 00:00:00 2001
From: Sven Grossmann
Date: Mon, 28 Apr 2025 12:22:46 +0200
Subject: [PATCH 3/5] ci: move variables to `env` (#104605)
* ci: move variables to `env`
* ci: move sha to `env`
* ci: import `SHA` and `PRE_COMMIT_SHA`
---
.github/workflows/pr-patch-check-event.yml | 23 +++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/pr-patch-check-event.yml b/.github/workflows/pr-patch-check-event.yml
index e93d870adf8..e1389fdac6a 100644
--- a/.github/workflows/pr-patch-check-event.yml
+++ b/.github/workflows/pr-patch-check-event.yml
@@ -17,6 +17,13 @@ on:
# target branch onto the source branch, to verify compatibility before merging.
jobs:
dispatch-job:
+ env:
+ HEAD_REF: ${{ github.head_ref }}
+ BASE_REF: ${{ github.base_ref }}
+ REPO: ${{ github.repository }}
+ SENDER: ${{ github.event.sender.login }}
+ SHA: ${{ github.sha }}
+ PR_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
runs-on: ubuntu-latest
steps:
- name: "Generate token"
@@ -31,18 +38,20 @@ jobs:
with:
github-token: ${{ steps.generate_token.outputs.token }}
script: |
+ const {HEAD_REF, BASE_REF, REPO, SENDER, SHA, PR_COMMIT_SHA} = process.env;
+
await github.rest.actions.createWorkflowDispatch({
owner: 'grafana',
repo: 'security-patch-actions',
workflow_id: 'test-patches-event.yml',
ref: 'main',
inputs: {
- src_repo: "${{ github.repository }}",
- src_ref: "${{ github.head_ref }}",
- src_merge_sha: "${{ github.sha }}",
- src_pr_commit_sha: "${{ github.event.pull_request.head.sha }}",
- patch_repo: "${{ github.repository }}-security-patches",
- patch_ref: "${{ github.base_ref }}",
- triggering_github_handle: "${{ github.event.sender.login }}"
+ src_repo: REPO,
+ src_ref: HEAD_REF,
+ src_merge_sha: SHA,
+ src_pr_commit_sha: PR_COMMIT_SHA,
+ patch_repo: REPO + '-security-patches',
+ patch_ref: BASE_REF,
+ triggering_github_handle: SENDER
}
})
From 60b03a5a105eee5e079f8b88c8a184ea065cbbd6 Mon Sep 17 00:00:00 2001
From: Josh Hunt
Date: Mon, 28 Apr 2025 11:30:26 +0100
Subject: [PATCH 4/5] CI: Update actions to use environment variables, pin
actions (#104610)
* CI: use env var in backport.yml
* pin actions
* pin actions
---
.github/workflows/auto-milestone.yml | 2 +-
.github/workflows/backport.yml | 12 +++++++++---
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/auto-milestone.yml b/.github/workflows/auto-milestone.yml
index 0697888fba0..77daec36bca 100644
--- a/.github/workflows/auto-milestone.yml
+++ b/.github/workflows/auto-milestone.yml
@@ -21,7 +21,7 @@ jobs:
# Note: Github will not trigger other actions from this because it uses
# the GITHUB_TOKEN token
- name: Run auto-milestone
- uses: grafana/grafana-github-actions-go/auto-milestone@main
+ uses: grafana/grafana-github-actions-go/auto-milestone@d4c452f92ed826d515dccf1f62923e537953acd8 # main
with:
pr: ${{ github.event.pull_request.number }}
token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml
index 5f21ab276ee..fca35029cd6 100644
--- a/.github/workflows/backport.yml
+++ b/.github/workflows/backport.yml
@@ -11,7 +11,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
+ with:
+ persist-credentials: false
- name: "Generate token"
id: generate_token
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
@@ -20,8 +22,12 @@ jobs:
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
- run: git config --global user.email '132647405+grafana-delivery-bot[bot]@users.noreply.github.com'
- run: git config --global user.name 'grafana-delivery-bot[bot]'
- - run: git remote set-url origin "https://grafana-delivery-bot:${{ steps.generate_token.outputs.token }}@github.com/grafana/grafana.git"
+ - name: Set remote URL
+ env:
+ GIT_TOKEN: ${{ steps.generate_token.outputs.token }}
+ run: |
+ git remote set-url origin "https://grafana-delivery-bot:$GIT_TOKEN@github.com/grafana/grafana.git"
- name: Run backport
- uses: grafana/grafana-github-actions-go/backport@main
+ uses: grafana/grafana-github-actions-go/backport@d4c452f92ed826d515dccf1f62923e537953acd8 # main
with:
token: ${{ steps.generate_token.outputs.token }}
From a8ea72012bde926b7c2be338aa7793a346253926 Mon Sep 17 00:00:00 2001
From: Sven Grossmann
Date: Mon, 28 Apr 2025 13:00:29 +0200
Subject: [PATCH 5/5] ci: remove unused workflow (#104615)
Delete epic-add-to-platform-ux-parent-project.yml
This is an old workflow which is no longer used.
Co-authored-by: Mihaela Maior
---
...epic-add-to-platform-ux-parent-project.yml | 149 ------------------
1 file changed, 149 deletions(-)
delete mode 100644 .github/workflows/epic-add-to-platform-ux-parent-project.yml
diff --git a/.github/workflows/epic-add-to-platform-ux-parent-project.yml b/.github/workflows/epic-add-to-platform-ux-parent-project.yml
deleted file mode 100644
index 97462269fce..00000000000
--- a/.github/workflows/epic-add-to-platform-ux-parent-project.yml
+++ /dev/null
@@ -1,149 +0,0 @@
-name: When epic issues changed in Platform UX squad projects, check if epic is part of specified child projects and update on Platform UX parent project
-
-on:
- issues:
- types: [opened, closed, edited, reopened, assigned, unassigned, labeled, unlabeled]
- labels:
- - 'type/epic'
-
-env:
- GH_TOKEN: ${{ secrets.GH_BOT_PROJECTS_ACCESS_TOKEN }}
- ORGANIZATION: ${{ github.repository_owner }}
- REPO: ${{ github.event.repository.name }}
- PARENT_PROJECT: 304
- CHILD_PROJECT_1: 78
- CHILD_PROJECT_2: 111
- CHILD_PROJECT_3: 202
-
-concurrency:
- group: issue-add-to-parent-project-${{ github.event.number }}
-jobs:
- config:
- runs-on: "ubuntu-latest"
- outputs:
- has-secrets: ${{ steps.check.outputs.has-secrets }}
- steps:
- - name: "Check for secrets"
- id: check
- shell: bash
- run: |
- if [ -n "${{ (secrets.GH_BOT_PROJECTS_ACCESS_TOKEN != '') || '' }}" ]; then
- echo "has-secrets=1" >> "$GITHUB_OUTPUT"
- fi
-
- main:
- needs: config
- if: needs.config.outputs.has-secrets && contains(github.event.issue.labels.*.name, 'type/epic')
- runs-on: ubuntu-latest
- steps:
- - name: Check if issue is in child or parent projects
- run: |
- gh api graphql -f query='
- query($org: String!, $repo: String!) {
- repository(name: $repo, owner: $org) {
- issue (number: ${{ github.event.issue.number }}) {
- projectItems(first:20) {
- nodes {
- id,
- project {
- number,
- title
- },
- fieldValueByName(name:"Status") {
- ... on ProjectV2ItemFieldSingleSelectValue {
- optionId
- name
- }
- }
- }
- }
- }
- }
- }' -f org=$ORGANIZATION -f repo=$REPO > projects_data.json
-
- echo 'IN_PARENT_PROJ='$(jq '.data.repository.issue.projectItems.nodes[] | select(.project.number==${{ env.PARENT_PROJECT }}) | .project != null' projects_data.json) >> $GITHUB_ENV
- echo 'PARENT_PROJ_STATUS_ID='$(jq '.data.repository.issue.projectItems.nodes[] | select(.project.number==${{ env.PARENT_PROJECT }}) | select(.fieldValueByName != null) | .fieldValueByName.optionId' projects_data.json) >> $GITHUB_ENV
- echo 'ITEM_ID='$(jq '.data.repository.issue.projectItems.nodes[] | select(.project.number==${{ env.PARENT_PROJECT }}) | .id' projects_data.json) >> $GITHUB_ENV
- echo 'IN_CHILD_PROJ='$(jq 'first(.data.repository.issue.projectItems.nodes[] | select(.project.number==${{ env.CHILD_PROJECT_1 }} or .project.number==${{ env.CHILD_PROJECT_2 }} or .project.number==${{ env.CHILD_PROJECT_3 }}) | .project != null)' projects_data.json) >> $GITHUB_ENV
- echo 'CHILD_PROJ_STATUS='$(jq -r '.data.repository.issue.projectItems.nodes[] | select(.project.number==${{ env.CHILD_PROJECT_1 }} or .project.number==${{ env.CHILD_PROJECT_2 }} or .project.number==${{ env.CHILD_PROJECT_3 }}) | select(.fieldValueByName != null) | .fieldValueByName.name' projects_data.json) >> $GITHUB_ENV
- - name: Get parent project project data
- if: env.IN_CHILD_PROJ
- run: |
- gh api graphql -f query='
- query($org: String!, $number: Int!) {
- organization(login: $org){
- projectV2(number: $number) {
- id
- fields(first:20) {
- nodes {
- ... on ProjectV2Field {
- id
- name
- }
- ... on ProjectV2SingleSelectField {
- id
- name
- options {
- id
- name
- }
- }
- }
- }
- }
- }
- }' -f org=$ORGANIZATION -F number=$PARENT_PROJECT > project_data.json
-
- echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV
- echo 'STATUS_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV
- echo 'TODO_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="Todo") |.id' project_data.json) >> $GITHUB_ENV
- echo 'PROGRESS_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="In Progress") |.id' project_data.json) >> $GITHUB_ENV
- echo 'DONE_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="Done") |.id' project_data.json) >> $GITHUB_ENV
- - name: Add issue to parent project
- if: env.IN_CHILD_PROJ && !env.IN_PARENT_PROJ
- run: |
- item_id="$( gh api graphql -f query='
- mutation($project:ID!, $issue:ID!) {
- addProjectV2ItemById(input: {projectId: $project, contentId: $issue}) {
- item {
- id
- }
- }
- }' -f project=$PROJECT_ID -f issue=${{ github.event.issue.node_id }} --jq '.data.addProjectV2ItemById.item.id')"
-
- echo 'ITEM_ID='$item_id >> $GITHUB_ENV
- - name: Set parent project status Done
- if: contains(env.CHILD_PROJ_STATUS, 'Done')
- run: |
- echo 'OPTION_ID='$DONE_OPTION_ID >> $GITHUB_ENV
- - name: Set parent project status In Progress
- if: contains(env.CHILD_PROJ_STATUS, 'In ') || contains(env.CHILD_PROJ_STATUS, 'Blocked')
- run: |
- echo 'OPTION_ID='$PROGRESS_OPTION_ID >> $GITHUB_ENV
- - name: Set parent project status To do
- if: env.CHILD_PROJ_STATUS && !contains(env.CHILD_PROJ_STATUS, 'In ') && !contains(env.CHILD_PROJ_STATUS, 'Blocked') && ! contains(env.CHILD_PROJ_STATUS, 'Done')
- run: |
- echo 'OPTION_ID='$TODO_OPTION_ID >> $GITHUB_ENV
- - name: Set issue status in parent project
- if: env.OPTION_ID && (env.OPTION_ID != env.PARENT_PROJ_STATUS_ID)
- run: |
- gh api graphql -f query='
- mutation (
- $project: ID!
- $item: ID!
- $status_field: ID!
- $status_value: String!
- ) {
- set_status: updateProjectV2ItemFieldValue(input: {
- projectId: $project
- itemId: $item
- fieldId: $status_field
- value: {
- singleSelectOptionId: $status_value
- }
- }) {
- projectV2Item {
- id
- }
- }
- }' -f project=$PROJECT_ID -f item=$ITEM_ID -f status_field=$STATUS_FIELD_ID -f status_value=${{ env.OPTION_ID }} --silent