diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index a7115b5455af8..0000000000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,232 +0,0 @@ -# Lines starting with '#' are comments. -# Each line is a file pattern followed by one or more owners. - -# More details are here: https://help.github.com/articles/about-codeowners/ - -# The '*' pattern is global owners. - -# Order is important. The last matching pattern has the most precedence. -# The folders are ordered as follows: - -# In each subsection folders are ordered first by depth, then alphabetically. -# This should make it easy to add new rules without breaking existing ones. - -# Documentation -/docs/ @grafana/docs-squad -/contribute/ @grafana/docs-squad -/docs/sources/developers/plugins/ @grafana/docs-squad @grafana/plugins-platform-frontend @grafana/plugins-platform-backend -/docs/sources/developers/plugins/backend @grafana/docs-squad @grafana/plugins-platform-backend -# Set up, dashboards/visualization, best practices: Chris Moyer -# Alerting: Brenda Muir -/docs/sources/administration/ @Eve832 @GrafanaWriter -/docs/sources/alerting @brendamuir -/docs/sources/best-practices/ @chri2547 -/docs/sources/dashboards/ @chri2547 -/docs/sources/datasources/ @Eve832 @GrafanaWriter -/docs/sources/enterprise/ @Eve832 @GrafanaWriter -/docs/sources/explore/ @Eve832 @GrafanaWriter -/docs/sources/getting-started/ @chri2547 -/docs/sources/old-alerting @brendamuir -/docs/sources/panels/ @chri2547 -/docs/sources/release-notes/ @Eve832 @GrafanaWriter -/docs/sources/setup-grafana/ @chri2547 -/docs/sources/visualization/ @chri2547 -/docs/sources/whatsnew/ @Eve832 @GrafanaWriter - -# Backend code -*.go @grafana/backend-platform -go.mod @grafana/backend-platform -go.sum @grafana/backend-platform -/.bingo @grafana/backend-platform - -# Backend code, developers environment -/devenv/docker/blocks/auth @grafana/grafana-authnz-team - -# Logs code, developers environment -/devenv/docker/blocks/loki* @grafana/observability-logs -/devenv/docker/blocks/elastic* @grafana/observability-logs - -# Performance tests -/devenv/docker/loadtests-ts @grafana/grafana-edge-squad - -# Continuous Integration -.drone.yml @grafana/grafana-release-eng -.drone.star @grafana/grafana-release-eng -/scripts/drone/ @grafana/grafana-release-eng -/pkg/build/ @grafana/grafana-release-eng - -# Cloud Datasources backend code -/pkg/tsdb/cloudwatch @grafana/aws-plugins -/pkg/tsdb/azuremonitor @grafana/cloud-provider-plugins -/pkg/tsdb/cloudmonitoring @grafana/cloud-provider-plugins - -# Observability backend code -/pkg/tsdb/prometheus @grafana/observability-metrics -/pkg/tsdb/influxdb @grafana/observability-metrics -/pkg/tsdb/elasticsearch @grafana/observability-logs -/pkg/tsdb/graphite @grafana/observability-metrics -/pkg/tsdb/jaeger @grafana/observability-traces-and-profiling -/pkg/tsdb/loki @grafana/observability-logs -/pkg/tsdb/zipkin @grafana/observability-traces-and-profiling -/pkg/tsdb/tempo @grafana/observability-traces-and-profiling - -# BI backend code -/pkg/tsdb/mysql @grafana/grafana-bi-squad -/pkg/tsdb/postgres @grafana/grafana-bi-squad -/pkg/tsdb/mssql @grafana/grafana-bi-squad - -# Database migrations -/pkg/services/sqlstore/migrations @grafana/backend-platform @grafana/hosted-grafana-team -*_mig.go @grafana/backend-platform @grafana/hosted-grafana-team - -# Grafana edge -/pkg/services/live/ @grafana/grafana-edge-squad -/pkg/services/searchV2/ @grafana/grafana-edge-squad -/pkg/services/store/ @grafana/grafana-edge-squad -/pkg/services/querylibrary/ @grafana/grafana-edge-squad -/pkg/services/export/ @grafana/grafana-edge-squad -/pkg/infra/filestore/ @grafana/grafana-edge-squad -/pkg/tsdb/testdatasource/sims/ @grafana/grafana-edge-squad - -# Alerting -/pkg/services/ngalert @grafana/alerting-squad-backend -/pkg/services/sqlstore/migrations/ualert @grafana/alerting-squad-backend -/pkg/services/alerting @grafana/alerting-squad-backend -/pkg/tests/api/alerting @grafana/alerting-squad-backend -/public/app/features/alerting @grafana/alerting-squad-frontend - -# Library Services -/pkg/services/libraryelements @grafana/user-essentials -/pkg/services/librarypanels @grafana/user-essentials - -# Plugins -/pkg/api/pluginproxy @grafana/plugins-platform-backend -/pkg/plugins @grafana/plugins-platform-backend -/pkg/services/datasourceproxy @grafana/plugins-platform-backend -/pkg/services/datasources @grafana/plugins-platform-backend -/pkg/plugins/pfs @grafana/plugins-platform-backend @grafana/grafana-as-code - -# Dashboard previews / crawler (behind feature flag) -/pkg/services/thumbs @grafana/grafana-edge-squad - -# Backend code docs -/contribute/style-guides/backend.md @grafana/backend-platform -/contribute/architecture/backend @grafana/backend-platform -/contribute/engineering/backend @grafana/backend-platform - -/crowdin.yml @grafana/user-essentials -/public/locales @grafana/user-essentials -/public/app/core/internationalization @grafana/user-essentials -/e2e @grafana/user-essentials -/e2e/cloud-plugins-suite @grafana/cloud-provider-plugins -/packages @grafana/user-essentials @grafana/plugins-platform-frontend @grafana/grafana-bi-squad -/packages/grafana-e2e-selectors @grafana/user-essentials -/packages/grafana-e2e @grafana/user-essentials -/packages/grafana-toolkit @grafana/plugins-platform-frontend -/packages/grafana-ui/.storybook @grafana/plugins-platform-frontend -/packages/grafana-ui/src/components/DateTimePickers @grafana/user-essentials -/packages/grafana-ui/src/components/GraphNG @grafana/grafana-bi-squad -/packages/grafana-ui/src/components/Logs @grafana/observability-logs -/packages/grafana-ui/src/components/Table @grafana/grafana-bi-squad -/packages/grafana-ui/src/components/TimeSeries @grafana/grafana-bi-squad -/packages/grafana-ui/src/components/uPlot @grafana/grafana-bi-squad -/packages/grafana-ui/src/utils/storybook @grafana/plugins-platform-frontend -/packages/jaeger-ui-components/ @grafana/observability-traces-and-profiling -/plugins-bundled @grafana/plugins-platform-frontend -# public folder -/public/app/core/components/TimePicker @grafana/grafana-bi-squad -/public/app/core/components/Layers @grafana/grafana-edge-squad -/public/app/features/canvas/ @grafana/grafana-edge-squad -/public/app/features/comments/ @grafana/grafana-edge-squad -/public/app/features/dimensions/ @grafana/grafana-edge-squad -/public/app/features/geo/ @grafana/grafana-edge-squad -/public/app/features/storage/ @grafana/grafana-edge-squad -/public/app/features/live/ @grafana/grafana-edge-squad -/public/app/features/explore/ @grafana/observability-experience-squad -/public/app/features/plugins @grafana/plugins-platform-frontend -/public/app/features/transformers/spatial @grafana/grafana-edge-squad -/public/app/plugins/panel/alertlist @grafana/alerting-squad-frontend -/public/app/plugins/panel/barchart @grafana/grafana-bi-squad -/public/app/plugins/panel/heatmap @grafana/grafana-bi-squad -/public/app/plugins/panel/histogram @grafana/grafana-bi-squad -/public/app/plugins/panel/logs @grafana/observability-logs -/public/app/plugins/panel/nodeGraph @grafana/observability-traces-and-profiling -/public/app/plugins/panel/traces @grafana/observability-traces-and-profiling -/public/app/plugins/panel/piechart @grafana/grafana-bi-squad -/public/app/plugins/panel/state-timeline @grafana/grafana-bi-squad -/public/app/plugins/panel/status-history @grafana/grafana-bi-squad -/public/app/plugins/panel/table @grafana/grafana-bi-squad -/public/app/plugins/panel/timeseries @grafana/grafana-bi-squad -/public/app/plugins/panel/geomap @grafana/grafana-edge-squad -/public/app/plugins/panel/canvas @grafana/grafana-edge-squad -/public/app/plugins/panel/candlestick @grafana/grafana-edge-squad -/public/app/plugins/panel/icon @grafana/grafana-edge-squad -/scripts/build/release-packages.sh @grafana/plugins-platform-frontend -/scripts/circle-release-next-packages.sh @grafana/plugins-platform-frontend -/scripts/ci-frontend-metrics.sh @grafana/user-essentials @grafana/plugins-platform-frontend @grafana/grafana-bi-squad -/scripts/grunt @grafana/frontend-ops -/scripts/webpack @grafana/frontend-ops -/scripts/generate-a11y-report.sh @grafana/user-essentials -package.json @grafana/frontend-ops -tsconfig.json @grafana/frontend-ops -lerna.json @grafana/frontend-ops -.babelrc @grafana/frontend-ops -.prettierrc.js @grafana/frontend-ops -.eslintrc @grafana/frontend-ops -.pa11yci.conf.js @grafana/user-essentials -.pa11yci-pr.conf.js @grafana/user-essentials -.betterer.results @joshhunt - -# @grafana/ui component documentation -*.mdx @grafana/plugins-platform-frontend - -# Core datasources -/public/app/plugins/datasource/cloudwatch @grafana/aws-plugins -/public/app/plugins/datasource/elasticsearch @grafana/observability-logs -/public/app/plugins/datasource/grafana-azure-monitor-datasource @grafana/cloud-provider-plugins -/public/app/plugins/datasource/graphite @grafana/observability-metrics -/public/app/plugins/datasource/influxdb @grafana/observability-metrics -/public/app/plugins/datasource/jaeger @grafana/observability-traces-and-profiling -/public/app/plugins/datasource/loki @grafana/observability-logs -/public/app/plugins/datasource/mssql @grafana/grafana-bi-squad -/public/app/plugins/datasource/mysql @grafana/grafana-bi-squad -/public/app/plugins/datasource/opentsdb @grafana/backend-platform -/public/app/plugins/datasource/postgres @grafana/grafana-bi-squad -/public/app/plugins/datasource/prometheus @grafana/observability-metrics -/public/app/plugins/datasource/cloud-monitoring @grafana/cloud-provider-plugins -/public/app/plugins/datasource/zipkin @grafana/observability-traces-and-profiling -/public/app/plugins/datasource/tempo @grafana/observability-traces-and-profiling -/public/app/plugins/datasource/alertmanager @grafana/alerting-squad - -# Cloud middleware -/grafana-mixin/ @grafana/hosted-grafana-team - -# Grafana authentication and authorization -/pkg/services/accesscontrol @grafana/grafana-authnz-team -/pkg/services/auth @grafana/grafana-authnz-team -/pkg/services/dashboards/accesscontrol.go @grafana/grafana-authnz-team -/pkg/services/datasources/permissions @grafana/grafana-authnz-team -/pkg/services/datasources/permissions/accesscontrol.go @grafana/grafana-authnz-team -/pkg/services/guardian @grafana/grafana-authnz-team -/pkg/services/ldap @grafana/grafana-authnz-team -/pkg/services/login @grafana/grafana-authnz-team -/pkg/services/multildap @grafana/grafana-authnz-team -/pkg/services/oauthtoken @grafana/grafana-authnz-team -/pkg/services/teamguardian @grafana/grafana-authnz-team -/pkg/services/serviceaccounts @grafana/grafana-authnz-team - -# Grafana Partnerships Team -/pkg/infra/httpclient/httpclientprovider/sigv4_middleware.go @grafana/grafana-partnerships-team - -# Kind system and code generation -embed.go @grafana/grafana-as-code -/kinds/ @grafana/grafana-as-code -/pkg/codegen @grafana/grafana-as-code -/pkg/kindsys @grafana/grafana-as-code -/pkg/kinds/*/*_gen.go @grafana/grafana-as-code -/pkg/registry/corekind @grafana/grafana-as-code -/public/app/plugins/*gen.go @grafana/grafana-as-code - -# Specific core kinds -/kinds/raw/ @grafana/grafana-edge-squad -/kinds/structured/dashboard @grafana/dashboards-squad diff --git a/.github/ISSUE_TEMPLATE/1-bug_report.md b/.github/ISSUE_TEMPLATE/1-bug_report.md deleted file mode 100644 index a2fecc3893c18..0000000000000 --- a/.github/ISSUE_TEMPLATE/1-bug_report.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -name: Bug report -about: Report a bug you found when using Grafana -labels: 'type: bug' ---- - - - -**What happened**: - -**What you expected to happen**: - -**How to reproduce it (as minimally and precisely as possible)**: - -**Anything else we need to know?**: - -**Environment**: -- Grafana version: -- Data source type & version: -- OS Grafana is installed on: -- User OS & Browser: -- Grafana plugins: -- Others: diff --git a/.github/ISSUE_TEMPLATE/2-accessibility.md b/.github/ISSUE_TEMPLATE/2-accessibility.md deleted file mode 100644 index 51b3ecc255b6b..0000000000000 --- a/.github/ISSUE_TEMPLATE/2-accessibility.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -name: Accessibility issue -about: Help make Grafana be better at keyboard navigation, screen-readable and accessible to all. -labels: 'type: accessibility' ---- - - - -**Steps to reproduce**: - -**Actual Result**: - -**Expected Result** - -**Relevant WCAG Criteria:** [#.#.# WCAG Criterion](link to https://www.w3.org/WAI/WCAG21/quickref/?versions=2.0) - -**Environment**: -- Grafana version: -- Data source type & version: -- User OS & Browser: -- Others: diff --git a/.github/ISSUE_TEMPLATE/3-grafana_ui_component.md b/.github/ISSUE_TEMPLATE/3-grafana_ui_component.md deleted file mode 100644 index 0ac30e2ab5798..0000000000000 --- a/.github/ISSUE_TEMPLATE/3-grafana_ui_component.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -name: '@grafana/ui component request' -about: Suggest a component for the @grafana/ui package -labels: 'area/grafana/ui' ---- - - - -**Why is this component needed**: - -___ - - [ ] Is/could it be used in more than one place in Grafana? - -**Where is/could it be used?**: - -___ -- [ ] Post screenshots possible. -- [ ] It has a single use case. -- [ ] It is/could be used in multiple places. - -**Implementation** (Checklist meant for the person implementing the component) - -- [ ] Component has a story in Storybook. -- [ ] Props and naming follows [our style guide](https://github.com/grafana/grafana/blob/main/contribute/style-guides/frontend.md). -- [ ] It is extendable (rest props are spread, styles with className work, and so on). -- [ ] Uses [theme for spacing, colors, and so on](https://github.com/grafana/grafana/blob/main/contribute/style-guides/themes.md). -- [ ] Works with both light and dark theme. - -**Documentation** - -- [ ] Properties are documented. -- [ ] Use cases are described. -- [ ] Code examples for the different use cases. -- [ ] Dos and don'ts. -- [ ] Styling guidelines, specific color usage (if applicable). diff --git a/.github/ISSUE_TEMPLATE/4-UX-design.yaml b/.github/ISSUE_TEMPLATE/4-UX-design.yaml deleted file mode 100644 index da31e5de3f4bf..0000000000000 --- a/.github/ISSUE_TEMPLATE/4-UX-design.yaml +++ /dev/null @@ -1,43 +0,0 @@ -name: UX design issue -description: Create an issue for delivering wireframes, mockups or other design solutions. -title: "UX: " -labels: ["type/ux"] -body: - - type: textarea - id: background - attributes: - label: "Background / Why we're doing this" - description: Describe the problem and background of the issue. This could include research insights that inform the design changes, unmet user needs, or other usability issues. - placeholder: Add UI improvements to make Grafana Alerting alert creation easier based on usability test results. - validations: - required: true - - type: dropdown - attributes: - label: Is there existing research for this? - description: Please link research results or insights in the Background section if you have any. If no research was conducted, you might want to consider usability testing your design later. - options: [ - "Yes, I have linked it", - "No research yet" - ] - validations: - required: true - - type: textarea - id: problems-or-tasks - attributes: - label: Problems or tasks - description: Describe problems the new design should solve or tasks the user needs to complete. - placeholder: - value: | - - A problem we're trying to solve - - A task the user needs to accomplish - - … - validations: - required: false - - type: textarea - attributes: - label: Deliverables - description: Add a checklist of deliverables here. You can later add links to each deliverable. - value: | - - Figma mockup - - Miro board - - … diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index d5f2b80cd50c0..0000000000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,8 +0,0 @@ -blank_issues_enabled: false -contact_links: - - name: Feature Request - url: https://github.com/grafana/grafana/discussions/new - about: Discuss ideas for new features of changes - - name: Questions & Help - url: https://community.grafana.com - about: Please ask and answer questions here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index d7653e17ecabd..0000000000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,46 +0,0 @@ - - -**What is this feature?** - -[Add a brief description of what the feature or update does.] - -**Why do we need this feature?** - -[Add a description of the problem the feature is trying to solve.] - -**Who is this feature for?** - -[Add information on what kind of user the feature is for.] - -**Which issue(s) does this PR fix?**: - - - -Fixes # - -**Special notes for your reviewer**: - diff --git a/.github/bot.md b/.github/bot.md deleted file mode 100644 index c08f03d1953ae..0000000000000 --- a/.github/bot.md +++ /dev/null @@ -1,30 +0,0 @@ -# GitHub & grafanabot automation - -The bot is configured via [commands.json](https://github.com/grafana/grafana/blob/main/.github/commands.json) and some other GitHub workflows [workflows](https://github.com/grafana/grafana/tree/main/.github/workflows). - -Comment commands: - -* Write the word `/duplicate #` anywhere in a comment and the bot will add the correct label and standard message. -* Write the word `/needsMoreInfo` anywhere in a comment and the bot will add the correct label and standard message. - -Label commands: - -* Add label `bot/question` the the bot will close with standard question message and add label `type/question` -* Add label `bot/duplicate` the the bot will close with standard duplicate message and add label `type/duplicate` -* Add label `bot/needs more info` for bot to request more info (or use comment command mentioned above) -* Add label `bot/close feature request` for bot to close a feature request with standard message and adds label `not implemented` -* Add label `bot/no new info` for bot to close an issue where we asked for more info but has not received any updates in at least 14 days. - -## Metrics - -Metrics are configured in [metrics-collector.json](https://github.com/grafana/grafana/blob/main/.github/metrics-collector.json) and are also defined in the -[metrics-collector](https://github.com/grafana/grafana-github-actions/blob/main/metrics-collector/index.ts) GitHub action. - -## Backport PR - -To automatically backport a PR to a release branch like v7.3.x add a label named `backport v7.3.x`. The label name should follow the pattern `backport `. Once merged grafanabot will automatically -try to cherry-pick the PR merge commit into that branch and open a PR. It will sync the milestone with the source PR so make sure the source PR also is assigned the milestone for the patch release. If the PR is already merged you can still add this label and trigger the backport automation. - -If there are merge conflicts the bot will write a comment on the source PR saying the cherry-pick failed. In this case you have to do the cherry pick and backport PR manually. - -The backport logic is written [here](https://github.com/grafana/grafana-github-actions/blob/main/backport/backport.ts) diff --git a/.github/commands.json b/.github/commands.json deleted file mode 100644 index 69e618858f989..0000000000000 --- a/.github/commands.json +++ /dev/null @@ -1,302 +0,0 @@ -[ - { - "type":"label", - "name":"bot/question", - "addLabel":"type/question", - "removeLabel":"bot/question", - "action":"close", - "comment":"Please ask your question on [community.grafana.com/](https://community.grafana.com/). To avoid having your issue closed in the future, please read our [CONTRIBUTING](https://github.com/grafana/grafana/blob/main/CONTRIBUTING.md) guidelines.\n\nHappy graphing!" - }, - { - "type":"comment", - "name":"duplicate", - "allowUsers":[], - "action":"updateLabels", - "addLabel":"type/duplicate" - }, - { - "type":"label", - "name":"bot/duplicate", - "addLabel":"type/duplicate", - "removeLabel":"bot/duplicate", - "action":"close", - "comment":"Thanks for creating this issue! It looks like this has already been reported by another user. We’ve closed this in favor of the existing one. Please consider adding any details you think is missing to that issue.\n\nTo avoid having your issue closed in the future, please read our [CONTRIBUTING](https://github.com/grafana/grafana/blob/main/CONTRIBUTING.md) guidelines.\n\nHappy graphing!" - }, - { - "type":"comment", - "name":"needsMoreInfo", - "allowUsers":[], - "action":"updateLabels", - "addLabel":"bot/needs more info" - }, - { - "type":"label", - "name":"bot/needs more info", - "action":"updateLabels", - "addLabel":"needs more info", - "removeLabel":"bot/needs more info", - "comment":"Thanks for creating this issue! We think it's missing some basic information. \r\n\r\nFollow the issue template and add additional information that will help us replicate the problem. \r\nFor data visualization issues: \r\n- Query results from the inspect drawer (data tab & query inspector)\r\n- Panel settings can be extracted in the panel inspect drawer JSON tab\r\n\r\nFor dashboard related issues: \r\n- Dashboard JSON can be found in the dashboard settings JSON model view\r\n\r\nFor authentication, provisioning and alerting issues, Grafana server logs are useful. \r\n\r\nHappy graphing!" - }, - { - "type":"label", - "name":"bot/no new info", - "action":"close", - "removeLabel":"needs more info", - "comment":"We've closed this issue since it needs more information and hasn't had any activity recently. We can re-open it after you you add more information. To avoid having your issue closed in the future, please read our [CONTRIBUTING](https://github.com/grafana/grafana/blob/main/CONTRIBUTING.md) guidelines.\n\nHappy graphing!" - }, - { - "type":"label", - "name":"bot/close feature request", - "action":"close", - "addLabel":"not implemented", - "comment":"This feature request has been open for a long time with few received upvotes or comments, so we are closing it. We're trying to limit open GitHub issues in order to better track planned work and features. \r\n\r\nThis doesn't mean that we'll never ever implement it or that we will never accept a PR for it. A closed issue can still attract upvotes and act as a ticket to track feature demand\/interest. \r\n\r\nThank You to you for taking the time to create this issue!" - }, - { - "type":"label", - "name":"oss-user-essentials", - "action":"addToProject", - "addToProject":{ - "url":"https://github.com/orgs/grafana/projects/78" - } - }, - { - "type":"label", - "name":"area/plugins-catalog", - "action":"addToProject", - "addToProject":{ - "url":"https://github.com/orgs/grafana/projects/76" - } - }, - { - "type":"label", - "name":"type/docs", - "action":"addToProject", - "addToProject":{ - "url":"https://github.com/orgs/grafana/projects/69" - } - }, - { - "type":"label", - "name":"datasource/Azure", - "action":"addToProject", - "addToProject":{ - "url":"https://github.com/orgs/grafana/projects/190" - } - }, - { - "type":"label", - "name":"datasource/CloudWatch", - "action":"addToProject", - "addToProject":{ - "url":"https://github.com/orgs/grafana/projects/97" - } - }, - { - "type":"label", - "name":"datasource/CloudWatch Logs", - "action":"addToProject", - "addToProject":{ - "url":"https://github.com/orgs/grafana/projects/97" - } - }, - { - "type":"label", - "name":"datasource/GoogleCloudMonitoring", - "action":"addToProject", - "addToProject":{ - "url":"https://github.com/orgs/grafana/projects/190" - } - }, - { - "type":"label", - "name":"datasource/Prometheus", - "action":"addToProject", - "addToProject":{ - "url":"https://github.com/orgs/grafana/projects/112" - } - }, - { - "type":"label", - "name":"datasource/InfluxDB", - "action":"addToProject", - "addToProject":{ - "url":"https://github.com/orgs/grafana/projects/112" - } - }, - { - "type":"label", - "name":"datasource/Graphite", - "action":"addToProject", - "addToProject":{ - "url":"https://github.com/orgs/grafana/projects/112" - } - }, - { - "type":"label", - "name":"datasource/OpenTSDB", - "action":"addToProject", - "addToProject":{ - "url":"https://github.com/orgs/grafana/projects/112" - } - }, - { - "type":"label", - "name":"datasource/Loki", - "action":"addToProject", - "addToProject":{ - "url":"https://github.com/orgs/grafana/projects/203" - } - }, - { - "type":"label", - "name":"datasource/Tempo", - "action":"addToProject", - "addToProject":{ - "url":"https://github.com/orgs/grafana/projects/221" - } - }, - { - "type":"label", - "name":"datasource/Elasticsearch", - "action":"addToProject", - "addToProject":{ - "url":"https://github.com/orgs/grafana/projects/203" - } - }, - { - "type":"label", - "name":"datasource/Jaeger", - "action":"addToProject", - "addToProject":{ - "url":"https://github.com/orgs/grafana/projects/221" - } - }, - { - "type":"label", - "name":"datasource/Zipkin", - "action":"addToProject", - "addToProject":{ - "url":"https://github.com/orgs/grafana/projects/221" - } - }, - { - "type":"label", - "name":"area/explore", - "action":"addToProject", - "addToProject":{ - "url":"https://github.com/orgs/grafana/projects/111" - } - }, - { - "type":"label", - "name":"oss-user-essentials", - "action":"removeFromProject", - "removeFromProject":{ - "url":"https://github.com/orgs/grafana/projects/78" - } - }, - { - "type":"label", - "name":"oss-user-essentials", - "action":"removeFromProject", - "removeFromProject":{ - "url":"https://github.com/grafana/grafana/projects/33" - } - }, - { - "type": "label", - "name": "team/grafana-partners", - "action": "addToProject", - "addToProject": { - "url": "https://github.com/orgs/grafana/projects/87" - } - }, - { - "type": "label", - "name": "team/grafana-authnz", - "action": "addToProject", - "addToProject": { - "url": "https://github.com/orgs/grafana/projects/86" - } - }, - { - "type": "label", - "name": "area/auth", - "action": "addToProject", - "addToProject": { - "url": "https://github.com/orgs/grafana/projects/86" - } - }, - { - "type": "label", - "name": "area/auth/rbac", - "action": "addToProject", - "addToProject": { - "url": "https://github.com/orgs/grafana/projects/86" - } - }, - { - "type": "label", - "name": "area/auth/serviceaccount", - "action": "addToProject", - "addToProject": { - "url": "https://github.com/orgs/grafana/projects/86" - } - }, - { - "type": "label", - "name": "area/auth/authproxy", - "action": "addToProject", - "addToProject": { - "url": "https://github.com/orgs/grafana/projects/86" - } - }, - { - "type": "label", - "name": "area/auth/oauth", - "action": "addToProject", - "addToProject": { - "url": "https://github.com/orgs/grafana/projects/86" - } - }, - { - "type": "label", - "name": "area/auth/ldap", - "action": "addToProject", - "addToProject": { - "url": "https://github.com/orgs/grafana/projects/86" - } - }, - { - "type": "label", - "name": "area/auth/saml", - "action": "addToProject", - "addToProject": { - "url": "https://github.com/orgs/grafana/projects/86" - } - }, - { - "type": "label", - "name": "area/auth/apikeys", - "action": "addToProject", - "addToProject": { - "url": "https://github.com/orgs/grafana/projects/86" - } - }, - { - "type": "label", - "name": "area/auth/dspermissions", - "action": "addToProject", - "addToProject": { - "url": "https://github.com/orgs/grafana/projects/86" - } - }, - { - "type": "label", - "name": "area/auth/teamsync", - "action": "addToProject", - "addToProject": { - "url": "https://github.com/orgs/grafana/projects/86" - } - } -] diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 5db8a10262655..0000000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,10 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "daily" - - package-ecosystem: "gomod" - directory: "/" - schedule: - interval: "weekly" diff --git a/.github/metrics-collector.json b/.github/metrics-collector.json deleted file mode 100644 index 9ff69ea7c11b0..0000000000000 --- a/.github/metrics-collector.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "queries": [ - { - "name": "type_bug", - "query": "label:\"type/bug\" is:open" - }, - { - "name": "type_docs", - "query": "label:\"type/docs\" is:open" - }, - { - "name": "needs_investigation", - "query": "label:\"needs investigation\" is:open" - }, - { - "name": "needs_more_info", - "query": "label:\"needs more info\" is:open" - }, - { - "name": "triage_needs_confirmation", - "query": "label:\"triage/needs-confirmation\" is:open" - }, - { - "name": "unlabeled", - "query": "is:open is:issue no:label" - }, - { - "name": "open_prs", - "query": "is:open is:pr" - } - ] -} diff --git a/.github/pr-checks.json b/.github/pr-checks.json deleted file mode 100644 index b0ea1c5c63960..0000000000000 --- a/.github/pr-checks.json +++ /dev/null @@ -1,49 +0,0 @@ -[ - { - "type": "check-milestone", - "title": "Milestone Check", - "targetUrl": "https://github.com/grafana/grafana/blob/main/contribute/merge-pull-request.md#assign-a-milestone", - "success": "Milestone set", - "failure": "Milestone not set" - }, - { - "type": "check-label", - "title": "Backport Check", - "labels": { - "exists": "Backport enabled", - "notExists": "Backport decision needed", - "matches": [ - "backport v*" - ] - }, - "skip": { - "message": "Backport skipped", - "matches": [ - "backport", - "no-backport" - ] - }, - "targetUrl": "https://github.com/grafana/grafana/blob/main/contribute/merge-pull-request.md#should-the-pull-request-be-backported" - }, - { - "type": "check-changelog", - "title": "Changelog Check", - "labels": { - "exists": "Changelog enabled", - "notExists": "Changelog decision needed", - "matches": [ - "add to changelog" - ] - }, - "breakingChangeLabels": [ - "breaking change" - ], - "skip": { - "message": "Changelog skipped", - "matches": [ - "no-changelog" - ] - }, - "targetUrl": "https://github.com/grafana/grafana/blob/main/contribute/merge-pull-request.md#include-in-changelog-and-release-notes" - } -] \ No newline at end of file diff --git a/.github/pr-commands.json b/.github/pr-commands.json deleted file mode 100644 index 544581a0a7c25..0000000000000 --- a/.github/pr-commands.json +++ /dev/null @@ -1,194 +0,0 @@ -[ - { - "type": "changedfiles", - "matches": [ - "docs/**/*", - "contribute/**/*" - ], - "action": "updateLabel", - "addLabel": "type/docs" - }, - { - "type": "changedfiles", - "matches": [ - "public/**/*", - "packages/**/*", - "e2e/**/*", - "plugins-bundled/**/*", - "scripts/build/release-packages.sh", - "scripts/circle-release-next-packages.sh", - "scripts/ci-frontend-metrics.sh", - "scripts/grunt/**/*", - "scripts/webpack/**/*", - "package.json", - "tsconfig.json", - "lerna.json", - ".babelrc", - ".prettierrc.js", - ".eslintrc", - "**/*.mdx" - ], - "action": "updateLabel", - "addLabel": "area/frontend" - }, - { - "type": "changedfiles", - "matches": [ - "**/*.go", - "go.mod", - "go.sum", - "contribute/style-guides/backend.md", - "contribute/architecture/backend/**/*" - ], - "action": "updateLabel", - "addLabel": "area/backend" - }, - { - "type": "changedfiles", - "matches": [ - "pkg/services/sqlstore/migrations/**/*", - "**/*_mig.go" - ], - "action": "updateLabel", - "addLabel": "area/backend/db/migration" - }, - { - "type": "changedfiles", - "matches": [ "public/app/features/explore/**/*"], - "action": "updateLabel", - "addLabel": "area/explore" - }, - { - "type": "changedfiles", - "matches": [ - ".circleci/**/*", - "packaging/**/*", - "scripts/build/**/*", - "scripts/*.sh", - "Makefile", - "Dockerfile" - ], - "action": "updateLabel", - "addLabel": "type/build-packaging" - }, - { - "type": "changedfiles", - "matches": [ - "scripts/*.star", - ".drone.star", - ".drone.yml" - ], - "action": "updateLabel", - "addLabel": "type/ci" - }, - { - "type": "changedfiles", - "matches": [ "public/app/plugins/datasource/grafana-azure-monitor-datasource/**/*", "pkg/tsdb/azuremonitor/**/*"], - "action": "updateLabel", - "addLabel": "datasource/Azure" - }, - { - "type": "changedfiles", - "matches": [ "public/app/plugins/datasource/cloud-monitoring/**/*", "pkg/tsdb/cloudmonitoring/**/*"], - "action": "updateLabel", - "addLabel": "datasource/GoogleCloudMonitoring" - }, - { - "type": "changedfiles", - "matches": [ "public/app/plugins/datasource/cloudwatch/**/*", "pkg/tsdb/cloudwatch/**/*"], - "action": "updateLabel", - "addLabel": "datasource/CloudWatch" - }, - { - "type": "changedfiles", - "matches": [ "public/app/plugins/datasource/elasticsearch/**/*", "pkg/tsdb/elasticsearch/**/*"], - "action": "updateLabel", - "addLabel": "datasource/Elasticsearch" - }, - { - "type": "changedfiles", - "matches": [ "public/app/plugins/datasource/graphite/**/*", "pkg/tsdb/graphite/**/*"], - "action": "updateLabel", - "addLabel": "datasource/Graphite" - }, - { - "type": "changedfiles", - "matches": [ "public/app/plugins/datasource/influxdb/**/*", "pkg/tsdb/influx/**/*"], - "action": "updateLabel", - "addLabel": "datasource/InfluxDB" - }, - { - "type": "changedfiles", - "matches": [ "public/app/plugins/datasource/jaeger"], - "action": "updateLabel", - "addLabel": "datasource/Jaeger" - }, - { - "type": "changedfiles", - "matches": [ "public/app/plugins/datasource/loki/**/*", "pkg/tsdb/loki/**/*"], - "action": "updateLabel", - "addLabel": "datasource/Loki" - }, - { - "type": "changedfiles", - "matches": [ "public/app/plugins/datasource/mssql/**/*", "pkg/tsdb/mssql/**/*"], - "action": "updateLabel", - "addLabel": "datasource/MSSQL" - }, - { - "type": "changedfiles", - "matches": [ "public/app/plugins/datasource/mysql/**/*", "pkg/tsdb/mysql/**/*"], - "action": "updateLabel", - "addLabel": "datasource/MySQL" - }, - { - "type": "changedfiles", - "matches": [ "public/app/plugins/datasource/opentsdb/**/*", "pkg/tsdb/opentsdb/**/*"], - "action": "updateLabel", - "addLabel": "datasource/OpenTSDB" - }, - { - "type": "changedfiles", - "matches": [ "public/app/plugins/datasource/postgres/**/*", "pkg/tsdb/postgres/**/*"], - "action": "updateLabel", - "addLabel": "datasource/Postgres" - }, - { - "type": "changedfiles", - "matches": [ "public/app/plugins/datasource/prometheus/**/*", "pkg/tsdb/prometheus/**/*"], - "action": "updateLabel", - "addLabel": "datasource/Prometheus" - }, - { - "type": "changedfiles", - "matches": [ "public/app/plugins/datasource/tempo/**/*", "pkg/tsdb/tempo/**/*"], - "action": "updateLabel", - "addLabel": "datasource/Tempo" - }, - { - "type": "changedfiles", - "matches": [ "public/app/plugins/datasource/zipkin/**/*"], - "action": "updateLabel", - "addLabel": "datasource/Zipkin" - }, - { - "type": "changedfiles", - "matches": ["public/app/features/variables/**/*", "public/app/features/templating/**/*"], - "action": "updateLabel", - "addLabel": "area/dashboard/templating" - }, - { - "type": "changedfiles", - "matches": ["/pkg/services/ngalert/**/*", "/pkg/services/sqlstore/migrations/ualert/**/*", "/pkg/services/alerting/**/*", "/public/app/features/alerting/**/*", "/pkg/tests/api/alerting/**/*"], - "action": "updateLabel", - "addLabel": "area/alerting" - }, - { - "type": "author", - "name": "pr/external", - "notMemberOf": { "org": "grafana" }, - "ignoreList": ["renovate[bot]","dependabot[bot]"], - "action": "updateLabel", - "addLabel": "pr/external" - } -] diff --git a/.github/renovate.json5 b/.github/renovate.json5 deleted file mode 100644 index 235131251d8f8..0000000000000 --- a/.github/renovate.json5 +++ /dev/null @@ -1,87 +0,0 @@ -{ - "extends": [ - "config:base" - ], - "enabledManagers": ["npm"], - "ignoreDeps": [ - "@types/systemjs", - "@types/react-icons", // jaeger-ui-components is being refactored to use @grafana/ui icons instead - "commander", // we are planning to remove this, so no need to update it - "execa", // we should bump this once we move to esm modules - "history", // we should bump this together with react-router-dom - "@mdx-js/react", // storybook peer-depends on its 1.x version, we should upgrade this when we upgrade storybook - "monaco-editor", // due to us exposing this via @grafana/ui/CodeEditor's props bumping can break plugins - "node-fetch", // we should bump this once we move to esm modules - "react-hook-form", // due to us exposing these hooks via @grafana/ui form components bumping can break plugins - "react-icons", // jaeger-ui-components is being refactored to use @grafana/ui icons instead - "react-redux", // react-beautiful-dnd depends on react-redux 7.x, we need to update that one first - "react-router-dom", // we should bump this together with history - "systemjs", - "copy-webpack-plugin", // try to upgrade with newer yarn release. Not working with 3.1.1 - "ts-loader", // we should remove ts-loader and use babel-loader instead - "ora", // we should bump this once we move to esm modules - - // dep updates blocked by React 18 - "@testing-library/react", - "@types/react", - "@types/react-dom", - "@types/react-test-renderer", - "react", - "react-dom", - "react-test-renderer" - ], - "ignorePaths": ["packages/grafana-toolkit/package.json", "emails/**", "plugins-bundled/**", "**/mocks/**"], - "labels": ["area/frontend", "dependencies", "no-backport", "no-changelog"], - "packageRules": [ - { - "matchUpdateTypes": ["patch"], - "excludePackagePatterns": ["@storybook"], - "extends": ["schedule:monthly"], - "groupName": "Monthly patch updates" - }, - { - "matchPackagePatterns": ["@storybook"], - "extends": ["schedule:monthly"], - "groupName": "Storybook updates" - }, - { - "groupName": "React Aria", - "matchPackagePrefixes": [ - "@react-aria/", - "@react-stately/" - ] - }, - { - "groupName": "Moveable", - "matchPackageNames": [ - "moveable", - "react-moveable" - ] - }, - { - "groupName": "Slate", - "matchPackageNames": [ - "@types/slate", - "@types/slate-react", - "slate", - "slate-react" - ] - }, - { - "groupName": "d3", - "matchPackagePrefixes": [ - "d3", - "@types/d3" - ] - }, - ], - "pin": { - "enabled": false - }, - "prConcurrentLimit": 10, - "reviewers": ["team:grafana/frontend-ops"], - "separateMajorMinor": false, - "vulnerabilityAlerts": { - "addLabels": ["area/security"] - } -} diff --git a/.github/teams.yml b/.github/teams.yml deleted file mode 100644 index 00259652beeed..0000000000000 --- a/.github/teams.yml +++ /dev/null @@ -1,11 +0,0 @@ -# The first keys are labels used on issues. All fields are optional. -# Example -test: - # channel-label is used to send a message to a specific channel - # when the label "test" is added to an issue. - channel-label: CXXXXXXXXXX - -# Alerting team -area/alerting: - github-board: 52 - channel-label: C02B9MXQE0J diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml deleted file mode 100644 index 1d46d8d57db7c..0000000000000 --- a/.github/workflows/backport.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Backport PR Creator -on: - pull_request_target: - types: - - closed - - labeled - -jobs: - main: - runs-on: ubuntu-latest - steps: - - name: Checkout Actions - uses: actions/checkout@v3 - with: - repository: "grafana/grafana-github-actions" - path: ./actions - ref: main - - name: Install Actions - run: npm install --production --prefix ./actions - - name: Run backport - uses: ./actions/backport - with: - metricsWriteAPIKey: ${{secrets.GRAFANA_MISC_STATS_API_KEY}} - token: ${{secrets.GH_BOT_ACCESS_TOKEN}} - labelsToAdd: "backport,no-changelog" - title: "[{{base}}] {{originalTitle}}" diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml deleted file mode 100644 index b07cf46eeba45..0000000000000 --- a/.github/workflows/bump-version.yml +++ /dev/null @@ -1,75 +0,0 @@ -name: Bump version -on: - workflow_dispatch: - inputs: - version: - description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch or major.minor.patch-beta format. example: 7.4.3 or 7.4.3-beta1' - required: true -env: - YARN_ENABLE_IMMUTABLE_INSTALLS: false -jobs: - main: - runs-on: ubuntu-latest - steps: - # This is a basic workflow to help you get started with Actions - - uses: actions-ecosystem/action-regex-match@v2.0.2 - if: ${{ github.event.inputs.version != '' }} - id: regex-match - with: - text: ${{ github.event.inputs.version }} - regex: '^(\d+.\d+).\d+(?:-beta\d+)?$' - - uses: actions-ecosystem/action-regex-match@v2.0.2 - if: ${{ inputs.version_call != '' }} - id: regex-match-version-call - with: - text: ${{ inputs.version_call }} - regex: '^(\d+.\d+).\d+(?:-beta\d+)?$' - - name: Validate input version - if: ${{ steps.regex-match.outputs.match == '' && github.event.inputs.version != '' }} - run: | - echo "The input version format is not correct, please respect:\ - major.minor.patch or major.minor.patch-beta.number format. \ - example: 7.4.3 or 7.4.3-beta1" - exit 1 - - name: Validate input version call - if: ${{ inputs.version_call != '' && steps.regex-match-version-call.outputs.match == '' }} - run: | - echo "The input version format is not correct, please respect:\ - major.minor.patch or major.minor.patch-beta format. \ - example: 7.4.3 or 7.4.3-beta1" - exit 1 - - - uses: actions/checkout@v3 - - - name: Set intermedia variables - id: intermedia - run: | - echo "short_ref=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT - echo "check_passed=false" >> $GITHUB_OUTPUT - echo "branch_name=v${{steps.regex-match.outputs.group1}}" >> $GITHUB_OUTPUT - echo "branch_exist=$(git ls-remote --heads https://github.com/grafana/grafana.git v${{ steps.regex-match.outputs.group1 }}.x | wc -l)" >> $GITHUB_OUTPUT - - - name: Check input version is aligned with branch(main) - if: ${{ github.event.inputs.version != '' && steps.intermedia.outputs.branch_exist == '0' && !contains(steps.intermedia.outputs.short_ref, 'main') }} - run: | - echo "When you want to deliver a new new minor version, you might want to create a new branch first \ - with naming convention v[major].[minor].x, and just run the workflow on that branch. \ - Run the workflow on main only when needed" - exit 1 - - - name: Checkout Actions - uses: actions/checkout@v3 - with: - repository: "grafana/grafana-github-actions" - path: ./actions - ref: main - - uses: actions/setup-node@v3.5.1 - with: - node-version: '16' - - name: Install Actions - run: npm install --production --prefix ./actions - - name: Run bump version (manually invoked) - uses: ./actions/bump-version - with: - token: ${{ secrets.GH_BOT_ACCESS_TOKEN }} - metricsWriteAPIKey: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }} diff --git a/.github/workflows/chatgpt-review.yml b/.github/workflows/chatgpt-review.yml new file mode 100644 index 0000000000000..865c21b2b0570 --- /dev/null +++ b/.github/workflows/chatgpt-review.yml @@ -0,0 +1,30 @@ +name: ChatGPT Reviewer + +permissions: + contents: read + pull-requests: write + +on: [pull_request] + +concurrency: + group: + ${{ github.repository }}-${{ github.event.number || github.head_ref || + github.sha }}-${{ github.workflow }} + cancel-in-progress: true + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + repository: ${{github.event.pull_request.head.repo.full_name}} + ref: ${{github.event.pull_request.head.ref}} + submodules: false + - uses: fluxninja/chatgpt-pr-reviewer@main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + with: + debug: false + review_comment_lgtm: false diff --git a/.github/workflows/close-milestone.yml b/.github/workflows/close-milestone.yml deleted file mode 100644 index e798f0cd4bf62..0000000000000 --- a/.github/workflows/close-milestone.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Close milestone -on: - workflow_dispatch: - inputs: - version: - required: true - description: Needs to match, exactly, the name of a milestone - workflow_call: - inputs: - version_call: - description: Needs to match, exactly, the name of a milestone - required: true - type: string - secrets: - token: - required: true -jobs: - main: - runs-on: ubuntu-latest - steps: - - name: Checkout Actions - uses: actions/checkout@v3 - with: - repository: "grafana/grafana-github-actions" - path: ./actions - ref: main - - name: Install Actions - run: npm install --production --prefix ./actions - - name: Close milestone (manually invoked) - if: ${{ github.event.inputs.version != '' }} - uses: ./actions/close-milestone - with: - token: ${{ secrets.GH_BOT_ACCESS_TOKEN }} - - name: Close milestone (workflow invoked) - if: ${{ inputs.version_call != '' }} - uses: ./actions/close-milestone - with: - version_call: ${{ inputs.version_call }} - token: ${{ secrets.token }} diff --git a/.github/workflows/cloud-data-sources-code-coverage.yml b/.github/workflows/cloud-data-sources-code-coverage.yml deleted file mode 100644 index a848dc4c1d021..0000000000000 --- a/.github/workflows/cloud-data-sources-code-coverage.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Cloud data sources test code coverage -on: - pull_request: - paths: - - 'pkg/tsdb/azuremonitor/**' - - 'pkg/tsdb/cloudwatch/**' - - 'pkg/tsdb/cloudmonitoring/**' - - 'public/app/plugins/datasource/grafana-azure-monitor-datasource/**' - - 'public/app/plugins/datasource/cloudwatch/**' - - 'public/app/plugins/datasource/cloud-monitoring/**' - branches-ignore: - - dependabot/** - - backport-* - -jobs: - workflow-call: - uses: grafana/code-coverage/.github/workflows/code-coverage.yml@v0.1.12 - with: - frontend-path-regexp: public\/app\/plugins\/datasource\/(grafana-azure-monitor-datasource|cloud-monitoring|cloudwatch) - backend-path-regexp: pkg\/tsdb\/(azuremonitor|cloudmonitoring|cloudwatch) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 3fceb0d354597..0000000000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,66 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -name: "CodeQL" - -on: - workflow_dispatch: - push: - branches: [main, v1.8.x, v2.0.x, v2.1.x, v2.6.x, v3.0.x, v3.1.x, v4.0.x, v4.1.x, v4.2.x, v4.3.x, v4.4.x, v4.5.x, v4.6.x, v4.7.x, v5.0.x, v5.1.x, v5.2.x, v5.3.x, v5.4.x, v6.0.x, v6.1.x, v6.2.x, v6.3.x, v6.4.x, v6.5.x, v6.6.x, v6.7.x, v7.0.x, v7.1.x, v7.2.x] - paths-ignore: - - '**/*.cue' - - '**/*.json' - - '**/*.md' - - '**/*.txt' - - '**/*.yml' - schedule: - - cron: '0 4 * * 6' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - # Override automatic language detection by changing the below list - # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] - language: ['javascript', 'go', 'python'] - # Learn more... - # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 - - - if: matrix.language == 'go' - name: Set go version - uses: actions/setup-go@v3 - with: - go-version: '1.19.2' - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - - if: matrix.language == 'go' - name: Build go files - run: | - go mod verify - make build-go - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/commands.yml b/.github/workflows/commands.yml deleted file mode 100644 index ac5a03f9d5c7d..0000000000000 --- a/.github/workflows/commands.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Run commands when issues are labeled or comments added -on: - issues: - types: [labeled, unlabeled] - issue_comment: - types: [created] -concurrency: - group: issue-commands-${{ github.event.issue.number }} -jobs: - main: - runs-on: ubuntu-latest - steps: - - name: Checkout Actions - uses: actions/checkout@v3 - with: - repository: "grafana/grafana-github-actions" - path: ./actions - ref: main - - name: Install Actions - run: npm install --production --prefix ./actions - - name: Run Commands - uses: ./actions/commands - with: - metricsWriteAPIKey: ${{secrets.GRAFANA_MISC_STATS_API_KEY}} - token: ${{secrets.GH_BOT_ACCESS_TOKEN}} - configPath: commands diff --git a/.github/workflows/detect-breaking-changes-build-skip.yml b/.github/workflows/detect-breaking-changes-build-skip.yml deleted file mode 100644 index 5b71987e0fedc..0000000000000 --- a/.github/workflows/detect-breaking-changes-build-skip.yml +++ /dev/null @@ -1,32 +0,0 @@ -# Workflow for skipping the Levitate detection -# (This is needed because workflows that are skipped due to path filtering will show up as pending in Github. -# As this has the same name as the one in detect-breaking-changes-build.yml it will take over in these cases and succeed quickly.) - -name: Levitate / Detect breaking changes - -on: - pull_request: - paths-ignore: - - "packages/**" - -jobs: - detect: - name: Detect breaking changes - runs-on: ubuntu-latest - - steps: - - name: Skipping - run: echo "No modifications in the public API (packages/), skipping." - - # Build and persist output as a JSON (we need to tell the report workflow that the check has been skipped) - - name: Persisting the check output - run: | - mkdir -p ./levitate - echo "{ \"shouldSkip\": true }" > ./levitate/result.json - - # Upload artifact (so it can be used in the more privileged "report" workflow) - - name: Upload check output as artifact - uses: actions/upload-artifact@v3 - with: - name: levitate - path: levitate/ diff --git a/.github/workflows/detect-breaking-changes-build.yml b/.github/workflows/detect-breaking-changes-build.yml deleted file mode 100644 index e9beb73f709f2..0000000000000 --- a/.github/workflows/detect-breaking-changes-build.yml +++ /dev/null @@ -1,160 +0,0 @@ -# Only runs if anything under the packages/ directory changes. -# (Otherwise detect-breaking-changes-build-skip.yml takes over) - -name: Levitate / Detect breaking changes - -on: - pull_request: - paths: - - 'packages/**' - -jobs: - buildPR: - name: Build PR - runs-on: ubuntu-latest - defaults: - run: - working-directory: './pr' - - steps: - - uses: actions/checkout@v3 - with: - path: './pr' - - uses: actions/setup-node@v3.5.1 - with: - node-version: 16.16.0 - - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - - - name: Restore yarn cache - uses: actions/cache@v3.0.11 - id: yarn-cache - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }} - restore-keys: | - yarn-cache-folder- - - - name: Install dependencies - run: yarn install --immutable - - - name: Build packages - run: yarn packages:build - - - name: Pack packages - run: yarn packages:pack --out ./%s.tgz - - - name: Zip built tarballed packages - run: zip -r ./pr_built_packages.zip ./packages/**/*.tgz - - - name: Upload build output as artifact - uses: actions/upload-artifact@v3 - with: - name: buildPr - path: './pr/pr_built_packages.zip' - - buildBase: - name: Build Base - runs-on: ubuntu-latest - defaults: - run: - working-directory: './base' - - steps: - - uses: actions/checkout@v3 - with: - path: './base' - ref: ${{ github.event.pull_request.base.ref }} - - - uses: actions/setup-node@v3.5.1 - with: - node-version: 16.16.0 - - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - - - name: Restore yarn cache - uses: actions/cache@v3.0.11 - id: yarn-cache - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }} - restore-keys: | - yarn-cache-folder- - - - name: Install dependencies - run: yarn install --immutable - - - name: Build packages - run: yarn packages:build - - - name: Pack packages - run: yarn packages:pack --out ./%s.tgz - - - name: Zip built tarballed packages - run: zip -r ./base_built_packages.zip ./packages/**/*.tgz - - - name: Upload build output as artifact - uses: actions/upload-artifact@v3 - with: - name: buildBase - path: './base/base_built_packages.zip' - - Detect: - name: Detect breaking changes - runs-on: ubuntu-latest - needs: ['buildPR', 'buildBase'] - env: - GITHUB_STEP_NUMBER: 7 - - steps: - - uses: actions/checkout@v3 - - - name: Get built packages from pr - uses: actions/download-artifact@v3 - with: - name: buildPr - - - name: Get built packages from base - uses: actions/download-artifact@v3 - with: - name: buildBase - - - name: Unzip artifact from pr - run: unzip -j pr_built_packages.zip -d ./pr && rm pr_built_packages.zip - - - name: Unzip artifact from base - run: unzip -j base_built_packages.zip -d ./base && rm base_built_packages.zip - - - name: Get link for the Github Action job - id: job - uses: actions/github-script@v6 - with: - script: | - const script = require('./.github/workflows/scripts/pr-get-job-link.js') - await script({github, context, core}) - - - name: Detect breaking changes - id: breaking-changes - run: ./scripts/check-breaking-changes.sh - env: - FORCE_COLOR: 3 - GITHUB_JOB_LINK: ${{ steps.job.outputs.link }} - - - name: Persisting the check output - run: | - mkdir -p ./levitate - echo "{ \"exit_code\": ${{ steps.breaking-changes.outputs.is_breaking }}, \"message\": \"${{ steps.breaking-changes.outputs.message }}\", \"job_link\": \"${{ steps.job.outputs.link }}#step:${GITHUB_STEP_NUMBER}:1\", \"pr_number\": \"${{ github.event.pull_request.number }}\" }" > ./levitate/result.json - - - name: Upload check output as artifact - uses: actions/upload-artifact@v3 - with: - name: levitate - path: levitate/ - - - name: Exit - run: exit ${{ steps.breaking-changes.outputs.is_breaking }} - shell: bash diff --git a/.github/workflows/detect-breaking-changes-report.yml b/.github/workflows/detect-breaking-changes-report.yml deleted file mode 100644 index 45e2804d07747..0000000000000 --- a/.github/workflows/detect-breaking-changes-report.yml +++ /dev/null @@ -1,201 +0,0 @@ -name: Levitate / Report breaking changes - -on: - workflow_run: - workflows: ["Levitate / Detect breaking changes"] - types: [completed] - -jobs: - notify: - name: Report - runs-on: ubuntu-latest - env: - ARTIFACT_NAME: 'levitate' # The name of the artifact that we would like to download - ARTIFACT_FOLDER: '${{ github.workspace }}/tmp' # The name of the folder where we will download the artifact to - - steps: - - uses: actions/checkout@v3 - - # Download artifact (as a .zip archive) - - name: 'Download artifact' - uses: actions/github-script@v6 - env: - RUN_ID: ${{ github.event.workflow_run.id }} - with: - script: | - const fs = require('fs'); - - const { owner, repo } = context.repo; - const runId = process.env.RUN_ID; - const artifactName = process.env.ARTIFACT_NAME; - const artifactFolder = process.env.ARTIFACT_FOLDER; - const artifacts = await github.rest.actions.listWorkflowRunArtifacts({ - owner, - repo, - run_id: runId, - }); - const artifact = artifacts.data.artifacts.find(a => a.name === artifactName); - - if (!artifact) { - throw new Error(`Could not find artifact ${ artifactName } in workflow (${ runId })`); - } - - const download = await github.rest.actions.downloadArtifact({ - owner, - repo, - artifact_id: artifact.id, - archive_format: 'zip', - }); - - fs.mkdirSync(artifactFolder, { recursive: true }); - fs.writeFileSync(`${ artifactFolder }/${ artifactName }.zip`, Buffer.from(download.data)); - - # Unzip artifact - - name: Unzip artifact - run: unzip "${ARTIFACT_FOLDER}/${ARTIFACT_NAME}.zip" -d "${ARTIFACT_FOLDER}" - - # Parse the artifact and register fields as step output variables - # (All fields in the JSON will be available as ${{ steps.levitate-run.outputs. }} - - name: Parsing levitate result - uses: actions/github-script@v6 - id: levitate-run - with: - script: | - const filePath = `${ process.env.ARTIFACT_FOLDER }/result.json`; - const script = require('./.github/workflows/scripts/json-file-to-job-output.js'); - await script({ core, filePath }); - - # Skip - print a message if the "Detect" workflow was skipped - - name: Check if the workflow should be skipped - if: steps.levitate-run.outputs.shouldSkip == 'true' - run: echo "Skipping." - - # Check if label exists - - name: Check if "levitate breaking change" label exists - id: does-label-exist - if: steps.levitate-run.outputs.shouldSkip != 'true' - uses: actions/github-script@v6 - env: - PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }} - with: - script: | - const { data } = await github.rest.issues.listLabelsOnIssue({ - issue_number: process.env.PR_NUMBER, - owner: context.repo.owner, - repo: context.repo.repo, - }); - const labels = data.map(({ name }) => name); - const doesExist = labels.includes('levitate breaking change'); - - return doesExist ? 1 : 0; - - # Comment on the PR - - name: Comment on PR - if: steps.levitate-run.outputs.exit_code == 1 && steps.levitate-run.outputs.shouldSkip != 'true' - uses: marocchino/sticky-pull-request-comment@v2 - with: - number: ${{ steps.levitate-run.outputs.pr_number }} - message: | - ⚠️   **Possible breaking changes** - - _(Open the links below in a new tab to go to the correct steps)_ - - ${{ steps.levitate-run.outputs.message }} - - [Console output](${{ steps.levitate-run.outputs.job_link }}) - [Read our guideline](https://github.com/grafana/grafana/blob/main/contribute/breaking-changes-guide.md) - - # Remove comment from the PR (no more breaking changes) - - name: Remove comment from PR - if: steps.levitate-run.outputs.exit_code == 0 && steps.levitate-run.outputs.shouldSkip != 'true' - uses: marocchino/sticky-pull-request-comment@v2 - with: - number: ${{ steps.levitate-run.outputs.pr_number }} - delete: true - - # Posts a notification to Slack if a PR has a breaking change and it did not have a breaking change before - - name: Post to Slack - id: slack - if: steps.levitate-run.outputs.exit_code == 1 && steps.does-label-exist.outputs.result == 0 && steps.levitate-run.outputs.shouldSkip != 'true' - uses: slackapi/slack-github-action@v1.23.0 - with: - payload: | - { - "pr_link": "https://github.com/grafana/grafana/pull/${{ steps.levitate-run.outputs.pr_number }}", - "pr_number": "${{ steps.levitate-run.outputs.pr_number }}", - "job_link": "${{ steps.levitate-run.outputs.job_link }}", - "reporting_job_link": "${{ github.event.workflow_run.html_url }}", - "message": "${{ steps.levitate-run.outputs.message }}" - } - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_LEVITATE_WEBHOOK_URL }} - - # Add the label - - name: Add "levitate breaking change" label - if: steps.levitate-run.outputs.exit_code == 1 && steps.does-label-exist.outputs.result == 0 && steps.levitate-run.outputs.shouldSkip != 'true' - uses: actions/github-script@v6 - env: - PR_NUMBER: ${{ steps.levitate-run.outputs.pr_number }} - with: - github-token: ${{ secrets.GH_BOT_ACCESS_TOKEN }} - script: | - await github.rest.issues.addLabels({ - issue_number: process.env.PR_NUMBER, - owner: context.repo.owner, - repo: context.repo.repo, - labels: ['levitate breaking change'] - }) - - # Remove label (no more breaking changes) - - name: Remove "levitate breaking change" label - if: steps.levitate-run.outputs.exit_code == 0 && steps.does-label-exist.outputs.result == 1 && steps.levitate-run.outputs.shouldSkip != 'true' - uses: actions/github-script@v6 - env: - PR_NUMBER: ${{ steps.levitate-run.outputs.pr_number }} - with: - github-token: ${{ secrets.GH_BOT_ACCESS_TOKEN }} - script: | - await github.rest.issues.removeLabel({ - issue_number: process.env.PR_NUMBER, - owner: context.repo.owner, - repo: context.repo.repo, - name: 'levitate breaking change' - }) - - # Add reviewers - # This is very weird, the actual request goes through (comes back with a 201), but does not assign the team. - # Related issue: https://github.com/renovatebot/renovate/issues/1908 - - name: Add "grafana/plugins-platform-frontend" as a reviewer - if: steps.levitate-run.outputs.exit_code && steps.levitate-run.outputs.shouldSkip != 'true' - uses: actions/github-script@v6 - env: - PR_NUMBER: ${{ steps.levitate-run.outputs.pr_number }} - with: - github-token: ${{ secrets.GH_BOT_ACCESS_TOKEN }} - script: | - await github.rest.pulls.requestReviewers({ - pull_number: process.env.PR_NUMBER, - owner: context.repo.owner, - repo: context.repo.repo, - reviewers: [], - team_reviewers: ['grafana/plugins-platform-frontend'] - }); - - # Remove reviewers (no more breaking changes) - - name: Remove "grafana/plugins-platform-frontend" from the list of reviewers - if: steps.levitate-run.outputs.exit_code == 0 && steps.levitate-run.outputs.shouldSkip != 'true' - uses: actions/github-script@v6 - env: - PR_NUMBER: ${{ steps.levitate-run.outputs.pr_number }} - with: - github-token: ${{ secrets.GH_BOT_ACCESS_TOKEN }} - script: | - await github.rest.pulls.removeRequestedReviewers({ - pull_number: process.env.PR_NUMBER, - owner: context.repo.owner, - repo: context.repo.repo, - reviewers: [], - team_reviewers: ['grafana/plugins-platform-frontend'] - }); - - diff --git a/.github/workflows/doc-validator.yml b/.github/workflows/doc-validator.yml deleted file mode 100644 index 63a2ef54dcb4d..0000000000000 --- a/.github/workflows/doc-validator.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: "doc-validator" -on: - pull_request: - paths: ["docs/sources/**"] - workflow_dispatch: -jobs: - doc-validator: - runs-on: "ubuntu-latest" - container: - image: "grafana/doc-validator:latest" - steps: - - name: "Checkout code" - uses: "actions/checkout@v3" - - name: "Run doc-validator tool" - # Ensure that the CI always passes until all errors are resolved. - run: "doc-validator ./docs/sources || true" diff --git a/.github/workflows/enterprise-pr-check.yml b/.github/workflows/enterprise-pr-check.yml deleted file mode 100644 index f5552fe94377b..0000000000000 --- a/.github/workflows/enterprise-pr-check.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Enterprise PR check -on: - pull_request: - branches: - - main - - 'v[0-9]+.[0-9]+.x' -jobs: - dispatch: - runs-on: ubuntu-latest - steps: - - name: Checkout Actions - uses: actions/checkout@v2 - with: - repository: "grafana/grafana-github-actions" - path: ./actions - ref: main - - name: Install Actions - run: npm install --production --prefix ./actions - - name: Repository Dispatch - uses: ./actions/repository-dispatch - with: - token: ${{ secrets.GH_BOT_ACCESS_TOKEN }} - repository: grafana/grafana-enterprise - event_type: oss-pull-request - client_payload: - '{"source_branch": "${{ github.head_ref }}", "target_branch": "${{ github.base_ref }}", "pr_number": "${{ github.event.number }}"}' diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml deleted file mode 100644 index f0223cfdcca65..0000000000000 --- a/.github/workflows/github-release.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Create or update GitHub release -on: - workflow_dispatch: - inputs: - version: - required: true - description: Needs to match, exactly, the name of a milestone (NO v prefix) -jobs: - main: - runs-on: ubuntu-latest - steps: - - name: Checkout Actions - uses: actions/checkout@v3 - with: - repository: "grafana/grafana-github-actions" - path: ./actions - ref: main - - name: Install Actions - run: npm install --production --prefix ./actions - - name: Run github release action - uses: ./actions/github-release - with: - token: ${{secrets.GH_BOT_ACCESS_TOKEN}} - metricsWriteAPIKey: ${{secrets.GRAFANA_MISC_STATS_API_KEY}} diff --git a/.github/workflows/issue-labeled.yml b/.github/workflows/issue-labeled.yml deleted file mode 100644 index 9fb045ed8b751..0000000000000 --- a/.github/workflows/issue-labeled.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: Notify Slack channel based on issue label - -on: - issues: - types: [labeled] - -jobs: - notify: - runs-on: ubuntu-latest - steps: - - name: "Download teams.yml to know which label is for which team" - run: wget https://raw.githubusercontent.com/grafana/grafana/main/.github/teams.yml - - - name: "Determine which team to notify" - run: | - # Default to null values. - BOARD="null" - CHANNEL="null" - - echo "${{ github.event.label.name }} label added" - export CURRENT_LABEL="${{ github.event.label.name }}" # Enable the use of the label in yq evaluations - # yq is installed by default in ubuntu-latest - if [[ $(yq e 'keys | .[] | select(. == env(CURRENT_LABEL))' teams.yml ) ]]; then - # Check if we have a board set to use. - if [[ $(yq '.[env(CURRENT_LABEL)] | has("github-board")' teams.yml ) == true ]]; then - BOARD=$(yq '.[env(CURRENT_LABEL)].github-board' teams.yml) - echo "Ready to add issue to Grafana board ${BOARD}" - fi - # Check if we have a channel set to notify on comments. - if [[ $(yq '.[env(CURRENT_LABEL)] | has("channel-label")' teams.yml ) == true ]]; then - CHANNEL=$(yq '.[env(CURRENT_LABEL)].channel-label' teams.yml) - echo "Ready to send issue to channel ID ${CHANNEL}" - fi - fi - - # set environment for next step - echo "BOARD=${BOARD}" >> $GITHUB_ENV - echo "CHANNEL=${CHANNEL}" >> $GITHUB_ENV - - - name: "Add to GitHub board" - if: ${{ env.BOARD != 'null' }} - uses: leonsteinhaeuser/project-beta-automations@v1.3.0 - with: - project_id: ${{ env.BOARD }} - organization: grafana - resource_node_id: ${{ github.event.issue.node_id }} - gh_token: ${{ secrets.GITHUB_TOKEN }} - - - name: "Prepare payload" - uses: frabert/replace-string-action@v2.0 - id: preparePayload - with: - # replace double quotes with single quotes to avoid breaking the JSON payload sent to Slack - string: ${{ github.event.issue.title }} - pattern: '"' - replace-with: "'" - flags: 'g' - - - name: "Send Slack notification" - if: ${{ env.CHANNEL != 'null' }} - uses: slackapi/slack-github-action@v1.23.0 - with: - payload: > - { - "icon_emoji": ":grafana:", - "username": "Grafana issue labeled", - "text": "Issue \"${{ steps.preparePayload.outputs.replaced }}\" labeled \"${{ github.event.label.name }}\": ${{ github.event.issue.html_url }}", - "channel": "${{ env.CHANNEL }}" - } - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/metrics-collector.yml b/.github/workflows/metrics-collector.yml deleted file mode 100644 index 874ccc4c3e7d4..0000000000000 --- a/.github/workflows/metrics-collector.yml +++ /dev/null @@ -1,35 +0,0 @@ -# -# When triggered by the cron job it will also collect metrics for: -# * number of issues without label -# * number of issues with "needs more info" -# * number of issues with "needs investigation" -# * number of issues with label type/bug -# * number of open issues in current milestone -# -# https://github.com/grafana/grafana-github-actions/blob/main/metrics-collector/index.ts -# -name: Github issue metrics collection -on: - schedule: - - cron: "*/10 * * * *" - issues: - types: [opened, closed] - -jobs: - main: - runs-on: ubuntu-latest - steps: - - name: Checkout Actions - uses: actions/checkout@v3 - with: - repository: "grafana/grafana-github-actions" - path: ./actions - ref: main - - name: Install Actions - run: npm install --production --prefix ./actions - - name: Run metrics collector - uses: ./actions/metrics-collector - with: - metricsWriteAPIKey: ${{secrets.GRAFANA_MISC_STATS_API_KEY}} - token: ${{secrets.GH_BOT_ACCESS_TOKEN}} - configPath: "metrics-collector" diff --git a/.github/workflows/milestone.yml b/.github/workflows/milestone.yml deleted file mode 100644 index d4238e61a2aed..0000000000000 --- a/.github/workflows/milestone.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Close Milestone -on: - workflow_dispatch: - inputs: - version_input: - description: 'The version to be released please respect: major.minor.patch or major.minor.patch-beta format. example: 7.4.3 or 7.4.3-beta1' - required: true -jobs: - call-remove-milestone: - uses: grafana/grafana/.github/workflows/remove-milestone.yml@main - with: - version_call: ${{ github.event.inputs.version_input }} - secrets: - token: ${{ secrets.GH_BOT_ACCESS_TOKEN }} - call-close-milestone: - uses: grafana/grafana/.github/workflows/close-milestone.yml@main - with: - version_call: ${{ github.event.inputs.version_input }} - secrets: - token: ${{ secrets.GH_BOT_ACCESS_TOKEN }} - needs: call-remove-milestone \ No newline at end of file diff --git a/.github/workflows/ox-code-coverage.yml b/.github/workflows/ox-code-coverage.yml deleted file mode 100644 index b6cbf2996b7b2..0000000000000 --- a/.github/workflows/ox-code-coverage.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Observability Experience test code coverage -on: - pull_request: - paths: - - 'pkg/services/queryhistory/**' - - 'public/app/features/explore/**' - - 'public/app/features/correlations/**' - branches-ignore: - - dependabot/** - - backport-* - -jobs: - workflow-call: - uses: grafana/code-coverage/.github/workflows/code-coverage.yml@v0.1.12 - with: - frontend-path-regexp: public\/app\/features\/(explore|correlations) - backend-path-regexp: pkg\/services\/(queryhistory) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml deleted file mode 100644 index ee978b31931e7..0000000000000 --- a/.github/workflows/pr-checks.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: PR Checks -on: - pull_request_target: - types: - - opened - - reopened - - synchronize - - ready_for_review - - labeled - - unlabeled - - edited - issues: - types: - - milestoned - - demilestoned -concurrency: - group: pr-checks-${{ github.event.number }} -jobs: - main: - runs-on: ubuntu-latest - if: github.event.pull_request.draft == false - steps: - - name: Checkout Actions - uses: actions/checkout@v3 - with: - repository: "grafana/grafana-github-actions" - path: ./actions - ref: main - - name: Install Actions - run: npm install --production --prefix ./actions - - name: Run PR Checks - uses: ./actions/pr-checks - with: - token: ${{secrets.GITHUB_TOKEN}} - configPath: pr-checks diff --git a/.github/workflows/pr-codeql-analysis-go.yml b/.github/workflows/pr-codeql-analysis-go.yml deleted file mode 100644 index 16f61aa9e9aa8..0000000000000 --- a/.github/workflows/pr-codeql-analysis-go.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: "CodeQL for PR / go" - -on: - workflow_dispatch: - pull_request: - branches: [main] - paths: - - '**/*.go' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 - - - name: Set go version - uses: actions/setup-go@v3 - with: - go-version: '1.19.2' - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: "go" - - - name: Build go files - run: | - go mod verify - make build-go - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/pr-codeql-analysis-javascript.yml b/.github/workflows/pr-codeql-analysis-javascript.yml deleted file mode 100644 index d8f187b309c97..0000000000000 --- a/.github/workflows/pr-codeql-analysis-javascript.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: "CodeQL for PR / javascript" - -on: - workflow_dispatch: - pull_request: - branches: [main] - paths: - - '**/*.js' - - '**/*.ts' - - '**/*.tsx' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: "javascript" - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/pr-codeql-analysis-python.yml b/.github/workflows/pr-codeql-analysis-python.yml deleted file mode 100644 index d6505de955ff0..0000000000000 --- a/.github/workflows/pr-codeql-analysis-python.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: "CodeQL for PR / python" - -on: - workflow_dispatch: - pull_request: - branches: [main] - paths: - - '**/*.py' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: "python" - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/pr-commands-closed.yml b/.github/workflows/pr-commands-closed.yml deleted file mode 100644 index 76719c6c009c1..0000000000000 --- a/.github/workflows/pr-commands-closed.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Run when PRs are closed -on: - pull_request: - types: - - closed -concurrency: - group: pr-commands-closed-${{ github.event.number }} -jobs: - close_job: - # this job will only run if the PR has been closed without being merged - if: github.event.pull_request.merged == false - runs-on: ubuntu-latest - steps: - - run: | - echo PR #${{ github.event.number }} has been closed without being merged, removing milestone. - gh pr edit ${{ github.event.number }} --milestone "" --repo $GITHUB_REPOSITORY - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/pr-commands.yml b/.github/workflows/pr-commands.yml deleted file mode 100644 index ecd7361c5505e..0000000000000 --- a/.github/workflows/pr-commands.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: PR automation -on: - pull_request_target: - types: - - opened - - synchronize -concurrency: - group: pr-commands-${{ github.event.number }} -jobs: - main: - runs-on: ubuntu-latest - steps: - - name: Checkout Actions - uses: actions/checkout@v3 - with: - repository: "grafana/grafana-github-actions" - path: ./actions - ref: main - - name: Install Actions - run: npm install --production --prefix ./actions - - name: Run Commands - uses: ./actions/commands - with: - metricsWriteAPIKey: ${{secrets.GRAFANA_MISC_STATS_API_KEY}} - token: ${{secrets.GH_BOT_ACCESS_TOKEN}} - configPath: pr-commands diff --git a/.github/workflows/publish-technical-documentation-next.yml b/.github/workflows/publish-technical-documentation-next.yml deleted file mode 100644 index 9e060ee0b8bec..0000000000000 --- a/.github/workflows/publish-technical-documentation-next.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: "publish-technical-documentation-next" - -on: - push: - branches: - - "main" - paths: - - "docs/sources/**" - - "packages/grafana-*/**" - workflow_dispatch: -jobs: - sync: - runs-on: "ubuntu-latest" - steps: - - name: "Checkout Grafana repo" - uses: "actions/checkout@v3" - - - name: "Clone website-sync Action" - run: "git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.GH_BOT_ACCESS_TOKEN }}@github.com/grafana/website-sync ./.github/actions/website-sync" - - - name: "Publish to website repository (next)" - uses: "./.github/actions/website-sync" - id: "publish-next" - with: - repository: "grafana/website" - branch: "master" - host: "github.com" - github_pat: "${{ secrets.GH_BOT_ACCESS_TOKEN }}" - source_folder: "docs/sources" - target_folder: "content/docs/grafana/next" diff --git a/.github/workflows/publish-technical-documentation-release.yml b/.github/workflows/publish-technical-documentation-release.yml deleted file mode 100644 index e8864acfcb444..0000000000000 --- a/.github/workflows/publish-technical-documentation-release.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: "publish-technical-documentation-release" - -on: - push: - branches: - - v[0-9]+.[0-9]+.[0-9]+ - tags: - - v[0-9]+.[0-9]+.[0-9]+ - paths: - - "docs/sources/**" - - "packages/grafana-*/**" - workflow_dispatch: -jobs: - sync: - runs-on: "ubuntu-latest" - steps: - - name: "Checkout Grafana repo" - uses: "actions/checkout@v3" - with: - fetch-depth: 0 - - - name: "Checkout Actions library" - uses: "actions/checkout@v3" - with: - repository: "grafana/grafana-github-actions" - path: "./actions" - - - name: "Install Actions from library" - run: "npm install --production --prefix ./actions" - - - name: "Determine if there is a matching release tag" - id: "has-matching-release-tag" - uses: "./actions/has-matching-release-tag" - with: - ref_name: "${{ github.ref_name }}" - release_tag_regexp: "^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$" - release_branch_regexp: "^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.x$" - - - name: "Determine technical documentation version" - if: "steps.has-matching-release-tag.outputs.bool == 'true'" - uses: "./actions/docs-target" - id: "target" - with: - ref_name: "${{ github.ref_name }}" - - - name: "Clone website-sync Action" - if: "steps.has-matching-release-tag.outputs.bool == 'true'" - run: "git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.GH_BOT_ACCESS_TOKEN }}@github.com/grafana/website-sync ./.github/actions/website-sync" - - - name: "Publish to website repository (release)" - if: "steps.has-matching-release-tag.outputs.bool == 'true'" - uses: "./.github/actions/website-sync" - id: "publish-release" - with: - repository: "grafana/website" - branch: "master" - host: "github.com" - github_pat: "${{ secrets.GH_BOT_ACCESS_TOKEN }}" - source_folder: "docs/sources" - target_folder: "content/docs/grafana/${{ steps.target.outputs.target }}" diff --git a/.github/workflows/remove-milestone.yml b/.github/workflows/remove-milestone.yml deleted file mode 100644 index 78305864e09f5..0000000000000 --- a/.github/workflows/remove-milestone.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Remove milestone -on: - workflow_dispatch: - inputs: - version: - required: true - description: Needs to match, exactly, the name of a milestone - workflow_call: - inputs: - version_call: - description: Needs to match, exactly, the name of a milestone - required: true - type: string - secrets: - token: - required: true -jobs: - main: - runs-on: ubuntu-latest - steps: - - name: Checkout Actions - uses: actions/checkout@v3 - with: - repository: "grafana/grafana-github-actions" - path: ./actions - ref: main - - name: Install Actions - run: npm install --production --prefix ./actions - - name: Remove milestone from open issues (manually invoked) - if: ${{ github.event.inputs.version != '' }} - uses: ./actions/remove-milestone - with: - token: ${{ secrets.GH_BOT_ACCESS_TOKEN }} - - name: Remove milestone from open issues (workflow invoked) - if: ${{ inputs.version_call != '' }} - uses: ./actions/remove-milestone - with: - version_call: ${{ inputs.version_call }} - token: ${{ secrets.token }} diff --git a/.github/workflows/sbom-report.yml b/.github/workflows/sbom-report.yml deleted file mode 100644 index bae173f6ef6f9..0000000000000 --- a/.github/workflows/sbom-report.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: syft-sbom-ci - -on: - release: - types: [created] - -jobs: - syft-sbom: - - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Anchore SBOM Action - uses: anchore/sbom-action@v0.12.0 - with: - artifact-name: ${{ github.event.repository.name }}-spdx.json - diff --git a/.github/workflows/scripts/json-file-to-job-output.js b/.github/workflows/scripts/json-file-to-job-output.js deleted file mode 100644 index 0f6dd1e65ff5e..0000000000000 --- a/.github/workflows/scripts/json-file-to-job-output.js +++ /dev/null @@ -1,27 +0,0 @@ -module.exports = async ({ core, filePath }) => { - try { - const fs = require('fs'); - const content = await readFile(fs, filePath); - const result = JSON.parse(content); - - core.startGroup('Parsing json file...'); - - for (const property in result) { - core.info(`${property} <- ${result[property]}`); - core.setOutput(property, result[property]); - } - - core.endGroup(); - } catch (error) { - core.restFailed(error.message); - } -} - -async function readFile(fs, path) { - return new Promise((resolve, reject) => { - fs.readFile(path, (error, data) => { - if (error) return reject(error); - return resolve(data); - }); - }); -} \ No newline at end of file diff --git a/.github/workflows/scripts/pr-get-job-link.js b/.github/workflows/scripts/pr-get-job-link.js deleted file mode 100644 index a4e6bc2f64573..0000000000000 --- a/.github/workflows/scripts/pr-get-job-link.js +++ /dev/null @@ -1,9 +0,0 @@ - -module.exports = async ({ github, context, core }) => { - const { owner, repo } = context.repo; - const url = `https://api.github.com/repos/${owner}/${repo}/actions/runs/${context.runId}/jobs` - const result = await github.request(url) - const link = `https://github.com/grafana/grafana/runs/${result.data.jobs[0].id}?check_suite_focus=true`; - - core.setOutput('link', link); -} \ No newline at end of file diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index c5509f67a2e04..0000000000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: 'Close stale issues and PRs' -on: - schedule: - - cron: '30 1 * * *' - -jobs: - stale: - runs-on: ubuntu-latest - steps: - - uses: actions/stale@v6 - with: - repo-token: ${{ secrets.GH_BOT_ACCESS_TOKEN }} - # Number of days of inactivity before a stale Issue or Pull Request is closed. - # Set to -1 to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. - days-before-close: 14 - # Number of days of inactivity before an Issue or Pull Request becomes stale - days-before-stale: 30 - # We don't want any Issues to be marked as stale for now. - days-before-issue-stale: -1 - exempt-issue-labels: no stalebot - exempt-pr-labels: no stalebot - operations-per-run: 500 - stale-issue-label: stale - stale-pr-label: stale - stale-pr-message: > - This pull request has been automatically marked as stale because it has not had - activity in the last 30 days. It will be closed in 2 weeks if no further activity occurs. Please - feel free to give a status update now, ping for review, or re-open when it's ready. - Thank you for your contributions! - close-pr-message: > - This pull request has been automatically closed because it has not had - activity in the last 2 weeks. Please feel free to give a status update now, ping for review, or re-open when it's ready. - Thank you for your contributions! diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml deleted file mode 100644 index 003d1266cc135..0000000000000 --- a/.github/workflows/update-changelog.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Update changelog -on: - workflow_dispatch: - inputs: - version: - required: true - description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch or major.minor.patch-beta format. example: 7.4.3 or 7.4.3-beta1' -jobs: - main: - runs-on: ubuntu-latest - steps: - - name: Checkout Actions - uses: actions/checkout@v3 - with: - repository: "grafana/grafana-github-actions" - path: ./actions - ref: main - - name: Install Actions - run: npm install --production --prefix ./actions - - name: Run update changelog (manually invoked) - uses: ./actions/update-changelog - with: - token: ${{ secrets.GH_BOT_ACCESS_TOKEN }} - metricsWriteAPIKey: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}