From dd07d3dbbe447bdcebc576ca7d0afe520c7e10f4 Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Fri, 14 Mar 2025 14:34:36 +0000 Subject: [PATCH 001/115] API client generation: centralise api clients (#102186) * centralise iam api * centralise folder api client * rename to baseAPI * centralise provisioning api * remove iam feature folder from CODEOWNERS * fix type name * Update public/app/features/provisioning/utils/selectors.ts Co-authored-by: Alex Khomenko --------- Co-authored-by: Alex Khomenko --- .github/CODEOWNERS | 1 - .../api => api/clients/folder}/baseAPI.ts | 2 +- .../clients/folder}/endpoints.gen.ts | 9 +- .../api => api/clients/folder}/index.ts | 0 .../api/api.ts => api/clients/iam/baseAPI.ts} | 6 +- .../api => api/clients/iam}/endpoints.gen.ts | 4 +- public/app/api/clients/iam/index.ts | 5 + .../clients/provisioning}/baseAPI.ts | 2 +- .../clients/provisioning}/endpoints.gen.ts | 179 +++++++++--------- .../api => api/clients/provisioning}/index.ts | 0 .../utils/createOnCacheEntryAdded.ts | 4 +- .../provisioning}/utils/getListParams.ts | 8 +- public/app/core/reducers/root.ts | 8 +- public/app/features/iam/index.ts | 3 - .../hooks/useCreateOrUpdateRepository.ts | 6 +- .../hooks/useCreateOrUpdateRepositoryFile.ts | 6 +- .../hooks/useGetResourceRepository.ts | 2 +- .../hooks/useIsProvisionedInstance.ts | 2 +- .../provisioning/hooks/useIsProvisionedNG.ts | 2 +- .../provisioning/hooks/useRepositoryJobs.ts | 2 +- .../provisioning/hooks/useRepositoryList.ts | 4 +- public/app/features/provisioning/types.ts | 2 +- .../provisioning/utils/checkSyncSettings.ts | 2 +- .../app/features/provisioning/utils/data.ts | 2 +- .../provisioning/{api => utils}/selectors.ts | 4 +- .../provisioning/{api => utils}/types.ts | 0 public/app/store/configureStore.ts | 8 +- scripts/generate-rtk-apis.ts | 22 +-- 28 files changed, 148 insertions(+), 147 deletions(-) rename public/app/{features/folders/api => api/clients/folder}/baseAPI.ts (91%) rename public/app/{features/folders/api => api/clients/folder}/endpoints.gen.ts (97%) rename public/app/{features/folders/api => api/clients/folder}/index.ts (100%) rename public/app/{features/iam/api/api.ts => api/clients/iam/baseAPI.ts} (61%) rename public/app/{features/iam/api => api/clients/iam}/endpoints.gen.ts (98%) create mode 100644 public/app/api/clients/iam/index.ts rename public/app/{features/provisioning/api => api/clients/provisioning}/baseAPI.ts (91%) rename public/app/{features/provisioning/api => api/clients/provisioning}/endpoints.gen.ts (92%) rename public/app/{features/provisioning/api => api/clients/provisioning}/index.ts (100%) rename public/app/{features/provisioning/api => api/clients/provisioning}/utils/createOnCacheEntryAdded.ts (94%) rename public/app/{features/provisioning/api => api/clients/provisioning}/utils/getListParams.ts (65%) delete mode 100644 public/app/features/iam/index.ts rename public/app/features/provisioning/{api => utils}/selectors.ts (90%) rename public/app/features/provisioning/{api => utils}/types.ts (100%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index c8fd9fe2158..a485a1f6061 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -505,7 +505,6 @@ playwright.config.ts @grafana/plugins-platform-frontend /public/app/features/explore/ @grafana/observability-traces-and-profiling /public/app/features/expressions/ @grafana/grafana-datasources-core-services /public/app/features/folders/ @grafana/grafana-frontend-platform -/public/app/features/iam/ @grafana/grafana-frontend-platform /public/app/features/inspector/ @grafana/dashboards-squad /public/app/features/invites/ @grafana/grafana-frontend-platform /public/app/features/library-panels/ @grafana/dashboards-squad diff --git a/public/app/features/folders/api/baseAPI.ts b/public/app/api/clients/folder/baseAPI.ts similarity index 91% rename from public/app/features/folders/api/baseAPI.ts rename to public/app/api/clients/folder/baseAPI.ts index c5957bea332..afa1e588376 100644 --- a/public/app/features/folders/api/baseAPI.ts +++ b/public/app/api/clients/folder/baseAPI.ts @@ -5,7 +5,7 @@ import { getAPIBaseURL } from 'app/api/utils'; export const BASE_URL = getAPIBaseURL('folder.grafana.app', 'v0alpha1'); -export const baseAPI = createApi({ +export const api = createApi({ reducerPath: 'folderAPI', baseQuery: createBaseQuery({ baseURL: BASE_URL, diff --git a/public/app/features/folders/api/endpoints.gen.ts b/public/app/api/clients/folder/endpoints.gen.ts similarity index 97% rename from public/app/features/folders/api/endpoints.gen.ts rename to public/app/api/clients/folder/endpoints.gen.ts index 5ede70048ec..98b36472013 100644 --- a/public/app/features/folders/api/endpoints.gen.ts +++ b/public/app/api/clients/folder/endpoints.gen.ts @@ -1,4 +1,4 @@ -import { baseAPI as api } from './baseAPI'; +import { api } from './baseAPI'; export const addTagTypes = ['Folder'] as const; const injectedRtkApi = api .enhanceEndpoints({ @@ -6,7 +6,7 @@ const injectedRtkApi = api }) .injectEndpoints({ endpoints: (build) => ({ - getFolder: build.query({ + getFolder: build.query({ query: (queryArg) => ({ url: `/folders/${queryArg.name}`, params: { @@ -19,8 +19,8 @@ const injectedRtkApi = api overrideExisting: false, }); export { injectedRtkApi as generatedAPI }; -export type GetFolderResponse = /** status 200 OK */ Folder; -export type GetFolderArg = { +export type GetFolderApiResponse = /** status 200 OK */ Folder; +export type GetFolderApiArg = { /** name of the Folder */ name: string; /** If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ @@ -122,4 +122,3 @@ export type Folder = { metadata?: ObjectMeta; spec?: Spec; }; -export const { useGetFolderQuery } = injectedRtkApi; diff --git a/public/app/features/folders/api/index.ts b/public/app/api/clients/folder/index.ts similarity index 100% rename from public/app/features/folders/api/index.ts rename to public/app/api/clients/folder/index.ts diff --git a/public/app/features/iam/api/api.ts b/public/app/api/clients/iam/baseAPI.ts similarity index 61% rename from public/app/features/iam/api/api.ts rename to public/app/api/clients/iam/baseAPI.ts index 07a735c561a..bb2d1e31850 100644 --- a/public/app/features/iam/api/api.ts +++ b/public/app/api/clients/iam/baseAPI.ts @@ -1,11 +1,11 @@ import { createApi } from '@reduxjs/toolkit/query/react'; -import { createBaseQuery } from '../../../api/createBaseQuery'; -import { getAPIBaseURL } from '../../../api/utils'; +import { createBaseQuery } from '../../createBaseQuery'; +import { getAPIBaseURL } from '../../utils'; export const BASE_URL = getAPIBaseURL('iam.grafana.app', 'v0alpha1'); -export const iamApi = createApi({ +export const api = createApi({ baseQuery: createBaseQuery({ baseURL: BASE_URL }), reducerPath: 'iamAPI', endpoints: () => ({}), diff --git a/public/app/features/iam/api/endpoints.gen.ts b/public/app/api/clients/iam/endpoints.gen.ts similarity index 98% rename from public/app/features/iam/api/endpoints.gen.ts rename to public/app/api/clients/iam/endpoints.gen.ts index 9f424e5ec09..d59b1d4cd52 100644 --- a/public/app/features/iam/api/endpoints.gen.ts +++ b/public/app/api/clients/iam/endpoints.gen.ts @@ -1,4 +1,4 @@ -import { iamApi as api } from './api'; +import { api } from './baseAPI'; export const addTagTypes = ['Display'] as const; const injectedRtkApi = api .enhanceEndpoints({ @@ -18,7 +18,7 @@ const injectedRtkApi = api }), overrideExisting: false, }); -export { injectedRtkApi as generatedIamApi }; +export { injectedRtkApi as generatedAPI }; export type GetDisplayMappingApiResponse = /** status 200 undefined */ DisplayList; export type GetDisplayMappingApiArg = { /** Display keys */ diff --git a/public/app/api/clients/iam/index.ts b/public/app/api/clients/iam/index.ts new file mode 100644 index 00000000000..af251160d2a --- /dev/null +++ b/public/app/api/clients/iam/index.ts @@ -0,0 +1,5 @@ +import { generatedAPI } from './endpoints.gen'; + +export const iamAPI = generatedAPI.enhanceEndpoints({}); + +export const { useGetDisplayMappingQuery } = generatedAPI; diff --git a/public/app/features/provisioning/api/baseAPI.ts b/public/app/api/clients/provisioning/baseAPI.ts similarity index 91% rename from public/app/features/provisioning/api/baseAPI.ts rename to public/app/api/clients/provisioning/baseAPI.ts index 9a30da30d82..9d3693bf8e3 100644 --- a/public/app/features/provisioning/api/baseAPI.ts +++ b/public/app/api/clients/provisioning/baseAPI.ts @@ -5,7 +5,7 @@ import { createBaseQuery } from 'app/api/createBaseQuery'; export const BASE_URL = `apis/provisioning.grafana.app/v0alpha1/namespaces/${config.namespace}`; -export const baseAPI = createApi({ +export const api = createApi({ reducerPath: 'provisioningAPI', baseQuery: createBaseQuery({ baseURL: BASE_URL, diff --git a/public/app/features/provisioning/api/endpoints.gen.ts b/public/app/api/clients/provisioning/endpoints.gen.ts similarity index 92% rename from public/app/features/provisioning/api/endpoints.gen.ts rename to public/app/api/clients/provisioning/endpoints.gen.ts index fd8429fee34..c614724dbe2 100644 --- a/public/app/features/provisioning/api/endpoints.gen.ts +++ b/public/app/api/clients/provisioning/endpoints.gen.ts @@ -1,4 +1,4 @@ -import { baseAPI as api } from './baseAPI'; +import { api } from './baseAPI'; export const addTagTypes = ['Job', 'Repository', 'Provisioning'] as const; const injectedRtkApi = api .enhanceEndpoints({ @@ -6,7 +6,7 @@ const injectedRtkApi = api }) .injectEndpoints({ endpoints: (build) => ({ - listJob: build.query({ + listJob: build.query({ query: (queryArg) => ({ url: `/jobs`, params: { @@ -25,7 +25,7 @@ const injectedRtkApi = api }), providesTags: ['Job'], }), - getJob: build.query({ + getJob: build.query({ query: (queryArg) => ({ url: `/jobs/${queryArg.name}`, params: { @@ -34,7 +34,7 @@ const injectedRtkApi = api }), providesTags: ['Job'], }), - listRepository: build.query({ + listRepository: build.query({ query: (queryArg) => ({ url: `/repositories`, params: { @@ -53,7 +53,7 @@ const injectedRtkApi = api }), providesTags: ['Repository'], }), - createRepository: build.mutation({ + createRepository: build.mutation({ query: (queryArg) => ({ url: `/repositories`, method: 'POST', @@ -67,7 +67,10 @@ const injectedRtkApi = api }), invalidatesTags: ['Repository'], }), - deletecollectionRepository: build.mutation({ + deletecollectionRepository: build.mutation< + DeletecollectionRepositoryApiResponse, + DeletecollectionRepositoryApiArg + >({ query: (queryArg) => ({ url: `/repositories`, method: 'DELETE', @@ -90,7 +93,7 @@ const injectedRtkApi = api }), invalidatesTags: ['Repository'], }), - getRepository: build.query({ + getRepository: build.query({ query: (queryArg) => ({ url: `/repositories/${queryArg.name}`, params: { @@ -99,7 +102,7 @@ const injectedRtkApi = api }), providesTags: ['Repository'], }), - replaceRepository: build.mutation({ + replaceRepository: build.mutation({ query: (queryArg) => ({ url: `/repositories/${queryArg.name}`, method: 'PUT', @@ -113,7 +116,7 @@ const injectedRtkApi = api }), invalidatesTags: ['Repository'], }), - deleteRepository: build.mutation({ + deleteRepository: build.mutation({ query: (queryArg) => ({ url: `/repositories/${queryArg.name}`, method: 'DELETE', @@ -128,11 +131,11 @@ const injectedRtkApi = api }), invalidatesTags: ['Repository'], }), - createRepositoryExport: build.mutation({ + createRepositoryExport: build.mutation({ query: (queryArg) => ({ url: `/repositories/${queryArg.name}/export`, method: 'POST', body: queryArg.body }), invalidatesTags: ['Repository'], }), - getRepositoryFiles: build.query({ + getRepositoryFiles: build.query({ query: (queryArg) => ({ url: `/repositories/${queryArg.name}/files/`, params: { @@ -141,7 +144,7 @@ const injectedRtkApi = api }), providesTags: ['Repository'], }), - getRepositoryFilesWithPath: build.query({ + getRepositoryFilesWithPath: build.query({ query: (queryArg) => ({ url: `/repositories/${queryArg.name}/files/${queryArg.path}`, params: { @@ -151,8 +154,8 @@ const injectedRtkApi = api providesTags: ['Repository'], }), replaceRepositoryFilesWithPath: build.mutation< - ReplaceRepositoryFilesWithPathResponse, - ReplaceRepositoryFilesWithPathArg + ReplaceRepositoryFilesWithPathApiResponse, + ReplaceRepositoryFilesWithPathApiArg >({ query: (queryArg) => ({ url: `/repositories/${queryArg.name}/files/${queryArg.path}`, @@ -166,8 +169,8 @@ const injectedRtkApi = api invalidatesTags: ['Repository'], }), createRepositoryFilesWithPath: build.mutation< - CreateRepositoryFilesWithPathResponse, - CreateRepositoryFilesWithPathArg + CreateRepositoryFilesWithPathApiResponse, + CreateRepositoryFilesWithPathApiArg >({ query: (queryArg) => ({ url: `/repositories/${queryArg.name}/files/${queryArg.path}`, @@ -181,8 +184,8 @@ const injectedRtkApi = api invalidatesTags: ['Repository'], }), deleteRepositoryFilesWithPath: build.mutation< - DeleteRepositoryFilesWithPathResponse, - DeleteRepositoryFilesWithPathArg + DeleteRepositoryFilesWithPathApiResponse, + DeleteRepositoryFilesWithPathApiArg >({ query: (queryArg) => ({ url: `/repositories/${queryArg.name}/files/${queryArg.path}`, @@ -194,7 +197,7 @@ const injectedRtkApi = api }), invalidatesTags: ['Repository'], }), - getRepositoryHistory: build.query({ + getRepositoryHistory: build.query({ query: (queryArg) => ({ url: `/repositories/${queryArg.name}/history`, params: { @@ -203,7 +206,10 @@ const injectedRtkApi = api }), providesTags: ['Repository'], }), - getRepositoryHistoryWithPath: build.query({ + getRepositoryHistoryWithPath: build.query< + GetRepositoryHistoryWithPathApiResponse, + GetRepositoryHistoryWithPathApiArg + >({ query: (queryArg) => ({ url: `/repositories/${queryArg.name}/history/${queryArg.path}`, params: { @@ -212,19 +218,22 @@ const injectedRtkApi = api }), providesTags: ['Repository'], }), - createRepositoryMigrate: build.mutation({ + createRepositoryMigrate: build.mutation({ query: (queryArg) => ({ url: `/repositories/${queryArg.name}/migrate`, method: 'POST', body: queryArg.body }), invalidatesTags: ['Repository'], }), - getRepositoryRenderWithPath: build.query({ + getRepositoryRenderWithPath: build.query< + GetRepositoryRenderWithPathApiResponse, + GetRepositoryRenderWithPathApiArg + >({ query: (queryArg) => ({ url: `/repositories/${queryArg.name}/render/${queryArg.path}` }), providesTags: ['Repository'], }), - getRepositoryResources: build.query({ + getRepositoryResources: build.query({ query: (queryArg) => ({ url: `/repositories/${queryArg.name}/resources` }), providesTags: ['Repository'], }), - getRepositoryStatus: build.query({ + getRepositoryStatus: build.query({ query: (queryArg) => ({ url: `/repositories/${queryArg.name}/status`, params: { @@ -233,7 +242,7 @@ const injectedRtkApi = api }), providesTags: ['Repository'], }), - replaceRepositoryStatus: build.mutation({ + replaceRepositoryStatus: build.mutation({ query: (queryArg) => ({ url: `/repositories/${queryArg.name}/status`, method: 'PUT', @@ -247,27 +256,27 @@ const injectedRtkApi = api }), invalidatesTags: ['Repository'], }), - createRepositorySync: build.mutation({ + createRepositorySync: build.mutation({ query: (queryArg) => ({ url: `/repositories/${queryArg.name}/sync`, method: 'POST', body: queryArg.body }), invalidatesTags: ['Repository'], }), - createRepositoryTest: build.mutation({ + createRepositoryTest: build.mutation({ query: (queryArg) => ({ url: `/repositories/${queryArg.name}/test`, method: 'POST', body: queryArg.body }), invalidatesTags: ['Repository'], }), - getRepositoryWebhook: build.query({ + getRepositoryWebhook: build.query({ query: (queryArg) => ({ url: `/repositories/${queryArg.name}/webhook` }), providesTags: ['Repository'], }), - createRepositoryWebhook: build.mutation({ + createRepositoryWebhook: build.mutation({ query: (queryArg) => ({ url: `/repositories/${queryArg.name}/webhook`, method: 'POST' }), invalidatesTags: ['Repository'], }), - getFrontendSettings: build.query({ + getFrontendSettings: build.query({ query: () => ({ url: `/settings` }), providesTags: ['Provisioning', 'Repository'], }), - getResourceStats: build.query({ + getResourceStats: build.query({ query: () => ({ url: `/stats` }), providesTags: ['Provisioning', 'Repository'], }), @@ -275,8 +284,8 @@ const injectedRtkApi = api overrideExisting: false, }); export { injectedRtkApi as generatedAPI }; -export type ListJobResponse = /** status 200 OK */ JobList; -export type ListJobArg = { +export type ListJobApiResponse = /** status 200 OK */ JobList; +export type ListJobApiArg = { /** allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. */ allowWatchBookmarks?: boolean; /** The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". @@ -320,15 +329,15 @@ export type ListJobArg = { /** Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ watch?: boolean; }; -export type GetJobResponse = /** status 200 OK */ Job; -export type GetJobArg = { +export type GetJobApiResponse = /** status 200 OK */ Job; +export type GetJobApiArg = { /** name of the Job */ name: string; /** If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ pretty?: string; }; -export type ListRepositoryResponse = /** status 200 OK */ RepositoryList; -export type ListRepositoryArg = { +export type ListRepositoryApiResponse = /** status 200 OK */ RepositoryList; +export type ListRepositoryApiArg = { /** If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ pretty?: string; /** allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. */ @@ -372,11 +381,11 @@ export type ListRepositoryArg = { /** Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. */ watch?: boolean; }; -export type CreateRepositoryResponse = /** status 200 OK */ +export type CreateRepositoryApiResponse = /** status 200 OK */ | Repository | /** status 201 Created */ Repository | /** status 202 Accepted */ Repository; -export type CreateRepositoryArg = { +export type CreateRepositoryApiArg = { /** If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ pretty?: string; /** When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed */ @@ -387,8 +396,8 @@ export type CreateRepositoryArg = { fieldValidation?: string; repository: Repository; }; -export type DeletecollectionRepositoryResponse = /** status 200 OK */ Status; -export type DeletecollectionRepositoryArg = { +export type DeletecollectionRepositoryApiResponse = /** status 200 OK */ Status; +export type DeletecollectionRepositoryApiArg = { /** If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ pretty?: string; /** The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". @@ -438,15 +447,15 @@ export type DeletecollectionRepositoryArg = { /** Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. */ timeoutSeconds?: number; }; -export type GetRepositoryResponse = /** status 200 OK */ Repository; -export type GetRepositoryArg = { +export type GetRepositoryApiResponse = /** status 200 OK */ Repository; +export type GetRepositoryApiArg = { /** name of the Repository */ name: string; /** If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ pretty?: string; }; -export type ReplaceRepositoryResponse = /** status 200 OK */ Repository | /** status 201 Created */ Repository; -export type ReplaceRepositoryArg = { +export type ReplaceRepositoryApiResponse = /** status 200 OK */ Repository | /** status 201 Created */ Repository; +export type ReplaceRepositoryApiArg = { /** name of the Repository */ name: string; /** If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ @@ -459,8 +468,8 @@ export type ReplaceRepositoryArg = { fieldValidation?: string; repository: Repository; }; -export type DeleteRepositoryResponse = /** status 200 OK */ Status | /** status 202 Accepted */ Status; -export type DeleteRepositoryArg = { +export type DeleteRepositoryApiResponse = /** status 200 OK */ Status | /** status 202 Accepted */ Status; +export type DeleteRepositoryApiArg = { /** name of the Repository */ name: string; /** If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ @@ -476,8 +485,8 @@ export type DeleteRepositoryArg = { /** Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. */ propagationPolicy?: string; }; -export type CreateRepositoryExportResponse = /** status 200 OK */ Job; -export type CreateRepositoryExportArg = { +export type CreateRepositoryExportApiResponse = /** status 200 OK */ Job; +export type CreateRepositoryExportApiArg = { /** name of the Job */ name: string; body: { @@ -491,7 +500,7 @@ export type CreateRepositoryExportArg = { prefix?: string; }; }; -export type GetRepositoryFilesResponse = /** status 200 OK */ { +export type GetRepositoryFilesApiResponse = /** status 200 OK */ { /** APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ apiVersion?: string; items?: any[]; @@ -499,14 +508,14 @@ export type GetRepositoryFilesResponse = /** status 200 OK */ { kind?: string; metadata?: any; }; -export type GetRepositoryFilesArg = { +export type GetRepositoryFilesApiArg = { /** name of the ResourceWrapper */ name: string; /** branch or commit hash */ ref?: string; }; -export type GetRepositoryFilesWithPathResponse = /** status 200 OK */ ResourceWrapper; -export type GetRepositoryFilesWithPathArg = { +export type GetRepositoryFilesWithPathApiResponse = /** status 200 OK */ ResourceWrapper; +export type GetRepositoryFilesWithPathApiArg = { /** name of the ResourceWrapper */ name: string; /** path to the resource */ @@ -514,8 +523,8 @@ export type GetRepositoryFilesWithPathArg = { /** branch or commit hash */ ref?: string; }; -export type ReplaceRepositoryFilesWithPathResponse = /** status 200 OK */ ResourceWrapper; -export type ReplaceRepositoryFilesWithPathArg = { +export type ReplaceRepositoryFilesWithPathApiResponse = /** status 200 OK */ ResourceWrapper; +export type ReplaceRepositoryFilesWithPathApiArg = { /** name of the ResourceWrapper */ name: string; /** path to the resource */ @@ -528,8 +537,8 @@ export type ReplaceRepositoryFilesWithPathArg = { [key: string]: any; }; }; -export type CreateRepositoryFilesWithPathResponse = /** status 200 OK */ ResourceWrapper; -export type CreateRepositoryFilesWithPathArg = { +export type CreateRepositoryFilesWithPathApiResponse = /** status 200 OK */ ResourceWrapper; +export type CreateRepositoryFilesWithPathApiArg = { /** name of the ResourceWrapper */ name: string; /** path to the resource */ @@ -542,8 +551,8 @@ export type CreateRepositoryFilesWithPathArg = { [key: string]: any; }; }; -export type DeleteRepositoryFilesWithPathResponse = /** status 200 OK */ ResourceWrapper; -export type DeleteRepositoryFilesWithPathArg = { +export type DeleteRepositoryFilesWithPathApiResponse = /** status 200 OK */ ResourceWrapper; +export type DeleteRepositoryFilesWithPathApiArg = { /** name of the ResourceWrapper */ name: string; /** path to the resource */ @@ -553,15 +562,15 @@ export type DeleteRepositoryFilesWithPathArg = { /** optional message sent with any changes */ message?: string; }; -export type GetRepositoryHistoryResponse = /** status 200 OK */ string; -export type GetRepositoryHistoryArg = { +export type GetRepositoryHistoryApiResponse = /** status 200 OK */ string; +export type GetRepositoryHistoryApiArg = { /** name of the HistoryList */ name: string; /** branch or commit hash */ ref?: string; }; -export type GetRepositoryHistoryWithPathResponse = /** status 200 OK */ string; -export type GetRepositoryHistoryWithPathArg = { +export type GetRepositoryHistoryWithPathApiResponse = /** status 200 OK */ string; +export type GetRepositoryHistoryWithPathApiArg = { /** name of the HistoryList */ name: string; /** path to the resource */ @@ -569,8 +578,8 @@ export type GetRepositoryHistoryWithPathArg = { /** branch or commit hash */ ref?: string; }; -export type CreateRepositoryMigrateResponse = /** status 200 OK */ Job; -export type CreateRepositoryMigrateArg = { +export type CreateRepositoryMigrateApiResponse = /** status 200 OK */ Job; +export type CreateRepositoryMigrateApiArg = { /** name of the Job */ name: string; body: { @@ -582,27 +591,27 @@ export type CreateRepositoryMigrateArg = { prefix?: string; }; }; -export type GetRepositoryRenderWithPathResponse = unknown; -export type GetRepositoryRenderWithPathArg = { +export type GetRepositoryRenderWithPathApiResponse = unknown; +export type GetRepositoryRenderWithPathApiArg = { /** name of the Repository */ name: string; /** path to the resource */ path: string; }; -export type GetRepositoryResourcesResponse = /** status 200 OK */ ResourceList; -export type GetRepositoryResourcesArg = { +export type GetRepositoryResourcesApiResponse = /** status 200 OK */ ResourceList; +export type GetRepositoryResourcesApiArg = { /** name of the ResourceList */ name: string; }; -export type GetRepositoryStatusResponse = /** status 200 OK */ Repository; -export type GetRepositoryStatusArg = { +export type GetRepositoryStatusApiResponse = /** status 200 OK */ Repository; +export type GetRepositoryStatusApiArg = { /** name of the Repository */ name: string; /** If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ pretty?: string; }; -export type ReplaceRepositoryStatusResponse = /** status 200 OK */ Repository | /** status 201 Created */ Repository; -export type ReplaceRepositoryStatusArg = { +export type ReplaceRepositoryStatusApiResponse = /** status 200 OK */ Repository | /** status 201 Created */ Repository; +export type ReplaceRepositoryStatusApiArg = { /** name of the Repository */ name: string; /** If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). */ @@ -615,8 +624,8 @@ export type ReplaceRepositoryStatusArg = { fieldValidation?: string; repository: Repository; }; -export type CreateRepositorySyncResponse = /** status 200 OK */ Job; -export type CreateRepositorySyncArg = { +export type CreateRepositorySyncApiResponse = /** status 200 OK */ Job; +export type CreateRepositorySyncApiArg = { /** name of the Job */ name: string; body: { @@ -624,8 +633,8 @@ export type CreateRepositorySyncArg = { incremental: boolean; }; }; -export type CreateRepositoryTestResponse = /** status 200 OK */ TestResults; -export type CreateRepositoryTestArg = { +export type CreateRepositoryTestApiResponse = /** status 200 OK */ TestResults; +export type CreateRepositoryTestApiArg = { /** name of the TestResults */ name: string; body: { @@ -638,20 +647,20 @@ export type CreateRepositoryTestArg = { status?: any; }; }; -export type GetRepositoryWebhookResponse = /** status 200 OK */ WebhookResponse; -export type GetRepositoryWebhookArg = { +export type GetRepositoryWebhookApiResponse = /** status 200 OK */ WebhookResponse; +export type GetRepositoryWebhookApiArg = { /** name of the WebhookResponse */ name: string; }; -export type CreateRepositoryWebhookResponse = /** status 200 OK */ WebhookResponse; -export type CreateRepositoryWebhookArg = { +export type CreateRepositoryWebhookApiResponse = /** status 200 OK */ WebhookResponse; +export type CreateRepositoryWebhookApiArg = { /** name of the WebhookResponse */ name: string; }; -export type GetFrontendSettingsResponse = /** status 200 undefined */ RepositoryViewList; -export type GetFrontendSettingsArg = void; -export type GetResourceStatsResponse = /** status 200 undefined */ ResourceStats; -export type GetResourceStatsArg = void; +export type GetFrontendSettingsApiResponse = /** status 200 undefined */ RepositoryViewList; +export type GetFrontendSettingsApiArg = void; +export type GetResourceStatsApiResponse = /** status 200 undefined */ ResourceStats; +export type GetResourceStatsApiArg = void; export type Time = string; export type FieldsV1 = object; export type ManagedFieldsEntry = { diff --git a/public/app/features/provisioning/api/index.ts b/public/app/api/clients/provisioning/index.ts similarity index 100% rename from public/app/features/provisioning/api/index.ts rename to public/app/api/clients/provisioning/index.ts diff --git a/public/app/features/provisioning/api/utils/createOnCacheEntryAdded.ts b/public/app/api/clients/provisioning/utils/createOnCacheEntryAdded.ts similarity index 94% rename from public/app/features/provisioning/api/utils/createOnCacheEntryAdded.ts rename to public/app/api/clients/provisioning/utils/createOnCacheEntryAdded.ts index 14226987468..724eb79193d 100644 --- a/public/app/features/provisioning/api/utils/createOnCacheEntryAdded.ts +++ b/public/app/api/clients/provisioning/utils/createOnCacheEntryAdded.ts @@ -1,7 +1,7 @@ import { Subscription } from 'rxjs'; -import { ScopedResourceClient } from '../../../apiserver/client'; -import { ListOptions } from '../../../apiserver/types'; +import { ScopedResourceClient } from '../../../../features/apiserver/client'; +import { ListOptions } from '../../../../features/apiserver/types'; import { ListMeta, ObjectMeta } from '../endpoints.gen'; /** diff --git a/public/app/features/provisioning/api/utils/getListParams.ts b/public/app/api/clients/provisioning/utils/getListParams.ts similarity index 65% rename from public/app/features/provisioning/api/utils/getListParams.ts rename to public/app/api/clients/provisioning/utils/getListParams.ts index 0e4df8c9e17..eb4af0ab6e7 100644 --- a/public/app/features/provisioning/api/utils/getListParams.ts +++ b/public/app/api/clients/provisioning/utils/getListParams.ts @@ -1,8 +1,8 @@ -import { parseListOptionsSelector } from '../../../apiserver/client'; -import { ListOptions } from '../../../apiserver/types'; -import { ListRepositoryArg } from '../endpoints.gen'; +import { parseListOptionsSelector } from '../../../../features/apiserver/client'; +import { ListOptions } from '../../../../features/apiserver/types'; +import { ListRepositoryApiArg } from '../endpoints.gen'; -type ListParams = Omit & +type ListParams = Omit & Pick; /** diff --git a/public/app/core/reducers/root.ts b/public/app/core/reducers/root.ts index 1609cf7c1a2..319344500c6 100644 --- a/public/app/core/reducers/root.ts +++ b/public/app/core/reducers/root.ts @@ -27,11 +27,11 @@ import teamsReducers from 'app/features/teams/state/reducers'; import usersReducers from 'app/features/users/state/reducers'; import templatingReducers from 'app/features/variables/state/keyedVariablesReducer'; +import { folderAPI } from '../../api/clients/folder'; +import { iamAPI } from '../../api/clients/iam'; +import { provisioningAPI } from '../../api/clients/provisioning'; import { alertingApi } from '../../features/alerting/unified/api/alertingApi'; -import { folderAPI } from '../../features/folders/api'; -import { iamApi } from '../../features/iam/api/api'; import { userPreferencesAPI } from '../../features/preferences/api'; -import { provisioningAPI } from '../../features/provisioning/api'; import { cleanUpAction } from '../actions/cleanUp'; const rootReducers = { @@ -61,7 +61,7 @@ const rootReducers = { [publicDashboardApi.reducerPath]: publicDashboardApi.reducer, [browseDashboardsAPI.reducerPath]: browseDashboardsAPI.reducer, [cloudMigrationAPI.reducerPath]: cloudMigrationAPI.reducer, - [iamApi.reducerPath]: iamApi.reducer, + [iamAPI.reducerPath]: iamAPI.reducer, [userPreferencesAPI.reducerPath]: userPreferencesAPI.reducer, [provisioningAPI.reducerPath]: provisioningAPI.reducer, [folderAPI.reducerPath]: folderAPI.reducer, diff --git a/public/app/features/iam/index.ts b/public/app/features/iam/index.ts deleted file mode 100644 index 5236538f8dd..00000000000 --- a/public/app/features/iam/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { generatedIamApi } from './api/endpoints.gen'; - -export const { useGetDisplayMappingQuery } = generatedIamApi; diff --git a/public/app/features/provisioning/hooks/useCreateOrUpdateRepository.ts b/public/app/features/provisioning/hooks/useCreateOrUpdateRepository.ts index 37f803a9838..b25f53003c3 100644 --- a/public/app/features/provisioning/hooks/useCreateOrUpdateRepository.ts +++ b/public/app/features/provisioning/hooks/useCreateOrUpdateRepository.ts @@ -1,6 +1,10 @@ import { useCallback } from 'react'; -import { RepositorySpec, useCreateRepositoryMutation, useReplaceRepositoryMutation } from '../api'; +import { + RepositorySpec, + useCreateRepositoryMutation, + useReplaceRepositoryMutation, +} from '../../../api/clients/provisioning'; export function useCreateOrUpdateRepository(name?: string) { const [create, createRequest] = useCreateRepositoryMutation(); diff --git a/public/app/features/provisioning/hooks/useCreateOrUpdateRepositoryFile.ts b/public/app/features/provisioning/hooks/useCreateOrUpdateRepositoryFile.ts index dbcc9ffb978..b7cc98380d3 100644 --- a/public/app/features/provisioning/hooks/useCreateOrUpdateRepositoryFile.ts +++ b/public/app/features/provisioning/hooks/useCreateOrUpdateRepositoryFile.ts @@ -1,17 +1,17 @@ import { useCallback } from 'react'; import { - ReplaceRepositoryFilesWithPathArg, + ReplaceRepositoryFilesWithPathApiArg, useCreateRepositoryFilesWithPathMutation, useReplaceRepositoryFilesWithPathMutation, -} from '../api'; +} from '../../../api/clients/provisioning'; export function useCreateOrUpdateRepositoryFile(name?: string) { const [create, createRequest] = useCreateRepositoryFilesWithPathMutation(); const [update, updateRequest] = useReplaceRepositoryFilesWithPathMutation(); const updateOrCreate = useCallback( - (data: ReplaceRepositoryFilesWithPathArg) => { + (data: ReplaceRepositoryFilesWithPathApiArg) => { const actions = name ? update : create; return actions(data); }, diff --git a/public/app/features/provisioning/hooks/useGetResourceRepository.ts b/public/app/features/provisioning/hooks/useGetResourceRepository.ts index 1d09d69141c..c47fb4d554a 100644 --- a/public/app/features/provisioning/hooks/useGetResourceRepository.ts +++ b/public/app/features/provisioning/hooks/useGetResourceRepository.ts @@ -1,7 +1,7 @@ import { skipToken } from '@reduxjs/toolkit/query/react'; +import { useGetFolderQuery } from '../../../api/clients/folder'; import { AnnoKeyManagerKind } from '../../apiserver/types'; -import { useGetFolderQuery } from '../../folders/api'; import { useRepositoryList } from './useRepositoryList'; diff --git a/public/app/features/provisioning/hooks/useIsProvisionedInstance.ts b/public/app/features/provisioning/hooks/useIsProvisionedInstance.ts index 441552a392b..3de98a2c935 100644 --- a/public/app/features/provisioning/hooks/useIsProvisionedInstance.ts +++ b/public/app/features/provisioning/hooks/useIsProvisionedInstance.ts @@ -1,6 +1,6 @@ import { skipToken } from '@reduxjs/toolkit/query'; -import { RepositoryViewList, useGetFrontendSettingsQuery } from '../api'; +import { RepositoryViewList, useGetFrontendSettingsQuery } from '../../../api/clients/provisioning'; import { checkSyncSettings } from '../utils/checkSyncSettings'; export function useIsProvisionedInstance(settings?: RepositoryViewList) { diff --git a/public/app/features/provisioning/hooks/useIsProvisionedNG.ts b/public/app/features/provisioning/hooks/useIsProvisionedNG.ts index 74ac239ad83..cacd1be26d3 100644 --- a/public/app/features/provisioning/hooks/useIsProvisionedNG.ts +++ b/public/app/features/provisioning/hooks/useIsProvisionedNG.ts @@ -1,7 +1,7 @@ import { useUrlParams } from 'app/core/navigation/hooks'; +import { useGetFrontendSettingsQuery } from '../../../api/clients/provisioning'; import { DashboardScene } from '../../dashboard-scene/scene/DashboardScene'; -import { useGetFrontendSettingsQuery } from '../api'; import { useGetResourceRepository } from './useGetResourceRepository'; diff --git a/public/app/features/provisioning/hooks/useRepositoryJobs.ts b/public/app/features/provisioning/hooks/useRepositoryJobs.ts index 1935cf167ef..affdfc6a87d 100644 --- a/public/app/features/provisioning/hooks/useRepositoryJobs.ts +++ b/public/app/features/provisioning/hooks/useRepositoryJobs.ts @@ -1,6 +1,6 @@ import { skipToken } from '@reduxjs/toolkit/query/react'; -import { Job, useListJobQuery } from '../api'; +import { Job, useListJobQuery } from '../../../api/clients/provisioning'; interface RepositoryJobsArgs { name?: string; diff --git a/public/app/features/provisioning/hooks/useRepositoryList.ts b/public/app/features/provisioning/hooks/useRepositoryList.ts index fe68c11ae43..e4622c2f2bb 100644 --- a/public/app/features/provisioning/hooks/useRepositoryList.ts +++ b/public/app/features/provisioning/hooks/useRepositoryList.ts @@ -1,10 +1,10 @@ import { skipToken } from '@reduxjs/toolkit/query'; -import { ListRepositoryArg, Repository, useListRepositoryQuery } from '../api'; +import { ListRepositoryApiArg, Repository, useListRepositoryQuery } from '../../../api/clients/provisioning'; // Sort repositories alphabetically by title export function useRepositoryList( - options: ListRepositoryArg | typeof skipToken = {} + options: ListRepositoryApiArg | typeof skipToken = {} ): [Repository[] | undefined, boolean] { const query = useListRepositoryQuery(options); const collator = new Intl.Collator(undefined, { numeric: true }); diff --git a/public/app/features/provisioning/types.ts b/public/app/features/provisioning/types.ts index 2fffca4e522..fbe4cbfda1d 100644 --- a/public/app/features/provisioning/types.ts +++ b/public/app/features/provisioning/types.ts @@ -1,4 +1,4 @@ -import { GitHubRepositoryConfig, LocalRepositoryConfig, RepositorySpec } from './api'; +import { GitHubRepositoryConfig, LocalRepositoryConfig, RepositorySpec } from '../../api/clients/provisioning'; export type RepositoryFormData = Omit & GitHubRepositoryConfig & diff --git a/public/app/features/provisioning/utils/checkSyncSettings.ts b/public/app/features/provisioning/utils/checkSyncSettings.ts index a69eee3f9d5..40f07afd6ea 100644 --- a/public/app/features/provisioning/utils/checkSyncSettings.ts +++ b/public/app/features/provisioning/utils/checkSyncSettings.ts @@ -1,4 +1,4 @@ -import { RepositoryViewList } from '../api'; +import { RepositoryViewList } from '../../../api/clients/provisioning'; export function checkSyncSettings(settings?: RepositoryViewList): [boolean, boolean] { if (!settings?.items?.length) { diff --git a/public/app/features/provisioning/utils/data.ts b/public/app/features/provisioning/utils/data.ts index bf83b161eca..13e4910df9e 100644 --- a/public/app/features/provisioning/utils/data.ts +++ b/public/app/features/provisioning/utils/data.ts @@ -1,4 +1,4 @@ -import { RepositorySpec } from '../api'; +import { RepositorySpec } from '../../../api/clients/provisioning'; import { RepositoryFormData } from '../types'; export const dataToSpec = (data: RepositoryFormData): RepositorySpec => { diff --git a/public/app/features/provisioning/api/selectors.ts b/public/app/features/provisioning/utils/selectors.ts similarity index 90% rename from public/app/features/provisioning/api/selectors.ts rename to public/app/features/provisioning/utils/selectors.ts index 1ea0f43416b..b4f4ef4c95d 100644 --- a/public/app/features/provisioning/api/selectors.ts +++ b/public/app/features/provisioning/utils/selectors.ts @@ -2,9 +2,7 @@ import { createSelector } from '@reduxjs/toolkit'; import { RootState } from 'app/store/configureStore'; -import { Repository } from './endpoints.gen'; - -import { provisioningAPI } from './index'; +import { Repository, provisioningAPI } from '../../../api/clients/provisioning/index'; const emptyRepos: Repository[] = []; diff --git a/public/app/features/provisioning/api/types.ts b/public/app/features/provisioning/utils/types.ts similarity index 100% rename from public/app/features/provisioning/api/types.ts rename to public/app/features/provisioning/utils/types.ts diff --git a/public/app/store/configureStore.ts b/public/app/store/configureStore.ts index 639ac168787..89629e77a86 100644 --- a/public/app/store/configureStore.ts +++ b/public/app/store/configureStore.ts @@ -8,12 +8,12 @@ import { cloudMigrationAPI } from 'app/features/migrate-to-cloud/api'; import { userPreferencesAPI } from 'app/features/preferences/api'; import { StoreState } from 'app/types/store'; +import { folderAPI } from '../api/clients/folder'; +import { iamAPI } from '../api/clients/iam'; +import { provisioningAPI } from '../api/clients/provisioning'; import { buildInitialState } from '../core/reducers/navModel'; import { addReducer, createRootReducer } from '../core/reducers/root'; import { alertingApi } from '../features/alerting/unified/api/alertingApi'; -import { folderAPI } from '../features/folders/api'; -import { iamApi } from '../features/iam/api/api'; -import { provisioningAPI } from '../features/provisioning/api'; import { setStore } from './store'; @@ -42,7 +42,7 @@ export function configureStore(initialState?: Partial) { browseDashboardsAPI.middleware, cloudMigrationAPI.middleware, userPreferencesAPI.middleware, - iamApi.middleware, + iamAPI.middleware, provisioningAPI.middleware, folderAPI.middleware, ...extraMiddleware diff --git a/scripts/generate-rtk-apis.ts b/scripts/generate-rtk-apis.ts index 3bc9ee949fc..efa374be767 100644 --- a/scripts/generate-rtk-apis.ts +++ b/scripts/generate-rtk-apis.ts @@ -39,34 +39,24 @@ const config: ConfigFile = { apiImport: 'baseAPI', filterEndpoints: ['getUserPreferences', 'updateUserPreferences', 'patchUserPreferences'], }, - '../public/app/features/iam/api/endpoints.gen.ts': { + '../public/app/api/clients/iam/endpoints.gen.ts': { schemaFile: '../data/openapi/iam.grafana.app-v0alpha1.json', - apiFile: '../public/app/features/iam/api/api.ts', - apiImport: 'iamApi', + apiFile: '../public/app/api/clients/iam/baseAPI.ts', filterEndpoints: ['getDisplayMapping'], - exportName: 'generatedIamApi', - flattenArg: false, tag: true, }, - '../public/app/features/provisioning/api/endpoints.gen.ts': { - apiFile: '../public/app/features/provisioning/api/baseAPI.ts', + '../public/app/api/clients/provisioning/endpoints.gen.ts': { + apiFile: '../public/app/api/clients/provisioning/baseAPI.ts', schemaFile: '../data/openapi/provisioning.grafana.app-v0alpha1.json', - apiImport: 'baseAPI', filterEndpoints, - argSuffix: 'Arg', - responseSuffix: 'Response', tag: true, hooks: true, }, - '../public/app/features/folders/api/endpoints.gen.ts': { - apiFile: '../public/app/features/folders/api/baseAPI.ts', + '../public/app/api/clients/folder/endpoints.gen.ts': { + apiFile: '../public/app/api/clients/folder/baseAPI.ts', schemaFile: '../data/openapi/folder.grafana.app-v0alpha1.json', - apiImport: 'baseAPI', filterEndpoints: ['getFolder'], - argSuffix: 'Arg', - responseSuffix: 'Response', tag: true, - hooks: true, }, }, }; From 38d94b86ecd83f4e463bf771b869809de22a0cb5 Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Fri, 14 Mar 2025 15:03:45 +0000 Subject: [PATCH 002/115] Api clients: fix import to point to new centralised client (#102208) fix import to point to new centralised client --- public/app/features/provisioning/dashboardLoader.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public/app/features/provisioning/dashboardLoader.ts b/public/app/features/provisioning/dashboardLoader.ts index 914d42da88a..b75c691067b 100644 --- a/public/app/features/provisioning/dashboardLoader.ts +++ b/public/app/features/provisioning/dashboardLoader.ts @@ -1,10 +1,9 @@ import { getBackendSrv } from '@grafana/runtime'; import { DashboardDTO } from 'app/types'; +import { BASE_URL } from '../../api/clients/provisioning/baseAPI'; import { AnnoKeyManagerIdentity, AnnoKeyManagerKind, AnnoKeySourcePath } from '../apiserver/types'; -import { BASE_URL } from './api/baseAPI'; - /** * * Load a dashboard from repository From b3452ae72029b57d3b8c2937986149e701853cd9 Mon Sep 17 00:00:00 2001 From: Syerikjan Kh Date: Fri, 14 Mar 2025 11:05:27 -0400 Subject: [PATCH 003/115] feat: datasourceconnectionsTab to private preview (#102200) --- .../configure-grafana/feature-toggles/index.md | 1 - pkg/services/featuremgmt/registry.go | 2 +- pkg/services/featuremgmt/toggles_gen.csv | 2 +- pkg/services/featuremgmt/toggles_gen.json | 6 +++--- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md index 23849201ec7..8691417c8b7 100644 --- a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md +++ b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md @@ -222,7 +222,6 @@ Experimental features might be changed or removed without prior notice. | `templateVariablesUsesCombobox` | Use new combobox component for template variables | | `grafanaAdvisor` | Enables Advisor app | | `elasticsearchImprovedParsing` | Enables less memory intensive Elasticsearch result parsing | -| `datasourceConnectionsTab` | Shows defined connections for a data source in the plugins detail page | | `newLogsPanel` | Enables the new logs panel in Explore | | `pluginsCDNSyncLoader` | Load plugins from CDN synchronously | | `assetSriChecks` | Enables SRI checks for Grafana JavaScript assets | diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index 69edda72941..d9053899ef8 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -1669,7 +1669,7 @@ var ( { Name: "datasourceConnectionsTab", Description: "Shows defined connections for a data source in the plugins detail page", - Stage: FeatureStageExperimental, + Stage: FeatureStagePrivatePreview, Owner: grafanaPluginsPlatformSquad, RequiresDevMode: false, FrontendOnly: true, diff --git a/pkg/services/featuremgmt/toggles_gen.csv b/pkg/services/featuremgmt/toggles_gen.csv index 8e5f863480e..4d6d6ca54bc 100644 --- a/pkg/services/featuremgmt/toggles_gen.csv +++ b/pkg/services/featuremgmt/toggles_gen.csv @@ -221,7 +221,7 @@ ABTestFeatureToggleB,experimental,@grafana/sharing-squad,false,false,false grafanaAdvisor,experimental,@grafana/plugins-platform-backend,false,false,false elasticsearchImprovedParsing,experimental,@grafana/aws-datasources,false,false,false exploreMetricsUseExternalAppPlugin,preview,@grafana/observability-metrics,false,true,true -datasourceConnectionsTab,experimental,@grafana/plugins-platform-backend,false,false,true +datasourceConnectionsTab,privatePreview,@grafana/plugins-platform-backend,false,false,true fetchRulesUsingPost,experimental,@grafana/alerting-squad,false,false,false alertingConversionAPI,experimental,@grafana/alerting-squad,false,false,false alertingAlertmanagerExtraDedupStage,experimental,@grafana/alerting-squad,false,true,false diff --git a/pkg/services/featuremgmt/toggles_gen.json b/pkg/services/featuremgmt/toggles_gen.json index a92ebcadc16..89f92814f9f 100644 --- a/pkg/services/featuremgmt/toggles_gen.json +++ b/pkg/services/featuremgmt/toggles_gen.json @@ -1293,15 +1293,15 @@ { "metadata": { "name": "datasourceConnectionsTab", - "resourceVersion": "1737049826022", + "resourceVersion": "1741961069415", "creationTimestamp": "2025-01-21T17:39:48Z", "annotations": { - "grafana.app/updatedTimestamp": "2025-01-16 17:50:26.022636488 +0000 UTC" + "grafana.app/updatedTimestamp": "2025-03-14 14:04:29.415154706 +0000 UTC" } }, "spec": { "description": "Shows defined connections for a data source in the plugins detail page", - "stage": "experimental", + "stage": "privatePreview", "codeowner": "@grafana/plugins-platform-backend", "frontend": true } From bf172dfd296d15c02473904646c19d2bb663cc3f Mon Sep 17 00:00:00 2001 From: Josh Hunt Date: Fri, 14 Mar 2025 15:21:35 +0000 Subject: [PATCH 004/115] GrafanaUI: Add noBackdropBlur feature toggle (#102128) * Create new noBackdropBlur feature toggle * Disable backdrop blur with feature toggle --- .../src/types/featureToggles.gen.ts | 1 + .../src/themes/GlobalStyles/GlobalStyles.tsx | 9 +++++++- .../src/themes/GlobalStyles/hacks.ts | 21 +++++++++++++++++++ pkg/services/featuremgmt/registry.go | 9 ++++++++ pkg/services/featuremgmt/toggles_gen.csv | 1 + pkg/services/featuremgmt/toggles_gen.go | 4 ++++ pkg/services/featuremgmt/toggles_gen.json | 15 +++++++++++++ public/app/AppWrapper.tsx | 2 +- public/app/routes/RoutesWrapper.tsx | 3 ++- 9 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 packages/grafana-ui/src/themes/GlobalStyles/hacks.ts diff --git a/packages/grafana-data/src/types/featureToggles.gen.ts b/packages/grafana-data/src/types/featureToggles.gen.ts index 5e008a732e7..cee459b0eab 100644 --- a/packages/grafana-data/src/types/featureToggles.gen.ts +++ b/packages/grafana-data/src/types/featureToggles.gen.ts @@ -258,4 +258,5 @@ export interface FeatureToggles { infinityRunQueriesInParallel?: boolean; inviteUserExperimental?: boolean; extraLanguages?: boolean; + noBackdropBlur?: boolean; } diff --git a/packages/grafana-ui/src/themes/GlobalStyles/GlobalStyles.tsx b/packages/grafana-ui/src/themes/GlobalStyles/GlobalStyles.tsx index 12e094433d2..b8f4800fbae 100644 --- a/packages/grafana-ui/src/themes/GlobalStyles/GlobalStyles.tsx +++ b/packages/grafana-ui/src/themes/GlobalStyles/GlobalStyles.tsx @@ -14,6 +14,7 @@ import { getExtraStyles } from './extra'; import { getFilterTableStyles } from './filterTable'; import { getFontStyles } from './fonts'; import { getFormElementStyles } from './forms'; +import { getHacksStyles } from './hacks'; import { getJsonFormatterStyles } from './jsonFormatter'; import { getLegacySelectStyles } from './legacySelect'; import { getMarkdownStyles } from './markdownStyles'; @@ -24,9 +25,14 @@ import { getSlateStyles } from './slate'; import { getUplotStyles } from './uPlot'; import { getUtilityClassStyles } from './utilityClasses'; +interface GlobalStylesProps { + hackNoBackdropBlur?: boolean; +} + /** @internal */ -export function GlobalStyles() { +export function GlobalStyles(props: GlobalStylesProps) { const theme = useTheme2(); + const { hackNoBackdropBlur } = props; return ( ); diff --git a/packages/grafana-ui/src/themes/GlobalStyles/hacks.ts b/packages/grafana-ui/src/themes/GlobalStyles/hacks.ts new file mode 100644 index 00000000000..1e4fea76a6f --- /dev/null +++ b/packages/grafana-ui/src/themes/GlobalStyles/hacks.ts @@ -0,0 +1,21 @@ +import { css } from '@emotion/react'; + +export interface Hacks { + hackNoBackdropBlur?: boolean; +} + +export function getHacksStyles(hacks: Hacks) { + return css([ + /** + * Disables all backdrop blur effects to improve performance on extremely + * resource constrained devices. + * + * Controlled via the `noBackdropBlur` feature toggle in Grafana + */ + hacks.hackNoBackdropBlur && { + '*, *:before, *:after': { + backdropFilter: 'none !important', + }, + }, + ]); +} diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index d9053899ef8..f92929fceaf 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -1811,6 +1811,15 @@ var ( Owner: grafanaFrontendPlatformSquad, FrontendOnly: true, }, + { + Name: "noBackdropBlur", + Description: "Disables backdrop blur", + Stage: FeatureStageExperimental, + Owner: grafanaFrontendPlatformSquad, + HideFromAdminPage: true, + HideFromDocs: true, + FrontendOnly: true, + }, } ) diff --git a/pkg/services/featuremgmt/toggles_gen.csv b/pkg/services/featuremgmt/toggles_gen.csv index 4d6d6ca54bc..d54698fe6e6 100644 --- a/pkg/services/featuremgmt/toggles_gen.csv +++ b/pkg/services/featuremgmt/toggles_gen.csv @@ -239,3 +239,4 @@ grafanaManagedRecordingRulesDatasources,experimental,@grafana/alerting-squad,fal infinityRunQueriesInParallel,privatePreview,@grafana/oss-big-tent,false,false,false inviteUserExperimental,experimental,@grafana/sharing-squad,false,false,true extraLanguages,experimental,@grafana/grafana-frontend-platform,false,false,true +noBackdropBlur,experimental,@grafana/grafana-frontend-platform,false,false,true diff --git a/pkg/services/featuremgmt/toggles_gen.go b/pkg/services/featuremgmt/toggles_gen.go index 55b65a745c2..4d2ff0b954a 100644 --- a/pkg/services/featuremgmt/toggles_gen.go +++ b/pkg/services/featuremgmt/toggles_gen.go @@ -966,4 +966,8 @@ const ( // FlagExtraLanguages // Enables additional languages FlagExtraLanguages = "extraLanguages" + + // FlagNoBackdropBlur + // Disables backdrop blur + FlagNoBackdropBlur = "noBackdropBlur" ) diff --git a/pkg/services/featuremgmt/toggles_gen.json b/pkg/services/featuremgmt/toggles_gen.json index 89f92814f9f..12c658a56d5 100644 --- a/pkg/services/featuremgmt/toggles_gen.json +++ b/pkg/services/featuremgmt/toggles_gen.json @@ -2913,6 +2913,21 @@ "hideFromDocs": true } }, + { + "metadata": { + "name": "noBackdropBlur", + "resourceVersion": "1741879106163", + "creationTimestamp": "2025-03-13T15:18:26Z" + }, + "spec": { + "description": "Disables backdrop blur", + "stage": "experimental", + "codeowner": "@grafana/grafana-frontend-platform", + "frontend": true, + "hideFromAdminPage": true, + "hideFromDocs": true + } + }, { "metadata": { "name": "nodeGraphDotLayout", diff --git a/public/app/AppWrapper.tsx b/public/app/AppWrapper.tsx index fdbf6bf3b2d..fb241de0224 100644 --- a/public/app/AppWrapper.tsx +++ b/public/app/AppWrapper.tsx @@ -121,7 +121,7 @@ export class AppWrapper extends Component { actions={[]} options={{ enableHistory: true, callbacks: { onSelectAction: commandPaletteActionSelected } }} > - + diff --git a/public/app/routes/RoutesWrapper.tsx b/public/app/routes/RoutesWrapper.tsx index 8a897553c7c..7e4701f040e 100644 --- a/public/app/routes/RoutesWrapper.tsx +++ b/public/app/routes/RoutesWrapper.tsx @@ -6,6 +6,7 @@ import { CompatRouter } from 'react-router-dom-v5-compat'; import { GrafanaTheme2 } from '@grafana/data/'; import { + config, locationService, LocationServiceProvider, useChromeHeaderHeight, @@ -114,7 +115,7 @@ export function ExperimentalSplitPaneRouterWrapper(props: RouterWrapperProps) { - +
Date: Fri, 14 Mar 2025 17:11:09 +0100 Subject: [PATCH 005/115] feat(util): add key based debouncer (#102073) --- pkg/util/debouncer/debouncer.go | 310 +++++++++++++++++++++++++++ pkg/util/debouncer/debouncer_test.go | 217 +++++++++++++++++++ 2 files changed, 527 insertions(+) create mode 100644 pkg/util/debouncer/debouncer.go create mode 100644 pkg/util/debouncer/debouncer_test.go diff --git a/pkg/util/debouncer/debouncer.go b/pkg/util/debouncer/debouncer.go new file mode 100644 index 00000000000..a6c0e7b22e3 --- /dev/null +++ b/pkg/util/debouncer/debouncer.go @@ -0,0 +1,310 @@ +package debouncer + +import ( + "context" + "errors" + "sync" + "time" + + "github.com/grafana/dskit/instrument" + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" +) + +var ( + ErrBufferFull = errors.New("debouncer buffer full") +) + +type ProcessFunc[T comparable] func(context.Context, T) error +type ErrorFunc[T comparable] func(T, error) + +type metrics struct { + itemsAddedCounter prometheus.Counter + itemsDroppedCounter prometheus.Counter + itemsProcessedCounter prometheus.Counter + processingErrorsCounter prometheus.Counter + processingDurationHistogram prometheus.Histogram +} + +func newMetrics(reg prometheus.Registerer, name string) *metrics { + return &metrics{ + itemsAddedCounter: promauto.With(reg).NewCounter(prometheus.CounterOpts{ + Name: "debouncer_items_added_total", + Help: "Total number of items added to the debouncer", + ConstLabels: prometheus.Labels{ + "name": name, + }, + }), + itemsDroppedCounter: promauto.With(reg).NewCounter(prometheus.CounterOpts{ + Name: "debouncer_items_dropped_total", + Help: "Total number of items dropped due to a full buffer", + ConstLabels: prometheus.Labels{ + "name": name, + }, + }), + itemsProcessedCounter: promauto.With(reg).NewCounter(prometheus.CounterOpts{ + Name: "debouncer_items_processed_total", + Help: "Total number of items processed by the debouncer", + ConstLabels: prometheus.Labels{ + "name": name, + }, + }), + processingErrorsCounter: promauto.With(reg).NewCounter(prometheus.CounterOpts{ + Name: "debouncer_processing_errors_total", + Help: "Total number of errors during processing", + ConstLabels: prometheus.Labels{ + "name": name, + }, + }), + processingDurationHistogram: promauto.With(reg).NewHistogram(prometheus.HistogramOpts{ + Name: "debouncer_processing_duration_seconds", + Help: "Time taken to process items", + Buckets: instrument.DefBuckets, + NativeHistogramBucketFactor: 1.1, + NativeHistogramMaxBucketNumber: 160, + NativeHistogramMinResetDuration: time.Hour, + ConstLabels: prometheus.Labels{ + "name": name, + }, + }), + } +} + +// DebouncerOpts hold all the options to create a debouncer group. +type DebouncerOpts[T comparable] struct { + // Name should be a unique name for this debouncer group. It is + // also used a name label value for the metrics. + Name string + // BufferSize is the maximum number of pending events to buffer. + BufferSize int + + // ErrorHandler is the function that is called when a process for a given + // key returns an error while running. + ErrorHandler ErrorFunc[T] + // ProcessHandler is the function that is called once a process for a given + // key should be run. + ProcessHandler ProcessFunc[T] + // MinWait is the cooldown period after receiving an event. If another event with the + // same key arrives during this period, the timer resets and we wait another MinWait duration. + MinWait time.Duration + // MaxWait is the maximum time any event will wait before processing. Even if new events + // for the same key keep arriving, we guarantee processing after MaxWait from the first event. + MaxWait time.Duration + Reg prometheus.Registerer +} + +type Group[T comparable] struct { + buffer chan T + + // mutex protecting the debouncers map. + debouncersMu sync.Mutex + debouncers map[T]*debouncer[T] + + wg sync.WaitGroup + ctx context.Context + cancel context.CancelFunc + errorHandler ErrorFunc[T] + processHandler ProcessFunc[T] + minWait time.Duration + maxWait time.Duration + metrics *metrics +} + +// NewGroup creates a new debouncer group for processing events with unique keys. +// +// A debouncer group helps optimize expensive operations by: +// 1. Grouping identical events that occur in rapid succession +// 2. Processing each unique key only once after waiting periods expire +// +// Example usage: +// +// group := debouncer.NewGroup(DebouncerOpts[string]{ +// BufferSize: 1000, +// ProcessHandler: func(ctx context.Context, key string) error { +// // This is where you perform the expensive operation +// return doSuperExpensiveCommand(key) +// } +// MinWait: time.Second * 10, +// MaxWait: time.Minute, +// }) +// +// // Start the debouncer group. +// group.Start(ctx) +// +// // Queue events +// if err := group.Add("user-1"); err != nil { +// // Do something with the error. +// } +// // Adding the same key resets MinWait but not MaxWait +// if err := group.Add("user-1"); err != nil { +// // Do something with the error. +// } +// +// The event will be processed when either MinWait expires (after the most recent add) +// or MaxWait expires (after the first add), whichever comes first. +func NewGroup[T comparable](opts DebouncerOpts[T]) (*Group[T], error) { + if opts.BufferSize <= 0 { + opts.BufferSize = 100 + } + + if opts.MinWait <= 0 { + opts.MinWait = time.Minute + } + if opts.MaxWait <= 0 { + opts.MaxWait = 5 * time.Minute + } + if opts.MinWait > opts.MaxWait { + return nil, errors.New("minWait is bigger than maxWait") + } + + if opts.ProcessHandler == nil { + return nil, errors.New("processHandler is required") + } + + if opts.ErrorHandler == nil { + opts.ErrorHandler = func(_ T, _ error) {} + } + + return &Group[T]{ + buffer: make(chan T, opts.BufferSize), + debouncers: make(map[T]*debouncer[T]), + processHandler: opts.ProcessHandler, + errorHandler: opts.ErrorHandler, + minWait: opts.MinWait, + maxWait: opts.MaxWait, + metrics: newMetrics(opts.Reg, opts.Name), + }, nil +} + +// Add will create a new debouncer for the given Key if it doesn't exist yet. +// If a key has already a debouncer it will either reset the MinWait timer for +// this key, or if they key is already running its process be no-op. +func (g *Group[T]) Add(value T) error { + select { + case g.buffer <- value: + g.metrics.itemsAddedCounter.Inc() + return nil + default: + g.metrics.itemsDroppedCounter.Inc() + return ErrBufferFull + } +} + +func (g *Group[T]) Start(ctx context.Context) { + g.ctx, g.cancel = context.WithCancel(ctx) + g.wg.Add(1) + go func() { + defer g.wg.Done() + for { + select { + case <-g.ctx.Done(): + return + case value := <-g.buffer: + g.processValue(value) + } + } + }() +} + +func (g *Group[T]) Stop() { + if g.cancel != nil { + g.cancel() + g.wg.Wait() + } +} + +func (g *Group[T]) processValue(key T) { + g.debouncersMu.Lock() + deb, ok := g.debouncers[key] + if !ok { + deb = newDebouncer[T](g.minWait, g.maxWait, key, func(v T) { + g.processWithMetrics(g.ctx, v, g.processHandler) + + g.debouncersMu.Lock() + defer g.debouncersMu.Unlock() + if current, exists := g.debouncers[key]; exists && current == deb { + delete(g.debouncers, key) + } + }) + g.wg.Add(1) + go func() { + defer g.wg.Done() + deb.run(g.ctx) + }() + g.debouncers[key] = deb + } + g.debouncersMu.Unlock() + + deb.reset() +} + +func (g *Group[T]) processWithMetrics(ctx context.Context, value T, processFunc ProcessFunc[T]) { + timer := prometheus.NewTimer(g.metrics.processingDurationHistogram) + defer timer.ObserveDuration() + g.metrics.itemsProcessedCounter.Inc() + + if err := processFunc(ctx, value); err != nil { + g.errorHandler(value, err) + g.metrics.processingErrorsCounter.Inc() + } +} + +// debouncer handles debouncing for a specific key. +type debouncer[T comparable] struct { + key T + resetChan chan struct{} + minWait time.Duration + maxWait time.Duration + processFunc func(T) +} + +// newDebouncer creates a new key debouncer. +func newDebouncer[T comparable](minWait, maxWait time.Duration, key T, processFunc func(T)) *debouncer[T] { + deb := &debouncer[T]{ + key: key, + resetChan: make(chan struct{}, 1), + minWait: minWait, + maxWait: maxWait, + processFunc: processFunc, + } + return deb +} + +// reset triggers a timer reset for the minWait. +func (d *debouncer[T]) reset() { + select { + case d.resetChan <- struct{}{}: + // Value sent successfully. + default: + // Value was dropped. Is not an issue as + // a reset is already about to being processed + // or the process is being run. + } +} + +// run manages the debouncing process for a specific key. +func (d *debouncer[T]) run(ctx context.Context) { + // Create timers after getting the first updateChan. + minTimer := time.NewTimer(d.minWait) + maxTimer := time.NewTimer(d.maxWait) + defer func() { + minTimer.Stop() + maxTimer.Stop() + }() + + for { + select { + case <-ctx.Done(): + return + case <-d.resetChan: + minTimer.Stop() + minTimer.Reset(d.minWait) + case <-minTimer.C: + d.processFunc(d.key) + return + case <-maxTimer.C: + d.processFunc(d.key) + return + } + } +} diff --git a/pkg/util/debouncer/debouncer_test.go b/pkg/util/debouncer/debouncer_test.go new file mode 100644 index 00000000000..711c8761836 --- /dev/null +++ b/pkg/util/debouncer/debouncer_test.go @@ -0,0 +1,217 @@ +package debouncer + +import ( + "context" + "errors" + "sync" + "testing" + "time" + + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/testutil" + "github.com/stretchr/testify/require" +) + +func TestDebouncer(t *testing.T) { + t.Run("should process values after min wait", func(t *testing.T) { + var processedMu sync.Mutex + processedValues := make(map[string]int) + + group, err := NewGroup(DebouncerOpts[string]{ + BufferSize: 10, + ProcessHandler: func(ctx context.Context, value string) error { + processedMu.Lock() + processedValues[value]++ + processedMu.Unlock() + return nil + }, + MinWait: 10 * time.Millisecond, + MaxWait: 500 * time.Millisecond, + }) + require.NoError(t, err) + + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + group.Start(ctx) + + require.NoError(t, group.Add("key1")) + require.NoError(t, group.Add("key2")) + // Should be deduplicated. + require.NoError(t, group.Add("key1")) + + require.Eventually(t, func() bool { + // We should have processed key1 and key2 exactly once. + processedMu.Lock() + if processedValues["key1"] == 1 && processedValues["key2"] == 1 { + return true + } + processedMu.Unlock() + return false + }, time.Millisecond*200, time.Millisecond*20) + }) + + t.Run("should process values after max wait", func(t *testing.T) { + processed := make(map[string]int, 1) + + group, err := NewGroup(DebouncerOpts[string]{ + BufferSize: 10, + ProcessHandler: func(ctx context.Context, value string) error { + processed[value]++ + return nil + }, + MinWait: 50 * time.Millisecond, + MaxWait: 500 * time.Millisecond, + }) + require.NoError(t, err) + + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + group.Start(ctx) + + ticker := time.NewTicker(time.Millisecond * 40) + defer ticker.Stop() + + start := time.Now() + + for counter := 0; counter < 25; counter++ { + <-ticker.C + _ = group.Add("key1") + if processed["key1"] == 1 { + break + } + } + + require.WithinDuration(t, start.Add(time.Millisecond*500), time.Now(), time.Millisecond*100) + }) + + t.Run("should handle buffer full", func(t *testing.T) { + group, err := NewGroup(DebouncerOpts[string]{ + BufferSize: 1, + ProcessHandler: func(ctx context.Context, value string) error { return nil }, + MinWait: 10 * time.Millisecond, + MaxWait: 100 * time.Millisecond, + }) + require.NoError(t, err) + + require.NoError(t, group.Add("key1")) + // Buffer should be full by now as we are not reading from it yet. + require.ErrorIs(t, group.Add("key2"), ErrBufferFull) + }) + + t.Run("should track metrics", func(t *testing.T) { + var wg sync.WaitGroup + + group, err := NewGroup(DebouncerOpts[string]{ + BufferSize: 10, + ProcessHandler: func(ctx context.Context, value string) error { + wg.Done() + return nil + }, + MinWait: 10 * time.Millisecond, + MaxWait: 100 * time.Millisecond, + + Name: "test", + }) + require.NoError(t, err) + + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + group.Start(ctx) + + wg.Add(1) + require.NoError(t, group.Add("key1")) + require.NoError(t, group.Add("key1")) + + wg.Wait() + + require.Equal(t, float64(2), testutil.ToFloat64(group.metrics.itemsAddedCounter)) + require.Equal(t, float64(1), testutil.ToFloat64(group.metrics.itemsProcessedCounter)) + }) + + t.Run("should handle errors", func(t *testing.T) { + var ( + wg sync.WaitGroup + errs = make(chan error, 10) + expectedErr = errors.New("test error") + ) + + group, err := NewGroup(DebouncerOpts[string]{ + BufferSize: 10, + ProcessHandler: func(ctx context.Context, value string) error { + wg.Done() + return expectedErr + }, + MinWait: 10 * time.Millisecond, + MaxWait: 100 * time.Millisecond, + Reg: prometheus.NewPedanticRegistry(), + Name: "test_errors", + ErrorHandler: func(_ string, err error) { errs <- err }, + }) + require.NoError(t, err) + + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + group.Start(ctx) + + wg.Add(1) + require.NoError(t, group.Add("key1")) + + wg.Wait() + + select { + case err := <-errs: + require.Equal(t, expectedErr, err) + default: + t.Fatal("expected error") + } + + require.Equal(t, float64(1), testutil.ToFloat64(group.metrics.processingErrorsCounter)) + }) + + t.Run("should gracefully handle stops", func(t *testing.T) { + // Create a channel to signal when processing is done. + done := make(chan struct{}) + + group, err := NewGroup(DebouncerOpts[string]{ + BufferSize: 10, + ProcessHandler: func(ctx context.Context, item string) error { + // Start a goroutine to wait for context cancellation. + go func() { + <-ctx.Done() + close(done) + }() + return nil + }, + MinWait: 50 * time.Millisecond, + MaxWait: 500 * time.Millisecond, + }) + require.NoError(t, err) + + // Start the group with a context + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + group.Start(ctx) + + // Send an item to trigger processing. + require.NoError(t, group.Add("key-1")) + + // Give the group a moment to process the item. + time.Sleep(100 * time.Millisecond) + + // Stop the group, which should cancel the context. + group.Stop() + + // Wait for the done signal or timeout. + select { + case <-done: + // Success - the group was stopped and the context was canceled + case <-time.After(time.Second): + t.Fatal("Timed out waiting for group to stop") + } + }) +} From ef9dca9ea369997116cd7880c238597fc18ca682 Mon Sep 17 00:00:00 2001 From: Tom Ratcliffe Date: Fri, 14 Mar 2025 16:40:05 +0000 Subject: [PATCH 006/115] Alerting: Add UI migration feature toggle (#102217) Add UI migration feature toggle --- .../grafana-data/src/types/featureToggles.gen.ts | 1 + pkg/services/featuremgmt/registry.go | 9 +++++++++ pkg/services/featuremgmt/toggles_gen.csv | 1 + pkg/services/featuremgmt/toggles_gen.go | 4 ++++ pkg/services/featuremgmt/toggles_gen.json | 15 +++++++++++++++ 5 files changed, 30 insertions(+) diff --git a/packages/grafana-data/src/types/featureToggles.gen.ts b/packages/grafana-data/src/types/featureToggles.gen.ts index cee459b0eab..39299b42166 100644 --- a/packages/grafana-data/src/types/featureToggles.gen.ts +++ b/packages/grafana-data/src/types/featureToggles.gen.ts @@ -259,4 +259,5 @@ export interface FeatureToggles { inviteUserExperimental?: boolean; extraLanguages?: boolean; noBackdropBlur?: boolean; + alertingMigrationUI?: boolean; } diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index f92929fceaf..a05f3956e1b 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -1820,6 +1820,15 @@ var ( HideFromDocs: true, FrontendOnly: true, }, + { + Name: "alertingMigrationUI", + Description: "Enables the alerting migration UI, to migrate datasource-managed rules to Grafana-managed rules", + FrontendOnly: true, + Stage: FeatureStageExperimental, + Owner: grafanaAlertingSquad, + HideFromAdminPage: true, + HideFromDocs: true, + }, } ) diff --git a/pkg/services/featuremgmt/toggles_gen.csv b/pkg/services/featuremgmt/toggles_gen.csv index d54698fe6e6..c3e15a6d655 100644 --- a/pkg/services/featuremgmt/toggles_gen.csv +++ b/pkg/services/featuremgmt/toggles_gen.csv @@ -240,3 +240,4 @@ infinityRunQueriesInParallel,privatePreview,@grafana/oss-big-tent,false,false,fa inviteUserExperimental,experimental,@grafana/sharing-squad,false,false,true extraLanguages,experimental,@grafana/grafana-frontend-platform,false,false,true noBackdropBlur,experimental,@grafana/grafana-frontend-platform,false,false,true +alertingMigrationUI,experimental,@grafana/alerting-squad,false,false,true diff --git a/pkg/services/featuremgmt/toggles_gen.go b/pkg/services/featuremgmt/toggles_gen.go index 4d2ff0b954a..67ed9660c83 100644 --- a/pkg/services/featuremgmt/toggles_gen.go +++ b/pkg/services/featuremgmt/toggles_gen.go @@ -970,4 +970,8 @@ const ( // FlagNoBackdropBlur // Disables backdrop blur FlagNoBackdropBlur = "noBackdropBlur" + + // FlagAlertingMigrationUI + // Enables the alerting migration UI, to migrate datasource-managed rules to Grafana-managed rules + FlagAlertingMigrationUI = "alertingMigrationUI" ) diff --git a/pkg/services/featuremgmt/toggles_gen.json b/pkg/services/featuremgmt/toggles_gen.json index 12c658a56d5..69911d2e36c 100644 --- a/pkg/services/featuremgmt/toggles_gen.json +++ b/pkg/services/featuremgmt/toggles_gen.json @@ -322,6 +322,21 @@ "frontend": true } }, + { + "metadata": { + "name": "alertingMigrationUI", + "resourceVersion": "1741968018953", + "creationTimestamp": "2025-03-14T16:00:18Z" + }, + "spec": { + "description": "Enables the alerting migration UI, to migrate datasource-managed rules to Grafana-managed rules", + "stage": "experimental", + "codeowner": "@grafana/alerting-squad", + "frontend": true, + "hideFromAdminPage": true, + "hideFromDocs": true + } + }, { "metadata": { "name": "alertingNoDataErrorExecution", From f2ec1a2b55ac74f8628c63a33cf368c75e6d7614 Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Fri, 14 Mar 2025 17:07:24 +0000 Subject: [PATCH 007/115] Api client generation: docs tweaks following centralisation (#102223) * tweaks following centralisation * slightly better step name --- public/app/api/README.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/public/app/api/README.md b/public/app/api/README.md index 356289f08a6..49da9eaad8a 100644 --- a/public/app/api/README.md +++ b/public/app/api/README.md @@ -24,7 +24,7 @@ Afterwards, you need to run the `TestIntegrationOpenAPIs` test. Note that it wil ### 2. Create the API definition -In the `../public/app/features/{your_group_name}/api/` folder you have to create the `baseAPI.ts` file for your group. This file should have the following content: +In the [`/public/app/api/clients`](/public/app/api/clients) folder, create a new folder and `baseAPI.ts` file for your group. This file should have the following content: ```jsx import { createApi } from '@reduxjs/toolkit/query/react'; @@ -34,7 +34,7 @@ import { getAPIBaseURL } from 'app/api/utils'; export const BASE_URL = getAPIBaseURL('dashboard.grafana.app', 'v0alpha1'); -export const baseAPI = createApi({ +export const api = createApi({ reducerPath: 'dashboardAPI', baseQuery: createBaseQuery({ baseURL: BASE_URL, @@ -43,9 +43,9 @@ export const baseAPI = createApi({ }); ``` -This is the API definition for the specific group you're working with, where `getAPIBaseURL` should have the proper `group` and `version` as parameters. The `reducePath` should also be modified to match `group + API`: `dashboard` will be `dashboardAPI`, `iam` will be `iamAPI` and so on. +This is the API definition for the specific group you're working with, where `getAPIBaseURL` should have the proper `group` and `version` as parameters. The `reducerPath` needs to be unique. The convention is to use `API`: `dashboard` will be `dashboardAPI`, `iam` will be `iamAPI` and so on. -### 3. Add the output information +### 3. Add your new client to the generation script Open [generate-rtk-apis.ts](scripts/generate-rtk-apis.ts) and add the following information: @@ -54,7 +54,6 @@ Open [generate-rtk-apis.ts](scripts/generate-rtk-apis.ts) and add the following | outputFile name | File that will be created after running the API Client Generation script. It is the key of the object. | | apiFile | File with the group's API definition. | | schemaFile | File with the schema that was automatically created in the second step. Although it is in openapi_snapshots, you should link the one saved in `data/openapi`. | -| apiImport | Function name exported in the API definition (baseAPI.ts file). | | filterEndpoints | The `operationId` of the particular route you want to work with. You can check the available operationIds in the specific group's spec file. As seen in the `migrate-to-cloud` one, it is an array | |  tag | Must be set to `true`, to automatically attach tags to endpoints. This is needed for proper cache invalidation. See more info in the [official documentation](https://redux-toolkit.js.org/rtk-query/usage/automated-refetching#:~:text=RTK%20Query%20uses,an%20active%20subscription.).  | @@ -65,16 +64,15 @@ Open [generate-rtk-apis.ts](scripts/generate-rtk-apis.ts) and add the following In our example, the information added will be: ```jsx -'../public/app/features/dashboard/api/endpoints.gen.ts': { - apiFile: '../public/app/features/dashboard/api/baseAPI.ts', +'../public/app/api/clients/dashboard/endpoints.gen.ts': { + apiFile: '../public/app/api/clients/dashboard/baseAPI.ts', schemaFile: '../data/openapi/dashboard.grafana.app-v0alpha1.json', - apiImport: 'baseAPI', filterEndpoints: ['createDashboard', 'updateDashboard'], tag: true, }, ``` -### 4. Run the API Client script +### 4. Run the API client generation script Then, we are ready to run the script to create the API client: @@ -100,7 +98,7 @@ export { type Dashboard } from './endpoints.gen'; ``` -There are some use cases where the hook will not work, and that is a clue to see if it needs to be modified. The hooks can be tweaked by using `enhanceEndpoints`. +There are some use cases where the hook will not work out of the box, and that is a clue to see if it needs to be modified. The hooks can be tweaked by using `enhanceEndpoints`. ```jsx export const dashboardsAPI = generatedApi.enhanceEndpoints({ From 4236ac3423349568e12ee40636adcc41bab22644 Mon Sep 17 00:00:00 2001 From: Alex Khomenko Date: Fri, 14 Mar 2025 19:31:58 +0200 Subject: [PATCH 008/115] Provisioning: Update API imports (#102226) * Update API * Format --- .../provisioning.grafana.app-v0alpha1.json | 4 ++++ public/app/api/clients/provisioning/endpoints.gen.ts | 4 ++++ public/app/features/provisioning/dashboardLoader.ts | 2 +- .../hooks/useCreateOrUpdateRepository.ts | 2 +- .../hooks/useCreateOrUpdateRepositoryFile.ts | 2 +- .../provisioning/hooks/useIsProvisionedInstance.ts | 3 ++- .../provisioning/hooks/useIsProvisionedNG.ts | 2 +- .../features/provisioning/hooks/useRepositoryJobs.ts | 2 +- .../features/provisioning/hooks/useRepositoryList.ts | 2 +- .../features/provisioning/utils/checkSyncSettings.ts | 2 +- public/app/features/provisioning/utils/data.ts | 3 ++- public/app/features/provisioning/utils/git.ts | 12 ++++++++++++ 12 files changed, 31 insertions(+), 9 deletions(-) diff --git a/pkg/tests/apis/openapi_snapshots/provisioning.grafana.app-v0alpha1.json b/pkg/tests/apis/openapi_snapshots/provisioning.grafana.app-v0alpha1.json index 7e305e99568..d74ca23d0be 100644 --- a/pkg/tests/apis/openapi_snapshots/provisioning.grafana.app-v0alpha1.json +++ b/pkg/tests/apis/openapi_snapshots/provisioning.grafana.app-v0alpha1.json @@ -2644,6 +2644,10 @@ "description": "Whether we should show dashboard previews for pull requests. By default, this is false (i.e. we will not create previews).", "type": "boolean" }, + "path": { + "description": "Path is the subdirectory for the Grafana data. If specified, Grafana will ignore anything that is outside this directory in the repository. This is usually something like `grafana/`. Trailing and leading slash are not required. They are always added when needed. The path is relative to the root of the repository, regardless of the leading slash.\n\nWhen specifying something like `grafana-`, we will not look for `grafana-*`; we will only look for files under the directory `/grafana-/`. That means `/grafana-example.json` would not be found.", + "type": "string" + }, "token": { "description": "Token for accessing the repository. If set, it will be encrypted into encryptedToken, then set to an empty string again.", "type": "string" diff --git a/public/app/api/clients/provisioning/endpoints.gen.ts b/public/app/api/clients/provisioning/endpoints.gen.ts index c614724dbe2..8f22200d13f 100644 --- a/public/app/api/clients/provisioning/endpoints.gen.ts +++ b/public/app/api/clients/provisioning/endpoints.gen.ts @@ -857,6 +857,10 @@ export type GitHubRepositoryConfig = { encryptedToken?: string; /** Whether we should show dashboard previews for pull requests. By default, this is false (i.e. we will not create previews). */ generateDashboardPreviews?: boolean; + /** Path is the subdirectory for the Grafana data. If specified, Grafana will ignore anything that is outside this directory in the repository. This is usually something like `grafana/`. Trailing and leading slash are not required. They are always added when needed. The path is relative to the root of the repository, regardless of the leading slash. + + When specifying something like `grafana-`, we will not look for `grafana-*`; we will only look for files under the directory `/grafana-/`. That means `/grafana-example.json` would not be found. */ + path?: string; /** Token for accessing the repository. If set, it will be encrypted into encryptedToken, then set to an empty string again. */ token?: string; /** The repository URL (e.g. `https://github.com/example/test`). */ diff --git a/public/app/features/provisioning/dashboardLoader.ts b/public/app/features/provisioning/dashboardLoader.ts index b75c691067b..68bf3c11246 100644 --- a/public/app/features/provisioning/dashboardLoader.ts +++ b/public/app/features/provisioning/dashboardLoader.ts @@ -1,7 +1,7 @@ import { getBackendSrv } from '@grafana/runtime'; +import { BASE_URL } from 'app/api/clients/provisioning/baseAPI'; import { DashboardDTO } from 'app/types'; -import { BASE_URL } from '../../api/clients/provisioning/baseAPI'; import { AnnoKeyManagerIdentity, AnnoKeyManagerKind, AnnoKeySourcePath } from '../apiserver/types'; /** diff --git a/public/app/features/provisioning/hooks/useCreateOrUpdateRepository.ts b/public/app/features/provisioning/hooks/useCreateOrUpdateRepository.ts index b25f53003c3..16ffb82d5ca 100644 --- a/public/app/features/provisioning/hooks/useCreateOrUpdateRepository.ts +++ b/public/app/features/provisioning/hooks/useCreateOrUpdateRepository.ts @@ -4,7 +4,7 @@ import { RepositorySpec, useCreateRepositoryMutation, useReplaceRepositoryMutation, -} from '../../../api/clients/provisioning'; +} from 'app/api/clients/provisioning'; export function useCreateOrUpdateRepository(name?: string) { const [create, createRequest] = useCreateRepositoryMutation(); diff --git a/public/app/features/provisioning/hooks/useCreateOrUpdateRepositoryFile.ts b/public/app/features/provisioning/hooks/useCreateOrUpdateRepositoryFile.ts index b7cc98380d3..4d26b1bdb5f 100644 --- a/public/app/features/provisioning/hooks/useCreateOrUpdateRepositoryFile.ts +++ b/public/app/features/provisioning/hooks/useCreateOrUpdateRepositoryFile.ts @@ -4,7 +4,7 @@ import { ReplaceRepositoryFilesWithPathApiArg, useCreateRepositoryFilesWithPathMutation, useReplaceRepositoryFilesWithPathMutation, -} from '../../../api/clients/provisioning'; +} from 'app/api/clients/provisioning'; export function useCreateOrUpdateRepositoryFile(name?: string) { const [create, createRequest] = useCreateRepositoryFilesWithPathMutation(); diff --git a/public/app/features/provisioning/hooks/useIsProvisionedInstance.ts b/public/app/features/provisioning/hooks/useIsProvisionedInstance.ts index 3de98a2c935..5526ee759b5 100644 --- a/public/app/features/provisioning/hooks/useIsProvisionedInstance.ts +++ b/public/app/features/provisioning/hooks/useIsProvisionedInstance.ts @@ -1,6 +1,7 @@ import { skipToken } from '@reduxjs/toolkit/query'; -import { RepositoryViewList, useGetFrontendSettingsQuery } from '../../../api/clients/provisioning'; +import { RepositoryViewList, useGetFrontendSettingsQuery } from 'app/api/clients/provisioning'; + import { checkSyncSettings } from '../utils/checkSyncSettings'; export function useIsProvisionedInstance(settings?: RepositoryViewList) { diff --git a/public/app/features/provisioning/hooks/useIsProvisionedNG.ts b/public/app/features/provisioning/hooks/useIsProvisionedNG.ts index cacd1be26d3..9b5ee9737f9 100644 --- a/public/app/features/provisioning/hooks/useIsProvisionedNG.ts +++ b/public/app/features/provisioning/hooks/useIsProvisionedNG.ts @@ -1,6 +1,6 @@ +import { useGetFrontendSettingsQuery } from 'app/api/clients/provisioning'; import { useUrlParams } from 'app/core/navigation/hooks'; -import { useGetFrontendSettingsQuery } from '../../../api/clients/provisioning'; import { DashboardScene } from '../../dashboard-scene/scene/DashboardScene'; import { useGetResourceRepository } from './useGetResourceRepository'; diff --git a/public/app/features/provisioning/hooks/useRepositoryJobs.ts b/public/app/features/provisioning/hooks/useRepositoryJobs.ts index affdfc6a87d..1afeeccc29a 100644 --- a/public/app/features/provisioning/hooks/useRepositoryJobs.ts +++ b/public/app/features/provisioning/hooks/useRepositoryJobs.ts @@ -1,6 +1,6 @@ import { skipToken } from '@reduxjs/toolkit/query/react'; -import { Job, useListJobQuery } from '../../../api/clients/provisioning'; +import { Job, useListJobQuery } from 'app/api/clients/provisioning'; interface RepositoryJobsArgs { name?: string; diff --git a/public/app/features/provisioning/hooks/useRepositoryList.ts b/public/app/features/provisioning/hooks/useRepositoryList.ts index e4622c2f2bb..cd191c392f4 100644 --- a/public/app/features/provisioning/hooks/useRepositoryList.ts +++ b/public/app/features/provisioning/hooks/useRepositoryList.ts @@ -1,6 +1,6 @@ import { skipToken } from '@reduxjs/toolkit/query'; -import { ListRepositoryApiArg, Repository, useListRepositoryQuery } from '../../../api/clients/provisioning'; +import { ListRepositoryApiArg, Repository, useListRepositoryQuery } from 'app/api/clients/provisioning'; // Sort repositories alphabetically by title export function useRepositoryList( diff --git a/public/app/features/provisioning/utils/checkSyncSettings.ts b/public/app/features/provisioning/utils/checkSyncSettings.ts index 40f07afd6ea..f7b4fe7b5f1 100644 --- a/public/app/features/provisioning/utils/checkSyncSettings.ts +++ b/public/app/features/provisioning/utils/checkSyncSettings.ts @@ -1,4 +1,4 @@ -import { RepositoryViewList } from '../../../api/clients/provisioning'; +import { RepositoryViewList } from 'app/api/clients/provisioning'; export function checkSyncSettings(settings?: RepositoryViewList): [boolean, boolean] { if (!settings?.items?.length) { diff --git a/public/app/features/provisioning/utils/data.ts b/public/app/features/provisioning/utils/data.ts index 13e4910df9e..35aed2955a8 100644 --- a/public/app/features/provisioning/utils/data.ts +++ b/public/app/features/provisioning/utils/data.ts @@ -1,4 +1,5 @@ -import { RepositorySpec } from '../../../api/clients/provisioning'; +import { RepositorySpec } from 'app/api/clients/provisioning'; + import { RepositoryFormData } from '../types'; export const dataToSpec = (data: RepositoryFormData): RepositorySpec => { diff --git a/public/app/features/provisioning/utils/git.ts b/public/app/features/provisioning/utils/git.ts index c6e8ebb4f62..c52087a4ca1 100644 --- a/public/app/features/provisioning/utils/git.ts +++ b/public/app/features/provisioning/utils/git.ts @@ -1,3 +1,5 @@ +import { RepositorySpec } from 'app/api/clients/provisioning'; + /** * Validates a Git branch name according to the following rules: * 1. The branch name cannot start with `/`, end with `/`, `.`, or whitespace. @@ -12,3 +14,13 @@ export function validateBranchName(branchName?: string) { return branchName && branchNameRegex.test(branchName!); } + +export const getRepoHref = (github?: RepositorySpec['github']) => { + if (!github?.url) { + return undefined; + } + if (!github.branch) { + return github.url; + } + return `${github.url}/tree/${github.branch}`; +}; From f1f544ec5b147f737c4fb7c0a8b3c909ad907e3f Mon Sep 17 00:00:00 2001 From: Alex Khomenko Date: Fri, 14 Mar 2025 19:49:17 +0200 Subject: [PATCH 009/115] BrowseDashboards: Switch to list view if sort is set (#102196) --- public/app/features/search/state/SearchStateManager.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/app/features/search/state/SearchStateManager.ts b/public/app/features/search/state/SearchStateManager.ts index 67dd5c93e5f..525ccefcb04 100644 --- a/public/app/features/search/state/SearchStateManager.ts +++ b/public/app/features/search/state/SearchStateManager.ts @@ -171,6 +171,8 @@ export class SearchStateManager extends StateManagerBase { onSortChange = (sort: string | undefined) => { if (sort) { localStorage.setItem(SEARCH_SELECTED_SORT, sort); + // Switch to list view if sort is set to preserve sort order when navigating back + localStorage.setItem(SEARCH_SELECTED_LAYOUT, SearchLayout.List); } else { localStorage.removeItem(SEARCH_SELECTED_SORT); } From e30034a42a7923f422f889f25bb6aff8a0e050f1 Mon Sep 17 00:00:00 2001 From: Yuri Tseretyan Date: Fri, 14 Mar 2025 14:51:58 -0400 Subject: [PATCH 010/115] Alerting: Remove feature flag `alertingNoDataErrorExecution` (#102156) * remove feature flag * remove feature flag in state manager * make sure no data with empty results is handled Signed-off-by: Yuri Tseretyan --------- Signed-off-by: Yuri Tseretyan --- .../feature-toggles/index.md | 1 - .../src/types/featureToggles.gen.ts | 1 - pkg/services/featuremgmt/registry.go | 9 - pkg/services/featuremgmt/toggles_gen.csv | 1 - pkg/services/featuremgmt/toggles_gen.go | 4 - pkg/services/featuremgmt/toggles_gen.json | 1 + pkg/services/ngalert/ngalert.go | 27 +- pkg/services/ngalert/state/manager.go | 58 +- .../ngalert/state/manager_private_test.go | 732 +----------------- pkg/services/ngalert/state/manager_test.go | 412 ---------- 10 files changed, 49 insertions(+), 1197 deletions(-) diff --git a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md index 8691417c8b7..c5210a70273 100644 --- a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md +++ b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md @@ -39,7 +39,6 @@ Most [generally available](https://grafana.com/docs/release-life-cycle/#general- | `transformationsRedesign` | Enables the transformations redesign | Yes | | `traceQLStreaming` | Enables response streaming of TraceQL queries of the Tempo data source | | | `awsAsyncQueryCaching` | Enable caching for async queries for Redshift and Athena. Requires that the datasource has caching and async query support enabled | Yes | -| `alertingNoDataErrorExecution` | Changes how Alerting state manager handles execution of NoData/Error | Yes | | `angularDeprecationUI` | Display Angular warnings in dashboards and panels | Yes | | `dashgpt` | Enable AI powered features in dashboards | Yes | | `alertingInsights` | Show the new alerting insights landing page | Yes | diff --git a/packages/grafana-data/src/types/featureToggles.gen.ts b/packages/grafana-data/src/types/featureToggles.gen.ts index 39299b42166..033b7c30e05 100644 --- a/packages/grafana-data/src/types/featureToggles.gen.ts +++ b/packages/grafana-data/src/types/featureToggles.gen.ts @@ -86,7 +86,6 @@ export interface FeatureToggles { awsAsyncQueryCaching?: boolean; permissionsFilterRemoveSubquery?: boolean; configurableSchedulerTick?: boolean; - alertingNoDataErrorExecution?: boolean; angularDeprecationUI?: boolean; dashgpt?: boolean; aiGeneratedDashboardChanges?: boolean; diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index a05f3956e1b..1ef6f4bef32 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -508,15 +508,6 @@ var ( RequiresRestart: true, HideFromDocs: true, }, - { - Name: "alertingNoDataErrorExecution", - Description: "Changes how Alerting state manager handles execution of NoData/Error", - Stage: FeatureStageGeneralAvailability, - FrontendOnly: false, - Owner: grafanaAlertingSquad, - RequiresRestart: true, - Expression: "true", // enabled by default - }, { Name: "angularDeprecationUI", Description: "Display Angular warnings in dashboards and panels", diff --git a/pkg/services/featuremgmt/toggles_gen.csv b/pkg/services/featuremgmt/toggles_gen.csv index c3e15a6d655..84efa8a1ad1 100644 --- a/pkg/services/featuremgmt/toggles_gen.csv +++ b/pkg/services/featuremgmt/toggles_gen.csv @@ -67,7 +67,6 @@ featureToggleAdminPage,experimental,@grafana/grafana-operator-experience-squad,f awsAsyncQueryCaching,GA,@grafana/aws-datasources,false,false,false permissionsFilterRemoveSubquery,experimental,@grafana/grafana-backend-group,false,false,false configurableSchedulerTick,experimental,@grafana/alerting-squad,false,true,false -alertingNoDataErrorExecution,GA,@grafana/alerting-squad,false,true,false angularDeprecationUI,GA,@grafana/plugins-platform-backend,false,false,true dashgpt,GA,@grafana/dashboards-squad,false,false,true aiGeneratedDashboardChanges,experimental,@grafana/dashboards-squad,false,false,true diff --git a/pkg/services/featuremgmt/toggles_gen.go b/pkg/services/featuremgmt/toggles_gen.go index 67ed9660c83..3fcc06d9d94 100644 --- a/pkg/services/featuremgmt/toggles_gen.go +++ b/pkg/services/featuremgmt/toggles_gen.go @@ -279,10 +279,6 @@ const ( // Enable changing the scheduler base interval via configuration option unified_alerting.scheduler_tick_interval FlagConfigurableSchedulerTick = "configurableSchedulerTick" - // FlagAlertingNoDataErrorExecution - // Changes how Alerting state manager handles execution of NoData/Error - FlagAlertingNoDataErrorExecution = "alertingNoDataErrorExecution" - // FlagAngularDeprecationUI // Display Angular warnings in dashboards and panels FlagAngularDeprecationUI = "angularDeprecationUI" diff --git a/pkg/services/featuremgmt/toggles_gen.json b/pkg/services/featuremgmt/toggles_gen.json index 69911d2e36c..1564aeeec0b 100644 --- a/pkg/services/featuremgmt/toggles_gen.json +++ b/pkg/services/featuremgmt/toggles_gen.json @@ -342,6 +342,7 @@ "name": "alertingNoDataErrorExecution", "resourceVersion": "1720021873452", "creationTimestamp": "2023-08-15T14:27:15Z", + "deletionTimestamp": "2025-03-13T19:16:25Z", "annotations": { "grafana.app/updatedTimestamp": "2024-07-03 15:51:13.452477 +0000 UTC" } diff --git a/pkg/services/ngalert/ngalert.go b/pkg/services/ngalert/ngalert.go index 690c58c291b..a01a3913752 100644 --- a/pkg/services/ngalert/ngalert.go +++ b/pkg/services/ngalert/ngalert.go @@ -409,20 +409,19 @@ func (ng *AlertNG) init() error { ng.InstanceStore, ng.StartupInstanceReader = initInstanceStore(ng.store.SQLStore, ng.Log, ng.FeatureToggles) stateManagerCfg := state.ManagerCfg{ - Metrics: ng.Metrics.GetStateMetrics(), - ExternalURL: appUrl, - DisableExecution: !ng.Cfg.UnifiedAlerting.ExecuteAlerts, - InstanceStore: ng.InstanceStore, - Images: ng.ImageService, - Clock: clk, - Historian: history, - ApplyNoDataAndErrorToAllStates: ng.FeatureToggles.IsEnabledGlobally(featuremgmt.FlagAlertingNoDataErrorExecution), - MaxStateSaveConcurrency: ng.Cfg.UnifiedAlerting.MaxStateSaveConcurrency, - StatePeriodicSaveBatchSize: ng.Cfg.UnifiedAlerting.StatePeriodicSaveBatchSize, - RulesPerRuleGroupLimit: ng.Cfg.UnifiedAlerting.RulesPerRuleGroupLimit, - Tracer: ng.tracer, - Log: log.New("ngalert.state.manager"), - ResolvedRetention: ng.Cfg.UnifiedAlerting.ResolvedAlertRetention, + Metrics: ng.Metrics.GetStateMetrics(), + ExternalURL: appUrl, + DisableExecution: !ng.Cfg.UnifiedAlerting.ExecuteAlerts, + InstanceStore: ng.InstanceStore, + Images: ng.ImageService, + Clock: clk, + Historian: history, + MaxStateSaveConcurrency: ng.Cfg.UnifiedAlerting.MaxStateSaveConcurrency, + StatePeriodicSaveBatchSize: ng.Cfg.UnifiedAlerting.StatePeriodicSaveBatchSize, + RulesPerRuleGroupLimit: ng.Cfg.UnifiedAlerting.RulesPerRuleGroupLimit, + Tracer: ng.tracer, + Log: log.New("ngalert.state.manager"), + ResolvedRetention: ng.Cfg.UnifiedAlerting.ResolvedAlertRetention, } statePersister := initStatePersister(ng.Cfg.UnifiedAlerting, stateManagerCfg, ng.FeatureToggles) stateManager := state.NewManager(stateManagerCfg, statePersister) diff --git a/pkg/services/ngalert/state/manager.go b/pkg/services/ngalert/state/manager.go index e23d3bce143..d45290b887a 100644 --- a/pkg/services/ngalert/state/manager.go +++ b/pkg/services/ngalert/state/manager.go @@ -55,8 +55,7 @@ type Manager struct { historian Historian externalURL *url.URL - applyNoDataAndErrorToAllStates bool - rulesPerRuleGroupLimit int64 + rulesPerRuleGroupLimit int64 persister StatePersister } @@ -73,10 +72,8 @@ type ManagerCfg struct { // StatePeriodicSaveBatchSize controls the size of the alert instance batch that is saved periodically when the // alertingSaveStatePeriodic feature flag is enabled. StatePeriodicSaveBatchSize int - // ApplyNoDataAndErrorToAllStates makes state manager to apply exceptional results (NoData and Error) - // to all states when corresponding execution in the rule definition is set to either `Alerting` or `OK` - ApplyNoDataAndErrorToAllStates bool - RulesPerRuleGroupLimit int64 + + RulesPerRuleGroupLimit int64 DisableExecution bool @@ -96,24 +93,19 @@ func NewManager(cfg ManagerCfg, statePersister StatePersister) *Manager { } m := &Manager{ - cache: c, - ResendDelay: ResendDelay, // TODO: make this configurable - ResolvedRetention: cfg.ResolvedRetention, - log: cfg.Log, - metrics: cfg.Metrics, - instanceStore: cfg.InstanceStore, - images: cfg.Images, - historian: cfg.Historian, - clock: cfg.Clock, - externalURL: cfg.ExternalURL, - applyNoDataAndErrorToAllStates: cfg.ApplyNoDataAndErrorToAllStates, - rulesPerRuleGroupLimit: cfg.RulesPerRuleGroupLimit, - persister: statePersister, - tracer: cfg.Tracer, - } - - if m.applyNoDataAndErrorToAllStates { - m.log.Info("Running in alternative execution of Error/NoData mode") + cache: c, + ResendDelay: ResendDelay, // TODO: make this configurable + ResolvedRetention: cfg.ResolvedRetention, + log: cfg.Log, + metrics: cfg.Metrics, + instanceStore: cfg.InstanceStore, + images: cfg.Images, + historian: cfg.Historian, + clock: cfg.Clock, + externalURL: cfg.ExternalURL, + rulesPerRuleGroupLimit: cfg.RulesPerRuleGroupLimit, + persister: statePersister, + tracer: cfg.Tracer, } return m @@ -358,7 +350,7 @@ func (st *Manager) ProcessEvalResults( } logger.Debug("State manager processing evaluation results", "resultCount", len(results)) - states := st.setNextStateForRule(ctx, alertRule, results, extraLabels, logger, fn) + states := st.setNextStateForRule(ctx, alertRule, results, extraLabels, logger, fn, evaluatedAt) staleStates := st.deleteStaleStatesFromCache(logger, evaluatedAt, alertRule, fn) span.AddEvent("results processed", trace.WithAttributes( @@ -402,8 +394,8 @@ func (st *Manager) updateLastSentAt(states StateTransitions, evaluatedAt time.Ti return result } -func (st *Manager) setNextStateForRule(ctx context.Context, alertRule *ngModels.AlertRule, results eval.Results, extraLabels data.Labels, logger log.Logger, takeImageFn takeImageFn) []StateTransition { - if st.applyNoDataAndErrorToAllStates && results.IsNoData() && (alertRule.NoDataState == ngModels.Alerting || alertRule.NoDataState == ngModels.OK || alertRule.NoDataState == ngModels.KeepLast) { // If it is no data, check the mapping and switch all results to the new state +func (st *Manager) setNextStateForRule(ctx context.Context, alertRule *ngModels.AlertRule, results eval.Results, extraLabels data.Labels, logger log.Logger, takeImageFn takeImageFn, now time.Time) []StateTransition { + if results.IsNoData() && (alertRule.NoDataState == ngModels.Alerting || alertRule.NoDataState == ngModels.OK || alertRule.NoDataState == ngModels.KeepLast) { // If it is no data, check the mapping and switch all results to the new state // aggregate UID of datasources that returned NoData into one and provide as auxiliary info via annotationa. See: https://github.com/grafana/grafana/issues/88184 var refIds strings.Builder var datasourceUIDs strings.Builder @@ -430,12 +422,20 @@ func (st *Manager) setNextStateForRule(ctx context.Context, alertRule *ngModels. "datasource_uid": datasourceUIDs.String(), "ref_id": refIds.String(), } - transitions := st.setNextStateForAll(alertRule, results[0], logger, annotations, takeImageFn) + result := eval.Result{ + Instance: data.Labels{}, + State: eval.NoData, + EvaluatedAt: now, + } + if len(results) > 0 { + result = results[0] + } + transitions := st.setNextStateForAll(alertRule, result, logger, annotations, takeImageFn) if len(transitions) > 0 { return transitions // if there are no current states for the rule. Create ones for each result } } - if st.applyNoDataAndErrorToAllStates && results.IsError() && (alertRule.ExecErrState == ngModels.AlertingErrState || alertRule.ExecErrState == ngModels.OkErrState || alertRule.ExecErrState == ngModels.KeepLastErrState) { + if results.IsError() && (alertRule.ExecErrState == ngModels.AlertingErrState || alertRule.ExecErrState == ngModels.OkErrState || alertRule.ExecErrState == ngModels.KeepLastErrState) { // TODO squash all errors into one, and provide as annotation transitions := st.setNextStateForAll(alertRule, results[0], logger, nil, takeImageFn) if len(transitions) > 0 { diff --git a/pkg/services/ngalert/state/manager_private_test.go b/pkg/services/ngalert/state/manager_private_test.go index 42fcddf41a3..0c4a9d6635c 100644 --- a/pkg/services/ngalert/state/manager_private_test.go +++ b/pkg/services/ngalert/state/manager_private_test.go @@ -293,7 +293,7 @@ func TestProcessEvalResults_StateTransitions(t *testing.T) { } } - executeTest := func(t *testing.T, alertRule *ngmodels.AlertRule, resultsAtTime map[time.Time]eval.Results, expectedTransitionsAtTime map[time.Time][]StateTransition, applyNoDataErrorToAllStates bool) { + executeTest := func(t *testing.T, alertRule *ngmodels.AlertRule, resultsAtTime map[time.Time]eval.Results, expectedTransitionsAtTime map[time.Time][]StateTransition) { clk := clock.NewMock() testMetrics := metrics.NewNGAlert(prometheus.NewPedanticRegistry()).GetStateMetrics() @@ -306,8 +306,6 @@ func TestProcessEvalResults_StateTransitions(t *testing.T) { Images: &NotAvailableImageService{}, Clock: clk, Historian: &FakeHistorian{}, - - ApplyNoDataAndErrorToAllStates: applyNoDataErrorToAllStates, } st := NewManager(cfg, NewNoopPersister()) @@ -1114,12 +1112,7 @@ func TestProcessEvalResults_StateTransitions(t *testing.T) { for _, tc := range testCases { t.Run(tc.desc, func(t *testing.T) { - t.Run("applyNoDataErrorToAllStates=true", func(t *testing.T) { - executeTest(t, tc.alertRule, tc.results, tc.expectedTransitions, true) - }) - t.Run("applyNoDataErrorToAllStates=false", func(t *testing.T) { - executeTest(t, tc.alertRule, tc.results, tc.expectedTransitions, false) - }) + executeTest(t, tc.alertRule, tc.results, tc.expectedTransitions) }) } @@ -1136,8 +1129,6 @@ func TestProcessEvalResults_StateTransitions(t *testing.T) { ruleMutators []ngmodels.AlertRuleMutator results map[time.Time]eval.Results expectedTransitions map[ngmodels.NoDataState]map[time.Time][]StateTransition - - expectedTransitionsApplyNoDataErrorToAllStates map[ngmodels.NoDataState]map[time.Time][]StateTransition } executeForEachRule := func(t *testing.T, tc noDataTestCase) { @@ -1148,25 +1139,11 @@ func TestProcessEvalResults_StateTransitions(t *testing.T) { r = ngmodels.CopyRule(r, tc.ruleMutators...) } t.Run(fmt.Sprintf("execute as %s", stateExec), func(t *testing.T) { - expectedTransitions, ok := tc.expectedTransitionsApplyNoDataErrorToAllStates[stateExec] - overridden := "[*]" - if !ok { - expectedTransitions, ok = tc.expectedTransitions[stateExec] - overridden = "" - } + expectedTransitions, ok := tc.expectedTransitions[stateExec] if !ok { require.Fail(t, "no expected state transitions") } - t.Run("applyNoDataErrorToAllStates=true"+overridden, func(t *testing.T) { - executeTest(t, r, tc.results, expectedTransitions, true) - }) - t.Run("applyNoDataErrorToAllStates=false", func(t *testing.T) { - expectedTransitions, ok := tc.expectedTransitions[stateExec] - if !ok { - require.Fail(t, "no expected state transitions") - } - executeTest(t, r, tc.results, expectedTransitions, false) - }) + executeTest(t, r, tc.results, expectedTransitions) }) } } @@ -1279,59 +1256,6 @@ func TestProcessEvalResults_StateTransitions(t *testing.T) { }, }, }, - ngmodels.Alerting: { - t2: { - { - PreviousState: eval.Normal, - State: &State{ - Labels: labels["system + rule + no-data"], - State: eval.Alerting, - StateReason: eval.NoData.String(), - LatestResult: newEvaluationWithValues(t2, eval.NoData, map[string]float64{}), - StartsAt: t2, - EndsAt: t2.Add(ResendDelay * 4), - LastEvaluationTime: t2, - LastSentAt: &t2, - Values: map[string]float64{}, - }, - }, - }, - }, - ngmodels.OK: { - t2: { - { - PreviousState: eval.Normal, - State: &State{ - Labels: labels["system + rule + no-data"], - State: eval.Normal, - StateReason: eval.NoData.String(), - LatestResult: newEvaluationWithValues(t2, eval.NoData, map[string]float64{}), - StartsAt: t2, - EndsAt: t2, - LastEvaluationTime: t2, - Values: map[string]float64{}, - }, - }, - }, - }, - ngmodels.KeepLast: { - t2: { - { - PreviousState: eval.Normal, - State: &State{ - Labels: labels["system + rule + no-data"], - State: eval.Normal, - StateReason: ngmodels.ConcatReasons(eval.NoData.String(), ngmodels.StateReasonKeepLast), - LatestResult: newEvaluation(t2, eval.NoData), - StartsAt: t2, - EndsAt: t2, - LastEvaluationTime: t2, - }, - }, - }, - }, - }, - expectedTransitionsApplyNoDataErrorToAllStates: map[ngmodels.NoDataState]map[time.Time][]StateTransition{ ngmodels.Alerting: { t2: { { @@ -1460,138 +1384,6 @@ func TestProcessEvalResults_StateTransitions(t *testing.T) { }, }, }, - ngmodels.Alerting: { - t3: { - { - PreviousState: eval.Normal, - State: &State{ - Labels: labels["system + rule + labels1"], - State: eval.Normal, - StateReason: ngmodels.StateReasonMissingSeries, - LatestResult: newEvaluation(t1, eval.Normal), - StartsAt: t1, - EndsAt: t3, - LastEvaluationTime: t3, - }, - }, - { - PreviousState: eval.Alerting, - State: &State{ - Labels: labels["system + rule + labels2"], - State: eval.Normal, - StateReason: ngmodels.StateReasonMissingSeries, - LatestResult: newEvaluation(t1, eval.Alerting), - StartsAt: t1, - EndsAt: t3, - LastEvaluationTime: t3, - ResolvedAt: &t3, - LastSentAt: &t3, - }, - }, - { - PreviousState: eval.Alerting, - PreviousStateReason: eval.NoData.String(), - State: &State{ - Labels: labels["system + rule + no-data"], - State: eval.Alerting, - StateReason: eval.NoData.String(), - LatestResult: newEvaluation(t3, eval.NoData), - StartsAt: t2, - EndsAt: t3.Add(ResendDelay * 4), - LastEvaluationTime: t3, - LastSentAt: &t2, - }, - }, - }, - }, - ngmodels.OK: { - t3: { - { - PreviousState: eval.Normal, - State: &State{ - Labels: labels["system + rule + labels1"], - State: eval.Normal, - StateReason: ngmodels.StateReasonMissingSeries, - LatestResult: newEvaluation(t1, eval.Normal), - StartsAt: t1, - EndsAt: t3, - LastEvaluationTime: t3, - }, - }, - { - PreviousState: eval.Alerting, - State: &State{ - Labels: labels["system + rule + labels2"], - State: eval.Normal, - StateReason: ngmodels.StateReasonMissingSeries, - LatestResult: newEvaluation(t1, eval.Alerting), - StartsAt: t1, - EndsAt: t3, - LastEvaluationTime: t3, - ResolvedAt: &t3, - LastSentAt: &t3, - }, - }, - { - PreviousState: eval.Normal, - PreviousStateReason: eval.NoData.String(), - State: &State{ - Labels: labels["system + rule + no-data"], - State: eval.Normal, - StateReason: eval.NoData.String(), - LatestResult: newEvaluation(t3, eval.NoData), - StartsAt: t2, - EndsAt: t2, - LastEvaluationTime: t3, - }, - }, - }, - }, - ngmodels.KeepLast: { - t3: { - { - PreviousState: eval.Normal, - State: &State{ - Labels: labels["system + rule + labels1"], - State: eval.Normal, - StateReason: ngmodels.StateReasonMissingSeries, - LatestResult: newEvaluation(t1, eval.Normal), - StartsAt: t1, - EndsAt: t3, - LastEvaluationTime: t3, - }, - }, - { - PreviousState: eval.Alerting, - State: &State{ - Labels: labels["system + rule + labels2"], - State: eval.Normal, - StateReason: ngmodels.StateReasonMissingSeries, - LatestResult: newEvaluation(t1, eval.Alerting), - StartsAt: t1, - EndsAt: t3, - LastEvaluationTime: t3, - ResolvedAt: &t3, - LastSentAt: &t3, - }, - }, - { - PreviousState: eval.Normal, - PreviousStateReason: ngmodels.ConcatReasons(eval.NoData.String(), ngmodels.StateReasonKeepLast), - State: &State{ - Labels: labels["system + rule + no-data"], - State: eval.Normal, - StateReason: ngmodels.ConcatReasons(eval.NoData.String(), ngmodels.StateReasonKeepLast), - LatestResult: newEvaluation(t3, eval.NoData), - StartsAt: t2, - EndsAt: t2, - LastEvaluationTime: t3, - }, - }, - }, - }, - }, - expectedTransitionsApplyNoDataErrorToAllStates: map[ngmodels.NoDataState]map[time.Time][]StateTransition{ ngmodels.Alerting: { t2: { { @@ -1854,146 +1646,6 @@ func TestProcessEvalResults_StateTransitions(t *testing.T) { }, }, }, - ngmodels.Alerting: { - t2: { - { - PreviousState: eval.Normal, - State: &State{ - Labels: labels["system + rule + no-data"], - State: eval.Pending, - StateReason: eval.NoData.String(), - LatestResult: newEvaluation(t2, eval.NoData), - StartsAt: t2, - EndsAt: t2.Add(ResendDelay * 4), - LastEvaluationTime: t2, - }, - }, - }, - t3: { - { - PreviousState: eval.Normal, - State: &State{ - Labels: labels["system + rule + labels1"], - State: eval.Normal, - StateReason: ngmodels.StateReasonMissingSeries, - LatestResult: newEvaluation(t1, eval.Normal), - StartsAt: t1, - EndsAt: t3, - LastEvaluationTime: t3, - }, - }, - { - PreviousState: eval.Pending, - State: &State{ - Labels: labels["system + rule + labels2"], - State: eval.Normal, - StateReason: ngmodels.StateReasonMissingSeries, - LatestResult: newEvaluation(t1, eval.Alerting), - StartsAt: t1, - EndsAt: t3, - LastEvaluationTime: t3, - }, - }, - { - PreviousState: eval.Pending, - PreviousStateReason: eval.NoData.String(), - State: &State{ - Labels: labels["system + rule + no-data"], - State: eval.Alerting, - StateReason: eval.NoData.String(), - LatestResult: newEvaluation(t3, eval.NoData), - StartsAt: t3, - EndsAt: t3.Add(ResendDelay * 4), - LastEvaluationTime: t3, - LastSentAt: &t3, - }, - }, - }, - }, - ngmodels.OK: { - t3: { - { - PreviousState: eval.Normal, - State: &State{ - Labels: labels["system + rule + labels1"], - State: eval.Normal, - StateReason: ngmodels.StateReasonMissingSeries, - LatestResult: newEvaluation(t1, eval.Normal), - StartsAt: t1, - EndsAt: t3, - LastEvaluationTime: t3, - }, - }, - { - PreviousState: eval.Pending, - State: &State{ - Labels: labels["system + rule + labels2"], - State: eval.Normal, - StateReason: ngmodels.StateReasonMissingSeries, - LatestResult: newEvaluation(t1, eval.Alerting), - StartsAt: t1, - EndsAt: t3, - LastEvaluationTime: t3, - }, - }, - { - PreviousState: eval.Normal, - PreviousStateReason: eval.NoData.String(), - State: &State{ - Labels: labels["system + rule + no-data"], - State: eval.Normal, - StateReason: eval.NoData.String(), - LatestResult: newEvaluation(t3, eval.NoData), - StartsAt: t2, - EndsAt: t2, - LastEvaluationTime: t3, - }, - }, - }, - }, - ngmodels.KeepLast: { - t3: { - { - PreviousState: eval.Normal, - State: &State{ - Labels: labels["system + rule + labels1"], - State: eval.Normal, - StateReason: ngmodels.StateReasonMissingSeries, - LatestResult: newEvaluation(t1, eval.Normal), - StartsAt: t1, - EndsAt: t3, - LastEvaluationTime: t3, - }, - }, - { - PreviousState: eval.Pending, - State: &State{ - Labels: labels["system + rule + labels2"], - State: eval.Normal, - StateReason: ngmodels.StateReasonMissingSeries, - LatestResult: newEvaluation(t1, eval.Alerting), - StartsAt: t1, - EndsAt: t3, - LastEvaluationTime: t3, - }, - }, - { - PreviousState: eval.Normal, - PreviousStateReason: ngmodels.ConcatReasons(eval.NoData.String(), ngmodels.StateReasonKeepLast), - State: &State{ - Labels: labels["system + rule + no-data"], - State: eval.Normal, - StateReason: ngmodels.ConcatReasons(eval.NoData.String(), ngmodels.StateReasonKeepLast), - LatestResult: newEvaluation(t3, eval.NoData), - StartsAt: t2, - EndsAt: t2, - LastEvaluationTime: t3, - }, - }, - }, - }, - }, - expectedTransitionsApplyNoDataErrorToAllStates: map[ngmodels.NoDataState]map[time.Time][]StateTransition{ ngmodels.Alerting: { t2: { { @@ -2212,56 +1864,6 @@ func TestProcessEvalResults_StateTransitions(t *testing.T) { }, }, }, - ngmodels.Alerting: { - t3: { - { - PreviousState: eval.Pending, - State: &State{ - Labels: labels["system + rule + labels1"], - State: eval.Alerting, - LatestResult: newEvaluation(t3, eval.Alerting), - StartsAt: t3, - EndsAt: t3.Add(ResendDelay * 4), - LastEvaluationTime: t3, - LastSentAt: &t3, - }, - }, - }, - }, - ngmodels.OK: { - t3: { - { - PreviousState: eval.Pending, - State: &State{ - Labels: labels["system + rule + labels1"], - State: eval.Alerting, - LatestResult: newEvaluation(t3, eval.Alerting), - StartsAt: t3, - EndsAt: t3.Add(ResendDelay * 4), - LastEvaluationTime: t3, - LastSentAt: &t3, - }, - }, - }, - }, - ngmodels.KeepLast: { - t3: { - { - PreviousState: eval.Pending, - State: &State{ - Labels: labels["system + rule + labels1"], - State: eval.Alerting, - LatestResult: newEvaluation(t3, eval.Alerting), - StartsAt: t3, - EndsAt: t3.Add(ResendDelay * 4), - LastEvaluationTime: t3, - LastSentAt: &t3, - }, - }, - }, - }, - }, - expectedTransitionsApplyNoDataErrorToAllStates: map[ngmodels.NoDataState]map[time.Time][]StateTransition{ ngmodels.Alerting: { t3: { { @@ -2471,57 +2073,6 @@ func TestProcessEvalResults_StateTransitions(t *testing.T) { }, }, }, - ngmodels.Alerting: { - t2: { - { - PreviousState: eval.Normal, - State: &State{ - Labels: labels["system + rule + no-data"], - State: eval.Alerting, - StateReason: eval.NoData.String(), - LatestResult: newEvaluation(t2, eval.NoData), - StartsAt: t2, - EndsAt: t2.Add(ResendDelay * 4), - LastEvaluationTime: t2, - LastSentAt: &t2, - }, - }, - }, - }, - ngmodels.OK: { - t2: { - { - PreviousState: eval.Normal, - State: &State{ - Labels: labels["system + rule + no-data"], - State: eval.Normal, - StateReason: eval.NoData.String(), - LatestResult: newEvaluation(t2, eval.NoData), - StartsAt: t2, - EndsAt: t2, - LastEvaluationTime: t2, - }, - }, - }, - }, - ngmodels.KeepLast: { - t2: { - { - PreviousState: eval.Normal, - State: &State{ - Labels: labels["system + rule + no-data"], - State: eval.Normal, - StateReason: ngmodels.ConcatReasons(eval.NoData.String(), ngmodels.StateReasonKeepLast), - LatestResult: newEvaluation(t2, eval.NoData), - StartsAt: t2, - EndsAt: t2, - LastEvaluationTime: t2, - }, - }, - }, - }, - }, - expectedTransitionsApplyNoDataErrorToAllStates: map[ngmodels.NoDataState]map[time.Time][]StateTransition{ ngmodels.Alerting: { t2: { { @@ -2634,102 +2185,6 @@ func TestProcessEvalResults_StateTransitions(t *testing.T) { }, }, }, - ngmodels.Alerting: { - t3: { - { - PreviousState: eval.Alerting, - State: &State{ - Labels: labels["system + rule"], - State: eval.Normal, - StateReason: ngmodels.StateReasonMissingSeries, - LatestResult: newEvaluation(t1, eval.Alerting), - StartsAt: t1, - EndsAt: t3, - LastEvaluationTime: t3, - ResolvedAt: &t3, - LastSentAt: &t3, - }, - }, - { - PreviousState: eval.Alerting, - PreviousStateReason: eval.NoData.String(), - State: &State{ - Labels: labels["system + rule + no-data"], - State: eval.Alerting, - StateReason: eval.NoData.String(), - LatestResult: newEvaluation(t3, eval.NoData), - StartsAt: t2, - EndsAt: t3.Add(ResendDelay * 4), - LastEvaluationTime: t3, - LastSentAt: &t2, - }, - }, - }, - }, - ngmodels.OK: { - t3: { - { - PreviousState: eval.Alerting, - State: &State{ - Labels: labels["system + rule"], - State: eval.Normal, - StateReason: ngmodels.StateReasonMissingSeries, - LatestResult: newEvaluation(t1, eval.Alerting), - StartsAt: t1, - EndsAt: t3, - LastEvaluationTime: t3, - ResolvedAt: &t3, - LastSentAt: &t3, - }, - }, - { - PreviousState: eval.Normal, - PreviousStateReason: eval.NoData.String(), - State: &State{ - Labels: labels["system + rule + no-data"], - State: eval.Normal, - StateReason: eval.NoData.String(), - LatestResult: newEvaluation(t3, eval.NoData), - StartsAt: t2, - EndsAt: t2, - LastEvaluationTime: t3, - }, - }, - }, - }, - ngmodels.KeepLast: { - t3: { - { - PreviousState: eval.Alerting, - State: &State{ - Labels: labels["system + rule"], - State: eval.Normal, - StateReason: ngmodels.StateReasonMissingSeries, - LatestResult: newEvaluation(t1, eval.Alerting), - StartsAt: t1, - EndsAt: t3, - LastEvaluationTime: t3, - ResolvedAt: &t3, - LastSentAt: &t3, - }, - }, - { - PreviousState: eval.Normal, - PreviousStateReason: ngmodels.ConcatReasons(eval.NoData.String(), ngmodels.StateReasonKeepLast), - State: &State{ - Labels: labels["system + rule + no-data"], - State: eval.Normal, - StateReason: ngmodels.ConcatReasons(eval.NoData.String(), ngmodels.StateReasonKeepLast), - LatestResult: newEvaluation(t3, eval.NoData), - StartsAt: t2, - EndsAt: t2, - LastEvaluationTime: t3, - }, - }, - }, - }, - }, - expectedTransitionsApplyNoDataErrorToAllStates: map[ngmodels.NoDataState]map[time.Time][]StateTransition{ ngmodels.Alerting: { t2: { { @@ -2884,56 +2339,6 @@ func TestProcessEvalResults_StateTransitions(t *testing.T) { }, }, }, - ngmodels.Alerting: { - t3: { - { - PreviousState: eval.Pending, - State: &State{ - Labels: labels["system + rule"], - State: eval.Alerting, - LatestResult: newEvaluation(t3, eval.Alerting), - StartsAt: t3, - EndsAt: t3.Add(ResendDelay * 4), - LastEvaluationTime: t3, - LastSentAt: &t3, - }, - }, - }, - }, - ngmodels.OK: { - t3: { - { - PreviousState: eval.Pending, - State: &State{ - Labels: labels["system + rule"], - State: eval.Alerting, - LatestResult: newEvaluation(t3, eval.Alerting), - StartsAt: t3, - EndsAt: t3.Add(ResendDelay * 4), - LastEvaluationTime: t3, - LastSentAt: &t3, - }, - }, - }, - }, - ngmodels.KeepLast: { - t3: { - { - PreviousState: eval.Pending, - State: &State{ - Labels: labels["system + rule"], - State: eval.Alerting, - LatestResult: newEvaluation(t3, eval.Alerting), - StartsAt: t3, - EndsAt: t3.Add(ResendDelay * 4), - LastEvaluationTime: t3, - LastSentAt: &t3, - }, - }, - }, - }, - }, - expectedTransitionsApplyNoDataErrorToAllStates: map[ngmodels.NoDataState]map[time.Time][]StateTransition{ ngmodels.Alerting: { t2: { { @@ -3053,8 +2458,6 @@ func TestProcessEvalResults_StateTransitions(t *testing.T) { ruleMutators []ngmodels.AlertRuleMutator results map[time.Time]eval.Results expectedTransitions map[ngmodels.ExecutionErrorState]map[time.Time][]StateTransition - - expectedTransitionsApplyNoDataErrorToAllStates map[ngmodels.ExecutionErrorState]map[time.Time][]StateTransition } executeForEachRule := func(t *testing.T, tc errorTestCase) { @@ -3065,25 +2468,11 @@ func TestProcessEvalResults_StateTransitions(t *testing.T) { r = ngmodels.CopyRule(r, tc.ruleMutators...) } t.Run(fmt.Sprintf("execute as %s", stateExec), func(t *testing.T) { - expectedTransitions, ok := tc.expectedTransitionsApplyNoDataErrorToAllStates[stateExec] - overridden := "[*]" - if !ok { - expectedTransitions, ok = tc.expectedTransitions[stateExec] - overridden = "" - } + expectedTransitions, ok := tc.expectedTransitions[stateExec] if !ok { require.Fail(t, "no expected state transitions") } - t.Run("applyNoDataErrorToAllStates=true"+overridden, func(t *testing.T) { - executeTest(t, r, tc.results, expectedTransitions, true) - }) - t.Run("applyNoDataErrorToAllStates=false", func(t *testing.T) { - expectedTransitions, ok := tc.expectedTransitions[stateExec] - if !ok { - require.Fail(t, "no expected state transitions") - } - executeTest(t, r, tc.results, expectedTransitions, false) - }) + executeTest(t, r, tc.results, expectedTransitions) }) } } @@ -3287,60 +2676,6 @@ func TestProcessEvalResults_StateTransitions(t *testing.T) { }, }, }, - ngmodels.AlertingErrState: { - t2: { - { - PreviousState: eval.Normal, - State: &State{ - Labels: labels["system + rule"], - State: eval.Pending, - StateReason: eval.Error.String(), - Error: datasourceError, - Annotations: datasourceErrorAnnotations, - LatestResult: newEvaluation(t2, eval.Error), - StartsAt: t2, - EndsAt: t2.Add(ResendDelay * 4), - LastEvaluationTime: t2, - }, - }, - }, - }, - ngmodels.OkErrState: { - t2: { - { - PreviousState: eval.Normal, - State: &State{ - Labels: labels["system + rule"], - State: eval.Normal, - StateReason: eval.Error.String(), - LatestResult: newEvaluation(t2, eval.Error), - Annotations: datasourceErrorAnnotations, - StartsAt: t2, - EndsAt: t2, - LastEvaluationTime: t2, - }, - }, - }, - }, - ngmodels.KeepLastErrState: { - t2: { - { - PreviousState: eval.Normal, - State: &State{ - Labels: labels["system + rule"], - State: eval.Normal, - StateReason: ngmodels.ConcatReasons(eval.Error.String(), ngmodels.StateReasonKeepLast), - LatestResult: newEvaluation(t2, eval.Error), - Annotations: datasourceErrorAnnotations, - StartsAt: t2, - EndsAt: t2, - LastEvaluationTime: t2, - }, - }, - }, - }, - }, - expectedTransitionsApplyNoDataErrorToAllStates: map[ngmodels.ExecutionErrorState]map[time.Time][]StateTransition{ ngmodels.AlertingErrState: { t2: { { @@ -3432,61 +2767,6 @@ func TestProcessEvalResults_StateTransitions(t *testing.T) { }, }, }, - ngmodels.AlertingErrState: { - t2: { - { - PreviousState: eval.Normal, - State: &State{ - Labels: labels["system + rule"], - State: eval.Alerting, - StateReason: eval.Error.String(), - Error: datasourceError, - Annotations: datasourceErrorAnnotations, - LatestResult: newEvaluation(t2, eval.Error), - StartsAt: t2, - EndsAt: t2.Add(ResendDelay * 4), - LastEvaluationTime: t2, - LastSentAt: &t2, - }, - }, - }, - }, - ngmodels.OkErrState: { - t2: { - { - PreviousState: eval.Normal, - State: &State{ - Labels: labels["system + rule"], - State: eval.Normal, - StateReason: eval.Error.String(), - LatestResult: newEvaluation(t2, eval.Error), - Annotations: datasourceErrorAnnotations, - StartsAt: t2, - EndsAt: t2, - LastEvaluationTime: t2, - }, - }, - }, - }, - ngmodels.KeepLastErrState: { - t2: { - { - PreviousState: eval.Normal, - State: &State{ - Labels: labels["system + rule"], - State: eval.Normal, - StateReason: ngmodels.ConcatReasons(eval.Error.String(), ngmodels.StateReasonKeepLast), - LatestResult: newEvaluation(t2, eval.Error), - Annotations: datasourceErrorAnnotations, - StartsAt: t2, - EndsAt: t2, - LastEvaluationTime: t2, - }, - }, - }, - }, - }, - expectedTransitionsApplyNoDataErrorToAllStates: map[ngmodels.ExecutionErrorState]map[time.Time][]StateTransition{ ngmodels.AlertingErrState: { t2: { { diff --git a/pkg/services/ngalert/state/manager_test.go b/pkg/services/ngalert/state/manager_test.go index 1af185871b8..030a360b86c 100644 --- a/pkg/services/ngalert/state/manager_test.go +++ b/pkg/services/ngalert/state/manager_test.go @@ -379,8 +379,6 @@ func TestProcessEvalResults(t *testing.T) { return r } - datasourceError := expr.MakeQueryError("A", "datasource_uid_1", errors.New("this is an error")) - labels1 := data.Labels{ "instance_label": "test-1", } @@ -401,13 +399,6 @@ func TestProcessEvalResults(t *testing.T) { "system + rule + no-data": mergeLabels(mergeLabels(noDataLabels, baseRule.Labels), systemLabels), } - datasourceErrorAnnotations := data.Labels{ - "annotation": "test", - "datasource_uid": "datasource_uid_1", - "ref_id": "A", - "Error": datasourceError.Error(), - } - // keep it separate to make code folding work correctly. type testCase struct { desc string @@ -750,66 +741,6 @@ func TestProcessEvalResults(t *testing.T) { }, }, }, - { - desc: "normal -> pending when For is set but not exceeded, result is NoData and NoDataState is alerting", - alertRule: baseRuleWith(m.WithForNTimes(6), m.WithNoDataExecAs(models.Alerting)), - evalResults: map[time.Time]eval.Results{ - t1: { - newResult(eval.WithState(eval.Normal), eval.WithLabels(labels1)), - }, - t2: { - newResult(eval.WithState(eval.NoData), eval.WithLabels(labels1)), - }, - }, - expectedAnnotations: 1, - expectedStates: []*state.State{ - { - Labels: labels["system + rule + labels1"], - ResultFingerprint: labels1.Fingerprint(), - State: eval.Pending, - StateReason: eval.NoData.String(), - LatestResult: newEvaluation(t2, eval.NoData), - StartsAt: t2, - EndsAt: t2.Add(state.ResendDelay * 4), - LastEvaluationTime: t2, - }, - }, - }, - { - desc: "normal -> alerting when For is exceeded, result is NoData and NoDataState is alerting", - alertRule: baseRuleWith(m.WithForNTimes(3), m.WithNoDataExecAs(models.Alerting)), - evalResults: map[time.Time]eval.Results{ - t1: { - newResult(eval.WithState(eval.Normal), eval.WithLabels(labels1)), - }, - t2: { - newResult(eval.WithState(eval.NoData), eval.WithLabels(labels1)), // TODO fix it because nodata has no labels of regular result - }, - t3: { - newResult(eval.WithState(eval.NoData), eval.WithLabels(labels1)), - }, - tn(4): { - newResult(eval.WithState(eval.NoData), eval.WithLabels(labels1)), - }, - tn(5): { - newResult(eval.WithState(eval.NoData), eval.WithLabels(labels1)), - }, - }, - expectedAnnotations: 2, - expectedStates: []*state.State{ - { - Labels: labels["system + rule + labels1"], - ResultFingerprint: labels1.Fingerprint(), - State: eval.Alerting, - StateReason: eval.NoData.String(), - LatestResult: newEvaluation(tn(5), eval.NoData), - StartsAt: tn(5), - EndsAt: tn(5).Add(state.ResendDelay * 4), - LastEvaluationTime: tn(5), - LastSentAt: util.Pointer(tn(5)), - }, - }, - }, { desc: "normal -> nodata when result is NoData and NoDataState is nodata", alertRule: baseRule, @@ -950,95 +881,6 @@ func TestProcessEvalResults(t *testing.T) { }, }, }, - { - desc: "normal -> normal (NoData, KeepLastState) -> alerting -> alerting (NoData, KeepLastState) - keeps last state when result is NoData and NoDataState is KeepLast", - alertRule: baseRuleWith(m.WithForNTimes(0), m.WithNoDataExecAs(models.KeepLast)), - evalResults: map[time.Time]eval.Results{ - t1: { - newResult(eval.WithState(eval.Normal), eval.WithLabels(labels1)), - }, - t2: { - newResult(eval.WithState(eval.NoData), eval.WithLabels(labels1)), // TODO fix it because NoData does not have same labels - }, - t3: { - newResult(eval.WithState(eval.Alerting), eval.WithLabels(labels1)), - }, - tn(4): { - newResult(eval.WithState(eval.NoData), eval.WithLabels(labels1)), // TODO fix it because NoData does not have same labels - }, - }, - expectedAnnotations: 1, - expectedStates: []*state.State{ - { - Labels: labels["system + rule + labels1"], - ResultFingerprint: labels1.Fingerprint(), - State: eval.Alerting, - StateReason: models.ConcatReasons(eval.NoData.String(), models.StateReasonKeepLast), - LatestResult: newEvaluation(tn(4), eval.NoData), - StartsAt: t3, - EndsAt: tn(4).Add(state.ResendDelay * 4), - LastEvaluationTime: tn(4), - LastSentAt: &t3, // Resend delay is 30s, so last sent at is t3. - }, - }, - }, - { - desc: "normal -> pending -> pending (NoData, KeepLastState) -> alerting (NoData, KeepLastState) - keep last state respects For when result is NoData", - alertRule: baseRuleWith(m.WithForNTimes(2), m.WithNoDataExecAs(models.KeepLast)), - evalResults: map[time.Time]eval.Results{ - t1: { - newResult(eval.WithState(eval.Normal), eval.WithLabels(labels1)), - }, - t2: { - newResult(eval.WithState(eval.Alerting), eval.WithLabels(labels1)), - }, - t3: { - newResult(eval.WithState(eval.NoData), eval.WithLabels(labels1)), // TODO fix it because NoData does not have same labels - }, - tn(4): { - newResult(eval.WithState(eval.NoData), eval.WithLabels(labels1)), // TODO fix it because NoData does not have same labels - }, - }, - expectedAnnotations: 2, - expectedStates: []*state.State{ - { - Labels: labels["system + rule + labels1"], - ResultFingerprint: labels1.Fingerprint(), - State: eval.Alerting, - StateReason: models.ConcatReasons(eval.NoData.String(), models.StateReasonKeepLast), - LatestResult: newEvaluation(tn(4), eval.NoData), - StartsAt: tn(4), - EndsAt: tn(4).Add(state.ResendDelay * 4), - LastEvaluationTime: tn(4), - LastSentAt: util.Pointer(tn(4)), - }, - }, - }, - { - desc: "normal -> normal when result is NoData and NoDataState is ok", - alertRule: baseRuleWith(m.WithNoDataExecAs(models.OK)), - evalResults: map[time.Time]eval.Results{ - t1: { - newResult(eval.WithState(eval.Normal), eval.WithLabels(labels1)), - }, - t2: { - newResult(eval.WithState(eval.NoData), eval.WithLabels(labels1)), // TODO fix it because NoData does not have same labels - }, - }, - expectedAnnotations: 0, - expectedStates: []*state.State{ - { - Labels: labels["system + rule + labels1"], - ResultFingerprint: labels1.Fingerprint(), - State: eval.Normal, - StateReason: eval.NoData.String(), - LatestResult: newEvaluation(t2, eval.NoData), - StartsAt: t1, - EndsAt: t1, - LastEvaluationTime: t2, - }, - }, - }, { desc: "normal -> pending when For is set but not exceeded, result is Error and ExecErrState is Alerting", alertRule: baseRuleWith(m.WithForNTimes(6), m.WithErrorExecAs(models.AlertingErrState)), @@ -1103,260 +945,6 @@ func TestProcessEvalResults(t *testing.T) { }, }, }, - { - desc: "normal -> error when result is Error and ExecErrState is Error", - alertRule: baseRuleWith(m.WithForNTimes(6), m.WithErrorExecAs(models.ErrorErrState)), - evalResults: map[time.Time]eval.Results{ - t1: { - newResult(eval.WithState(eval.Normal), eval.WithLabels(labels1)), - }, - t2: { - newResult(eval.WithError(datasourceError), eval.WithLabels(labels1)), // TODO fix it because error labels are different - }, - }, - expectedAnnotations: 1, - expectedStates: []*state.State{ - { - CacheID: func() data.Fingerprint { - lbls := models.InstanceLabels(labels["system + rule + labels1"]) - return lbls.Fingerprint() - }(), - Labels: mergeLabels(labels["system + rule + labels1"], data.Labels{ - "datasource_uid": "datasource_uid_1", - "ref_id": "A", - }), - ResultFingerprint: labels1.Fingerprint(), - State: eval.Error, - Error: datasourceError, - LatestResult: newEvaluation(t2, eval.Error), - StartsAt: t2, - EndsAt: t2.Add(state.ResendDelay * 4), - LastEvaluationTime: t2, - LastSentAt: &t2, - EvaluationDuration: evaluationDuration, - Annotations: map[string]string{"annotation": "test", "Error": "[sse.dataQueryError] failed to execute query [A]: this is an error"}, - }, - }, - }, - { - desc: "normal -> normal (Error, KeepLastState) -> alerting -> alerting (Error, KeepLastState) - keeps last state when result is Error and ExecErrState is KeepLast", - alertRule: baseRuleWith(m.WithForNTimes(0), m.WithErrorExecAs(models.KeepLastErrState)), - evalResults: map[time.Time]eval.Results{ - t1: { - newResult(eval.WithState(eval.Normal), eval.WithLabels(labels1)), - }, - t2: { - newResult(eval.WithError(datasourceError), eval.WithLabels(labels1)), // TODO fix it because error labels are different - }, - t3: { - newResult(eval.WithState(eval.Alerting), eval.WithLabels(labels1)), - }, - tn(4): { - newResult(eval.WithError(datasourceError), eval.WithLabels(labels1)), // TODO fix it because error labels are different - }, - }, - expectedAnnotations: 1, - expectedStates: []*state.State{ - { - Labels: labels["system + rule + labels1"], - ResultFingerprint: labels1.Fingerprint(), - State: eval.Alerting, - StateReason: models.ConcatReasons(eval.Error.String(), models.StateReasonKeepLast), - LatestResult: newEvaluation(tn(4), eval.Error), - StartsAt: t3, - EndsAt: tn(4).Add(state.ResendDelay * 4), - LastEvaluationTime: tn(4), - LastSentAt: &t3, // Resend delay is 30s, so last sent at is t3. - Annotations: datasourceErrorAnnotations, - }, - }, - }, - { - desc: "normal -> pending -> pending (Error, KeepLastState) -> alerting (Error, KeepLastState) - keep last state respects For when result is Error", - alertRule: baseRuleWith(m.WithForNTimes(2), m.WithErrorExecAs(models.KeepLastErrState)), - evalResults: map[time.Time]eval.Results{ - t1: { - newResult(eval.WithState(eval.Normal), eval.WithLabels(labels1)), - }, - t2: { - newResult(eval.WithState(eval.Alerting), eval.WithLabels(labels1)), - }, - t3: { - newResult(eval.WithError(datasourceError), eval.WithLabels(labels1)), // TODO fix it because error labels are different - }, - tn(4): { - newResult(eval.WithError(datasourceError), eval.WithLabels(labels1)), // TODO fix it because error labels are different - }, - }, - expectedAnnotations: 2, - expectedStates: []*state.State{ - { - Labels: labels["system + rule + labels1"], - ResultFingerprint: labels1.Fingerprint(), - State: eval.Alerting, - StateReason: models.ConcatReasons(eval.Error.String(), models.StateReasonKeepLast), - LatestResult: newEvaluation(tn(4), eval.Error), - StartsAt: tn(4), - EndsAt: tn(4).Add(state.ResendDelay * 4), - LastEvaluationTime: tn(4), - LastSentAt: util.Pointer(tn(4)), - Annotations: datasourceErrorAnnotations, - }, - }, - }, - { - desc: "normal -> normal when result is Error and ExecErrState is OK", - alertRule: baseRuleWith(m.WithForNTimes(6), m.WithErrorExecAs(models.OkErrState)), - evalResults: map[time.Time]eval.Results{ - t1: { - newResult(eval.WithState(eval.Normal), eval.WithLabels(labels1)), - }, - t2: { - newResult(eval.WithError(datasourceError), eval.WithLabels(labels1)), // TODO fix it because error labels are different - }, - }, - expectedAnnotations: 1, - expectedStates: []*state.State{ - { - Labels: labels["system + rule + labels1"], - ResultFingerprint: labels1.Fingerprint(), - State: eval.Normal, - StateReason: eval.Error.String(), - LatestResult: newEvaluation(t2, eval.Error), - Annotations: datasourceErrorAnnotations, - StartsAt: t1, - EndsAt: t1, - LastEvaluationTime: t2, - }, - }, - }, - { - desc: "alerting -> normal when result is Error and ExecErrState is OK", - alertRule: baseRuleWith(m.WithForNTimes(6), m.WithErrorExecAs(models.OkErrState)), - evalResults: map[time.Time]eval.Results{ - t1: { - newResult(eval.WithState(eval.Alerting), eval.WithLabels(labels1)), - }, - t2: { - newResult(eval.WithError(datasourceError), eval.WithLabels(labels1)), // TODO fix it because error labels are different - }, - }, - expectedAnnotations: 2, - expectedStates: []*state.State{ - { - Labels: labels["system + rule + labels1"], - ResultFingerprint: labels1.Fingerprint(), - State: eval.Normal, - StateReason: eval.Error.String(), - LatestResult: newEvaluation(t2, eval.Error), - Annotations: datasourceErrorAnnotations, - StartsAt: t2, - EndsAt: t2, - LastEvaluationTime: t2, - }, - }, - }, - { - desc: "normal -> alerting -> error when result is Error and ExecErrorState is Error", - alertRule: baseRuleWith(m.WithForNTimes(2)), - evalResults: map[time.Time]eval.Results{ - t1: { - newResult(eval.WithState(eval.Alerting), eval.WithLabels(labels1)), - }, - t2: { - newResult(eval.WithState(eval.Alerting), eval.WithLabels(labels1)), - }, - t3: { - newResult(eval.WithState(eval.Alerting), eval.WithLabels(labels1)), - }, - tn(4): { - newResult(eval.WithState(eval.Error), eval.WithLabels(labels1)), // TODO this is not how error result is created - }, - tn(5): { - newResult(eval.WithState(eval.Error), eval.WithLabels(labels1)), // TODO this is not how error result is created - }, - tn(6): { - newResult(eval.WithState(eval.Error), eval.WithLabels(labels1)), // TODO this is not how error result is created - }, - }, - expectedAnnotations: 3, - expectedStates: []*state.State{ - { - Labels: labels["system + rule + labels1"], - ResultFingerprint: labels1.Fingerprint(), - State: eval.Error, - Error: fmt.Errorf("with_state_error"), - LatestResult: newEvaluation(tn(6), eval.Error), - StartsAt: tn(4), - EndsAt: tn(6).Add(state.ResendDelay * 4), - LastEvaluationTime: tn(6), - LastSentAt: util.Pointer(tn(6)), // After 30s resend delay, last sent at is t6. - Annotations: map[string]string{"annotation": "test", "Error": "with_state_error"}, - }, - }, - }, - { - desc: "normal -> alerting -> error -> alerting - it should clear the error", - alertRule: baseRuleWith(m.WithForNTimes(3)), - evalResults: map[time.Time]eval.Results{ - t1: { - newResult(eval.WithState(eval.Normal), eval.WithLabels(labels1)), - }, - tn(4): { - newResult(eval.WithState(eval.Alerting), eval.WithLabels(labels1)), - }, - tn(5): { - newResult(eval.WithState(eval.Error), eval.WithLabels(labels1)), // TODO fix it - }, - tn(8): { - newResult(eval.WithState(eval.Alerting), eval.WithLabels(labels1)), - }, - }, - expectedAnnotations: 3, - expectedStates: []*state.State{ - { - Labels: labels["system + rule + labels1"], - ResultFingerprint: labels1.Fingerprint(), - State: eval.Pending, - LatestResult: newEvaluation(tn(8), eval.Alerting), - StartsAt: tn(8), - EndsAt: tn(8).Add(state.ResendDelay * 4), - LastEvaluationTime: tn(8), - LastSentAt: util.Pointer(tn(5)), - }, - }, - }, - { - desc: "normal -> alerting -> error -> no data - it should clear the error", - alertRule: baseRuleWith(m.WithForNTimes(3)), - evalResults: map[time.Time]eval.Results{ - t1: { - newResult(eval.WithState(eval.Normal), eval.WithLabels(labels1)), - }, - tn(4): { - newResult(eval.WithState(eval.Alerting), eval.WithLabels(labels1)), - }, - tn(5): { - newResult(eval.WithState(eval.Error), eval.WithLabels(labels1)), // TODO FIX it - }, - tn(6): { - newResult(eval.WithState(eval.NoData), eval.WithLabels(labels1)), // TODO fix it because it's not possible - }, - }, - expectedAnnotations: 3, - expectedStates: []*state.State{ - { - Labels: labels["system + rule + labels1"], - ResultFingerprint: labels1.Fingerprint(), - State: eval.NoData, - LatestResult: newEvaluation(tn(6), eval.NoData), - StartsAt: tn(6), - EndsAt: tn(6).Add(state.ResendDelay * 4), - LastEvaluationTime: tn(6), - LastSentAt: util.Pointer(tn(5)), - }, - }, - }, { desc: "template is correctly expanded", alertRule: baseRuleWith( From 309a2eb4e9c771528e97986c27fe9213cce26e78 Mon Sep 17 00:00:00 2001 From: Yuri Tseretyan Date: Fri, 14 Mar 2025 16:14:06 -0400 Subject: [PATCH 011/115] Alerting: Allow administrators delete rules permanently via UI (#101974) * add query parameter to existing APIs to control the permanent deletion of rules * add GUID to gettable rule * add new endpoint /ruler/grafana/api/v1/trash/rule/guid/{RuleGUID} to delete rules from trash permanently --------- Signed-off-by: Yuri Tseretyan --- pkg/services/ngalert/api/api_ruler.go | 36 ++- pkg/services/ngalert/api/api_ruler_test.go | 2 +- pkg/services/ngalert/api/authorization.go | 2 + .../ngalert/api/authorization_test.go | 2 +- pkg/services/ngalert/api/forking_ruler.go | 4 + .../ngalert/api/generated_base_api_ruler.go | 18 ++ pkg/services/ngalert/api/persist.go | 3 +- pkg/services/ngalert/api/tooling/api.json | 24 +- .../api/tooling/definitions/cortex-ruler.go | 19 ++ pkg/services/ngalert/api/tooling/post.json | 61 +++- pkg/services/ngalert/api/tooling/spec.json | 61 +++- .../ngalert/provisioning/alert_rules.go | 2 +- .../ngalert/provisioning/alert_rules_test.go | 2 +- pkg/services/ngalert/provisioning/persist.go | 2 +- pkg/services/ngalert/store/alert_rule.go | 23 +- pkg/services/ngalert/store/alert_rule_test.go | 65 ++++- pkg/services/ngalert/tests/fakes/rules.go | 12 +- .../alerting/api_alertmanager_silence_test.go | 4 +- .../api/alerting/api_provisioning_test.go | 2 +- pkg/tests/api/alerting/api_ruler_test.go | 264 +++++++++++++----- pkg/tests/api/alerting/testing.go | 40 ++- .../notifications/receivers/receiver_test.go | 8 +- .../timeinterval/timeinterval_test.go | 2 +- public/api-merged.json | 21 ++ public/openapi3.json | 21 ++ 25 files changed, 585 insertions(+), 115 deletions(-) diff --git a/pkg/services/ngalert/api/api_ruler.go b/pkg/services/ngalert/api/api_ruler.go index f3f9573be66..769616997b8 100644 --- a/pkg/services/ngalert/api/api_ruler.go +++ b/pkg/services/ngalert/api/api_ruler.go @@ -78,6 +78,14 @@ var ignoreFieldsForValidate = [...]string{"RuleGroupIndex"} // Returns http.StatusForbidden if user does not have access to any of the rules that match the filter. // Returns http.StatusBadRequest if all rules that match the filter and the user is authorized to delete are provisioned. func (srv RulerSrv) RouteDeleteAlertRules(c *contextmodel.ReqContext, namespaceUID string, group string) response.Response { + var permanently bool + if c.QueryBool("deletePermanently") { + if !c.SignedInUser.HasRole(identity.RoleAdmin) { + return ErrResp(http.StatusForbidden, errors.New("only administrators can delete rules permanently"), "") + } + permanently = true + } + namespace, err := srv.store.GetNamespaceByUID(c.Req.Context(), namespaceUID, c.SignedInUser.GetOrgID(), c.SignedInUser) if err != nil { return toNamespaceErrorResponse(err) @@ -161,7 +169,7 @@ func (srv RulerSrv) RouteDeleteAlertRules(c *contextmodel.ReqContext, namespaceU rulesToDelete = append(rulesToDelete, uid...) } if len(rulesToDelete) > 0 { - err := srv.store.DeleteAlertRulesByUID(ctx, c.SignedInUser.GetOrgID(), ngmodels.NewUserUID(c.SignedInUser), rulesToDelete...) + err := srv.store.DeleteAlertRulesByUID(ctx, c.SignedInUser.GetOrgID(), ngmodels.NewUserUID(c.SignedInUser), permanently, rulesToDelete...) if err != nil { return err } @@ -385,6 +393,14 @@ func (srv RulerSrv) RouteGetRuleVersionsByUID(c *contextmodel.ReqContext, ruleUI } func (srv RulerSrv) RoutePostNameRulesConfig(c *contextmodel.ReqContext, ruleGroupConfig apimodels.PostableRuleGroupConfig, namespaceUID string) response.Response { + var deletePermanently bool + if c.QueryBool("deletePermanently") { + if !c.SignedInUser.HasRole(identity.RoleAdmin) { + return ErrResp(http.StatusForbidden, errors.New("only administrators can delete rules permanently"), "") + } + deletePermanently = true + } + namespace, err := srv.store.GetNamespaceByUID(c.Req.Context(), namespaceUID, c.SignedInUser.GetOrgID(), c.SignedInUser) if err != nil { return toNamespaceErrorResponse(err) @@ -405,7 +421,18 @@ func (srv RulerSrv) RoutePostNameRulesConfig(c *contextmodel.ReqContext, ruleGro RuleGroup: ruleGroupConfig.Name, } - return srv.updateAlertRulesInGroup(c, groupKey, rules) + return srv.updateAlertRulesInGroup(c, groupKey, rules, deletePermanently) +} + +func (srv RulerSrv) RouteDeleteAlertRuleFromTrashByGUID(ctx *contextmodel.ReqContext, guid string) response.Response { + deleted, err := srv.store.DeleteRuleFromTrashByGUID(ctx.Req.Context(), ctx.SignedInUser.GetOrgID(), guid) + if err != nil { + return ErrResp(http.StatusInternalServerError, err, "failed to delete rule from trash") + } + if deleted == 0 { + return response.Empty(http.StatusNotFound) + } + return response.Empty(http.StatusOK) } func (srv RulerSrv) checkGroupLimits(group apimodels.PostableRuleGroupConfig) error { @@ -424,7 +451,7 @@ func (srv RulerSrv) checkGroupLimits(group apimodels.PostableRuleGroupConfig) er // All operations are performed in a single transaction // //nolint:gocyclo -func (srv RulerSrv) updateAlertRulesInGroup(c *contextmodel.ReqContext, groupKey ngmodels.AlertRuleGroupKey, rules []*ngmodels.AlertRuleWithOptionals) response.Response { +func (srv RulerSrv) updateAlertRulesInGroup(c *contextmodel.ReqContext, groupKey ngmodels.AlertRuleGroupKey, rules []*ngmodels.AlertRuleWithOptionals, deletePermanently bool) response.Response { var finalChanges *store.GroupDelta var dbConfig *ngmodels.AlertConfiguration err := srv.xactManager.InTransaction(c.Req.Context(), func(tranCtx context.Context) error { @@ -485,7 +512,7 @@ func (srv RulerSrv) updateAlertRulesInGroup(c *contextmodel.ReqContext, groupKey UIDs = append(UIDs, rule.UID) } - if err = srv.store.DeleteAlertRulesByUID(tranCtx, c.SignedInUser.GetOrgID(), ngmodels.NewUserUID(c.SignedInUser), UIDs...); err != nil { + if err = srv.store.DeleteAlertRulesByUID(tranCtx, c.SignedInUser.GetOrgID(), ngmodels.NewUserUID(c.SignedInUser), deletePermanently, UIDs...); err != nil { return fmt.Errorf("failed to delete rules: %w", err) } } @@ -631,6 +658,7 @@ func toGettableExtendedRuleNode(r ngmodels.AlertRule, provenanceRecords map[stri NotificationSettings: AlertRuleNotificationSettingsFromNotificationSettings(r.NotificationSettings), Record: ApiRecordFromModelRecord(r.Record), Metadata: AlertRuleMetadataFromModelMetadata(r.Metadata), + GUID: r.GUID, }, } forDuration := model.Duration(r.For) diff --git a/pkg/services/ngalert/api/api_ruler_test.go b/pkg/services/ngalert/api/api_ruler_test.go index 55481e4faf3..4b2f35001b9 100644 --- a/pkg/services/ngalert/api/api_ruler_test.go +++ b/pkg/services/ngalert/api/api_ruler_test.go @@ -60,7 +60,7 @@ func TestRouteDeleteAlertRules(t *testing.T) { deleteCommands := getRecordedCommand(ruleStore) require.Len(t, deleteCommands, 1) cmd := deleteCommands[0] - actualUIDs := cmd.Params[2].([]string) + actualUIDs := cmd.Params[3].([]string) require.Len(t, actualUIDs, len(expectedRules)) for _, rule := range expectedRules { require.Containsf(t, actualUIDs, rule.UID, "Rule %s was expected to be deleted but it wasn't", rule.UID) diff --git a/pkg/services/ngalert/api/authorization.go b/pkg/services/ngalert/api/authorization.go index 42d85b03a32..eab0ae620bb 100644 --- a/pkg/services/ngalert/api/authorization.go +++ b/pkg/services/ngalert/api/authorization.go @@ -65,6 +65,8 @@ func (api *API) authorize(method, path string) web.Handler { ac.EvalPermission(ac.ActionAlertingRuleDelete, scope), ), ) + case http.MethodDelete + "/api/ruler/grafana/api/v1/trash/rule/guid/{RuleGUID}": + return middleware.ReqOrgAdmin // Grafana rule state history paths case http.MethodGet + "/api/v1/rules/history": diff --git a/pkg/services/ngalert/api/authorization_test.go b/pkg/services/ngalert/api/authorization_test.go index 993a72d3ef7..f1d5482739a 100644 --- a/pkg/services/ngalert/api/authorization_test.go +++ b/pkg/services/ngalert/api/authorization_test.go @@ -41,7 +41,7 @@ func TestAuthorize(t *testing.T) { } paths[p] = methods } - require.Len(t, paths, 66) + require.Len(t, paths, 67) ac := acmock.New() api := &API{AccessControl: ac, FeatureManager: featuremgmt.WithFeatures()} diff --git a/pkg/services/ngalert/api/forking_ruler.go b/pkg/services/ngalert/api/forking_ruler.go index 16029af2414..8638ad7b57d 100644 --- a/pkg/services/ngalert/api/forking_ruler.go +++ b/pkg/services/ngalert/api/forking_ruler.go @@ -128,3 +128,7 @@ func (f *RulerApiHandler) getService(ctx *contextmodel.ReqContext) (*LotexRuler, func (f *RulerApiHandler) handleRouteGetRuleVersionsByUID(ctx *contextmodel.ReqContext, ruleUID string) response.Response { return f.GrafanaRuler.RouteGetRuleVersionsByUID(ctx, ruleUID) } + +func (f *RulerApiHandler) handleRouteDeleteRuleFromTrashByGUID(ctx *contextmodel.ReqContext, ruleGUID string) response.Response { + return f.GrafanaRuler.RouteDeleteAlertRuleFromTrashByGUID(ctx, ruleGUID) +} diff --git a/pkg/services/ngalert/api/generated_base_api_ruler.go b/pkg/services/ngalert/api/generated_base_api_ruler.go index d7d4c56428a..d957256723e 100644 --- a/pkg/services/ngalert/api/generated_base_api_ruler.go +++ b/pkg/services/ngalert/api/generated_base_api_ruler.go @@ -23,6 +23,7 @@ type RulerApi interface { RouteDeleteGrafanaRuleGroupConfig(*contextmodel.ReqContext) response.Response RouteDeleteNamespaceGrafanaRulesConfig(*contextmodel.ReqContext) response.Response RouteDeleteNamespaceRulesConfig(*contextmodel.ReqContext) response.Response + RouteDeleteRuleFromTrashByGUID(*contextmodel.ReqContext) response.Response RouteDeleteRuleGroupConfig(*contextmodel.ReqContext) response.Response RouteGetGrafanaRuleGroupConfig(*contextmodel.ReqContext) response.Response RouteGetGrafanaRulesConfig(*contextmodel.ReqContext) response.Response @@ -55,6 +56,11 @@ func (f *RulerApiHandler) RouteDeleteNamespaceRulesConfig(ctx *contextmodel.ReqC namespaceParam := web.Params(ctx.Req)[":Namespace"] return f.handleRouteDeleteNamespaceRulesConfig(ctx, datasourceUIDParam, namespaceParam) } +func (f *RulerApiHandler) RouteDeleteRuleFromTrashByGUID(ctx *contextmodel.ReqContext) response.Response { + // Parse Path Parameters + ruleGUIDParam := web.Params(ctx.Req)[":RuleGUID"] + return f.handleRouteDeleteRuleFromTrashByGUID(ctx, ruleGUIDParam) +} func (f *RulerApiHandler) RouteDeleteRuleGroupConfig(ctx *contextmodel.ReqContext) response.Response { // Parse Path Parameters datasourceUIDParam := web.Params(ctx.Req)[":DatasourceUID"] @@ -177,6 +183,18 @@ func (api *API) RegisterRulerApiEndpoints(srv RulerApi, m *metrics.API) { m, ), ) + group.Delete( + toMacaronPath("/api/ruler/grafana/api/v1/trash/rule/guid/{RuleGUID}"), + requestmeta.SetOwner(requestmeta.TeamAlerting), + requestmeta.SetSLOGroup(requestmeta.SLOGroupHighSlow), + api.authorize(http.MethodDelete, "/api/ruler/grafana/api/v1/trash/rule/guid/{RuleGUID}"), + metrics.Instrument( + http.MethodDelete, + "/api/ruler/grafana/api/v1/trash/rule/guid/{RuleGUID}", + api.Hooks.Wrap(srv.RouteDeleteRuleFromTrashByGUID), + m, + ), + ) group.Delete( toMacaronPath("/api/ruler/{DatasourceUID}/api/v1/rules/{Namespace}/{Groupname}"), requestmeta.SetOwner(requestmeta.TeamAlerting), diff --git a/pkg/services/ngalert/api/persist.go b/pkg/services/ngalert/api/persist.go index 30b79b666dd..d75049faad1 100644 --- a/pkg/services/ngalert/api/persist.go +++ b/pkg/services/ngalert/api/persist.go @@ -29,7 +29,8 @@ type RuleStore interface { // and return the map of uuid to id. InsertAlertRules(ctx context.Context, user *ngmodels.UserUID, rules []ngmodels.AlertRule) ([]ngmodels.AlertRuleKeyWithId, error) UpdateAlertRules(ctx context.Context, user *ngmodels.UserUID, rules []ngmodels.UpdateRule) error - DeleteAlertRulesByUID(ctx context.Context, orgID int64, user *ngmodels.UserUID, ruleUID ...string) error + DeleteAlertRulesByUID(ctx context.Context, orgID int64, user *ngmodels.UserUID, permanently bool, ruleUID ...string) error + DeleteRuleFromTrashByGUID(ctx context.Context, orgID int64, ruleGUID string) (int64, error) // IncreaseVersionForAllRulesInNamespaces Increases version for all rules that have specified namespace uids IncreaseVersionForAllRulesInNamespaces(ctx context.Context, orgID int64, namespaceUIDs []string) ([]ngmodels.AlertRuleKeyWithVersion, error) diff --git a/pkg/services/ngalert/api/tooling/api.json b/pkg/services/ngalert/api/tooling/api.json index 7fc77c7ce19..49ab21484b0 100644 --- a/pkg/services/ngalert/api/tooling/api.json +++ b/pkg/services/ngalert/api/tooling/api.json @@ -396,6 +396,9 @@ }, "metric": { "type": "string" + }, + "targetDatasourceUid": { + "type": "string" } }, "title": "Record is the provisioned export of models.Record.", @@ -1607,6 +1610,9 @@ ], "type": "string" }, + "guid": { + "type": "string" + }, "intervalSeconds": { "format": "int64", "type": "integer" @@ -3492,6 +3498,11 @@ "description": "Name of the recorded metric.", "example": "grafana_alerts_ratio", "type": "string" + }, + "target_datasource_uid": { + "description": "Which data source should be used to write the output of the recording rule, specified by UID.", + "example": "my-prom", + "type": "string" } }, "required": [ @@ -4355,6 +4366,15 @@ "description": "Name of the associated template definition for this result.", "type": "string" }, + "scope": { + "description": "Scope that was successfully used to interpolate the template. If the root scope \".\" fails, more specific\nscopes will be tried, such as \".Alerts', or \".Alert\".", + "enum": [ + ".", + ".Alerts", + ".Alert" + ], + "type": "string" + }, "text": { "description": "Interpolated value of the template.", "type": "string" @@ -4493,6 +4513,7 @@ "type": "object" }, "URL": { + "description": "The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nThe Host field contains the host and port subcomponents of the URL.\nWhen the port is present, it is separated from the host with a colon.\nWhen the host is an IPv6 address, it must be enclosed in square brackets:\n\"[fe80::1]:80\". The [net.JoinHostPort] function combines a host and port\ninto a string suitable for the Host field, adding square brackets to\nthe host when necessary.\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use the [URL.EscapedPath] method, which preserves\nthe original encoding of Path.\n\nThe RawPath field is an optional field which is only set when the default\nencoding of Path is different from the escaped path. See the EscapedPath method\nfor more details.\n\nURL's String method uses the EscapedPath method to obtain the path.", "properties": { "ForceQuery": { "type": "boolean" @@ -4528,7 +4549,7 @@ "$ref": "#/definitions/Userinfo" } }, - "title": "URL is a custom URL type that allows validation at configuration load time.", + "title": "A URL represents a parsed URL (technically, a URI reference).", "type": "object" }, "UpdateRuleGroupResponse": { @@ -5056,6 +5077,7 @@ "type": "object" }, "gettableSilences": { + "description": "GettableSilences gettable silences", "items": { "$ref": "#/definitions/gettableSilence", "type": "object" diff --git a/pkg/services/ngalert/api/tooling/definitions/cortex-ruler.go b/pkg/services/ngalert/api/tooling/definitions/cortex-ruler.go index fc8c1c9c4fe..14f754683d2 100644 --- a/pkg/services/ngalert/api/tooling/definitions/cortex-ruler.go +++ b/pkg/services/ngalert/api/tooling/definitions/cortex-ruler.go @@ -20,6 +20,18 @@ import ( // 403: ForbiddenError // 404: description: Not found. +// swagger:route Delete /ruler/grafana/api/v1/trash/rule/guid/{RuleGUID} ruler RouteDeleteRuleFromTrashByGUID +// +// Permanently delete a rule from trash by GUID +// +// Produces: +// - application/json +// +// Responses: +// 202: Ack +// 403: ForbiddenError +// 404: description: Not found. + // swagger:route Get /ruler/grafana/api/v1/rule/{RuleUID}/versions ruler RouteGetRuleVersionsByUID // // Get rule versions by UID @@ -237,6 +249,12 @@ type PathGetRuleByUIDParams struct { RuleUID string } +// swagger:parameters RouteDeleteRuleFromTrashByGUID +type PathDeleteRuleFromTrashByGUIDParams struct { + // in: path + RuleGUID string +} + // swagger:model type RuleGroupConfigResponse struct { GettableRuleGroupConfig @@ -572,6 +590,7 @@ type GettableGrafanaRule struct { NotificationSettings *AlertRuleNotificationSettings `json:"notification_settings,omitempty" yaml:"notification_settings,omitempty"` Record *Record `json:"record,omitempty" yaml:"record,omitempty"` Metadata *AlertRuleMetadata `json:"metadata,omitempty" yaml:"metadata,omitempty"` + GUID string `json:"guid" yaml:"guid"` } // UserInfo represents user-related information, including a unique identifier and a name. diff --git a/pkg/services/ngalert/api/tooling/post.json b/pkg/services/ngalert/api/tooling/post.json index ab2b7542381..3c9cc03dbec 100644 --- a/pkg/services/ngalert/api/tooling/post.json +++ b/pkg/services/ngalert/api/tooling/post.json @@ -396,6 +396,9 @@ }, "metric": { "type": "string" + }, + "targetDatasourceUid": { + "type": "string" } }, "title": "Record is the provisioned export of models.Record.", @@ -1607,6 +1610,9 @@ ], "type": "string" }, + "guid": { + "type": "string" + }, "intervalSeconds": { "format": "int64", "type": "integer" @@ -3492,6 +3498,11 @@ "description": "Name of the recorded metric.", "example": "grafana_alerts_ratio", "type": "string" + }, + "target_datasource_uid": { + "description": "Which data source should be used to write the output of the recording rule, specified by UID.", + "example": "my-prom", + "type": "string" } }, "required": [ @@ -4355,6 +4366,15 @@ "description": "Name of the associated template definition for this result.", "type": "string" }, + "scope": { + "description": "Scope that was successfully used to interpolate the template. If the root scope \".\" fails, more specific\nscopes will be tried, such as \".Alerts', or \".Alert\".", + "enum": [ + ".", + ".Alerts", + ".Alert" + ], + "type": "string" + }, "text": { "description": "Interpolated value of the template.", "type": "string" @@ -4493,7 +4513,6 @@ "type": "object" }, "URL": { - "description": "The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nThe Host field contains the host and port subcomponents of the URL.\nWhen the port is present, it is separated from the host with a colon.\nWhen the host is an IPv6 address, it must be enclosed in square brackets:\n\"[fe80::1]:80\". The [net.JoinHostPort] function combines a host and port\ninto a string suitable for the Host field, adding square brackets to\nthe host when necessary.\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use the [URL.EscapedPath] method, which preserves\nthe original encoding of Path.\n\nThe RawPath field is an optional field which is only set when the default\nencoding of Path is different from the escaped path. See the EscapedPath method\nfor more details.\n\nURL's String method uses the EscapedPath method to obtain the path.", "properties": { "ForceQuery": { "type": "boolean" @@ -4529,7 +4548,7 @@ "$ref": "#/definitions/Userinfo" } }, - "title": "A URL represents a parsed URL (technically, a URI reference).", + "title": "URL is a custom URL type that allows validation at configuration load time.", "type": "object" }, "UpdateRuleGroupResponse": { @@ -5058,7 +5077,6 @@ "type": "object" }, "gettableSilences": { - "description": "GettableSilences gettable silences", "items": { "$ref": "#/definitions/gettableSilence", "type": "object" @@ -7472,6 +7490,43 @@ ] } }, + "/ruler/grafana/api/v1/trash/rule/guid/{RuleGUID}": { + "delete": { + "description": "Permanently delete a rule from trash by GUID", + "operationId": "RouteDeleteRuleFromTrashByGUID", + "parameters": [ + { + "in": "path", + "name": "RuleGUID", + "required": true, + "type": "string" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "202": { + "description": "Ack", + "schema": { + "$ref": "#/definitions/Ack" + } + }, + "403": { + "description": "ForbiddenError", + "schema": { + "$ref": "#/definitions/ForbiddenError" + } + }, + "404": { + "description": " Not found." + } + }, + "tags": [ + "ruler" + ] + } + }, "/ruler/{DatasourceUID}/api/v1/rules": { "get": { "description": "List rule groups", diff --git a/pkg/services/ngalert/api/tooling/spec.json b/pkg/services/ngalert/api/tooling/spec.json index 1b251c81f29..15d8a288303 100644 --- a/pkg/services/ngalert/api/tooling/spec.json +++ b/pkg/services/ngalert/api/tooling/spec.json @@ -2173,6 +2173,43 @@ } } }, + "/ruler/grafana/api/v1/trash/rule/guid/{RuleGUID}": { + "delete": { + "description": "Permanently delete a rule from trash by GUID", + "produces": [ + "application/json" + ], + "tags": [ + "ruler" + ], + "operationId": "RouteDeleteRuleFromTrashByGUID", + "parameters": [ + { + "type": "string", + "name": "RuleGUID", + "in": "path", + "required": true + } + ], + "responses": { + "202": { + "description": "Ack", + "schema": { + "$ref": "#/definitions/Ack" + } + }, + "403": { + "description": "ForbiddenError", + "schema": { + "$ref": "#/definitions/ForbiddenError" + } + }, + "404": { + "description": " Not found." + } + } + } + }, "/ruler/{DatasourceUID}/api/v1/rules": { "get": { "description": "List rule groups", @@ -4584,6 +4621,9 @@ }, "metric": { "type": "string" + }, + "targetDatasourceUid": { + "type": "string" } } }, @@ -5795,6 +5835,9 @@ "Error" ] }, + "guid": { + "type": "string" + }, "intervalSeconds": { "type": "integer", "format": "int64" @@ -7685,6 +7728,11 @@ "description": "Name of the recorded metric.", "type": "string", "example": "grafana_alerts_ratio" + }, + "target_datasource_uid": { + "description": "Which data source should be used to write the output of the recording rule, specified by UID.", + "type": "string", + "example": "my-prom" } } }, @@ -8544,6 +8592,15 @@ "description": "Name of the associated template definition for this result.", "type": "string" }, + "scope": { + "description": "Scope that was successfully used to interpolate the template. If the root scope \".\" fails, more specific\nscopes will be tried, such as \".Alerts', or \".Alert\".", + "type": "string", + "enum": [ + ".", + ".Alerts", + ".Alert" + ] + }, "text": { "description": "Interpolated value of the template.", "type": "string" @@ -8681,9 +8738,8 @@ } }, "URL": { - "description": "The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nThe Host field contains the host and port subcomponents of the URL.\nWhen the port is present, it is separated from the host with a colon.\nWhen the host is an IPv6 address, it must be enclosed in square brackets:\n\"[fe80::1]:80\". The [net.JoinHostPort] function combines a host and port\ninto a string suitable for the Host field, adding square brackets to\nthe host when necessary.\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use the [URL.EscapedPath] method, which preserves\nthe original encoding of Path.\n\nThe RawPath field is an optional field which is only set when the default\nencoding of Path is different from the escaped path. See the EscapedPath method\nfor more details.\n\nURL's String method uses the EscapedPath method to obtain the path.", "type": "object", - "title": "A URL represents a parsed URL (technically, a URI reference).", + "title": "URL is a custom URL type that allows validation at configuration load time.", "properties": { "ForceQuery": { "type": "boolean" @@ -9246,7 +9302,6 @@ } }, "gettableSilences": { - "description": "GettableSilences gettable silences", "type": "array", "items": { "type": "object", diff --git a/pkg/services/ngalert/provisioning/alert_rules.go b/pkg/services/ngalert/provisioning/alert_rules.go index c178c5683c9..e3639d85ae1 100644 --- a/pkg/services/ngalert/provisioning/alert_rules.go +++ b/pkg/services/ngalert/provisioning/alert_rules.go @@ -782,7 +782,7 @@ func (service *AlertRuleService) deleteRules(ctx context.Context, user identity. uids = append(uids, tgt.UID) } } - if err := service.ruleStore.DeleteAlertRulesByUID(ctx, user.GetOrgID(), models.NewUserUID(user), uids...); err != nil { + if err := service.ruleStore.DeleteAlertRulesByUID(ctx, user.GetOrgID(), models.NewUserUID(user), false, uids...); err != nil { return err } for _, uid := range uids { diff --git a/pkg/services/ngalert/provisioning/alert_rules_test.go b/pkg/services/ngalert/provisioning/alert_rules_test.go index 68991883c03..bb9360c8350 100644 --- a/pkg/services/ngalert/provisioning/alert_rules_test.go +++ b/pkg/services/ngalert/provisioning/alert_rules_test.go @@ -2103,7 +2103,7 @@ func getDeletedRules(t *testing.T, ruleStore *fakes.RuleStore) []deleteRuleOpera uid = string(*userUID) } - uids, ok := q.Params[2].([]string) + uids, ok := q.Params[3].([]string) require.True(t, ok, "uids parameter should be []string") operations = append(operations, deleteRuleOperation{ diff --git a/pkg/services/ngalert/provisioning/persist.go b/pkg/services/ngalert/provisioning/persist.go index bd85502d2c2..6b3c2fb00d6 100644 --- a/pkg/services/ngalert/provisioning/persist.go +++ b/pkg/services/ngalert/provisioning/persist.go @@ -35,7 +35,7 @@ type RuleStore interface { GetRuleGroupInterval(ctx context.Context, orgID int64, namespaceUID string, ruleGroup string) (int64, error) InsertAlertRules(ctx context.Context, user *models.UserUID, rule []models.AlertRule) ([]models.AlertRuleKeyWithId, error) UpdateAlertRules(ctx context.Context, user *models.UserUID, rule []models.UpdateRule) error - DeleteAlertRulesByUID(ctx context.Context, orgID int64, user *models.UserUID, ruleUID ...string) error + DeleteAlertRulesByUID(ctx context.Context, orgID int64, user *models.UserUID, permanently bool, ruleUID ...string) error GetAlertRulesGroupByRuleUID(ctx context.Context, query *models.GetAlertRulesGroupByRuleUIDQuery) ([]*models.AlertRule, error) } diff --git a/pkg/services/ngalert/store/alert_rule.go b/pkg/services/ngalert/store/alert_rule.go index ccba09c5a3b..4df2410ed05 100644 --- a/pkg/services/ngalert/store/alert_rule.go +++ b/pkg/services/ngalert/store/alert_rule.go @@ -39,7 +39,7 @@ var ( ) // DeleteAlertRulesByUID is a handler for deleting an alert rule. -func (st DBstore) DeleteAlertRulesByUID(ctx context.Context, orgID int64, user *ngmodels.UserUID, ruleUID ...string) error { +func (st DBstore) DeleteAlertRulesByUID(ctx context.Context, orgID int64, user *ngmodels.UserUID, permanently bool, ruleUID ...string) error { if len(ruleUID) == 0 { return nil } @@ -73,7 +73,7 @@ func (st DBstore) DeleteAlertRulesByUID(ctx context.Context, orgID int64, user * logger.Debug("Deleted alert rule state", "count", rows) var versions []alertRuleVersion - if st.FeatureToggles.IsEnabledGlobally(featuremgmt.FlagAlertRuleRestore) && st.Cfg.DeletedRuleRetention > 0 { // save deleted version only if retention is greater than 0 + if st.FeatureToggles.IsEnabledGlobally(featuremgmt.FlagAlertRuleRestore) && st.Cfg.DeletedRuleRetention > 0 && !permanently { // save deleted version only if retention is greater than 0 versions, err = st.getLatestVersionOfRulesByUID(ctx, orgID, ruleUID) if err != nil { logger.Error("Failed to get latest version of deleted alert rules. The recovery will not be possible", "error", err) @@ -919,7 +919,7 @@ func (st DBstore) DeleteInFolders(ctx context.Context, orgID int64, folderUIDs [ } } - if err := st.DeleteAlertRulesByUID(ctx, orgID, ngmodels.NewUserUID(user), uids...); err != nil { + if err := st.DeleteAlertRulesByUID(ctx, orgID, ngmodels.NewUserUID(user), false, uids...); err != nil { return err } } @@ -1271,3 +1271,20 @@ func getINSubQueryArgs[T any](inputSlice []T) ([]any, []string) { return args, in } + +func (st DBstore) DeleteRuleFromTrashByGUID(ctx context.Context, orgID int64, ruleGUID string) (int64, error) { + affectedRows := int64(-1) + err := st.SQLStore.WithTransactionalDbSession(ctx, func(sess *sqlstore.DBSession) error { + st.Logger.FromContext(ctx).Debug("Deleting a deleted rule by GUID", "ruleGUID", ruleGUID) + result, err := sess.Exec("DELETE FROM alert_rule_version WHERE rule_uid='' AND rule_org_id = ? AND rule_guid = ? ", orgID, ruleGUID) + if err != nil { + return err + } + affectedRows, err = result.RowsAffected() + if err != nil { + st.Logger.FromContext(ctx).Warn("Failed to get rows affected by the delete operation", "error", err) + } + return nil + }) + return affectedRows, err +} diff --git a/pkg/services/ngalert/store/alert_rule_test.go b/pkg/services/ngalert/store/alert_rule_test.go index 46fc19eb1fb..1567740b7dd 100644 --- a/pkg/services/ngalert/store/alert_rule_test.go +++ b/pkg/services/ngalert/store/alert_rule_test.go @@ -745,7 +745,7 @@ func TestIntegration_DeleteAlertRulesByUID(t *testing.T) { called = true return nil } - err := store.DeleteAlertRulesByUID(context.Background(), rule.OrgID, &models.AlertingUserUID, rule.UID) + err := store.DeleteAlertRulesByUID(context.Background(), rule.OrgID, &models.AlertingUserUID, false, rule.UID) require.NoError(t, err) require.True(t, called) }) @@ -772,7 +772,7 @@ func TestIntegration_DeleteAlertRulesByUID(t *testing.T) { require.Len(t, savedInstances, 1) // Delete the rule - err = store.DeleteAlertRulesByUID(context.Background(), rule.OrgID, &models.AlertingUserUID, rule.UID) + err = store.DeleteAlertRulesByUID(context.Background(), rule.OrgID, &models.AlertingUserUID, false, rule.UID) require.NoError(t, err) // Now there should be no alert rule state @@ -820,7 +820,7 @@ func TestIntegration_DeleteAlertRulesByUID(t *testing.T) { require.NoError(t, err) require.Len(t, versions, 2) - err = store.DeleteAlertRulesByUID(context.Background(), orgID, util.Pointer(models.UserUID("test")), uids...) + err = store.DeleteAlertRulesByUID(context.Background(), orgID, util.Pointer(models.UserUID("test")), false, uids...) require.NoError(t, err) guids := make([]string, 0, len(rules)) @@ -887,7 +887,60 @@ func TestIntegration_DeleteAlertRulesByUID(t *testing.T) { require.NoError(t, err) require.Len(t, versions, 2) - err = store.DeleteAlertRulesByUID(context.Background(), orgID, util.Pointer(models.UserUID("test")), uids...) + err = store.DeleteAlertRulesByUID(context.Background(), orgID, util.Pointer(models.UserUID("test")), false, uids...) + require.NoError(t, err) + + guids := make([]string, 0, len(rules)) + for _, rule := range rules { + guids = append(guids, rule.GUID) + } + + _ = sqlStore.WithDbSession(context.Background(), func(sess *sqlstore.DBSession) error { + var versions []alertRuleVersion + err = sess.Table(alertRuleVersion{}).Where(`rule_uid = ''`).In("rule_guid", guids).Find(&versions) + require.NoError(t, err) + require.Emptyf(t, versions, "some rules were not permanently deleted") // should be one version per GUID + return nil + }) + }) + + t.Run("should remove all versions and not keep history if permanently is true", func(t *testing.T) { + orgID := int64(rand.Intn(1000)) + gen = gen.With(gen.WithOrgID(orgID)) + // Create a new store to pass the custom bus to check the signal + b := &fakeBus{} + logger := log.New("test-dbstore") + + cfg.UnifiedAlerting.DeletedRuleRetention = 1000 * time.Hour + + store := createTestStore(sqlStore, folderService, logger, cfg.UnifiedAlerting, b) + store.FeatureToggles = featuremgmt.WithFeatures(featuremgmt.FlagAlertRuleRestore) + + result, err := store.InsertAlertRules(context.Background(), &models.AlertingUserUID, gen.GenerateMany(3)) + uids := make([]string, 0, len(result)) + for _, rule := range result { + uids = append(uids, rule.UID) + } + require.NoError(t, err) + rules, err := store.ListAlertRules(context.Background(), &models.ListAlertRulesQuery{OrgID: orgID, RuleUIDs: uids}) + require.NoError(t, err) + + updates := make([]models.UpdateRule, 0, len(rules)) + for _, rule := range rules { + rule2 := models.CopyRule(rule, gen.WithTitle(util.GenerateShortUID())) + updates = append(updates, models.UpdateRule{ + Existing: rule, + New: *rule2, + }) + } + err = store.UpdateAlertRules(context.Background(), &models.AlertingUserUID, updates) + require.NoError(t, err) + + versions, err := store.GetAlertRuleVersions(context.Background(), orgID, rules[0].GUID) + require.NoError(t, err) + require.Len(t, versions, 2) + + err = store.DeleteAlertRulesByUID(context.Background(), orgID, util.Pointer(models.UserUID("test")), true, uids...) require.NoError(t, err) guids := make([]string, 0, len(rules)) @@ -2055,7 +2108,7 @@ func TestIntegration_ListDeletedRules(t *testing.T) { require.Empty(t, list) }) - err = store.DeleteAlertRulesByUID(context.Background(), orgID, &models.AlertingUserUID, rule.UID) + err = store.DeleteAlertRulesByUID(context.Background(), orgID, &models.AlertingUserUID, false, rule.UID) require.NoError(t, err) t.Run("should return the last deleted rule", func(t *testing.T) { @@ -2113,7 +2166,7 @@ func TestIntegration_CleanUpDeletedAlertRules(t *testing.T) { TimeNow = func() time.Time { return t0.Add(time.Duration(idx) * 10 * time.Second) } - err = store.DeleteAlertRulesByUID(context.Background(), orgID, util.Pointer(models.UserUID("test")), uid) + err = store.DeleteAlertRulesByUID(context.Background(), orgID, util.Pointer(models.UserUID("test")), false, uid) require.NoError(t, err) } diff --git a/pkg/services/ngalert/tests/fakes/rules.go b/pkg/services/ngalert/tests/fakes/rules.go index 24d9959a0e2..85b7b6924f8 100644 --- a/pkg/services/ngalert/tests/fakes/rules.go +++ b/pkg/services/ngalert/tests/fakes/rules.go @@ -103,10 +103,10 @@ func (f *RuleStore) GetRecordedCommands(predicate func(cmd any) (any, bool)) []a return result } -func (f *RuleStore) DeleteAlertRulesByUID(_ context.Context, orgID int64, user *models.UserUID, UIDs ...string) error { +func (f *RuleStore) DeleteAlertRulesByUID(ctx context.Context, orgID int64, user *models.UserUID, permanently bool, UIDs ...string) error { f.RecordedOps = append(f.RecordedOps, GenericRecordedQuery{ Name: "DeleteAlertRulesByUID", - Params: []any{orgID, user, UIDs}, + Params: []any{orgID, user, permanently, UIDs}, }) rules := f.Rules[orgID] @@ -130,6 +130,14 @@ func (f *RuleStore) DeleteAlertRulesByUID(_ context.Context, orgID int64, user * return nil } +func (f *RuleStore) DeleteRuleFromTrashByGUID(ctx context.Context, orgID int64, ruleGUID string) (int64, error) { + f.RecordedOps = append(f.RecordedOps, GenericRecordedQuery{ + Name: "DeleteRuleFromTrashByGUID", + Params: []any{orgID, ruleGUID}, + }) + return 0, nil +} + func (f *RuleStore) GetAlertRuleByUID(_ context.Context, q *models.GetAlertRuleByUIDQuery) (*models.AlertRule, error) { f.mtx.Lock() defer f.mtx.Unlock() diff --git a/pkg/tests/api/alerting/api_alertmanager_silence_test.go b/pkg/tests/api/alerting/api_alertmanager_silence_test.go index 2f3e9660890..2339934864a 100644 --- a/pkg/tests/api/alerting/api_alertmanager_silence_test.go +++ b/pkg/tests/api/alerting/api_alertmanager_silence_test.go @@ -60,10 +60,10 @@ func TestIntegrationSilenceAuth(t *testing.T) { group1 := generateAlertRuleGroup(1, alertRuleGen()) group2 := generateAlertRuleGroup(1, alertRuleGen()) - respModel, status, _ := adminApiClient.PostRulesGroupWithStatus(t, f1.UID, &group1) + respModel, status, _ := adminApiClient.PostRulesGroupWithStatus(t, f1.UID, &group1, false) require.Equal(t, http.StatusAccepted, status) ruleInFolder1UID := respModel.Created[0] - respModel, status, _ = adminApiClient.PostRulesGroupWithStatus(t, f2.UID, &group2) + respModel, status, _ = adminApiClient.PostRulesGroupWithStatus(t, f2.UID, &group2, false) require.Equal(t, http.StatusAccepted, status) ruleInFolder2UID := respModel.Created[0] diff --git a/pkg/tests/api/alerting/api_provisioning_test.go b/pkg/tests/api/alerting/api_provisioning_test.go index f177c2b849f..2d1a3b1e1d8 100644 --- a/pkg/tests/api/alerting/api_provisioning_test.go +++ b/pkg/tests/api/alerting/api_provisioning_test.go @@ -69,7 +69,7 @@ func createRuleWithNotificationSettings(t *testing.T, client apiClient, folder s }, }, } - resp, status, _ := client.PostRulesGroupWithStatus(t, folder, &rules) + resp, status, _ := client.PostRulesGroupWithStatus(t, folder, &rules, false) assert.Equal(t, http.StatusAccepted, status) require.Len(t, resp.Created, 1) return rules, resp.Created[0] diff --git a/pkg/tests/api/alerting/api_ruler_test.go b/pkg/tests/api/alerting/api_ruler_test.go index 3cdf2d2a20f..884bb50f755 100644 --- a/pkg/tests/api/alerting/api_ruler_test.go +++ b/pkg/tests/api/alerting/api_ruler_test.go @@ -78,7 +78,7 @@ func TestIntegrationAlertRulePermissions(t *testing.T) { require.NoError(t, json.Unmarshal(postGroupRaw, &group1)) // Create rule under folder1 - _, status, response := apiClient.PostRulesGroupWithStatus(t, "folder1", &group1) + _, status, response := apiClient.PostRulesGroupWithStatus(t, "folder1", &group1, false) require.Equalf(t, http.StatusAccepted, status, response) postGroupRaw, err = testData.ReadFile(path.Join("test-data", "rulegroup-2-post.json")) @@ -87,7 +87,7 @@ func TestIntegrationAlertRulePermissions(t *testing.T) { require.NoError(t, json.Unmarshal(postGroupRaw, &group2)) // Create rule under folder2 - _, status, response = apiClient.PostRulesGroupWithStatus(t, "folder2", &group2) + _, status, response = apiClient.PostRulesGroupWithStatus(t, "folder2", &group2, false) require.Equalf(t, http.StatusAccepted, status, response) // With the rules created, let's make sure that rule definitions are stored. @@ -128,6 +128,7 @@ func TestIntegrationAlertRulePermissions(t *testing.T) { "GrafanaManagedAlert.Data.Model", "GrafanaManagedAlert.NamespaceUID", "GrafanaManagedAlert.NamespaceID", + "GrafanaManagedAlert.GUID", } // compare expected and actual and ignore the dynamic fields @@ -384,7 +385,7 @@ func TestIntegrationAlertRuleNestedPermissions(t *testing.T) { require.NoError(t, json.Unmarshal(postGroupRaw, &group1)) // Create rule under folder1 - _, status, response := apiClient.PostRulesGroupWithStatus(t, "folder1", &group1) + _, status, response := apiClient.PostRulesGroupWithStatus(t, "folder1", &group1, false) require.Equalf(t, http.StatusAccepted, status, response) postGroupRaw, err = testData.ReadFile(path.Join("test-data", "rulegroup-2-post.json")) @@ -393,7 +394,7 @@ func TestIntegrationAlertRuleNestedPermissions(t *testing.T) { require.NoError(t, json.Unmarshal(postGroupRaw, &group2)) // Create rule under folder2 - _, status, response = apiClient.PostRulesGroupWithStatus(t, "folder2", &group2) + _, status, response = apiClient.PostRulesGroupWithStatus(t, "folder2", &group2, false) require.Equalf(t, http.StatusAccepted, status, response) postGroupRaw, err = testData.ReadFile(path.Join("test-data", "rulegroup-3-post.json")) @@ -402,7 +403,7 @@ func TestIntegrationAlertRuleNestedPermissions(t *testing.T) { require.NoError(t, json.Unmarshal(postGroupRaw, &group3)) // Create rule under subfolder - _, status, response = apiClient.PostRulesGroupWithStatus(t, "subfolder", &group3) + _, status, response = apiClient.PostRulesGroupWithStatus(t, "subfolder", &group3, false) require.Equalf(t, http.StatusAccepted, status, response) // With the rules created, let's make sure that rule definitions are stored. @@ -449,6 +450,7 @@ func TestIntegrationAlertRuleNestedPermissions(t *testing.T) { "GrafanaManagedAlert.Data.Model", "GrafanaManagedAlert.NamespaceUID", "GrafanaManagedAlert.NamespaceID", + "GrafanaManagedAlert.GUID", } // compare expected and actual and ignore the dynamic fields @@ -842,7 +844,7 @@ func TestIntegrationAlertRuleEditorSettings(t *testing.T) { }, } - respModel, status, _ := apiClient.PostRulesGroupWithStatus(t, folderName, &rules) + respModel, status, _ := apiClient.PostRulesGroupWithStatus(t, folderName, &rules, false) require.Equal(t, http.StatusAccepted, status) require.Len(t, respModel.Created, 1) @@ -874,7 +876,7 @@ func TestIntegrationAlertRuleEditorSettings(t *testing.T) { rulesWithUID := convertGettableRuleGroupToPostable(createdRuleGroup) rulesWithUID.Rules[0].GrafanaManagedAlert.Metadata.EditorSettings.SimplifiedQueryAndExpressionsSection = true - _, status, _ := apiClient.PostRulesGroupWithStatus(t, folderName, &rulesWithUID) + _, status, _ := apiClient.PostRulesGroupWithStatus(t, folderName, &rulesWithUID, false) require.Equal(t, http.StatusAccepted, status) updatedRuleGroup, status := apiClient.GetRulesGroup(t, folderName, groupName) @@ -896,7 +898,7 @@ func TestIntegrationAlertRuleEditorSettings(t *testing.T) { // disabling the editor rulesWithUID.Rules[0].GrafanaManagedAlert.Metadata.EditorSettings.SimplifiedQueryAndExpressionsSection = false - _, status, _ := apiClient.PostRulesGroupWithStatus(t, folderName, &rulesWithUID) + _, status, _ := apiClient.PostRulesGroupWithStatus(t, folderName, &rulesWithUID, false) require.Equal(t, http.StatusAccepted, status) updatedRuleGroup, status := apiClient.GetRulesGroup(t, folderName, groupName) @@ -916,7 +918,7 @@ func TestIntegrationAlertRuleEditorSettings(t *testing.T) { rulesWithUID := convertGettableRuleGroupToPostable(createdRuleGroup) rulesWithUID.Rules[0].GrafanaManagedAlert.Metadata.EditorSettings.SimplifiedNotificationsSection = true - _, status, _ := apiClient.PostRulesGroupWithStatus(t, folderName, &rulesWithUID) + _, status, _ := apiClient.PostRulesGroupWithStatus(t, folderName, &rulesWithUID, false) require.Equal(t, http.StatusAccepted, status) updatedRuleGroup, status := apiClient.GetRulesGroup(t, folderName, groupName) @@ -938,7 +940,7 @@ func TestIntegrationAlertRuleEditorSettings(t *testing.T) { // disabling the editor rulesWithUID.Rules[0].GrafanaManagedAlert.Metadata.EditorSettings.SimplifiedNotificationsSection = false - _, status, _ := apiClient.PostRulesGroupWithStatus(t, folderName, &rulesWithUID) + _, status, _ := apiClient.PostRulesGroupWithStatus(t, folderName, &rulesWithUID, false) require.Equal(t, http.StatusAccepted, status) updatedRuleGroup, status := apiClient.GetRulesGroup(t, folderName, groupName) @@ -988,7 +990,7 @@ func TestIntegrationAlertRuleConflictingTitle(t *testing.T) { rules := newTestingRuleConfig(t) - respModel, status, _ := apiClient.PostRulesGroupWithStatus(t, "folder1", &rules) + respModel, status, _ := apiClient.PostRulesGroupWithStatus(t, "folder1", &rules, false) require.Equal(t, http.StatusAccepted, status) require.Len(t, respModel.Created, len(rules.Rules)) @@ -1002,7 +1004,7 @@ func TestIntegrationAlertRuleConflictingTitle(t *testing.T) { rulesWithUID := convertGettableRuleGroupToPostable(createdRuleGroup.GettableRuleGroupConfig) rulesWithUID.Rules = append(rulesWithUID.Rules, rules.Rules[0]) // Create new copy of first rule. - _, status, body := apiClient.PostRulesGroupWithStatus(t, "folder1", &rulesWithUID) + _, status, body := apiClient.PostRulesGroupWithStatus(t, "folder1", &rulesWithUID, false) assert.Equal(t, http.StatusConflict, status) var res map[string]any @@ -1014,7 +1016,7 @@ func TestIntegrationAlertRuleConflictingTitle(t *testing.T) { rulesWithUID := convertGettableRuleGroupToPostable(createdRuleGroup.GettableRuleGroupConfig) rulesWithUID.Rules[1].GrafanaManagedAlert.Title = "AlwaysFiring" - _, status, body := apiClient.PostRulesGroupWithStatus(t, "folder1", &rulesWithUID) + _, status, body := apiClient.PostRulesGroupWithStatus(t, "folder1", &rulesWithUID, false) assert.Equal(t, http.StatusConflict, status) var res map[string]any @@ -1024,7 +1026,7 @@ func TestIntegrationAlertRuleConflictingTitle(t *testing.T) { t.Run("trying to create alert with same title under another folder should succeed", func(t *testing.T) { rules := newTestingRuleConfig(t) - resp, status, _ := apiClient.PostRulesGroupWithStatus(t, "folder2", &rules) + resp, status, _ := apiClient.PostRulesGroupWithStatus(t, "folder2", &rules, false) require.Equal(t, http.StatusAccepted, status) require.Len(t, resp.Created, len(rules.Rules)) }) @@ -1036,7 +1038,7 @@ func TestIntegrationAlertRuleConflictingTitle(t *testing.T) { rulesWithUID.Rules[0].GrafanaManagedAlert.Title = title1 rulesWithUID.Rules[1].GrafanaManagedAlert.Title = title0 - resp, status, _ := apiClient.PostRulesGroupWithStatus(t, "folder1", &rulesWithUID) + resp, status, _ := apiClient.PostRulesGroupWithStatus(t, "folder1", &rulesWithUID, false) require.Equal(t, http.StatusAccepted, status) require.Len(t, resp.Updated, 2) }) @@ -1046,7 +1048,7 @@ func TestIntegrationAlertRuleConflictingTitle(t *testing.T) { rulesWithUID.Rules[0].GrafanaManagedAlert.Title = rulesWithUID.Rules[1].GrafanaManagedAlert.Title rulesWithUID.Rules[1].GrafanaManagedAlert.Title = "something new" - resp, status, _ := apiClient.PostRulesGroupWithStatus(t, "folder1", &rulesWithUID) + resp, status, _ := apiClient.PostRulesGroupWithStatus(t, "folder1", &rulesWithUID, false) require.Equal(t, http.StatusAccepted, status) require.Len(t, resp.Updated, len(rulesWithUID.Rules)) }) @@ -1136,7 +1138,7 @@ func TestIntegrationRulerRulesFilterByDashboard(t *testing.T) { }, }, } - resp, status, _ := apiClient.PostRulesGroupWithStatus(t, "default", &rules) + resp, status, _ := apiClient.PostRulesGroupWithStatus(t, "default", &rules, false) require.Equal(t, http.StatusAccepted, status) require.Len(t, resp.Created, len(rules.Rules)) } @@ -1180,6 +1182,7 @@ func TestIntegrationRulerRulesFilterByDashboard(t *testing.T) { "is_paused": false, "version": 1, "uid": "uid", + "guid": "guid", "namespace_uid": "nsuid", "rule_group": "anotherrulegroup", "no_data_state": "NoData", @@ -1221,6 +1224,7 @@ func TestIntegrationRulerRulesFilterByDashboard(t *testing.T) { "is_paused": false, "version": 1, "uid": "uid", + "guid": "guid", "namespace_uid": "nsuid", "rule_group": "anotherrulegroup", "no_data_state": "Alerting", @@ -1274,6 +1278,7 @@ func TestIntegrationRulerRulesFilterByDashboard(t *testing.T) { "is_paused": false, "version": 1, "uid": "uid", + "guid": "guid", "namespace_uid": "nsuid", "rule_group": "anotherrulegroup", "no_data_state": "NoData", @@ -1443,9 +1448,9 @@ func TestIntegrationRuleGroupSequence(t *testing.T) { group1 := generateAlertRuleGroup(5, alertRuleGen()) group2 := generateAlertRuleGroup(5, alertRuleGen()) - _, status, _ := client.PostRulesGroupWithStatus(t, folderUID, &group1) + _, status, _ := client.PostRulesGroupWithStatus(t, folderUID, &group1, false) require.Equal(t, http.StatusAccepted, status) - _, status, _ = client.PostRulesGroupWithStatus(t, folderUID, &group2) + _, status, _ = client.PostRulesGroupWithStatus(t, folderUID, &group2, false) require.Equal(t, http.StatusAccepted, status) t.Run("should persist order of the rules in a group", func(t *testing.T) { @@ -1469,7 +1474,7 @@ func TestIntegrationRuleGroupSequence(t *testing.T) { for _, rule := range postableGroup1.Rules { expectedUids = append(expectedUids, rule.GrafanaManagedAlert.UID) } - _, status, _ = client.PostRulesGroupWithStatus(t, folderUID, &postableGroup1) + _, status, _ = client.PostRulesGroupWithStatus(t, folderUID, &postableGroup1, false) require.Equal(t, http.StatusAccepted, status) group1Get, status = client.GetRulesGroup(t, folderUID, group1.Name) @@ -1498,7 +1503,7 @@ func TestIntegrationRuleGroupSequence(t *testing.T) { for _, rule := range postableGroup1.Rules { expectedUids = append(expectedUids, rule.GrafanaManagedAlert.UID) } - _, status, _ = client.PostRulesGroupWithStatus(t, folderUID, &postableGroup1) + _, status, _ = client.PostRulesGroupWithStatus(t, folderUID, &postableGroup1, false) require.Equal(t, http.StatusAccepted, status) group1Get, status = client.GetRulesGroup(t, folderUID, group1.Name) @@ -1627,7 +1632,7 @@ func TestIntegrationRuleCreate(t *testing.T) { for _, tc := range cases { t.Run(tc.name, func(t *testing.T) { - resp, status, _ := client.PostRulesGroupWithStatus(t, namespaceUID, &tc.config) + resp, status, _ := client.PostRulesGroupWithStatus(t, namespaceUID, &tc.config, false) require.Equal(t, http.StatusAccepted, status) require.Len(t, resp.Created, 1) require.Len(t, resp.Updated, 0) @@ -1640,6 +1645,7 @@ func TestIntegrationRuleCreate(t *testing.T) { "GrafanaManagedAlert.UID", "GrafanaManagedAlert.ID", "GrafanaManagedAlert.NamespaceID", + "GrafanaManagedAlert.GUID", } // compare expected and actual and ignore the dynamic fields @@ -1711,7 +1717,7 @@ func TestIntegrationRuleUpdate(t *testing.T) { expected := model.Duration(10 * time.Second) group.Rules[0].ApiRuleNode.For = &expected - _, status, body := client.PostRulesGroupWithStatus(t, folderUID, &group) + _, status, body := client.PostRulesGroupWithStatus(t, folderUID, &group, false) require.Equalf(t, http.StatusAccepted, status, "failed to post rule group. Response: %s", body) getGroup, status := client.GetRulesGroup(t, folderUID, group.Name) require.Equal(t, http.StatusAccepted, status) @@ -1720,7 +1726,7 @@ func TestIntegrationRuleUpdate(t *testing.T) { group = convertGettableRuleGroupToPostable(getGroup.GettableRuleGroupConfig) expected = 0 group.Rules[0].ApiRuleNode.For = &expected - _, status, body = client.PostRulesGroupWithStatus(t, folderUID, &group) + _, status, body = client.PostRulesGroupWithStatus(t, folderUID, &group, false) require.Equalf(t, http.StatusAccepted, status, "failed to post rule group. Response: %s", body) getGroup, status = client.GetRulesGroup(t, folderUID, group.Name) @@ -1733,7 +1739,7 @@ func TestIntegrationRuleUpdate(t *testing.T) { ds1 := adminClient.CreateTestDatasource(t) group := generateAlertRuleGroup(3, alertRuleGen(withDatasourceQuery(ds1.Body.Datasource.UID))) - _, status, body := client.PostRulesGroupWithStatus(t, folderUID, &group) + _, status, body := client.PostRulesGroupWithStatus(t, folderUID, &group, false) require.Equalf(t, http.StatusAccepted, status, "failed to post rule group. Response: %s", body) getGroup, status := client.GetRulesGroup(t, folderUID, group.Name) @@ -1755,7 +1761,7 @@ func TestIntegrationRuleUpdate(t *testing.T) { require.Equal(t, http.StatusAccepted, status) group := convertGettableRuleGroupToPostable(getGroup.GettableRuleGroupConfig) - _, status, body := client.PostRulesGroupWithStatus(t, folderUID, &group) + _, status, body := client.PostRulesGroupWithStatus(t, folderUID, &group, false) require.Equalf(t, http.StatusAccepted, status, "failed to post noop rule group. Response: %s", body) }) t.Run("should not let update rule if it does not fix datasource", func(t *testing.T) { @@ -1764,7 +1770,7 @@ func TestIntegrationRuleUpdate(t *testing.T) { group := convertGettableRuleGroupToPostable(getGroup.GettableRuleGroupConfig) group.Rules[0].GrafanaManagedAlert.Title = uuid.NewString() - resp, status, body := client.PostRulesGroupWithStatus(t, folderUID, &group) + resp, status, body := client.PostRulesGroupWithStatus(t, folderUID, &group, false) if status == http.StatusAccepted { assert.Len(t, resp.Deleted, 1) @@ -1782,7 +1788,7 @@ func TestIntegrationRuleUpdate(t *testing.T) { // remove the last rule. group.Rules = group.Rules[0 : len(group.Rules)-1] - resp, status, body := client.PostRulesGroupWithStatus(t, folderUID, &group) + resp, status, body := client.PostRulesGroupWithStatus(t, folderUID, &group, false) require.Equalf(t, http.StatusAccepted, status, "failed to delete last rule from group. Response: %s", body) assert.Len(t, resp.Deleted, 1) @@ -1798,7 +1804,7 @@ func TestIntegrationRuleUpdate(t *testing.T) { ds2 := adminClient.CreateTestDatasource(t) withDatasourceQuery(ds2.Body.Datasource.UID)(&group.Rules[0]) - resp, status, body := client.PostRulesGroupWithStatus(t, folderUID, &group) + resp, status, body := client.PostRulesGroupWithStatus(t, folderUID, &group, false) require.Equalf(t, http.StatusAccepted, status, "failed to post noop rule group. Response: %s", body) assert.Len(t, resp.Deleted, 0) assert.Len(t, resp.Updated, 2) @@ -1810,7 +1816,7 @@ func TestIntegrationRuleUpdate(t *testing.T) { require.Equal(t, ds2.Body.Datasource.UID, group.Rules[0].GrafanaManagedAlert.Data[0].DatasourceUID) }) t.Run("should let delete group", func(t *testing.T) { - status, body := client.DeleteRulesGroup(t, folderUID, groupName) + status, body := client.DeleteRulesGroup(t, folderUID, groupName, false) require.Equalf(t, http.StatusAccepted, status, "failed to post noop rule group. Response: %s", body) }) }) @@ -1819,7 +1825,7 @@ func TestIntegrationRuleUpdate(t *testing.T) { expected := model.Duration(10 * time.Second) group.Rules[0].ApiRuleNode.For = &expected - _, status, body := client.PostRulesGroupWithStatus(t, folderUID, &group) + _, status, body := client.PostRulesGroupWithStatus(t, folderUID, &group, false) require.Equalf(t, http.StatusAccepted, status, "failed to post rule group. Response: %s", body) getGroup, status := client.GetRulesGroup(t, folderUID, group.Name) require.Equal(t, http.StatusAccepted, status) @@ -1955,7 +1961,7 @@ func TestIntegrationAlertAndGroupsQuery(t *testing.T) { }, } - _, status, _ := apiClient.PostRulesGroupWithStatus(t, "default", &rules) + _, status, _ := apiClient.PostRulesGroupWithStatus(t, "default", &rules, false) require.Equal(t, http.StatusAccepted, status) } @@ -2095,7 +2101,7 @@ func TestIntegrationRulerAccess(t *testing.T) { }, }, } - _, status, body := tc.client.PostRulesGroupWithStatus(t, "default", &rules) + _, status, body := tc.client.PostRulesGroupWithStatus(t, "default", &rules, false) assert.Equal(t, tc.expStatus, status) res := &Response{} err = json.Unmarshal([]byte(body), &res) @@ -2476,7 +2482,7 @@ func TestIntegrationQuota(t *testing.T) { }, }, } - _, status, body := apiClient.PostRulesGroupWithStatus(t, "default", &rules) + _, status, body := apiClient.PostRulesGroupWithStatus(t, "default", &rules, false) assert.Equal(t, http.StatusForbidden, status) var res map[string]any require.NoError(t, json.Unmarshal([]byte(body), &res)) @@ -2513,7 +2519,7 @@ func TestIntegrationQuota(t *testing.T) { }, } - respModel, status, _ := apiClient.PostRulesGroupWithStatus(t, "default", &rules) + respModel, status, _ := apiClient.PostRulesGroupWithStatus(t, "default", &rules, false) require.Equal(t, http.StatusAccepted, status) require.Len(t, respModel.Updated, 1) @@ -2575,6 +2581,7 @@ func TestIntegrationQuota(t *testing.T) { "is_paused": false, "version":2, "uid":"uid", + "guid": "guid", "namespace_uid":"nsuid", "rule_group":"arulegroup", "no_data_state":"NoData", @@ -2688,6 +2695,7 @@ func TestIntegrationDeleteFolderWithRules(t *testing.T) { "is_paused": false, "version": 1, "uid": "uid", + "guid": "guid", "namespace_uid": "nsuid", "rule_group": "arulegroup", "no_data_state": "NoData", @@ -3019,7 +3027,7 @@ func TestIntegrationAlertRuleCRUD(t *testing.T) { tc.rule, }, } - _, status, body := apiClient.PostRulesGroupWithStatus(t, "default", &rules) + _, status, body := apiClient.PostRulesGroupWithStatus(t, "default", &rules, false) res := &Response{} err = json.Unmarshal([]byte(body), &res) require.NoError(t, err) @@ -3092,7 +3100,7 @@ func TestIntegrationAlertRuleCRUD(t *testing.T) { }, }, } - resp, status, _ := apiClient.PostRulesGroupWithStatus(t, "default", &rules) + resp, status, _ := apiClient.PostRulesGroupWithStatus(t, "default", &rules, false) require.Equal(t, http.StatusAccepted, status) require.Equal(t, "rule group updated successfully", resp.Message) assert.Len(t, resp.Created, 2) @@ -3169,7 +3177,8 @@ func TestIntegrationAlertRuleCRUD(t *testing.T) { "intervalSeconds":60, "is_paused": false, "version":1, - "uid":"uid", + "uid":"uid", + "guid": "guid", "namespace_uid":"nsuid", "rule_group":"arulegroup", "no_data_state":"NoData", @@ -3214,6 +3223,7 @@ func TestIntegrationAlertRuleCRUD(t *testing.T) { "is_paused": false, "version":1, "uid":"uid", + "guid": "guid", "namespace_uid":"nsuid", "rule_group":"arulegroup", "no_data_state":"Alerting", @@ -3332,7 +3342,7 @@ func TestIntegrationAlertRuleCRUD(t *testing.T) { Interval: interval, } - response, status, _ := apiClient.PostRulesGroupWithStatus(t, "default", &rules) + response, status, _ := apiClient.PostRulesGroupWithStatus(t, "default", &rules, false) assert.Equal(t, http.StatusAccepted, status) require.Len(t, response.Created, 1) @@ -3403,7 +3413,7 @@ func TestIntegrationAlertRuleCRUD(t *testing.T) { Interval: interval, } - response, status, _ := apiClient.PostRulesGroupWithStatus(t, "default", &rules) + response, status, _ := apiClient.PostRulesGroupWithStatus(t, "default", &rules, false) assert.Equal(t, http.StatusAccepted, status) require.Len(t, response.Created, 0) @@ -3490,7 +3500,7 @@ func TestIntegrationAlertRuleCRUD(t *testing.T) { }, Interval: interval, } - _, status, body := apiClient.PostRulesGroupWithStatus(t, "default", &rules) + _, status, body := apiClient.PostRulesGroupWithStatus(t, "default", &rules, false) assert.Equal(t, http.StatusBadRequest, status) var res map[string]any require.NoError(t, json.Unmarshal([]byte(body), &res)) @@ -3559,6 +3569,7 @@ func TestIntegrationAlertRuleCRUD(t *testing.T) { "is_paused": false, "version":3, "uid":"uid", + "guid": "guid", "namespace_uid":"nsuid", "rule_group":"arulegroup", "no_data_state":"NoData", @@ -3603,6 +3614,7 @@ func TestIntegrationAlertRuleCRUD(t *testing.T) { "is_paused": false, "version":3, "uid":"uid", + "guid": "guid", "namespace_uid":"nsuid", "rule_group":"arulegroup", "no_data_state":"Alerting", @@ -3669,7 +3681,7 @@ func TestIntegrationAlertRuleCRUD(t *testing.T) { }, Interval: interval, } - respModel, status, _ := apiClient.PostRulesGroupWithStatus(t, "default", &rules) + respModel, status, _ := apiClient.PostRulesGroupWithStatus(t, "default", &rules, false) require.Equal(t, http.StatusAccepted, status) require.Equal(t, respModel.Updated, []string{ruleUID}) require.Len(t, respModel.Deleted, 1) @@ -3740,6 +3752,7 @@ func TestIntegrationAlertRuleCRUD(t *testing.T) { "is_paused": false, "version":4, "uid":"uid", + "guid": "guid", "namespace_uid":"nsuid", "rule_group":"arulegroup", "no_data_state":"Alerting", @@ -3795,7 +3808,7 @@ func TestIntegrationAlertRuleCRUD(t *testing.T) { }, Interval: interval, } - respModel, status, _ := apiClient.PostRulesGroupWithStatus(t, "default", &rules) + respModel, status, _ := apiClient.PostRulesGroupWithStatus(t, "default", &rules, false) require.Equal(t, http.StatusAccepted, status) require.Equal(t, respModel.Updated, []string{ruleUID}) @@ -3857,6 +3870,7 @@ func TestIntegrationAlertRuleCRUD(t *testing.T) { "is_paused":false, "version":5, "uid":"uid", + "guid": "guid", "namespace_uid":"nsuid", "rule_group":"arulegroup", "no_data_state":"Alerting", @@ -3888,7 +3902,7 @@ func TestIntegrationAlertRuleCRUD(t *testing.T) { }, Interval: interval, } - respModel, status, _ := apiClient.PostRulesGroupWithStatus(t, "default", &rules) + respModel, status, _ := apiClient.PostRulesGroupWithStatus(t, "default", &rules, false) require.Equal(t, http.StatusAccepted, status) require.Equal(t, "no changes detected in the rule group", respModel.Message) assert.Empty(t, respModel.Created) @@ -3953,6 +3967,7 @@ func TestIntegrationAlertRuleCRUD(t *testing.T) { "is_paused":false, "version":5, "uid":"uid", + "guid": "guid", "namespace_uid":"nsuid", "rule_group":"arulegroup", "no_data_state":"Alerting", @@ -4040,7 +4055,7 @@ func TestIntegrationRulePause(t *testing.T) { expectedIsPaused := true group.Rules[0].GrafanaManagedAlert.IsPaused = &expectedIsPaused - resp, status, body := client.PostRulesGroupWithStatus(t, folderUID, &group) + resp, status, body := client.PostRulesGroupWithStatus(t, folderUID, &group, false) require.Equalf(t, http.StatusAccepted, status, "failed to post rule group. Response: %s", body) require.Len(t, resp.Created, 1) getGroup, status := client.GetRulesGroup(t, folderUID, group.Name) @@ -4054,7 +4069,7 @@ func TestIntegrationRulePause(t *testing.T) { expectedIsPaused := false group.Rules[0].GrafanaManagedAlert.IsPaused = &expectedIsPaused - resp, status, body := client.PostRulesGroupWithStatus(t, folderUID, &group) + resp, status, body := client.PostRulesGroupWithStatus(t, folderUID, &group, false) require.Equalf(t, http.StatusAccepted, status, "failed to post rule group. Response: %s", body) require.Len(t, resp.Created, 1) getGroup, status := client.GetRulesGroup(t, folderUID, group.Name) @@ -4067,7 +4082,7 @@ func TestIntegrationRulePause(t *testing.T) { group := generateAlertRuleGroup(1, alertRuleGen()) group.Rules[0].GrafanaManagedAlert.IsPaused = nil - resp, status, body := client.PostRulesGroupWithStatus(t, folderUID, &group) + resp, status, body := client.PostRulesGroupWithStatus(t, folderUID, &group, false) require.Equalf(t, http.StatusAccepted, status, "failed to post rule group. Response: %s", body) require.Len(t, resp.Created, 1) getGroup, status := client.GetRulesGroup(t, folderUID, group.Name) @@ -4125,14 +4140,14 @@ func TestIntegrationRulePause(t *testing.T) { group := generateAlertRuleGroup(1, alertRuleGen()) group.Rules[0].GrafanaManagedAlert.IsPaused = &tc.isPausedInDb - _, status, body := client.PostRulesGroupWithStatus(t, folderUID, &group) + _, status, body := client.PostRulesGroupWithStatus(t, folderUID, &group, false) require.Equalf(t, http.StatusAccepted, status, "failed to post rule group. Response: %s", body) getGroup, status := client.GetRulesGroup(t, folderUID, group.Name) require.Equalf(t, http.StatusAccepted, status, "failed to get rule group. Response: %s", body) group = convertGettableRuleGroupToPostable(getGroup.GettableRuleGroupConfig) group.Rules[0].GrafanaManagedAlert.IsPaused = tc.isPausedInBody - _, status, body = client.PostRulesGroupWithStatus(t, folderUID, &group) + _, status, body = client.PostRulesGroupWithStatus(t, folderUID, &group, false) require.Equalf(t, http.StatusAccepted, status, "failed to post rule group. Response: %s", body) getGroup, status = client.GetRulesGroup(t, folderUID, group.Name) @@ -4180,7 +4195,7 @@ func TestIntegrationHysteresisRule(t *testing.T) { rule.GrafanaManagedAlert.Data[i].DatasourceUID = strings.ReplaceAll(rule.GrafanaManagedAlert.Data[i].DatasourceUID, "REPLACE_ME", testDs.Body.Datasource.UID) } } - changes, status, body := apiClient.PostRulesGroupWithStatus(t, folder, &postData) + changes, status, body := apiClient.PostRulesGroupWithStatus(t, folder, &postData, false) require.Equalf(t, http.StatusAccepted, status, body) require.Len(t, changes.Created, 1) ruleUid := changes.Created[0] @@ -4265,7 +4280,7 @@ func TestIntegrationRuleNotificationSettings(t *testing.T) { ns := group.Rules[0].GrafanaManagedAlert.NotificationSettings ns.Receiver = "random-receiver" - _, status, body := apiClient.PostRulesGroupWithStatus(t, folder, &group) + _, status, body := apiClient.PostRulesGroupWithStatus(t, folder, &group, false) require.Equalf(t, http.StatusBadRequest, status, body) t.Log(body) }) @@ -4277,7 +4292,7 @@ func TestIntegrationRuleNotificationSettings(t *testing.T) { ns := group.Rules[0].GrafanaManagedAlert.NotificationSettings ns.MuteTimeIntervals = []string{"random-time-interval"} - _, status, body := apiClient.PostRulesGroupWithStatus(t, folder, &group) + _, status, body := apiClient.PostRulesGroupWithStatus(t, folder, &group, false) require.Equalf(t, http.StatusBadRequest, status, body) t.Log(body) }) @@ -4289,7 +4304,7 @@ func TestIntegrationRuleNotificationSettings(t *testing.T) { ns := group.Rules[0].GrafanaManagedAlert.NotificationSettings ns.GroupBy = []string{"label1"} - _, status, body := apiClient.PostRulesGroupWithStatus(t, folder, &group) + _, status, body := apiClient.PostRulesGroupWithStatus(t, folder, &group, false) require.Equalf(t, http.StatusAccepted, status, body) cfg, status, body := apiClient.GetAlertmanagerConfigWithStatus(t) @@ -4313,7 +4328,7 @@ func TestIntegrationRuleNotificationSettings(t *testing.T) { ns := group.Rules[0].GrafanaManagedAlert.NotificationSettings ns.GroupBy = []string{ngmodels.FolderTitleLabel, model.AlertNameLabel, ngmodels.GroupByAll} - _, status, body := apiClient.PostRulesGroupWithStatus(t, folder, &group) + _, status, body := apiClient.PostRulesGroupWithStatus(t, folder, &group, false) require.Equalf(t, http.StatusAccepted, status, body) // Now update the config with no changes. @@ -4333,7 +4348,7 @@ func TestIntegrationRuleNotificationSettings(t *testing.T) { }) t.Run("should create rule and generate route", func(t *testing.T) { - _, status, body := apiClient.PostRulesGroupWithStatus(t, folder, &d.RuleGroup) + _, status, body := apiClient.PostRulesGroupWithStatus(t, folder, &d.RuleGroup, false) require.Equalf(t, http.StatusAccepted, status, body) notificationSettings := d.RuleGroup.Rules[0].GrafanaManagedAlert.NotificationSettings @@ -4454,7 +4469,7 @@ func TestIntegrationRuleNotificationSettings(t *testing.T) { notificationSettings := group.Rules[0].GrafanaManagedAlert.NotificationSettings group.Rules[0].GrafanaManagedAlert.NotificationSettings = nil - _, status, body := apiClient.PostRulesGroupWithStatus(t, folder, &group) + _, status, body := apiClient.PostRulesGroupWithStatus(t, folder, &group, false) require.Equalf(t, http.StatusAccepted, status, body) var routeBody string @@ -4524,7 +4539,7 @@ func TestIntegrationRuleUpdateAllDatabases(t *testing.T) { group := generateAlertRuleGroup(3, alertRuleGen()) groupName := group.Name - _, status, body := client.PostRulesGroupWithStatus(t, folderUID, &group) + _, status, body := client.PostRulesGroupWithStatus(t, folderUID, &group, false) require.Equalf(t, http.StatusAccepted, status, "failed to post rule group. Response: %s", body) getGroup, status := client.GetRulesGroup(t, folderUID, group.Name) require.Equal(t, http.StatusAccepted, status) @@ -4534,7 +4549,7 @@ func TestIntegrationRuleUpdateAllDatabases(t *testing.T) { group = convertGettableRuleGroupToPostable(getGroup.GettableRuleGroupConfig) newGroup := strings.ToUpper(group.Name) group.Name = newGroup - _, status, body = client.PostRulesGroupWithStatus(t, folderUID, &group) + _, status, body = client.PostRulesGroupWithStatus(t, folderUID, &group, false) require.Equalf(t, http.StatusAccepted, status, "failed to post rule group. Response: %s", body) getGroup, status = client.GetRulesGroup(t, folderUID, group.Name) @@ -4542,7 +4557,7 @@ func TestIntegrationRuleUpdateAllDatabases(t *testing.T) { require.Lenf(t, getGroup.Rules, 3, "expected 3 rules in group") require.Equal(t, newGroup, getGroup.Rules[0].GrafanaManagedAlert.RuleGroup) - status, body = client.DeleteRulesGroup(t, folderUID, groupName) + status, body = client.DeleteRulesGroup(t, folderUID, groupName, false) require.Equalf(t, http.StatusAccepted, status, "failed to post noop rule group. Response: %s", body) // Old group is gone. @@ -4588,7 +4603,7 @@ func TestIntegrationRuleVersions(t *testing.T) { require.NoError(t, json.Unmarshal(postGroupRaw, &group1)) // Create rule under folder1 - response := apiClient.PostRulesGroup(t, "folder1", &group1) + response := apiClient.PostRulesGroup(t, "folder1", &group1, false) require.NotEmptyf(t, response.Created, "Expected created to be set") uid := response.Created[0] @@ -4607,7 +4622,7 @@ func TestIntegrationRuleVersions(t *testing.T) { group1 = convertGettableRuleGroupToPostable(group1Gettable.GettableRuleGroupConfig) group1.Rules[0].Annotations[util.GenerateShortUID()] = util.GenerateShortUID() - _ = apiClient.PostRulesGroup(t, "folder1", &group1) + _ = apiClient.PostRulesGroup(t, "folder1", &group1, false) ruleV2 := apiClient.GetRuleByUID(t, uid) @@ -4631,7 +4646,7 @@ func TestIntegrationRuleVersions(t *testing.T) { assert.Empty(t, diff) }) - _ = apiClient.PostRulesGroup(t, "folder1", &group1) // Noop update + _ = apiClient.PostRulesGroup(t, "folder1", &group1, false) // Noop update t.Run("should not add new version if rule was not changed", func(t *testing.T) { versions, status, raw := apiClient.GetRuleVersionsWithStatus(t, uid) @@ -4639,7 +4654,7 @@ func TestIntegrationRuleVersions(t *testing.T) { require.Lenf(t, versions, 2, "Expected 2 versions, got %d", len(versions)) }) - apiClient.DeleteRulesGroup(t, "folder1", group1.Name) + apiClient.DeleteRulesGroup(t, "folder1", group1.Name, false) t.Run("should NotFound after rule was deleted", func(t *testing.T) { _, status, raw := apiClient.GetRuleVersionsWithStatus(t, uid) @@ -4692,7 +4707,7 @@ func TestIntegrationRuleSoftDelete(t *testing.T) { require.NoError(t, json.Unmarshal(postGroupRaw, &group1)) // Create rule under folder1 - response := adminClient.PostRulesGroup(t, "folder1", &group1) + response := adminClient.PostRulesGroup(t, "folder1", &group1, false) require.NotEmptyf(t, response.Created, "Expected created to be set") // create some versions of the rule @@ -4701,14 +4716,14 @@ func TestIntegrationRuleSoftDelete(t *testing.T) { require.Equal(t, http.StatusAccepted, status) group1 = convertGettableRuleGroupToPostable(groups.GettableRuleGroupConfig) group1.Rules[0].Annotations[util.GenerateShortUID()] = util.GenerateShortUID() - _ = adminClient.PostRulesGroup(t, "folder1", &group1) + _ = adminClient.PostRulesGroup(t, "folder1", &group1, false) } group, status = adminClient.GetRulesGroup(t, "folder1", group1.Name) require.Equal(t, http.StatusAccepted, status) } // deleting group by using editor user - status, body := editorClient.DeleteRulesGroup(t, "folder1", group.Name) + status, body := editorClient.DeleteRulesGroup(t, "folder1", group.Name, false) require.Equalf(t, http.StatusAccepted, status, "failed to delete group. Response: %s", body) t.Run("should see deleted rules", func(t *testing.T) { @@ -4741,6 +4756,120 @@ func TestIntegrationRuleSoftDelete(t *testing.T) { requireStatusCode(t, http.StatusForbidden, status, raw) }) }) + + t.Run("permanently delete rule from deleted rules", func(t *testing.T) { + rules, status, raw := adminClient.GetDeletedRulesWithStatus(t) + requireStatusCode(t, http.StatusOK, status, raw) + require.NotEmpty(t, rules[""][0].Rules) + ruleGUID := rules[""][0].Rules[0].GrafanaManagedAlert.GUID + t.Run("non-admins should not be able to do it", func(t *testing.T) { + status, raw := editorClient.DeleteRuleFromTrashByGUID(t, ruleGUID) + requireStatusCode(t, http.StatusForbidden, status, raw) + }) + + status, raw = adminClient.DeleteRuleFromTrashByGUID(t, ruleGUID) + requireStatusCode(t, http.StatusOK, status, raw) + + rules, status, raw = adminClient.GetDeletedRulesWithStatus(t) + requireStatusCode(t, http.StatusOK, status, raw) + idx := slices.IndexFunc(rules[""][0].Rules, func(node apimodels.GettableExtendedRuleNode) bool { + return node.GrafanaManagedAlert.GUID == ruleGUID + }) + require.Equalf(t, -1, idx, "rule is expected to be deleted but it was returned by list operation") + }) +} + +func TestIntegrationRulePermanentlyDelete(t *testing.T) { + testinfra.SQLiteIntegrationTest(t) + + // Setup Grafana and its Database + dir, p := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{ + DisableLegacyAlerting: true, + EnableUnifiedAlerting: true, + EnableQuota: true, + DisableAnonymous: true, + AppModeProduction: true, + EnableFeatureToggles: []string{featuremgmt.FlagAlertRuleRestore}, + }) + + grafanaListedAddr, env := testinfra.StartGrafanaEnv(t, dir, p) + + createUser(t, env.SQLStore, env.Cfg, user.CreateUserCommand{ + DefaultOrgRole: string(org.RoleAdmin), + Password: "admin", + Login: "admin", + }) + + createUser(t, env.SQLStore, env.Cfg, user.CreateUserCommand{ + DefaultOrgRole: string(org.RoleEditor), + Password: "password", + Login: "editor", + }) + + adminClient := newAlertingApiClient(grafanaListedAddr, "admin", "admin") + editorClient := newAlertingApiClient(grafanaListedAddr, "editor", "password") + + postGroupRaw, err := testData.ReadFile(path.Join("test-data", "rulegroup-1-post.json")) + require.NoError(t, err) + var group1 apimodels.PostableRuleGroupConfig + require.NoError(t, json.Unmarshal(postGroupRaw, &group1)) + require.Greaterf(t, len(group1.Rules), 1, "group should contain at least 2 rules") + + // Create the namespace we'll save our alerts to. + adminClient.CreateFolder(t, "folder1", "folder1") + // Create rule under folder1 + response := adminClient.PostRulesGroup(t, "folder1", &group1, false) + require.NotEmptyf(t, response.Created, "Expected created to be set") + + deleted, status, raw := adminClient.GetDeletedRulesWithStatus(t) + requireStatusCode(t, http.StatusOK, status, raw) + require.Emptyf(t, deleted, "Expected empty list of deleted rules, got %v", deleted) + + t.Run("delete rule in group permanently", func(t *testing.T) { + group1Before, _ := adminClient.GetRulesGroup(t, "folder1", group1.Name) + group1 = convertGettableRuleGroupToPostable(group1Before.GettableRuleGroupConfig) + group1.Rules = group1.Rules[:1] // remove one rule + + t.Run("denied to non-admin", func(t *testing.T) { + _, status, raw := editorClient.PostRulesGroupWithStatus(t, "folder1", &group1, true) + require.Equalf(t, http.StatusForbidden, status, "got unexpected response: %s", raw) + g, _ := editorClient.GetRulesGroup(t, "folder1", group1.Name) + require.Len(t, g.Rules, len(group1Before.Rules)) + }) + + t.Run("allowed to admin", func(t *testing.T) { + _, status, raw := adminClient.PostRulesGroupWithStatus(t, "folder1", &group1, true) + require.Equalf(t, http.StatusAccepted, status, "got unexpected response: %s", raw) + g, _ := adminClient.GetRulesGroup(t, "folder1", group1.Name) + require.Len(t, g.Rules, len(group1.Rules)) + + deleted, status, raw := adminClient.GetDeletedRulesWithStatus(t) + requireStatusCode(t, http.StatusOK, status, raw) + require.Emptyf(t, deleted, "Expected empty list of deleted rules, got %v", deleted) + }) + }) + + t.Run("delete group permanently", func(t *testing.T) { + group1, status, raw := adminClient.GetRulesGroupWithStatus(t, "folder1", group1.Name) + require.Equalf(t, http.StatusAccepted, status, "got unexpected response: %s", raw) + + t.Run("denied to non-admin", func(t *testing.T) { + status, raw := editorClient.DeleteRulesGroup(t, "folder1", group1.Name, true) + require.Equalf(t, http.StatusForbidden, status, "got unexpected response: %s", raw) + g, _ := editorClient.GetRulesGroup(t, "folder1", group1.Name) + require.Len(t, g.Rules, len(group1.Rules)) + }) + t.Run("allowed to admin", func(t *testing.T) { + status, raw := adminClient.DeleteRulesGroup(t, "folder1", group1.Name, true) + require.Equalf(t, http.StatusAccepted, status, "got unexpected response: %s", raw) + _, status, rawb := adminClient.GetRulesGroupWithStatus(t, "folder1", group1.Name) + require.Equalf(t, http.StatusNotFound, status, "got unexpected response: %s", string(rawb)) + + deleted, status, raw := adminClient.GetDeletedRulesWithStatus(t) + requireStatusCode(t, http.StatusOK, status, raw) + require.Emptyf(t, deleted, "Expected empty list of deleted rules, got %v", deleted) + }) + }) } func newTestingRuleConfig(t *testing.T) apimodels.PostableRuleGroupConfig { @@ -4833,6 +4962,7 @@ func rulesNamespaceWithoutVariableValues(t *testing.T, b []byte) (string, map[st rule.GrafanaManagedAlert.NamespaceUID = "nsuid" rule.GrafanaManagedAlert.Updated = time.Date(2021, time.Month(2), 21, 1, 10, 30, 0, time.UTC) rule.GrafanaManagedAlert.UpdatedBy.UID = "uid" + rule.GrafanaManagedAlert.GUID = "guid" } } } @@ -4879,7 +5009,7 @@ func createRule(t *testing.T, client apiClient, folder string) (apimodels.Postab }, }, } - resp, status, _ := client.PostRulesGroupWithStatus(t, folder, &rules) + resp, status, _ := client.PostRulesGroupWithStatus(t, folder, &rules, false) require.Equal(t, http.StatusAccepted, status) require.Len(t, resp.Created, 1) return rules, resp.Created[0] diff --git a/pkg/tests/api/alerting/testing.go b/pkg/tests/api/alerting/testing.go index 25a25fd4e58..429f32e755e 100644 --- a/pkg/tests/api/alerting/testing.go +++ b/pkg/tests/api/alerting/testing.go @@ -454,7 +454,7 @@ func (a apiClient) PostConfiguration(t *testing.T, c apimodels.PostableUserConfi return false, errors.New(data.Message) } -func (a apiClient) PostRulesGroupWithStatus(t *testing.T, folder string, group *apimodels.PostableRuleGroupConfig) (apimodels.UpdateRuleGroupResponse, int, string) { +func (a apiClient) PostRulesGroupWithStatus(t *testing.T, folder string, group *apimodels.PostableRuleGroupConfig, permanentlyDelete bool) (apimodels.UpdateRuleGroupResponse, int, string) { t.Helper() buf := bytes.Buffer{} enc := json.NewEncoder(&buf) @@ -462,6 +462,14 @@ func (a apiClient) PostRulesGroupWithStatus(t *testing.T, folder string, group * require.NoError(t, err) u := fmt.Sprintf("%s/api/ruler/grafana/api/v1/rules/%s", a.url, folder) + uri, err := url.Parse(u) + require.NoError(t, err) + q := uri.Query() + if permanentlyDelete { + q.Set("deletePermanently", "true") + } + uri.RawQuery = q.Encode() + u = uri.String() // nolint:gosec resp, err := http.Post(u, "application/json", &buf) require.NoError(t, err) @@ -477,9 +485,9 @@ func (a apiClient) PostRulesGroupWithStatus(t *testing.T, folder string, group * return m, resp.StatusCode, string(b) } -func (a apiClient) PostRulesGroup(t *testing.T, folder string, group *apimodels.PostableRuleGroupConfig) apimodels.UpdateRuleGroupResponse { +func (a apiClient) PostRulesGroup(t *testing.T, folder string, group *apimodels.PostableRuleGroupConfig, permanentlyDelete bool) apimodels.UpdateRuleGroupResponse { t.Helper() - m, status, raw := a.PostRulesGroupWithStatus(t, folder, group) + m, status, raw := a.PostRulesGroupWithStatus(t, folder, group, permanentlyDelete) requireStatusCode(t, http.StatusAccepted, status, raw) return m } @@ -520,22 +528,21 @@ func (a apiClient) PostRulesExportWithStatus(t *testing.T, folder string, group return resp.StatusCode, string(b) } -func (a apiClient) DeleteRulesGroup(t *testing.T, folder string, group string) (int, string) { +func (a apiClient) DeleteRulesGroup(t *testing.T, folder string, group string, permanently bool) (int, string) { t.Helper() u := fmt.Sprintf("%s/api/ruler/grafana/api/v1/rules/%s/%s", a.url, folder, group) req, err := http.NewRequest(http.MethodDelete, u, nil) require.NoError(t, err) - client := &http.Client{} - resp, err := client.Do(req) - require.NoError(t, err) - defer func() { - _ = resp.Body.Close() - }() - b, err := io.ReadAll(resp.Body) + + if permanently { + req.URL.RawQuery = url.Values{"deletePermanently": []string{"true"}}.Encode() + } + + resp, status, err := sendRequestRaw(t, req) require.NoError(t, err) - return resp.StatusCode, string(b) + return status, string(resp) } func (a apiClient) PostSilence(t *testing.T, s apimodels.PostableSilence) (apimodels.PostSilencesOKBody, int, string) { @@ -657,6 +664,15 @@ func (a apiClient) GetDeletedRulesWithStatus(t *testing.T) (apimodels.NamespaceC return sendRequestJSON[apimodels.NamespaceConfigResponse](t, req, http.StatusOK) } +func (a apiClient) DeleteRuleFromTrashByGUID(t *testing.T, ruleGUID string) (int, string) { + t.Helper() + req, err := http.NewRequest(http.MethodDelete, fmt.Sprintf("%s/api/ruler/grafana/api/v1/trash/rule/guid/%s", a.url, ruleGUID), nil) + require.NoError(t, err) + raw, status, err := sendRequestRaw(t, req) + require.NoError(t, err) + return status, string(raw) +} + func (a apiClient) ExportRulesWithStatus(t *testing.T, params *apimodels.AlertRulesExportParameters) (int, string) { t.Helper() u, err := url.Parse(fmt.Sprintf("%s/api/ruler/grafana/api/v1/export/rules", a.url)) diff --git a/pkg/tests/apis/alerting/notifications/receivers/receiver_test.go b/pkg/tests/apis/alerting/notifications/receivers/receiver_test.go index c483b6938ae..34475e9d4c3 100644 --- a/pkg/tests/apis/alerting/notifications/receivers/receiver_test.go +++ b/pkg/tests/apis/alerting/notifications/receivers/receiver_test.go @@ -781,7 +781,7 @@ func TestIntegrationInUseMetadata(t *testing.T) { folderUID := "test-folder" legacyCli.CreateFolder(t, folderUID, "TEST") - _, status, data := legacyCli.PostRulesGroupWithStatus(t, folderUID, &ruleGroup) + _, status, data := legacyCli.PostRulesGroupWithStatus(t, folderUID, &ruleGroup, false) require.Equalf(t, http.StatusAccepted, status, "Failed to post Rule: %s", data) requestReceivers := func(t *testing.T, title string) (v0alpha1.Receiver, v0alpha1.Receiver) { @@ -825,7 +825,7 @@ func TestIntegrationInUseMetadata(t *testing.T) { // Remove the extra rules. ruleGroup.Rules = ruleGroup.Rules[:1] - _, status, data = legacyCli.PostRulesGroupWithStatus(t, folderUID, &ruleGroup) + _, status, data = legacyCli.PostRulesGroupWithStatus(t, folderUID, &ruleGroup, false) require.Equalf(t, http.StatusAccepted, status, "Failed to post Rule: %s", data) receiverListed, receiverGet = requestReceivers(t, "user-defined") @@ -840,7 +840,7 @@ func TestIntegrationInUseMetadata(t *testing.T) { require.Truef(t, success, "Failed to post Alertmanager configuration: %s", err) ruleGroup.Rules = nil - _, status, data = legacyCli.PostRulesGroupWithStatus(t, folderUID, &ruleGroup) + _, status, data = legacyCli.PostRulesGroupWithStatus(t, folderUID, &ruleGroup, false) require.Equalf(t, http.StatusAccepted, status, "Failed to post Rule: %s", data) receiverListed, receiverGet = requestReceivers(t, "user-defined") @@ -1187,7 +1187,7 @@ func TestIntegrationReferentialIntegrity(t *testing.T) { folderUID := "test-folder" legacyCli.CreateFolder(t, folderUID, "TEST") - _, status, data := legacyCli.PostRulesGroupWithStatus(t, folderUID, &ruleGroup) + _, status, data := legacyCli.PostRulesGroupWithStatus(t, folderUID, &ruleGroup, false) require.Equalf(t, http.StatusAccepted, status, "Failed to post Rule: %s", data) receivers, err := adminClient.List(ctx, v1.ListOptions{}) diff --git a/pkg/tests/apis/alerting/notifications/timeinterval/timeinterval_test.go b/pkg/tests/apis/alerting/notifications/timeinterval/timeinterval_test.go index 0e3e9581f23..ac60110face 100644 --- a/pkg/tests/apis/alerting/notifications/timeinterval/timeinterval_test.go +++ b/pkg/tests/apis/alerting/notifications/timeinterval/timeinterval_test.go @@ -660,7 +660,7 @@ func TestIntegrationTimeIntervalReferentialIntegrity(t *testing.T) { folderUID := "test-folder" legacyCli.CreateFolder(t, folderUID, "TEST") - _, status, data := legacyCli.PostRulesGroupWithStatus(t, folderUID, &ruleGroup) + _, status, data := legacyCli.PostRulesGroupWithStatus(t, folderUID, &ruleGroup, false) require.Equalf(t, http.StatusAccepted, status, "Failed to post Rule: %s", data) currentRoute := legacyCli.GetRoute(t) diff --git a/public/api-merged.json b/public/api-merged.json index 44d88382eb6..6beecc94824 100644 --- a/public/api-merged.json +++ b/public/api-merged.json @@ -12842,6 +12842,9 @@ }, "metric": { "type": "string" + }, + "targetDatasourceUid": { + "type": "string" } } }, @@ -16089,6 +16092,9 @@ "Error" ] }, + "guid": { + "type": "string" + }, "intervalSeconds": { "type": "integer", "format": "int64" @@ -19417,6 +19423,11 @@ "description": "Name of the recorded metric.", "type": "string", "example": "grafana_alerts_ratio" + }, + "target_datasource_uid": { + "description": "Which data source should be used to write the output of the recording rule, specified by UID.", + "type": "string", + "example": "my-prom" } } }, @@ -21451,6 +21462,15 @@ "description": "Name of the associated template definition for this result.", "type": "string" }, + "scope": { + "description": "Scope that was successfully used to interpolate the template. If the root scope \".\" fails, more specific\nscopes will be tried, such as \".Alerts', or \".Alert\".", + "type": "string", + "enum": [ + ".", + ".Alerts", + ".Alert" + ] + }, "text": { "description": "Interpolated value of the template.", "type": "string" @@ -22974,6 +22994,7 @@ } }, "gettableSilences": { + "description": "GettableSilences gettable silences", "type": "array", "items": { "type": "object", diff --git a/public/openapi3.json b/public/openapi3.json index ccfd199e14e..9440b5efd7d 100644 --- a/public/openapi3.json +++ b/public/openapi3.json @@ -2903,6 +2903,9 @@ }, "metric": { "type": "string" + }, + "targetDatasourceUid": { + "type": "string" } }, "title": "Record is the provisioned export of models.Record.", @@ -6151,6 +6154,9 @@ ], "type": "string" }, + "guid": { + "type": "string" + }, "intervalSeconds": { "format": "int64", "type": "integer" @@ -9475,6 +9481,11 @@ "description": "Name of the recorded metric.", "example": "grafana_alerts_ratio", "type": "string" + }, + "target_datasource_uid": { + "description": "Which data source should be used to write the output of the recording rule, specified by UID.", + "example": "my-prom", + "type": "string" } }, "required": [ @@ -11512,6 +11523,15 @@ "description": "Name of the associated template definition for this result.", "type": "string" }, + "scope": { + "description": "Scope that was successfully used to interpolate the template. If the root scope \".\" fails, more specific\nscopes will be tried, such as \".Alerts', or \".Alert\".", + "enum": [ + ".", + ".Alerts", + ".Alert" + ], + "type": "string" + }, "text": { "description": "Interpolated value of the template.", "type": "string" @@ -13034,6 +13054,7 @@ "type": "object" }, "gettableSilences": { + "description": "GettableSilences gettable silences", "items": { "$ref": "#/components/schemas/gettableSilence" }, From 0961de396e69ad2c60358c00e13d5b7488773a68 Mon Sep 17 00:00:00 2001 From: antonio <45235678+tonypowa@users.noreply.github.com> Date: Fri, 14 Mar 2025 21:57:01 +0100 Subject: [PATCH 012/115] docs>getting-started>prometheus (#102182) * docs>getting-started>prometheus * get started page highlight * spelling * formatting * drilldown instead of explore * node_exporter spelling bypass * spelling bypass * metrics support * typo * all pretty, no pity * applied suggestions * all pretty, no pity2 --- docs/sources/datasources/prometheus/_index.md | 10 +- .../get-started-grafana-prometheus.md | 228 ++++++++++++++++-- 2 files changed, 219 insertions(+), 19 deletions(-) diff --git a/docs/sources/datasources/prometheus/_index.md b/docs/sources/datasources/prometheus/_index.md index 46015e7a0af..29ec89bfe74 100644 --- a/docs/sources/datasources/prometheus/_index.md +++ b/docs/sources/datasources/prometheus/_index.md @@ -80,11 +80,17 @@ refs: # Prometheus data source -Prometheus is an open-source database that uses a telemetry collector agent to scrape and store metrics used for monitoring and alerting. If you are just getting started with Prometheus, see [What is Prometheus?](ref:intro-to-prometheus). +Prometheus is an open source database that uses a telemetry collector agent to scrape and store metrics used for monitoring and alerting. Grafana provides native support for Prometheus. If you are just getting started with Prometheus, see [What is Prometheus?](ref:intro-to-prometheus). -Grafana provides native support for Prometheus. +{{% admonition type="tip" %}} For instructions on downloading Prometheus see [Get started with Grafana and Prometheus](ref:get-started-prometheus). +If you’re ready to start visualizing your metrics, check out our Prometheus Learning Journeys: + +- [Connect to a Prometheus data source in Grafana Cloud](https://www.grafana.com/docs/learning-journeys/prometheus/) to visualize your metrics directly from where they are stored. +- [Send metrics to Grafana Cloud using Prometheus remote write](https://www.grafana.com/docs/learning-journeys/prom-remote-write/) to explore Grafana Cloud without making significant changes to your existing configuration. + {{% /admonition %}} + For instructions on how to add a data source to Grafana, refer to the [administration documentation](ref:administration-documentation). Only users with the organization `administrator` role can add data sources and edit existing data sources. Administrators can also [configure the data source via YAML](#provision-the-data-source) with Grafana's provisioning system. diff --git a/docs/sources/getting-started/get-started-grafana-prometheus.md b/docs/sources/getting-started/get-started-grafana-prometheus.md index 188460d7896..914b675d1d5 100644 --- a/docs/sources/getting-started/get-started-grafana-prometheus.md +++ b/docs/sources/getting-started/get-started-grafana-prometheus.md @@ -16,37 +16,44 @@ weight: 300 Prometheus is an open source monitoring system for which Grafana provides out-of-the-box support. This topic walks you through the steps to create a series of dashboards in Grafana to display system metrics for a server monitored by Prometheus. +{{% admonition type="tip" %}} +Check out our Prometheus **Learning Journeys**. + +- [Connect to a Prometheus data source in Grafana Cloud](https://www.grafana.com/docs/learning-journeys/prometheus/) to visualize your metrics directly from where they are stored. +- [Send metrics to Grafana Cloud using Prometheus remote write](https://www.grafana.com/docs/learning-journeys/prom-remote-write/) to explore Grafana Cloud without making significant changes to your existing configuration. + {{% /admonition %}} + _Grafana and Prometheus_: -1. Download Prometheus and node_exporter -1. Install Prometheus node_exporter +1. Download Prometheus and Node exporter +1. Install Prometheus Node exporter 1. Install and configure Prometheus 1. Configure Prometheus for Grafana 1. Check Prometheus metrics in Grafana Explore view 1. Start building dashboards -#### Download Prometheus and node_exporter +## Download Prometheus and Node exporter Download the following components: - [Prometheus](https://prometheus.io/download/#prometheus) -- [node_exporter](https://prometheus.io/download/#node_exporter) +- [Node exporter](https://prometheus.io/download/#node_exporter) Like Grafana, you can install Prometheus on many different operating systems. Refer to the [Prometheus download page](https://prometheus.io/download/) to see a list of stable versions of Prometheus components. -#### Install Prometheus node_exporter +## Install Prometheus Node exporter -Install node_exporter on all hosts you want to monitor. This guide shows you how to install it locally. +Install Node exporter on all hosts you want to monitor. This guide shows you how to install it locally. -Prometheus node_exporter is a widely used tool that exposes system metrics. For instructions on installing node_exporter, refer to the [Installing and running the node_exporter](https://prometheus.io/docs/guides/node-exporter/#installing-and-running-the-node-exporter) section in the Prometheus documentation. +Prometheus Node exporter is a widely used tool that exposes system metrics. For instructions on installing Node exporter, refer to the [Installing and running the Node exporter](https://prometheus.io/docs/guides/node-exporter/#installing-and-running-the-node-exporter) section in the Prometheus documentation. -When you run node_exporter locally, navigate to `http://localhost:9100/metrics` to check that it is exporting metrics. +When you run Node exporter locally, navigate to `http://localhost:9100/metrics` to check that it is exporting metrics. {{% admonition type="note" %}} The instructions in the referenced topic are intended for Linux users. You may have to alter the instructions slightly depending on your operating system. For example, if you are on Windows, use the [windows_exporter](https://github.com/prometheus-community/windows_exporter) instead. {{% /admonition %}} -#### Install and configure Prometheus +## Install and configure Prometheus 1. After [downloading Prometheus](https://prometheus.io/download/#prometheus), extract it and navigate to the directory. @@ -57,14 +64,14 @@ The instructions in the referenced topic are intended for Linux users. You may h 1. Locate the `prometheus.yml` file in the directory. -1. Modify Prometheus's configuration file to monitor the hosts where you installed node_exporter. +1. Modify the Prometheus configuration file to monitor the hosts where you installed Node exporter. By default, Prometheus looks for the file `prometheus.yml` in the current working directory. This behavior can be changed via the `--config.file` command line flag. For example, some Prometheus installers use it to set the configuration file to `/etc/prometheus/prometheus.yml`. The following example shows you the code you should add. Notice that static configs targets are set to `['localhost:9100']` to target node-explorer when running it locally. ``` - # A scrape configuration containing exactly one endpoint to scrape from node_exporter running on a host: + # A scrape configuration containing exactly one endpoint to scrape from Node exporter running on a host: scrape_configs: # The job name is added as a label `job=` to any timeseries scraped from this config. - job_name: 'node' @@ -84,9 +91,9 @@ The following example shows you the code you should add. Notice that static conf 1. Confirm that Prometheus is running by navigating to `http://localhost:9090`. -You can see that the node_exporter metrics have been delivered to Prometheus. Next, the metrics will be sent to Grafana. +You can see that the Node exporter metrics have been delivered to Prometheus. Next, the metrics will be sent to Grafana. -#### Configure Prometheus for Grafana +## Configure Prometheus for Grafana When running Prometheus locally, there are two ways to configure Prometheus for Grafana. You can use a hosted Grafana instance at [Grafana Cloud](/) or run Grafana locally. @@ -112,13 +119,200 @@ remote_write: To configure your Prometheus instance to work with Grafana locally instead of Grafana Cloud, install Grafana [here](/grafana/download) and follow the configuration steps listed [here](/docs/grafana/latest/datasources/prometheus/#configure-the-data-source). {{% /admonition %}} -#### Check Prometheus metrics in Grafana Explore view +## Troubleshooting -In your Grafana instance, go to the [Explore](../../explore/) view and build queries to experiment with the metrics you want to monitor. Here you can also debug issues related to collecting metrics from Prometheus. +These are some of the troubleshooting steps you can try if Prometheus isn’t running or functioning as expected. The steps provided have been selected based on the Learning Journeys we offer for Prometheus. If you’d like to explore further, check out the [Prometheus Learning Journey](https://grafana.com/docs/learning-journeys/prometheus/) if you want to visualize data in Grafana Cloud without sending or storing data in Grafana Cloud, such as for local retention needs. Alternatively, if you already have a Prometheus setup and want to explore Grafana Cloud without making significant changes, visit the [Prometheus remote write learning journey](https://grafana.com/docs/learning-journeys/prom-remote-write/). -#### Start building dashboards +### 1. Checking if Prometheus is running -Now that you have a curated list of queries, create [dashboards](../../dashboards/) to render system metrics monitored by Prometheus. When you install Prometheus and node_exporter or windows_exporter, you will find recommended dashboards for use. +If the Prometheus web UI is inaccessible (e.g., "Connection refused" error in the browser) or Prometheus queries fail (e.g., errors in Grafana like "Data source unavailable" or "No data points"), a good place to start is confirming that the Prometheus process and service are running. + +You can do this by checking the system process or verifying the service status: + +**Linux** + +```bash +sudo systemctl status prometheus +``` + +- Shows whether the process is running and if the service is active. + +**MacOS** + +```bash +pgrep prometheus +``` + +- Returns the process ID (PID) if Prometheus is running. + +**Windows** (`PowerShell`) + +```powershell +Get-Process -Name prometheus -ErrorAction SilentlyContinue +``` + +- Checks if the Prometheus process is running by name. + +### 2. If Prometheus is not running + +Start by checking for common causes: + +**Check for port conflicts**. + +Prometheus runs on port 9090 by default. If another process is using this port, Prometheus may fail to start. You can check for port conflicts with: + +**Linux & MacOS** + +```bash +lsof -i :9090 +``` + +**Windows** (`PowerShell`) + +```powershell +netstat -ano | findstr :9090 +``` + +- Shows if another process is using port **9090**. + +**Verify the Prometheus binary placement**: ensure Prometheus binaries (`prometheus` and `promtool`) are correctly installed. + +**Linux & MacOS** + +```bash +ls /usr/local/bin/prometheus /usr/local/bin/promtool +``` + +- If missing, move them to `/usr/local/bin` or a directory in your system’s **PATH**. + +**Check if Prometheus is in the path**. + +```bash +which prometheus +which promtool +``` + +- If there’s **no output**, the binaries are not in the system **PATH**. + +**Ensure configuration & data files are in place**. + +**Linux & MacOs** + +```bash +ls /etc/prometheus /var/lib/prometheus +ls /etc/prometheus/prometheus.yml +``` + +- Makes sure that Prometheus has its necessary configuration and data storage directories. + +**Check permissions**: If Prometheus is running as a dedicated user, ensure the correct ownership: + +```bash +sudo chown -R prometheus:prometheus /etc/prometheus /var/lib/prometheus +``` + +(Optional) **Secure Prometheus by creating a dedicated user** + +```bash +sudo useradd --no-create-home --shell /bin/false prometheus +``` + +- Recommended for security: runs Prometheus as a non-login user. + +### 3. Checking if Prometheus is running as a service + +If Prometheus is running as a process, check whether it is properly set up and managed as a service to ensure it restarts automatically after reboots or failures. + +**Check Prometheus service status** + +**Linux** + +```bash +systemctl status prometheus.service +``` + +**Windows** + +```powershell +sc query prometheus +``` + +**MacOs** + +```bash +pgrep prometheus +``` + +- If the service is **inactive (dead) or stopped**, proceed to the next steps. + +### 4. If Prometheus is not running as a service + +If Prometheus is not running as a managed service, ensure it is correctly configured and can restart automatically. + +**Verify service configuration** **(Linux & MacOs)** + +Check the service unit file to ensure correct paths: + +```bash +sudo nano /etc/systemd/system/prometheus.service +``` + +- Look for the `ExecStart` line: + +```bash +ExecStart=/usr/local/bin/prometheus --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/var/lib/prometheus/ +``` + +- Ensure: + - The **binary path** (`/usr/local/bin/prometheus`) is correct. + - The **configuration file** (`/etc/prometheus/prometheus.yml`) is in place. + - The **storage path** (`/var/lib/prometheus/`) exists. + +**Restart and enable Prometheus service (Linux & MacOs)** + +```bash +sudo systemctl daemon-reload +sudo systemctl enable prometheus +sudo systemctl start prometheus +sudo systemctl status prometheus +``` + +**Check Prometheus health status** + +After restarting, verify if Prometheus is responsive: + +```bash +curl -s http://localhost:9090/-/ready +``` + +- If successful, this confirms Prometheus is **ready to serve requests**. + +**Restart Prometheus service (Windows)** + +If running as a Windows service, restart it: + +```powershell +net stop prometheus +net start prometheus +``` + +### 5. Checking if Prometheus is capturing metrics + +If you installed [Node exporter](#install-prometheus-node-exporter) to expose your system metrics, you can check if Prometheus is capturing metrics by sending a request to the `/metrics` endpoint. + +```bash +curl http://localhost:9090/metrics +``` + +- It should return a number of metrics and metadata about the metrics being exposed. + +## Check Prometheus metrics in Grafana Metics Drilldown + +In your Grafana instance, go to the [Drilldown](https://www.grafana.com/docs/grafana/latest/explore/simplified-exploration/metrics/) view and experience query-less browsing of Prometheus-compatible metrics. + +## Start building dashboards + +Now that you have a curated list of queries, create [dashboards](../../dashboards/) to render system metrics monitored by Prometheus. When you install Prometheus and Node exporter or windows_exporter, you will find recommended dashboards for use. The following image shows a dashboard with three panels showing some system metrics. From 45e2cb78f2477fac65624ce5864e786851467d7c Mon Sep 17 00:00:00 2001 From: "grafana-pr-automation[bot]" <140550294+grafana-pr-automation[bot]@users.noreply.github.com> Date: Sat, 15 Mar 2025 02:30:45 +0200 Subject: [PATCH 013/115] I18n: Download translations from Crowdin (#102247) New Crowdin translations by GitHub Action Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- public/locales/pt-BR/grafana.json | 46 +++++++++++++++---------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/public/locales/pt-BR/grafana.json b/public/locales/pt-BR/grafana.json index 7dd6efeb712..12b707e3368 100644 --- a/public/locales/pt-BR/grafana.json +++ b/public/locales/pt-BR/grafana.json @@ -15,7 +15,7 @@ "permission": "Permissão" }, "permission-list-item": { - "inherited": "" + "inherited": "Herdados da pasta" }, "permissions": { "add-label": "Adicionar uma permissão", @@ -36,26 +36,26 @@ }, "admin": { "anon-users": { - "not-found": "" + "not-found": "Nenhum usuário anônimo encontrado." }, "edit-org": { - "access-denied": "", - "heading": "", - "update-button": "", - "users-heading": "" + "access-denied": "Você não tem permissão para ver usuários nesta organização. Para atualizar esta organização, entre em contato com o administrador do servidor.", + "heading": "Editar Organização", + "update-button": "Atualizar", + "users-heading": "Usuários da organização" }, "feature-toggles": { - "sub-title": "" + "sub-title": "Visualize e edite feature toggles. Leia mais sobre feature toggles em <2>grafana.com." }, "get-enterprise": { - "contact-us": "", - "description": "", - "features-heading": "", - "included-description": "", - "included-heading": "", - "service-title": "", - "team-sync-details": "", - "title": "" + "contact-us": "Contate-nos e faça uma avaliação grátis", + "description": "Você pode usar a versão de avaliação gratuitamente por 30 dias. Nós iremos te lembrar cinco dias antes do fim do período de avaliação.", + "features-heading": "Melhores funcionalidades", + "included-description": "Indenização, colaboração com a Grafana Labs em prioridades futuras e treinamento pela equipe central da Grafana.", + "included-heading": "Também inclui:", + "service-title": "À sua disposição", + "team-sync-details": "LDAP, GitHub OAuth, Auth Proxy, Okta", + "title": "Obtenha Grafana Enterprise" }, "ldap": { "test-mapping-heading": "", @@ -95,9 +95,9 @@ }, "orgs": { "delete-body": "", - "id-header": "", + "id-header": "ID", "name-header": "", - "new-org-button": "" + "new-org-button": "Nova organização" }, "server-settings": { "alerts-button": "", @@ -111,10 +111,10 @@ "info-description": "" }, "upgrade-info": { - "title": "" + "title": "Licença Enterprise" }, "user-orgs": { - "add-button": "", + "add-button": "Adicionar usuário à organização", "change-role-button": "", "external-user-tooltip": "", "remove-button": "", @@ -1169,7 +1169,7 @@ "download-csv": "Baixar CSV", "download-excel-description": "Adiciona cabeçalho ao CSV para usar com o Excel", "download-excel-label": "Baixar para Excel", - "download-logs": "Baixar registros", + "download-logs": "", "download-service": "Baixar gráfico de serviço", "download-traces": "Baixar rastreamentos", "excel-header": "Cabeçalho do Excel", @@ -1556,7 +1556,7 @@ "explore": { "add-to-dashboard": "Adicionar ao painel de controle", "drilldownInfo": { - "action": "", + "action": "Ir para Grafana Aprofundar", "description": "", "title": "" }, @@ -2742,7 +2742,7 @@ "title": "Detectar" }, "drilldown": { - "title": "" + "title": "Aprofundar" }, "explore": { "title": "Explorar" @@ -2899,7 +2899,7 @@ }, "shared-dashboard": { "subtitle": "", - "title": "" + "title": "Painéis compartilhados" }, "sign-out": { "title": "Finalizar sessão" From 5c243126256f011116800fc439cfad5b87ea67f1 Mon Sep 17 00:00:00 2001 From: Stephanie Hingtgen Date: Sat, 15 Mar 2025 21:12:48 -0600 Subject: [PATCH 014/115] Dashboards: Fix duplicate provisioning when errors occur on title-only based provisioning (#102249) Dashboards: fix title based provisioning --- .../apis/dashboard/legacy/sql_dashboards.go | 38 ++++-- .../dashboard/legacy/sql_dashboards_test.go | 68 ++++++++- pkg/registry/apis/dashboard/legacy/storage.go | 65 ++++++++- .../apis/dashboard/legacy/storage_test.go | 129 ++++++++++++++++++ pkg/services/dashboards/dashboard.go | 2 +- pkg/services/dashboards/database/database.go | 20 ++- .../database/database_provisioning_test.go | 12 +- .../dashboards/database/database_test.go | 42 +++--- .../dashboards/service/dashboard_service.go | 15 +- .../service/dashboard_service_test.go | 13 +- pkg/services/dashboards/store_mock.go | 28 ++-- 11 files changed, 349 insertions(+), 83 deletions(-) create mode 100644 pkg/registry/apis/dashboard/legacy/storage_test.go diff --git a/pkg/registry/apis/dashboard/legacy/sql_dashboards.go b/pkg/registry/apis/dashboard/legacy/sql_dashboards.go index 6563300c354..85c2e732cb9 100644 --- a/pkg/registry/apis/dashboard/legacy/sql_dashboards.go +++ b/pkg/registry/apis/dashboard/legacy/sql_dashboards.go @@ -5,7 +5,6 @@ import ( "database/sql" "encoding/json" "fmt" - "path/filepath" "strconv" "strings" "sync" @@ -320,15 +319,8 @@ func (a *dashboardSqlAccess) scanRow(rows *sql.Rows, history bool) (*dashboardRo // if the reader cannot be found, it may be an orphaned provisioned dashboard resolvedPath := a.provisioning.GetDashboardProvisionerResolvedPath(origin_name.String) if resolvedPath != "" { - originPath, err := filepath.Rel( - resolvedPath, - origin_path.String, - ) - if err != nil { - return nil, err - } meta.SetSourceProperties(utils.SourceProperties{ - Path: originPath, // relative path within source + Path: origin_path.String, Checksum: origin_hash.String, TimestampMillis: origin_ts.Int64, }) @@ -392,8 +384,7 @@ func (a *dashboardSqlAccess) DeleteDashboard(ctx context.Context, orgId int64, u return dash, true, nil } -// SaveDashboard implements DashboardAccess. -func (a *dashboardSqlAccess) SaveDashboard(ctx context.Context, orgId int64, dash *dashboard.Dashboard) (*dashboard.Dashboard, bool, error) { +func (a *dashboardSqlAccess) buildSaveDashboardCommand(ctx context.Context, orgId int64, dash *dashboard.Dashboard) (*dashboards.SaveDashboardCommand, bool, error) { created := false user, ok := claims.AuthInfoFrom(ctx) if !ok || user == nil { @@ -424,16 +415,17 @@ func (a *dashboardSqlAccess) SaveDashboard(ctx context.Context, orgId int64, das var err error userID, err = identity.UserIdentifier(user.GetSubject()) if err != nil { - return nil, false, err + return nil, created, err } } apiVersion := strings.TrimPrefix(dash.APIVersion, dashboard.GROUP+"/") meta, err := utils.MetaAccessor(dash) if err != nil { - return nil, false, err + return nil, created, err } - out, err := a.dashStore.SaveDashboard(ctx, dashboards.SaveDashboardCommand{ + + return &dashboards.SaveDashboardCommand{ OrgID: orgId, Message: meta.GetMessage(), PluginID: dashboardOG.GetPluginIDFromMeta(meta), @@ -442,7 +434,21 @@ func (a *dashboardSqlAccess) SaveDashboard(ctx context.Context, orgId int64, das Overwrite: true, // already passed the revisionVersion checks! UserID: userID, APIVersion: apiVersion, - }) + }, created, nil +} + +func (a *dashboardSqlAccess) SaveDashboard(ctx context.Context, orgId int64, dash *dashboard.Dashboard) (*dashboard.Dashboard, bool, error) { + user, ok := claims.AuthInfoFrom(ctx) + if !ok || user == nil { + return nil, false, fmt.Errorf("no user found in context") + } + + cmd, created, err := a.buildSaveDashboardCommand(ctx, orgId, dash) + if err != nil { + return nil, created, err + } + + out, err := a.dashStore.SaveDashboard(ctx, *cmd) if err != nil { return nil, false, err } @@ -452,6 +458,8 @@ func (a *dashboardSqlAccess) SaveDashboard(ctx context.Context, orgId int64, das dash, _, err = a.GetDashboard(ctx, orgId, out.UID, 0) if err != nil { return nil, false, err + } else if dash == nil { + return nil, false, fmt.Errorf("unable to retrieve dashboard after save") } // stash the raw value in context (if requested) diff --git a/pkg/registry/apis/dashboard/legacy/sql_dashboards_test.go b/pkg/registry/apis/dashboard/legacy/sql_dashboards_test.go index 692376ebb4b..2e8d5485e9e 100644 --- a/pkg/registry/apis/dashboard/legacy/sql_dashboards_test.go +++ b/pkg/registry/apis/dashboard/legacy/sql_dashboards_test.go @@ -6,12 +6,17 @@ import ( "time" "github.com/DATA-DOG/go-sqlmock" + "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + dashboard "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v0alpha1" common "github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1" + "github.com/grafana/grafana/pkg/apimachinery/identity" "github.com/grafana/grafana/pkg/apimachinery/utils" + "github.com/grafana/grafana/pkg/services/dashboards" "github.com/grafana/grafana/pkg/services/provisioning" + "github.com/grafana/grafana/pkg/services/user" ) func TestScanRow(t *testing.T) { @@ -32,7 +37,7 @@ func TestScanRow(t *testing.T) { title := "Test Dashboard" folderUID := "folder123" timestamp := time.Now() - k8sTimestamp := v1.Time{Time: timestamp} + k8sTimestamp := metav1.Time{Time: timestamp} version := int64(2) message := "updated message" createdUser := "creator" @@ -91,7 +96,7 @@ func TestScanRow(t *testing.T) { require.Equal(t, utils.ManagerKindClassicFP, m.Kind) // nolint:staticcheck require.Equal(t, "provisioner", m.Identity) - require.Equal(t, "../"+pathToFile, s.Path) // relative to provisioner + require.Equal(t, pathToFile, s.Path) require.Equal(t, "hashing", s.Checksum) require.NoError(t, err) require.Equal(t, int64(100000), s.TimestampMillis) @@ -119,3 +124,60 @@ func TestScanRow(t *testing.T) { require.Equal(t, "", meta.GetAnnotations()[utils.AnnoKeySourceChecksum]) // hash is not used on plugins }) } + +func TestBuildSaveDashboardCommand(t *testing.T) { + mockStore := &dashboards.FakeDashboardStore{} + access := &dashboardSqlAccess{ + dashStore: mockStore, + } + dash := &dashboard.Dashboard{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "dashboard.grafana.app/v0alpha1", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "test-dash", + }, + Spec: common.Unstructured{ + Object: map[string]interface{}{ + "title": "Test Dashboard", + "id": 123, + }, + }, + } + + // fail if no user in context + _, _, err := access.buildSaveDashboardCommand(context.Background(), 1, dash) + require.Error(t, err) + + ctx := identity.WithRequester(context.Background(), &user.SignedInUser{ + OrgID: 1, + OrgRole: "Admin", + }) + // create new dashboard + mockStore.On("GetDashboard", mock.Anything, mock.Anything).Return(nil, nil).Once() + cmd, created, err := access.buildSaveDashboardCommand(ctx, 1, dash) + require.NoError(t, err) + require.Equal(t, true, created) + require.NotNil(t, cmd) + require.Equal(t, "test-dash", cmd.Dashboard.Get("uid").MustString()) + _, exists := cmd.Dashboard.CheckGet("id") + require.False(t, exists) // id should be removed + require.Equal(t, cmd.OrgID, int64(1)) + require.True(t, cmd.Overwrite) + + // now update existing dashboard + mockStore.On("GetDashboard", mock.Anything, mock.Anything).Return( + &dashboards.Dashboard{ + ID: 1234, + APIVersion: "dashboard.grafana.app/v0alpha1", + }, nil).Once() + cmd, created, err = access.buildSaveDashboardCommand(ctx, 1, dash) + require.NoError(t, err) + require.Equal(t, false, created) + require.NotNil(t, cmd) + require.Equal(t, "test-dash", cmd.Dashboard.Get("uid").MustString()) + require.Equal(t, cmd.Dashboard.Get("id").MustInt64(), int64(1234)) // should set to existing ID + require.Equal(t, cmd.APIVersion, "v0alpha1") // should trim prefix + require.Equal(t, cmd.OrgID, int64(1)) + require.True(t, cmd.Overwrite) +} diff --git a/pkg/registry/apis/dashboard/legacy/storage.go b/pkg/registry/apis/dashboard/legacy/storage.go index e24007813ed..4e00cd6d803 100644 --- a/pkg/registry/apis/dashboard/legacy/storage.go +++ b/pkg/registry/apis/dashboard/legacy/storage.go @@ -11,6 +11,7 @@ import ( dashboard "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v0alpha1" "github.com/grafana/grafana/pkg/apimachinery/utils" + "github.com/grafana/grafana/pkg/services/dashboards" "github.com/grafana/grafana/pkg/storage/unified/resource" ) @@ -27,6 +28,36 @@ func getDashboardFromEvent(event resource.WriteEvent) (*dashboard.Dashboard, err return dash, err } +func getProvisioningDataFromEvent(event resource.WriteEvent) (*dashboards.DashboardProvisioning, error) { + obj, ok := event.Object.GetRuntimeObject() + if !ok { + return nil, fmt.Errorf("object is not a runtime object") + } + meta, err := utils.MetaAccessor(obj) + if err != nil { + return nil, err + } + + provisioningData, ok := meta.GetManagerProperties() + if !ok || (provisioningData.Kind != utils.ManagerKindClassicFP) { //nolint:staticcheck + return nil, nil + } + source, ok := meta.GetSourceProperties() + if !ok { + return nil, nil + } + provisioning := &dashboards.DashboardProvisioning{ + Name: provisioningData.Identity, + ExternalID: source.Path, + CheckSum: source.Checksum, + } + if source.TimestampMillis > 0 { + provisioning.Updated = time.UnixMilli(source.TimestampMillis).Unix() + } + + return provisioning, nil +} + func isDashboardKey(key *resource.ResourceKey, requireName bool) error { gr := dashboard.DashboardResourceInfo.GroupResource() if key.Group != gr.Group { @@ -63,20 +94,44 @@ func (a *dashboardSqlAccess) WriteEvent(ctx context.Context, event resource.Writ if err != nil { return 0, err } - - after, _, err := a.SaveDashboard(ctx, info.OrgID, dash) + // In unistore, provisioning data is stored as annotations on the dashboard object. In legacy, it is stored in a separate + // database table. For the legacy fallback, we need to save the provisioning data in the same transaction - so we need to handle these separately. + // Without this, we can end up having dashboards created in legacy, unistore timing out, and then never saving the provisioning data, which + // results in duplicated dashboards on next startup. + provisioning, err := getProvisioningDataFromEvent(event) if err != nil { return 0, err } - if after != nil { - meta, err := utils.MetaAccessor(after) + if provisioning != nil { + cmd, _, err := a.buildSaveDashboardCommand(ctx, info.OrgID, dash) if err != nil { return 0, err } - rv, err = meta.GetResourceVersionInt64() + + after, err := a.dashStore.SaveProvisionedDashboard(ctx, *cmd, provisioning) if err != nil { return 0, err } + + // dashboard version is the RV in legacy storage + if after != nil { + rv = int64(after.Version) + } + } else { + after, _, err := a.SaveDashboard(ctx, info.OrgID, dash) + if err != nil { + return 0, err + } + if after != nil { + meta, err := utils.MetaAccessor(after) + if err != nil { + return 0, err + } + rv, err = meta.GetResourceVersionInt64() + if err != nil { + return 0, err + } + } } } default: diff --git a/pkg/registry/apis/dashboard/legacy/storage_test.go b/pkg/registry/apis/dashboard/legacy/storage_test.go new file mode 100644 index 00000000000..cbe204c4015 --- /dev/null +++ b/pkg/registry/apis/dashboard/legacy/storage_test.go @@ -0,0 +1,129 @@ +package legacy + +import ( + "context" + "encoding/json" + "testing" + + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + + dashboard "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v0alpha1" + "github.com/grafana/grafana/pkg/apimachinery/identity" + "github.com/grafana/grafana/pkg/apimachinery/utils" + "github.com/grafana/grafana/pkg/services/dashboards" + "github.com/grafana/grafana/pkg/services/user" + "github.com/grafana/grafana/pkg/storage/unified/resource" +) + +func TestGetProvisioningDataFromEvent(t *testing.T) { + tests := []struct { + name string + manager utils.ManagerProperties + source utils.SourceProperties + want *dashboards.DashboardProvisioning + }{ + { + name: "valid provisioning data", + manager: utils.ManagerProperties{ + Kind: utils.ManagerKindClassicFP, //nolint:staticcheck + Identity: "test-name", + }, + source: utils.SourceProperties{ + Path: "test-path", + Checksum: "test-checksum", + TimestampMillis: 1000, + }, + want: &dashboards.DashboardProvisioning{ + Name: "test-name", + ExternalID: "test-path", + CheckSum: "test-checksum", + Updated: 1, + }, + }, + { + name: "non-provisioned dashboard", + manager: utils.ManagerProperties{ + Kind: "different-kind", + }, + source: utils.SourceProperties{}, + want: nil, + }, + { + name: "missing runtime object", + manager: utils.ManagerProperties{}, + source: utils.SourceProperties{}, + want: nil, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + res := &unstructured.Unstructured{ + Object: map[string]any{}, + } + meta, err := utils.MetaAccessor(res) + require.NoError(t, err) + meta.SetManagerProperties(tt.manager) + meta.SetSourceProperties(tt.source) + got, err := getProvisioningDataFromEvent(resource.WriteEvent{ + Object: meta, + }) + require.NoError(t, err) + require.Equal(t, tt.want, got) + }) + } +} + +// test that we use the save provisioning function if the file based provisioning is set +func TestWriteProvisioningEvent(t *testing.T) { + dashData := &dashboards.Dashboard{ + Title: "Test Dashboard", + Version: 2, + } + dashBytes, err := json.Marshal(dashData) + require.NoError(t, err) + + key := &resource.ResourceKey{ + Group: dashboard.DashboardResourceInfo.GroupResource().Group, + Resource: dashboard.DashboardResourceInfo.GroupResource().Resource, + Name: "test-dashboard", + Namespace: "stacks-1", + } + + res := &unstructured.Unstructured{ + Object: map[string]any{}, + } + meta, err := utils.MetaAccessor(res) + require.NoError(t, err) + meta.SetManagerProperties(utils.ManagerProperties{ + Kind: utils.ManagerKindClassicFP, //nolint:staticcheck + Identity: "test-name", + }) + meta.SetSourceProperties(utils.SourceProperties{ + Path: "test-path", + Checksum: "test-checksum", + TimestampMillis: 1000, + }) + + event := resource.WriteEvent{ + Type: resource.WatchEvent_ADDED, + Key: key, + Object: meta, + Value: dashBytes, + } + + mockStore := dashboards.NewFakeDashboardStore(t) + mockStore.On("SaveProvisionedDashboard", mock.Anything, mock.Anything, mock.Anything).Return(dashData, nil) + + access := &dashboardSqlAccess{ + dashStore: mockStore, + } + + ctx := identity.WithRequester(context.Background(), &user.SignedInUser{}) + rv, err := access.WriteEvent(ctx, event) + require.NoError(t, err) + require.Equal(t, int64(2), rv) + mockStore.AssertExpectations(t) +} diff --git a/pkg/services/dashboards/dashboard.go b/pkg/services/dashboards/dashboard.go index 2561b74e987..c53a1769714 100644 --- a/pkg/services/dashboards/dashboard.go +++ b/pkg/services/dashboards/dashboard.go @@ -84,7 +84,7 @@ type Store interface { GetProvisionedDashboardsByName(ctx context.Context, name string) ([]*Dashboard, error) GetOrphanedProvisionedDashboards(ctx context.Context, notIn []string) ([]*Dashboard, error) SaveDashboard(ctx context.Context, cmd SaveDashboardCommand) (*Dashboard, error) - SaveProvisionedDashboard(ctx context.Context, dash *Dashboard, provisioning *DashboardProvisioning) error + SaveProvisionedDashboard(ctx context.Context, cmd SaveDashboardCommand, provisioning *DashboardProvisioning) (*Dashboard, error) UnprovisionDashboard(ctx context.Context, id int64) error // ValidateDashboardBeforeSave validates a dashboard before save. ValidateDashboardBeforeSave(ctx context.Context, dashboard *Dashboard, overwrite bool) (bool, error) diff --git a/pkg/services/dashboards/database/database.go b/pkg/services/dashboards/database/database.go index 14cc779405f..078eabe019e 100644 --- a/pkg/services/dashboards/database/database.go +++ b/pkg/services/dashboards/database/database.go @@ -178,19 +178,25 @@ func (d *dashboardStore) GetOrphanedProvisionedDashboards(ctx context.Context, n return dashes, nil } -func (d *dashboardStore) SaveProvisionedDashboard(ctx context.Context, dash *dashboards.Dashboard, provisioning *dashboards.DashboardProvisioning) error { +func (d *dashboardStore) SaveProvisionedDashboard(ctx context.Context, cmd dashboards.SaveDashboardCommand, provisioning *dashboards.DashboardProvisioning) (*dashboards.Dashboard, error) { ctx, span := tracer.Start(ctx, "dashboards.database.SaveProvisionedDashboard") defer span.End() - err := d.store.WithTransactionalDbSession(ctx, func(sess *db.Session) error { - if provisioning.Updated == 0 { - provisioning.Updated = dash.Updated.Unix() + var result *dashboards.Dashboard + var err error + err = d.store.WithTransactionalDbSession(ctx, func(sess *db.Session) error { + result, err = saveDashboard(sess, &cmd, d.emitEntityEvent()) + if err != nil { + return err } - return saveProvisionedData(sess, provisioning, dash) - }) + if provisioning.Updated == 0 { + provisioning.Updated = result.Updated.Unix() + } - return err + return saveProvisionedData(sess, provisioning, result) + }) + return result, err } func (d *dashboardStore) SaveDashboard(ctx context.Context, cmd dashboards.SaveDashboardCommand) (*dashboards.Dashboard, error) { diff --git a/pkg/services/dashboards/database/database_provisioning_test.go b/pkg/services/dashboards/database/database_provisioning_test.go index 1cf53ce5fb2..ec82181c4d3 100644 --- a/pkg/services/dashboards/database/database_provisioning_test.go +++ b/pkg/services/dashboards/database/database_provisioning_test.go @@ -52,15 +52,13 @@ func TestIntegrationDashboardProvisioningTest(t *testing.T) { ExternalID: "/var/grafana.json", Updated: now.Unix(), } - dash, err := dashboardStore.SaveDashboard(context.Background(), saveDashboardCmd) - require.NoError(t, err) + + dash, err := dashboardStore.SaveProvisionedDashboard(context.Background(), saveDashboardCmd, provisioning) + require.Nil(t, err) require.NotNil(t, dash) require.NotEqual(t, 0, dash.ID) dashId := dash.ID - err = dashboardStore.SaveProvisionedDashboard(context.Background(), dash, provisioning) - require.Nil(t, err) - t.Run("Deleting orphaned provisioned dashboards", func(t *testing.T) { saveCmd := dashboards.SaveDashboardCommand{ OrgID: 1, @@ -71,8 +69,6 @@ func TestIntegrationDashboardProvisioningTest(t *testing.T) { "title": "another_dashboard", }), } - anotherDash, err := dashboardStore.SaveDashboard(context.Background(), saveCmd) - require.NoError(t, err) provisioning := &dashboards.DashboardProvisioning{ Name: "another_reader", @@ -80,7 +76,7 @@ func TestIntegrationDashboardProvisioningTest(t *testing.T) { Updated: now.Unix(), } - err = dashboardStore.SaveProvisionedDashboard(context.Background(), anotherDash, provisioning) + anotherDash, err := dashboardStore.SaveProvisionedDashboard(context.Background(), saveCmd, provisioning) require.Nil(t, err) query := &dashboards.GetDashboardsQuery{DashboardIDs: []int64{anotherDash.ID}} diff --git a/pkg/services/dashboards/database/database_test.go b/pkg/services/dashboards/database/database_test.go index 9849cc80691..962814f146c 100644 --- a/pkg/services/dashboards/database/database_test.go +++ b/pkg/services/dashboards/database/database_test.go @@ -253,27 +253,37 @@ func TestIntegrationDashboardDataAccess(t *testing.T) { t.Run("Should delete associated provisioning info, even without the dashboard existing in the db", func(t *testing.T) { setup() - dash1 := insertTestDashboard(t, dashboardStore, "provisioned", 1, 0, "", false, "provisioned") - dash2 := insertTestDashboard(t, dashboardStore, "orphaned", 1, 0, "", false, "orphaned") provisioningData := &dashboards.DashboardProvisioning{ - ID: 1, - DashboardID: dash1.ID, - Name: "test", - CheckSum: "123", - Updated: 54321, - ExternalID: "/path/to/dashboard", + ID: 1, + Name: "test", + CheckSum: "123", + Updated: 54321, + ExternalID: "/path/to/dashboard", } - err := dashboardStore.SaveProvisionedDashboard(context.Background(), dash1, provisioningData) + dash1, err := dashboardStore.SaveProvisionedDashboard(context.Background(), dashboards.SaveDashboardCommand{ + OrgID: 1, + IsFolder: false, + Dashboard: simplejson.NewFromAny(map[string]any{ + "id": nil, + "title": "provisioned", + }), + }, provisioningData) require.NoError(t, err) provisioningData2 := &dashboards.DashboardProvisioning{ - ID: 1, - DashboardID: dash2.ID, - Name: "orphaned", - CheckSum: "123", - Updated: 54321, - ExternalID: "/path/to/dashboard", + ID: 1, + Name: "orphaned", + CheckSum: "123", + Updated: 54321, + ExternalID: "/path/to/dashboard", } - err = dashboardStore.SaveProvisionedDashboard(context.Background(), dash2, provisioningData2) + _, err = dashboardStore.SaveProvisionedDashboard(context.Background(), dashboards.SaveDashboardCommand{ + OrgID: 1, + IsFolder: false, + Dashboard: simplejson.NewFromAny(map[string]any{ + "id": nil, + "title": "orphaned", + }), + }, provisioningData2) require.NoError(t, err) // get provisioning data diff --git a/pkg/services/dashboards/service/dashboard_service.go b/pkg/services/dashboards/service/dashboard_service.go index be4e3a5e2d3..924a435cd2d 100644 --- a/pkg/services/dashboards/service/dashboard_service.go +++ b/pkg/services/dashboards/service/dashboard_service.go @@ -677,24 +677,17 @@ func (dr *DashboardServiceImpl) SaveProvisionedDashboard(ctx context.Context, dt if err != nil { return nil, err } + if cmd == nil { + return nil, fmt.Errorf("failed to build save dashboard command. cmd is nil") + } var dash *dashboards.Dashboard if dr.features.IsEnabledGlobally(featuremgmt.FlagKubernetesClientDashboardsFolders) { - // save the dashboard but then do NOT return - // we want to save the provisioning data to the dashboard_provisioning table still - // to ensure we can safely rollback to mode2 if needed dash, err = dr.saveProvisionedDashboardThroughK8s(ctx, cmd, provisioning, false) - if err != nil { - return nil, err - } } else { - dash, err = dr.saveDashboard(ctx, cmd) - if err != nil { - return nil, err - } + dash, err = dr.dashboardStore.SaveProvisionedDashboard(ctx, *cmd, provisioning) } - err = dr.dashboardStore.SaveProvisionedDashboard(ctx, dash, provisioning) if err != nil { return nil, err } diff --git a/pkg/services/dashboards/service/dashboard_service_test.go b/pkg/services/dashboards/service/dashboard_service_test.go index 2dc45e6494e..005d8409886 100644 --- a/pkg/services/dashboards/service/dashboard_service_test.go +++ b/pkg/services/dashboards/service/dashboard_service_test.go @@ -159,9 +159,7 @@ func TestDashboardService(t *testing.T) { dto := &dashboards.SaveDashboardDTO{} t.Run("Should not return validation error if dashboard is provisioned", func(t *testing.T) { - fakeStore.On("SaveProvisionedDashboard", mock.Anything, mock.Anything, mock.AnythingOfType("*dashboards.DashboardProvisioning")).Return(nil).Once() - fakeStore.On("SaveDashboard", mock.Anything, mock.AnythingOfType("dashboards.SaveDashboardCommand")).Return(&dashboards.Dashboard{Data: simplejson.New()}, nil).Once() - + fakeStore.On("SaveProvisionedDashboard", mock.Anything, mock.AnythingOfType("dashboards.SaveDashboardCommand"), mock.AnythingOfType("*dashboards.DashboardProvisioning")).Return(&dashboards.Dashboard{Data: simplejson.New()}, nil).Once() dto.Dashboard = dashboards.NewDashboard("Dash") dto.Dashboard.SetID(3) dto.User = &user.SignedInUser{UserID: 1} @@ -170,9 +168,7 @@ func TestDashboardService(t *testing.T) { }) t.Run("Should override invalid refresh interval if dashboard is provisioned", func(t *testing.T) { - fakeStore.On("SaveProvisionedDashboard", mock.Anything, mock.Anything, mock.AnythingOfType("*dashboards.DashboardProvisioning")).Return(nil).Once() - fakeStore.On("SaveDashboard", mock.Anything, mock.AnythingOfType("dashboards.SaveDashboardCommand")).Return(&dashboards.Dashboard{Data: simplejson.New()}, nil).Once() - + fakeStore.On("SaveProvisionedDashboard", mock.Anything, mock.AnythingOfType("dashboards.SaveDashboardCommand"), mock.AnythingOfType("*dashboards.DashboardProvisioning")).Return(&dashboards.Dashboard{Data: simplejson.New()}, nil).Once() oldRefreshInterval := service.cfg.MinRefreshInterval service.cfg.MinRefreshInterval = "5m" defer func() { service.cfg.MinRefreshInterval = oldRefreshInterval }() @@ -1216,8 +1212,7 @@ func TestSaveProvisionedDashboard(t *testing.T) { t.Run("Should fallback to dashboard store if Kubernetes feature flags are not enabled", func(t *testing.T) { service.features = featuremgmt.WithFeatures() fakeStore.On("GetDashboard", mock.Anything, mock.Anything).Return(&dashboards.Dashboard{}, nil) - fakeStore.On("SaveProvisionedDashboard", mock.Anything, mock.Anything, mock.Anything).Return(nil) - fakeStore.On("SaveDashboard", mock.Anything, mock.Anything, mock.Anything).Return(&dashboards.Dashboard{}, nil) + fakeStore.On("SaveProvisionedDashboard", mock.Anything, mock.Anything, mock.Anything).Return(&dashboards.Dashboard{}, nil) dashboard, err := service.SaveProvisionedDashboard(context.Background(), query, &dashboards.DashboardProvisioning{}) require.NoError(t, err) require.NotNil(t, dashboard) @@ -1237,7 +1232,7 @@ func TestSaveProvisionedDashboard(t *testing.T) { t.Run("Should use Kubernetes create if feature flags are enabled", func(t *testing.T) { ctx, k8sCliMock := setupK8sDashboardTests(service) - fakeStore.On("SaveProvisionedDashboard", mock.Anything, mock.Anything, mock.Anything).Return(nil) + fakeStore.On("SaveProvisionedDashboard", mock.Anything, mock.Anything, mock.Anything).Return(&dashboards.Dashboard{}, nil) k8sCliMock.On("Get", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, nil) k8sCliMock.On("GetUserFromMeta", mock.Anything, mock.Anything).Return(&user.User{}, nil) k8sCliMock.On("Create", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(&dashboardUnstructured, nil) diff --git a/pkg/services/dashboards/store_mock.go b/pkg/services/dashboards/store_mock.go index 10a41e691c1..303ef03130a 100644 --- a/pkg/services/dashboards/store_mock.go +++ b/pkg/services/dashboards/store_mock.go @@ -694,22 +694,34 @@ func (_m *FakeDashboardStore) SaveDashboard(ctx context.Context, cmd SaveDashboa return r0, r1 } -// SaveProvisionedDashboard provides a mock function with given fields: ctx, dash, provisioning -func (_m *FakeDashboardStore) SaveProvisionedDashboard(ctx context.Context, dash *Dashboard, provisioning *DashboardProvisioning) error { - ret := _m.Called(ctx, dash, provisioning) +// SaveProvisionedDashboard provides a mock function with given fields: ctx, cmd, provisioning +func (_m *FakeDashboardStore) SaveProvisionedDashboard(ctx context.Context, cmd SaveDashboardCommand, provisioning *DashboardProvisioning) (*Dashboard, error) { + ret := _m.Called(ctx, cmd, provisioning) if len(ret) == 0 { panic("no return value specified for SaveProvisionedDashboard") } - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *Dashboard, *DashboardProvisioning) error); ok { - r0 = rf(ctx, dash, provisioning) + var r0 *Dashboard + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, SaveDashboardCommand, *DashboardProvisioning) (*Dashboard, error)); ok { + return rf(ctx, cmd, provisioning) + } + if rf, ok := ret.Get(0).(func(context.Context, SaveDashboardCommand, *DashboardProvisioning) *Dashboard); ok { + r0 = rf(ctx, cmd, provisioning) } else { - r0 = ret.Error(0) + if ret.Get(0) != nil { + r0 = ret.Get(0).(*Dashboard) + } } - return r0 + if rf, ok := ret.Get(1).(func(context.Context, SaveDashboardCommand, *DashboardProvisioning) error); ok { + r1 = rf(ctx, cmd, provisioning) + } else { + r1 = ret.Error(1) + } + + return r0, r1 } // SoftDeleteDashboard provides a mock function with given fields: ctx, orgID, dashboardUid From bb881f38bbee238986220329317b60c7e98f7045 Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Mon, 17 Mar 2025 04:46:12 +0300 Subject: [PATCH 015/115] K8s/Dashboards: Remove uid+version from spec (#101992) --- .../apis/dashboard/legacy/sql_dashboards.go | 5 +- pkg/registry/apis/dashboard/mutate.go | 4 ++ .../dashboards/service/dashboard_service.go | 8 +-- .../service/dashboard_service_test.go | 64 ++++++++++--------- .../dashboardversion/dashverimpl/dashver.go | 16 +++-- .../dashverimpl/dashver_test.go | 15 ++--- pkg/tests/apis/dashboard/dashboards_test.go | 17 +++++ .../dashboard/testdata/dashboard-test-v0.yaml | 2 + .../dashboard/testdata/dashboard-test-v1.yaml | 4 +- 9 files changed, 83 insertions(+), 52 deletions(-) diff --git a/pkg/registry/apis/dashboard/legacy/sql_dashboards.go b/pkg/registry/apis/dashboard/legacy/sql_dashboards.go index 85c2e732cb9..8f07f37658b 100644 --- a/pkg/registry/apis/dashboard/legacy/sql_dashboards.go +++ b/pkg/registry/apis/dashboard/legacy/sql_dashboards.go @@ -342,7 +342,10 @@ func (a *dashboardSqlAccess) scanRow(rows *sql.Rows, history bool) (*dashboardRo return row, fmt.Errorf("JSON unmarshal error for: %s // %w", dash.Name, err) } } - dash.Spec.Remove("id") + // Ignore any saved values for id/version/uid + delete(dash.Spec.Object, "id") + delete(dash.Spec.Object, "version") + delete(dash.Spec.Object, "uid") } return row, err } diff --git a/pkg/registry/apis/dashboard/mutate.go b/pkg/registry/apis/dashboard/mutate.go index 57b25078848..a8df79270e9 100644 --- a/pkg/registry/apis/dashboard/mutate.go +++ b/pkg/registry/apis/dashboard/mutate.go @@ -28,11 +28,15 @@ func (b *DashboardsAPIBuilder) Mutate(ctx context.Context, a admission.Attribute switch v := obj.(type) { case *dashboardV0.Dashboard: + delete(v.Spec.Object, "uid") + delete(v.Spec.Object, "version") if id, ok := v.Spec.Object["id"].(float64); ok { delete(v.Spec.Object, "id") internalID = int64(id) } case *dashboardV1.Dashboard: + delete(v.Spec.Object, "uid") + delete(v.Spec.Object, "version") if id, ok := v.Spec.Object["id"].(float64); ok { delete(v.Spec.Object, "id") internalID = int64(id) diff --git a/pkg/services/dashboards/service/dashboard_service.go b/pkg/services/dashboards/service/dashboard_service.go index 924a435cd2d..cd55eb029e2 100644 --- a/pkg/services/dashboards/service/dashboard_service.go +++ b/pkg/services/dashboards/service/dashboard_service.go @@ -1946,10 +1946,8 @@ func (dr *DashboardServiceImpl) UnstructuredToLegacyDashboard(ctx context.Contex uid := obj.GetName() spec["uid"] = uid - dashVersion := 0 - if version, ok := spec["version"].(int64); ok { - dashVersion = int(version) - } + dashVersion := obj.GetGeneration() + spec["version"] = dashVersion out := dashboards.Dashboard{ OrgID: orgID, @@ -1957,7 +1955,7 @@ func (dr *DashboardServiceImpl) UnstructuredToLegacyDashboard(ctx context.Contex UID: uid, Slug: obj.GetSlug(), FolderUID: obj.GetFolder(), - Version: dashVersion, + Version: int(dashVersion), Data: simplejson.NewFromAny(spec), APIVersion: strings.TrimPrefix(item.GetAPIVersion(), dashboardv0alpha1.GROUP+"/"), } diff --git a/pkg/services/dashboards/service/dashboard_service_test.go b/pkg/services/dashboards/service/dashboard_service_test.go index 005d8409886..1f5f5d5f9ba 100644 --- a/pkg/services/dashboards/service/dashboard_service_test.go +++ b/pkg/services/dashboards/service/dashboard_service_test.go @@ -299,12 +299,12 @@ func TestGetDashboard(t *testing.T) { ctx, k8sCliMock := setupK8sDashboardTests(service) dashboardUnstructured := unstructured.Unstructured{Object: map[string]any{ "metadata": map[string]any{ - "name": "uid", + "name": "uid", + "generation": int64(1), }, "spec": map[string]any{ - "test": "test", - "version": int64(1), - "title": "testing slugify", + "test": "test", + "title": "testing slugify", }, }} @@ -337,12 +337,12 @@ func TestGetDashboard(t *testing.T) { k8sCliMock.On("GetNamespace", mock.Anything, mock.Anything).Return("default") dashboardUnstructured := unstructured.Unstructured{Object: map[string]any{ "metadata": map[string]any{ - "name": "uid", + "name": "uid", + "generation": int64(2), }, "spec": map[string]any{ - "test": "test", - "version": int64(1), - "title": "testing slugify", + "test": "test", + "title": "testing slugify", }, }} @@ -351,8 +351,8 @@ func TestGetDashboard(t *testing.T) { Title: "testing slugify", Slug: "testing-slugify", // slug is taken from title OrgID: 1, // orgID is populated from the query - Version: 1, - Data: simplejson.NewFromAny(map[string]any{"test": "test", "title": "testing slugify", "uid": "uid", "version": int64(1)}), + Version: 2, + Data: simplejson.NewFromAny(map[string]any{"test": "test", "title": "testing slugify", "uid": "uid", "version": int64(2)}), } k8sCliMock.On("Get", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(&dashboardUnstructured, nil).Once() k8sCliMock.On("GetUserFromMeta", mock.Anything, mock.Anything).Return(&user.User{}, nil) @@ -436,12 +436,12 @@ func TestGetAllDashboards(t *testing.T) { dashboardUnstructured := unstructured.Unstructured{Object: map[string]any{ "metadata": map[string]any{ - "name": "uid", + "name": "uid", + "generation": int64(1), }, "spec": map[string]any{ - "test": "test", - "version": int64(1), - "title": "testing slugify", + "test": "test", + "title": "testing slugify", }, }} @@ -488,12 +488,12 @@ func TestGetAllDashboardsByOrgId(t *testing.T) { dashboardUnstructured := unstructured.Unstructured{Object: map[string]any{ "metadata": map[string]any{ - "name": "uid", + "name": "uid", + "generation": int64(1), }, "spec": map[string]any{ - "test": "test", - "version": int64(1), - "title": "testing slugify", + "test": "test", + "title": "testing slugify", }, }} @@ -1573,23 +1573,26 @@ func TestGetDashboards(t *testing.T) { expectedResult := []*dashboards.Dashboard{ { - UID: "uid1", - Slug: "dashboard-1", - OrgID: 1, - Title: "Dashboard 1", - Data: simplejson.NewFromAny(map[string]any{"title": "Dashboard 1", "uid": "uid1"}), + UID: "uid1", + Slug: "dashboard-1", + OrgID: 1, + Title: "Dashboard 1", + Version: 1, + Data: simplejson.NewFromAny(map[string]any{"title": "Dashboard 1", "uid": "uid1", "version": int64(1)}), }, { - UID: "uid2", - Slug: "dashboard-2", - OrgID: 1, - Title: "Dashboard 2", - Data: simplejson.NewFromAny(map[string]any{"title": "Dashboard 2", "uid": "uid2"}), + UID: "uid2", + Slug: "dashboard-2", + OrgID: 1, + Title: "Dashboard 2", + Version: 1, + Data: simplejson.NewFromAny(map[string]any{"title": "Dashboard 2", "uid": "uid2", "version": int64(1)}), }, } uid1Unstructured := &unstructured.Unstructured{Object: map[string]any{ "metadata": map[string]any{ - "name": "uid1", + "name": "uid1", + "generation": int64(1), }, "spec": map[string]any{ "title": "Dashboard 1", @@ -1597,7 +1600,8 @@ func TestGetDashboards(t *testing.T) { }} uid2Unstructured := &unstructured.Unstructured{Object: map[string]any{ "metadata": map[string]any{ - "name": "uid2", + "name": "uid2", + "generation": int64(1), }, "spec": map[string]any{ "title": "Dashboard 2", diff --git a/pkg/services/dashboardversion/dashverimpl/dashver.go b/pkg/services/dashboardversion/dashverimpl/dashver.go index 12120bc9188..31103e1821a 100644 --- a/pkg/services/dashboardversion/dashverimpl/dashver.go +++ b/pkg/services/dashboardversion/dashverimpl/dashver.go @@ -286,11 +286,13 @@ func (s *Service) UnstructuredToLegacyDashboardVersion(ctx context.Context, item uid := obj.GetName() spec["uid"] = uid - dashVersion := 0 - parentVersion := 0 - if version, ok := spec["version"].(int64); ok { - dashVersion = int(version) - parentVersion = dashVersion - 1 + dashVersion := obj.GetGeneration() + parentVersion := dashVersion - 1 + if parentVersion < 0 { + parentVersion = 0 + } + if dashVersion > 0 { + spec["version"] = dashVersion } createdBy, err := s.k8sclient.GetUserFromMeta(ctx, obj.GetCreatedBy()) @@ -325,8 +327,8 @@ func (s *Service) UnstructuredToLegacyDashboardVersion(ctx context.Context, item CreatedBy: createdBy.ID, Message: obj.GetMessage(), RestoredFrom: restoreVer, - Version: dashVersion, - ParentVersion: parentVersion, + Version: int(dashVersion), + ParentVersion: int(parentVersion), Data: simplejson.NewFromAny(spec), } diff --git a/pkg/services/dashboardversion/dashverimpl/dashver_test.go b/pkg/services/dashboardversion/dashverimpl/dashver_test.go index 03b2c2302c8..bd022a00640 100644 --- a/pkg/services/dashboardversion/dashverimpl/dashver_test.go +++ b/pkg/services/dashboardversion/dashverimpl/dashver_test.go @@ -55,6 +55,7 @@ func TestDashboardVersionService(t *testing.T) { "metadata": map[string]any{ "name": "uid", "resourceVersion": "12", + "generation": int64(10), "labels": map[string]any{ utils.LabelKeyDeprecatedInternalID: "42", // nolint:staticcheck }, @@ -63,7 +64,7 @@ func TestDashboardVersionService(t *testing.T) { }, }, "spec": map[string]any{ - "version": int64(10), + "hello": "world", }, }}, nil).Once() res, err := dashboardVersionService.Get(context.Background(), &dashver.GetDashboardVersionQuery{ @@ -79,7 +80,7 @@ func TestDashboardVersionService(t *testing.T) { DashboardID: 42, DashboardUID: "uid", CreatedBy: 1, - Data: simplejson.NewFromAny(map[string]any{"uid": "uid", "version": int64(10)}), + Data: simplejson.NewFromAny(map[string]any{"uid": "uid", "version": int64(10), "hello": "world"}), }) mockCli.On("GetUserFromMeta", mock.Anything, "user:2").Return(&user.User{ID: 2}, nil) @@ -88,6 +89,7 @@ func TestDashboardVersionService(t *testing.T) { "metadata": map[string]any{ "name": "uid", "resourceVersion": "11", + "generation": int64(11), "labels": map[string]any{ utils.LabelKeyDeprecatedInternalID: "42", // nolint:staticcheck }, @@ -96,9 +98,7 @@ func TestDashboardVersionService(t *testing.T) { utils.AnnoKeyUpdatedBy: "user:2", // if updated by is set, that is the version creator }, }, - "spec": map[string]any{ - "version": int64(11), - }, + "spec": map[string]any{}, }}, nil).Once() res, err = dashboardVersionService.Get(context.Background(), &dashver.GetDashboardVersionQuery{ DashboardID: 42, @@ -264,13 +264,12 @@ func TestListDashboardVersions(t *testing.T) { "metadata": map[string]any{ "name": "uid", "resourceVersion": "12", + "generation": int64(5), "labels": map[string]any{ utils.LabelKeyDeprecatedInternalID: "42", // nolint:staticcheck }, }, - "spec": map[string]any{ - "version": int64(5), - }, + "spec": map[string]any{}, }}}}, nil).Once() res, err := dashboardVersionService.List(context.Background(), &query) require.Nil(t, err) diff --git a/pkg/tests/apis/dashboard/dashboards_test.go b/pkg/tests/apis/dashboard/dashboards_test.go index d0e48414fd6..f6ffedfc601 100644 --- a/pkg/tests/apis/dashboard/dashboards_test.go +++ b/pkg/tests/apis/dashboard/dashboards_test.go @@ -13,6 +13,7 @@ import ( "github.com/grafana/grafana/pkg/api/dtos" "github.com/grafana/grafana/pkg/apimachinery/utils" + "github.com/grafana/grafana/pkg/infra/slugify" "github.com/grafana/grafana/pkg/setting" "github.com/grafana/grafana/pkg/tests/apis" "github.com/grafana/grafana/pkg/tests/testinfra" @@ -313,6 +314,22 @@ func TestIntegrationLegacySupport(t *testing.T) { obj, err = client.Get(ctx, name, metav1.GetOptions{}, "dto") require.NoError(t, err) require.Equal(t, name, obj.GetName()) + + if obj.Object["spec"] == nil { + continue // missing conversions + } + + // This should have been moved to metadata + spec, _, err := unstructured.NestedMap(obj.Object, "spec") + require.NoError(t, err) + + require.Nil(t, spec["id"]) + require.Nil(t, spec["uid"]) + require.Nil(t, spec["version"]) + + access, _, err := unstructured.NestedMap(obj.Object, "access") + require.NoError(t, err) + require.Equal(t, slugify.Slugify(spec["title"].(string)), access["slug"]) } } diff --git a/pkg/tests/apis/dashboard/testdata/dashboard-test-v0.yaml b/pkg/tests/apis/dashboard/testdata/dashboard-test-v0.yaml index e1f66d12a34..2d4cf82b060 100644 --- a/pkg/tests/apis/dashboard/testdata/dashboard-test-v0.yaml +++ b/pkg/tests/apis/dashboard/testdata/dashboard-test-v0.yaml @@ -4,3 +4,5 @@ metadata: name: test-v0 spec: title: Test dashboard. Created at v0 + uid: test-v0 # will be removed by mutation hook + version: 1234567 # will be removed by mutation hook diff --git a/pkg/tests/apis/dashboard/testdata/dashboard-test-v1.yaml b/pkg/tests/apis/dashboard/testdata/dashboard-test-v1.yaml index 4a093f8a5cb..1e17651de60 100644 --- a/pkg/tests/apis/dashboard/testdata/dashboard-test-v1.yaml +++ b/pkg/tests/apis/dashboard/testdata/dashboard-test-v1.yaml @@ -3,4 +3,6 @@ kind: Dashboard metadata: name: test-v1 spec: - title: Test dashboard. Created at v1 XXX + title: Test dashboard. Created at v1 + uid: test-v1 # will be removed by mutation hook + version: 1234567 # will be removed by mutation hook From 16ca2308984248250e4a713f958806ac011b13ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=A4ggmark?= Date: Mon, 17 Mar 2025 01:26:49 -0400 Subject: [PATCH 016/115] Plugins: Fix better UX for disabled Angular plugins (#101333) * Feat: better UX for Angular plugins * Chore: fix i18n * Update public/app/features/plugins/admin/components/PluginDetailsDisabledError.tsx Co-authored-by: Jack Westbrook * Update public/app/features/plugins/admin/components/PluginDetailsDisabledError.tsx Co-authored-by: Jack Westbrook * Chore: fixes after PR feedback * Test: testing uninstall in cloud * Chore: fix weird merge * Chore: fix test import * Chore: comment out an expec * Chore: revert test of uninstall on cloud * Chore: adds tooltip and removes admin message * Trigger build * Chore: fix for cloud * Trigger build --------- Co-authored-by: Jack Westbrook --- .betterer.results | 10 - apps/dashboard/pkg/apis/dashboard_manifest.go | 2 - .../InstallControls/InstallControlsButton.tsx | 18 +- .../admin/components/PluginActions.test.tsx | 277 ++++++++++++++++++ .../admin/components/PluginActions.tsx | 59 +++- .../components/PluginDetailsDisabledError.tsx | 128 +++++--- .../features/plugins/admin/helpers.test.ts | 37 ++- public/app/features/plugins/admin/helpers.ts | 12 + public/locales/en-US/grafana.json | 13 + 9 files changed, 495 insertions(+), 61 deletions(-) create mode 100644 public/app/features/plugins/admin/components/PluginActions.test.tsx diff --git a/.betterer.results b/.betterer.results index 52b3e8a45c2..6849eaed996 100644 --- a/.betterer.results +++ b/.betterer.results @@ -5066,16 +5066,6 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] ], - "public/app/features/plugins/admin/components/PluginDetailsDisabledError.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "2"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "3"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "4"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "5"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "6"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "7"] - ], "public/app/features/plugins/admin/components/PluginDetailsHeaderDependencies.tsx:5381": [ [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] ], diff --git a/apps/dashboard/pkg/apis/dashboard_manifest.go b/apps/dashboard/pkg/apis/dashboard_manifest.go index bc68fa86ca6..9980594ef44 100644 --- a/apps/dashboard/pkg/apis/dashboard_manifest.go +++ b/apps/dashboard/pkg/apis/dashboard_manifest.go @@ -11,8 +11,6 @@ import ( "github.com/grafana/grafana-app-sdk/app" ) -var () - var appManifestData = app.ManifestData{ AppName: "dashboard", Group: "dashboard.grafana.app", diff --git a/public/app/features/plugins/admin/components/InstallControls/InstallControlsButton.tsx b/public/app/features/plugins/admin/components/InstallControls/InstallControlsButton.tsx index 9824a5c998a..b4d17285859 100644 --- a/public/app/features/plugins/admin/components/InstallControls/InstallControlsButton.tsx +++ b/public/app/features/plugins/admin/components/InstallControls/InstallControlsButton.tsx @@ -9,6 +9,7 @@ import { useQueryParams } from 'app/core/hooks/useQueryParams'; import { removePluginFromNavTree } from 'app/core/reducers/navBarTree'; import { useDispatch } from 'app/types'; +import { isDisabledAngularPlugin } from '../../helpers'; import { useInstallStatus, useUninstallStatus, @@ -118,7 +119,10 @@ export function InstallControlsButton({ } }; - let disableUninstall = shouldDisableUninstall(isUninstalling, plugin); + let disableUninstall = shouldDisableUninstall(isUninstalling, plugin) ?? false; + const uninstallTooltip = isDisabledAngularPlugin(plugin) + ? 'To uninstall this plugin, upgrade to a compatible version first, then uninstall it.' + : ''; let uninstallTitle = ''; if (plugin.isPreinstalled.found) { @@ -137,7 +141,13 @@ export function InstallControlsButton({ onConfirm={onUninstall} onDismiss={hideConfirmModal} /> - @@ -179,6 +189,10 @@ export function InstallControlsButton({ } function shouldDisableUninstall(isUninstalling: boolean, plugin: CatalogPlugin) { + if (isDisabledAngularPlugin(plugin)) { + return true; + } + if (config.pluginAdminExternalManageEnabled) { return plugin.isUninstallingFromInstance || !plugin.isFullyInstalled || plugin.isUpdatingFromInstance; } diff --git a/public/app/features/plugins/admin/components/PluginActions.test.tsx b/public/app/features/plugins/admin/components/PluginActions.test.tsx new file mode 100644 index 00000000000..3e09ba45fd9 --- /dev/null +++ b/public/app/features/plugins/admin/components/PluginActions.test.tsx @@ -0,0 +1,277 @@ +import { render, screen } from 'test/test-utils'; + +import { PluginErrorCode, PluginSignatureStatus, PluginSignatureType } from '@grafana/data'; + +import * as helpers from '../helpers'; +import * as hooks from '../state/hooks'; +import { initialState } from '../state/reducer'; +import { CatalogPlugin, PluginStatus, ReducerState, Version } from '../types'; + +import { getInstallControlsDisabled, getPluginStatus, PluginActions } from './PluginActions'; + +describe('PluginActions', () => { + let plugins: ReducerState; + + beforeEach(() => { + plugins = { ...initialState }; + jest.spyOn(helpers, 'isInstallControlsEnabled').mockReturnValue(true); + jest.spyOn(helpers, 'hasInstallControlWarning').mockReturnValue(false); + jest.spyOn(hooks, 'useIsRemotePluginsAvailable').mockReturnValue(true); + }); + + afterEach(() => { + jest.restoreAllMocks(); + }); + + describe('render', () => { + it('should render nothing when no plugin is provided', () => { + render(, { preloadedState: { plugins } }); + + expect(screen.queryByRole('button')).not.toBeInTheDocument(); + }); + + it('should render install button for non-installed plugin', () => { + render(, { preloadedState: { plugins } }); + + expect(screen.getByRole('button', { name: /install/i })).toBeInTheDocument(); + }); + + it('should render uninstall button for installed plugin', () => { + const installedPlugin = createPluginStub({ isInstalled: true }); + render(, { preloadedState: { plugins } }); + + expect(screen.getByRole('button', { name: /uninstall/i })).toBeInTheDocument(); + }); + + it('should render update button for plugin with update', () => { + const pluginWithUpdate = createPluginStub({ isInstalled: true, hasUpdate: true }); + render(, { preloadedState: { plugins } }); + + expect(screen.getByRole('button', { name: /update/i })).toBeInTheDocument(); + expect(screen.getByRole('button', { name: /uninstall/i })).toBeInTheDocument(); + expect(screen.getByRole('button', { name: /uninstall/i })).toHaveAttribute('aria-disabled', 'false'); + }); + + it('should not render install controls for core plugins', () => { + const corePlugin = createPluginStub({ isCore: true }); + render(, { preloadedState: { plugins } }); + + expect(screen.queryByRole('button', { name: /install|uninstall|update/i })).not.toBeInTheDocument(); + }); + + it('should not render install controls for disabled plugins', () => { + const disabledPlugin = createPluginStub({ isDisabled: true }); + render(, { preloadedState: { plugins } }); + + expect(screen.queryByRole('button', { name: /install|uninstall|update/i })).not.toBeInTheDocument(); + }); + + it('should not render install controls for provisioned plugins', () => { + const provisionedPlugin = createPluginStub({ isProvisioned: true }); + render(, { preloadedState: { plugins } }); + + expect(screen.queryByRole('button', { name: /install|uninstall|update/i })).not.toBeInTheDocument(); + }); + + it('should not render install controls when install controls are disabled', () => { + jest.spyOn(helpers, 'isInstallControlsEnabled').mockReturnValue(false); + render(, { preloadedState: { plugins } }); + + expect(screen.queryByRole('button', { name: /install|uninstall|update/i })).not.toBeInTheDocument(); + }); + + it('should render install controls when there is an installed disabled angular plugin with a non-angular version available', async () => { + jest.spyOn(helpers, 'getLatestCompatibleVersion').mockReturnValue(createVersion({ angularDetected: false })); + const disabledAngularPlugin = createPluginStub({ + isInstalled: true, + isDisabled: true, + error: PluginErrorCode.angular, + }); + render(, { preloadedState: { plugins } }); + + expect(screen.getByRole('button', { name: /update/i })).toBeInTheDocument(); + expect(screen.getByRole('button', { name: /uninstall/i })).toBeInTheDocument(); + expect(screen.getByRole('button', { name: /uninstall/i })).toHaveAttribute('aria-disabled', 'true'); + }); + + it('should not render install controls when there is an installed disabled angular plugin with no non-angular version available', () => { + jest.spyOn(helpers, 'getLatestCompatibleVersion').mockReturnValue(createVersion({ angularDetected: true })); + const disabledAngularPlugin = createPluginStub({ + isInstalled: true, + isDisabled: true, + error: PluginErrorCode.angular, + }); + render(, { preloadedState: { plugins } }); + + expect(screen.queryByRole('button', { name: /install|uninstall|update/i })).not.toBeInTheDocument(); + }); + }); + + describe('getPluginStatus', () => { + describe('regular plugins', () => { + it('should return INSTALL for non-installed plugins', () => { + const plugin = createPluginStub({ isInstalled: false }); + + expect(getPluginStatus(plugin, undefined)).toBe(PluginStatus.INSTALL); + }); + + it('should return UPDATE for installed plugins with updates', () => { + const plugin = createPluginStub({ isInstalled: true, hasUpdate: true }); + + expect(getPluginStatus(plugin, undefined)).toBe(PluginStatus.UPDATE); + }); + + it('should return UNINSTALL for installed plugins without updates', () => { + const plugin = createPluginStub({ isInstalled: true, hasUpdate: false }); + + expect(getPluginStatus(plugin, undefined)).toBe(PluginStatus.UNINSTALL); + }); + }); + + describe('angular plugins', () => { + it('should return INSTALL for non-installed angular plugins', () => { + const plugin = createPluginStub({ + isInstalled: false, + error: PluginErrorCode.angular, + }); + + expect(getPluginStatus(plugin, undefined)).toBe(PluginStatus.INSTALL); + }); + + it('should return UPDATE for installed angular plugins with non-angular version available', () => { + const plugin = createPluginStub({ + isInstalled: true, + error: PluginErrorCode.angular, + }); + const latestVersion = createVersion({ angularDetected: false }); + + expect(getPluginStatus(plugin, latestVersion)).toBe(PluginStatus.UPDATE); + }); + + it('should return UNINSTALL for installed angular plugins with only angular versions available', () => { + const plugin = createPluginStub({ + isInstalled: true, + error: PluginErrorCode.angular, + }); + const latestVersion = createVersion({ angularDetected: true }); + + expect(getPluginStatus(plugin, latestVersion)).toBe(PluginStatus.UNINSTALL); + }); + + it('should return UNINSTALL for installed angular plugins with no version info', () => { + const plugin = createPluginStub({ + isInstalled: true, + error: PluginErrorCode.angular, + }); + + expect(getPluginStatus(plugin, undefined)).toBe(PluginStatus.UNINSTALL); + }); + }); + + describe('disabled plugins', () => { + it('should handle disabled angular plugins', () => { + const plugin = createPluginStub({ + isInstalled: true, + isDisabled: true, + error: PluginErrorCode.angular, + }); + + expect(getPluginStatus(plugin, undefined)).toBe(PluginStatus.UNINSTALL); + }); + + it('should handle disabled regular plugins', () => { + const plugin = createPluginStub({ + isInstalled: true, + isDisabled: true, + }); + + expect(getPluginStatus(plugin, undefined)).toBe(PluginStatus.UNINSTALL); + }); + }); + }); + + describe('getInstallControlsDisabled', () => { + it('should return false for disabled angular plugins that have a non-angular version available', () => { + const plugin = createPluginStub({ isDisabled: true, error: PluginErrorCode.angular }); + const latestVersion = createVersion({ angularDetected: false }); + + expect(getInstallControlsDisabled(plugin, latestVersion)).toBe(false); + }); + + it('should return true for disabled regular plugins', () => { + const plugin = createPluginStub({ isDisabled: true }); + + expect(getInstallControlsDisabled(plugin, undefined)).toBe(true); + }); + + it('should return true for core plugins', () => { + const plugin = createPluginStub({ isCore: true }); + + expect(getInstallControlsDisabled(plugin, undefined)).toBe(true); + }); + + it('should return true for provisioned plugins', () => { + const plugin = createPluginStub({ isProvisioned: true }); + + expect(getInstallControlsDisabled(plugin, undefined)).toBe(true); + }); + + it('should return false for regular plugins', () => { + const plugin = createPluginStub({}); + + expect(getInstallControlsDisabled(plugin, undefined)).toBe(false); + }); + + it('should return true when install controls are not enabled', () => { + jest.spyOn(helpers, 'isInstallControlsEnabled').mockReturnValue(false); + const plugin = createPluginStub({}); + + expect(getInstallControlsDisabled(plugin, undefined)).toBe(true); + }); + }); +}); + +function createPluginStub(overrides?: Partial): CatalogPlugin { + return { + name: 'Test Plugin', + id: 'test-plugin', + description: 'Test plugin', + isCore: false, + isInstalled: false, + isDisabled: false, + isProvisioned: false, + hasUpdate: false, + signature: PluginSignatureStatus.valid, + signatureType: PluginSignatureType.grafana, + signatureOrg: 'grafana', + info: { + logos: { small: '', large: '' }, + keywords: [], + }, + error: undefined, + downloads: 0, + popularity: 0, + orgName: 'Test Org', + publishedAt: '', + updatedAt: '', + isPublished: true, + isDev: false, + isEnterprise: false, + isDeprecated: false, + isManaged: false, + isPreinstalled: { found: false, withVersion: false }, + ...overrides, + }; +} + +function createVersion(overrides?: Partial): Version { + return { + version: '1.0.0', + createdAt: '', + updatedAt: '', + isCompatible: true, + grafanaDependency: '', + angularDetected: false, + ...overrides, + }; +} diff --git a/public/app/features/plugins/admin/components/PluginActions.tsx b/public/app/features/plugins/admin/components/PluginActions.tsx index 1e993c75856..3403071f42a 100644 --- a/public/app/features/plugins/admin/components/PluginActions.tsx +++ b/public/app/features/plugins/admin/components/PluginActions.tsx @@ -1,14 +1,20 @@ import { css } from '@emotion/css'; import { useState } from 'react'; -import { GrafanaTheme2 } from '@grafana/data'; +import { GrafanaTheme2, PluginErrorCode } from '@grafana/data'; import { Icon, Stack, useStyles2 } from '@grafana/ui'; import { GetStartedWithPlugin } from '../components/GetStartedWithPlugin'; import { InstallControlsButton } from '../components/InstallControls'; -import { getLatestCompatibleVersion, hasInstallControlWarning, isInstallControlsEnabled } from '../helpers'; +import { + getLatestCompatibleVersion, + hasInstallControlWarning, + isDisabledAngularPlugin, + isInstallControlsEnabled, + isNonAngularVersion, +} from '../helpers'; import { useIsRemotePluginsAvailable } from '../state/hooks'; -import { CatalogPlugin, PluginStatus } from '../types'; +import { CatalogPlugin, PluginStatus, Version } from '../types'; interface Props { plugin?: CatalogPlugin; @@ -25,13 +31,8 @@ export const PluginActions = ({ plugin }: Props) => { } const hasInstallWarning = hasInstallControlWarning(plugin, isRemotePluginsAvailable, latestCompatibleVersion); - const pluginStatus = plugin.isInstalled - ? plugin.hasUpdate - ? PluginStatus.UPDATE - : PluginStatus.UNINSTALL - : PluginStatus.INSTALL; - const isInstallControlsDisabled = - plugin.isCore || plugin.isDisabled || plugin.isProvisioned || !isInstallControlsEnabled(); + const pluginStatus = getPluginStatus(plugin, latestCompatibleVersion); + const isInstallControlsDisabled = getInstallControlsDisabled(plugin, latestCompatibleVersion); return ( @@ -64,3 +65,41 @@ const getStyles = (theme: GrafanaTheme2) => { }), }; }; + +function getAngularPluginStatus(plugin: CatalogPlugin, latestCompatibleVersion: Version | undefined): PluginStatus { + if (!plugin.isInstalled) { + return PluginStatus.INSTALL; + } + + if (isNonAngularVersion(latestCompatibleVersion)) { + return PluginStatus.UPDATE; + } + + return PluginStatus.UNINSTALL; +} + +function getPluginStatus(plugin: CatalogPlugin, latestCompatibleVersion: Version | undefined) { + if (plugin.error === PluginErrorCode.angular) { + return getAngularPluginStatus(plugin, latestCompatibleVersion); + } + + if (!plugin.isInstalled) { + return PluginStatus.INSTALL; + } + + if (plugin.hasUpdate) { + return PluginStatus.UPDATE; + } + + return PluginStatus.UNINSTALL; +} + +function getInstallControlsDisabled(plugin: CatalogPlugin, latestCompatibleVersion: Version | undefined) { + if (isDisabledAngularPlugin(plugin) && isNonAngularVersion(latestCompatibleVersion)) { + return false; + } + + return plugin.isCore || plugin.isDisabled || plugin.isProvisioned || !isInstallControlsEnabled(); +} + +export { getPluginStatus, getInstallControlsDisabled }; diff --git a/public/app/features/plugins/admin/components/PluginDetailsDisabledError.tsx b/public/app/features/plugins/admin/components/PluginDetailsDisabledError.tsx index 333241a6634..15cef149c32 100644 --- a/public/app/features/plugins/admin/components/PluginDetailsDisabledError.tsx +++ b/public/app/features/plugins/admin/components/PluginDetailsDisabledError.tsx @@ -2,8 +2,10 @@ import { ReactElement } from 'react'; import { PluginErrorCode } from '@grafana/data'; import { selectors } from '@grafana/e2e-selectors'; -import { Alert } from '@grafana/ui'; +import { Alert, Stack } from '@grafana/ui'; +import { t, Trans } from 'app/core/internationalization'; +import { getLatestCompatibleVersion, isDisabledAngularPlugin, isNonAngularVersion } from '../helpers'; import { CatalogPlugin } from '../types'; type Props = { @@ -16,66 +18,122 @@ export function PluginDetailsDisabledError({ className, plugin }: Props): ReactE return null; } + const title = t('plugins.details.disabled-error.title', 'Plugin disabled'); + const isLatestCompatibleNotAngular = isNonAngularVersion(getLatestCompatibleVersion(plugin?.details?.versions)); + return ( - - {renderDescriptionFromError(plugin.error)} -

Please contact your server administrator to get this resolved.

- - Read more about managing plugins - + + {renderDescriptionFromError(plugin.error, plugin.id, isLatestCompatibleNotAngular)} + {!isDisabledAngularPlugin(plugin) && ( +

+ + Please contact your server administrator to get this resolved. + +

+ )} + + + Read more about managing plugins + + {plugin.error === PluginErrorCode.angular && ( + + + Read more about angular deprecation + + + )} +
); } -function renderDescriptionFromError(error?: PluginErrorCode): ReactElement { +function renderDescriptionFromError( + error?: PluginErrorCode, + id?: string, + isLatestCompatibleNotAngular?: boolean +): ReactElement { switch (error) { case PluginErrorCode.modifiedSignature: return (

- Grafana Labs checks each plugin to verify that it has a valid digital signature. While doing this, we - discovered that the content of this plugin does not match its signature. We can not guarantee the trustworthy - of this plugin and have therefore disabled it. We recommend you to reinstall the plugin to make sure you are - running a verified version of this plugin. + + Grafana Labs checks each plugin to verify that it has a valid digital signature. While doing this, we + discovered that the content of this plugin does not match its signature. We can not guarantee the + trustworthy of this plugin and have therefore disabled it. We recommend you to reinstall the plugin to make + sure you are running a verified version of this plugin. +

); case PluginErrorCode.invalidSignature: return (

- Grafana Labs checks each plugin to verify that it has a valid digital signature. While doing this, we - discovered that it was invalid. We can not guarantee the trustworthy of this plugin and have therefore - disabled it. We recommend you to reinstall the plugin to make sure you are running a verified version of this - plugin. + + Grafana Labs checks each plugin to verify that it has a valid digital signature. While doing this, we + discovered that it was invalid. We can not guarantee the trustworthy of this plugin and have therefore + disabled it. We recommend you to reinstall the plugin to make sure you are running a verified version of + this plugin. +

); case PluginErrorCode.missingSignature: return (

- Grafana Labs checks each plugin to verify that it has a valid digital signature. While doing this, we - discovered that there is no signature for this plugin. We can not guarantee the trustworthy of this plugin and - have therefore disabled it. We recommend you to reinstall the plugin to make sure you are running a verified - version of this plugin. + + Grafana Labs checks each plugin to verify that it has a valid digital signature. While doing this, we + discovered that there is no signature for this plugin. We can not guarantee the trustworthy of this plugin + and have therefore disabled it. We recommend you to reinstall the plugin to make sure you are running a + verified version of this plugin. +

); case PluginErrorCode.failedBackendStart: - return

This plugin failed to start. Server logs can provide more information.

; + return ( +

+ + This plugin failed to start. Server logs can provide more information. + +

+ ); case PluginErrorCode.angular: - // Error message already rendered by AngularDeprecationPluginNotice - return <>; + if (isLatestCompatibleNotAngular) { + return ( +

+ + This plugin has been disabled as Grafana no longer supports Angular based plugins. You can try updating + the plugin to the latest version to resolve this issue. You should then test to confirm it works as + expected. + +

+ ); + } + + return ( +

+ + This plugin has been disabled as Grafana no longer supports Angular based plugins. Unfortunately, the latest + version of this plugin still uses Angular so you need to wait for the plugin author to migrate to continue + using this plugin. + +

+ ); + default: return (

- We failed to run this plugin due to an unkown reason and have therefore disabled it. We recommend you to - reinstall the plugin to make sure you are running a working version of this plugin. + + We failed to run this plugin due to an unkown reason and have therefore disabled it. We recommend you to + reinstall the plugin to make sure you are running a working version of this plugin. +

); } diff --git a/public/app/features/plugins/admin/helpers.test.ts b/public/app/features/plugins/admin/helpers.test.ts index 4976659623a..d59a1b80835 100644 --- a/public/app/features/plugins/admin/helpers.test.ts +++ b/public/app/features/plugins/admin/helpers.test.ts @@ -1,4 +1,4 @@ -import { PluginSignatureStatus, PluginSignatureType, PluginType } from '@grafana/data'; +import { PluginErrorCode, PluginSignatureStatus, PluginSignatureType, PluginType } from '@grafana/data'; import { config } from '@grafana/runtime'; import { getLocalPluginMock, getRemotePluginMock, getCatalogPluginMock } from './__mocks__'; @@ -12,8 +12,10 @@ import { Sorters, isLocalPluginVisibleByConfig, isRemotePluginVisibleByConfig, + isNonAngularVersion, + isDisabledAngularPlugin, } from './helpers'; -import { RemotePlugin, LocalPlugin, RemotePluginStatus } from './types'; +import { RemotePlugin, LocalPlugin, RemotePluginStatus, Version, CatalogPlugin } from './types'; describe('Plugins/Helpers', () => { let remotePlugin: RemotePlugin; @@ -876,4 +878,35 @@ describe('Plugins/Helpers', () => { expect(isRemotePluginVisibleByConfig(plugin)).toBe(false); }); }); + + describe('isNonAngularVersion()', () => { + test('should return TRUE if the version is not using angular', () => { + expect(isNonAngularVersion({ angularDetected: false } as Version)).toBe(true); + }); + + test('should return FALSE if the version is using angular', () => { + expect(isNonAngularVersion({ angularDetected: true } as Version)).toBe(false); + }); + + test('should return FALSE if the version is not set', () => { + expect(isNonAngularVersion(undefined)).toBe(false); + }); + }); + + describe('isDisabledAngularPlugin', () => { + it('should return true for disabled angular plugins', () => { + const plugin = { isDisabled: true, error: PluginErrorCode.angular } as CatalogPlugin; + expect(isDisabledAngularPlugin(plugin)).toBe(true); + }); + + it('should return false for non-angular plugins', () => { + const plugin = { isDisabled: true, error: undefined } as CatalogPlugin; + expect(isDisabledAngularPlugin(plugin)).toBe(false); + }); + + it('should return false for plugins that are not disabled', () => { + const plugin = { isDisabled: false, error: undefined } as CatalogPlugin; + expect(isDisabledAngularPlugin(plugin)).toBe(false); + }); + }); }); diff --git a/public/app/features/plugins/admin/helpers.ts b/public/app/features/plugins/admin/helpers.ts index 8b0bfe80cfd..561f6ce04ee 100644 --- a/public/app/features/plugins/admin/helpers.ts +++ b/public/app/features/plugins/admin/helpers.ts @@ -480,3 +480,15 @@ export function shouldDisablePluginInstall(plugin: CatalogPlugin) { return false; } + +export function isNonAngularVersion(version?: Version) { + if (!version) { + return false; + } + + return version.angularDetected === false; +} + +export function isDisabledAngularPlugin(plugin: CatalogPlugin) { + return plugin.isDisabled && plugin.error === PluginErrorCode.angular; +} diff --git a/public/locales/en-US/grafana.json b/public/locales/en-US/grafana.json index cfd0d0f453d..693b3e5f120 100644 --- a/public/locales/en-US/grafana.json +++ b/public/locales/en-US/grafana.json @@ -3102,6 +3102,19 @@ "connections-tab": { "description": "You currently have the following data sources configured for {{pluginName}}, click a tile to view the configuration details. You can find all of your data source connections in <4><0>Connections - <3>Data sources." }, + "disabled-error": { + "angular-deprecation-link": "Read more about angular deprecation", + "angular-error-text": "This plugin has been disabled as Grafana no longer supports Angular based plugins. You can try updating the plugin to the latest version to resolve this issue. You should then test to confirm it works as expected.", + "angular-error-text-no-non-angular-version": "This plugin has been disabled as Grafana no longer supports Angular based plugins. Unfortunately, the latest version of this plugin still uses Angular so you need to wait for the plugin author to migrate to continue using this plugin.", + "contact-server-admin": "Please contact your server administrator to get this resolved.", + "failed-backend-start-text": "This plugin failed to start. Server logs can provide more information.", + "invalid-signature-text": "Grafana Labs checks each plugin to verify that it has a valid digital signature. While doing this, we discovered that it was invalid. We can not guarantee the trustworthy of this plugin and have therefore disabled it. We recommend you to reinstall the plugin to make sure you are running a verified version of this plugin.", + "manage-plugins-link": "Read more about managing plugins", + "missing-signature-text": "Grafana Labs checks each plugin to verify that it has a valid digital signature. While doing this, we discovered that there is no signature for this plugin. We can not guarantee the trustworthy of this plugin and have therefore disabled it. We recommend you to reinstall the plugin to make sure you are running a verified version of this plugin.", + "modified-signature-text": "Grafana Labs checks each plugin to verify that it has a valid digital signature. While doing this, we discovered that the content of this plugin does not match its signature. We can not guarantee the trustworthy of this plugin and have therefore disabled it. We recommend you to reinstall the plugin to make sure you are running a verified version of this plugin.", + "title": "Plugin disabled", + "unknown-error-text": "We failed to run this plugin due to an unkown reason and have therefore disabled it. We recommend you to reinstall the plugin to make sure you are running a working version of this plugin." + }, "labels": { "contactGrafanaLabs": "Contact Grafana Labs", "customLinks": "Custom links ", From 16934bca81d7dfb82dfdecae17c4d5df098d6f34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=A4ggmark?= Date: Mon, 17 Mar 2025 03:25:02 -0400 Subject: [PATCH 017/115] Update HALL_OF_FAME.md (#102267) --- HALL_OF_FAME.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HALL_OF_FAME.md b/HALL_OF_FAME.md index ec3ac31b6ae..dc14715d6eb 100644 --- a/HALL_OF_FAME.md +++ b/HALL_OF_FAME.md @@ -2,6 +2,6 @@ List of previous team members that have had a big impact on the company or the product and contributed during a long period of time. -- Hugo Häggmark ([Björn Lundén](https://www.bjornlunden.se/)) +- [Hugo Häggmark](https://github.com/hugohaggmark) - [Marcus Efraimsson](https://github.com/marefr) - [Giordano Ricci](https://github.com/elfo404) From 077f9e90d54728bb062318efeba757c4bac5d432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20=C5=A0tibran=C3=BD?= Date: Mon, 17 Mar 2025 09:27:11 +0100 Subject: [PATCH 018/115] Fix format of timestamps sent to Spanner. (#102227) --- pkg/util/xorm/engine.go | 11 +++++++---- pkg/util/xorm/xorm.go | 28 ++++++++++++++++++---------- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/pkg/util/xorm/engine.go b/pkg/util/xorm/engine.go index c64b7b29f4f..8db50041ae2 100644 --- a/pkg/util/xorm/engine.go +++ b/pkg/util/xorm/engine.go @@ -36,9 +36,10 @@ type Engine struct { showSQL bool showExecTime bool - logger core.ILogger - TZLocation *time.Location // The timezone of the application - DatabaseTZ *time.Location // The timezone of the database + logger core.ILogger + TZLocation *time.Location // The timezone of the application + DatabaseTZ *time.Location // The timezone of the database + timestampFormat string // Format applied to time.Time before passing it to database in Timestamp and DateTime columns. tagHandlers map[string]tagHandler @@ -748,7 +749,9 @@ func (engine *Engine) formatTime(sqlTypeName string, t time.Time) (v any) { v = s[11:19] case core.Date: v = t.Format("2006-01-02") - case core.DateTime, core.TimeStamp, core.Varchar: // !DarthPestilane! format time when sqlTypeName is core.Varchar. + case core.DateTime, core.TimeStamp: + v = t.Format(engine.timestampFormat) + case core.Varchar: // !DarthPestilane! format time when sqlTypeName is core.Varchar. v = t.Format("2006-01-02 15:04:05") case core.TimeStampz: v = t.Format(time.RFC3339Nano) diff --git a/pkg/util/xorm/xorm.go b/pkg/util/xorm/xorm.go index 40c1552cec5..25ce8bd952f 100644 --- a/pkg/util/xorm/xorm.go +++ b/pkg/util/xorm/xorm.go @@ -83,19 +83,27 @@ func NewEngine(driverName string, dataSourceName string) (*Engine, error) { } engine := &Engine{ - db: db, - dialect: dialect, - Tables: make(map[reflect.Type]*core.Table), - mutex: &sync.RWMutex{}, - TagIdentifier: "xorm", - TZLocation: time.Local, - tagHandlers: defaultTagHandlers, - defaultContext: context.Background(), + db: db, + dialect: dialect, + Tables: make(map[reflect.Type]*core.Table), + mutex: &sync.RWMutex{}, + TagIdentifier: "xorm", + TZLocation: time.Local, + tagHandlers: defaultTagHandlers, + defaultContext: context.Background(), + timestampFormat: "2006-01-02 15:04:05", } - if uri.DbType == core.SQLITE { + switch uri.DbType { + case core.SQLITE: engine.DatabaseTZ = time.UTC - } else { + case "spanner": + engine.DatabaseTZ = time.UTC + // We need to specify "Z" to indicate that timestamp is in UTC. + // Otherwise Spanner uses default America/Los_Angeles timezone. + // https://cloud.google.com/spanner/docs/reference/standard-sql/data-types#time_zones + engine.timestampFormat = "2006-01-02 15:04:05Z" + default: engine.DatabaseTZ = time.Local } From de6a48a233c7945e74373a496c6bb2091166e5f1 Mon Sep 17 00:00:00 2001 From: Denis Vodopianov Date: Mon, 17 Mar 2025 09:48:41 +0100 Subject: [PATCH 019/115] Chore: Replace bingo-managed tools with go tool directive. (#101890) --- .citools/bra/go.mod | 22 + .citools/bra/go.sum | 69 +++ .citools/cog/go.mod | 50 ++ .citools/cog/go.sum | 106 ++++ .citools/cue/go.mod | 37 ++ .citools/cue/go.sum | 74 +++ .citools/drone/go.mod | 77 +++ .citools/drone/go.sum | 338 ++++++++++++ .citools/golangci-lint/go.mod | 191 +++++++ .citools/golangci-lint/go.sum | 957 ++++++++++++++++++++++++++++++++++ .citools/jb/go.mod | 20 + .citools/jb/go.sum | 70 +++ .citools/lefthook/go.mod | 51 ++ .citools/lefthook/go.sum | 117 +++++ .github/CODEOWNERS | 1 + .github/workflows/go-lint.yml | 2 +- Dockerfile | 9 +- Makefile | 26 +- go.work | 9 +- go.work.sum | 224 ++++++-- kindsv2/Makefile | 4 +- 21 files changed, 2395 insertions(+), 59 deletions(-) create mode 100644 .citools/bra/go.mod create mode 100644 .citools/bra/go.sum create mode 100644 .citools/cog/go.mod create mode 100644 .citools/cog/go.sum create mode 100644 .citools/cue/go.mod create mode 100644 .citools/cue/go.sum create mode 100644 .citools/drone/go.mod create mode 100644 .citools/drone/go.sum create mode 100644 .citools/golangci-lint/go.mod create mode 100644 .citools/golangci-lint/go.sum create mode 100644 .citools/jb/go.mod create mode 100644 .citools/jb/go.sum create mode 100644 .citools/lefthook/go.mod create mode 100644 .citools/lefthook/go.sum diff --git a/.citools/bra/go.mod b/.citools/bra/go.mod new file mode 100644 index 00000000000..7562899364f --- /dev/null +++ b/.citools/bra/go.mod @@ -0,0 +1,22 @@ +module bra + +go 1.24.1 + +tool github.com/unknwon/bra + +require ( + github.com/BurntSushi/toml v1.4.0 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/fsnotify/fsnotify v1.8.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/russross/blackfriday/v2 v2.1.0 // indirect + github.com/smartystreets/goconvey v1.6.4 // indirect + github.com/stretchr/testify v1.10.0 // indirect + github.com/unknwon/bra v0.0.0-20200517080246-1e3013ecaff8 // indirect + github.com/unknwon/com v1.0.1 // indirect + github.com/unknwon/log v0.0.0-20200308114134-929b1006e34a // indirect + github.com/urfave/cli v1.22.16 // indirect + golang.org/x/sys v0.30.0 // indirect + gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect +) diff --git a/.citools/bra/go.sum b/.citools/bra/go.sum new file mode 100644 index 00000000000..c96783ededd --- /dev/null +++ b/.citools/bra/go.sum @@ -0,0 +1,69 @@ +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= +github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.6 h1:XJtiaUW6dEEqVuZiMTn1ldk455QWwEIsMIJlo5vtkx0= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= +github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e h1:JKmoR8x90Iww1ks85zJ1lfDGgIiMDuIptTOhJq+zKyg= +github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304 h1:Jpy1PXuP99tXNrhbq2BaPz9B+jNAvH1JPQQpG/9GCXY= +github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/unknwon/bra v0.0.0-20200517080246-1e3013ecaff8 h1:aVGB3YnaS/JNfOW3tiHIlmNmTDg618va+eT0mVomgyI= +github.com/unknwon/bra v0.0.0-20200517080246-1e3013ecaff8/go.mod h1:fVle4kNr08ydeohzYafr20oZzbAkhQT39gKK/pFQ5M4= +github.com/unknwon/com v1.0.1 h1:3d1LTxD+Lnf3soQiD4Cp/0BRB+Rsa/+RTvz8GMMzIXs= +github.com/unknwon/com v1.0.1/go.mod h1:tOOxU81rwgoCLoOVVPHb6T/wt8HZygqH5id+GNnlCXM= +github.com/unknwon/log v0.0.0-20150304194804-e617c87089d3/go.mod h1:1xEUf2abjfP92w2GZTV+GgaRxXErwRXcClbUwrNJffU= +github.com/unknwon/log v0.0.0-20200308114134-929b1006e34a h1:vcrhXnj9g9PIE+cmZgaPSwOyJ8MAQTRmsgGrB0x5rF4= +github.com/unknwon/log v0.0.0-20200308114134-929b1006e34a/go.mod h1:1xEUf2abjfP92w2GZTV+GgaRxXErwRXcClbUwrNJffU= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli v1.22.16 h1:MH0k6uJxdwdeWQTwhSO42Pwr4YLrNLwBtg1MRgTqPdQ= +github.com/urfave/cli v1.22.16/go.mod h1:EeJR6BKodywf4zciqrdw6hpCPk68JO9z5LazXZMn5Po= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20191020152052-9984515f0562/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= +golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/fsnotify/fsnotify.v1 v1.4.7 h1:XNNYLJHt73EyYiCZi6+xjupS9CpvmiDgjPTAjrBlQbo= +gopkg.in/fsnotify/fsnotify.v1 v1.4.7/go.mod h1:Fyux9zXlo4rWoMSIzpn9fDAYjalPqJ/K1qJ27s+7ltE= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/.citools/cog/go.mod b/.citools/cog/go.mod new file mode 100644 index 00000000000..51da6f35a87 --- /dev/null +++ b/.citools/cog/go.mod @@ -0,0 +1,50 @@ +module cog + +go 1.24.1 + +tool github.com/grafana/cog/cmd/cli + +require ( + cuelabs.dev/go/oci/ociregistry v0.0.0-20240906074133-82eb438dd565 // indirect + cuelang.org/go v0.11.1 // indirect + github.com/cockroachdb/apd/v3 v3.2.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/emicklei/proto v1.13.2 // indirect + github.com/expr-lang/expr v1.16.9 // indirect + github.com/getkin/kin-openapi v0.129.0 // indirect + github.com/go-openapi/jsonpointer v0.21.0 // indirect + github.com/go-openapi/swag v0.23.0 // indirect + github.com/google/go-cmp v0.7.0 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/grafana/codejen v0.0.4-0.20230321061741-77f656893a3d // indirect + github.com/grafana/cog v0.0.27 // indirect + github.com/hashicorp/errwrap v1.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/huandu/xstrings v1.5.0 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/lib/pq v1.10.9 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/mitchellh/go-wordwrap v1.0.1 // indirect + github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect + github.com/oasdiff/yaml v0.0.0-20241210131133-6b86fb107d80 // indirect + github.com/oasdiff/yaml3 v0.0.0-20241210130736-a94c01f36349 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.1.0 // indirect + github.com/pelletier/go-toml/v2 v2.2.3 // indirect + github.com/perimeterx/marshmallow v1.1.5 // indirect + github.com/protocolbuffers/txtpbfmt v0.0.0-20241112170944-20d2c9ebc01d // indirect + github.com/rogpeppe/go-internal v1.13.1 // indirect + github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect + github.com/spf13/cobra v1.9.1 // indirect + github.com/spf13/pflag v1.0.6 // indirect + github.com/ugorji/go/codec v1.2.11 // indirect + github.com/yalue/merged_fs v1.3.0 // indirect + golang.org/x/mod v0.23.0 // indirect + golang.org/x/net v0.36.0 // indirect + golang.org/x/oauth2 v0.24.0 // indirect + golang.org/x/sync v0.11.0 // indirect + golang.org/x/text v0.22.0 // indirect + golang.org/x/tools v0.30.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/.citools/cog/go.sum b/.citools/cog/go.sum new file mode 100644 index 00000000000..2c12a9e6eac --- /dev/null +++ b/.citools/cog/go.sum @@ -0,0 +1,106 @@ +cuelabs.dev/go/oci/ociregistry v0.0.0-20240906074133-82eb438dd565 h1:R5wwEcbEZSBmeyg91MJZTxfd7WpBo2jPof3AYjRbxwY= +cuelabs.dev/go/oci/ociregistry v0.0.0-20240906074133-82eb438dd565/go.mod h1:5A4xfTzHTXfeVJBU6RAUf+QrlfTCW+017q/QiW+sMLg= +cuelang.org/go v0.11.1 h1:pV+49MX1mmvDm8Qh3Za3M786cty8VKPWzQ1Ho4gZRP0= +cuelang.org/go v0.11.1/go.mod h1:PBY6XvPUswPPJ2inpvUozP9mebDVTXaeehQikhZPBz0= +github.com/cockroachdb/apd/v3 v3.2.1 h1:U+8j7t0axsIgvQUqthuNm82HIrYXodOV2iWLWtEaIwg= +github.com/cockroachdb/apd/v3 v3.2.1/go.mod h1:klXJcjp+FffLTHlhIG69tezTDvdP065naDsHzKhYSqc= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/emicklei/proto v1.13.2 h1:z/etSFO3uyXeuEsVPzfl56WNgzcvIr42aQazXaQmFZY= +github.com/emicklei/proto v1.13.2/go.mod h1:rn1FgRS/FANiZdD2djyH7TMA9jdRDcYQ9IEN9yvjX0A= +github.com/expr-lang/expr v1.16.9 h1:WUAzmR0JNI9JCiF0/ewwHB1gmcGw5wW7nWt8gc6PpCI= +github.com/expr-lang/expr v1.16.9/go.mod h1:8/vRC7+7HBzESEqt5kKpYXxrxkr31SaO8r40VO/1IT4= +github.com/getkin/kin-openapi v0.129.0 h1:QGYTNcmyP5X0AtFQ2Dkou9DGBJsUETeLH9rFrJXZh30= +github.com/getkin/kin-openapi v0.129.0/go.mod h1:gmWI+b/J45xqpyK5wJmRRZse5wefA5H0RDMK46kLUtI= +github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= +github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI= +github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow= +github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= +github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grafana/codejen v0.0.4-0.20230321061741-77f656893a3d h1:hrXbGJ5jgp6yNITzs5o+zXq0V5yT3siNJ+uM8LGwWKk= +github.com/grafana/codejen v0.0.4-0.20230321061741-77f656893a3d/go.mod h1:zmwwM/DRyQB7pfuBjTWII3CWtxcXh8LTwAYGfDfpR6s= +github.com/grafana/cog v0.0.27 h1:ZKipAtp6KuB08R16nZbqEjnje3e2r1O1bzOp1CetDEo= +github.com/grafana/cog v0.0.27/go.mod h1:JB5lhdn4Hqc0ztYCaNOTKZXoojzJvydBxMkMCGWS6+Q= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= +github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI= +github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= +github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= +github.com/oasdiff/yaml v0.0.0-20241210131133-6b86fb107d80 h1:nZspmSkneBbtxU9TopEAE0CY+SBJLxO8LPUlw2vG4pU= +github.com/oasdiff/yaml v0.0.0-20241210131133-6b86fb107d80/go.mod h1:7tFDb+Y51LcDpn26GccuUgQXUk6t0CXZsivKjyimYX8= +github.com/oasdiff/yaml3 v0.0.0-20241210130736-a94c01f36349 h1:t05Ww3DxZutOqbMN+7OIuqDwXbhl32HiZGpLy26BAPc= +github.com/oasdiff/yaml3 v0.0.0-20241210130736-a94c01f36349/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= +github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= +github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= +github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s= +github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/protocolbuffers/txtpbfmt v0.0.0-20241112170944-20d2c9ebc01d h1:HWfigq7lB31IeJL8iy7jkUmU/PG1Sr8jVGhS749dbUA= +github.com/protocolbuffers/txtpbfmt v0.0.0-20241112170944-20d2c9ebc01d/go.mod h1:jgxiZysxFPM+iWKwQwPR+y+Jvo54ARd4EisXxKYpB5c= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6NgVqpn3+iol9aGu4= +github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY= +github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= +github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= +github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= +github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= +github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/yalue/merged_fs v1.3.0 h1:qCeh9tMPNy/i8cwDsQTJ5bLr6IRxbs6meakNE5O+wyY= +github.com/yalue/merged_fs v1.3.0/go.mod h1:WqqchfVYQyclV2tnR7wtRhBddzBvLVR83Cjw9BKQw0M= +golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM= +golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= +golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= +golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= +golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= +golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= +golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/tools v0.30.0 h1:BgcpHewrV5AUp2G9MebG4XPFI1E2W41zU1SaqVA9vJY= +golang.org/x/tools v0.30.0/go.mod h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/.citools/cue/go.mod b/.citools/cue/go.mod new file mode 100644 index 00000000000..0584e0a256e --- /dev/null +++ b/.citools/cue/go.mod @@ -0,0 +1,37 @@ +module cue + +go 1.24.1 + +tool cuelang.org/go/cmd/cue + +require ( + cuelabs.dev/go/oci/ociregistry v0.0.0-20240906074133-82eb438dd565 // indirect + cuelang.org/go v0.11.1 // indirect + github.com/cockroachdb/apd/v3 v3.2.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/emicklei/proto v1.13.2 // indirect + github.com/google/go-cmp v0.7.0 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/lib/pq v1.10.9 // indirect + github.com/mitchellh/go-wordwrap v1.0.1 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.1.0 // indirect + github.com/pelletier/go-toml/v2 v2.2.3 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/protocolbuffers/txtpbfmt v0.0.0-20241112170944-20d2c9ebc01d // indirect + github.com/rogpeppe/go-internal v1.13.1 // indirect + github.com/spf13/cobra v1.9.1 // indirect + github.com/spf13/pflag v1.0.6 // indirect + github.com/stretchr/testify v1.10.0 // indirect + github.com/tetratelabs/wazero v1.6.0 // indirect + golang.org/x/mod v0.23.0 // indirect + golang.org/x/net v0.36.0 // indirect + golang.org/x/oauth2 v0.24.0 // indirect + golang.org/x/sync v0.11.0 // indirect + golang.org/x/sys v0.30.0 // indirect + golang.org/x/text v0.22.0 // indirect + golang.org/x/tools v0.30.0 // indirect + gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/.citools/cue/go.sum b/.citools/cue/go.sum new file mode 100644 index 00000000000..c535a6ae5eb --- /dev/null +++ b/.citools/cue/go.sum @@ -0,0 +1,74 @@ +cuelabs.dev/go/oci/ociregistry v0.0.0-20240906074133-82eb438dd565 h1:R5wwEcbEZSBmeyg91MJZTxfd7WpBo2jPof3AYjRbxwY= +cuelabs.dev/go/oci/ociregistry v0.0.0-20240906074133-82eb438dd565/go.mod h1:5A4xfTzHTXfeVJBU6RAUf+QrlfTCW+017q/QiW+sMLg= +cuelang.org/go v0.11.1 h1:pV+49MX1mmvDm8Qh3Za3M786cty8VKPWzQ1Ho4gZRP0= +cuelang.org/go v0.11.1/go.mod h1:PBY6XvPUswPPJ2inpvUozP9mebDVTXaeehQikhZPBz0= +github.com/cockroachdb/apd/v3 v3.2.1 h1:U+8j7t0axsIgvQUqthuNm82HIrYXodOV2iWLWtEaIwg= +github.com/cockroachdb/apd/v3 v3.2.1/go.mod h1:klXJcjp+FffLTHlhIG69tezTDvdP065naDsHzKhYSqc= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/emicklei/proto v1.13.2 h1:z/etSFO3uyXeuEsVPzfl56WNgzcvIr42aQazXaQmFZY= +github.com/emicklei/proto v1.13.2/go.mod h1:rn1FgRS/FANiZdD2djyH7TMA9jdRDcYQ9IEN9yvjX0A= +github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI= +github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= +github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= +github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= +github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/protocolbuffers/txtpbfmt v0.0.0-20241112170944-20d2c9ebc01d h1:HWfigq7lB31IeJL8iy7jkUmU/PG1Sr8jVGhS749dbUA= +github.com/protocolbuffers/txtpbfmt v0.0.0-20241112170944-20d2c9ebc01d/go.mod h1:jgxiZysxFPM+iWKwQwPR+y+Jvo54ARd4EisXxKYpB5c= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= +github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= +github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= +github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/tetratelabs/wazero v1.6.0 h1:z0H1iikCdP8t+q341xqepY4EWvHEw8Es7tlqiVzlP3g= +github.com/tetratelabs/wazero v1.6.0/go.mod h1:0U0G41+ochRKoPKCJlh0jMg1CHkyfK8kDqiirMmKY8A= +golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM= +golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= +golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= +golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= +golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= +golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= +golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/tools v0.30.0 h1:BgcpHewrV5AUp2G9MebG4XPFI1E2W41zU1SaqVA9vJY= +golang.org/x/tools v0.30.0/go.mod h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/.citools/drone/go.mod b/.citools/drone/go.mod new file mode 100644 index 00000000000..4c1fba053f9 --- /dev/null +++ b/.citools/drone/go.mod @@ -0,0 +1,77 @@ +module drone + +go 1.24.1 + +tool github.com/drone/drone-cli/drone + +replace github.com/docker/docker => github.com/moby/moby v27.5.1+incompatible + +require ( + github.com/99designs/httpsignatures-go v0.0.0-20170731043157-88528bf4ca7e // indirect + github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/bmatcuk/doublestar v1.3.4 // indirect + github.com/buildkite/yaml v2.1.0+incompatible // indirect + github.com/containerd/log v0.1.0 // indirect + github.com/coreos/go-semver v0.3.1 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/dchest/uniuri v1.2.0 // indirect + github.com/distribution/reference v0.6.0 // indirect + github.com/docker/distribution v2.8.2+incompatible // indirect + github.com/docker/docker v27.5.1+incompatible // indirect + github.com/docker/go-connections v0.5.0 // indirect + github.com/docker/go-units v0.5.0 // indirect + github.com/drone-runners/drone-runner-docker v1.8.3 // indirect + github.com/drone/drone-cli v1.8.0 // indirect + github.com/drone/drone-go v1.7.1 // indirect + github.com/drone/envsubst v1.0.3 // indirect + github.com/drone/funcmap v0.0.0-20220929084810-72602997d16f // indirect + github.com/drone/runner-go v1.12.0 // indirect + github.com/drone/signal v1.0.0 // indirect + github.com/fatih/color v1.18.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/google/go-jsonnet v0.18.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1 // indirect + github.com/hashicorp/errwrap v1.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/jackspirou/syscerts v0.0.0-20160531025014-b68f5469dff1 // indirect + github.com/joho/godotenv v1.5.1 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/moby/docker-image-spec v1.3.1 // indirect + github.com/moby/term v0.5.0 // indirect + github.com/natessilva/dag v0.0.0-20180124060714-7194b8dcc5c4 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.1.0 // indirect + github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/russross/blackfriday/v2 v2.1.0 // indirect + github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect + github.com/urfave/cli v1.22.16 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect + go.opentelemetry.io/otel v1.35.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.34.0 // indirect + go.opentelemetry.io/otel/metric v1.35.0 // indirect + go.opentelemetry.io/otel/trace v1.35.0 // indirect + go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect + golang.org/x/net v0.36.0 // indirect + golang.org/x/oauth2 v0.27.0 // indirect + golang.org/x/sync v0.11.0 // indirect + golang.org/x/sys v0.30.0 // indirect + golang.org/x/time v0.9.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20250204164813-702378808489 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250207221924-e9438ea467c6 // indirect + google.golang.org/grpc v1.70.0 // indirect + google.golang.org/protobuf v1.36.5 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gotest.tools/v3 v3.5.1 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect +) diff --git a/.citools/drone/go.sum b/.citools/drone/go.sum new file mode 100644 index 00000000000..4e6b0dba301 --- /dev/null +++ b/.citools/drone/go.sum @@ -0,0 +1,338 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/99designs/basicauth-go v0.0.0-20160802081356-2a93ba0f464d/go.mod h1:3cARGAK9CfW3HoxCy1a0G4TKrdiKke8ftOMEOHyySYs= +github.com/99designs/httpsignatures-go v0.0.0-20170731043157-88528bf4ca7e h1:rl2Aq4ZODqTDkeSqQBy+fzpZPamacO1Srp8zq7jf2Sc= +github.com/99designs/httpsignatures-go v0.0.0-20170731043157-88528bf4ca7e/go.mod h1:Xa6lInWHNQnuWoF0YPSsx+INFA9qk7/7pTjwb3PInkY= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= +github.com/bmatcuk/doublestar v1.3.4 h1:gPypJ5xD31uhX6Tf54sDPUOBXTqKH4c9aPY66CyQrS0= +github.com/bmatcuk/doublestar v1.3.4/go.mod h1:wiQtGV+rzVYxB7WIlirSN++5HPtPlXEo9MEoZQC/PmE= +github.com/buildkite/yaml v2.1.0+incompatible h1:xirI+ql5GzfikVNDmt+yeiXpf/v1Gt03qXTtT5WXdr8= +github.com/buildkite/yaml v2.1.0+incompatible/go.mod h1:UoU8vbcwu1+vjZq01+KrpSeLBgQQIjL/H7Y6KwikUrI= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/containerd/containerd v1.3.4/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= +github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= +github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.6 h1:XJtiaUW6dEEqVuZiMTn1ldk455QWwEIsMIJlo5vtkx0= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dchest/uniuri v0.0.0-20160212164326-8902c56451e9/go.mod h1:GgB8SF9nRG+GqaDtLcwJZsQFhcogVCJ79j4EdT0c2V4= +github.com/dchest/uniuri v1.2.0 h1:koIcOUdrTIivZgSLhHQvKgqdWZq5d7KdMEWF1Ud6+5g= +github.com/dchest/uniuri v1.2.0/go.mod h1:fSzm4SLHzNZvWLvWJew423PhAzkpNQYq+uNLq4kxhkY= +github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= +github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= +github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/go-connections v0.3.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/drone-runners/drone-runner-docker v1.8.3 h1:uUnC45C1JMSLW+9uy6RoKG5ugzeXWN89pygs9BMLObY= +github.com/drone-runners/drone-runner-docker v1.8.3/go.mod h1:JR3pZeVZKKpkbTajiq0YtAx9WutkODdVKZGNR83kEwE= +github.com/drone/drone-cli v1.8.0 h1:tpp+GPonS87IKMZCGbIoa+zfDwiuJDL3NIC6S7neNrU= +github.com/drone/drone-cli v1.8.0/go.mod h1:zu6/7OpQjWBw/5VG0M3K4iJc6kSoTrjnY7CRLBrGH84= +github.com/drone/drone-go v1.7.1 h1:ZX+3Rs8YHUSUQ5mkuMLmm1zr1ttiiE2YGNxF3AnyDKw= +github.com/drone/drone-go v1.7.1/go.mod h1:fxCf9jAnXDZV1yDr0ckTuWd1intvcQwfJmTRpTZ1mXg= +github.com/drone/envsubst v1.0.2/go.mod h1:bkZbnc/2vh1M12Ecn7EYScpI4YGYU0etwLJICOWi8Z0= +github.com/drone/envsubst v1.0.3 h1:PCIBwNDYjs50AsLZPYdfhSATKaRg/FJmDc2D6+C2x8g= +github.com/drone/envsubst v1.0.3/go.mod h1:N2jZmlMufstn1KEqvbHjw40h1KyTmnVzHcSc9bFiJ2g= +github.com/drone/funcmap v0.0.0-20220929084810-72602997d16f h1:/jEs7lulqVO2u1+XI5rW4oFwIIusxuDOVKD9PAzlW2E= +github.com/drone/funcmap v0.0.0-20220929084810-72602997d16f/go.mod h1:nDRkX7PHq+p39AD5/usv3KZMerxZTYU/9rfLS5IDspU= +github.com/drone/runner-go v1.12.0 h1:zUjDj9ylsJ4n4Mvy4znddq/Z4EBzcUXzTltpzokKtgs= +github.com/drone/runner-go v1.12.0/go.mod h1:vu4pPPYDoeN6vdYQAY01GGGsAIW4aLganJNaa8Fx8zE= +github.com/drone/signal v1.0.0 h1:NrnM2M/4yAuU/tXs6RP1a1ZfxnaHwYkd0kJurA1p6uI= +github.com/drone/signal v1.0.0/go.mod h1:S8t92eFT0g4WUgEc/LxG+LCuiskpMNsG0ajAMGnyZpc= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= +github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 h1:Mn26/9ZMNWSw9C9ERFA1PUxfmGpolnw2v0bKOREu5ew= +github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32/go.mod h1:GIjDIg/heH5DOkXY3YJ/wNhfHsQHoXGjl8G8amsYQ1I= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/gogo/protobuf v0.0.0-20170307180453-100ba4e88506/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/go-jsonnet v0.18.0 h1:/6pTy6g+Jh1a1I2UMoAODkqELFiVIdOxbNwv0DDzoOg= +github.com/google/go-jsonnet v0.18.0/go.mod h1:C3fTzyVJDslXdiTqw/bTFk7vSGyCtH3MGRbDfvEwGd0= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1 h1:e9Rjr40Z98/clHv5Yg79Is0NtosR5LXRvdr7o/6NwbA= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1/go.mod h1:tIxuGz/9mpox++sgp9fJjHO0+q1X9/UOWd798aAm22M= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= +github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/jackspirou/syscerts v0.0.0-20160531025014-b68f5469dff1 h1:9Xm8CKtMZIXgcopfdWk/qZ1rt0HjMgfMR9nxxSeK6vk= +github.com/jackspirou/syscerts v0.0.0-20160531025014-b68f5469dff1/go.mod h1:zuHl3Hh+e9P6gmBPvcqR1HjkaWHC/csgyskg6IaFKFo= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= +github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= +github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= +github.com/moby/moby v27.5.1+incompatible h1:/pN59F/t3U7Q4FPzV88nzqf7Fp0qqCSL2KzhZaiKcKw= +github.com/moby/moby v27.5.1+incompatible/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/natessilva/dag v0.0.0-20180124060714-7194b8dcc5c4 h1:dnMxwus89s86tI8rcGVp2HwZzlz7c5o92VOy7dSckBQ= +github.com/natessilva/dag v0.0.0-20180124060714-7194b8dcc5c4/go.mod h1:cojhOHk1gbMeklOyDP2oKKLftefXoJreOQGOrXk+Z38= +github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= +github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/urfave/cli v1.22.16 h1:MH0k6uJxdwdeWQTwhSO42Pwr4YLrNLwBtg1MRgTqPdQ= +github.com/urfave/cli v1.22.16/go.mod h1:EeJR6BKodywf4zciqrdw6hpCPk68JO9z5LazXZMn5Po= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ= +go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= +go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 h1:OeNbIYk/2C15ckl7glBlOBp5+WlYsOElzTNmiPW/x60= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0/go.mod h1:7Bept48yIeqxP2OZ9/AqIpYS94h2or0aB4FypJTc8ZM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.34.0 h1:BEj3SPM81McUZHYjRS5pEgNgnmzGJ5tRpU5krWnV8Bs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.34.0/go.mod h1:9cKLGBDzI/F3NoHLQGm4ZrYdIHsvGt6ej6hUowxY0J4= +go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= +go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= +go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= +go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= +go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o= +go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w= +go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= +go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= +go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4= +go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4= +go.starlark.net v0.0.0-20230525235612-a134d8f9ddca h1:VdD38733bfYv5tUZwEIskMM93VanwNIi5bIKnDrJdEY= +go.starlark.net v0.0.0-20230525235612-a134d8f9ddca/go.mod h1:jxU+3+j+71eXOW14274+SmmuW82qJzl6iZSeqEtTGds= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= +golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.27.0 h1:da9Vo7/tDv5RH/7nZDz1eMGS/q1Vv1N/7FCrBhI9I3M= +golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= +golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= +golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= +golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY= +golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto/googleapis/api v0.0.0-20250204164813-702378808489 h1:fCuMM4fowGzigT89NCIsW57Pk9k2D12MMi2ODn+Nk+o= +google.golang.org/genproto/googleapis/api v0.0.0-20250204164813-702378808489/go.mod h1:iYONQfRdizDB8JJBybql13nArx91jcUk7zCXEsOofM4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250207221924-e9438ea467c6 h1:2duwAxN2+k0xLNpjnHTXoMUgnv6VPSp5fiqTuwSxjmI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250207221924-e9438ea467c6/go.mod h1:8BS3B93F/U1juMFq9+EDk+qOT5CO1R9IzXxG3PTqiRk= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.70.0 h1:pWFv03aZoHzlRKHWicjsZytKAiYCtNS0dHbXnIdq7jQ= +google.golang.org/grpc v1.70.0/go.mod h1:ofIJqVKDXx/JiXrwr2IG4/zwdH9txy3IlF40RmcJSQw= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= +google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/.citools/golangci-lint/go.mod b/.citools/golangci-lint/go.mod new file mode 100644 index 00000000000..93df12ec8c3 --- /dev/null +++ b/.citools/golangci-lint/go.mod @@ -0,0 +1,191 @@ +module golangci-lint + +go 1.24.1 + +tool github.com/golangci/golangci-lint/cmd/golangci-lint + +require ( + 4d63.com/gocheckcompilerdirectives v1.2.1 // indirect + 4d63.com/gochecknoglobals v0.2.1 // indirect + github.com/4meepo/tagalign v1.3.4 // indirect + github.com/Abirdcfly/dupword v0.1.3 // indirect + github.com/Antonboom/errname v1.0.0 // indirect + github.com/Antonboom/nilnil v1.0.0 // indirect + github.com/Antonboom/testifylint v1.5.0 // indirect + github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c // indirect + github.com/Crocmagnon/fatcontext v0.5.2 // indirect + github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect + github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0 // indirect + github.com/Masterminds/semver/v3 v3.3.0 // indirect + github.com/OpenPeeDeeP/depguard/v2 v2.2.0 // indirect + github.com/alecthomas/go-check-sumtype v0.2.0 // indirect + github.com/alexkohler/nakedret/v2 v2.0.5 // indirect + github.com/alexkohler/prealloc v1.0.0 // indirect + github.com/alingse/asasalint v0.0.11 // indirect + github.com/ashanbrown/forbidigo v1.6.0 // indirect + github.com/ashanbrown/makezero v1.1.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/bkielbasa/cyclop v1.2.3 // indirect + github.com/blizzy78/varnamelen v0.8.0 // indirect + github.com/bombsimon/wsl/v4 v4.4.1 // indirect + github.com/breml/bidichk v0.3.2 // indirect + github.com/breml/errchkjson v0.4.0 // indirect + github.com/butuzov/ireturn v0.3.0 // indirect + github.com/butuzov/mirror v1.2.0 // indirect + github.com/catenacyber/perfsprint v0.7.1 // indirect + github.com/ccojocar/zxcvbn-go v1.0.2 // indirect + github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/charithe/durationcheck v0.0.10 // indirect + github.com/chavacava/garif v0.1.0 // indirect + github.com/ckaznocha/intrange v0.2.1 // indirect + github.com/curioswitch/go-reassign v0.2.0 // indirect + github.com/daixiang0/gci v0.13.5 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/denis-tingaikin/go-header v0.5.0 // indirect + github.com/ettle/strcase v0.2.0 // indirect + github.com/fatih/color v1.18.0 // indirect + github.com/fatih/structtag v1.2.0 // indirect + github.com/firefart/nonamedreturns v1.0.5 // indirect + github.com/fsnotify/fsnotify v1.5.4 // indirect + github.com/fzipp/gocyclo v0.6.0 // indirect + github.com/ghostiam/protogetter v0.3.8 // indirect + github.com/go-critic/go-critic v0.11.5 // indirect + github.com/go-toolsmith/astcast v1.1.0 // indirect + github.com/go-toolsmith/astcopy v1.1.0 // indirect + github.com/go-toolsmith/astequal v1.2.0 // indirect + github.com/go-toolsmith/astfmt v1.1.0 // indirect + github.com/go-toolsmith/astp v1.1.0 // indirect + github.com/go-toolsmith/strparse v1.1.0 // indirect + github.com/go-toolsmith/typep v1.1.0 // indirect + github.com/go-viper/mapstructure/v2 v2.2.1 // indirect + github.com/go-xmlfmt/xmlfmt v1.1.2 // indirect + github.com/gobwas/glob v0.2.3 // indirect + github.com/gofrs/flock v0.12.1 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect + github.com/golangci/go-printf-func-name v0.1.0 // indirect + github.com/golangci/gofmt v0.0.0-20240816233607-d8596aa466a9 // indirect + github.com/golangci/golangci-lint v1.62.0 // indirect + github.com/golangci/misspell v0.6.0 // indirect + github.com/golangci/modinfo v0.3.4 // indirect + github.com/golangci/plugin-module-register v0.1.1 // indirect + github.com/golangci/revgrep v0.5.3 // indirect + github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed // indirect + github.com/google/go-cmp v0.6.0 // indirect + github.com/gordonklaus/ineffassign v0.1.0 // indirect + github.com/gostaticanalysis/analysisutil v0.7.1 // indirect + github.com/gostaticanalysis/comment v1.4.2 // indirect + github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect + github.com/gostaticanalysis/nilerr v0.1.1 // indirect + github.com/hashicorp/go-version v1.7.0 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hexops/gotextdiff v1.0.3 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/jgautheron/goconst v1.7.1 // indirect + github.com/jingyugao/rowserrcheck v1.1.1 // indirect + github.com/jjti/go-spancheck v0.6.2 // indirect + github.com/julz/importas v0.1.0 // indirect + github.com/karamaru-alpha/copyloopvar v1.1.0 // indirect + github.com/kisielk/errcheck v1.8.0 // indirect + github.com/kkHAIKE/contextcheck v1.1.5 // indirect + github.com/kulti/thelper v0.6.3 // indirect + github.com/kunwardeep/paralleltest v1.0.10 // indirect + github.com/kyoh86/exportloopref v0.1.11 // indirect + github.com/lasiar/canonicalheader v1.1.2 // indirect + github.com/ldez/gomoddirectives v0.2.4 // indirect + github.com/ldez/tagliatelle v0.5.0 // indirect + github.com/leonklingele/grouper v1.1.2 // indirect + github.com/macabu/inamedparam v0.1.3 // indirect + github.com/magiconair/properties v1.8.6 // indirect + github.com/maratori/testableexamples v1.0.0 // indirect + github.com/maratori/testpackage v1.1.1 // indirect + github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/mattn/go-runewidth v0.0.16 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/mgechev/revive v1.5.0 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/moricho/tparallel v0.3.2 // indirect + github.com/nakabonne/nestif v0.3.1 // indirect + github.com/nishanths/exhaustive v0.12.0 // indirect + github.com/nishanths/predeclared v0.2.2 // indirect + github.com/nunnatsa/ginkgolinter v0.18.0 // indirect + github.com/olekukonko/tablewriter v0.0.5 // indirect + github.com/pelletier/go-toml v1.9.5 // indirect + github.com/pelletier/go-toml/v2 v2.2.3 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/polyfloyd/go-errorlint v1.6.0 // indirect + github.com/prometheus/client_golang v1.12.1 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.32.1 // indirect + github.com/prometheus/procfs v0.7.3 // indirect + github.com/quasilyte/go-ruleguard v0.4.3-0.20240823090925-0fe6f58b47b1 // indirect + github.com/quasilyte/go-ruleguard/dsl v0.3.22 // indirect + github.com/quasilyte/gogrep v0.5.0 // indirect + github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect + github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect + github.com/raeperd/recvcheck v0.1.2 // indirect + github.com/rivo/uniseg v0.4.7 // indirect + github.com/rogpeppe/go-internal v1.13.1 // indirect + github.com/ryancurrah/gomodguard v1.3.5 // indirect + github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect + github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect + github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect + github.com/sashamelentyev/interfacebloat v1.1.0 // indirect + github.com/sashamelentyev/usestdlibvars v1.27.0 // indirect + github.com/securego/gosec/v2 v2.21.4 // indirect + github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect + github.com/sirupsen/logrus v1.9.3 // indirect + github.com/sivchari/containedctx v1.0.3 // indirect + github.com/sivchari/tenv v1.12.1 // indirect + github.com/sonatard/noctx v0.1.0 // indirect + github.com/sourcegraph/go-diff v0.7.0 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.5.0 // indirect + github.com/spf13/cobra v1.8.1 // indirect + github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/spf13/viper v1.12.0 // indirect + github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect + github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect + github.com/stretchr/objx v0.5.2 // indirect + github.com/stretchr/testify v1.9.0 // indirect + github.com/subosito/gotenv v1.4.1 // indirect + github.com/tdakkota/asciicheck v0.2.0 // indirect + github.com/tetafro/godot v1.4.18 // indirect + github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 // indirect + github.com/timonwong/loggercheck v0.10.1 // indirect + github.com/tomarrell/wrapcheck/v2 v2.9.0 // indirect + github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect + github.com/ultraware/funlen v0.1.0 // indirect + github.com/ultraware/whitespace v0.1.1 // indirect + github.com/uudashr/gocognit v1.1.3 // indirect + github.com/uudashr/iface v1.2.0 // indirect + github.com/xen0n/gosmopolitan v1.2.2 // indirect + github.com/yagipy/maintidx v1.0.0 // indirect + github.com/yeya24/promlinter v0.3.0 // indirect + github.com/ykadowak/zerologlint v0.1.5 // indirect + gitlab.com/bosi/decorder v0.4.2 // indirect + go-simpler.org/musttag v0.13.0 // indirect + go-simpler.org/sloglint v0.7.2 // indirect + go.uber.org/atomic v1.7.0 // indirect + go.uber.org/automaxprocs v1.6.0 // indirect + go.uber.org/multierr v1.6.0 // indirect + go.uber.org/zap v1.24.0 // indirect + golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect + golang.org/x/exp/typeparams v0.0.0-20240909161429-701f63a606c0 // indirect + golang.org/x/mod v0.22.0 // indirect + golang.org/x/sync v0.9.0 // indirect + golang.org/x/sys v0.27.0 // indirect + golang.org/x/text v0.18.0 // indirect + golang.org/x/tools v0.27.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + honnef.co/go/tools v0.5.1 // indirect + mvdan.cc/gofumpt v0.7.0 // indirect + mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f // indirect +) diff --git a/.citools/golangci-lint/go.sum b/.citools/golangci-lint/go.sum new file mode 100644 index 00000000000..c8205a75d73 --- /dev/null +++ b/.citools/golangci-lint/go.sum @@ -0,0 +1,957 @@ +4d63.com/gocheckcompilerdirectives v1.2.1 h1:AHcMYuw56NPjq/2y615IGg2kYkBdTvOaojYCBcRE7MA= +4d63.com/gocheckcompilerdirectives v1.2.1/go.mod h1:yjDJSxmDTtIHHCqX0ufRYZDL6vQtMG7tJdKVeWwsqvs= +4d63.com/gochecknoglobals v0.2.1 h1:1eiorGsgHOFOuoOiJDy2psSrQbRdIHrlge0IJIkUgDc= +4d63.com/gochecknoglobals v0.2.1/go.mod h1:KRE8wtJB3CXCsb1xy421JfTHIIbmT3U5ruxw2Qu8fSU= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/4meepo/tagalign v1.3.4 h1:P51VcvBnf04YkHzjfclN6BbsopfJR5rxs1n+5zHt+w8= +github.com/4meepo/tagalign v1.3.4/go.mod h1:M+pnkHH2vG8+qhE5bVc/zeP7HS/j910Fwa9TUSyZVI0= +github.com/Abirdcfly/dupword v0.1.3 h1:9Pa1NuAsZvpFPi9Pqkd93I7LIYRURj+A//dFd5tgBeE= +github.com/Abirdcfly/dupword v0.1.3/go.mod h1:8VbB2t7e10KRNdwTVoxdBaxla6avbhGzb8sCTygUMhw= +github.com/Antonboom/errname v1.0.0 h1:oJOOWR07vS1kRusl6YRSlat7HFnb3mSfMl6sDMRoTBA= +github.com/Antonboom/errname v1.0.0/go.mod h1:gMOBFzK/vrTiXN9Oh+HFs+e6Ndl0eTFbtsRTSRdXyGI= +github.com/Antonboom/nilnil v1.0.0 h1:n+v+B12dsE5tbAqRODXmEKfZv9j2KcTBrp+LkoM4HZk= +github.com/Antonboom/nilnil v1.0.0/go.mod h1:fDJ1FSFoLN6yoG65ANb1WihItf6qt9PJVTn/s2IrcII= +github.com/Antonboom/testifylint v1.5.0 h1:dlUIsDMtCrZWUnvkaCz3quJCoIjaGi41GzjPBGkkJ8A= +github.com/Antonboom/testifylint v1.5.0/go.mod h1:wqaJbu0Blb5Wag2wv7Z5xt+CIV+eVLxtGZrlK13z3AE= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c h1:pxW6RcqyfI9/kWtOwnv/G+AzdKuy2ZrqINhenH4HyNs= +github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Crocmagnon/fatcontext v0.5.2 h1:vhSEg8Gqng8awhPju2w7MKHqMlg4/NI+gSDHtR3xgwA= +github.com/Crocmagnon/fatcontext v0.5.2/go.mod h1:87XhRMaInHP44Q7Tlc7jkgKKB7kZAOPiDkFMdKCC+74= +github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= +github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= +github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0 h1:/fTUt5vmbkAcMBt4YQiuC23cV0kEsN1MVMNqeOW43cU= +github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0/go.mod h1:ONJg5sxcbsdQQ4pOW8TGdTidT2TMAUy/2Xhr8mrYaao= +github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0= +github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= +github.com/OpenPeeDeeP/depguard/v2 v2.2.0 h1:vDfG60vDtIuf0MEOhmLlLLSzqaRM8EMcgJPdp74zmpA= +github.com/OpenPeeDeeP/depguard/v2 v2.2.0/go.mod h1:CIzddKRvLBC4Au5aYP/i3nyaWQ+ClszLIuVocRiCYFQ= +github.com/alecthomas/assert/v2 v2.2.2 h1:Z/iVC0xZfWTaFNE6bA3z07T86hd45Xe2eLt6WVy2bbk= +github.com/alecthomas/assert/v2 v2.2.2/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= +github.com/alecthomas/go-check-sumtype v0.2.0 h1:Bo+e4DFf3rs7ME9w/0SU/g6nmzJaphduP8Cjiz0gbwY= +github.com/alecthomas/go-check-sumtype v0.2.0/go.mod h1:WyYPfhfkdhyrdaligV6svFopZV8Lqdzn5pyVBaV6jhQ= +github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= +github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/alexkohler/nakedret/v2 v2.0.5 h1:fP5qLgtwbx9EJE8dGEERT02YwS8En4r9nnZ71RK+EVU= +github.com/alexkohler/nakedret/v2 v2.0.5/go.mod h1:bF5i0zF2Wo2o4X4USt9ntUWve6JbFv02Ff4vlkmS/VU= +github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pOcUuw= +github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= +github.com/alingse/asasalint v0.0.11 h1:SFwnQXJ49Kx/1GghOFz1XGqHYKp21Kq1nHad/0WQRnw= +github.com/alingse/asasalint v0.0.11/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqrSP7t/cW5+I= +github.com/ashanbrown/forbidigo v1.6.0 h1:D3aewfM37Yb3pxHujIPSpTf6oQk9sc9WZi8gerOIVIY= +github.com/ashanbrown/forbidigo v1.6.0/go.mod h1:Y8j9jy9ZYAEHXdu723cUlraTqbzjKF1MUyfOKL+AjcU= +github.com/ashanbrown/makezero v1.1.1 h1:iCQ87C0V0vSyO+M9E/FZYbu65auqH0lnsOkf5FcB28s= +github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= +github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bkielbasa/cyclop v1.2.3 h1:faIVMIGDIANuGPWH031CZJTi2ymOQBULs9H21HSMa5w= +github.com/bkielbasa/cyclop v1.2.3/go.mod h1:kHTwA9Q0uZqOADdupvcFJQtp/ksSnytRMe8ztxG8Fuo= +github.com/blizzy78/varnamelen v0.8.0 h1:oqSblyuQvFsW1hbBHh1zfwrKe3kcSj0rnXkKzsQ089M= +github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= +github.com/bombsimon/wsl/v4 v4.4.1 h1:jfUaCkN+aUpobrMO24zwyAMwMAV5eSziCkOKEauOLdw= +github.com/bombsimon/wsl/v4 v4.4.1/go.mod h1:Xu/kDxGZTofQcDGCtQe9KCzhHphIe0fDuyWTxER9Feo= +github.com/breml/bidichk v0.3.2 h1:xV4flJ9V5xWTqxL+/PMFF6dtJPvZLPsyixAoPe8BGJs= +github.com/breml/bidichk v0.3.2/go.mod h1:VzFLBxuYtT23z5+iVkamXO386OB+/sVwZOpIj6zXGos= +github.com/breml/errchkjson v0.4.0 h1:gftf6uWZMtIa/Is3XJgibewBm2ksAQSY/kABDNFTAdk= +github.com/breml/errchkjson v0.4.0/go.mod h1:AuBOSTHyLSaaAFlWsRSuRBIroCh3eh7ZHh5YeelDIk8= +github.com/butuzov/ireturn v0.3.0 h1:hTjMqWw3y5JC3kpnC5vXmFJAWI/m31jaCYQqzkS6PL0= +github.com/butuzov/ireturn v0.3.0/go.mod h1:A09nIiwiqzN/IoVo9ogpa0Hzi9fex1kd9PSD6edP5ZA= +github.com/butuzov/mirror v1.2.0 h1:9YVK1qIjNspaqWutSv8gsge2e/Xpq1eqEkslEUHy5cs= +github.com/butuzov/mirror v1.2.0/go.mod h1:DqZZDtzm42wIAIyHXeN8W/qb1EPlb9Qn/if9icBOpdQ= +github.com/catenacyber/perfsprint v0.7.1 h1:PGW5G/Kxn+YrN04cRAZKC+ZuvlVwolYMrIyyTJ/rMmc= +github.com/catenacyber/perfsprint v0.7.1/go.mod h1:/wclWYompEyjUD2FuIIDVKNkqz7IgBIWXIH3V0Zol50= +github.com/ccojocar/zxcvbn-go v1.0.2 h1:na/czXU8RrhXO4EZme6eQJLR4PzcGsahsBOAwU6I3Vg= +github.com/ccojocar/zxcvbn-go v1.0.2/go.mod h1:g1qkXtUSvHP8lhHp5GrSmTz6uWALGRMQdw6Qnz/hi60= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/charithe/durationcheck v0.0.10 h1:wgw73BiocdBDQPik+zcEoBG/ob8uyBHf2iyoHGPf5w4= +github.com/charithe/durationcheck v0.0.10/go.mod h1:bCWXb7gYRysD1CU3C+u4ceO49LoGOY1C1L6uouGNreQ= +github.com/chavacava/garif v0.1.0 h1:2JHa3hbYf5D9dsgseMKAmc/MZ109otzgNFk5s87H9Pc= +github.com/chavacava/garif v0.1.0/go.mod h1:XMyYCkEL58DF0oyW4qDjjnPWONs2HBqYKI+UIPD+Gww= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/ckaznocha/intrange v0.2.1 h1:M07spnNEQoALOJhwrImSrJLaxwuiQK+hA2DeajBlwYk= +github.com/ckaznocha/intrange v0.2.1/go.mod h1:7NEhVyf8fzZO5Ds7CRaqPEm52Ut83hsTiL5zbER/HYk= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/curioswitch/go-reassign v0.2.0 h1:G9UZyOcpk/d7Gd6mqYgd8XYWFMw/znxwGDUstnC9DIo= +github.com/curioswitch/go-reassign v0.2.0/go.mod h1:x6OpXuWvgfQaMGks2BZybTngWjT84hqJfKoO8Tt/Roc= +github.com/daixiang0/gci v0.13.5 h1:kThgmH1yBmZSBCh1EJVxQ7JsHpm5Oms0AMed/0LaH4c= +github.com/daixiang0/gci v0.13.5/go.mod h1:12etP2OniiIdP4q+kjUGrC/rUagga7ODbqsom5Eo5Yk= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/denis-tingaikin/go-header v0.5.0 h1:SRdnP5ZKvcO9KKRP1KJrhFR3RrlGuD+42t4429eC9k8= +github.com/denis-tingaikin/go-header v0.5.0/go.mod h1:mMenU5bWrok6Wl2UsZjy+1okegmwQ3UgWl4V1D8gjlY= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/ettle/strcase v0.2.0 h1:fGNiVF21fHXpX1niBgk0aROov1LagYsOwV/xqKDKR/Q= +github.com/ettle/strcase v0.2.0/go.mod h1:DajmHElDSaX76ITe3/VHVyMin4LWSJN5Z909Wp+ED1A= +github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= +github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= +github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= +github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= +github.com/firefart/nonamedreturns v1.0.5 h1:tM+Me2ZaXs8tfdDw3X6DOX++wMCOqzYUho6tUTYIdRA= +github.com/firefart/nonamedreturns v1.0.5/go.mod h1:gHJjDqhGM4WyPt639SOZs+G89Ko7QKH5R5BhnO6xJhw= +github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= +github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= +github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= +github.com/ghostiam/protogetter v0.3.8 h1:LYcXbYvybUyTIxN2Mj9h6rHrDZBDwZloPoKctWrFyJY= +github.com/ghostiam/protogetter v0.3.8/go.mod h1:WZ0nw9pfzsgxuRsPOFQomgDVSWtDLJRfQJEhsGbmQMA= +github.com/go-critic/go-critic v0.11.5 h1:TkDTOn5v7EEngMxu8KbuFqFR43USaaH8XRJLz1jhVYA= +github.com/go-critic/go-critic v0.11.5/go.mod h1:wu6U7ny9PiaHaZHcvMDmdysMqvDem162Rh3zWTrqk8M= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI= +github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= +github.com/go-toolsmith/astcast v1.1.0 h1:+JN9xZV1A+Re+95pgnMgDboWNVnIMMQXwfBwLRPgSC8= +github.com/go-toolsmith/astcast v1.1.0/go.mod h1:qdcuFWeGGS2xX5bLM/c3U9lewg7+Zu4mr+xPwZIB4ZU= +github.com/go-toolsmith/astcopy v1.1.0 h1:YGwBN0WM+ekI/6SS6+52zLDEf8Yvp3n2seZITCUBt5s= +github.com/go-toolsmith/astcopy v1.1.0/go.mod h1:hXM6gan18VA1T/daUEHCFcYiW8Ai1tIwIzHY6srfEAw= +github.com/go-toolsmith/astequal v1.0.3/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4= +github.com/go-toolsmith/astequal v1.1.0/go.mod h1:sedf7VIdCL22LD8qIvv7Nn9MuWJruQA/ysswh64lffQ= +github.com/go-toolsmith/astequal v1.2.0 h1:3Fs3CYZ1k9Vo4FzFhwwewC3CHISHDnVUPC4x0bI2+Cw= +github.com/go-toolsmith/astequal v1.2.0/go.mod h1:c8NZ3+kSFtFY/8lPso4v8LuJjdJiUFVnSuU3s0qrrDY= +github.com/go-toolsmith/astfmt v1.1.0 h1:iJVPDPp6/7AaeLJEruMsBUlOYCmvg0MoCfJprsOmcco= +github.com/go-toolsmith/astfmt v1.1.0/go.mod h1:OrcLlRwu0CuiIBp/8b5PYF9ktGVZUjlNMV634mhwuQ4= +github.com/go-toolsmith/astp v1.1.0 h1:dXPuCl6u2llURjdPLLDxJeZInAeZ0/eZwFJmqZMnpQA= +github.com/go-toolsmith/astp v1.1.0/go.mod h1:0T1xFGz9hicKs8Z5MfAqSUitoUYS30pDMsRVIDHs8CA= +github.com/go-toolsmith/pkgload v1.2.2 h1:0CtmHq/02QhxcF7E9N5LIFcYFsMR5rdovfqTtRKkgIk= +github.com/go-toolsmith/pkgload v1.2.2/go.mod h1:R2hxLNRKuAsiXCo2i5J6ZQPhnPMOVtU+f0arbFPWCus= +github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= +github.com/go-toolsmith/strparse v1.1.0 h1:GAioeZUK9TGxnLS+qfdqNbA4z0SSm5zVNtCQiyP2Bvw= +github.com/go-toolsmith/strparse v1.1.0/go.mod h1:7ksGy58fsaQkGQlY8WVoBFNyEPMGuJin1rfoPS4lBSQ= +github.com/go-toolsmith/typep v1.1.0 h1:fIRYDyF+JywLfqzyhdiHzRop/GQDxxNhLGQ6gFUNHus= +github.com/go-toolsmith/typep v1.1.0/go.mod h1:fVIw+7zjdsMxDA3ITWnH1yOiw1rnTQKCsF/sk2H/qig= +github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss= +github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/go-xmlfmt/xmlfmt v1.1.2 h1:Nea7b4icn8s57fTx1M5AI4qQT5HEM3rVUO8MuE6g80U= +github.com/go-xmlfmt/xmlfmt v1.1.2/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= +github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= +github.com/gofrs/flock v0.12.1 h1:MTLVXXHf8ekldpJk3AKicLij9MdwOWkZ+a/jHHZby9E= +github.com/gofrs/flock v0.12.1/go.mod h1:9zxTsyu5xtJ9DK+1tFZyibEV7y3uwDxPPfbxeeHCoD0= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= +github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= +github.com/golangci/go-printf-func-name v0.1.0 h1:dVokQP+NMTO7jwO4bwsRwLWeudOVUPPyAKJuzv8pEJU= +github.com/golangci/go-printf-func-name v0.1.0/go.mod h1:wqhWFH5mUdJQhweRnldEywnR5021wTdZSNgwYceV14s= +github.com/golangci/gofmt v0.0.0-20240816233607-d8596aa466a9 h1:/1322Qns6BtQxUZDTAT4SdcoxknUki7IAoK4SAXr8ME= +github.com/golangci/gofmt v0.0.0-20240816233607-d8596aa466a9/go.mod h1:Oesb/0uFAyWoaw1U1qS5zyjCg5NP9C9iwjnI4tIsXEE= +github.com/golangci/golangci-lint v1.62.0 h1:/G0g+bi1BhmGJqLdNQkKBWjcim8HjOPc4tsKuHDOhcI= +github.com/golangci/golangci-lint v1.62.0/go.mod h1:jtoOhQcKTz8B6dGNFyfQV3WZkQk+YvBDewDtNpiAJts= +github.com/golangci/misspell v0.6.0 h1:JCle2HUTNWirNlDIAUO44hUsKhOFqGPoC4LZxlaSXDs= +github.com/golangci/misspell v0.6.0/go.mod h1:keMNyY6R9isGaSAu+4Q8NMBwMPkh15Gtc8UCVoDtAWo= +github.com/golangci/modinfo v0.3.4 h1:oU5huX3fbxqQXdfspamej74DFX0kyGLkw1ppvXoJ8GA= +github.com/golangci/modinfo v0.3.4/go.mod h1:wytF1M5xl9u0ij8YSvhkEVPP3M5Mc7XLl1pxH3B2aUM= +github.com/golangci/plugin-module-register v0.1.1 h1:TCmesur25LnyJkpsVrupv1Cdzo+2f7zX0H6Jkw1Ol6c= +github.com/golangci/plugin-module-register v0.1.1/go.mod h1:TTpqoB6KkwOJMV8u7+NyXMrkwwESJLOkfl9TxR1DGFc= +github.com/golangci/revgrep v0.5.3 h1:3tL7c1XBMtWHHqVpS5ChmiAAoe4PF/d5+ULzV9sLAzs= +github.com/golangci/revgrep v0.5.3/go.mod h1:U4R/s9dlXZsg8uJmaR1GrloUr14D7qDl8gi2iPXJH8k= +github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed h1:IURFTjxeTfNFP0hTEi1YKjB/ub8zkpaOqFFMApi2EAs= +github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed/go.mod h1:XLXN8bNw4CGRPaqgl3bv/lhz7bsGPh4/xSaMTbo2vkQ= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 h1:5iH8iuqE5apketRbSFBy+X1V0o+l+8NF1avt4HWl7cA= +github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/gordonklaus/ineffassign v0.1.0 h1:y2Gd/9I7MdY1oEIt+n+rowjBNDcLQq3RsH5hwJd0f9s= +github.com/gordonklaus/ineffassign v0.1.0/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= +github.com/gostaticanalysis/analysisutil v0.7.1 h1:ZMCjoue3DtDWQ5WyU16YbjbQEQ3VuzwxALrpYd+HeKk= +github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= +github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= +github.com/gostaticanalysis/comment v1.4.2 h1:hlnx5+S2fY9Zo9ePo4AhgYsYHbM2+eAv8m/s1JiCd6Q= +github.com/gostaticanalysis/comment v1.4.2/go.mod h1:KLUTGDv6HOCotCH8h2erHKmpci2ZoR8VPu34YA2uzdM= +github.com/gostaticanalysis/forcetypeassert v0.1.0 h1:6eUflI3DiGusXGK6X7cCcIgVCpZ2CiZ1Q7jl6ZxNV70= +github.com/gostaticanalysis/forcetypeassert v0.1.0/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= +github.com/gostaticanalysis/nilerr v0.1.1 h1:ThE+hJP0fEp4zWLkWHWcRyI2Od0p7DlgYG3Uqrmrcpk= +github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= +github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= +github.com/gostaticanalysis/testutil v0.4.0 h1:nhdCmubdmDF6VEatUNjgUZBJKWRqugoISdUv3PPQgHY= +github.com/gostaticanalysis/testutil v0.4.0/go.mod h1:bLIoPefWXrRi/ssLFWX1dx7Repi5x3CuviD3dgAZaBU= +github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jgautheron/goconst v1.7.1 h1:VpdAG7Ca7yvvJk5n8dMwQhfEZJh95kl/Hl9S1OI5Jkk= +github.com/jgautheron/goconst v1.7.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= +github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= +github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= +github.com/jjti/go-spancheck v0.6.2 h1:iYtoxqPMzHUPp7St+5yA8+cONdyXD3ug6KK15n7Pklk= +github.com/jjti/go-spancheck v0.6.2/go.mod h1:+X7lvIrR5ZdUTkxFYqzJ0abr8Sb5LOo80uOhWNqIrYA= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/julz/importas v0.1.0 h1:F78HnrsjY3cR7j0etXy5+TU1Zuy7Xt08X/1aJnH5xXY= +github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= +github.com/karamaru-alpha/copyloopvar v1.1.0 h1:x7gNyKcC2vRBO1H2Mks5u1VxQtYvFiym7fCjIP8RPos= +github.com/karamaru-alpha/copyloopvar v1.1.0/go.mod h1:u7CIfztblY0jZLOQZgH3oYsJzpC2A7S6u/lfgSXHy0k= +github.com/kisielk/errcheck v1.8.0 h1:ZX/URYa7ilESY19ik/vBmCn6zdGQLxACwjAcWbHlYlg= +github.com/kisielk/errcheck v1.8.0/go.mod h1:1kLL+jV4e+CFfueBmI1dSK2ADDyQnlrnrY/FqKluHJQ= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kkHAIKE/contextcheck v1.1.5 h1:CdnJh63tcDe53vG+RebdpdXJTc9atMgGqdx8LXxiilg= +github.com/kkHAIKE/contextcheck v1.1.5/go.mod h1:O930cpht4xb1YQpK+1+AgoM3mFsvxr7uyFptcnWTYUA= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kulti/thelper v0.6.3 h1:ElhKf+AlItIu+xGnI990no4cE2+XaSu1ULymV2Yulxs= +github.com/kulti/thelper v0.6.3/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= +github.com/kunwardeep/paralleltest v1.0.10 h1:wrodoaKYzS2mdNVnc4/w31YaXFtsc21PCTdvWJ/lDDs= +github.com/kunwardeep/paralleltest v1.0.10/go.mod h1:2C7s65hONVqY7Q5Efj5aLzRCNLjw2h4eMc9EcypGjcY= +github.com/kyoh86/exportloopref v0.1.11 h1:1Z0bcmTypkL3Q4k+IDHMWTcnCliEZcaPiIe0/ymEyhQ= +github.com/kyoh86/exportloopref v0.1.11/go.mod h1:qkV4UF1zGl6EkF1ox8L5t9SwyeBAZ3qLMd6up458uqA= +github.com/lasiar/canonicalheader v1.1.2 h1:vZ5uqwvDbyJCnMhmFYimgMZnJMjwljN5VGY0VKbMXb4= +github.com/lasiar/canonicalheader v1.1.2/go.mod h1:qJCeLFS0G/QlLQ506T+Fk/fWMa2VmBUiEI2cuMK4djI= +github.com/ldez/gomoddirectives v0.2.4 h1:j3YjBIjEBbqZ0NKtBNzr8rtMHTOrLPeiwTkfUJZ3alg= +github.com/ldez/gomoddirectives v0.2.4/go.mod h1:oWu9i62VcQDYp9EQ0ONTfqLNh+mDLWWDO+SO0qSQw5g= +github.com/ldez/tagliatelle v0.5.0 h1:epgfuYt9v0CG3fms0pEgIMNPuFf/LpPIfjk4kyqSioo= +github.com/ldez/tagliatelle v0.5.0/go.mod h1:rj1HmWiL1MiKQuOONhd09iySTEkUuE/8+5jtPYz9xa4= +github.com/leonklingele/grouper v1.1.2 h1:o1ARBDLOmmasUaNDesWqWCIFH3u7hoFlM84YrjT3mIY= +github.com/leonklingele/grouper v1.1.2/go.mod h1:6D0M/HVkhs2yRKRFZUoGjeDy7EZTfFBE9gl4kjmIGkA= +github.com/macabu/inamedparam v0.1.3 h1:2tk/phHkMlEL/1GNe/Yf6kkR/hkcUdAEY3L0hjYV1Mk= +github.com/macabu/inamedparam v0.1.3/go.mod h1:93FLICAIk/quk7eaPPQvbzihUdn/QkGDwIZEoLtpH6I= +github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= +github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/maratori/testableexamples v1.0.0 h1:dU5alXRrD8WKSjOUnmJZuzdxWOEQ57+7s93SLMxb2vI= +github.com/maratori/testableexamples v1.0.0/go.mod h1:4rhjL1n20TUTT4vdh3RDqSizKLyXp7K2u6HgraZCGzE= +github.com/maratori/testpackage v1.1.1 h1:S58XVV5AD7HADMmD0fNnziNHqKvSdDuEKdPD1rNTU04= +github.com/maratori/testpackage v1.1.1/go.mod h1:s4gRK/ym6AMrqpOa/kEbQTV4Q4jb7WeLZzVhVVVOQMc= +github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 h1:gWg6ZQ4JhDfJPqlo2srm/LN17lpybq15AryXIRcWYLE= +github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= +github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= +github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= +github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mgechev/revive v1.5.0 h1:oaSmjA7rP8+HyoRuCgC531VHwnLH1AlJdjj+1AnQceQ= +github.com/mgechev/revive v1.5.0/go.mod h1:L6T3H8EoerRO86c7WuGpvohIUmiploGiyoYbtIWFmV8= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/moricho/tparallel v0.3.2 h1:odr8aZVFA3NZrNybggMkYO3rgPRcqjeQUlBBFVxKHTI= +github.com/moricho/tparallel v0.3.2/go.mod h1:OQ+K3b4Ln3l2TZveGCywybl68glfLEwFGqvnjok8b+U= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/nakabonne/nestif v0.3.1 h1:wm28nZjhQY5HyYPx+weN3Q65k6ilSBxDb8v5S81B81U= +github.com/nakabonne/nestif v0.3.1/go.mod h1:9EtoZochLn5iUprVDmDjqGKPofoUEBL8U4Ngq6aY7OE= +github.com/nishanths/exhaustive v0.12.0 h1:vIY9sALmw6T/yxiASewa4TQcFsVYZQQRUQJhKRf3Swg= +github.com/nishanths/exhaustive v0.12.0/go.mod h1:mEZ95wPIZW+x8kC4TgC+9YCUgiST7ecevsVDTgc2obs= +github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk= +github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= +github.com/nunnatsa/ginkgolinter v0.18.0 h1:ZXO1wKhPg3A6LpbN5dMuqwhfOjN5c3ous8YdKOuqk9k= +github.com/nunnatsa/ginkgolinter v0.18.0/go.mod h1:vPrWafSULmjMGCMsfGA908if95VnHQNAahvSBOjTuWs= +github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= +github.com/onsi/ginkgo/v2 v2.20.2 h1:7NVCeyIWROIAheY21RLS+3j2bb52W0W82tkberYytp4= +github.com/onsi/ginkgo/v2 v2.20.2/go.mod h1:K9gyxPIlb+aIvnZ8bd9Ak+YP18w3APlR+5coaZoE2ag= +github.com/onsi/gomega v1.34.2 h1:pNCwDkzrsv7MS9kpaQvVb1aVLahQXyJ/Tv5oAZMI3i8= +github.com/onsi/gomega v1.34.2/go.mod h1:v1xfxRgk0KIsG+QOdm7p8UosrOzPYRo60fd3B/1Dukc= +github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= +github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= +github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w= +github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= +github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= +github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= +github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= +github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= +github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/polyfloyd/go-errorlint v1.6.0 h1:tftWV9DE7txiFzPpztTAwyoRLKNj9gpVm2cg8/OwcYY= +github.com/polyfloyd/go-errorlint v1.6.0/go.mod h1:HR7u8wuP1kb1NeN1zqTd1ZMlqUKPPHF+Id4vIPvDqVw= +github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= +github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/quasilyte/go-ruleguard v0.4.3-0.20240823090925-0fe6f58b47b1 h1:+Wl/0aFp0hpuHM3H//KMft64WQ1yX9LdJY64Qm/gFCo= +github.com/quasilyte/go-ruleguard v0.4.3-0.20240823090925-0fe6f58b47b1/go.mod h1:GJLgqsLeo4qgavUoL8JeGFNS7qcisx3awV/w9eWTmNI= +github.com/quasilyte/go-ruleguard/dsl v0.3.22 h1:wd8zkOhSNr+I+8Qeciml08ivDt1pSXe60+5DqOpCjPE= +github.com/quasilyte/go-ruleguard/dsl v0.3.22/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo= +github.com/quasilyte/gogrep v0.5.0/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng= +github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl980XxGFEZSS6KlBGIV0diGdySzxATTWoqaU= +github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= +github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs= +github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= +github.com/raeperd/recvcheck v0.1.2 h1:SjdquRsRXJc26eSonWIo8b7IMtKD3OAT2Lb5G3ZX1+4= +github.com/raeperd/recvcheck v0.1.2/go.mod h1:n04eYkwIR0JbgD73wT8wL4JjPC3wm0nFtzBnWNocnYU= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= +github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryancurrah/gomodguard v1.3.5 h1:cShyguSwUEeC0jS7ylOiG/idnd1TpJ1LfHGpV3oJmPU= +github.com/ryancurrah/gomodguard v1.3.5/go.mod h1:MXlEPQRxgfPQa62O8wzK3Ozbkv9Rkqr+wKjSxTdsNJE= +github.com/ryanrolds/sqlclosecheck v0.5.1 h1:dibWW826u0P8jNLsLN+En7+RqWWTYrjCB9fJfSfdyCU= +github.com/ryanrolds/sqlclosecheck v0.5.1/go.mod h1:2g3dUjoS6AL4huFdv6wn55WpLIDjY7ZgUR4J8HOO/XQ= +github.com/sanposhiho/wastedassign/v2 v2.0.7 h1:J+6nrY4VW+gC9xFzUc+XjPD3g3wF3je/NsJFwFK7Uxc= +github.com/sanposhiho/wastedassign/v2 v2.0.7/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= +github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6NgVqpn3+iol9aGu4= +github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY= +github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tMEOsumirXcOJqAw= +github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= +github.com/sashamelentyev/usestdlibvars v1.27.0 h1:t/3jZpSXtRPRf2xr0m63i32ZrusyurIGT9E5wAvXQnI= +github.com/sashamelentyev/usestdlibvars v1.27.0/go.mod h1:9nl0jgOfHKWNFS43Ojw0i7aRoS4j6EBye3YBhmAIRF8= +github.com/securego/gosec/v2 v2.21.4 h1:Le8MSj0PDmOnHJgUATjD96PaXRvCpKC+DGJvwyy0Mlk= +github.com/securego/gosec/v2 v2.21.4/go.mod h1:Jtb/MwRQfRxCXyCm1rfM1BEiiiTfUOdyzzAhlr6lUTA= +github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU= +github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= +github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= +github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sivchari/containedctx v1.0.3 h1:x+etemjbsh2fB5ewm5FeLNi5bUjK0V8n0RB+Wwfd0XE= +github.com/sivchari/containedctx v1.0.3/go.mod h1:c1RDvCbnJLtH4lLcYD/GqwiBSSf4F5Qk0xld2rBqzJ4= +github.com/sivchari/tenv v1.12.1 h1:+E0QzjktdnExv/wwsnnyk4oqZBUfuh89YMQT1cyuvSY= +github.com/sivchari/tenv v1.12.1/go.mod h1:1LjSOUCc25snIr5n3DtGGrENhX3LuWefcplwVGC24mw= +github.com/sonatard/noctx v0.1.0 h1:JjqOc2WN16ISWAjAk8M5ej0RfExEXtkEyExl2hLW+OM= +github.com/sonatard/noctx v0.1.0/go.mod h1:0RvBxqY8D4j9cTTTWE8ylt2vqj2EPI8fHmrxHdsaZ2c= +github.com/sourcegraph/go-diff v0.7.0 h1:9uLlrd5T46OXs5qpp8L/MTltk0zikUGi0sNNyCpA8G0= +github.com/sourcegraph/go-diff v0.7.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= +github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= +github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YEwQ0= +github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= +github.com/stbenjam/no-sprintf-host-port v0.1.1 h1:tYugd/yrm1O0dV+ThCbaKZh195Dfm07ysF0U6JQXczc= +github.com/stbenjam/no-sprintf-host-port v0.1.1/go.mod h1:TLhvtIvONRzdmkFiio4O8LHsN9N74I+PhRquPsxpL0I= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= +github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/tdakkota/asciicheck v0.2.0 h1:o8jvnUANo0qXtnslk2d3nMKTFNlOnJjRrNcj0j9qkHM= +github.com/tdakkota/asciicheck v0.2.0/go.mod h1:Qb7Y9EgjCLJGup51gDHFzbI08/gbGhL/UVhYIPWG2rg= +github.com/tenntenn/modver v1.0.1 h1:2klLppGhDgzJrScMpkj9Ujy3rXPUspSjAcev9tSEBgA= +github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= +github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3 h1:f+jULpRQGxTSkNYKJ51yaw6ChIqO+Je8UqsTKN/cDag= +github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= +github.com/tetafro/godot v1.4.18 h1:ouX3XGiziKDypbpXqShBfnNLTSjR8r3/HVzrtJ+bHlI= +github.com/tetafro/godot v1.4.18/go.mod h1:2oVxTBSftRTh4+MVfUaUXR6bn2GDXCaMcOG4Dk3rfio= +github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 h1:quvGphlmUVU+nhpFa4gg4yJyTRJ13reZMDHrKwYw53M= +github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966/go.mod h1:27bSVNWSBOHm+qRp1T9qzaIpsWEP6TbUnei/43HK+PQ= +github.com/timonwong/loggercheck v0.10.1 h1:uVZYClxQFpw55eh+PIoqM7uAOHMrhVcDoWDery9R8Lg= +github.com/timonwong/loggercheck v0.10.1/go.mod h1:HEAWU8djynujaAVX7QI65Myb8qgfcZ1uKbdpg3ZzKl8= +github.com/tomarrell/wrapcheck/v2 v2.9.0 h1:801U2YCAjLhdN8zhZ/7tdjB3EnAoRlJHt/s+9hijLQ4= +github.com/tomarrell/wrapcheck/v2 v2.9.0/go.mod h1:g9vNIyhb5/9TQgumxQyOEqDHsmGYcGsVMOx/xGkqdMo= +github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw= +github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= +github.com/ultraware/funlen v0.1.0 h1:BuqclbkY6pO+cvxoq7OsktIXZpgBSkYTQtmwhAK81vI= +github.com/ultraware/funlen v0.1.0/go.mod h1:XJqmOQja6DpxarLj6Jj1U7JuoS8PvL4nEqDaQhy22p4= +github.com/ultraware/whitespace v0.1.1 h1:bTPOGejYFulW3PkcrqkeQwOd6NKOOXvmGD9bo/Gk8VQ= +github.com/ultraware/whitespace v0.1.1/go.mod h1:XcP1RLD81eV4BW8UhQlpaR+SDc2givTvyI8a586WjW8= +github.com/uudashr/gocognit v1.1.3 h1:l+a111VcDbKfynh+airAy/DJQKaXh2m9vkoysMPSZyM= +github.com/uudashr/gocognit v1.1.3/go.mod h1:aKH8/e8xbTRBwjbCkwZ8qt4l2EpKXl31KMHgSS+lZ2U= +github.com/uudashr/iface v1.2.0 h1:ECJjh5q/1Zmnv/2yFpWV6H3oMg5+Mo+vL0aqw9Gjazo= +github.com/uudashr/iface v1.2.0/go.mod h1:Ux/7d/rAF3owK4m53cTVXL4YoVHKNqnoOeQHn2xrlp0= +github.com/xen0n/gosmopolitan v1.2.2 h1:/p2KTnMzwRexIW8GlKawsTWOxn7UHA+jCMF/V8HHtvU= +github.com/xen0n/gosmopolitan v1.2.2/go.mod h1:7XX7Mj61uLYrj0qmeN0zi7XDon9JRAEhYQqAPLVNTeg= +github.com/yagipy/maintidx v1.0.0 h1:h5NvIsCz+nRDapQ0exNv4aJ0yXSI0420omVANTv3GJM= +github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= +github.com/yeya24/promlinter v0.3.0 h1:JVDbMp08lVCP7Y6NP3qHroGAO6z2yGKQtS5JsjqtoFs= +github.com/yeya24/promlinter v0.3.0/go.mod h1:cDfJQQYv9uYciW60QT0eeHlFodotkYZlL+YcPQN+mW4= +github.com/ykadowak/zerologlint v0.1.5 h1:Gy/fMz1dFQN9JZTPjv1hxEk+sRWm05row04Yoolgdiw= +github.com/ykadowak/zerologlint v0.1.5/go.mod h1:KaUskqF3e/v59oPmdq1U1DnKcuHokl2/K1U4pmIELKg= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +gitlab.com/bosi/decorder v0.4.2 h1:qbQaV3zgwnBZ4zPMhGLW4KZe7A7NwxEhJx39R3shffo= +gitlab.com/bosi/decorder v0.4.2/go.mod h1:muuhHoaJkA9QLcYHq4Mj8FJUwDZ+EirSHRiaTcTf6T8= +go-simpler.org/assert v0.9.0 h1:PfpmcSvL7yAnWyChSjOz6Sp6m9j5lyK8Ok9pEL31YkQ= +go-simpler.org/assert v0.9.0/go.mod h1:74Eqh5eI6vCK6Y5l3PI8ZYFXG4Sa+tkr70OIPJAUr28= +go-simpler.org/musttag v0.13.0 h1:Q/YAW0AHvaoaIbsPj3bvEI5/QFP7w696IMUpnKXQfCE= +go-simpler.org/musttag v0.13.0/go.mod h1:FTzIGeK6OkKlUDVpj0iQUXZLUO1Js9+mvykDQy9C5yM= +go-simpler.org/sloglint v0.7.2 h1:Wc9Em/Zeuu7JYpl+oKoYOsQSy2X560aVueCW/m6IijY= +go-simpler.org/sloglint v0.7.2/go.mod h1:US+9C80ppl7VsThQclkM7BkCHQAzuz8kHLsW3ppuluo= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= +go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= +go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= +go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= +golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp/typeparams v0.0.0-20240909161429-701f63a606c0 h1:bVwtbF629Xlyxk6xLQq2TDYmqP0uiWaet5LwRebuY0k= +golang.org/x/exp/typeparams v0.0.0-20240909161429-701f63a606c0/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= +golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= +golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo= +golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= +golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= +golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= +golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= +golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= +golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.27.0 h1:qEKojBykQkQ4EynWy4S8Weg69NumxKdn40Fce3uc/8o= +golang.org/x/tools v0.27.0/go.mod h1:sUi0ZgbwW9ZPAq26Ekut+weQPR5eIM6GQLQ1Yjm1H0Q= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.5.1 h1:4bH5o3b5ZULQ4UrBmP+63W9r7qIkqJClEA9ko5YKx+I= +honnef.co/go/tools v0.5.1/go.mod h1:e9irvo83WDG9/irijV44wr3tbhcFeRnfpVlRqVwpzMs= +mvdan.cc/gofumpt v0.7.0 h1:bg91ttqXmi9y2xawvkuMXyvAA/1ZGJqYAEGjXuP0JXU= +mvdan.cc/gofumpt v0.7.0/go.mod h1:txVFJy/Sc/mvaycET54pV8SW8gWxTlUuGHVEcncmNUo= +mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f h1:lMpcwN6GxNbWtbpI1+xzFLSW8XzX0u72NttUGVFjO3U= +mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f/go.mod h1:RSLa7mKKCNeTTMHBw5Hsy2rfJmd6O2ivt9Dw9ZqCQpQ= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/.citools/jb/go.mod b/.citools/jb/go.mod new file mode 100644 index 00000000000..a8df6197a17 --- /dev/null +++ b/.citools/jb/go.mod @@ -0,0 +1,20 @@ +module jb + +go 1.24.1 + +tool github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb + +require ( + github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect + github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/fatih/color v1.17.0 // indirect + github.com/jsonnet-bundler/jsonnet-bundler v0.5.1 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/stretchr/testify v1.10.0 // indirect + golang.org/x/sys v0.30.0 // indirect + gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect +) diff --git a/.citools/jb/go.sum b/.citools/jb/go.sum new file mode 100644 index 00000000000..fa93a05ce6a --- /dev/null +++ b/.citools/jb/go.sum @@ -0,0 +1,70 @@ +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b h1:mimo19zliBX/vSQ6PWWSL9lK8qwHozUj03+zLoEB8O0= +github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b/go.mod h1:fvzegU4vN3H1qMT+8wDmzjAcDONcgo2/SZ/TyfdUOFs= +github.com/campoy/embedmd v1.0.0/go.mod h1:oxyr9RCiSXg0M3VJ3ks0UGfp98BpSSGr0kpiX3MzVl8= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= +github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= +github.com/jsonnet-bundler/jsonnet-bundler v0.5.1 h1:eUd6EA1Qzz73Q4NLNLOrNkMb96+6NTTERbX9lqaxVwk= +github.com/jsonnet-bundler/jsonnet-bundler v0.5.1/go.mod h1:Qrdw/7mOFS2SKCOALKFfEH8gdvXJi8XZjw9g5ilpf4I= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.4/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= +golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/.citools/lefthook/go.mod b/.citools/lefthook/go.mod new file mode 100644 index 00000000000..2fbfd58e665 --- /dev/null +++ b/.citools/lefthook/go.mod @@ -0,0 +1,51 @@ +module lefthook + +go 1.24.1 + +tool github.com/evilmartians/lefthook + +require ( + github.com/MakeNowJust/heredoc v1.0.0 // indirect + github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect + github.com/briandowns/spinner v1.23.0 // indirect + github.com/charmbracelet/lipgloss v0.6.0 // indirect + github.com/creack/pty v1.1.18 // indirect + github.com/evilmartians/lefthook v1.4.8 // indirect + github.com/fatih/color v1.17.0 // indirect + github.com/fsnotify/fsnotify v1.8.0 // indirect + github.com/gobwas/glob v0.2.3 // indirect + github.com/google/go-cmp v0.7.0 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/lucasb-eyer/go-colorful v1.2.0 // indirect + github.com/magiconair/properties v1.8.7 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/mattn/go-runewidth v0.0.16 // indirect + github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c // indirect + github.com/muesli/reflow v0.3.0 // indirect + github.com/muesli/termenv v0.15.1 // indirect + github.com/pelletier/go-toml/v2 v2.2.3 // indirect + github.com/rivo/uniseg v0.4.7 // indirect + github.com/rogpeppe/go-internal v1.13.1 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.7.0 // indirect + github.com/spf13/cobra v1.9.1 // indirect + github.com/spf13/pflag v1.0.6 // indirect + github.com/spf13/viper v1.19.0 // indirect + github.com/stretchr/testify v1.10.0 // indirect + github.com/subosito/gotenv v1.6.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect + golang.org/x/sys v0.30.0 // indirect + golang.org/x/term v0.29.0 // indirect + golang.org/x/text v0.22.0 // indirect + golang.org/x/tools v0.30.0 // indirect + gopkg.in/alessio/shellescape.v1 v1.0.0-20170105083845-52074bc9df61 // indirect + gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect + gopkg.in/ini.v1 v1.67.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/.citools/lefthook/go.sum b/.citools/lefthook/go.sum new file mode 100644 index 00000000000..1b0fbdb81ce --- /dev/null +++ b/.citools/lefthook/go.sum @@ -0,0 +1,117 @@ +github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= +github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= +github.com/alessio/shellescape v1.4.1 h1:V7yhSDDn8LP4lc4jS8pFkt0zCnzVJlG5JXy9BVKJUX0= +github.com/alessio/shellescape v1.4.1/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= +github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= +github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= +github.com/briandowns/spinner v1.23.0 h1:alDF2guRWqa/FOZZYWjlMIx2L6H0wyewPxo/CH4Pt2A= +github.com/briandowns/spinner v1.23.0/go.mod h1:rPG4gmXeN3wQV/TsAY4w8lPdIM6RX3yqeBQJSrbXjuE= +github.com/charmbracelet/lipgloss v0.6.0 h1:1StyZB9vBSOyuZxQUcUwGr17JmojPNm87inij9N3wJY= +github.com/charmbracelet/lipgloss v0.6.0/go.mod h1:tHh2wr34xcHjC2HCXIlGSG1jaDF0S0atAUvBMP6Ppuk= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= +github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/evilmartians/lefthook v1.4.8 h1:8FmXWtfFiEZw3w18JbhVrp3g+Iy/j2XEo6gcC25+4KA= +github.com/evilmartians/lefthook v1.4.8/go.mod h1:anwwu2QiCEnsOCBHfRgGOB3/sd9FMVNhmY8l9DDQAG8= +github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= +github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= +github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= +github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= +github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= +github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= +github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c h1:cqn374mizHuIWj+OSJCajGr/phAmuMug9qIX3l9CflE= +github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/muesli/reflow v0.2.1-0.20210115123740-9e1d0d53df68/go.mod h1:Xk+z4oIWdQqJzsxyjgl3P22oYZnHdZ8FFTHAQQt5BMQ= +github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= +github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= +github.com/muesli/termenv v0.11.1-0.20220204035834-5ac8409525e0/go.mod h1:Bd5NYQ7pd+SrtBSrSNoBBmXlcY8+Xj4BMJgh8qcZrvs= +github.com/muesli/termenv v0.15.1 h1:UzuTb/+hhlBugQz28rpzey4ZuKcZ03MeKsoG7IJZIxs= +github.com/muesli/termenv v0.15.1/go.mod h1:HeAQPTzpfs016yGtA4g00CsdYnVLJvxsS4ANqrZs2sQ= +github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= +github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= +github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= +github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w= +github.com/spf13/cast v1.7.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= +github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= +github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= +github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= +github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= +golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= +golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= +golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= +golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/tools v0.30.0 h1:BgcpHewrV5AUp2G9MebG4XPFI1E2W41zU1SaqVA9vJY= +golang.org/x/tools v0.30.0/go.mod h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY= +gopkg.in/alessio/shellescape.v1 v1.0.0-20170105083845-52074bc9df61 h1:8ajkpB4hXVftY5ko905id+dOnmorcS2CHNxxHLLDcFM= +gopkg.in/alessio/shellescape.v1 v1.0.0-20170105083845-52074bc9df61/go.mod h1:IfMagxm39Ys4ybJrDb7W3Ob8RwxftP0Yy+or/NVz1O8= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a485a1f6061..a5fb8a5803b 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -57,6 +57,7 @@ /go.work @grafana/grafana-app-platform-squad /go.work.sum @grafana/grafana-app-platform-squad /.bingo/ @grafana/grafana-backend-group +/.citools @grafana/grafana-developer-enablement-squad /pkg/README.md @grafana/grafana-backend-group /pkg/ruleguard.rules.go @grafana/grafana-backend-group /.bra.toml @grafana/grafana-backend-group diff --git a/.github/workflows/go-lint.yml b/.github/workflows/go-lint.yml index 439ff2de2da..0925dcf02d0 100644 --- a/.github/workflows/go-lint.yml +++ b/.github/workflows/go-lint.yml @@ -24,7 +24,7 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v6 with: - version: v1.62.0 + version: v1.64.2 args: | --verbose $(go list -m -f '{{.Dir}}' | xargs -I{} sh -c 'test ! -f {}/.nolint && echo {}/...') install-mode: binary diff --git a/Dockerfile b/Dockerfile index f5e45b6259d..08360d8b06c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ ARG BASE_IMAGE=alpine:3.21 ARG JS_IMAGE=node:22-alpine ARG JS_PLATFORM=linux/amd64 -ARG GO_IMAGE=golang:1.23.7-alpine +ARG GO_IMAGE=golang:1.24.1-alpine # Default to building locally ARG GO_SRC=go-builder @@ -60,6 +60,13 @@ WORKDIR /tmp/grafana COPY go.* ./ COPY .bingo .bingo +COPY .citools/bra .citools/bra +COPY .citools/cue .citools/cue +COPY .citools/cog .citools/cog +COPY .citools/lefthook .citools/lefthook +COPY .citools/jb .citools/jb +COPY .citools/drone .citools/drone +COPY .citools/golangci-lint .citools/golangci-lint # Include vendored dependencies COPY pkg/util/xorm pkg/util/xorm diff --git a/Makefile b/Makefile index 96839b5c323..3a060c3601e 100644 --- a/Makefile +++ b/Makefile @@ -110,12 +110,12 @@ cleanup-old-git-hooks: ./scripts/cleanup-husky.sh .PHONY: lefthook-install -lefthook-install: cleanup-old-git-hooks $(LEFTHOOK) # install lefthook for pre-commit hooks - $(LEFTHOOK) install -f +lefthook-install: cleanup-old-git-hooks # install lefthook for pre-commit hooks + $(GO) tool lefthook install -f .PHONY: lefthook-uninstall -lefthook-uninstall: $(LEFTHOOK) - $(LEFTHOOK) uninstall +lefthook-uninstall: + $(GO) tool lefthook uninstall ##@ OpenAPI 3 OAPI_SPEC_TARGET = public/openapi3.json @@ -171,10 +171,10 @@ gen-go: $(GO) run $(GO_RACE_FLAG) ./pkg/build/wire/cmd/wire/main.go gen -tags $(WIRE_TAGS) ./pkg/server .PHONY: fix-cue -fix-cue: $(CUE) +fix-cue: @echo "formatting cue files" - $(CUE) fix kinds/**/*.cue - $(CUE) fix public/app/plugins/**/**/*.cue + $(GO) tool cue fix kinds/**/*.cue + $(GO) tool cue fix public/app/plugins/**/**/*.cue .PHONY: gen-jsonnet gen-jsonnet: @@ -230,8 +230,8 @@ build-plugin-go: ## Build decoupled plugins build: build-go build-js ## Build backend and frontend. .PHONY: run -run: $(BRA) ## Build and run web server on filesystem changes. See /.bra.toml for configuration. - $(BRA) run +run: ## Build and run web server on filesystem changes. See /.bra.toml for configuration. + $(GO) tool bra run .PHONY: run-go run-go: ## Build and run web server immediately. @@ -320,9 +320,9 @@ test: test-go test-js ## Run all tests. ##@ Linting .PHONY: golangci-lint -golangci-lint: $(GOLANGCI_LINT) +golangci-lint: @echo "lint via golangci-lint" - $(GOLANGCI_LINT) run \ + $(GO) tool golangci-lint run \ --config .golangci.yml \ $(GO_LINT_FILES) @@ -330,13 +330,13 @@ golangci-lint: $(GOLANGCI_LINT) lint-go: golangci-lint ## Run all code checks for backend. You can use GO_LINT_FILES to specify exact files to check .PHONY: lint-go-diff -lint-go-diff: $(GOLANGCI_LINT) +lint-go-diff: git diff --name-only $(GIT_BASE) | \ grep '\.go$$' | \ $(XARGSR) dirname | \ sort -u | \ sed 's,^,./,' | \ - $(XARGSR) $(GOLANGCI_LINT) run --config .golangci.toml + $(XARGSR) $(GO) tool golangci-lint run --config .golangci.toml # with disabled SC1071 we are ignored some TCL,Expect `/usr/bin/env expect` scripts .PHONY: shellcheck diff --git a/go.work b/go.work index df840ed9405..dbda98bd6dd 100644 --- a/go.work +++ b/go.work @@ -1,10 +1,17 @@ -go 1.23.7 +go 1.24.1 // The `skip:golangci-lint` comment tag is used to exclude the package from the `golangci-lint` GitHub Action. // The module at the root of the repo (`.`) is excluded because ./pkg/... is included manually in the `golangci-lint` configuration. use ( . // skip:golangci-lint + ./.citools/bra + ./.citools/cog + ./.citools/cue + ./.citools/drone + ./.citools/golangci-lint + ./.citools/jb + ./.citools/lefthook ./apps/advisor ./apps/alerting/notifications ./apps/dashboard diff --git a/go.work.sum b/go.work.sum index 2062d7330a6..8aeda713a66 100644 --- a/go.work.sum +++ b/go.work.sum @@ -1,3 +1,4 @@ +bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898 h1:SC+c6A1qTFstO9qmB86mPV2IpYme/2ZoEQ0hrP+wo+Q= buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20230802163732-1c33ebd9ecfa.1 h1:tdpHgTbmbvEIARu+bixzmleMi14+3imnpoFXz+Qzjp4= buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20230802163732-1c33ebd9ecfa.1/go.mod h1:xafc+XIsTxTy76GJQ1TKgvJWsSugFBqMaN27WhUblew= buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.4-20250130201111-63bb56e20495.1 h1:4erM3WLgEG/HIBrpBDmRbs1puhd7p0z7kNXDuhHthwM= @@ -8,6 +9,7 @@ cel.dev/expr v0.16.1/go.mod h1:AsGA5zb3WruAEQeQng1RZdGEXmBj0jvMWh6l5SnNuC8= cel.dev/expr v0.18.0/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= cel.dev/expr v0.19.0/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= cloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJNnic= +cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4= cloud.google.com/go v0.112.2/go.mod h1:iEqjp//KquGIJV/m+Pk3xecgKNhV+ry+vVTsy4TbDms= cloud.google.com/go v0.116.0/go.mod h1:cEPSRWPzZEswwdr9BxE6ChEn01dWlTaF05LiC2Xs70U= cloud.google.com/go v0.117.0/go.mod h1:ZbwhVTb1DBGt2Iwb3tNO6SEK4q+cplHZmLWH+DelYYc= @@ -21,6 +23,8 @@ cloud.google.com/go/accesscontextmanager v1.9.1 h1:+C7HM05/h80znK+8VNu25wAimueda cloud.google.com/go/accesscontextmanager v1.9.1/go.mod h1:wUVSoz8HmG7m9miQTh6smbyYuNOJrvZukK5g6WxSOp0= cloud.google.com/go/accesscontextmanager v1.9.3 h1:8zVoeiBa4erMCLEXltOcqVEsZhS26JZ5/Vrgs59eQiI= cloud.google.com/go/accesscontextmanager v1.9.3/go.mod h1:S1MEQV5YjkAKBoMekpGrkXKfrBdsi4x6Dybfq6gZ8BU= +cloud.google.com/go/ai v0.8.0 h1:rXUEz8Wp2OlrM8r1bfmpF2+VKqc1VJpafE3HgzRnD/w= +cloud.google.com/go/ai v0.8.0/go.mod h1:t3Dfk4cM61sytiggo2UyGsDVW3RF1qGZaUKDrZFyqkE= cloud.google.com/go/aiplatform v1.68.0 h1:EPPqgHDJpBZKRvv+OsB3cr0jYz3EL2pZ+802rBPcG8U= cloud.google.com/go/aiplatform v1.68.0/go.mod h1:105MFA3svHjC3Oazl7yjXAmIR89LKhRAeNdnDKJczME= cloud.google.com/go/aiplatform v1.70.0 h1:vnqsPkgcwlDEpWl9t6C3/HLfHeweuGXs2gcYTzH6dMs= @@ -124,6 +128,7 @@ cloud.google.com/go/cloudtasks v1.13.3 h1:rXdznKjCa7WpzmvR2plrn2KJ+RZC1oYxPiRWNQ cloud.google.com/go/cloudtasks v1.13.3/go.mod h1:f9XRvmuFTm3VhIKzkzLCPyINSU3rjjvFUsFVGR5wi24= cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= cloud.google.com/go/compute v1.23.4/go.mod h1:/EJMj55asU6kAFnuZET8zqgwgJ9FvXWXOkkfQZa4ioI= +cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= cloud.google.com/go/compute v1.28.1 h1:XwPcZjgMCnU2tkwY10VleUjSAfpTj9RDn+kGrbYsi8o= cloud.google.com/go/compute v1.28.1/go.mod h1:b72iXMY4FucVry3NR3Li4kVyyTvbMDE7x5WsqvxjsYk= cloud.google.com/go/compute v1.31.1 h1:SObuy8Fs6woazArpXp1fsHCw+ZH4iJ/8dGGTxUhHZQA= @@ -224,6 +229,7 @@ cloud.google.com/go/filestore v1.9.1 h1:s8DPPSV80FzIB7rduoMJAgknktms9hZGE3+X9KFU cloud.google.com/go/filestore v1.9.1/go.mod h1:g/FNHBABpxjL1M9nNo0nW6vLYIMVlyOKhBKtYGgcKUI= cloud.google.com/go/filestore v1.9.3 h1:vTXQI5qYKZ8dmCyHN+zVfaMyXCYbyZNM0CkPzpPUn7Q= cloud.google.com/go/filestore v1.9.3/go.mod h1:Me0ZRT5JngT/aZPIKpIK6N4JGMzrFHRtGHd9ayUS4R4= +cloud.google.com/go/firestore v1.15.0/go.mod h1:GWOxFXcv8GZUtYpWHw/w6IuYNux/BtmeVTMmjrm4yhk= cloud.google.com/go/firestore v1.17.0 h1:iEd1LBbkDZTFsLw3sTH50eyg4qe8eoG6CjocmEXO9aQ= cloud.google.com/go/firestore v1.17.0/go.mod h1:69uPx1papBsY8ZETooc71fOhoKkD70Q1DwMrtKuOT/Y= cloud.google.com/go/firestore v1.18.0 h1:cuydCaLS7Vl2SatAeivXyhbhDEIR8BDmtn4egDhIn2s= @@ -281,6 +287,7 @@ cloud.google.com/go/lifesciences v0.10.3 h1:Z05C+Ui953f0EQx9hJ1la6+QQl8ADrIs3iNw cloud.google.com/go/lifesciences v0.10.3/go.mod h1:hnUUFht+KcZcliixAg+iOh88FUwAzDQQt5tWd7iIpNg= cloud.google.com/go/logging v1.12.0 h1:ex1igYcGFd4S/RZWOCU51StlIEuey5bjqwH9ZYjHibk= cloud.google.com/go/logging v1.12.0/go.mod h1:wwYBt5HlYP1InnrtYI0wtwttpVU1rifnMT7RejksUAM= +cloud.google.com/go/longrunning v0.5.5/go.mod h1:WV2LAxD8/rg5Z1cNW6FJ/ZpX4E4VnDnoTk0yawPBB7s= cloud.google.com/go/longrunning v0.5.6/go.mod h1:vUaDrWYOMKRuhiv6JBnn49YxCPz2Ayn9GqyjaBT8/mA= cloud.google.com/go/longrunning v0.6.2/go.mod h1:k/vIs83RN4bE3YCswdXC5PFfWVILjm3hpEUlSko4PiI= cloud.google.com/go/managedidentities v1.7.1 h1:9hC4E7JnWn/jSUls022Sj9ri+vriGnLzvDXo0cs1zcA= @@ -496,11 +503,11 @@ contrib.go.opencensus.io/exporter/stackdriver v0.13.14/go.mod h1:5pSSGY0Bhuk7waT contrib.go.opencensus.io/integrations/ocsql v0.1.7 h1:G3k7C0/W44zcqkpRSFyjU9f6HZkbwIrL//qqnlqWZ60= contrib.go.opencensus.io/integrations/ocsql v0.1.7/go.mod h1:8DsSdjz3F+APR+0z0WkU1aRorQCFfRxvqjUUPMbF3fE= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY= +docker.io/go-docker v1.0.0 h1:VdXS/aNYQxyA9wdLD5z8Q8Ro688/hG8HzKxYVEVbE6s= gioui.org v0.0.0-20210308172011-57750fc8a0a6 h1:K72hopUosKG3ntOPNG4OzzbuhxGuVf06fa2la1/H/Ho= git.sr.ht/~sbinet/gg v0.5.0 h1:6V43j30HM623V329xA9Ntq+WJrMjDxRjuAB1LFWF5m8= git.sr.ht/~sbinet/gg v0.5.0/go.mod h1:G2C0eRESqlKhS7ErsNey6HHrqU1PwsnCQlekFi9Q2Oo= github.com/99designs/basicauth-go v0.0.0-20160802081356-2a93ba0f464d h1:j6oB/WPCigdOkxtuPl1VSIiLpy7Mdsu6phQffbF19Ng= -github.com/99designs/httpsignatures-go v0.0.0-20170731043157-88528bf4ca7e h1:rl2Aq4ZODqTDkeSqQBy+fzpZPamacO1Srp8zq7jf2Sc= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= github.com/Azure/azure-amqp-common-go/v3 v3.2.3 h1:uDF62mbd9bypXWi19V1bN5NZEO84JqgmI5G73ibAmrk= @@ -513,6 +520,7 @@ github.com/Azure/go-autorest/autorest/azure/auth v0.5.13 h1:Ov8avRZi2vmrE2JcXw+t github.com/Azure/go-autorest/autorest/azure/auth v0.5.13/go.mod h1:5BAVfWLWXihP47vYrPuBKKf4cS0bXI+KM9Qx6ETDJYo= github.com/Azure/go-autorest/autorest/azure/cli v0.4.6 h1:w77/uPk80ZET2F+AfQExZyEWtn+0Rk/uw17m9fv5Ajc= github.com/Azure/go-autorest/autorest/azure/cli v0.4.6/go.mod h1:piCfgPho7BiIDdEQ1+g4VmKyD5y+p/XtSNqE6Hc4QD0= +github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= github.com/ClickHouse/ch-go v0.61.5 h1:zwR8QbYI0tsMiEcze/uIMK+Tz1D3XZXLdNrlaOpeEI4= github.com/ClickHouse/ch-go v0.61.5/go.mod h1:s1LJW/F/LcFs5HJnuogFMta50kKDO0lf9zzfrbl0RQg= @@ -544,7 +552,11 @@ github.com/KimMachineGun/automemlimit v0.6.1 h1:ILa9j1onAAMadBsyyUJv5cack8Y1WT26 github.com/KimMachineGun/automemlimit v0.6.1/go.mod h1:T7xYht7B8r6AG/AqFcUdc7fzd2bIdBKmepfP2S1svPY= github.com/MicahParks/keyfunc/v2 v2.1.0 h1:6ZXKb9Rp6qp1bDbJefnG7cTH8yMN1IC/4nf+GVjO99k= github.com/MicahParks/keyfunc/v2 v2.1.0/go.mod h1:rW42fi+xgLJ2FRRXAfNx9ZA8WpD4OeE/yHVMteCkw9k= +github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/Microsoft/hcsshim v0.9.6 h1:VwnDOgLeoi2du6dAznfmspNqTiwczvjv4K7NxuY9jsY= +github.com/Microsoft/hcsshim v0.9.6/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc= +github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3 h1:4FA+QBaydEHlwxg0lMN3rhwoDaQy6LKhVWR4qvq4BuA= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/PuerkitoBio/goquery v1.8.1 h1:uQxhNlArOIdbrH1tr0UXwdVFgDcZDrZVdcpygAcwmWM= github.com/PuerkitoBio/goquery v1.8.1/go.mod h1:Q8ICL1kNUJ2sXGoAhPGUdYDJvgQgHzJsnnd3H7Ho5jQ= @@ -555,6 +567,7 @@ github.com/RoaringBitmap/gocroaring v0.4.0 h1:5nufXUgWpBEUNEJXw7926YAA58ZAQRpWPr github.com/RoaringBitmap/real-roaring-datasets v0.0.0-20190726190000-eb7c87156f76 h1:ZYlhPbqQFU+AHfgtCdHGDTtRW1a8geZyiE8c6Q+Sl1s= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 h1:KkH3I3sJuOLP3TjA/dfr4NAY8bghDwnXiU7cTKxQqo0= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= +github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d h1:UrqY+r/OJnIp5u0s1SbQ8dVfLCZJsnvazdBP5hS4iRs= github.com/Shopify/sarama v1.38.1 h1:lqqPUPQZ7zPqYlWpTh+LQ9bhYNu2xJL6k1SJN4WVe2A= github.com/Shopify/sarama v1.38.1/go.mod h1:iwv9a67Ha8VNa+TifujYoWGxWnu2kNVAQdSdZ4X2o5g= github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc= @@ -572,9 +585,9 @@ github.com/alecthomas/kong v0.8.0 h1:ryDCzutfIqJPnNn0omnrgHLbAggDQM2VWHikE1xqK7s github.com/alecthomas/kong v0.8.0/go.mod h1:n1iCIO2xS46oE8ZfYCNDqdR0b0wZNrXAIAqro/2132U= github.com/alecthomas/participle/v2 v2.1.1 h1:hrjKESvSqGHzRb4yW1ciisFJ4p3MGYih6icjJvbsmV8= github.com/alecthomas/participle/v2 v2.1.1/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= github.com/alexflint/go-arg v1.4.2 h1:lDWZAXxpAnZUq4qwb86p/3rIJJ2Li81EoMbTMujhVa0= github.com/alexflint/go-arg v1.4.2/go.mod h1:9iRbDxne7LcR/GSvEr7ma++GLpdIU1zrghf2y2768kM= +github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae h1:AMzIhMUqU3jMrZiTuW0zkYeKlKDAFD+DG20IoO421/Y= github.com/alexflint/go-scalar v1.0.0 h1:NGupf1XV/Xb04wXskDFzS0KWOLH632W/EO4fAFi+A70= github.com/alexflint/go-scalar v1.0.0/go.mod h1:GpHzbCOZXEKMEcygYQ5n/aa4Aq84zbxjy3MxYW0gjYw= github.com/alicebob/miniredis v2.5.0+incompatible h1:yBHoLpsyjupjz3NL3MhKMVkR41j82Yjf3KFv7ApYzUI= @@ -617,6 +630,8 @@ github.com/benbjohnson/immutable v0.4.0 h1:CTqXbEerYso8YzVPxmWxh2gnoRQbbB9X1quUC github.com/benbjohnson/immutable v0.4.0/go.mod h1:iAr8OjJGLnLmVUr9MZ/rz4PWUy6Ouc2JLYuMArmvAJM= github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932 h1:mXoPYz/Ul5HYEDvkta6I8/rnYM5gSdSV2tJ6XbZuEtY= +github.com/bitly/go-simplejson v0.5.0 h1:6IH+V8/tVMab511d5bn4M7EwGXZf9Hj6i2xSwkNEM+Y= +github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blevesearch/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:kDy+zgJFJJoJYBvdfBSiZYBbdsUL0XcjHYWezpQBGPA= github.com/blevesearch/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:9eJDeqxJ3E7WnLebQUlPD7ZjSce7AnDb9vjGmMCbD0A= github.com/blevesearch/goleveldb v1.0.1 h1:iAtV2Cu5s0GD1lwUiekkFHe2gTMCCNVj2foPclDLIFI= @@ -631,16 +646,21 @@ github.com/bradleyjkemp/cupaloy/v2 v2.6.0 h1:knToPYa2xtfg42U3I6punFEjaGFKWQRXJwj github.com/bradleyjkemp/cupaloy/v2 v2.6.0/go.mod h1:bm7JXdkRd4BHJk9HpwqAI8BoAY1lps46Enkdqw6aRX0= github.com/brianvoe/gofakeit/v6 v6.25.0 h1:ZpFjktOpLZUeF8q223o0rUuXtA+m5qW5srjvVi+JkXk= github.com/brianvoe/gofakeit/v6 v6.25.0/go.mod h1:Xj58BMSnFqcn/fAQeSK+/PLtC5kSb7FJIq4JyGa8vEs= +github.com/bshuster-repo/logrus-logstash-hook v0.4.1 h1:pgAtgj+A31JBVtEHu2uHuEx0n+2ukqUJnS2vVe5pQNA= github.com/bufbuild/protovalidate-go v0.2.1 h1:pJr07sYhliyfj/STAM7hU4J3FKpVeLVKvOBmOTN8j+s= github.com/bufbuild/protovalidate-go v0.2.1/go.mod h1:e7XXDtlxj5vlEyAgsrxpzayp4cEMKCSSb8ZCkin+MVA= github.com/bufbuild/protovalidate-go v0.9.1 h1:cdrIA33994yCcJyEIZRL36ZGTe9UDM/WHs5MBHEimiE= github.com/bufbuild/protovalidate-go v0.9.1/go.mod h1:5jptBxfvlY51RhX32zR6875JfPBRXUsQjyZjm/NqkLQ= +github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd h1:rFt+Y/IK1aEZkEHchZRSq9OQbsSzIT/OrI8YFFmRIng= +github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b h1:otBG+dV+YK+Soembjv71DPz3uX/V/6MMlSyD9JBQ6kQ= +github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0 h1:nvj0OLI3YqYXer/kZD8Ri1aaunCxIEsOst1BVJswV0o= github.com/bwesterb/go-ristretto v1.2.3 h1:1w53tCkGhCQ5djbat3+MH0BAQ5Kfgbt56UZQ/JMzngw= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/bytedance/sonic v1.10.0-rc3 h1:uNSnscRapXTwUgTyOF0GVljYD08p9X/Lbr9MweSV3V0= github.com/bytedance/sonic v1.10.0-rc3/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4= github.com/campoy/embedmd v1.0.0 h1:V4kI2qTJJLf4J29RzI/MAt2c3Bl4dQSYPuflzwFH2hY= -github.com/campoy/embedmd v1.0.0/go.mod h1:oxyr9RCiSXg0M3VJ3ks0UGfp98BpSSGr0kpiX3MzVl8= +github.com/checkpoint-restore/go-criu/v4 v4.1.0 h1:WW2B2uxx9KWF6bGlHqhm8Okiafwwx7Y2kcpn8lCpjgo= +github.com/checkpoint-restore/go-criu/v5 v5.0.0 h1:TW8f/UvntYoVDMN1K2HlT82qH1rb0sOjpGw3m6Ym+i4= github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0= github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA= github.com/chenzhuoyu/iasm v0.9.0 h1:9fhXjVzq5hUy2gkhhgHl95zG2cEAhw9OSGs8toWWAwo= @@ -664,6 +684,7 @@ github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJ github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe h1:QQ3GSy+MqSHxm/d8nCtnAiZdYFd45cYZPs8vOOIYKfk= github.com/cncf/xds/go v0.0.0-20240723142845-024c85f92f20/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c h1:2zRrJWIt/f9c9HhNHAgrRgq0San5gRRUJTBXLkchal0= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y= github.com/cockroachdb/datadriven v1.0.2 h1:H9MtNqVoVhvd9nCBwOyDjUEdZCREqbIdCJD93PBm/jA= github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd h1:qMd81Ts1T2OTKmB4acZcyKaMtRnY5Y44NuXGX2GFJ1w= @@ -672,17 +693,44 @@ github.com/coder/quartz v0.1.0 h1:cLL+0g5l7xTf6ordRnUMMiZtRE8Sq5LxpghS63vEXrQ= github.com/coder/quartz v0.1.0/go.mod h1:vsiCc+AHViMKH2CQpGIpFgdHIEQsxwm8yCscqKmzbRA= github.com/coder/websocket v1.8.12 h1:5bUXkEPPIbewrnkU8LTCLVaxi4N4J8ahufH2vlo4NAo= github.com/coder/websocket v1.8.12/go.mod h1:LNVeNrXQZfe5qhS9ALED3uA+l5pPqvwXg3CKoDBB2gs= +github.com/containerd/aufs v1.0.0 h1:2oeJiwX5HstO7shSrPZjrohJZLzK36wvpdmzDRkL/LY= +github.com/containerd/btrfs v1.0.0 h1:osn1exbzdub9L5SouXO5swW4ea/xVdJZ3wokxN5GrnA= +github.com/containerd/cgroups v1.0.4 h1:jN/mbWBEaz+T1pi5OFtnkQ+8qnmEbAr1Oo1FRm5B0dA= +github.com/containerd/cgroups v1.0.4/go.mod h1:nLNQtsF7Sl2HxNebu77i1R0oDlhiTG+kO4JTrUzo6IA= github.com/containerd/cgroups/v3 v3.0.3 h1:S5ByHZ/h9PMe5IOQoN7E+nMc2UcLEM/V48DGDJ9kip0= github.com/containerd/cgroups/v3 v3.0.3/go.mod h1:8HBe7V3aWGLFPd/k03swSIsGjZhHI2WzJmticMgVuz0= +github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw= +github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= github.com/containerd/containerd v1.6.18 h1:qZbsLvmyu+Vlty0/Ex5xc0z2YtKpIsb5n45mAMI+2Ns= github.com/containerd/containerd v1.6.18/go.mod h1:1RdCUu95+gc2v9t3IL+zIlpClSmew7/0YS8O5eQZrOw= +github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/containerd/fifo v1.1.0 h1:4I2mbh5stb1u6ycIABlBw9zgtlK8viPI9QkQNRQEEmY= github.com/containerd/fifo v1.1.0/go.mod h1:bmC4NWMbXlt2EZ0Hc7Fx7QzTFxgPID13eH0Qu+MAb2o= +github.com/containerd/go-cni v1.1.6 h1:el5WPymG5nRRLQF1EfB97FWob4Tdc8INg8RZMaXWZlo= +github.com/containerd/go-cni v1.1.6/go.mod h1:BWtoWl5ghVymxu6MBjg79W9NZrCRyHIdUtk4cauMe34= +github.com/containerd/go-runc v1.0.0 h1:oU+lLv1ULm5taqgV/CJivypVODI4SUz1znWjv3nNYS0= +github.com/containerd/imgcrypt v1.1.4 h1:iKTstFebwy3Ak5UF0RHSeuCTahC5OIrPJa6vjMAM81s= +github.com/containerd/imgcrypt v1.1.4/go.mod h1:LorQnPtzL/T0IyCeftcsMEO7AqxUDbdO8j/tSUpgxvo= +github.com/containerd/nri v0.1.0 h1:6QioHRlThlKh2RkRTR4kIT3PKAcrLo3gIWnjkM4dQmQ= +github.com/containerd/ttrpc v1.1.0 h1:GbtyLRxb0gOLR0TYQWt3O6B0NvT8tMdorEHqIQo/lWI= +github.com/containerd/typeurl v1.0.2 h1:Chlt8zIieDbzQFzXzAeBEF92KhExuE4p9p92/QmY7aY= +github.com/containerd/zfs v1.0.0 h1:cXLJbx+4Jj7rNsTiqVfm6i+RNLx6FFA2fMmDlEf+Wm8= +github.com/containernetworking/cni v1.1.1 h1:ky20T7c0MvKvbMOwS/FrlbNwjEoqJEUUYfsL4b0mc4k= +github.com/containernetworking/cni v1.1.1/go.mod h1:sDpYKmGVENF3s6uvMvGgldDWeG8dMxakj/u+i9ht9vw= +github.com/containernetworking/plugins v1.1.1 h1:+AGfFigZ5TiQH00vhR8qPeSatj53eNGz0C1d3wVYlHE= +github.com/containernetworking/plugins v1.1.1/go.mod h1:Sr5TH/eBsGLXK/h71HeLfX19sZPp3ry5uHSkI4LPxV8= +github.com/containers/ocicrypt v1.1.3 h1:uMxn2wTb4nDR7GqG3rnZSfpJXqWURfzZ7nKydzIeKpA= +github.com/containers/ocicrypt v1.1.3/go.mod h1:xpdkbVAuaH3WzbEabUd5yDsl9SwJA5pABH85425Es2g= +github.com/coreos/bbolt v1.3.2 h1:wZwiHHUieZCquLkDL0B8UhzreNWsPHooDAG3q34zk0s= github.com/coreos/etcd v3.3.27+incompatible h1:QIudLb9KeBsE5zyYxd1mjzRSkzLg9Wf9QlRwFgd6oTA= github.com/coreos/etcd v3.3.27+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible h1:bXhRBIXoTm9BYHS3gE0TtQuyNZyeEMux2sDi4oo5YOo= +github.com/coreos/go-iptables v0.5.0 h1:mw6SAibtHKZcNzAsOxjoHIG0gy5YFHhypWSSNc6EjbQ= github.com/coreos/go-oidc v2.2.1+incompatible h1:mh48q/BqXqgjVHpy2ZY7WnWAbenxRjsz9N1i1YxjHAk= github.com/coreos/go-oidc v2.2.1+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= +github.com/coreos/go-oidc/v3 v3.9.0 h1:0J/ogVOd4y8P0f0xUh8l9t07xRP/d8tccvjHl2dcsSo= +github.com/coreos/go-oidc/v3 v3.9.0/go.mod h1:rTKz2PYwftcrtoCzV5g5kvfJoWcm0Mk8AF8y1iAQro4= github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf h1:iW4rZ826su+pqaw19uhpSCzhj44qo35pNgKFGqzDKkU= github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20220810130054-c7d1c02cb6cf h1:GOPo6vn/vTN+3IwZBvXX0y5doJfSC7My0cdzelyOCsQ= @@ -692,12 +740,13 @@ github.com/couchbase/ghistogram v0.1.0/go.mod h1:s1Jhy76zqfEecpNWJfWUiKZookAFaiG github.com/couchbase/moss v0.2.0 h1:VCYrMzFwEryyhRSeI+/b3tRBSeTpi/8gn5Kf6dxqn+o= github.com/couchbase/moss v0.2.0/go.mod h1:9MaHIaRuy9pvLPUJxB8sh8OrLfyDczECVL37grCIubs= github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= -github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= -github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= +github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creasty/defaults v1.8.0 h1:z27FJxCAa0JKt3utc0sCImAEb+spPucmKoOdLHvHYKk= github.com/creasty/defaults v1.8.0/go.mod h1:iGzKe6pbEHnpMPtfDXZEr0NVxWnPTjb1bbDy08fPzYM= github.com/crewjam/httperr v0.2.0 h1:b2BfXR8U3AlIHwNeFFvZ+BV1LFvKLlzMjzaTnZMybNo= github.com/crewjam/httperr v0.2.0/go.mod h1:Jlz+Sg/XqBQhyMjdDiC+GNNRzZTD7x39Gu3pglZ5oH4= +github.com/cristalhq/acmd v0.12.0 h1:RdlKnxjN+txbQosg8p/TRNZ+J1Rdne43MVQZ1zDhGWk= +github.com/cristalhq/acmd v0.12.0/go.mod h1:LG5oa43pE/BbxtfMoImHCQN++0Su7dzipdgBjMCBVDQ= github.com/cristalhq/hedgedhttp v0.9.1 h1:g68L9cf8uUyQKQJwciD0A1Vgbsz+QgCjuB1I8FAsCDs= github.com/cristalhq/hedgedhttp v0.9.1/go.mod h1:XkqWU6qVMutbhW68NnzjWrGtH8NUx1UfYqGYtHVKIsI= github.com/cucumber/gherkin/go/v26 v26.2.0 h1:EgIjePLWiPeslwIWmNQ3XHcypPsWAHoMCz/YEBKP4GI= @@ -706,6 +755,7 @@ github.com/cucumber/godog v0.15.0 h1:51AL8lBXF3f0cyA5CV4TnJFCTHpgiy+1x1Hb3TtZUmo github.com/cucumber/godog v0.15.0/go.mod h1:FX3rzIDybWABU4kuIXLZ/qtqEe1Ac5RdXmqvACJOces= github.com/cucumber/messages/go/v21 v21.0.1 h1:wzA0LxwjlWQYZd32VTlAVDTkW6inOFmSM+RuOwHZiMI= github.com/cucumber/messages/go/v21 v21.0.1/go.mod h1:zheH/2HS9JLVFukdrsPWoPdmUtmYQAQPLk7w5vWsk5s= +github.com/cyphar/filepath-securejoin v0.2.2 h1:jCwT2GTP+PY5nBz3c/YL5PAIbusElVrPujOBSCj8xRg= github.com/cznic/b v0.0.0-20180115125044-35e9bbe41f07 h1:UHFGPvSxX4C4YBApSPvmUfL8tTvWLj2ryqvT9K4Jcuk= github.com/cznic/fileutil v0.0.0-20180108211300-6a051e75936f h1:7uSNgsgcarNk4oiN/nNkO0J7KAjlsF5Yv5Gf/tFdHas= github.com/cznic/golex v0.0.0-20170803123110-4ab7c5e190e4 h1:CVAqftqbj+exlab+8KJQrE+kNIVlQfJt58j4GxCMF1s= @@ -716,6 +766,10 @@ github.com/cznic/ql v1.2.0 h1:lcKp95ZtdF0XkWhGnVIXGF8dVD2X+ClS08tglKtf+ak= github.com/cznic/sortutil v0.0.0-20150617083342-4c7342852e65 h1:hxuZop6tSoOi0sxFzoGGYdRqNrPubyaIf9KoBG9tPiE= github.com/cznic/strutil v0.0.0-20171016134553-529a34b1c186 h1:0rkFMAbn5KBKNpJyHQ6Prb95vIKanmAe62KxsrN+sqA= github.com/cznic/zappy v0.0.0-20160723133515-2533cb5b45cc h1:YKKpTb2BrXN2GYyGaygIdis1vXbE7SSAG9axGWIMClg= +github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c h1:Xo2rK1pzOm0jO6abTPIQwbAmqBIOj132otexc1mmzFc= +github.com/d2g/dhcp4client v1.0.0 h1:suYBsYZIkSlUMEz4TAYCczKf62IA2UWC+O8+KtdOhCo= +github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5 h1:+CpLbZIeUn94m02LdEKPcgErLJ347NUwxPKs5u8ieiY= +github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4 h1:itqmmf1PFpC4n5JW+j4BU7X4MTfVurhYRTjODoPb2Y8= github.com/d4l3k/messagediff v1.2.1 h1:ZcAIMYsUg0EAp9X+tt8/enBE/Q8Yd5kzPynLyKptt9U= github.com/d4l3k/messagediff v1.2.1/go.mod h1:Oozbb1TVXFac9FtSIxHBMnBCq2qeH/2KkEQxENCrlLo= github.com/dave/astrid v0.0.0-20170323122508-8c2895878b14 h1:YI1gOOdmMk3xodBao7fehcvoZsEeOyy/cfhlpCSPgM4= @@ -732,9 +786,9 @@ github.com/dave/patsy v0.0.0-20210517141501-957256f50cba h1:1o36L4EKbZzazMk8iGC4 github.com/dave/patsy v0.0.0-20210517141501-957256f50cba/go.mod h1:qfR88CgEGLoiqDaE+xxDCi5QA5v4vUoW0UCX2Nd5Tlc= github.com/dave/rebecca v0.9.1 h1:jxVfdOxRirbXL28vXMvUvJ1in3djwkVKXCq339qhBL0= github.com/dave/rebecca v0.9.1/go.mod h1:N6XYdMD/OKw3lkF3ywh8Z6wPGuwNFDNtWYEMFWEmXBA= -github.com/dchest/uniuri v1.2.0 h1:koIcOUdrTIivZgSLhHQvKgqdWZq5d7KdMEWF1Ud6+5g= -github.com/dchest/uniuri v1.2.0/go.mod h1:fSzm4SLHzNZvWLvWJew423PhAzkpNQYq+uNLq4kxhkY= github.com/denisenkom/go-mssqldb v0.0.0-20190515213511-eb9f6a1743f3 h1:tkum0XDgfR0jcVVXuTsYv/erY2NnEDqwRojbxR1rBYA= +github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba h1:p6poVbjHDkKa+wtC8frBMwQtT3BmqGYBjzMwJ63tuR4= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgryski/go-sip13 v0.0.0-20190329191031-25c5027a8c7b h1:Yqiad0+sloMPdd/0Fg22actpFx0dekpzt1xJmVNVkU0= github.com/dhui/dktest v0.3.0 h1:kwX5a7EkLcjo7VpsPQSYJcKGbXBXdjI9FGjuUj1jn6I= github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi/U= @@ -744,21 +798,18 @@ github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= -github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= github.com/docker/go-plugins-helpers v0.0.0-20240701071450-45e2431495c8 h1:IMfrF5LCzP2Vhw7j4IIH3HxPsCLuZYjDqFAM/C88ulg= github.com/docker/go-plugins-helpers v0.0.0-20240701071450-45e2431495c8/go.mod h1:LFyLie6XcDbyKGeVK6bHe+9aJTYCxWLBg5IrJZOaXKA= +github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1 h1:ZClxb8laGDf5arXfYcAtECDFgAgHklGI8CxgjHnXKJ4= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96 h1:cenwrSVm+Z7QLSV/BsnenAOcDXdX4cMv4wP0B/5QbPg= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815 h1:bWDMxwH3px2JBh6AyO7hdCn/PkvCZXii8TGj7sbtEbQ= github.com/dolthub/sqllogictest/go v0.0.0-20201107003712-816f3ae12d81 h1:7/v8q9XGFa6q5Ap4Z/OhNkAMBaK5YeuEzwJt+NZdhiE= github.com/dolthub/sqllogictest/go v0.0.0-20201107003712-816f3ae12d81/go.mod h1:siLfyv2c92W1eN/R4QqG/+RjjX5W2+gCTRjZxBjI3TY= github.com/dolthub/swiss v0.2.1 h1:gs2osYs5SJkAaH5/ggVJqXQxRXtWshF6uE0lgR/Y3Gw= github.com/dolthub/swiss v0.2.1/go.mod h1:8AhKZZ1HK7g18j7v7k6c5cYIGEZJcPn0ARsai8cUrh0= -github.com/drone/funcmap v0.0.0-20220929084810-72602997d16f h1:/jEs7lulqVO2u1+XI5rW4oFwIIusxuDOVKD9PAzlW2E= -github.com/drone/funcmap v0.0.0-20220929084810-72602997d16f/go.mod h1:nDRkX7PHq+p39AD5/usv3KZMerxZTYU/9rfLS5IDspU= -github.com/drone/signal v1.0.0 h1:NrnM2M/4yAuU/tXs6RP1a1ZfxnaHwYkd0kJurA1p6uI= github.com/dvyukov/go-fuzz v0.0.0-20210103155950-6a8e9d1f2415 h1:q1oJaUPdmpDm/VyXosjgPgr6wS7c5iV2p0PwJD73bUI= github.com/dvyukov/go-fuzz v0.0.0-20210103155950-6a8e9d1f2415/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= github.com/eapache/go-resiliency v1.6.0 h1:CqGDTLtpwuWKn6Nj3uNUdflaq+/kIPsg0gfNzHton30= @@ -777,8 +828,11 @@ github.com/elastic/go-windows v1.0.1/go.mod h1:FoVvqWSun28vaDQPbj2Elfc0JahhPB7WQ github.com/elazarl/goproxy v1.3.0/go.mod h1:X/5W/t+gzDyLfHW4DrMdpjqYjpXsURlBt9lpBDxZZZQ= github.com/elazarl/goproxy v1.7.1/go.mod h1:82vkLNir0ALaW14Rc399OTTjyNREgmdL2cVoIbS6XaE= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633 h1:H2pdYOb3KQ1/YsqVWoWNLQO+fusocsw354rqGTZtAgw= +github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk= +github.com/emicklei/proto v1.10.0/go.mod h1:rn1FgRS/FANiZdD2djyH7TMA9jdRDcYQ9IEN9yvjX0A= github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/envoyproxy/protoc-gen-validate v1.1.0/go.mod h1:sXRDRVmzEbkM7CVcM06s9shE/m23dg3wzjl0UWqJ2q4= +github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= @@ -793,8 +847,10 @@ github.com/fogleman/gg v1.3.0 h1:/7zJX8F6AaYQc57WQCyN9cAIz+4bCJGO9B+dyW29am8= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fsouza/fake-gcs-server v1.7.0 h1:Un0BXUXrRWYSmYyC1Rqm2e2WJfTPyDy/HGMz31emTi8= +github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa h1:RDBNVkRviHZtvDvId8XSGPu3rmpmSe+wKRcEWNgsfWU= github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0= github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk= +github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7 h1:LofdAjjjqCSXMwLGgOgnE+rdPuvX9DxCqaHwKy7i/ko= github.com/getkin/kin-openapi v0.126.0 h1:c2cSgLnAsS0xYfKsgt5oBV6MYRM/giU8/RtwUY4wyfY= github.com/getkin/kin-openapi v0.126.0/go.mod h1:7mONz8IwmSRg6RttPu6v8U/OJ+gr+J99qSFNjPGSQqw= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= @@ -837,6 +893,8 @@ github.com/go-playground/validator/v10 v10.19.0 h1:ol+5Fu+cSq9JD7SoSqe04GMI92cbn github.com/go-playground/validator/v10 v10.19.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= +github.com/go-swagger/scan-repo-boundary v0.0.0-20180623220736-973b3573c013 h1:l9rI6sNaZgNC0LnF3MiE+qTmyBA/tZAg1rtyrGbUMK0= +github.com/go-swagger/scan-repo-boundary v0.0.0-20180623220736-973b3573c013/go.mod h1:b65mBPzqzZWxOZGxSWrqs4GInLIn+u99Q9q7p+GKni0= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= @@ -848,7 +906,10 @@ github.com/gocql/gocql v0.0.0-20200526081602-cd04bd7f22a7 h1:TvUE5vjfoa7fFHMlmGO github.com/gocql/gocql v0.0.0-20200526081602-cd04bd7f22a7/go.mod h1:DL0ekTmBSTdlNF25Orwt/JMzqIq3EJ4MVa/J/uK64OY= github.com/gocraft/dbr/v2 v2.7.2 h1:ccUxMuz6RdZvD7VPhMRRMSS/ECF3gytPhPtcavjktHk= github.com/gocraft/dbr/v2 v2.7.2/go.mod h1:5bCqyIXO5fYn3jEp/L06QF4K1siFdhxChMjdNu6YJrg= +github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e h1:BWhy2j3IXJhjCbC68FptL43tDKIq8FladmaTs3Xs7Z8= github.com/godbus/dbus/v5 v5.0.4 h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA= +github.com/godbus/dbus/v5 v5.0.6 h1:mkgN1ofwASrYnJ5W6U/BxG15eXXXjirgZc7CLqkcaro= +github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= @@ -862,21 +923,18 @@ github.com/gomodule/redigo v1.8.9/go.mod h1:7ArFNvsTjH8GMMzB4uy1snslv2BwmginuMs0 github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/cel-go v0.22.0/go.mod h1:BuznPXXfQDpXKWQ9sPW3TzlAJN5zzFe+i9tIs0yC4s8= +github.com/google/generative-ai-go v0.18.0 h1:6ybg9vOCLcI/UpBBYXOTVgvKmcUKFRNj+2Cj3GnebSo= +github.com/google/generative-ai-go v0.18.0/go.mod h1:JYolL13VG7j79kM5BtHz4qwONHkeJQzOCkKXnpqtS/E= github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY= -github.com/google/go-jsonnet v0.18.0 h1:/6pTy6g+Jh1a1I2UMoAODkqELFiVIdOxbNwv0DDzoOg= -github.com/google/go-jsonnet v0.18.0/go.mod h1:C3fTzyVJDslXdiTqw/bTFk7vSGyCtH3MGRbDfvEwGd0= github.com/google/go-pkcs11 v0.3.0 h1:PVRnTgtArZ3QQqTGtbtjtnIkzl2iY2kt24yqbrf7td8= github.com/google/go-pkcs11 v0.3.0/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY= github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= -github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= github.com/google/renameio/v2 v2.0.0 h1:UifI23ZTGY8Tt29JbYFiuyIU3eX+RNFtUwefq9qAhxg= github.com/google/renameio/v2 v2.0.0/go.mod h1:BtmJXm5YlszgC+TD4HOEEUFgkJP3nLxehU6hfe7jRt4= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/s2a-go v0.1.8/go.mod h1:6iNWHTpQ+nfNRN5E00MSdfDwVesa8hhS32PhPO8deJA= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/googleapis/cloud-bigtable-clients-test v0.0.2 h1:S+sCHWAiAc+urcEnvg5JYJUOdlQEm/SEzQ/c/IdAH5M= github.com/googleapis/cloud-bigtable-clients-test v0.0.2/go.mod h1:mk3CrkrouRgtnhID6UZQDK3DrFFa7cYCAJcEmNsHYrY= github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= @@ -885,16 +943,18 @@ github.com/googleapis/gax-go/v2 v2.12.3/go.mod h1:AKloxT6GtNbaLm8QTNSidHUVsHYcBH github.com/googleapis/gax-go/v2 v2.13.0/go.mod h1:Z/fvTZXF8/uw7Xu5GuslPw+bplx6SS338j1Is2S+B7A= github.com/googleapis/gax-go/v2 v2.14.0/go.mod h1:lhBCnjdLrWRaPvLWhmc8IS24m9mr07qSYnHncrgo+zk= github.com/googleapis/gnostic v0.3.0 h1:CcQijm0XKekKjP/YCz28LXVSpgguuB+nCxaSjCe09y0= +github.com/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I= github.com/googleapis/go-type-adapters v1.0.0 h1:9XdMn+d/G57qq1s8dNc5IesGCXHf6V2HZ2JwRxfA2tA= github.com/googleapis/google-cloud-go-testing v0.0.0-20210719221736-1c9a4c676720 h1:zC34cGQu69FG7qzJ3WiKW244WfhDC3xxYMeNOX2gtUQ= github.com/googleapis/google-cloud-go-testing v0.0.0-20210719221736-1c9a4c676720/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/gookit/color v1.5.4 h1:FZmqs7XOyGgCAxmWyPslpiok1k05wmY3SJTytgvYFs0= +github.com/gookit/color v1.5.4/go.mod h1:pZJOeOS8DM43rXbp4AZo1n9zCU2qjpcRko0b6/QJi9w= github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grafana/alerting v0.0.0-20250129195454-3e5b80036b7a/go.mod h1:QsnoKX/iYZxA4Cv+H+wC7uxutBD8qi8ZW5UJvD2TYmU= github.com/grafana/authlib v0.0.0-20250123104008-e99947858901/go.mod h1:/gYfphsNu9v1qYWXxpv1NSvMEMSwvdf8qb8YlgwIRl8= @@ -932,12 +992,15 @@ github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 h1 github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed h1:5upAirOpQc1Q53c0bnx2ufif5kANL7bfZWcc6VJWJd8= github.com/hamba/avro/v2 v2.27.0 h1:IAM4lQ0VzUIKBuo4qlAiLKfqALSrFC+zi1iseTtbBKU= github.com/hamba/avro/v2 v2.27.0/go.mod h1:jN209lopfllfrz7IGoZErlDz+AyUJ3vrBePQFZwYf5I= +github.com/hashicorp/consul/api v1.28.2/go.mod h1:KyzqzgMEya+IZPcD65YFoOVAgPpbfERu4I/tzG6/ueE= github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-memdb v1.3.4 h1:XSL3NR682X/cVk2IeV0d70N4DZ9ljI885xAEU8IoK3c= github.com/hashicorp/go-memdb v1.3.4/go.mod h1:uBTr1oQbtuMgd1SSGoR8YV27eT3sBHbYiNm53bMpgSg= github.com/hashicorp/go-msgpack/v2 v2.1.1 h1:xQEY9yB2wnHitoSzk/B9UjXWRQ67QKu5AOm8aFp8N3I= github.com/hashicorp/go-msgpack/v2 v2.1.1/go.mod h1:upybraOAblm4S7rx0+jeNy+CWWhzywQsSRV5033mMu4= github.com/hashicorp/go-plugin v1.6.2/go.mod h1:CkgLQ5CZqNmdL9U9JzM532t8ZiYQ35+pj3b1FD37R0Q= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= github.com/hashicorp/go-syslog v1.0.0 h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE= github.com/hashicorp/go.net v0.0.1 h1:sNCoNyDEvN1xa+X0baata4RdcpKwcMS6DH+xwfqPgjw= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= @@ -960,14 +1023,15 @@ github.com/influxdata/tdigest v0.0.2-0.20210216194612-fc98d27c9e8b h1:i44CesU68Z github.com/influxdata/tdigest v0.0.2-0.20210216194612-fc98d27c9e8b/go.mod h1:Z0kXnxzbTC2qrx4NaIzYkE1k66+6oEDQTvL95hQFh5Y= github.com/influxdata/telegraf v1.16.3 h1:x0qeuSGGMg5y+YqP/5ZHwXZu3bcBrO8AAQOTNlYEb1c= github.com/influxdata/telegraf v1.16.3/go.mod h1:fX/6k7qpIqzVPWyeIamb0wN5hbwc0ANUaTS80lPYFB8= +github.com/intel/goresctrl v0.2.0 h1:JyZjdMQu9Kl/wLXe9xA6s1X+tF6BWsQPFGJMEeCfWzE= +github.com/intel/goresctrl v0.2.0/go.mod h1:+CZdzouYFn5EsxgqAQTEzMfwKwuc0fVdMrT9FCCAVRQ= github.com/invopop/jsonschema v0.12.0/go.mod h1:ffZ5Km5SWWRAIN6wbDXItl95euhFz2uON45H2qjYt+0= github.com/iris-contrib/schema v0.0.6 h1:CPSBLyx2e91H2yJzPuhGuifVRnZBBJ3pCOMbOvPZaTw= github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA= +github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56 h1:742eGXur0715JMq73aD95/FU0XpVKXqNuTnEfXsLOYQ= github.com/jackc/fake v0.0.0-20150926172116-812a484cc733 h1:vr3AYkKovP8uR8AvSGGUK1IDqRa5lAAvEkZG1LKaCRc= github.com/jackc/pgx v3.2.0+incompatible h1:0Vihzu20St42/UDsvZGdNE6jak7oi/UOeMzwMPHkgFY= github.com/jackc/pgx/v5 v5.7.1/go.mod h1:e7O26IywZZ+naJtWWos6i6fvWK+29etgITqrqHLfoZA= -github.com/jackspirou/syscerts v0.0.0-20160531025014-b68f5469dff1 h1:9Xm8CKtMZIXgcopfdWk/qZ1rt0HjMgfMR9nxxSeK6vk= -github.com/jackspirou/syscerts v0.0.0-20160531025014-b68f5469dff1/go.mod h1:zuHl3Hh+e9P6gmBPvcqR1HjkaWHC/csgyskg6IaFKFo= github.com/jaegertracing/jaeger v1.57.0 h1:3wDtUUPs6NRYH7+d+y8MilDkLHdpPrVlQ2wbcsA62bs= github.com/jaegertracing/jaeger v1.57.0/go.mod h1:p/1fxIU9hKHl7qEhKC72p2ZYVhvvZvNB73y6V7YyuTs= github.com/jedib0t/go-pretty/v6 v6.2.4 h1:wdaj2KHD2W+mz8JgJ/Q6L/T5dB7kyqEFI16eLq7GEmk= @@ -979,8 +1043,6 @@ github.com/jhump/gopoet v0.1.0 h1:gYjOPnzHd2nzB37xYQZxj4EIQNpBrBskRqQQ3q4ZgSg= github.com/jhump/goprotoc v0.5.0 h1:Y1UgUX+txUznfqcGdDef8ZOVlyQvnV0pKWZH08RmZuo= github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 h1:rp+c0RAYOWj8l6qbCUTSiRLG/iKnW3K3/QfPPuSsBt4= github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= -github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= -github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/jon-whit/go-grpc-prometheus v1.4.0 h1:/wmpGDJcLXuEjXryWhVYEGt9YBRhtLwFEN7T+Flr8sw= github.com/jon-whit/go-grpc-prometheus v1.4.0/go.mod h1:iTPm+Iuhh3IIqR0iGZ91JJEg5ax6YQEe1I0f6vtBuao= github.com/joncrlsn/dque v0.0.0-20211108142734-c2ef48c5192a h1:sfe532Ipn7GX0V6mHdynBk393rDmqgI0QmjLK7ct7TU= @@ -1011,6 +1073,7 @@ github.com/kevinmbeaulieu/eq-go v1.0.0/go.mod h1:G3S8ajA56gKBZm4UB9AOyoOS37JO3ro github.com/kisielk/errcheck v1.5.0 h1:e8esj/e4R+SAOwFwN+n3zr0nYeCyeweozKfO23MvHzY= github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/sqlstruct v0.0.0-20201105191214-5f3e10d3ab46 h1:veS9QfglfvqAw2e+eeNT/SbGySq8ajECXJ9e4fPoLhY= +github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid v1.3.1 h1:5JNjFYYQrZeKRJ0734q51WCEEn2huer72Dc7K+R/b6s= @@ -1046,35 +1109,54 @@ github.com/lyft/protoc-gen-star/v2 v2.0.4-0.20230330145011-496ad1ac90a4 h1:sIXJO github.com/lyft/protoc-gen-star/v2 v2.0.4-0.20230330145011-496ad1ac90a4/go.mod h1:amey7yeodaJhXSbf/TlLvWiqQfLOSpEk//mLlc+axEk= github.com/mailgun/raymond/v2 v2.0.48 h1:5dmlB680ZkFG2RN/0lvTAghrSxIESeu9/2aeDqACtjw= github.com/mailgun/raymond/v2 v2.0.48/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNfj4KA0W54Z18= +github.com/marstr/guid v1.1.0 h1:/M4H/1G4avsieL6BbUwCOBzulmoeKVP5ux/3mQNnbyI= github.com/matryer/moq v0.3.3 h1:pScMH9VyrdT4S93yiLpVyU8rCDqGQr24uOyBxmktG5Q= github.com/matryer/moq v0.3.3/go.mod h1:RJ75ZZZD71hejp39j4crZLsEDszGk6iH4v4YsWFKH4s= github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-shellwords v1.0.3 h1:K/VxK7SZ+cvuPgFSLKi5QPI9Vr/ipOf4C1gN+ntueUk= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= github.com/mfridman/xflag v0.1.0 h1:TWZrZwG1QklFX5S4j1vxfF1sZbZeZSGofMwPMLAF29M= github.com/mfridman/xflag v0.1.0/go.mod h1:/483ywM5ZO5SuMVjrIGquYNE5CzLrj5Ux/LxWWnjRaE= +github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517 h1:zpIH83+oKzcpryru8ceC6BxnoG8TBrhgAvRg8obzup0= +github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= github.com/microcosm-cc/bluemonday v1.0.25 h1:4NEwSfiJ+Wva0VxN5B8OwMicaJvD8r9tlJWm9rtloEg= github.com/microcosm-cc/bluemonday v1.0.25/go.mod h1:ZIOjCQp1OrzBBPIJmfX4qDYFuhU02nx4bn030ixfHLE= github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= +github.com/miekg/pkcs11 v1.1.1 h1:Ugu9pdy6vAYku5DEpVWVFPYnzV+bxB+iRdbuFSu7TvU= +github.com/miekg/pkcs11 v1.1.1/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/minio/sha256-simd v0.1.1 h1:5QHSlgo3nt5yKOJrC7W8w7X+NFl8cMPZm96iu8kKUJU= github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= +github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible h1:aKW/4cBs+yK6gpqU3K/oIwk9Q/XICqd3zOX/UFuvqmk= github.com/mitchellh/cli v1.1.5 h1:OxRIeJXpAMztws/XHlN2vu6imG5Dpq+j61AzAX5fLng= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= +github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= +github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= +github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/gox v0.4.0 h1:lfGJxY7ToLJQjHHwi0EX6uYBdK78egf954SQl13PQJc= github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY= +github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f h1:2+myh5ml7lgEU/51gbeLHfKGNfgEQQIWrlbdaOsidbQ= github.com/mithrandie/readline-csvq v1.3.0 h1:VTJEOGouJ8j27jJCD4kBBbNTxM0OdBvE1aY1tMhlqE8= github.com/mithrandie/readline-csvq v1.3.0/go.mod h1:FKyYqDgf/G4SNov7SMFXRWO6LQLXIOeTog/NB97FZl0= +github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= +github.com/moby/sys/mountinfo v0.5.0 h1:2Ks8/r6lopsxWi9m58nlwjaeSzUX9iiL1vj5qB/9ObI= +github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= +github.com/moby/sys/signal v0.6.0 h1:aDpY94H8VlhTGa9sNYUFCFsMZIUh5wm0B6XkIoJj/iY= +github.com/moby/sys/signal v0.6.0/go.mod h1:GQ6ObYZfqacOwTtlXvcmh9A26dVRul/hbOZn88Kg8Tg= +github.com/moby/sys/symlink v0.2.0 h1:tk1rOM+Ljp0nFmfOIBtlV3rTDlWOwFRhjEeAhZB0nZc= +github.com/moby/sys/symlink v0.2.0/go.mod h1:7uZVF2dqJjG/NsClqul95CqKOBRQyYSNnJ6BMgR/gFs= github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= github.com/montanaflynn/stats v0.7.1 h1:etflOAAHORrCC44V+aR6Ftzort912ZU+YLiSTuV8eaE= github.com/montanaflynn/stats v0.7.1/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= github.com/mostynb/go-grpc-compression v1.2.3 h1:42/BKWMy0KEJGSdWvzqIyOZ95YcR9mLPqKctH7Uo//I= github.com/mostynb/go-grpc-compression v1.2.3/go.mod h1:AghIxF3P57umzqM9yz795+y1Vjs47Km/Y2FE6ouQ7Lg= +github.com/mozilla/tls-observatory v0.0.0-20210609171429-7bc42856d2e5 h1:0KqC6/sLy7fDpBdybhVkkv4Yz+PmB7c9Dz9z3dLW804= +github.com/mozilla/tls-observatory v0.0.0-20210609171429-7bc42856d2e5/go.mod h1:FUqVoUPHSEdDR0MnFM3Dh8AU0pZHLXUD127SAJGER/s= +github.com/mrunalp/fileutils v0.5.0 h1:NKzVxiH7eSk+OQ4M+ZYW1K6h27RUV3MI6NUTsHhU6Z4= github.com/nakagami/firebirdsql v0.0.0-20190310045651-3c02a58cfed8 h1:P48LjvUQpTReR3TQRbxSeSBsMXzfK0uol7eRcr7VBYQ= -github.com/natessilva/dag v0.0.0-20180124060714-7194b8dcc5c4 h1:dnMxwus89s86tI8rcGVp2HwZzlz7c5o92VOy7dSckBQ= github.com/nats-io/nats.go v1.34.0 h1:fnxnPCNiwIG5w08rlMcEKTUw4AV/nKyGCOJE8TdhSPk= github.com/nats-io/nats.go v1.34.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8= github.com/nats-io/nkeys v0.4.7 h1:RwNJbbIdYCoClSDNY7QVKZlyb/wfT6ugvFCiKy6vDvI= @@ -1089,7 +1171,6 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWb github.com/nsf/jsondiff v0.0.0-20230430225905-43f6cf3098c1 h1:dOYG7LS/WK00RWZc8XGgcUTlTxpp3mKhdR2Q9z9HbXM= github.com/nsf/jsondiff v0.0.0-20230430225905-43f6cf3098c1/go.mod h1:mpRZBD8SJ55OIICQ3iWH0Yz3cjzA61JdqMLoWXeB2+8= github.com/onsi/ginkgo/v2 v2.20.1/go.mod h1:lG9ey2Z29hR41WMVthyJBGUBcBhGOtoPF2VFMvBXFCI= -github.com/onsi/gomega v1.34.2/go.mod h1:v1xfxRgk0KIsG+QOdm7p8UosrOzPYRo60fd3B/1Dukc= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.102.0 h1:R70PpK14trQfL/Vj5oAiGRqX09s2gOWuf6t1Ae5fevQ= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.102.0/go.mod h1:xmy/yFFmB1Epy+czrYMbA+4xeOKvhFqNqYWU6qINeis= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.102.0 h1:N3vWsp3xealy4AX8TovfHG5EKi/k7z+F/8LFP4SVAgo= @@ -1128,13 +1209,22 @@ github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusrec github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.102.0/go.mod h1:WNFjuquVqyi+WEoa6L0J3DzPLRsP24ZlbZYwKv49VwY= github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.102.0 h1:Pemo9pZa3VMYdrM/bss3f0qqVyBzPSulOBQL8VQcgN8= github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.102.0/go.mod h1:fvjAM+jOQdiXCmAENKH/eWxBBqTaImbq3lpoBI4X5Ek= +github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/runc v1.1.2 h1:2VSZwLx5k/BfsBxMMipG/LYUnmqOD/BPkIVgQUcTlLw= +github.com/opencontainers/runc v1.1.2/go.mod h1:Tj1hFw6eFWp/o33uxGf5yF2BX5yz2Z6iptFpuvbbKqc= github.com/opencontainers/runtime-spec v1.0.2 h1:UfAcuLBJB9Coz72x1hgl8O5RVzTdNiaglX6v2DM6FI0= github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 h1:3snG66yBm59tKhhSPQrQ/0bCrv1LQbKt40LnUPiUxdc= +github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39 h1:H7DMc6FAjgwZZi8BRqjrAAHWoqEr5e5L6pS4V0ezet4= +github.com/opencontainers/selinux v1.10.1 h1:09LIPVRP3uuZGQvgR+SgMSNBd1Eb3vlRbGqQpoHsF8w= +github.com/opencontainers/selinux v1.10.1/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= github.com/openfga/api/proto v0.0.0-20240905181937-3583905f61a6/go.mod h1:gil5LBD8tSdFQbUkCQdnXsoeU9kDJdJgbGdHkgJfcd0= github.com/oschwald/geoip2-golang v1.11.0 h1:hNENhCn1Uyzhf9PTmquXENiWS6AlxAEnBII6r8krA3w= github.com/oschwald/geoip2-golang v1.11.0/go.mod h1:P9zG+54KPEFOliZ29i7SeYZ/GM6tfEL+rgSn03hYuUo= github.com/oschwald/maxminddb-golang v1.13.0 h1:R8xBorY71s84yO06NgTmQvqvTvlS/bnYZrrWX1MElnU= github.com/oschwald/maxminddb-golang v1.13.0/go.mod h1:BU0z8BfFVhi1LQaonTwwGQlsHUEu9pWNdMfmq4ztm0o= +github.com/otiai10/curr v1.0.0 h1:TJIWdbX0B+kpNagQrjgq8bCMrbhiuX73M2XwgtDMoOI= +github.com/otiai10/mint v1.3.1 h1:BCmzIS3n71sGfHB5NMNDB3lHYPz8fWSkCAErHed//qc= github.com/parquet-go/parquet-go v0.23.0 h1:dyEU5oiHCtbASyItMCD2tXtT2nPmoPbKpqf0+nnGrmk= github.com/parquet-go/parquet-go v0.23.0/go.mod h1:MnwbUcFHU6uBYMymKAlPPAw9yh3kE1wWl6Gl1uLdkNk= github.com/paulmach/orb v0.11.1 h1:3koVegMC4X/WeiXYz9iswopaTwMem53NzTJuTF20JzU= @@ -1144,12 +1234,15 @@ github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2D github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30 h1:BHT1/DKsYDGkUgQ2jmMaozVcdk+sVfz0+1ZJq4zkWgw= github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g= -github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= +github.com/petar/GoLLRB v0.0.0-20130427215148-53be0d36a84c h1:AwcgVYzW1T+QuJ2fc55ceOSCiVaOpdYUNpFj9t7+n9U= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d h1:CdDQnGF8Nq9ocOS/xlSptM1N3BbrA6/kmaep5ggwaIA= +github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= github.com/phpdave11/gofpdf v1.4.2 h1:KPKiIbfwbvC/wOncwhrpRdXVj2CZTCFlw4wnoyjtHfQ= github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I= +github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A= github.com/pkg/sftp v1.13.6 h1:JFZT4XbOU7l77xGSpOdW+pwIMqP044IyjXX6FGyEKFo= github.com/pkg/sftp v1.13.6/go.mod h1:tz1ryNURKu77RL+GuCzmoJYxQczL3wLNNpPWagdg4Qk= @@ -1165,6 +1258,9 @@ github.com/prometheus/common/assets v0.2.0 h1:0P5OrzoHrYBOSM1OigWL3mY8ZvV2N4zIE/ github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/statsd_exporter v0.26.0 h1:SQl3M6suC6NWQYEzOvIv+EF6dAMYEqIuZy+o4H9F5Ig= github.com/prometheus/statsd_exporter v0.26.0/go.mod h1:GXFLADOmBTVDrHc7b04nX8ooq3azG61pnECNqT7O5DM= +github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= +github.com/quasilyte/go-ruleguard/rules v0.0.0-20211022131956-028d6511ab71 h1:CNooiryw5aisadVfzneSZPswRWvnVW8hF1bS/vo8ReI= +github.com/quasilyte/go-ruleguard/rules v0.0.0-20211022131956-028d6511ab71/go.mod h1:4cgAphtvu7Ftv7vOT2ZOYhC6CvBxZixcasr8qIOTA50= github.com/rabbitmq/amqp091-go v1.9.0 h1:qrQtyzB4H8BQgEuJwhmVQqVHB9O4+MNDJCCAcpc3Aoo= github.com/rabbitmq/amqp091-go v1.9.0/go.mod h1:+jPrT9iY2eLjRaMSRHUhc3z14E/l85kv/f+6luSD3pc= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= @@ -1178,7 +1274,9 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww= github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245 h1:K1Xf3bKttbF+koVGaX5xngRIZ5bVjbmPnaxE/dR08uY= +github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.2+incompatible h1:C89EOx/XBWwIXl8wm8OPJBd7kPF25UfsK2X7Ph/zCAk= +github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8 h1:2c1EFnZHIPCW8qKWgHMH/fX2PkSabFc5mrVzfUNdg5U= github.com/sagikazarmark/crypt v0.19.0 h1:WMyLTjHBo64UvNcWqpzY3pbZTYgnemZU8FBZigKc42E= github.com/sagikazarmark/crypt v0.19.0/go.mod h1:c6vimRziqqERhtSe0MhIvzE1w54FrCHtrXb5NH/ja78= github.com/samuel/go-zookeeper v0.0.0-20190810000440-0ceca61e4d75 h1:cA+Ubq9qEVIQhIWvP2kNuSZ2CmnfBJFSRq+kO1pu2cc= @@ -1187,20 +1285,25 @@ github.com/schollz/closestmatch v2.1.0+incompatible h1:Uel2GXEpJqOWBrlyI+oY9LTiy github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= github.com/schollz/progressbar/v3 v3.14.6 h1:GyjwcWBAf+GFDMLziwerKvpuS7ZF+mNTAXIB2aspiZs= github.com/schollz/progressbar/v3 v3.14.6/go.mod h1:Nrzpuw3Nl0srLY0VlTvC4V6RL50pcEymjy6qyJAaLa0= +github.com/seccomp/libseccomp-golang v0.9.1 h1:NJjM5DNFOs0s3kYE1WUOr6G8V97sdt46rlXTMfXGWBo= github.com/segmentio/fasthash v1.0.3 h1:EI9+KE1EwvMLBWwjpRDc+fEM+prwxDYbslddQGtrmhM= github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= github.com/shirou/gopsutil/v3 v3.24.4 h1:dEHgzZXt4LMNm+oYELpzl9YCqV65Yr/6SfrvgRBtXeU= github.com/shirou/gopsutil/v3 v3.24.4/go.mod h1:lTd2mdiOspcqLgAnr9/nGi71NkeMpWKdmhuxm9GusH8= +github.com/shirou/gopsutil/v3 v3.24.5 h1:i0t8kL+kQTvpAYToeuiVk3TgDeKOFioZO3Ztz/iZ9pI= +github.com/shirou/gopsutil/v3 v3.24.5/go.mod h1:bsoOS1aStSs9ErQ1WWfxllSeS1K5D+U30r2NfcubMVk= github.com/shirou/gopsutil/v4 v4.24.0-alpha.1 h1:lLPAdP4TpfgJ5byoc3EFwNSKZj8kCnDFHtuWTktWl0s= github.com/shirou/gopsutil/v4 v4.24.0-alpha.1/go.mod h1:GVpYUxBee6CTWux2/JslZ7fYPwqkQ8YDJSXmGAryYy4= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= +github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e h1:MZM7FHLqUHYI0Y/mQAt3d2aYa0SiNms/hFqC9qJYolM= +github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041 h1:llrF3Fs4018ePo4+G/HV/uQUqEI1HMDjCeOf2V6puPc= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= -github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad h1:fiWzISvDn0Csy5H0iwgAuJGQTUpVfEMJJd4nRFXogbc= +github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980 h1:lIOOHPEbXzO3vnmx2gok1Tfs31Q8GQqKLc8vVqyQq/I= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stoewer/parquet-cli v0.0.7 h1:rhdZODIbyMS3twr4OM3am8BPPT5pbfMcHLH93whDM5o= github.com/stoewer/parquet-cli v0.0.7/go.mod h1:bskxHdj8q3H1EmfuCqjViFoeO3NEvs5lzZAQvI8Nfjk= @@ -1208,6 +1311,8 @@ github.com/substrait-io/substrait v0.57.1 h1:GW8nnYfSowMseHR8Os82/X6lNtQGIK7p4p+ github.com/substrait-io/substrait v0.57.1/go.mod h1:q9s+tjo+gK0lsA+SqYB0lhojNuxvdPdfYlGUP0hjbrA= github.com/substrait-io/substrait-go v1.2.0 h1:3ZNRkc8FYD7ifCagKEOZQtUcgMceMQfwo2N1NGaK4Q4= github.com/substrait-io/substrait-go v1.2.0/go.mod h1:IPsy24rdjp/buXR+T8ENl6QCnSCS6h+uM8P+GaZez7c= +github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI= +github.com/tchap/go-patricia v2.2.6+incompatible h1:JvoDL7JSoIP2HDE8AbDH3zC8QBPxmzYe32HHy5yQ+Ck= github.com/tdewolff/minify/v2 v2.12.8 h1:Q2BqOTmlMjoutkuD/OPCnJUpIqrzT3nRPkw+q+KpXS0= github.com/tdewolff/minify/v2 v2.12.8/go.mod h1:YRgk7CC21LZnbuke2fmYnCTq+zhCgpb0yJACOTUNJ1E= github.com/tdewolff/parse/v2 v2.6.7 h1:WrFllrqmzAcrKHzoYgMupqgUBIfBVOb0yscFzDf8bBg= @@ -1237,10 +1342,18 @@ github.com/twmb/franz-go/plugin/kprom v1.1.0 h1:grGeIJbm4llUBF8jkDjTb/b8rKllWSXj github.com/twmb/franz-go/plugin/kprom v1.1.0/go.mod h1:cTDrPMSkyrO99LyGx3AtiwF9W6+THHjZrkDE2+TEBIU= github.com/uber-go/atomic v1.4.0 h1:yOuPqEq4ovnhEjpHmfFwsqBXDYbQeT6Nb0bwD6XnD5o= github.com/uber-go/atomic v1.4.0/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g= +github.com/ugorji/go v1.1.4 h1:j4s+tAvLfL3bZyefP2SEWmhBzmuIlH/eqNuPdFPgngw= +github.com/urfave/cli v1.22.14/go.mod h1:X0eDS6pD6Exaclxm99NJ3FiCDRED7vIHpx2mDOHLvkA= github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= +github.com/valyala/quicktemplate v1.8.0 h1:zU0tjbIqTRgKQzFY1L42zq0qR3eh4WoQQdIdqCysW5k= +github.com/valyala/quicktemplate v1.8.0/go.mod h1:qIqW8/igXt8fdrUln5kOSb+KWMaJ4Y8QUsfd1k6L2jM= github.com/vertica/vertica-sql-go v1.3.3 h1:fL+FKEAEy5ONmsvya2WH5T8bhkvY27y/Ik3ReR2T+Qw= github.com/vertica/vertica-sql-go v1.3.3/go.mod h1:jnn2GFuv+O2Jcjktb7zyc4Utlbu9YVqpHH/lx63+1M4= +github.com/vishvananda/netlink v1.1.1-0.20210330154013-f5de75959ad5 h1:+UB2BJA852UkGH42H+Oee69djmxS3ANzl2b/JtT1YiA= +github.com/vishvananda/netlink v1.1.1-0.20210330154013-f5de75959ad5/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= +github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f h1:p4VB7kIXpOQvVn1ZaTIVp+3vuYAXFe3OJEvjbUYJLaA= +github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= @@ -1265,6 +1378,8 @@ github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17 github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xhit/go-str2duration v1.2.0 h1:BcV5u025cITWxEQKGWr1URRzrcXtu7uk8+luz3Yuhwc= github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc= +github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 h1:QldyIu/L63oPpyvQmHgvgickp1Yw510KJOqX7H24mg8= +github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77 h1:ESFSdwYZvkeru3RtdrYueztKhOBCSAAzS4Gf+k0tEow= github.com/ydb-platform/ydb-go-genproto v0.0.0-20241112172322-ea1f63298f77 h1:LY6cI8cP4B9rrpTleZk95+08kl2gF4rixG7+V/dwL6Q= github.com/ydb-platform/ydb-go-genproto v0.0.0-20241112172322-ea1f63298f77/go.mod h1:Er+FePu1dNUieD+XTMDduGpQuCPssK5Q4BjF+IIXJ3I= @@ -1275,6 +1390,9 @@ github.com/yosssi/ace v0.0.5/go.mod h1:ALfIzm2vT7t5ZE7uoIZqF3TQ7SAOyupFZnkrF5id+ github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43 h1:+lm10QQTNSBd8DVTNGHx7o/IKu9HYDvLMffDhbyLccI= +github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50 h1:hlE8//ciYMztlGpl/VA+Zm1AcTPHYkHJPbHqE6WJUXE= +github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f h1:ERexzlUfuTvpE74urLSbIQW0Z/6hF9t8U4NsJLaioAY= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b h1:FosyBZYxY34Wul7O/MSKey3txpPYyCqVO5ZyceuQJEI= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= github.com/zenazn/goji v1.0.1 h1:4lbD8Mx2h7IvloP7r2C0D6ltZP6Ufip8Hn0wmSK5LR8= @@ -1282,10 +1400,15 @@ github.com/zenazn/goji v1.0.1/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxt gitlab.com/nyarla/go-crypt v0.0.0-20160106005555-d9a5dc2b789b h1:7gd+rd8P3bqcn/96gOZa3F5dpJr/vEiDQYlNb/y2uNs= go.einride.tech/aip v0.68.0 h1:4seM66oLzTpz50u4K1zlJyOXQ3tCzcJN7I22tKkjipw= go.einride.tech/aip v0.68.0/go.mod h1:7y9FF8VtPWqpxuAxl0KQWqaULxW4zFIesD6zF5RIHHg= +go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489 h1:1JFLBqwIgdyHN1ZtgjTBwO+blA6gVOmZurpiMEsETKo= +go.etcd.io/etcd/api/v3 v3.5.12/go.mod h1:Ot+o0SWSyT6uHhA56al1oCED0JImsRiU9Dc26+C2a+4= +go.etcd.io/etcd/client/pkg/v3 v3.5.12/go.mod h1:seTzl2d9APP8R5Y2hFL3NVlD6qC/dOT+3kvrqPyTas4= +go.etcd.io/etcd/client/v2 v2.305.12/go.mod h1:aQ/yhsxMu+Oht1FOupSr60oBvcS9cKXHrzBpDsPTf9E= +go.etcd.io/etcd/client/v3 v3.5.12/go.mod h1:tSbBCakoWmmddL+BKVAJHa9km+O/E+bumDe9mSbPiqw= go.etcd.io/gofail v0.1.0 h1:XItAMIhOojXFQMgrxjnd2EIIHun/d5qL0Pf7FzVTkFg= go.etcd.io/gofail v0.1.0/go.mod h1:VZBCXYGZhHAinaBiiqYvuDynvahNsAyLFwB3kEHKz1M= go.mongodb.org/mongo-driver v1.11.4/go.mod h1:PTSz5yu21bkT/wXpkS7WR5f0ddqw5quethTUn9WM+2g= -go.mongodb.org/mongo-driver v1.14.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c= +go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1 h1:A/5uWzF44DlIgdm/PQFwfMkW0JX+cIcQi/SwLAmZP5M= go.opentelemetry.io/collector v0.102.1 h1:M/ciCcReQsSDYG9bJ2Qwqk7pQILDJ2bM/l0MdeCAvJE= go.opentelemetry.io/collector v0.102.1/go.mod h1:yF1lDRgL/Eksb4/LUnkMjvLvHHpi6wqBVlzp+dACnPM= go.opentelemetry.io/collector/component v0.102.1 h1:66z+LN5dVCXhvuVKD1b56/3cYLK+mtYSLIwlskYA9IQ= @@ -1383,6 +1506,8 @@ go.opentelemetry.io/otel/bridge/opencensus v1.27.0 h1:ao9aGGHd+G4YfjBpGs6vbkvt5h go.opentelemetry.io/otel/bridge/opencensus v1.27.0/go.mod h1:uRvWtAAXzyVOST0WMPX5JHGBaAvBws+2F8PcC5gMnTk= go.opentelemetry.io/otel/bridge/opentracing v1.26.0 h1:Q/dHj0DOhfLMAs5u5ucAbC7gy66x9xxsZRLpHCJ4XhI= go.opentelemetry.io/otel/bridge/opentracing v1.26.0/go.mod h1:HfypvOw/8rqu4lXDhwaxVK1ibBAi1lTMXBHV9rywOCw= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.3.0 h1:R/OBkMoGgfy2fLhs2QhkCI1w4HLEQX92GCcJB6SSdNk= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.3.0/go.mod h1:VpP4/RMn8bv8gNo9uK7/IMY4mtWLELsS+JIP0inH0h4= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.28.0 h1:U2guen0GhqH8o/G2un8f/aG/y++OuW6MyCo6hT9prXk= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.28.0/go.mod h1:yeGZANgEcpdx/WK0IvvRFC+2oLiMS2u4L/0Rj2M2Qr0= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.28.0 h1:aLmmtjRke7LPDQ3lvpFz+kNEH43faFhzW7v8BFIEydg= @@ -1418,14 +1543,14 @@ go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+M go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= -go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.starlark.net v0.0.0-20221020143700-22309ac47eac/go.mod h1:kIVgS18CjmEC3PqMd5kaJSGEifyV/CeB9x506ZJ1Vbk= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= golang.org/x/arch v0.4.0 h1:A8WCeEWhLwPBKNbFi5Wv5UTCBx5zzubnXDlMOFAzFMc= golang.org/x/arch v0.4.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= @@ -1436,6 +1561,8 @@ golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5 golang.org/x/exp v0.0.0-20230315142452-642cacee5cc0/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63/go.mod h1:0v4NqG35kSWCMzLaMeX+IQrlSnVE/bqGSyC2cz/9Le8= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8/go.mod h1:CQ1k9gNrJ50XIzaKCRR2hssIjF07kZFEiieALBM/ARQ= golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= @@ -1446,17 +1573,18 @@ golang.org/x/image v0.14.0 h1:tNgSxAFe3jC4uYqvZdTr84SZoM1KfwdC9SKIFrLjFn4= golang.org/x/image v0.14.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= -golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= +golang.org/x/mod v0.6.0-dev.0.20220818022119-ed83ed61efb9/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= -golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211123203042-d83791d6bcd9/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= @@ -1466,6 +1594,7 @@ golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk= golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= +golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= golang.org/x/oauth2 v0.19.0/go.mod h1:vYi7skDa1x015PmRRYZ7+s1cWyPgrPiSYRe4rnsexc8= golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= @@ -1473,9 +1602,11 @@ golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbht golang.org/x/oauth2 v0.26.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= @@ -1483,20 +1614,18 @@ golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457 h1:zf5N6UOrA487eEFacMePxjXAJctxKmyjKUsjA11Uzuk= golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457/go.mod h1:pRgIJT+bRLFKnoM1ldnzKoxTIn14Yxz928LQRYYgIN0= golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.11.0/go.mod h1:anzJrxPjNtfgiYQYirP2CPGzGLxrH2u2QBhn6Bf3qY8= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= @@ -1510,6 +1639,7 @@ gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0 h1:OE9mWmgKkjJyEmDAAtGMPj gonum.org/v1/plot v0.14.0 h1:+LBDVFYwFe4LHhdP8coW6296MBEY4nQ+Y4vuUpJopcE= gonum.org/v1/plot v0.14.0/go.mod h1:MLdR9424SJed+5VqC6MsouEpig9pZX2VZ57H9ko2bXU= google.golang.org/api v0.152.0/go.mod h1:3qNJX5eOmhiWYc67jRA/3GsDw97UFb5ivv7Y2PrriAY= +google.golang.org/api v0.171.0/go.mod h1:Hnq5AHm4OTMt2BUVjael2CWZFD6vksJdWCWiUAmjC9o= google.golang.org/api v0.177.0/go.mod h1:srbhue4MLjkjbkux5p3dw/ocYOSZTaIEvf7bCOnFQDw= google.golang.org/api v0.203.0/go.mod h1:BuOVyCSYEPwJb3npWvDnNmFI92f3GeRnHNkETneT3SI= google.golang.org/api v0.211.0/go.mod h1:XOloB4MXFH4UTlQSGuNUxw0UT74qdENK8d6JNsXKLi0= @@ -1518,14 +1648,18 @@ google.golang.org/api v0.217.0/go.mod h1:qMc2E8cBAbQlRypBTBWHklNJlaZZJBwDv81B1Iu google.golang.org/api v0.218.0/go.mod h1:5VGHBAkxrA/8EFjLVEYmMUJ8/8+gWWQ3s4cFH0FxG2M= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= +google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8 h1:Cpp2P6TPjujNoC5M2KHY6g7wfyLYfIWRZaSdIKfDasA= google.golang.org/genproto v0.0.0-20230731193218-e0aa005b6bdf/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8= +google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:J7XzRzVy1+IPwWHZUzoD0IccYZIrXILAQpc+Qy9CMhY= google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= google.golang.org/genproto v0.0.0-20241015192408-796eee8c2d53/go.mod h1:fheguH3Am2dGp1LfXkrvwqC/KlFq8F0nLq3LryOMrrE= google.golang.org/genproto v0.0.0-20241118233622-e639e219e697/go.mod h1:JJrvXBWRZaFMxBufik1a4RpFw4HhgVtBBWQeQgUj2cc= google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:0xJLfVdJqpAPl8tDg1ujOCGzx6LFLttXT5NhllGOXY4= +google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2/go.mod h1:O1cOfN1Cy6QEYr7VxtjOyP5AdAuR0aJ/MYZaaof623Y= google.golang.org/genproto/googleapis/api v0.0.0-20240429193739-8cf5692501f6/go.mod h1:10yRODfgim2/T8csjQsMPgZOMvtytXKTDRzH6HRGzRw= google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU= google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117/go.mod h1:OimBR/bc1wPO9iV4NC2bpyjy3VnAwZh5EBPQdtaE5oo= @@ -1544,7 +1678,9 @@ google.golang.org/genproto/googleapis/bytestream v0.0.0-20250102185135-698230207 google.golang.org/genproto/googleapis/bytestream v0.0.0-20250127172529-29210b9bc287 h1:c/HGC2hBfwgjeBtQMLjfmuS2KG28ngtUpn5XiX8o3rY= google.golang.org/genproto/googleapis/bytestream v0.0.0-20250127172529-29210b9bc287/go.mod h1:7VGktjvijnuhf2AobFqsoaBGnG8rImcxqoL+QPBPRq4= google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f/go.mod h1:L9KNLi232K1/xB6f7AlSX692koaRnKaWSR0stBki0Yc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/genproto/googleapis/rpc v0.0.0-20240429193739-8cf5692501f6/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= @@ -1574,14 +1710,15 @@ google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 h1:M1YKkFIboKNieVO5DLUEVzQfGwJD30Nv2jfUgzb5UcE= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= google.golang.org/protobuf v1.36.0/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= google.golang.org/protobuf v1.36.4/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= -gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= +gopkg.in/airbrake/gobrake.v2 v2.0.9 h1:7z2uVWwn7oVeeugY1DtlPAy5H+KYgB1KeKTnqjNatLo= +gopkg.in/cheggaaa/pb.v1 v1.0.25 h1:Ev7yu1/f6+d+b3pi5vPdRPc6nNtP1umSfcWiEfRqv6I= gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 h1:OAj3g0cR6Dx/R07QgQe8wkA9RNjB2u4i700xBkIT4e0= gopkg.in/resty.v1 v1.12.0 h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI= gopkg.in/square/go-jose.v2 v2.6.0 h1:NGk74WTnPKBNUhNzQX7PYcTLUjoq7mzKk2OKbvwk2iI= gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= @@ -1595,14 +1732,19 @@ honnef.co/go/tools v0.3.2/go.mod h1:jzwdWgg7Jdq75wlfblQxO4neNaFFSvgc1tD5Wv8U0Yw= howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= howett.net/plist v1.0.0 h1:7CrbWYbPPO/PyNy38b2EB/+gYbjCe2DXBxgtOOZbSQM= howett.net/plist v1.0.0/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g= +k8s.io/client-go v9.0.0+incompatible h1:2kqW3X2xQ9SbFvWZjGEHBLlWc1LG9JIJNXWkuqwdZ3A= k8s.io/code-generator v0.32.1 h1:4lw1kFNDuFYXquTkB7Sl5EwPMUP2yyW9hh6BnFfRZFY= k8s.io/code-generator v0.32.1/go.mod h1:zaILfm00CVyP/6/pJMJ3zxRepXkxyDfUV5SNG4CjZI4= +k8s.io/cri-api v0.25.0 h1:INwdXsCDSA/0hGNdPxdE2dQD6ft/5K1EaKXZixvSQxg= +k8s.io/cri-api v0.25.0/go.mod h1:J1rAyQkSJ2Q6I+aBMOVgg2/cbbebso6FNa0UagiR0kc= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6 h1:4s3/R4+OYYYUKptXPhZKjQ04WJ6EhQQVFdjOFvCazDk= +k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac h1:sAvhNk5RRuc6FNYGqe7Ygz3PSo/2wGWbulskmzRX8Vs= k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 h1:si3PfKm8dDYxgfbeA6orqrtLkvvIeH8UqffFJDl0bz4= k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kubernetes v1.13.0 h1:qTfB+u5M92k2fCCCVP2iuhgwwSOv1EkAkvQY1tQODD8= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI= modernc.org/cc/v3 v3.36.3 h1:uISP3F66UlixxWEcKuIWERa4TwrZENHSL8tWxZz8bHg= diff --git a/kindsv2/Makefile b/kindsv2/Makefile index 5a6d72bf528..1e72c98cd5f 100644 --- a/kindsv2/Makefile +++ b/kindsv2/Makefile @@ -4,5 +4,5 @@ include ../.bingo/Variables.mk all: dashboards .PHONY: dashboards -dashboards: $(COG) ## Dashboards – Typescript - @$(COG) generate --config ./dashboard-ts.yaml +dashboards: ## Dashboards – Typescript + go tool github.com/grafana/cog/cmd/cli generate --config ./dashboard-ts.yaml From 3e5975367c705f6442044ee7593800d5317283aa Mon Sep 17 00:00:00 2001 From: aishyandapalli Date: Mon, 17 Mar 2025 02:14:55 -0700 Subject: [PATCH 020/115] Prometheus: Add SpanID while clicking on TraceID datalink for Exemplar (#101541) Add Span context to Exemplar data links --- packages/grafana-prometheus/src/result_transformer.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/grafana-prometheus/src/result_transformer.ts b/packages/grafana-prometheus/src/result_transformer.ts index 4c43a891719..5db8a31d95b 100644 --- a/packages/grafana-prometheus/src/result_transformer.ts +++ b/packages/grafana-prometheus/src/result_transformer.ts @@ -278,6 +278,11 @@ function getDataLinks(options: ExemplarTraceIdDestination): DataLink[] { url: '', internal: { query: { query: '${__value.raw}', queryType: 'traceql' }, + panelsState: { + trace: { + spanId: '${__data.fields["span_id"]}', + }, + }, datasourceUid: options.datasourceUid, datasourceName: dsSettings?.name ?? 'Data source not found', }, From 3ec3085416b417d89cd52804f0bf6c7e8fee93e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20=C5=A0tibran=C3=BD?= Date: Mon, 17 Mar 2025 10:47:27 +0100 Subject: [PATCH 021/115] Pass build tags to golangci-lint and go test commands. (#102206) * Pass build tag to golangci-lint. * Pass build tags to go test command. --- Makefile | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 3a060c3601e..8b0c6664c18 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,7 @@ GO_RACE_FLAG := $(if $(GO_RACE),-race) GO_BUILD_FLAGS += $(if $(GO_BUILD_DEV),-dev) GO_BUILD_FLAGS += $(if $(GO_BUILD_TAGS),-build-tags=$(GO_BUILD_TAGS)) GO_BUILD_FLAGS += $(GO_RACE_FLAG) +GO_TEST_FLAGS += $(if $(GO_BUILD_TAGS),-tags=$(GO_BUILD_TAGS)) GO_TEST_OUTPUT := $(shell [ -n "$(GO_TEST_OUTPUT)" ] && echo '-json | tee $(GO_TEST_OUTPUT) | tparse -all') GO_UNIT_COVERAGE ?= true GO_UNIT_COVER_PROFILE ?= unit.cov @@ -250,12 +251,12 @@ test-go: test-go-unit test-go-integration .PHONY: test-go-unit test-go-unit: ## Run unit tests for backend with flags. @echo "backend unit tests" - $(GO) test $(GO_RACE_FLAG) -v -short -timeout=30m $(GO_TEST_FILES) $(GO_TEST_OUTPUT) + $(GO) test $(GO_RACE_FLAG) $(GO_TEST_FLAGS) -v -short -timeout=30m $(GO_TEST_FILES) $(GO_TEST_OUTPUT) .PHONY: test-go-unit-cov test-go-unit-cov: ## Run unit tests for backend with flags and coverage @echo "backend unit tests with coverage" - $(GO) test $(GO_RACE_FLAG) -v -short $(if $(filter true,$(GO_UNIT_COVERAGE)),-covermode=atomic -coverprofile=$(GO_UNIT_COVER_PROFILE) $(if $(GO_UNIT_TEST_COVERPKG),-coverpkg=$(GO_UNIT_TEST_COVERPKG)),) -timeout=30m $(GO_TEST_FILES) $(GO_TEST_OUTPUT) + $(GO) test $(GO_RACE_FLAG) $(GO_TEST_FLAGS) -v -short $(if $(filter true,$(GO_UNIT_COVERAGE)),-covermode=atomic -coverprofile=$(GO_UNIT_COVER_PROFILE) $(if $(GO_UNIT_TEST_COVERPKG),-coverpkg=$(GO_UNIT_TEST_COVERPKG)),) -timeout=30m $(GO_TEST_FILES) $(GO_TEST_OUTPUT) .PHONY: test-go-unit-pretty test-go-unit-pretty: check-tparse @@ -263,12 +264,12 @@ test-go-unit-pretty: check-tparse echo "Notice: FILES variable is not set. Try \"make test-go-unit-pretty FILES=./pkg/services/mysvc\""; \ exit 1; \ fi - $(GO) test $(GO_RACE_FLAG) -timeout=10s $(FILES) -json | tparse -all + $(GO) test $(GO_RACE_FLAG) $(GO_TEST_FLAGS) -timeout=10s $(FILES) -json | tparse -all .PHONY: test-go-integration test-go-integration: ## Run integration tests for backend with flags. @echo "test backend integration tests" - $(GO) test $(GO_RACE_FLAG) -count=1 -run "^TestIntegration" -covermode=atomic -coverprofile=$(GO_INTEGRATION_COVER_PROFILE) -timeout=5m $(GO_INTEGRATION_TESTS) $(GO_TEST_OUTPUT) + $(GO) test $(GO_RACE_FLAG) $(GO_TEST_FLAGS) -count=1 -run "^TestIntegration" -covermode=atomic -coverprofile=$(GO_INTEGRATION_COVER_PROFILE) -timeout=5m $(GO_INTEGRATION_TESTS) $(GO_TEST_OUTPUT) .PHONY: test-go-integration-alertmanager test-go-integration-alertmanager: ## Run integration tests for the remote alertmanager (config taken from the mimir_backend block). @@ -290,25 +291,25 @@ test-go-integration-postgres: devenv-postgres ## Run integration tests for postg @echo "test backend integration postgres tests" $(GO) clean -testcache GRAFANA_TEST_DB=postgres \ - $(GO) test $(GO_RACE_FLAG) -p=1 -count=1 -run "^TestIntegration" -covermode=atomic -timeout=10m $(GO_INTEGRATION_TESTS) + $(GO) test $(GO_RACE_FLAG) $(GO_TEST_FLAGS) -p=1 -count=1 -run "^TestIntegration" -covermode=atomic -timeout=10m $(GO_INTEGRATION_TESTS) .PHONY: test-go-integration-mysql test-go-integration-mysql: devenv-mysql ## Run integration tests for mysql backend with flags. @echo "test backend integration mysql tests" GRAFANA_TEST_DB=mysql \ - $(GO) test $(GO_RACE_FLAG) -p=1 -count=1 -run "^TestIntegration" -covermode=atomic -timeout=10m $(GO_INTEGRATION_TESTS) + $(GO) test $(GO_RACE_FLAG) $(GO_TEST_FLAGS) -p=1 -count=1 -run "^TestIntegration" -covermode=atomic -timeout=10m $(GO_INTEGRATION_TESTS) .PHONY: test-go-integration-redis test-go-integration-redis: ## Run integration tests for redis cache. @echo "test backend integration redis tests" $(GO) clean -testcache - REDIS_URL=localhost:6379 $(GO) test $(GO_RACE_FLAG) -run IntegrationRedis -covermode=atomic -timeout=2m $(GO_INTEGRATION_TESTS) + REDIS_URL=localhost:6379 $(GO) test $(GO_TEST_FLAGS) -run IntegrationRedis -covermode=atomic -timeout=2m $(GO_INTEGRATION_TESTS) .PHONY: test-go-integration-memcached test-go-integration-memcached: ## Run integration tests for memcached cache. @echo "test backend integration memcached tests" $(GO) clean -testcache - MEMCACHED_HOSTS=localhost:11211 $(GO) test $(GO_RACE_FLAG) -run IntegrationMemcached -covermode=atomic -timeout=2m $(GO_INTEGRATION_TESTS) + MEMCACHED_HOSTS=localhost:11211 $(GO) test $(GO_RACE_FLAG) $(GO_TEST_FLAGS) -run IntegrationMemcached -covermode=atomic -timeout=2m $(GO_INTEGRATION_TESTS) .PHONY: test-js test-js: ## Run tests for frontend. @@ -324,6 +325,7 @@ golangci-lint: @echo "lint via golangci-lint" $(GO) tool golangci-lint run \ --config .golangci.yml \ + $(if $(GO_BUILD_TAGS),--build-tags $(GO_BUILD_TAGS)) \ $(GO_LINT_FILES) .PHONY: lint-go From f2518a2c459231e0052b979c6924f6721a6810be Mon Sep 17 00:00:00 2001 From: Timur Olzhabayev Date: Mon, 17 Mar 2025 10:49:51 +0100 Subject: [PATCH 022/115] Chore: Promote pluginsDetailsRightPanel to private preview (#102211) promote FeatureStagePrivatePreview to private preview --- .../configure-grafana/feature-toggles/index.md | 1 - pkg/services/featuremgmt/registry.go | 2 +- pkg/services/featuremgmt/toggles_gen.csv | 2 +- pkg/services/featuremgmt/toggles_gen.json | 6 +++--- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md index c5210a70273..af1cc8f1b5d 100644 --- a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md +++ b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md @@ -147,7 +147,6 @@ Experimental features might be changed or removed without prior notice. | `extraThemes` | Enables extra themes | | `lokiPredefinedOperations` | Adds predefined query operations to Loki query editor | | `frontendSandboxMonitorOnly` | Enables monitor only in the plugin frontend sandbox (if enabled) | -| `pluginsDetailsRightPanel` | Enables right panel for the plugins details page | | `awsDatasourcesTempCredentials` | Support temporary security credentials in AWS plugins for Grafana Cloud customers | | `mlExpressions` | Enable support for Machine Learning in server-side expressions | | `metricsSummary` | Enables metrics summary queries in the Tempo data source | diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index 1ef6f4bef32..c6abe10a09a 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -382,7 +382,7 @@ var ( { Name: "pluginsDetailsRightPanel", Description: "Enables right panel for the plugins details page", - Stage: FeatureStageExperimental, + Stage: FeatureStagePrivatePreview, FrontendOnly: true, Owner: grafanaPluginsPlatformSquad, }, diff --git a/pkg/services/featuremgmt/toggles_gen.csv b/pkg/services/featuremgmt/toggles_gen.csv index 84efa8a1ad1..f2c41c26500 100644 --- a/pkg/services/featuremgmt/toggles_gen.csv +++ b/pkg/services/featuremgmt/toggles_gen.csv @@ -50,7 +50,7 @@ extraThemes,experimental,@grafana/grafana-frontend-platform,false,false,true lokiPredefinedOperations,experimental,@grafana/observability-logs,false,false,true pluginsFrontendSandbox,privatePreview,@grafana/plugins-platform-backend,false,false,false frontendSandboxMonitorOnly,experimental,@grafana/plugins-platform-backend,false,false,true -pluginsDetailsRightPanel,experimental,@grafana/plugins-platform-backend,false,false,true +pluginsDetailsRightPanel,privatePreview,@grafana/plugins-platform-backend,false,false,true sqlDatasourceDatabaseSelection,preview,@grafana/dataviz-squad,false,false,true recordedQueriesMulti,GA,@grafana/observability-metrics,false,false,false logsExploreTableVisualisation,GA,@grafana/observability-logs,false,false,true diff --git a/pkg/services/featuremgmt/toggles_gen.json b/pkg/services/featuremgmt/toggles_gen.json index 1564aeeec0b..ce2d9c3dcfa 100644 --- a/pkg/services/featuremgmt/toggles_gen.json +++ b/pkg/services/featuremgmt/toggles_gen.json @@ -3238,15 +3238,15 @@ { "metadata": { "name": "pluginsDetailsRightPanel", - "resourceVersion": "1720788722220", + "resourceVersion": "1741965023728", "creationTimestamp": "2024-08-13T09:55:30Z", "annotations": { - "grafana.app/updatedTimestamp": "2024-07-12 12:52:02.22099 +0000 UTC" + "grafana.app/updatedTimestamp": "2025-03-14 15:10:23.728257 +0000 UTC" } }, "spec": { "description": "Enables right panel for the plugins details page", - "stage": "experimental", + "stage": "privatePreview", "codeowner": "@grafana/plugins-platform-backend", "frontend": true } From 91116de790c6c59248abd262721c40f169be6661 Mon Sep 17 00:00:00 2001 From: Jack Westbrook Date: Mon, 17 Mar 2025 11:27:17 +0100 Subject: [PATCH 023/115] Grafana Data: Use package.json exports for internal code (#102036) * refactor(frontend): rename all @grafana/data/src imports to @grafana/data * feat(grafana-data): introduce internal entrypoint for sharing code only with grafana * feat(grafana-data): add test entrypoint for data test utils usage in core * refactor(frontend): update import paths to use grafana/data exports entrypoints * docs(grafana-data): update comment in internal/index.ts * refactor(frontend): prefer public namespaced exports over re-exporting via internal --- .betterer.results | 551 +++++------------- packages/grafana-data/package.json | 20 + packages/grafana-data/src/internal/index.ts | 100 ++++ .../panel/getPanelOptionsWithDefaults.test.ts | 3 +- .../{__mocks__ => helpers}/pluginMocks.ts | 2 +- packages/grafana-data/test/index.ts | 2 + .../src/querybuilder/operationUtils.ts | 2 +- public/app/core/components/GraphNG/utils.ts | 6 +- .../core/components/OptionsUI/registry.tsx | 2 +- .../core/components/TimelineChart/timeline.ts | 5 +- .../core/components/TimelineChart/utils.ts | 6 +- .../GrafanaJavascriptAgentBackend.test.ts | 2 +- public/app/core/services/theme.ts | 2 +- public/app/core/utils/explore.test.ts | 11 +- public/app/core/utils/richHistory.ts | 10 +- .../DashboardsListModalButton.tsx | 2 +- .../DeleteUserModalButton.tsx | 2 +- .../unified/GrafanaRuleQueryViewer.tsx | 5 +- .../GrafanaAlertmanagerDeliveryWarning.tsx | 2 +- .../rule-editor/CloudAlertPreview.tsx | 2 +- .../rule-editor/DashboardPicker.tsx | 2 +- .../components/rule-editor/QueryOptions.tsx | 5 +- .../rule-editor/rule-types/RuleTypePicker.tsx | 2 +- .../rules/AlertInstanceStateFilter.tsx | 2 +- .../components/rules/RuleConfigStatus.tsx | 2 +- .../rules/central-state-history/utils.ts | 2 +- .../state-history/useRuleHistoryRecords.tsx | 2 +- .../unified/home/PluginIntegrations.tsx | 2 +- .../alerting/unified/styles/pagination.ts | 2 +- .../features/alerting/unified/utils/misc.ts | 2 +- .../alerting/unified/utils/routeTree.ts | 6 +- .../features/alerting/unified/utils/time.ts | 4 +- .../StandardAnnotationQueryEditor.test.tsx | 2 +- .../auth-config/AuthProvidersListPage.tsx | 2 +- public/app/features/canvas/element.ts | 2 +- .../app/features/canvas/elements/button.tsx | 3 +- public/app/features/canvas/types.ts | 2 +- .../inspect/HelpWizard/HelpWizard.test.tsx | 2 +- .../inspect/InspectJsonTab.test.tsx | 2 +- .../pages/DashboardScenePage.test.tsx | 2 +- .../pages/PublicDashboardScenePage.test.tsx | 2 +- .../PanelDataQueriesTab.test.tsx | 2 +- .../panel-edit/PanelEditor.test.ts | 2 +- .../panel-edit/PanelOptions.test.tsx | 2 +- .../DashboardDatasourceBehaviour.test.tsx | 2 +- .../scene/DashboardLinksControls.tsx | 2 +- .../scene/DashboardSceneRenderer.test.tsx | 2 +- .../scene/LibraryPanelBehavior.test.tsx | 2 +- .../scene/PanelMenuBehavior.test.tsx | 2 +- .../layout-default/DashboardGridItem.test.tsx | 2 +- .../RowRepeaterBehavior.test.tsx | 2 +- .../RowItemRepeaterBehavior.test.tsx | 2 +- .../serialization/angularMigration.test.ts | 2 +- .../transformSaveModelToScene.test.ts | 2 +- .../transformSceneToSaveModel.test.ts | 2 +- .../settings/VariablesEditView.test.tsx | 2 +- .../share-externally/ShareExternally.test.tsx | 2 +- .../sharing/ShareDrawer/ShareDrawer.test.tsx | 2 +- .../sharing/ShareLinkTab.test.tsx | 2 +- .../panel-share/SharePanelInternally.test.tsx | 2 +- .../DashboardPrompt/DashboardPrompt.test.tsx | 2 +- .../components/HelpWizard/HelpWizard.test.tsx | 2 +- .../PanelEditor/OptionsPaneOptions.test.tsx | 2 +- .../PanelEditor/PanelHeaderCorner.tsx | 3 +- .../PanelEditor/getVisualizationOptions.tsx | 8 +- .../PanelEditor/state/actions.test.ts | 2 +- .../PublicDashboardNotAvailable.tsx | 2 +- .../ConfigPublicDashboard.tsx | 2 +- .../ConfigPublicDashboard/Configuration.tsx | 2 +- .../AcknowledgeCheckboxes.tsx | 2 +- .../UnsupportedDataSourcesAlert.tsx | 2 +- .../SharePublicDashboard.test.tsx | 2 +- .../SharePublicDashboard.tsx | 2 +- .../SharePublicDashboardUtils.test.tsx | 3 +- .../components/SubMenu/DashboardLinks.tsx | 2 +- .../SubMenu/DashboardLinksDashboard.tsx | 2 +- .../dashboard/state/DashboardMigrator.test.ts | 2 +- .../dashboard/state/DashboardMigrator.ts | 3 +- .../dashboard/state/PanelModel.test.ts | 3 +- .../features/dashboard/utils/panel.test.ts | 2 +- .../app/features/dashboard/utils/timeRange.ts | 3 +- .../datasources/components/CloudInfoBox.tsx | 2 +- .../datasources/state/buildCategories.test.ts | 2 +- public/app/features/dimensions/context.ts | 2 +- public/app/features/dimensions/scale.ts | 3 +- .../app/features/explore/Logs/Logs.test.tsx | 2 +- .../explore/Logs/LogsColumnSearch.tsx | 2 +- .../explore/Logs/LogsMetaRow.test.tsx | 2 +- .../app/features/explore/Logs/LogsMetaRow.tsx | 2 +- .../features/explore/Logs/LogsTable.test.tsx | 2 +- .../explore/Logs/LogsTableActiveFields.tsx | 2 +- .../explore/Logs/LogsTableMultiSelect.tsx | 2 +- .../explore/Logs/LogsTableWrap.test.tsx | 10 +- .../explore/Logs/utils/testMocks.test.ts | 2 +- public/app/features/explore/NoData.tsx | 2 +- .../explore/PrometheusListView/ItemLabels.tsx | 2 +- .../explore/PrometheusListView/ItemValues.tsx | 2 +- .../RawListContainer.test.tsx | 2 +- .../PrometheusListView/RawListContainer.tsx | 2 +- .../PrometheusListView/RawListItem.tsx | 2 +- .../RawListItemAttributes.tsx | 2 +- .../app/features/explore/state/main.test.ts | 3 +- .../live/centrifuge/LiveDataStream.ts | 2 +- .../logs/components/InfiniteScroll.test.tsx | 5 +- .../logs/components/InfiniteScroll.tsx | 12 +- .../logs/components/LogDetailsRow.test.tsx | 3 +- public/app/features/logs/logsModel.ts | 2 +- .../DeletePublicDashboardModal.tsx | 2 +- .../app/features/panel/state/actions.test.ts | 3 +- .../plugins/components/AppRootPage.test.tsx | 2 +- .../extensions/registry/AddedLinksRegistry.ts | 2 +- .../features/plugins/extensions/validators.ts | 19 +- .../plugins/loader/sharedDependencies.ts | 2 +- .../app/features/plugins/pluginPreloader.ts | 7 +- .../features/scopes/tests/utils/render.tsx | 2 +- .../app/features/trails/DataTrailsHistory.tsx | 5 +- .../logs/lokiRecordingRules.test.ts | 2 +- .../FilterByValueFilterEditor.tsx | 2 +- .../FilterByValueTransformerEditor.test.tsx | 2 +- .../FilterByValueTransformerEditor.tsx | 2 +- .../calculateHeatmap/heatmap.test.ts | 3 +- .../transformers/calculateHeatmap/heatmap.ts | 2 +- .../BinaryOperationOptionsEditor.tsx | 2 +- .../CalculateFieldTransformerEditor.tsx | 2 +- .../CumulativeOptionsEditor.tsx | 6 +- .../IndexOptionsEditor.tsx | 2 +- .../ReduceRowOptionsEditor.tsx | 5 +- .../UnaryOperationEditor.tsx | 6 +- .../WindowOptionsEditor.tsx | 2 +- .../editors/ConcatenateTransformerEditor.tsx | 5 +- .../ConvertFieldTypeTransformerEditor.tsx | 5 +- .../editors/EnumMappingEditor.tsx | 2 +- .../editors/FilterByNameTransformerEditor.tsx | 2 +- .../FilterByRefIdTransformerEditor.tsx | 2 +- .../editors/FormatStringTransformerEditor.tsx | 5 +- .../editors/FormatTimeTransformerEditor.tsx | 2 +- .../editors/GroupByTransformerEditor.tsx | 6 +- .../GroupToNestedTableTransformerEditor.tsx | 4 +- .../editors/HistogramTransformerEditor.tsx | 5 +- .../editors/JoinByFieldTransformerEditor.tsx | 2 +- .../LabelsToFieldsTransformerEditor.tsx | 5 +- .../editors/LimitTransformerEditor.tsx | 2 +- .../editors/MergeTransformerEditor.tsx | 2 +- .../OrganizeFieldsTransformerEditor.tsx | 3 +- .../editors/ReduceTransformerEditor.tsx | 2 +- .../editors/RenameByRegexTransformer.tsx | 2 +- .../editors/SeriesToRowsTransformerEditor.tsx | 2 +- .../editors/SortByTransformerEditor.tsx | 2 +- .../editors/TransposeTransformerEditor.tsx | 2 +- .../extractFields/extractFields.test.ts | 5 +- .../lookupGazetteer/fieldLookup.test.ts | 4 +- .../partitionByValues/partitionByValues.ts | 3 +- .../transformers/spatial/optionsHelper.tsx | 3 +- .../spatial/spatialTransformer.test.ts | 5 +- .../variables/datasource/actions.test.ts | 2 +- .../variables/datasource/reducer.test.ts | 2 +- .../state/initVariableTransaction.test.ts | 2 +- ...igrateVariablesDatasourceNameToRef.test.ts | 2 +- .../azuremonitor/__mocks__/utils.ts | 3 +- .../components/LogsQueryEditor/RawQuery.tsx | 2 +- .../CloudWatchMetricsQueryRunner.test.ts | 3 +- .../datasource/dashboard/datasource.test.ts | 2 +- .../elasticsearch/ElasticResponse.ts | 2 +- .../editor/annotation/AnnotationEditor.tsx | 2 +- .../influxdb/components/editor/constants.ts | 2 +- .../components/editor/query/QueryEditor.tsx | 2 +- .../editor/query/flux/FluxQueryEditor.tsx | 2 +- .../editor/query/fsql/FSQLEditor.tsx | 2 +- .../utils/getTemplateVariableOptions.ts | 2 +- .../utils/withTemplateVariableOptions.ts | 2 +- .../editor/query/influxql/utils/wrapper.ts | 2 +- .../influxdb/influxql_metadata_query.ts | 2 +- .../datasources/prometheus/RawQuery.tsx | 2 +- public/app/plugins/datasource/tempo/types.ts | 2 +- public/app/plugins/panel/barchart/bars.ts | 6 +- public/app/plugins/panel/barchart/utils.ts | 2 +- .../plugins/panel/bargauge/BarGaugeLegend.tsx | 3 +- .../app/plugins/panel/candlestick/fields.ts | 2 +- .../panel/canvas/components/CanvasTooltip.tsx | 4 +- .../panel/canvas/editor/connectionEditor.tsx | 2 +- .../editor/element/QuickPositioning.tsx | 2 +- .../canvas/editor/element/elementEditor.tsx | 2 +- .../canvas/editor/inline/InlineEditBody.tsx | 3 +- .../panel/canvas/editor/layer/layerEditor.tsx | 2 +- .../plugins/panel/canvas/editor/options.ts | 2 +- public/app/plugins/panel/canvas/utils.ts | 3 +- .../components/DatagridContextMenu.tsx | 2 +- .../panel/geomap/components/MarkersLegend.tsx | 9 +- .../panel/geomap/editor/layerEditor.tsx | 2 +- .../panel/geomap/layers/data/routeLayer.tsx | 6 +- .../utils/checkFeatureMatchesStyleRule.ts | 2 +- .../app/plugins/panel/geomap/utils/tooltip.ts | 2 +- .../app/plugins/panel/geomap/utils/utils.ts | 3 +- .../app/plugins/panel/graph/data_processor.ts | 2 +- .../app/plugins/panel/histogram/Histogram.tsx | 4 +- .../panel/histogram/HistogramPanel.tsx | 11 +- public/app/plugins/panel/histogram/module.tsx | 2 +- public/app/plugins/panel/histogram/utils.ts | 5 +- public/app/plugins/panel/logs/LogsPanel.tsx | 4 +- .../app/plugins/panel/nodeGraph/Node.test.tsx | 2 +- public/app/plugins/panel/stat/StatPanel.tsx | 2 +- .../app/plugins/panel/status-history/utils.ts | 3 +- public/app/plugins/panel/table/migrations.ts | 2 +- public/app/plugins/panel/timeseries/utils.ts | 6 +- public/app/plugins/panel/trend/TrendPanel.tsx | 11 +- .../plugins/panel/xychart/XYChartPanel.tsx | 5 +- .../plugins/panel/xychart/XYChartTooltip.tsx | 5 +- public/app/plugins/panel/xychart/scatter.ts | 14 +- public/app/plugins/panel/xychart/utils.ts | 2 +- public/app/routes/RoutesWrapper.tsx | 2 +- 210 files changed, 574 insertions(+), 729 deletions(-) create mode 100644 packages/grafana-data/src/internal/index.ts rename packages/grafana-data/test/{__mocks__ => helpers}/pluginMocks.ts (98%) create mode 100644 packages/grafana-data/test/index.ts diff --git a/.betterer.results b/.betterer.results index 6849eaed996..e56a82ec813 100644 --- a/.betterer.results +++ b/.betterer.results @@ -392,8 +392,9 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "7"], [0, 0, 0, "Unexpected any. Specify a different type.", "8"] ], - "packages/grafana-data/test/__mocks__/pluginMocks.ts:5381": [ - [0, 0, 0, "Unexpected any. Specify a different type.", "0"] + "packages/grafana-data/test/helpers/pluginMocks.ts:5381": [ + [0, 0, 0, "Do not use any type assertions.", "0"], + [0, 0, 0, "Unexpected any. Specify a different type.", "1"] ], "packages/grafana-e2e-selectors/src/resolver.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] @@ -970,11 +971,6 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "4"], [0, 0, 0, "Unexpected any. Specify a different type.", "5"] ], - "public/app/core/components/GraphNG/utils.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/joinDataFrames\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/nulls/nullInsertThreshold\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/nulls/nullToUndefThreshold\' import is restricted from being used by a pattern. Import from the public export instead.", "2"] - ], "public/app/core/components/Layers/LayerDragDropList.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], @@ -997,9 +993,6 @@ exports[`better eslint`] = { "public/app/core/components/OptionsUI/fieldColor.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] ], - "public/app/core/components/OptionsUI/registry.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/field/overrides/processors\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/core/components/OptionsUI/units.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] ], @@ -1081,14 +1074,6 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "1"], [0, 0, 0, "Unexpected any. Specify a different type.", "2"] ], - "public/app/core/components/TimelineChart/timeline.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/themes/colorManipulator\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], - "public/app/core/components/TimelineChart/utils.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/joinDataFrames\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/nulls/nullInsertThreshold\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/nulls/nullToValue\' import is restricted from being used by a pattern. Import from the public export instead.", "2"] - ], "public/app/core/config.ts:5381": [ [0, 0, 0, "Do not re-export imported variable (\`Settings\`)", "0"], [0, 0, 0, "Do not re-export imported variable (\`config\`)", "1"] @@ -1131,12 +1116,6 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "2"], [0, 0, 0, "Unexpected any. Specify a different type.", "3"] ], - "public/app/core/services/echo/backends/grafana-javascript-agent/GrafanaJavascriptAgentBackend.test.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/types/config\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], - "public/app/core/services/theme.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/themes/registry\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/core/specs/backend_srv.test.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], @@ -1176,9 +1155,6 @@ exports[`better eslint`] = { "public/app/core/utils/deferred.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], - "public/app/core/utils/explore.test.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/utils/url\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/core/utils/fetch.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"], @@ -1200,10 +1176,9 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], "public/app/core/utils/richHistory.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/utils/url\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "Do not re-export imported variable (\`RichHistorySearchFilters\`)", "1"], - [0, 0, 0, "Do not re-export imported variable (\`RichHistorySettings\`)", "2"], - [0, 0, 0, "Do not re-export imported variable (\`SortOrder\`)", "3"] + [0, 0, 0, "Do not re-export imported variable (\`RichHistorySearchFilters\`)", "0"], + [0, 0, 0, "Do not re-export imported variable (\`RichHistorySettings\`)", "1"], + [0, 0, 0, "Do not re-export imported variable (\`SortOrder\`)", "2"] ], "public/app/core/utils/ticks.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], @@ -1390,9 +1365,9 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "4"] ], "public/app/features/alerting/unified/GrafanaRuleQueryViewer.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/datetime/rangeutil\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], + [0, 0, 0, "No untranslated strings. Wrap text with ", "2"], [0, 0, 0, "No untranslated strings. Wrap text with ", "3"], [0, 0, 0, "No untranslated strings. Wrap text with ", "4"], [0, 0, 0, "No untranslated strings. Wrap text with ", "5"], @@ -1405,8 +1380,7 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "12"], [0, 0, 0, "No untranslated strings. Wrap text with ", "13"], [0, 0, 0, "No untranslated strings. Wrap text with ", "14"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "15"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "16"] + [0, 0, 0, "No untranslated strings. Wrap text with ", "15"] ], "public/app/features/alerting/unified/NotificationPoliciesPage.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], @@ -2052,11 +2026,10 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] ], "public/app/features/alerting/unified/components/rule-editor/QueryOptions.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/datetime/rangeutil\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [0, 0, 0, "No untranslated strings. Wrap text with ", "1"], [0, 0, 0, "No untranslated strings. Wrap text with ", "2"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "3"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "4"] + [0, 0, 0, "No untranslated strings. Wrap text with ", "3"] ], "public/app/features/alerting/unified/components/rule-editor/QueryRows.tsx:5381": [ [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], @@ -2426,9 +2399,6 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "22"], [0, 0, 0, "No untranslated strings. Wrap text with ", "23"] ], - "public/app/features/alerting/unified/components/rules/central-state-history/utils.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/field/fieldComparers\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/alerting/unified/components/rules/state-history/LogRecordViewer.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] @@ -2450,9 +2420,6 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "3"], [0, 0, 0, "No untranslated strings. Wrap text with ", "4"] ], - "public/app/features/alerting/unified/components/rules/state-history/useRuleHistoryRecords.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/field/fieldComparers\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/alerting/unified/components/settings/AlertmanagerCard.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], @@ -2674,9 +2641,6 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "1"], [0, 0, 0, "Unexpected any. Specify a different type.", "2"] ], - "public/app/features/alerting/unified/utils/misc.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/types/config\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/alerting/unified/utils/receiver-form.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"], @@ -2693,9 +2657,6 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "6"], [0, 0, 0, "Unexpected any. Specify a different type.", "7"] ], - "public/app/features/alerting/unified/utils/routeTree.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/utils/arrayUtils\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/alerting/unified/utils/rule-form.ts:5381": [ [0, 0, 0, "\'@grafana/runtime/src/utils/DataSourceWithBackend\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] ], @@ -2705,9 +2666,6 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use any type assertions.", "2"], [0, 0, 0, "Unexpected any. Specify a different type.", "3"] ], - "public/app/features/alerting/unified/utils/time.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/datetime/rangeutil\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/annotations/components/AnnotationResultMapper.tsx:5381": [ [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], [0, 0, 0, "No untranslated strings. Wrap text with ", "1"], @@ -2773,9 +2731,8 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "6"] ], "public/app/features/auth-config/AuthProvidersListPage.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/types/config\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "2"] + [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], + [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] ], "public/app/features/auth-config/ProviderConfigForm.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], @@ -2830,9 +2787,6 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"], [0, 0, 0, "Do not use export all (\`export * from ...\`)", "2"] ], - "public/app/features/canvas/element.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/panel/PanelPlugin\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/canvas/elements/notFound.tsx:5381": [ [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] ], @@ -3083,9 +3037,6 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] ], - "public/app/features/dashboard-scene/scene/DashboardLinksControls.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/text/sanitize\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/dashboard-scene/scene/PanelLinks.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] ], @@ -3566,10 +3517,8 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"] ], "public/app/features/dashboard/components/PanelEditor/getVisualizationOptions.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/panel/PanelPlugin\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/data/src/utils/OptionsUIBuilders\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], - [0, 0, 0, "Unexpected any. Specify a different type.", "2"], - [0, 0, 0, "Unexpected any. Specify a different type.", "3"] + [0, 0, 0, "Unexpected any. Specify a different type.", "0"], + [0, 0, 0, "Unexpected any. Specify a different type.", "1"] ], "public/app/features/dashboard/components/PanelEditor/utils.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], @@ -3681,20 +3630,13 @@ exports[`better eslint`] = { "public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboard.tsx:5381": [ [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] ], - "public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboardUtils.test.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/types/query\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/dashboard/components/ShareModal/ViewJsonModal.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] ], - "public/app/features/dashboard/components/SubMenu/DashboardLinks.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/text/sanitize\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/dashboard/components/SubMenu/DashboardLinksDashboard.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/text/sanitize\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "Unexpected any. Specify a different type.", "3"] + [0, 0, 0, "Do not use any type assertions.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], + [0, 0, 0, "Unexpected any. Specify a different type.", "2"] ], "public/app/features/dashboard/components/SubMenu/SubMenu.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] @@ -3807,12 +3749,12 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "11"] ], "public/app/features/dashboard/state/DashboardMigrator.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/labelsToFields\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/merge\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], + [0, 0, 0, "Do not use any type assertions.", "0"], + [0, 0, 0, "Do not use any type assertions.", "1"], [0, 0, 0, "Do not use any type assertions.", "2"], [0, 0, 0, "Do not use any type assertions.", "3"], - [0, 0, 0, "Do not use any type assertions.", "4"], - [0, 0, 0, "Do not use any type assertions.", "5"], + [0, 0, 0, "Unexpected any. Specify a different type.", "4"], + [0, 0, 0, "Unexpected any. Specify a different type.", "5"], [0, 0, 0, "Unexpected any. Specify a different type.", "6"], [0, 0, 0, "Unexpected any. Specify a different type.", "7"], [0, 0, 0, "Unexpected any. Specify a different type.", "8"], @@ -3834,9 +3776,7 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "24"], [0, 0, 0, "Unexpected any. Specify a different type.", "25"], [0, 0, 0, "Unexpected any. Specify a different type.", "26"], - [0, 0, 0, "Unexpected any. Specify a different type.", "27"], - [0, 0, 0, "Unexpected any. Specify a different type.", "28"], - [0, 0, 0, "Unexpected any. Specify a different type.", "29"] + [0, 0, 0, "Unexpected any. Specify a different type.", "27"] ], "public/app/features/dashboard/state/DashboardModel.repeat.test.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], @@ -3949,10 +3889,9 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "2"] ], "public/app/features/datasources/components/CloudInfoBox.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/types/config\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "3"] + [0, 0, 0, "No untranslated strings. Wrap text with ", "2"] ], "public/app/features/datasources/components/DashboardsTable.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], @@ -4133,8 +4072,7 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use export all (\`export * from ...\`)", "7"] ], "public/app/features/dimensions/scale.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/field/scale\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"] + [0, 0, 0, "Do not use any type assertions.", "0"] ], "public/app/features/dimensions/types.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] @@ -4212,9 +4150,6 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "1"], [0, 0, 0, "No untranslated strings. Wrap text with ", "2"] ], - "public/app/features/explore/Logs/Logs.test.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/organize\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/explore/Logs/Logs.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], @@ -4238,9 +4173,6 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] ], - "public/app/features/explore/Logs/LogsMetaRow.test.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/organize\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/explore/Logs/LogsMetaRow.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], @@ -4255,9 +4187,6 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "3"], [0, 0, 0, "No untranslated strings. Wrap text with ", "4"] ], - "public/app/features/explore/Logs/LogsTable.test.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/organize\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/explore/Logs/LogsTableAvailableFields.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] ], @@ -4273,9 +4202,6 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings. Wrap text with ", "2"] ], - "public/app/features/explore/Logs/LogsTableWrap.test.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/organize\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/explore/Logs/LogsTableWrap.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], @@ -4556,9 +4482,6 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "2"], [0, 0, 0, "Unexpected any. Specify a different type.", "3"] ], - "public/app/features/explore/state/main.test.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/utils/url\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/explore/state/time.test.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], @@ -4748,10 +4671,9 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] ], "public/app/features/live/centrifuge/LiveDataStream.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/dataframe/StreamingDataFrame\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/runtime/src/services/live\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], - [0, 0, 0, "\'@grafana/runtime/src/utils/toDataQueryError\' import is restricted from being used by a pattern. Import from the public export instead.", "2"], - [0, 0, 0, "Do not use any type assertions.", "3"] + [0, 0, 0, "\'@grafana/runtime/src/services/live\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "\'@grafana/runtime/src/utils/toDataQueryError\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], + [0, 0, 0, "Do not use any type assertions.", "2"] ], "public/app/features/live/centrifuge/channel.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] @@ -4773,12 +4695,8 @@ exports[`better eslint`] = { "public/app/features/live/live.ts:5381": [ [0, 0, 0, "\'@grafana/runtime/src/utils/DataSourceWithBackend\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] ], - "public/app/features/logs/components/InfiniteScroll.test.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/datetime/rangeutil\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/logs/components/InfiniteScroll.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/datetime/rangeutil\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] + [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] ], "public/app/features/logs/components/LogDetails.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], @@ -4826,9 +4744,6 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "4"], [0, 0, 0, "No untranslated strings. Wrap text with ", "5"] ], - "public/app/features/logs/logsModel.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/valueFormats/symbolFormatters\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/logs/utils.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], @@ -5168,24 +5083,15 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] ], - "public/app/features/plugins/extensions/registry/AddedLinksRegistry.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/types/pluginExtensions\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/plugins/extensions/usePluginComponents.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], "public/app/features/plugins/extensions/usePluginFunctions.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], - "public/app/features/plugins/extensions/validators.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/types/pluginExtensions\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/plugins/loader/sharedDependencies.ts:5381": [ [0, 0, 0, "* import is invalid because \'Layout,HorizontalGroup,VerticalGroup\' from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"] ], - "public/app/features/plugins/pluginPreloader.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/types/pluginExtensions\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/plugins/sandbox/distortion_map.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], @@ -5570,8 +5476,7 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] ], "public/app/features/trails/DataTrailsHistory.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/datetime/rangeutil\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] + [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] ], "public/app/features/trails/MetricScene.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], @@ -5605,21 +5510,16 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] ], "public/app/features/transformers/FilterByValueTransformer/FilterByValueFilterEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/filterByValue\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"] - ], - "public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.test.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/filterByValue\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"] ], "public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/filterByValue\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "3"] + [0, 0, 0, "No untranslated strings. Wrap text with ", "2"] ], "public/app/features/transformers/FilterByValueTransformer/ValueMatchers/BasicMatcherEditor.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], @@ -5655,13 +5555,9 @@ exports[`better eslint`] = { "public/app/features/transformers/calculateHeatmap/editor/helper.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], - "public/app/features/transformers/calculateHeatmap/heatmap.test.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/dataframe/processDataFrame\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/transformers/calculateHeatmap/heatmap.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/joinDataFrames\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"], - [0, 0, 0, "Do not use any type assertions.", "2"] + [0, 0, 0, "Do not use any type assertions.", "0"], + [0, 0, 0, "Do not use any type assertions.", "1"] ], "public/app/features/transformers/configFromQuery/ConfigFromQueryTransformerEditor.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], @@ -5669,66 +5565,58 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] ], "public/app/features/transformers/editors/CalculateFieldTransformerEditor/BinaryOperationOptionsEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/calculateField\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] - ], - "public/app/features/transformers/editors/CalculateFieldTransformerEditor/CalculateFieldTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/calculateField\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] - ], - "public/app/features/transformers/editors/CalculateFieldTransformerEditor/CumulativeOptionsEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/calculateField\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"] - ], - "public/app/features/transformers/editors/CalculateFieldTransformerEditor/IndexOptionsEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/calculateField\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] ], - "public/app/features/transformers/editors/CalculateFieldTransformerEditor/ReduceRowOptionsEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/calculateField\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "1"], - [0, 0, 0, "Do not use any type assertions.", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"] + "public/app/features/transformers/editors/CalculateFieldTransformerEditor/CalculateFieldTransformerEditor.tsx:5381": [ + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] ], - "public/app/features/transformers/editors/CalculateFieldTransformerEditor/UnaryOperationEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/calculateField\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + "public/app/features/transformers/editors/CalculateFieldTransformerEditor/CumulativeOptionsEditor.tsx:5381": [ + [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "4"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] + ], + "public/app/features/transformers/editors/CalculateFieldTransformerEditor/IndexOptionsEditor.tsx:5381": [ + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"] + ], + "public/app/features/transformers/editors/CalculateFieldTransformerEditor/ReduceRowOptionsEditor.tsx:5381": [ + [0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"], + [0, 0, 0, "Do not use any type assertions.", "1"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] + ], + "public/app/features/transformers/editors/CalculateFieldTransformerEditor/UnaryOperationEditor.tsx:5381": [ + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], + [0, 0, 0, "No untranslated strings. Wrap text with ", "3"] ], "public/app/features/transformers/editors/CalculateFieldTransformerEditor/WindowOptionsEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/calculateField\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"], + [0, 0, 0, "Do not use any type assertions.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "6"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "7"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "6"] ], "public/app/features/transformers/editors/CalculateFieldTransformerEditor/index.ts:5381": [ [0, 0, 0, "Do not re-export imported variable (\`CalculateFieldTransformerEditor\`)", "0"], [0, 0, 0, "Do not re-export imported variable (\`calculateFieldTransformRegistryItem\`)", "1"] ], "public/app/features/transformers/editors/ConcatenateTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/concat\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] ], "public/app/features/transformers/editors/ConvertFieldTypeTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/convertFieldType\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"], + [0, 0, 0, "Do not use any type assertions.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], @@ -5743,15 +5631,13 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "13"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "14"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "15"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "16"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "17"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "16"] ], "public/app/features/transformers/editors/EnumMappingEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/convertFieldType\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "1"], - [0, 0, 0, "\'VerticalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "2"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "3"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "4"] + [0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"], + [0, 0, 0, "\'VerticalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "1"], + [0, 0, 0, "No untranslated strings. Wrap text with ", "2"], + [0, 0, 0, "No untranslated strings. Wrap text with ", "3"] ], "public/app/features/transformers/editors/EnumMappingRow.tsx:5381": [ [0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"], @@ -5759,49 +5645,40 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] ], "public/app/features/transformers/editors/FilterByNameTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/filterByName\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/runtime/src/services\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "6"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "7"] - ], - "public/app/features/transformers/editors/FilterByRefIdTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/filterByRefId\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], - "public/app/features/transformers/editors/FormatStringTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/formatString\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "\'@grafana/runtime/src/services\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] - ], - "public/app/features/transformers/editors/FormatTimeTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/formatTime\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "6"] - ], - "public/app/features/transformers/editors/GroupByTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/groupBy\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"] - ], - "public/app/features/transformers/editors/GroupToNestedTableTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/groupBy\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/groupToNestedTable\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "6"] ], + "public/app/features/transformers/editors/FormatStringTransformerEditor.tsx:5381": [ + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] + ], + "public/app/features/transformers/editors/FormatTimeTransformerEditor.tsx:5381": [ + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], + [0, 0, 0, "No untranslated strings. Wrap text with ", "5"] + ], + "public/app/features/transformers/editors/GroupByTransformerEditor.tsx:5381": [ + [0, 0, 0, "Do not use any type assertions.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] + ], + "public/app/features/transformers/editors/GroupToNestedTableTransformerEditor.tsx:5381": [ + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"] + ], "public/app/features/transformers/editors/GroupingToMatrixTransformerEditor.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], @@ -5809,73 +5686,59 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] ], "public/app/features/transformers/editors/HistogramTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/histogram\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] ], "public/app/features/transformers/editors/JoinByFieldTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/joinByField\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] + ], + "public/app/features/transformers/editors/LabelsToFieldsTransformerEditor.tsx:5381": [ + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"] + ], + "public/app/features/transformers/editors/LimitTransformerEditor.tsx:5381": [ + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] + ], + "public/app/features/transformers/editors/MergeTransformerEditor.tsx:5381": [ + [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] + ], + "public/app/features/transformers/editors/OrganizeFieldsTransformerEditor.tsx:5381": [ + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], + [0, 0, 0, "No untranslated strings. Wrap text with ", "2"] + ], + "public/app/features/transformers/editors/ReduceTransformerEditor.tsx:5381": [ + [0, 0, 0, "Do not use any type assertions.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"] + ], + "public/app/features/transformers/editors/RenameByRegexTransformer.tsx:5381": [ + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] ], - "public/app/features/transformers/editors/LabelsToFieldsTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/labelsToFields\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"] - ], - "public/app/features/transformers/editors/LimitTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/limit\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"] - ], - "public/app/features/transformers/editors/MergeTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/merge\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] - ], - "public/app/features/transformers/editors/OrganizeFieldsTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/order\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/organize\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "4"] - ], - "public/app/features/transformers/editors/ReduceTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/reduce\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "6"] - ], - "public/app/features/transformers/editors/RenameByRegexTransformer.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/renameByRegex\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"] - ], - "public/app/features/transformers/editors/SeriesToRowsTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/seriesToRows\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/transformers/editors/SortByTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/sortBy\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"], + [0, 0, 0, "Do not use any type assertions.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] ], "public/app/features/transformers/editors/TransposeTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/transpose\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"] ], "public/app/features/transformers/extractFields/ExtractFieldsTransformerEditor.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], @@ -5902,11 +5765,6 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "5"], [0, 0, 0, "No untranslated strings. Wrap text with ", "6"] ], - "public/app/features/transformers/extractFields/extractFields.test.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/dataframe/processDataFrame\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/sortBy\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], - [0, 0, 0, "\'@grafana/data/src/utils/tests/mockTransformationsRegistry\' import is restricted from being used by a pattern. Import from the public export instead.", "2"] - ], "public/app/features/transformers/extractFields/extractFields.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"] @@ -5949,10 +5807,6 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] ], - "public/app/features/transformers/lookupGazetteer/fieldLookup.test.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/dataframe/processDataFrame\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/ids\' import is restricted from being used by a pattern. Import from the public export instead.", "1"] - ], "public/app/features/transformers/lookupGazetteer/fieldLookup.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], @@ -5966,10 +5820,6 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "6"], [0, 0, 0, "No untranslated strings. Wrap text with ", "7"] ], - "public/app/features/transformers/partitionByValues/partitionByValues.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/filterByName\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/noop\' import is restricted from being used by a pattern. Import from the public export instead.", "1"] - ], "public/app/features/transformers/prepareTimeSeries/PrepareTimeSeriesEditor.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], @@ -6004,18 +5854,12 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"] ], "public/app/features/transformers/spatial/optionsHelper.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/panel/PanelPlugin\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/data/src/utils/OptionsUIBuilders\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], + [0, 0, 0, "Do not use any type assertions.", "0"], + [0, 0, 0, "Do not use any type assertions.", "1"], [0, 0, 0, "Do not use any type assertions.", "2"], - [0, 0, 0, "Do not use any type assertions.", "3"], - [0, 0, 0, "Do not use any type assertions.", "4"], - [0, 0, 0, "Unexpected any. Specify a different type.", "5"], - [0, 0, 0, "Unexpected any. Specify a different type.", "6"], - [0, 0, 0, "Unexpected any. Specify a different type.", "7"] - ], - "public/app/features/transformers/spatial/spatialTransformer.test.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/dataframe/processDataFrame\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/ids\' import is restricted from being used by a pattern. Import from the public export instead.", "1"] + [0, 0, 0, "Unexpected any. Specify a different type.", "3"], + [0, 0, 0, "Unexpected any. Specify a different type.", "4"], + [0, 0, 0, "Unexpected any. Specify a different type.", "5"] ], "public/app/features/transformers/suggestionsInput/SuggestionsInput.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], @@ -6298,9 +6142,6 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"] ], - "public/app/plugins/datasource/azuremonitor/__mocks__/utils.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/types/data\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/plugins/datasource/azuremonitor/azureMetadata/index.ts:5381": [ [0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"], [0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"] @@ -6471,9 +6312,6 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "1"], [0, 0, 0, "Unexpected any. Specify a different type.", "2"] ], - "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchMetricsQueryRunner.test.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/datetime/moment_wrapper\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/plugins/datasource/cloudwatch/types.ts:5381": [ [0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"], @@ -6496,9 +6334,9 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use any type assertions.", "1"] ], "public/app/plugins/datasource/elasticsearch/ElasticResponse.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/convertFieldType\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"], - [0, 0, 0, "Do not use any type assertions.", "2"], + [0, 0, 0, "Unexpected any. Specify a different type.", "2"], [0, 0, 0, "Unexpected any. Specify a different type.", "3"], [0, 0, 0, "Unexpected any. Specify a different type.", "4"], [0, 0, 0, "Unexpected any. Specify a different type.", "5"], @@ -6527,8 +6365,7 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "28"], [0, 0, 0, "Unexpected any. Specify a different type.", "29"], [0, 0, 0, "Unexpected any. Specify a different type.", "30"], - [0, 0, 0, "Unexpected any. Specify a different type.", "31"], - [0, 0, 0, "Unexpected any. Specify a different type.", "32"] + [0, 0, 0, "Unexpected any. Specify a different type.", "31"] ], "public/app/plugins/datasource/elasticsearch/LanguageProvider.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], @@ -6903,22 +6740,15 @@ exports[`better eslint`] = { [0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"] ], "public/app/plugins/panel/barchart/bars.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/themes/colorManipulator\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"] + [0, 0, 0, "Do not use any type assertions.", "0"] ], "public/app/plugins/panel/barchart/quadtree.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], - "public/app/plugins/panel/barchart/utils.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/field/fieldState\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/plugins/panel/candlestick/CandlestickPanel.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"] ], - "public/app/plugins/panel/candlestick/fields.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/joinDataFrames\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/plugins/panel/candlestick/types.ts:5381": [ [0, 0, 0, "Do not re-export imported variable (\`CandleStyle\`)", "0"], [0, 0, 0, "Do not re-export imported variable (\`CandlestickColors\`)", "1"], @@ -6929,28 +6759,6 @@ exports[`better eslint`] = { [0, 0, 0, "Do not re-export imported variable (\`VizDisplayMode\`)", "6"], [0, 0, 0, "Do not re-export imported variable (\`defaultCandlestickColors\`)", "7"] ], - "public/app/plugins/panel/canvas/components/CanvasTooltip.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/types/action\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], - "public/app/plugins/panel/canvas/editor/connectionEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/utils/OptionsUIBuilders\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], - "public/app/plugins/panel/canvas/editor/element/elementEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/utils/OptionsUIBuilders\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], - "public/app/plugins/panel/canvas/editor/inline/InlineEditBody.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/panel/PanelPlugin\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/data/src/utils/OptionsUIBuilders\' import is restricted from being used by a pattern. Import from the public export instead.", "1"] - ], - "public/app/plugins/panel/canvas/editor/layer/layerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/utils/OptionsUIBuilders\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], - "public/app/plugins/panel/canvas/editor/options.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/panel/PanelPlugin\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], - "public/app/plugins/panel/datagrid/components/DatagridContextMenu.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/convertFieldType\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/plugins/panel/debug/CursorView.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"] @@ -6963,10 +6771,9 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], "public/app/plugins/panel/geomap/components/MarkersLegend.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/field/scale\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"], - [0, 0, 0, "Do not use any type assertions.", "2"], - [0, 0, 0, "Unexpected any. Specify a different type.", "3"] + [0, 0, 0, "Unexpected any. Specify a different type.", "2"] ], "public/app/plugins/panel/geomap/editor/GeomapStyleRulesEditor.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] @@ -6992,9 +6799,6 @@ exports[`better eslint`] = { "public/app/plugins/panel/geomap/editor/StyleRuleEditor.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], - "public/app/plugins/panel/geomap/editor/layerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/utils/OptionsUIBuilders\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/plugins/panel/geomap/layers/basemaps/esri.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], @@ -7002,8 +6806,7 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use any type assertions.", "0"] ], "public/app/plugins/panel/geomap/layers/data/routeLayer.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/themes/colorManipulator\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"] + [0, 0, 0, "Do not use any type assertions.", "0"] ], "public/app/plugins/panel/geomap/layers/registry.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], @@ -7016,9 +6819,6 @@ exports[`better eslint`] = { "public/app/plugins/panel/geomap/types.ts:5381": [ [0, 0, 0, "Do not re-export imported variable (\`./panelcfg.gen\`)", "0"] ], - "public/app/plugins/panel/geomap/utils/checkFeatureMatchesStyleRule.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/matchers/compareValues\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/plugins/panel/geomap/utils/layers.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], @@ -7059,27 +6859,12 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use any type assertions.", "15"], [0, 0, 0, "Do not use any type assertions.", "16"] ], - "public/app/plugins/panel/histogram/Histogram.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/histogram\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], - "public/app/plugins/panel/histogram/HistogramPanel.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/histogram\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], - "public/app/plugins/panel/histogram/module.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/histogram\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], - "public/app/plugins/panel/histogram/utils.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/histogram\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/plugins/panel/live/LivePanel.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], "public/app/plugins/panel/logs/LogsPanel.test.tsx:5381": [ [0, 0, 0, "* import is invalid because \'Layout,HorizontalGroup,VerticalGroup\' from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"] ], - "public/app/plugins/panel/logs/LogsPanel.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/datetime/rangeutil\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/plugins/panel/logs/types.ts:5381": [ [0, 0, 0, "Do not re-export imported variable (\`./panelcfg.gen\`)", "0"] ], @@ -7113,9 +6898,6 @@ exports[`better eslint`] = { "public/app/plugins/panel/stat/StatMigrations.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], - "public/app/plugins/panel/stat/StatPanel.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/field/fieldOverrides\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/plugins/panel/state-timeline/migrations.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"] @@ -7124,11 +6906,10 @@ exports[`better eslint`] = { [0, 0, 0, "\'VerticalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"] ], "public/app/plugins/panel/table/migrations.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/reduce\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "Unexpected any. Specify a different type.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"], [0, 0, 0, "Unexpected any. Specify a different type.", "2"], - [0, 0, 0, "Unexpected any. Specify a different type.", "3"], - [0, 0, 0, "Unexpected any. Specify a different type.", "4"] + [0, 0, 0, "Unexpected any. Specify a different type.", "3"] ], "public/app/plugins/panel/text/textPanelMigrationHandler.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] @@ -7167,31 +6948,17 @@ exports[`better eslint`] = { [0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"] ], - "public/app/plugins/panel/timeseries/utils.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/convertFieldType\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/nulls/nullInsertThreshold\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/nulls/nullToValue\' import is restricted from being used by a pattern. Import from the public export instead.", "2"] - ], - "public/app/plugins/panel/trend/TrendPanel.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/joinDataFrames\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/plugins/panel/xychart/SeriesEditor.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"], [0, 0, 0, "Do not use any type assertions.", "2"], [0, 0, 0, "Do not use any type assertions.", "3"] ], - "public/app/plugins/panel/xychart/XYChartPanel.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/themes/colorManipulator\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], - "public/app/plugins/panel/xychart/XYChartTooltip.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/themes/colorManipulator\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/plugins/panel/xychart/migrations.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], "public/app/plugins/panel/xychart/scatter.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/themes/colorManipulator\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"], [0, 0, 0, "Do not use any type assertions.", "2"], [0, 0, 0, "Do not use any type assertions.", "3"], @@ -7205,14 +6972,10 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use any type assertions.", "11"], [0, 0, 0, "Do not use any type assertions.", "12"], [0, 0, 0, "Do not use any type assertions.", "13"], - [0, 0, 0, "Do not use any type assertions.", "14"], + [0, 0, 0, "Unexpected any. Specify a different type.", "14"], [0, 0, 0, "Unexpected any. Specify a different type.", "15"], [0, 0, 0, "Unexpected any. Specify a different type.", "16"], - [0, 0, 0, "Unexpected any. Specify a different type.", "17"], - [0, 0, 0, "Unexpected any. Specify a different type.", "18"] - ], - "public/app/plugins/panel/xychart/utils.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/field/fieldState\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + [0, 0, 0, "Unexpected any. Specify a different type.", "17"] ], "public/app/plugins/sdk.ts:5381": [ [0, 0, 0, "Do not re-export imported variable (\`loadPluginCss\`)", "0"] diff --git a/packages/grafana-data/package.json b/packages/grafana-data/package.json index c33053087f2..aad57fcef43 100644 --- a/packages/grafana-data/package.json +++ b/packages/grafana-data/package.json @@ -15,6 +15,26 @@ }, "main": "src/index.ts", "types": "src/index.ts", + "module": "src/index.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": "./src/index.ts", + "require": "./src/index.ts" + }, + "./internal": { + "import": "./src/internal/index.ts", + "require": "./src/internal/index.ts" + }, + "./unstable": { + "import": "./src/unstable.ts", + "require": "./src/unstable.ts" + }, + "./test": { + "import": "./test/index.ts", + "require": "./test/index.ts" + } + }, "publishConfig": { "main": "./dist/cjs/index.cjs", "module": "./dist/esm/index.mjs", diff --git a/packages/grafana-data/src/internal/index.ts b/packages/grafana-data/src/internal/index.ts new file mode 100644 index 00000000000..c0e52d01c67 --- /dev/null +++ b/packages/grafana-data/src/internal/index.ts @@ -0,0 +1,100 @@ +/** + * This file is used to share internal grafana/data code with Grafana core. + * Note that these exports are also used within Enterprise. + * + * Through the exports declared in package.json we can import this code in core Grafana and the grafana/data + * package will continue to be able to access all code when it's published to npm as it's private to the package. + * + * During the yarn pack lifecycle the exports[./internal] property is deleted from the package.json + * preventing the code from being importable by plugins or other npm packages making it truly "internal". + * + */ + +export { actionsOverrideProcessor } from '../field/overrides/processors'; +export { nullToUndefThreshold } from '../transformations/transformers/nulls/nullToUndefThreshold'; +export { applyNullInsertThreshold } from '../transformations/transformers/nulls/nullInsertThreshold'; +export { + NULL_EXPAND, + NULL_REMOVE, + NULL_RETAIN, + isLikelyAscendingVector, + maybeSortFrame, +} from '../transformations/transformers/joinDataFrames'; +export { ConcatenateFrameNameMode, type ConcatenateTransformerOptions } from '../transformations/transformers/concat'; +export { + type ConvertFieldTypeOptions, + type ConvertFieldTypeTransformerOptions, + convertFieldType, +} from '../transformations/transformers/convertFieldType'; +export { type FilterFieldsByNameTransformerOptions } from '../transformations/transformers/filterByName'; +export { type FilterFramesByRefIdTransformerOptions } from '../transformations/transformers/filterByRefId'; +export { FormatStringOutput, type FormatStringTransformerOptions } from '../transformations/transformers/formatString'; +export { organizeFieldsTransformer } from '../transformations/transformers/organize'; +export { labelsToFieldsTransformer } from '../transformations/transformers/labelsToFields'; +export { type FormatTimeTransformerOptions } from '../transformations/transformers/formatTime'; +export { + type GroupByFieldOptions, + GroupByOperationID, + type GroupByTransformerOptions, +} from '../transformations/transformers/groupBy'; +export { + type GroupToNestedTableTransformerOptions, + SHOW_NESTED_HEADERS_DEFAULT, +} from '../transformations/transformers/groupToNestedTable'; +export { + type BinaryValue, + type BinaryOptions, + CalculateFieldMode, + type CalculateFieldTransformerOptions, + getNameFromOptions, + defaultWindowOptions, + checkBinaryValueType, + type CumulativeOptions, + type ReduceOptions, + type UnaryOptions, + WindowAlignment, + type WindowOptions, + WindowSizeMode, +} from '../transformations/transformers/calculateField'; +export { type SeriesToRowsTransformerOptions } from '../transformations/transformers/seriesToRows'; +export { histogramFieldInfo, type HistogramTransformerInputs } from '../transformations/transformers/histogram'; +export { type JoinByFieldOptions, JoinMode } from '../transformations/transformers/joinByField'; +export { LabelsToFieldsMode, type LabelsToFieldsOptions } from '../transformations/transformers/labelsToFields'; +export { type LimitTransformerOptions } from '../transformations/transformers/limit'; +export { type MergeTransformerOptions } from '../transformations/transformers/merge'; +export { ReduceTransformerMode, type ReduceTransformerOptions } from '../transformations/transformers/reduce'; +export { createOrderFieldsComparer } from '../transformations/transformers/order'; +export { type RenameByRegexTransformerOptions } from '../transformations/transformers/renameByRegex'; +export { type OrganizeFieldsTransformerOptions } from '../transformations/transformers/organize'; +export { compareValues } from '../transformations/matchers/compareValues'; +export { + type SortByField, + type SortByTransformerOptions, + sortByTransformer, +} from '../transformations/transformers/sortBy'; +export { type TransposeTransformerOptions } from '../transformations/transformers/transpose'; +export { + type FilterByValueTransformerOptions, + FilterByValueMatch, + FilterByValueType, + type FilterByValueFilter, +} from '../transformations/transformers/filterByValue'; +export { getMatcherConfig } from '../transformations/transformers/filterByName'; +export { mockTransformationsRegistry } from '../utils/tests/mockTransformationsRegistry'; +export { noopTransformer } from '../transformations/transformers/noop'; +export { DataTransformerID } from '../transformations/transformers/ids'; + +export { mergeTransformer } from '../transformations/transformers/merge'; +export { getThemeById } from '../themes/registry'; +export { GrafanaEdition } from '../types/config'; +export { SIPrefix } from '../valueFormats/symbolFormatters'; + +export { type PluginAddedLinksConfigureFunc, type PluginExtensionEventHelpers } from '../types/pluginExtensions'; + +export { getStreamingFrameOptions } from '../dataframe/StreamingDataFrame'; +export { fieldIndexComparer } from '../field/fieldComparers'; +export { decoupleHideFromState } from '../field/fieldState'; +export { findNumericFieldMinMax } from '../field/fieldOverrides'; +export { type PanelOptionsSupplier } from '../panel/PanelPlugin'; +export { sanitize, sanitizeUrl } from '../text/sanitize'; +export { type NestedValueAccess, type NestedPanelOptions, isNestedPanelOptions } from '../utils/OptionsUIBuilders'; diff --git a/packages/grafana-data/src/panel/getPanelOptionsWithDefaults.test.ts b/packages/grafana-data/src/panel/getPanelOptionsWithDefaults.test.ts index 01b42612f1d..f155696053d 100644 --- a/packages/grafana-data/src/panel/getPanelOptionsWithDefaults.test.ts +++ b/packages/grafana-data/src/panel/getPanelOptionsWithDefaults.test.ts @@ -11,8 +11,7 @@ import { ThresholdsMode, } from '@grafana/data'; -import { getPanelPlugin } from '../../test/__mocks__/pluginMocks'; -import { mockStandardFieldConfigOptions } from '../../test/helpers/fieldConfig'; +import { getPanelPlugin, mockStandardFieldConfigOptions } from '../../test'; import { getPanelOptionsWithDefaults, restoreCustomOverrideRules } from './getPanelOptionsWithDefaults'; diff --git a/packages/grafana-data/test/__mocks__/pluginMocks.ts b/packages/grafana-data/test/helpers/pluginMocks.ts similarity index 98% rename from packages/grafana-data/test/__mocks__/pluginMocks.ts rename to packages/grafana-data/test/helpers/pluginMocks.ts index 226d6eb87cb..1fe23bb46f3 100644 --- a/packages/grafana-data/test/__mocks__/pluginMocks.ts +++ b/packages/grafana-data/test/helpers/pluginMocks.ts @@ -1,7 +1,7 @@ import { defaultsDeep } from 'lodash'; import { ComponentType } from 'react'; -import { PanelPluginMeta, PluginMeta, PluginType, PanelPlugin, PanelProps } from '../../src'; +import { PanelPluginMeta, PluginMeta, PluginType, PanelPlugin, PanelProps } from '../../'; export const getMockPlugins = (amount: number): PluginMeta[] => { const plugins: PluginMeta[] = []; diff --git a/packages/grafana-data/test/index.ts b/packages/grafana-data/test/index.ts new file mode 100644 index 00000000000..c6f6494b213 --- /dev/null +++ b/packages/grafana-data/test/index.ts @@ -0,0 +1,2 @@ +export { getMockPlugin, getMockPlugins, getPanelPlugin } from './helpers/pluginMocks'; +export { mockStandardFieldConfigOptions } from './helpers/fieldConfig'; diff --git a/packages/grafana-prometheus/src/querybuilder/operationUtils.ts b/packages/grafana-prometheus/src/querybuilder/operationUtils.ts index bf5bc98c0ad..36b9a3f6bd8 100644 --- a/packages/grafana-prometheus/src/querybuilder/operationUtils.ts +++ b/packages/grafana-prometheus/src/querybuilder/operationUtils.ts @@ -2,7 +2,7 @@ import { capitalize } from 'lodash'; import pluralize from 'pluralize'; -import { SelectableValue } from '@grafana/data/src'; +import { SelectableValue } from '@grafana/data'; import { LabelParamEditor } from './components/LabelParamEditor'; import { diff --git a/public/app/core/components/GraphNG/utils.ts b/public/app/core/components/GraphNG/utils.ts index b0c4368f3bb..34757b4d81a 100644 --- a/public/app/core/components/GraphNG/utils.ts +++ b/public/app/core/components/GraphNG/utils.ts @@ -1,7 +1,5 @@ -import { DataFrame, Field, FieldType, outerJoinDataFrames, TimeRange } from '@grafana/data'; -import { NULL_EXPAND, NULL_REMOVE, NULL_RETAIN } from '@grafana/data/src/transformations/transformers/joinDataFrames'; -import { applyNullInsertThreshold } from '@grafana/data/src/transformations/transformers/nulls/nullInsertThreshold'; -import { nullToUndefThreshold } from '@grafana/data/src/transformations/transformers/nulls/nullToUndefThreshold'; +import { DataFrame, Field, FieldType, outerJoinDataFrames, TimeRange, applyNullInsertThreshold } from '@grafana/data'; +import { NULL_EXPAND, NULL_REMOVE, NULL_RETAIN, nullToUndefThreshold } from '@grafana/data/internal'; import { GraphDrawStyle } from '@grafana/schema'; import { XYFieldMatchers } from './types'; diff --git a/public/app/core/components/OptionsUI/registry.tsx b/public/app/core/components/OptionsUI/registry.tsx index da20681e556..d1c51c96de8 100644 --- a/public/app/core/components/OptionsUI/registry.tsx +++ b/public/app/core/components/OptionsUI/registry.tsx @@ -29,7 +29,7 @@ import { Action, DataLinksFieldConfigSettings, } from '@grafana/data'; -import { actionsOverrideProcessor } from '@grafana/data/src/field/overrides/processors'; +import { actionsOverrideProcessor } from '@grafana/data/internal'; import { FieldConfig } from '@grafana/schema'; import { RadioButtonGroup, TimeZonePicker, Switch } from '@grafana/ui'; import { FieldNamePicker } from '@grafana/ui/internal'; diff --git a/public/app/core/components/TimelineChart/timeline.ts b/public/app/core/components/TimelineChart/timeline.ts index 68acea164f6..8fa0a8faef1 100644 --- a/public/app/core/components/TimelineChart/timeline.ts +++ b/public/app/core/components/TimelineChart/timeline.ts @@ -1,7 +1,6 @@ import uPlot, { Series } from 'uplot'; -import { GrafanaTheme2, TimeRange } from '@grafana/data'; -import { alpha } from '@grafana/data/src/themes/colorManipulator'; +import { GrafanaTheme2, TimeRange, colorManipulator } from '@grafana/data'; import { TimelineValueAlignment, VisibilityMode } from '@grafana/schema'; import { FIXED_UNIT } from '@grafana/ui'; import { distribute, SPACE_BETWEEN } from 'app/plugins/panel/barchart/distribute'; @@ -533,5 +532,5 @@ function getFillColor(fieldConfig: { fillOpacity?: number; lineWidth?: number }, } const opacityPercent = (fieldConfig.fillOpacity ?? 100) / 100; - return alpha(color, opacityPercent); + return colorManipulator.alpha(color, opacityPercent); } diff --git a/public/app/core/components/TimelineChart/utils.ts b/public/app/core/components/TimelineChart/utils.ts index bf38c4bc5c5..a9af674a839 100644 --- a/public/app/core/components/TimelineChart/utils.ts +++ b/public/app/core/components/TimelineChart/utils.ts @@ -18,10 +18,10 @@ import { outerJoinDataFrames, ValueMapping, ThresholdsConfig, + applyNullInsertThreshold, + nullToValue, } from '@grafana/data'; -import { maybeSortFrame, NULL_RETAIN } from '@grafana/data/src/transformations/transformers/joinDataFrames'; -import { applyNullInsertThreshold } from '@grafana/data/src/transformations/transformers/nulls/nullInsertThreshold'; -import { nullToValue } from '@grafana/data/src/transformations/transformers/nulls/nullToValue'; +import { maybeSortFrame, NULL_RETAIN } from '@grafana/data/internal'; import { VizLegendOptions, AxisPlacement, diff --git a/public/app/core/services/echo/backends/grafana-javascript-agent/GrafanaJavascriptAgentBackend.test.ts b/public/app/core/services/echo/backends/grafana-javascript-agent/GrafanaJavascriptAgentBackend.test.ts index 5ee5b184736..ca92345ccac 100644 --- a/public/app/core/services/echo/backends/grafana-javascript-agent/GrafanaJavascriptAgentBackend.test.ts +++ b/public/app/core/services/echo/backends/grafana-javascript-agent/GrafanaJavascriptAgentBackend.test.ts @@ -1,5 +1,5 @@ import { BuildInfo } from '@grafana/data'; -import { GrafanaEdition } from '@grafana/data/src/types/config'; +import { GrafanaEdition } from '@grafana/data/internal'; import { Faro, Instrumentation } from '@grafana/faro-core'; import * as faroWebSdkModule from '@grafana/faro-web-sdk'; import { BrowserConfig, FetchTransport } from '@grafana/faro-web-sdk'; diff --git a/public/app/core/services/theme.ts b/public/app/core/services/theme.ts index b244b95e012..30d63375f6b 100644 --- a/public/app/core/services/theme.ts +++ b/public/app/core/services/theme.ts @@ -1,4 +1,4 @@ -import { getThemeById } from '@grafana/data/src/themes/registry'; +import { getThemeById } from '@grafana/data/internal'; import { ThemeChangedEvent } from '@grafana/runtime'; import appEvents from '../app_events'; diff --git a/public/app/core/utils/explore.test.ts b/public/app/core/utils/explore.test.ts index 76da92421a9..011380fed79 100644 --- a/public/app/core/utils/explore.test.ts +++ b/public/app/core/utils/explore.test.ts @@ -1,5 +1,12 @@ -import { DataSourceApi, dateTime, ExploreUrlState, GrafanaConfig, locationUtil, LogsSortOrder } from '@grafana/data'; -import { serializeStateToUrlParam } from '@grafana/data/src/utils/url'; +import { + DataSourceApi, + dateTime, + ExploreUrlState, + GrafanaConfig, + locationUtil, + LogsSortOrder, + serializeStateToUrlParam, +} from '@grafana/data'; import { config } from '@grafana/runtime'; import { DataQuery } from '@grafana/schema'; import { RefreshPicker } from '@grafana/ui'; diff --git a/public/app/core/utils/richHistory.ts b/public/app/core/utils/richHistory.ts index b99a16f5ceb..8816613a51b 100644 --- a/public/app/core/utils/richHistory.ts +++ b/public/app/core/utils/richHistory.ts @@ -1,7 +1,13 @@ import { omit } from 'lodash'; -import { DataQuery, DataSourceApi, dateTimeFormat, ExploreUrlState, urlUtil } from '@grafana/data'; -import { serializeStateToUrlParam } from '@grafana/data/src/utils/url'; +import { + DataQuery, + DataSourceApi, + dateTimeFormat, + ExploreUrlState, + urlUtil, + serializeStateToUrlParam, +} from '@grafana/data'; import { getDataSourceSrv } from '@grafana/runtime'; import { notifyApp } from 'app/core/actions'; import { createErrorNotification, createWarningNotification } from 'app/core/copy/appNotification'; diff --git a/public/app/features/admin/UserListPublicDashboardPage/DashboardsListModalButton.tsx b/public/app/features/admin/UserListPublicDashboardPage/DashboardsListModalButton.tsx index cc0284d753d..87d3b1fe591 100644 --- a/public/app/features/admin/UserListPublicDashboardPage/DashboardsListModalButton.tsx +++ b/public/app/features/admin/UserListPublicDashboardPage/DashboardsListModalButton.tsx @@ -1,6 +1,6 @@ import { css, cx } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors/src'; import { config } from '@grafana/runtime'; import { Button, LoadingPlaceholder, Modal, ModalsController, useStyles2 } from '@grafana/ui'; diff --git a/public/app/features/admin/UserListPublicDashboardPage/DeleteUserModalButton.tsx b/public/app/features/admin/UserListPublicDashboardPage/DeleteUserModalButton.tsx index 1ca1f8d6656..fa33265f205 100644 --- a/public/app/features/admin/UserListPublicDashboardPage/DeleteUserModalButton.tsx +++ b/public/app/features/admin/UserListPublicDashboardPage/DeleteUserModalButton.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { config } from '@grafana/runtime'; import { Button, Modal, ModalsController, useStyles2 } from '@grafana/ui'; import { Trans, t } from 'app/core/internationalization'; diff --git a/public/app/features/alerting/unified/GrafanaRuleQueryViewer.tsx b/public/app/features/alerting/unified/GrafanaRuleQueryViewer.tsx index b591ece380d..b7946517a41 100644 --- a/public/app/features/alerting/unified/GrafanaRuleQueryViewer.tsx +++ b/public/app/features/alerting/unified/GrafanaRuleQueryViewer.tsx @@ -2,8 +2,7 @@ import { css, cx } from '@emotion/css'; import { keyBy, startCase, uniqueId } from 'lodash'; import * as React from 'react'; -import { DataSourceInstanceSettings, GrafanaTheme2, PanelData, urlUtil } from '@grafana/data'; -import { secondsToHms } from '@grafana/data/src/datetime/rangeutil'; +import { DataSourceInstanceSettings, GrafanaTheme2, PanelData, rangeUtil, urlUtil } from '@grafana/data'; import { config } from '@grafana/runtime'; import { DataSourceRef } from '@grafana/schema'; import { Preview } from '@grafana/sql/src/components/visual-query-builder/Preview'; @@ -123,7 +122,7 @@ export function QueryPreview({ if (relativeTimeRange) { headerItems.push( - {secondsToHms(relativeTimeRange.from)} to now + {rangeUtil.secondsToHms(relativeTimeRange.from)} to now ); } diff --git a/public/app/features/alerting/unified/components/GrafanaAlertmanagerDeliveryWarning.tsx b/public/app/features/alerting/unified/components/GrafanaAlertmanagerDeliveryWarning.tsx index 239de85bd2d..b16c50bbb44 100644 --- a/public/app/features/alerting/unified/components/GrafanaAlertmanagerDeliveryWarning.tsx +++ b/public/app/features/alerting/unified/components/GrafanaAlertmanagerDeliveryWarning.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { Alert, useStyles2 } from '@grafana/ui'; import { AlertmanagerChoice } from '../../../../plugins/datasource/alertmanager/types'; diff --git a/public/app/features/alerting/unified/components/rule-editor/CloudAlertPreview.tsx b/public/app/features/alerting/unified/components/rule-editor/CloudAlertPreview.tsx index a9d67203d14..b2fa4fa8297 100644 --- a/public/app/features/alerting/unified/components/rule-editor/CloudAlertPreview.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/CloudAlertPreview.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { DataFrame, GrafanaTheme2 } from '@grafana/data/src'; +import { DataFrame, GrafanaTheme2 } from '@grafana/data'; import { Icon, TagList, Tooltip, useStyles2 } from '@grafana/ui'; import { labelsToTags } from '../../utils/labels'; diff --git a/public/app/features/alerting/unified/components/rule-editor/DashboardPicker.tsx b/public/app/features/alerting/unified/components/rule-editor/DashboardPicker.tsx index 14eea33da9d..4428ba2e1a9 100644 --- a/public/app/features/alerting/unified/components/rule-editor/DashboardPicker.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/DashboardPicker.tsx @@ -5,7 +5,7 @@ import { useDebounce } from 'react-use'; import AutoSizer from 'react-virtualized-auto-sizer'; import { FixedSizeList } from 'react-window'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { Alert, Button, diff --git a/public/app/features/alerting/unified/components/rule-editor/QueryOptions.tsx b/public/app/features/alerting/unified/components/rule-editor/QueryOptions.tsx index 1a046f8e2a3..215ae1d3646 100644 --- a/public/app/features/alerting/unified/components/rule-editor/QueryOptions.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/QueryOptions.tsx @@ -1,8 +1,7 @@ import { css } from '@emotion/css'; import { useState } from 'react'; -import { GrafanaTheme2, RelativeTimeRange, dateTime, getDefaultRelativeTimeRange } from '@grafana/data'; -import { relativeToTimeRange } from '@grafana/data/src/datetime/rangeutil'; +import { GrafanaTheme2, RelativeTimeRange, dateTime, getDefaultRelativeTimeRange, rangeUtil } from '@grafana/data'; import { Icon, InlineField, RelativeTimeRangePicker, Toggletip, clearButtonStyles, useStyles2 } from '@grafana/ui'; import { AlertQuery } from 'app/types/unified-alerting-dto'; @@ -27,7 +26,7 @@ export const QueryOptions = ({ const [showOptions, setShowOptions] = useState(false); - const timeRange = query.relativeTimeRange ? relativeToTimeRange(query.relativeTimeRange) : undefined; + const timeRange = query.relativeTimeRange ? rangeUtil.relativeToTimeRange(query.relativeTimeRange) : undefined; return ( <> diff --git a/public/app/features/alerting/unified/components/rule-editor/rule-types/RuleTypePicker.tsx b/public/app/features/alerting/unified/components/rule-editor/rule-types/RuleTypePicker.tsx index ab41cd3121f..17cbdcfcd6e 100644 --- a/public/app/features/alerting/unified/components/rule-editor/rule-types/RuleTypePicker.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/rule-types/RuleTypePicker.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import { isEmpty } from 'lodash'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { Stack, useStyles2 } from '@grafana/ui'; import { useRulesSourcesWithRuler } from '../../../hooks/useRuleSourcesWithRuler'; diff --git a/public/app/features/alerting/unified/components/rules/AlertInstanceStateFilter.tsx b/public/app/features/alerting/unified/components/rules/AlertInstanceStateFilter.tsx index 97cf310a478..29afb21fa2c 100644 --- a/public/app/features/alerting/unified/components/rules/AlertInstanceStateFilter.tsx +++ b/public/app/features/alerting/unified/components/rules/AlertInstanceStateFilter.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import { capitalize } from 'lodash'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { Label, RadioButtonGroup, Tag, useStyles2 } from '@grafana/ui'; import { GrafanaAlertState, PromAlertingRuleState } from 'app/types/unified-alerting-dto'; diff --git a/public/app/features/alerting/unified/components/rules/RuleConfigStatus.tsx b/public/app/features/alerting/unified/components/rules/RuleConfigStatus.tsx index 8b10c1388bf..ed3f96dc960 100644 --- a/public/app/features/alerting/unified/components/rules/RuleConfigStatus.tsx +++ b/public/app/features/alerting/unified/components/rules/RuleConfigStatus.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import { useMemo } from 'react'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { config } from '@grafana/runtime/src'; import { Icon, Tooltip, useStyles2 } from '@grafana/ui'; diff --git a/public/app/features/alerting/unified/components/rules/central-state-history/utils.ts b/public/app/features/alerting/unified/components/rules/central-state-history/utils.ts index 21b2548dac9..d78688c1ab8 100644 --- a/public/app/features/alerting/unified/components/rules/central-state-history/utils.ts +++ b/public/app/features/alerting/unified/components/rules/central-state-history/utils.ts @@ -11,7 +11,7 @@ import { ThresholdsMode, getDisplayProcessor, } from '@grafana/data'; -import { fieldIndexComparer } from '@grafana/data/src/field/fieldComparers'; +import { fieldIndexComparer } from '@grafana/data/internal'; import { mapStateWithReasonToBaseState } from 'app/types/unified-alerting-dto'; import { labelsMatchMatchers } from '../../../utils/alertmanager'; diff --git a/public/app/features/alerting/unified/components/rules/state-history/useRuleHistoryRecords.tsx b/public/app/features/alerting/unified/components/rules/state-history/useRuleHistoryRecords.tsx index 9f18e9bea2c..613938eebb5 100644 --- a/public/app/features/alerting/unified/components/rules/state-history/useRuleHistoryRecords.tsx +++ b/public/app/features/alerting/unified/components/rules/state-history/useRuleHistoryRecords.tsx @@ -9,7 +9,7 @@ import { GrafanaTheme2, getDisplayProcessor, } from '@grafana/data'; -import { fieldIndexComparer } from '@grafana/data/src/field/fieldComparers'; +import { fieldIndexComparer } from '@grafana/data/internal'; import { MappingType, ThresholdsMode } from '@grafana/schema'; import { useTheme2 } from '@grafana/ui'; diff --git a/public/app/features/alerting/unified/home/PluginIntegrations.tsx b/public/app/features/alerting/unified/home/PluginIntegrations.tsx index f07a0738934..4a7d560da38 100644 --- a/public/app/features/alerting/unified/home/PluginIntegrations.tsx +++ b/public/app/features/alerting/unified/home/PluginIntegrations.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data/'; +import { GrafanaTheme2 } from '@grafana/data'; import { Stack, Text, useStyles2 } from '@grafana/ui'; import { useAlertingHomePageExtensions } from '../plugins/useAlertingHomePageExtensions'; diff --git a/public/app/features/alerting/unified/styles/pagination.ts b/public/app/features/alerting/unified/styles/pagination.ts index f3d92f70662..0a16b5ce7ee 100644 --- a/public/app/features/alerting/unified/styles/pagination.ts +++ b/public/app/features/alerting/unified/styles/pagination.ts @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; export const getPaginationStyles = (theme: GrafanaTheme2) => { return css({ diff --git a/public/app/features/alerting/unified/utils/misc.ts b/public/app/features/alerting/unified/utils/misc.ts index c136c2aa883..686194d24c6 100644 --- a/public/app/features/alerting/unified/utils/misc.ts +++ b/public/app/features/alerting/unified/utils/misc.ts @@ -1,7 +1,7 @@ import { sortBy } from 'lodash'; import { Labels, UrlQueryMap } from '@grafana/data'; -import { GrafanaEdition } from '@grafana/data/src/types/config'; +import { GrafanaEdition } from '@grafana/data/internal'; import { config, isFetchError } from '@grafana/runtime'; import { DataSourceRef } from '@grafana/schema'; import { contextSrv } from 'app/core/services/context_srv'; diff --git a/public/app/features/alerting/unified/utils/routeTree.ts b/public/app/features/alerting/unified/utils/routeTree.ts index 6aa80dcb030..ba08bfd7526 100644 --- a/public/app/features/alerting/unified/utils/routeTree.ts +++ b/public/app/features/alerting/unified/utils/routeTree.ts @@ -5,7 +5,7 @@ import { produce } from 'immer'; import { omit } from 'lodash'; -import { insertAfterImmutably, insertBeforeImmutably } from '@grafana/data/src/utils/arrayUtils'; +import { arrayUtils } from '@grafana/data'; import { ROUTES_META_SYMBOL, Route, RouteWithID } from 'app/plugins/datasource/alertmanager/types'; import { @@ -109,12 +109,12 @@ export const addRouteToReferenceRoute = ( // insert new policy before / above the referenceRoute if (position === 'above') { - parentRoute.routes = insertBeforeImmutably(parentRoute.routes ?? [], newRoute, positionInParent); + parentRoute.routes = arrayUtils.insertBeforeImmutably(parentRoute.routes ?? [], newRoute, positionInParent); } // insert new policy after / below the referenceRoute if (position === 'below') { - parentRoute.routes = insertAfterImmutably(parentRoute.routes ?? [], newRoute, positionInParent); + parentRoute.routes = arrayUtils.insertAfterImmutably(parentRoute.routes ?? [], newRoute, positionInParent); } }); }; diff --git a/public/app/features/alerting/unified/utils/time.ts b/public/app/features/alerting/unified/utils/time.ts index 14a52ab677f..7e9eeea528a 100644 --- a/public/app/features/alerting/unified/utils/time.ts +++ b/public/app/features/alerting/unified/utils/time.ts @@ -1,4 +1,4 @@ -import { describeInterval } from '@grafana/data/src/datetime/rangeutil'; +import { rangeUtil } from '@grafana/data'; import { TimeOptions } from '../types/time'; @@ -18,7 +18,7 @@ export function parseInterval(value: string): [number, string] { } export function intervalToSeconds(interval: string): number { - const { sec, count } = describeInterval(interval); + const { sec, count } = rangeUtil.describeInterval(interval); return sec * count; } diff --git a/public/app/features/annotations/components/StandardAnnotationQueryEditor.test.tsx b/public/app/features/annotations/components/StandardAnnotationQueryEditor.test.tsx index c347a069369..c4126cb6aa1 100644 --- a/public/app/features/annotations/components/StandardAnnotationQueryEditor.test.tsx +++ b/public/app/features/annotations/components/StandardAnnotationQueryEditor.test.tsx @@ -1,6 +1,6 @@ import { render } from '@testing-library/react'; -import { AnnotationQuery, DataSourceApi, DataSourceInstanceSettings } from '@grafana/data/src'; +import { AnnotationQuery, DataSourceApi, DataSourceInstanceSettings } from '@grafana/data'; import StandardAnnotationQueryEditor, { Props as EditorProps } from './StandardAnnotationQueryEditor'; diff --git a/public/app/features/auth-config/AuthProvidersListPage.tsx b/public/app/features/auth-config/AuthProvidersListPage.tsx index 717906f0f3a..9ae5786703a 100644 --- a/public/app/features/auth-config/AuthProvidersListPage.tsx +++ b/public/app/features/auth-config/AuthProvidersListPage.tsx @@ -1,7 +1,7 @@ import { JSX, useEffect, useState } from 'react'; import { connect, ConnectedProps } from 'react-redux'; -import { GrafanaEdition } from '@grafana/data/src/types/config'; +import { GrafanaEdition } from '@grafana/data/internal'; import { reportInteraction } from '@grafana/runtime'; import { Grid, TextLink, ToolbarButton } from '@grafana/ui'; import { Page } from 'app/core/components/Page/Page'; diff --git a/public/app/features/canvas/element.ts b/public/app/features/canvas/element.ts index 1d6c39dba0d..7f987fed873 100644 --- a/public/app/features/canvas/element.ts +++ b/public/app/features/canvas/element.ts @@ -1,7 +1,7 @@ import { ComponentType } from 'react'; import { DataLink, RegistryItem, Action } from '@grafana/data'; -import { PanelOptionsSupplier } from '@grafana/data/src/panel/PanelPlugin'; +import { PanelOptionsSupplier } from '@grafana/data/internal'; import { ColorDimensionConfig, ScaleDimensionConfig } from '@grafana/schema'; import { config } from 'app/core/config'; import { BackgroundConfig, Constraint, LineConfig, Placement } from 'app/plugins/panel/canvas/panelcfg.gen'; diff --git a/public/app/features/canvas/elements/button.tsx b/public/app/features/canvas/elements/button.tsx index eb926056ace..2b70fa66e3a 100644 --- a/public/app/features/canvas/elements/button.tsx +++ b/public/app/features/canvas/elements/button.tsx @@ -1,8 +1,7 @@ import { css } from '@emotion/css'; import { useState } from 'react'; -import { GrafanaTheme2 } from '@grafana/data'; -import { PluginState } from '@grafana/data/src'; +import { GrafanaTheme2, PluginState } from '@grafana/data'; import { TextDimensionMode } from '@grafana/schema'; import { Button, Spinner, useStyles2 } from '@grafana/ui'; import { DimensionContext } from 'app/features/dimensions/context'; diff --git a/public/app/features/canvas/types.ts b/public/app/features/canvas/types.ts index 1dd3f298e7a..50b926779a6 100644 --- a/public/app/features/canvas/types.ts +++ b/public/app/features/canvas/types.ts @@ -1,4 +1,4 @@ -import { LinkModel } from '@grafana/data/src'; +import { LinkModel } from '@grafana/data'; import { ColorDimensionConfig, ResourceDimensionConfig, TextDimensionConfig } from '@grafana/schema'; import { BackgroundImageSize } from 'app/plugins/panel/canvas/panelcfg.gen'; diff --git a/public/app/features/dashboard-scene/inspect/HelpWizard/HelpWizard.test.tsx b/public/app/features/dashboard-scene/inspect/HelpWizard/HelpWizard.test.tsx index 276c71f61dd..be4fbbb8692 100644 --- a/public/app/features/dashboard-scene/inspect/HelpWizard/HelpWizard.test.tsx +++ b/public/app/features/dashboard-scene/inspect/HelpWizard/HelpWizard.test.tsx @@ -2,7 +2,7 @@ import userEvent from '@testing-library/user-event'; import { render, screen } from 'test/test-utils'; import { FieldType, getDefaultTimeRange, LoadingState, toDataFrame } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { config } from '@grafana/runtime'; import { SceneQueryRunner, SceneTimeRange, VizPanel, VizPanelMenu } from '@grafana/scenes'; import { contextSrv } from 'app/core/services/context_srv'; diff --git a/public/app/features/dashboard-scene/inspect/InspectJsonTab.test.tsx b/public/app/features/dashboard-scene/inspect/InspectJsonTab.test.tsx index 582e0855008..b49a61cd1b8 100644 --- a/public/app/features/dashboard-scene/inspect/InspectJsonTab.test.tsx +++ b/public/app/features/dashboard-scene/inspect/InspectJsonTab.test.tsx @@ -10,7 +10,7 @@ import { standardTransformersRegistry, toDataFrame, } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { setPluginImportUtils, setRunRequest } from '@grafana/runtime'; import { SceneCanvasText, SceneDataTransformer, SceneQueryRunner, VizPanel } from '@grafana/scenes'; import * as libpanels from 'app/features/library-panels/state/api'; diff --git a/public/app/features/dashboard-scene/pages/DashboardScenePage.test.tsx b/public/app/features/dashboard-scene/pages/DashboardScenePage.test.tsx index 77551f16579..90dc4a7de07 100644 --- a/public/app/features/dashboard-scene/pages/DashboardScenePage.test.tsx +++ b/public/app/features/dashboard-scene/pages/DashboardScenePage.test.tsx @@ -6,7 +6,7 @@ import { TestProvider } from 'test/helpers/TestProvider'; import { getGrafanaContextMock } from 'test/mocks/getGrafanaContextMock'; import { PanelProps } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { selectors } from '@grafana/e2e-selectors'; import { LocationServiceProvider, diff --git a/public/app/features/dashboard-scene/pages/PublicDashboardScenePage.test.tsx b/public/app/features/dashboard-scene/pages/PublicDashboardScenePage.test.tsx index a8c109d261b..b5c05c830b8 100644 --- a/public/app/features/dashboard-scene/pages/PublicDashboardScenePage.test.tsx +++ b/public/app/features/dashboard-scene/pages/PublicDashboardScenePage.test.tsx @@ -4,7 +4,7 @@ import { of } from 'rxjs'; import { render } from 'test/test-utils'; import { getDefaultTimeRange, LoadingState, PanelData, PanelProps } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors'; import { config, getPluginLinkExtensions, setPluginImportUtils, setRunRequest } from '@grafana/runtime'; import { Dashboard } from '@grafana/schema'; diff --git a/public/app/features/dashboard-scene/panel-edit/PanelDataPane/PanelDataQueriesTab.test.tsx b/public/app/features/dashboard-scene/panel-edit/PanelDataPane/PanelDataQueriesTab.test.tsx index c0131b6847d..c88d60a527e 100644 --- a/public/app/features/dashboard-scene/panel-edit/PanelDataPane/PanelDataQueriesTab.test.tsx +++ b/public/app/features/dashboard-scene/panel-edit/PanelDataPane/PanelDataQueriesTab.test.tsx @@ -15,7 +15,7 @@ import { TimeRange, toDataFrame, } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { selectors } from '@grafana/e2e-selectors'; import { config, locationService, setPluginExtensionsHook } from '@grafana/runtime'; import { PANEL_EDIT_LAST_USED_DATASOURCE } from 'app/features/dashboard/utils/dashboard'; diff --git a/public/app/features/dashboard-scene/panel-edit/PanelEditor.test.ts b/public/app/features/dashboard-scene/panel-edit/PanelEditor.test.ts index fe263ee3bde..ee2bda935fd 100644 --- a/public/app/features/dashboard-scene/panel-edit/PanelEditor.test.ts +++ b/public/app/features/dashboard-scene/panel-edit/PanelEditor.test.ts @@ -1,7 +1,7 @@ import { of } from 'rxjs'; import { DataQueryRequest, DataSourceApi, LoadingState, PanelPlugin } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { CancelActivationHandler, CustomVariable, diff --git a/public/app/features/dashboard-scene/panel-edit/PanelOptions.test.tsx b/public/app/features/dashboard-scene/panel-edit/PanelOptions.test.tsx index 3f54a519b70..afc761b080b 100644 --- a/public/app/features/dashboard-scene/panel-edit/PanelOptions.test.tsx +++ b/public/app/features/dashboard-scene/panel-edit/PanelOptions.test.tsx @@ -3,7 +3,7 @@ import userEvent from '@testing-library/user-event'; import { render } from 'test/test-utils'; import { standardEditorsRegistry, standardFieldConfigEditorRegistry } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { selectors } from '@grafana/e2e-selectors'; import { VizPanel } from '@grafana/scenes'; import { getAllOptionEditors, getAllStandardFieldConfigs } from 'app/core/components/OptionsUI/registry'; diff --git a/public/app/features/dashboard-scene/scene/DashboardDatasourceBehaviour.test.tsx b/public/app/features/dashboard-scene/scene/DashboardDatasourceBehaviour.test.tsx index 59a27eacaad..55aac56789a 100644 --- a/public/app/features/dashboard-scene/scene/DashboardDatasourceBehaviour.test.tsx +++ b/public/app/features/dashboard-scene/scene/DashboardDatasourceBehaviour.test.tsx @@ -10,7 +10,7 @@ import { LoadingState, PanelData, } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { setPluginImportUtils } from '@grafana/runtime'; import { SceneDataTransformer, SceneFlexLayout, SceneQueryRunner, VizPanel } from '@grafana/scenes'; import { SHARED_DASHBOARD_QUERY, DASHBOARD_DATASOURCE_PLUGIN_ID } from 'app/plugins/datasource/dashboard/constants'; diff --git a/public/app/features/dashboard-scene/scene/DashboardLinksControls.tsx b/public/app/features/dashboard-scene/scene/DashboardLinksControls.tsx index 72a046fc6e5..db7fb59dad7 100644 --- a/public/app/features/dashboard-scene/scene/DashboardLinksControls.tsx +++ b/public/app/features/dashboard-scene/scene/DashboardLinksControls.tsx @@ -1,4 +1,4 @@ -import { sanitizeUrl } from '@grafana/data/src/text/sanitize'; +import { sanitizeUrl } from '@grafana/data/internal'; import { selectors } from '@grafana/e2e-selectors'; import { sceneGraph } from '@grafana/scenes'; import { DashboardLink } from '@grafana/schema'; diff --git a/public/app/features/dashboard-scene/scene/DashboardSceneRenderer.test.tsx b/public/app/features/dashboard-scene/scene/DashboardSceneRenderer.test.tsx index 3f456078a7e..74c91e3037e 100644 --- a/public/app/features/dashboard-scene/scene/DashboardSceneRenderer.test.tsx +++ b/public/app/features/dashboard-scene/scene/DashboardSceneRenderer.test.tsx @@ -1,7 +1,7 @@ import { screen } from '@testing-library/react'; import { render } from 'test/test-utils'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { config, setPluginImportUtils } from '@grafana/runtime'; import { transformSaveModelToScene } from '../serialization/transformSaveModelToScene'; diff --git a/public/app/features/dashboard-scene/scene/LibraryPanelBehavior.test.tsx b/public/app/features/dashboard-scene/scene/LibraryPanelBehavior.test.tsx index b6eb6872566..5d95b292cb4 100644 --- a/public/app/features/dashboard-scene/scene/LibraryPanelBehavior.test.tsx +++ b/public/app/features/dashboard-scene/scene/LibraryPanelBehavior.test.tsx @@ -1,7 +1,7 @@ import { of } from 'rxjs'; import { FieldType, LoadingState, PanelData, getDefaultTimeRange, toDataFrame } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { setPluginImportUtils, setRunRequest } from '@grafana/runtime'; import { SceneCanvasText, sceneGraph, SceneGridLayout, VizPanel } from '@grafana/scenes'; import { LibraryPanel } from '@grafana/schema'; diff --git a/public/app/features/dashboard-scene/scene/PanelMenuBehavior.test.tsx b/public/app/features/dashboard-scene/scene/PanelMenuBehavior.test.tsx index d0aa2f56b9f..182ebac330f 100644 --- a/public/app/features/dashboard-scene/scene/PanelMenuBehavior.test.tsx +++ b/public/app/features/dashboard-scene/scene/PanelMenuBehavior.test.tsx @@ -8,7 +8,7 @@ import { toDataFrame, urlUtil, } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { config, getPluginLinkExtensions, locationService } from '@grafana/runtime'; import { LocalValueVariable, diff --git a/public/app/features/dashboard-scene/scene/layout-default/DashboardGridItem.test.tsx b/public/app/features/dashboard-scene/scene/layout-default/DashboardGridItem.test.tsx index ec13a7992c8..00458d505a9 100644 --- a/public/app/features/dashboard-scene/scene/layout-default/DashboardGridItem.test.tsx +++ b/public/app/features/dashboard-scene/scene/layout-default/DashboardGridItem.test.tsx @@ -1,4 +1,4 @@ -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { setPluginImportUtils } from '@grafana/runtime'; import { SceneGridLayout, SceneVariableSet, TestVariable, VizPanel } from '@grafana/scenes'; import { ALL_VARIABLE_TEXT, ALL_VARIABLE_VALUE } from 'app/features/variables/constants'; diff --git a/public/app/features/dashboard-scene/scene/layout-default/RowRepeaterBehavior.test.tsx b/public/app/features/dashboard-scene/scene/layout-default/RowRepeaterBehavior.test.tsx index 843f58b5640..28effcf18b5 100644 --- a/public/app/features/dashboard-scene/scene/layout-default/RowRepeaterBehavior.test.tsx +++ b/public/app/features/dashboard-scene/scene/layout-default/RowRepeaterBehavior.test.tsx @@ -1,5 +1,5 @@ import { VariableRefresh } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { setPluginImportUtils } from '@grafana/runtime'; import { SceneCanvasText, diff --git a/public/app/features/dashboard-scene/scene/layout-rows/RowItemRepeaterBehavior.test.tsx b/public/app/features/dashboard-scene/scene/layout-rows/RowItemRepeaterBehavior.test.tsx index ec5b4710089..ca967ce3d06 100644 --- a/public/app/features/dashboard-scene/scene/layout-rows/RowItemRepeaterBehavior.test.tsx +++ b/public/app/features/dashboard-scene/scene/layout-rows/RowItemRepeaterBehavior.test.tsx @@ -1,5 +1,5 @@ import { VariableRefresh } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { setPluginImportUtils } from '@grafana/runtime'; import { SceneGridRow, diff --git a/public/app/features/dashboard-scene/serialization/angularMigration.test.ts b/public/app/features/dashboard-scene/serialization/angularMigration.test.ts index cda96b97e9c..a9f63b34cf0 100644 --- a/public/app/features/dashboard-scene/serialization/angularMigration.test.ts +++ b/public/app/features/dashboard-scene/serialization/angularMigration.test.ts @@ -1,5 +1,5 @@ import { PanelTypeChangedHandler } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { PanelModel } from 'app/features/dashboard/state/PanelModel'; import { getAngularPanelMigrationHandler } from './angularMigration'; diff --git a/public/app/features/dashboard-scene/serialization/transformSaveModelToScene.test.ts b/public/app/features/dashboard-scene/serialization/transformSaveModelToScene.test.ts index e74c3f21664..546c8e95038 100644 --- a/public/app/features/dashboard-scene/serialization/transformSaveModelToScene.test.ts +++ b/public/app/features/dashboard-scene/serialization/transformSaveModelToScene.test.ts @@ -1,5 +1,5 @@ import { LoadingState } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { config } from '@grafana/runtime'; import { AdHocFiltersVariable, diff --git a/public/app/features/dashboard-scene/serialization/transformSceneToSaveModel.test.ts b/public/app/features/dashboard-scene/serialization/transformSceneToSaveModel.test.ts index 9d6061e3c6f..f1ed038dfb5 100644 --- a/public/app/features/dashboard-scene/serialization/transformSceneToSaveModel.test.ts +++ b/public/app/features/dashboard-scene/serialization/transformSceneToSaveModel.test.ts @@ -13,7 +13,7 @@ import { toDataFrame, VariableSupportType, } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { getPluginLinkExtensions, setPluginImportUtils } from '@grafana/runtime'; import { MultiValueVariable, sceneGraph, SceneGridRow, VizPanel } from '@grafana/scenes'; import { Dashboard, LoadingState, Panel, RowPanel, VariableRefresh } from '@grafana/schema'; diff --git a/public/app/features/dashboard-scene/settings/VariablesEditView.test.tsx b/public/app/features/dashboard-scene/settings/VariablesEditView.test.tsx index f3d93596d03..8c5f690518e 100644 --- a/public/app/features/dashboard-scene/settings/VariablesEditView.test.tsx +++ b/public/app/features/dashboard-scene/settings/VariablesEditView.test.tsx @@ -8,7 +8,7 @@ import { getDefaultTimeRange, toDataFrame, } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { setPluginImportUtils, setRunRequest } from '@grafana/runtime'; import { SceneVariableSet, diff --git a/public/app/features/dashboard-scene/sharing/ShareButton/share-externally/ShareExternally.test.tsx b/public/app/features/dashboard-scene/sharing/ShareButton/share-externally/ShareExternally.test.tsx index 07fdec6b6a1..b3c7a22a257 100644 --- a/public/app/features/dashboard-scene/sharing/ShareButton/share-externally/ShareExternally.test.tsx +++ b/public/app/features/dashboard-scene/sharing/ShareButton/share-externally/ShareExternally.test.tsx @@ -2,7 +2,7 @@ import { screen, waitForElementToBeRemoved } from '@testing-library/react'; import { render } from 'test/test-utils'; import { getDefaultTimeRange, LoadingState } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors'; import { config, setPluginImportUtils } from '@grafana/runtime'; import { diff --git a/public/app/features/dashboard-scene/sharing/ShareDrawer/ShareDrawer.test.tsx b/public/app/features/dashboard-scene/sharing/ShareDrawer/ShareDrawer.test.tsx index 5e7e71ee6b3..35eaec800d1 100644 --- a/public/app/features/dashboard-scene/sharing/ShareDrawer/ShareDrawer.test.tsx +++ b/public/app/features/dashboard-scene/sharing/ShareDrawer/ShareDrawer.test.tsx @@ -1,7 +1,7 @@ import { act, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { selectors } from '@grafana/e2e-selectors'; import { locationService, setPluginImportUtils } from '@grafana/runtime'; import { SceneTimeRange, UrlSyncContextProvider } from '@grafana/scenes'; diff --git a/public/app/features/dashboard-scene/sharing/ShareLinkTab.test.tsx b/public/app/features/dashboard-scene/sharing/ShareLinkTab.test.tsx index cded7ef3abe..d149d075e02 100644 --- a/public/app/features/dashboard-scene/sharing/ShareLinkTab.test.tsx +++ b/public/app/features/dashboard-scene/sharing/ShareLinkTab.test.tsx @@ -3,7 +3,7 @@ import userEvent from '@testing-library/user-event'; import { advanceTo, clear } from 'jest-date-mock'; import { dateTime } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { selectors } from '@grafana/e2e-selectors'; import { config, locationService, setPluginImportUtils } from '@grafana/runtime'; import { SceneTimeRange, VizPanel } from '@grafana/scenes'; diff --git a/public/app/features/dashboard-scene/sharing/panel-share/SharePanelInternally.test.tsx b/public/app/features/dashboard-scene/sharing/panel-share/SharePanelInternally.test.tsx index ac5daf5eac4..d2cbfaa14f7 100644 --- a/public/app/features/dashboard-scene/sharing/panel-share/SharePanelInternally.test.tsx +++ b/public/app/features/dashboard-scene/sharing/panel-share/SharePanelInternally.test.tsx @@ -1,6 +1,6 @@ import { render, screen } from '@testing-library/react'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors'; import { config, setPluginImportUtils } from '@grafana/runtime'; import { SceneTimeRange, VizPanel } from '@grafana/scenes'; diff --git a/public/app/features/dashboard/components/DashboardPrompt/DashboardPrompt.test.tsx b/public/app/features/dashboard/components/DashboardPrompt/DashboardPrompt.test.tsx index 021060699b4..8da1d2bb549 100644 --- a/public/app/features/dashboard/components/DashboardPrompt/DashboardPrompt.test.tsx +++ b/public/app/features/dashboard/components/DashboardPrompt/DashboardPrompt.test.tsx @@ -1,4 +1,4 @@ -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { ContextSrv, setContextSrv } from '../../../../core/services/context_srv'; import { PanelModel } from '../../state/PanelModel'; diff --git a/public/app/features/dashboard/components/HelpWizard/HelpWizard.test.tsx b/public/app/features/dashboard/components/HelpWizard/HelpWizard.test.tsx index 8fdc82a5dd8..2eb805aa87e 100644 --- a/public/app/features/dashboard/components/HelpWizard/HelpWizard.test.tsx +++ b/public/app/features/dashboard/components/HelpWizard/HelpWizard.test.tsx @@ -1,7 +1,7 @@ import { render, screen } from '@testing-library/react'; import { FieldType, getDefaultTimeRange, LoadingState, toDataFrame } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { PanelModel } from '../../state/PanelModel'; diff --git a/public/app/features/dashboard/components/PanelEditor/OptionsPaneOptions.test.tsx b/public/app/features/dashboard/components/PanelEditor/OptionsPaneOptions.test.tsx index 6387aac97a8..91351c87a85 100644 --- a/public/app/features/dashboard/components/PanelEditor/OptionsPaneOptions.test.tsx +++ b/public/app/features/dashboard/components/PanelEditor/OptionsPaneOptions.test.tsx @@ -13,7 +13,7 @@ import { TimeRange, toDataFrame, } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { selectors } from '@grafana/e2e-selectors'; import { getAllOptionEditors, getAllStandardFieldConfigs } from 'app/core/components/OptionsUI/registry'; diff --git a/public/app/features/dashboard/components/PanelEditor/PanelHeaderCorner.tsx b/public/app/features/dashboard/components/PanelEditor/PanelHeaderCorner.tsx index 07936f463b8..7e0edec648b 100644 --- a/public/app/features/dashboard/components/PanelEditor/PanelHeaderCorner.tsx +++ b/public/app/features/dashboard/components/PanelEditor/PanelHeaderCorner.tsx @@ -1,8 +1,7 @@ import { css, cx } from '@emotion/css'; import { Component } from 'react'; -import { renderMarkdown, LinkModelSupplier, ScopedVars, IconName } from '@grafana/data'; -import { GrafanaTheme2 } from '@grafana/data/'; +import { GrafanaTheme2, renderMarkdown, LinkModelSupplier, ScopedVars, IconName } from '@grafana/data'; import { selectors } from '@grafana/e2e-selectors'; import { locationService, getTemplateSrv } from '@grafana/runtime'; import { Tooltip, PopoverContent, Icon, Themeable2, withTheme2, useStyles2 } from '@grafana/ui'; diff --git a/public/app/features/dashboard/components/PanelEditor/getVisualizationOptions.tsx b/public/app/features/dashboard/components/PanelEditor/getVisualizationOptions.tsx index b62d0493c2e..4b003d91c84 100644 --- a/public/app/features/dashboard/components/PanelEditor/getVisualizationOptions.tsx +++ b/public/app/features/dashboard/components/PanelEditor/getVisualizationOptions.tsx @@ -7,13 +7,9 @@ import { PanelPlugin, StandardEditorContext, VariableSuggestionsScope, -} from '@grafana/data'; -import { PanelOptionsSupplier } from '@grafana/data/src/panel/PanelPlugin'; -import { - NestedValueAccess, PanelOptionsEditorBuilder, - isNestedPanelOptions, -} from '@grafana/data/src/utils/OptionsUIBuilders'; +} from '@grafana/data'; +import { NestedValueAccess, isNestedPanelOptions, PanelOptionsSupplier } from '@grafana/data/internal'; import { VizPanel } from '@grafana/scenes'; import { Input } from '@grafana/ui'; import { LibraryVizPanelInfo } from 'app/features/dashboard-scene/panel-edit/LibraryVizPanelInfo'; diff --git a/public/app/features/dashboard/components/PanelEditor/state/actions.test.ts b/public/app/features/dashboard/components/PanelEditor/state/actions.test.ts index b661ef017b8..ab46604bb92 100644 --- a/public/app/features/dashboard/components/PanelEditor/state/actions.test.ts +++ b/public/app/features/dashboard/components/PanelEditor/state/actions.test.ts @@ -1,5 +1,5 @@ import { PanelPlugin } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { LibraryElementDTOMeta } from '@grafana/schema'; import { createDashboardModelFixture } from 'app/features/dashboard/state/__fixtures__/dashboardFixtures'; import { panelModelAndPluginReady, removePanel } from 'app/features/panel/state/reducers'; diff --git a/public/app/features/dashboard/components/PublicDashboardNotAvailable/PublicDashboardNotAvailable.tsx b/public/app/features/dashboard/components/PublicDashboardNotAvailable/PublicDashboardNotAvailable.tsx index 4bf24218d60..e413a750181 100644 --- a/public/app/features/dashboard/components/PublicDashboardNotAvailable/PublicDashboardNotAvailable.tsx +++ b/public/app/features/dashboard/components/PublicDashboardNotAvailable/PublicDashboardNotAvailable.tsx @@ -1,6 +1,6 @@ import { css, cx } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors/src'; import { useStyles2 } from '@grafana/ui'; diff --git a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/ConfigPublicDashboard.tsx b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/ConfigPublicDashboard.tsx index b83161aa968..5cf08218411 100644 --- a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/ConfigPublicDashboard.tsx +++ b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/ConfigPublicDashboard.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import { useForm } from 'react-hook-form'; -import { GrafanaTheme2, TimeRange } from '@grafana/data/src'; +import { GrafanaTheme2, TimeRange } from '@grafana/data'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors/src'; import { Button, diff --git a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/Configuration.tsx b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/Configuration.tsx index eb9a3d8a34f..5156356f470 100644 --- a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/Configuration.tsx +++ b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/Configuration.tsx @@ -1,6 +1,6 @@ import { UseFormRegister } from 'react-hook-form'; -import { TimeRange } from '@grafana/data/src'; +import { TimeRange } from '@grafana/data'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors/src'; import { FieldSet, Label, Switch, TimeRangeInput, Stack, VerticalGroup } from '@grafana/ui'; import { Trans, t } from 'app/core/internationalization'; diff --git a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/CreatePublicDashboard/AcknowledgeCheckboxes.tsx b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/CreatePublicDashboard/AcknowledgeCheckboxes.tsx index 574e289609a..d1913aa3b9f 100644 --- a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/CreatePublicDashboard/AcknowledgeCheckboxes.tsx +++ b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/CreatePublicDashboard/AcknowledgeCheckboxes.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import { UseFormRegister } from 'react-hook-form'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors/src'; import { Checkbox, FieldSet, HorizontalGroup, LinkButton, useStyles2, VerticalGroup } from '@grafana/ui'; import { t, Trans } from 'app/core/internationalization'; diff --git a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ModalAlerts/UnsupportedDataSourcesAlert.tsx b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ModalAlerts/UnsupportedDataSourcesAlert.tsx index 3850c5e8b17..1df2bbeac48 100644 --- a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ModalAlerts/UnsupportedDataSourcesAlert.tsx +++ b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ModalAlerts/UnsupportedDataSourcesAlert.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import cx from 'classnames'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors/src'; import { config } from '@grafana/runtime'; import { Alert, useStyles2 } from '@grafana/ui'; diff --git a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboard.test.tsx b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboard.test.tsx index 12d213f8501..9a0357f0626 100644 --- a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboard.test.tsx +++ b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboard.test.tsx @@ -3,7 +3,7 @@ import userEvent from '@testing-library/user-event'; import { http, HttpResponse } from 'msw'; import { setupServer } from 'msw/node'; -import { BootData, DataQuery } from '@grafana/data/src'; +import { BootData, DataQuery } from '@grafana/data'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors/src'; import { reportInteraction, setEchoSrv } from '@grafana/runtime'; import { Panel } from '@grafana/schema'; diff --git a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboard.tsx b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboard.tsx index 8cbfdd8bd57..329e0d5ef08 100644 --- a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboard.tsx +++ b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboard.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { Spinner, useStyles2 } from '@grafana/ui'; import { useGetPublicDashboardQuery } from 'app/features/dashboard/api/publicDashboardApi'; import { publicDashboardPersisted } from 'app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboardUtils'; diff --git a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboardUtils.test.tsx b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboardUtils.test.tsx index 7a14d0a4e45..6ca108fc542 100644 --- a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboardUtils.test.tsx +++ b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboardUtils.test.tsx @@ -1,5 +1,4 @@ -import { TypedVariableModel } from '@grafana/data'; -import { DataSourceRef, DataQuery } from '@grafana/data/src/types/query'; +import { DataSourceRef, DataQuery, TypedVariableModel } from '@grafana/data'; import { DataSourceWithBackend } from '@grafana/runtime'; import { updateConfig } from 'app/core/config'; import { mockDataSource } from 'app/features/alerting/unified/mocks'; diff --git a/public/app/features/dashboard/components/SubMenu/DashboardLinks.tsx b/public/app/features/dashboard/components/SubMenu/DashboardLinks.tsx index 1fa176900eb..65a7c39b335 100644 --- a/public/app/features/dashboard/components/SubMenu/DashboardLinks.tsx +++ b/public/app/features/dashboard/components/SubMenu/DashboardLinks.tsx @@ -1,6 +1,6 @@ import { useEffectOnce } from 'react-use'; -import { sanitizeUrl } from '@grafana/data/src/text/sanitize'; +import { sanitizeUrl } from '@grafana/data/internal'; import { selectors } from '@grafana/e2e-selectors'; import { TimeRangeUpdatedEvent } from '@grafana/runtime'; import { DashboardLink } from '@grafana/schema'; diff --git a/public/app/features/dashboard/components/SubMenu/DashboardLinksDashboard.tsx b/public/app/features/dashboard/components/SubMenu/DashboardLinksDashboard.tsx index f36232b7b2b..7beb284f28b 100644 --- a/public/app/features/dashboard/components/SubMenu/DashboardLinksDashboard.tsx +++ b/public/app/features/dashboard/components/SubMenu/DashboardLinksDashboard.tsx @@ -3,7 +3,7 @@ import { forwardRef } from 'react'; import { useAsync } from 'react-use'; import { GrafanaTheme2, ScopedVars } from '@grafana/data'; -import { sanitize, sanitizeUrl } from '@grafana/data/src/text/sanitize'; +import { sanitize, sanitizeUrl } from '@grafana/data/internal'; import { selectors } from '@grafana/e2e-selectors'; import { DashboardLink } from '@grafana/schema'; import { Dropdown, Icon, LinkButton, Button, Menu, ScrollContainer, useStyles2 } from '@grafana/ui'; diff --git a/public/app/features/dashboard/state/DashboardMigrator.test.ts b/public/app/features/dashboard/state/DashboardMigrator.test.ts index 70a80fb2da1..f0ed1f72c82 100644 --- a/public/app/features/dashboard/state/DashboardMigrator.test.ts +++ b/public/app/features/dashboard/state/DashboardMigrator.test.ts @@ -1,7 +1,7 @@ import { each, map } from 'lodash'; import { DataLinkBuiltInVars, MappingType, VariableHide } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { FieldConfigSource } from '@grafana/schema'; import { config } from 'app/core/config'; import { GRID_CELL_HEIGHT, GRID_CELL_VMARGIN } from 'app/core/constants'; diff --git a/public/app/features/dashboard/state/DashboardMigrator.ts b/public/app/features/dashboard/state/DashboardMigrator.ts index bab206f9792..44796c1e6f9 100644 --- a/public/app/features/dashboard/state/DashboardMigrator.ts +++ b/public/app/features/dashboard/state/DashboardMigrator.ts @@ -27,8 +27,7 @@ import { ValueMapping, VariableHide, } from '@grafana/data'; -import { labelsToFieldsTransformer } from '@grafana/data/src/transformations/transformers/labelsToFields'; -import { mergeTransformer } from '@grafana/data/src/transformations/transformers/merge'; +import { labelsToFieldsTransformer, mergeTransformer } from '@grafana/data/internal'; import { getDataSourceSrv, setDataSourceSrv } from '@grafana/runtime'; import { DataTransformerConfig } from '@grafana/schema'; import { AxisPlacement, GraphFieldConfig } from '@grafana/ui'; diff --git a/public/app/features/dashboard/state/PanelModel.test.ts b/public/app/features/dashboard/state/PanelModel.test.ts index a8a7aaae420..092ec0e0947 100644 --- a/public/app/features/dashboard/state/PanelModel.test.ts +++ b/public/app/features/dashboard/state/PanelModel.test.ts @@ -11,8 +11,7 @@ import { PanelMigrationHandler, PanelTypeChangedHandler, } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; -import { mockStandardFieldConfigOptions } from '@grafana/data/test/helpers/fieldConfig'; +import { getPanelPlugin, mockStandardFieldConfigOptions } from '@grafana/data/test'; import { setTemplateSrv } from '@grafana/runtime'; import { queryBuilder } from 'app/features/variables/shared/testing/builders'; diff --git a/public/app/features/dashboard/utils/panel.test.ts b/public/app/features/dashboard/utils/panel.test.ts index a739dcedab4..0a444a7726a 100644 --- a/public/app/features/dashboard/utils/panel.test.ts +++ b/public/app/features/dashboard/utils/panel.test.ts @@ -2,7 +2,7 @@ import { advanceTo, clear } from 'jest-date-mock'; import { ComponentClass } from 'react'; import { dateTime, DateTime, PanelProps, TimeRange } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { applyPanelTimeOverrides, calculateInnerPanelHeight } from 'app/features/dashboard/utils/panel'; import { PanelModel } from '../state/PanelModel'; diff --git a/public/app/features/dashboard/utils/timeRange.ts b/public/app/features/dashboard/utils/timeRange.ts index 79cf1f10244..da144cf427c 100644 --- a/public/app/features/dashboard/utils/timeRange.ts +++ b/public/app/features/dashboard/utils/timeRange.ts @@ -1,5 +1,4 @@ -import { DateTime, TimeRange } from '@grafana/data'; -import { dateMath, dateTime, isDateTime } from '@grafana/data/src'; +import { dateMath, dateTime, isDateTime, DateTime, TimeRange } from '@grafana/data'; import { TimeModel } from 'app/features/dashboard/state/TimeModel'; export const getTimeRange = ( diff --git a/public/app/features/datasources/components/CloudInfoBox.tsx b/public/app/features/datasources/components/CloudInfoBox.tsx index c34c44ce810..17e6b6d26b8 100644 --- a/public/app/features/datasources/components/CloudInfoBox.tsx +++ b/public/app/features/datasources/components/CloudInfoBox.tsx @@ -1,5 +1,5 @@ import { DataSourceSettings } from '@grafana/data'; -import { GrafanaEdition } from '@grafana/data/src/types/config'; +import { GrafanaEdition } from '@grafana/data/internal'; import { Alert } from '@grafana/ui'; import { LocalStorageValueProvider } from 'app/core/components/LocalStorageValueProvider'; import { config } from 'app/core/config'; diff --git a/public/app/features/datasources/state/buildCategories.test.ts b/public/app/features/datasources/state/buildCategories.test.ts index 5370c5a5789..297c413073d 100644 --- a/public/app/features/datasources/state/buildCategories.test.ts +++ b/public/app/features/datasources/state/buildCategories.test.ts @@ -1,5 +1,5 @@ import { DataSourcePluginMeta } from '@grafana/data'; -import { getMockPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getMockPlugin } from '@grafana/data/test'; import { buildCategories } from './buildCategories'; diff --git a/public/app/features/dimensions/context.ts b/public/app/features/dimensions/context.ts index a4693ada2a9..bd0755de986 100644 --- a/public/app/features/dimensions/context.ts +++ b/public/app/features/dimensions/context.ts @@ -1,4 +1,4 @@ -import { PanelData } from '@grafana/data/src'; +import { PanelData } from '@grafana/data'; import { ColorDimensionConfig, ResourceDimensionConfig, diff --git a/public/app/features/dimensions/scale.ts b/public/app/features/dimensions/scale.ts index 06f3be04dee..7c82df3c29d 100644 --- a/public/app/features/dimensions/scale.ts +++ b/public/app/features/dimensions/scale.ts @@ -1,5 +1,4 @@ -import { DataFrame, Field } from '@grafana/data'; -import { getMinMaxAndDelta } from '@grafana/data/src/field/scale'; +import { getMinMaxAndDelta, DataFrame, Field } from '@grafana/data'; import { ScaleDimensionConfig, ScaleDimensionMode } from '@grafana/schema'; import { DimensionSupplier, ScaleDimensionOptions } from './types'; diff --git a/public/app/features/explore/Logs/Logs.test.tsx b/public/app/features/explore/Logs/Logs.test.tsx index 958bad54ad4..85b5906eef6 100644 --- a/public/app/features/explore/Logs/Logs.test.tsx +++ b/public/app/features/explore/Logs/Logs.test.tsx @@ -16,7 +16,7 @@ import { ExploreLogsPanelState, DataQuery, } from '@grafana/data'; -import { organizeFieldsTransformer } from '@grafana/data/src/transformations/transformers/organize'; +import { organizeFieldsTransformer } from '@grafana/data/internal'; import { config } from '@grafana/runtime'; import { extractFieldsTransformer } from 'app/features/transformers/extractFields/extractFields'; import { LokiQueryDirection } from 'app/plugins/datasource/loki/dataquery.gen'; diff --git a/public/app/features/explore/Logs/LogsColumnSearch.tsx b/public/app/features/explore/Logs/LogsColumnSearch.tsx index 16e24d48954..6919e9e3fcf 100644 --- a/public/app/features/explore/Logs/LogsColumnSearch.tsx +++ b/public/app/features/explore/Logs/LogsColumnSearch.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import * as React from 'react'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { Field, Input, useTheme2 } from '@grafana/ui'; function getStyles(theme: GrafanaTheme2) { diff --git a/public/app/features/explore/Logs/LogsMetaRow.test.tsx b/public/app/features/explore/Logs/LogsMetaRow.test.tsx index ce63d19b4d0..e66a3d1bd77 100644 --- a/public/app/features/explore/Logs/LogsMetaRow.test.tsx +++ b/public/app/features/explore/Logs/LogsMetaRow.test.tsx @@ -4,7 +4,7 @@ import saveAs from 'file-saver'; import { ComponentProps } from 'react'; import { FieldType, LogLevel, LogsDedupStrategy, standardTransformersRegistry, toDataFrame } from '@grafana/data'; -import { organizeFieldsTransformer } from '@grafana/data/src/transformations/transformers/organize'; +import { organizeFieldsTransformer } from '@grafana/data/internal'; import { config } from '@grafana/runtime'; import { MAX_CHARACTERS } from '../../logs/components/LogRowMessage'; diff --git a/public/app/features/explore/Logs/LogsMetaRow.tsx b/public/app/features/explore/Logs/LogsMetaRow.tsx index 9db3be0ebdd..ba07fdf71b2 100644 --- a/public/app/features/explore/Logs/LogsMetaRow.tsx +++ b/public/app/features/explore/Logs/LogsMetaRow.tsx @@ -14,8 +14,8 @@ import { DataTransformerConfig, CustomTransformOperator, Labels, + DataFrame, } from '@grafana/data'; -import { DataFrame } from '@grafana/data/'; import { config, reportInteraction } from '@grafana/runtime'; import { Button, Dropdown, Menu, ToolbarButton, Tooltip, useStyles2 } from '@grafana/ui'; diff --git a/public/app/features/explore/Logs/LogsTable.test.tsx b/public/app/features/explore/Logs/LogsTable.test.tsx index 6dff92ec2c5..a8fa211431e 100644 --- a/public/app/features/explore/Logs/LogsTable.test.tsx +++ b/public/app/features/explore/Logs/LogsTable.test.tsx @@ -2,7 +2,7 @@ import { render, screen, waitFor } from '@testing-library/react'; import { ComponentProps } from 'react'; import { DataFrame, FieldType, LogsSortOrder, standardTransformersRegistry, toUtc } from '@grafana/data'; -import { organizeFieldsTransformer } from '@grafana/data/src/transformations/transformers/organize'; +import { organizeFieldsTransformer } from '@grafana/data/internal'; import { config } from '@grafana/runtime'; import { extractFieldsTransformer } from 'app/features/transformers/extractFields/extractFields'; diff --git a/public/app/features/explore/Logs/LogsTableActiveFields.tsx b/public/app/features/explore/Logs/LogsTableActiveFields.tsx index eb833030106..c228c7aaf7b 100644 --- a/public/app/features/explore/Logs/LogsTableActiveFields.tsx +++ b/public/app/features/explore/Logs/LogsTableActiveFields.tsx @@ -1,7 +1,7 @@ import { css, cx } from '@emotion/css'; import { DragDropContext, Draggable, DraggableProvided, Droppable, DropResult } from '@hello-pangea/dnd'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { useTheme2 } from '@grafana/ui'; import { LogsTableEmptyFields } from './LogsTableEmptyFields'; diff --git a/public/app/features/explore/Logs/LogsTableMultiSelect.tsx b/public/app/features/explore/Logs/LogsTableMultiSelect.tsx index 10308e761a7..19e10e72f4b 100644 --- a/public/app/features/explore/Logs/LogsTableMultiSelect.tsx +++ b/public/app/features/explore/Logs/LogsTableMultiSelect.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { useTheme2 } from '@grafana/ui'; import { LogsTableActiveFields } from './LogsTableActiveFields'; diff --git a/public/app/features/explore/Logs/LogsTableWrap.test.tsx b/public/app/features/explore/Logs/LogsTableWrap.test.tsx index a862b326065..3fd2add101f 100644 --- a/public/app/features/explore/Logs/LogsTableWrap.test.tsx +++ b/public/app/features/explore/Logs/LogsTableWrap.test.tsx @@ -1,14 +1,8 @@ import { act, fireEvent, render, screen, waitFor } from '@testing-library/react'; import { ComponentProps } from 'react'; -import { - createTheme, - ExploreLogsPanelState, - LogsSortOrder, - standardTransformersRegistry, - toUtc, -} from '@grafana/data/src'; -import { organizeFieldsTransformer } from '@grafana/data/src/transformations/transformers/organize'; +import { createTheme, ExploreLogsPanelState, LogsSortOrder, standardTransformersRegistry, toUtc } from '@grafana/data'; +import { organizeFieldsTransformer } from '@grafana/data/internal'; import { config } from '@grafana/runtime'; import { extractFieldsTransformer } from '../../transformers/extractFields/extractFields'; diff --git a/public/app/features/explore/Logs/utils/testMocks.test.ts b/public/app/features/explore/Logs/utils/testMocks.test.ts index 55a19433b20..aadea96a5e7 100644 --- a/public/app/features/explore/Logs/utils/testMocks.test.ts +++ b/public/app/features/explore/Logs/utils/testMocks.test.ts @@ -1,4 +1,4 @@ -import { DataFrame, Field, FieldType } from '@grafana/data/src'; +import { DataFrame, Field, FieldType } from '@grafana/data'; import { DataFrameType } from '../../../../../../packages/grafana-data'; diff --git a/public/app/features/explore/NoData.tsx b/public/app/features/explore/NoData.tsx index 130f38750ef..38384793050 100644 --- a/public/app/features/explore/NoData.tsx +++ b/public/app/features/explore/NoData.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { useStyles2, PanelContainer } from '@grafana/ui'; export const NoData = () => { diff --git a/public/app/features/explore/PrometheusListView/ItemLabels.tsx b/public/app/features/explore/PrometheusListView/ItemLabels.tsx index 4f0884ab71b..4fb465818cc 100644 --- a/public/app/features/explore/PrometheusListView/ItemLabels.tsx +++ b/public/app/features/explore/PrometheusListView/ItemLabels.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { Field, GrafanaTheme2 } from '@grafana/data/'; +import { Field, GrafanaTheme2 } from '@grafana/data'; import { InstantQueryRefIdIndex } from '@grafana/prometheus'; import { useStyles2 } from '@grafana/ui'; diff --git a/public/app/features/explore/PrometheusListView/ItemValues.tsx b/public/app/features/explore/PrometheusListView/ItemValues.tsx index 2cb61be35c0..ab46049a540 100644 --- a/public/app/features/explore/PrometheusListView/ItemValues.tsx +++ b/public/app/features/explore/PrometheusListView/ItemValues.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data/'; +import { GrafanaTheme2 } from '@grafana/data'; import { useStyles2 } from '@grafana/ui'; import { rawListItemColumnWidth, rawListPaddingToHoldSpaceForCopyIcon, RawListValue } from './RawListItem'; diff --git a/public/app/features/explore/PrometheusListView/RawListContainer.test.tsx b/public/app/features/explore/PrometheusListView/RawListContainer.test.tsx index 8f3d27dbac8..896b5dd7ba8 100644 --- a/public/app/features/explore/PrometheusListView/RawListContainer.test.tsx +++ b/public/app/features/explore/PrometheusListView/RawListContainer.test.tsx @@ -1,6 +1,6 @@ import { render, screen, within } from '@testing-library/react'; -import { FieldType, FormattedValue, toDataFrame } from '@grafana/data/src'; +import { FieldType, FormattedValue, toDataFrame } from '@grafana/data'; import RawListContainer, { RawListContainerProps } from './RawListContainer'; diff --git a/public/app/features/explore/PrometheusListView/RawListContainer.tsx b/public/app/features/explore/PrometheusListView/RawListContainer.tsx index ee8dedfd5ab..eb0717b6c43 100644 --- a/public/app/features/explore/PrometheusListView/RawListContainer.tsx +++ b/public/app/features/explore/PrometheusListView/RawListContainer.tsx @@ -4,7 +4,7 @@ import { useEffect, useId, useRef, useState } from 'react'; import { useWindowSize } from 'react-use'; import { VariableSizeList as List } from 'react-window'; -import { DataFrame, Field as DataFrameField } from '@grafana/data/'; +import { DataFrame, Field as DataFrameField } from '@grafana/data'; import { reportInteraction } from '@grafana/runtime/src'; import { Field, Switch } from '@grafana/ui'; diff --git a/public/app/features/explore/PrometheusListView/RawListItem.tsx b/public/app/features/explore/PrometheusListView/RawListItem.tsx index b5a4e5b9433..a396a636a2b 100644 --- a/public/app/features/explore/PrometheusListView/RawListItem.tsx +++ b/public/app/features/explore/PrometheusListView/RawListItem.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import { useCopyToClipboard } from 'react-use'; -import { Field, GrafanaTheme2 } from '@grafana/data/'; +import { Field, GrafanaTheme2 } from '@grafana/data'; import { isValidLegacyName, utf8Support } from '@grafana/prometheus/src/utf8_support'; import { reportInteraction } from '@grafana/runtime/src'; import { IconButton, useStyles2 } from '@grafana/ui'; diff --git a/public/app/features/explore/PrometheusListView/RawListItemAttributes.tsx b/public/app/features/explore/PrometheusListView/RawListItemAttributes.tsx index bbc7962c918..8d9ecb28fe2 100644 --- a/public/app/features/explore/PrometheusListView/RawListItemAttributes.tsx +++ b/public/app/features/explore/PrometheusListView/RawListItemAttributes.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data/'; +import { GrafanaTheme2 } from '@grafana/data'; import { useStyles2 } from '@grafana/ui'; import { RawListValue } from './RawListItem'; diff --git a/public/app/features/explore/state/main.test.ts b/public/app/features/explore/state/main.test.ts index 28fe5009234..d52a1be7211 100644 --- a/public/app/features/explore/state/main.test.ts +++ b/public/app/features/explore/state/main.test.ts @@ -1,7 +1,6 @@ import { thunkTester } from 'test/core/thunk/thunkTester'; -import { dateTime, ExploreUrlState } from '@grafana/data'; -import { serializeStateToUrlParam } from '@grafana/data/src/utils/url'; +import { dateTime, ExploreUrlState, serializeStateToUrlParam } from '@grafana/data'; import { locationService } from '@grafana/runtime'; import { PanelModel } from 'app/features/dashboard/state/PanelModel'; diff --git a/public/app/features/live/centrifuge/LiveDataStream.ts b/public/app/features/live/centrifuge/LiveDataStream.ts index a4b6eb80255..6d0787c205f 100644 --- a/public/app/features/live/centrifuge/LiveDataStream.ts +++ b/public/app/features/live/centrifuge/LiveDataStream.ts @@ -12,7 +12,7 @@ import { LoadingState, StreamingDataFrame, } from '@grafana/data'; -import { getStreamingFrameOptions } from '@grafana/data/src/dataframe/StreamingDataFrame'; +import { getStreamingFrameOptions } from '@grafana/data/internal'; import { LiveDataStreamOptions, StreamingFrameAction, StreamingFrameOptions } from '@grafana/runtime/src/services/live'; import { toDataQueryError } from '@grafana/runtime/src/utils/toDataQueryError'; diff --git a/public/app/features/logs/components/InfiniteScroll.test.tsx b/public/app/features/logs/components/InfiniteScroll.test.tsx index c6b92afaef5..dfbb093c17f 100644 --- a/public/app/features/logs/components/InfiniteScroll.test.tsx +++ b/public/app/features/logs/components/InfiniteScroll.test.tsx @@ -2,8 +2,7 @@ import { act, render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { useEffect, useRef, useState } from 'react'; -import { CoreApp, LogRowModel, dateTimeForTimeZone } from '@grafana/data'; -import { convertRawToRange } from '@grafana/data/src/datetime/rangeutil'; +import { CoreApp, LogRowModel, dateTimeForTimeZone, rangeUtil } from '@grafana/data'; import { config } from '@grafana/runtime'; import { LogsSortOrder } from '@grafana/schema'; @@ -16,7 +15,7 @@ const absoluteRange = { from: 1702578600000, to: 1702578900000, }; -const defaultRange = convertRawToRange({ +const defaultRange = rangeUtil.convertRawToRange({ from: dateTimeForTimeZone(defaultTz, absoluteRange.from), to: dateTimeForTimeZone(defaultTz, absoluteRange.to), }); diff --git a/public/app/features/logs/components/InfiniteScroll.tsx b/public/app/features/logs/components/InfiniteScroll.tsx index 36d748d2db1..df0b3109237 100644 --- a/public/app/features/logs/components/InfiniteScroll.tsx +++ b/public/app/features/logs/components/InfiniteScroll.tsx @@ -1,8 +1,8 @@ import { css } from '@emotion/css'; import { ReactNode, MutableRefObject, useCallback, useEffect, useRef, useState } from 'react'; -import { AbsoluteTimeRange, CoreApp, LogRowModel, TimeRange } from '@grafana/data'; -import { convertRawToRange, isRelativeTime, isRelativeTimeRange } from '@grafana/data/src/datetime/rangeutil'; +import { AbsoluteTimeRange, CoreApp, LogRowModel, TimeRange, rangeUtil } from '@grafana/data'; +// import { convertRawToRange, isRelativeTime, isRelativeTimeRange } from '@grafana/data/internal'; import { config, reportInteraction } from '@grafana/runtime'; import { LogsSortOrder, TimeZone } from '@grafana/schema'; import { Button, Icon } from '@grafana/ui'; @@ -140,8 +140,8 @@ export const InfiniteScroll = ({ }, [loadMoreLogs, loading, range, rows, scrollElement, sortOrder, timeZone, topScrollEnabled]); // We allow "now" to move when using relative time, so we hide the message so it doesn't flash. - const hideTopMessage = sortOrder === LogsSortOrder.Descending && isRelativeTime(range.raw.to); - const hideBottomMessage = sortOrder === LogsSortOrder.Ascending && isRelativeTime(range.raw.to); + const hideTopMessage = sortOrder === LogsSortOrder.Descending && rangeUtil.isRelativeTime(range.raw.to); + const hideBottomMessage = sortOrder === LogsSortOrder.Ascending && rangeUtil.isRelativeTime(range.raw.to); const loadOlderLogs = useCallback(() => { //If we are not on the last page, use next page's range @@ -344,5 +344,7 @@ export function canScrollBottom( // Given a TimeRange, returns a new instance if using relative time, or else the same. function updateCurrentRange(timeRange: TimeRange, timeZone: TimeZone) { - return isRelativeTimeRange(timeRange.raw) ? convertRawToRange(timeRange.raw, timeZone) : timeRange; + return rangeUtil.isRelativeTimeRange(timeRange.raw) + ? rangeUtil.convertRawToRange(timeRange.raw, timeZone) + : timeRange; } diff --git a/public/app/features/logs/components/LogDetailsRow.test.tsx b/public/app/features/logs/components/LogDetailsRow.test.tsx index 5f3229255b3..4463adde1f7 100644 --- a/public/app/features/logs/components/LogDetailsRow.test.tsx +++ b/public/app/features/logs/components/LogDetailsRow.test.tsx @@ -1,8 +1,7 @@ import { fireEvent, render, screen } from '@testing-library/react'; import { ComponentProps } from 'react'; -import { CoreApp, FieldType, LinkModel } from '@grafana/data'; -import { Field } from '@grafana/data/'; +import { Field, CoreApp, FieldType, LinkModel } from '@grafana/data'; import { LogDetailsRow } from './LogDetailsRow'; import { createLogRow } from './__mocks__/logRow'; diff --git a/public/app/features/logs/logsModel.ts b/public/app/features/logs/logsModel.ts index 60aef4364bd..a63e464c62f 100644 --- a/public/app/features/logs/logsModel.ts +++ b/public/app/features/logs/logsModel.ts @@ -39,7 +39,7 @@ import { toDataFrame, toUtc, } from '@grafana/data'; -import { SIPrefix } from '@grafana/data/src/valueFormats/symbolFormatters'; +import { SIPrefix } from '@grafana/data/internal'; import { config } from '@grafana/runtime'; import { BarAlignment, GraphDrawStyle, StackingMode } from '@grafana/schema'; import { colors } from '@grafana/ui'; diff --git a/public/app/features/manage-dashboards/components/PublicDashboardListTable/DeletePublicDashboardModal.tsx b/public/app/features/manage-dashboards/components/PublicDashboardListTable/DeletePublicDashboardModal.tsx index 8e3766ce457..dabaa6d3473 100644 --- a/public/app/features/manage-dashboards/components/PublicDashboardListTable/DeletePublicDashboardModal.tsx +++ b/public/app/features/manage-dashboards/components/PublicDashboardListTable/DeletePublicDashboardModal.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { config } from '@grafana/runtime'; import { ConfirmModal, useStyles2 } from '@grafana/ui'; import { t } from 'app/core/internationalization'; diff --git a/public/app/features/panel/state/actions.test.ts b/public/app/features/panel/state/actions.test.ts index 0f6dc41284d..98c0105f848 100644 --- a/public/app/features/panel/state/actions.test.ts +++ b/public/app/features/panel/state/actions.test.ts @@ -1,6 +1,5 @@ import { standardEditorsRegistry, standardFieldConfigEditorRegistry } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; -import { mockStandardFieldConfigOptions } from '@grafana/data/test/helpers/fieldConfig'; +import { getPanelPlugin, mockStandardFieldConfigOptions } from '@grafana/data/test'; import { PanelModel } from 'app/features/dashboard/state/PanelModel'; import { panelPluginLoaded } from 'app/features/plugins/admin/state/actions'; diff --git a/public/app/features/plugins/components/AppRootPage.test.tsx b/public/app/features/plugins/components/AppRootPage.test.tsx index 594028bcebf..bef9ed62306 100644 --- a/public/app/features/plugins/components/AppRootPage.test.tsx +++ b/public/app/features/plugins/components/AppRootPage.test.tsx @@ -4,7 +4,7 @@ import { Routes, Route, Link } from 'react-router-dom-v5-compat'; import { render } from 'test/test-utils'; import { AppPlugin, PluginType, AppRootProps, NavModelItem, PluginIncludeType, OrgRole } from '@grafana/data'; -import { getMockPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getMockPlugin } from '@grafana/data/test'; import { setEchoSrv } from '@grafana/runtime'; import { GrafanaRouteWrapper } from 'app/core/navigation/GrafanaRoute'; import { contextSrv } from 'app/core/services/context_srv'; diff --git a/public/app/features/plugins/extensions/registry/AddedLinksRegistry.ts b/public/app/features/plugins/extensions/registry/AddedLinksRegistry.ts index 52a1ad9a96c..12024fd0863 100644 --- a/public/app/features/plugins/extensions/registry/AddedLinksRegistry.ts +++ b/public/app/features/plugins/extensions/registry/AddedLinksRegistry.ts @@ -1,7 +1,7 @@ import { ReplaySubject } from 'rxjs'; import { IconName, PluginExtensionAddedLinkConfig } from '@grafana/data'; -import { PluginAddedLinksConfigureFunc, PluginExtensionEventHelpers } from '@grafana/data/src/types/pluginExtensions'; +import { PluginAddedLinksConfigureFunc, PluginExtensionEventHelpers } from '@grafana/data/internal'; import * as errors from '../errors'; import { isGrafanaDevMode } from '../utils'; diff --git a/public/app/features/plugins/extensions/validators.ts b/public/app/features/plugins/extensions/validators.ts index cbdaf81e935..4106544567f 100644 --- a/public/app/features/plugins/extensions/validators.ts +++ b/public/app/features/plugins/extensions/validators.ts @@ -1,13 +1,14 @@ -import type { - PluginExtensionAddedLinkConfig, - PluginExtension, - PluginExtensionLink, - PluginContextType, - PluginExtensionAddedComponentConfig, - PluginExtensionExposedComponentConfig, - PluginExtensionAddedFunctionConfig, +import { + type PluginExtensionAddedLinkConfig, + type PluginExtension, + type PluginExtensionLink, + type PluginContextType, + type PluginExtensionAddedComponentConfig, + type PluginExtensionExposedComponentConfig, + type PluginExtensionAddedFunctionConfig, + PluginExtensionPoints, } from '@grafana/data'; -import { PluginAddedLinksConfigureFunc, PluginExtensionPoints } from '@grafana/data/src/types/pluginExtensions'; +import { PluginAddedLinksConfigureFunc } from '@grafana/data/internal'; import { config, isPluginExtensionLink } from '@grafana/runtime'; import * as errors from './errors'; diff --git a/public/app/features/plugins/loader/sharedDependencies.ts b/public/app/features/plugins/loader/sharedDependencies.ts index dc88d5a292c..0551cd8d170 100644 --- a/public/app/features/plugins/loader/sharedDependencies.ts +++ b/public/app/features/plugins/loader/sharedDependencies.ts @@ -49,7 +49,7 @@ export const sharedDependenciesMap = { '@emotion/css': () => import('@emotion/css'), '@emotion/react': () => import('@emotion/react'), '@grafana/data': grafanaData, - '@grafana/data/unstable': () => import('@grafana/data/src/unstable'), + '@grafana/data/unstable': () => import('@grafana/data/unstable'), '@grafana/runtime': grafanaRuntime, '@grafana/runtime/unstable': () => import('@grafana/runtime/src/unstable'), '@grafana/slate-react': () => import('slate-react'), diff --git a/public/app/features/plugins/pluginPreloader.ts b/public/app/features/plugins/pluginPreloader.ts index 8b7a85759be..43b58f2d08e 100644 --- a/public/app/features/plugins/pluginPreloader.ts +++ b/public/app/features/plugins/pluginPreloader.ts @@ -1,5 +1,8 @@ -import type { PluginExtensionAddedLinkConfig, PluginExtensionExposedComponentConfig } from '@grafana/data'; -import { PluginExtensionAddedComponentConfig } from '@grafana/data/src/types/pluginExtensions'; +import type { + PluginExtensionAddedLinkConfig, + PluginExtensionExposedComponentConfig, + PluginExtensionAddedComponentConfig, +} from '@grafana/data'; import type { AppPluginConfig } from '@grafana/runtime'; import { getPluginSettings } from 'app/features/plugins/pluginSettings'; diff --git a/public/app/features/scopes/tests/utils/render.tsx b/public/app/features/scopes/tests/utils/render.tsx index 3fa447d952b..391331eb5f1 100644 --- a/public/app/features/scopes/tests/utils/render.tsx +++ b/public/app/features/scopes/tests/utils/render.tsx @@ -2,7 +2,7 @@ import { cleanup, waitFor } from '@testing-library/react'; import { KBarProvider } from 'kbar'; import { render } from 'test/test-utils'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { config, setPluginImportUtils } from '@grafana/runtime'; import { sceneGraph } from '@grafana/scenes'; import { defaultDashboard } from '@grafana/schema'; diff --git a/public/app/features/trails/DataTrailsHistory.tsx b/public/app/features/trails/DataTrailsHistory.tsx index bfd7af07344..81e20a8b29c 100644 --- a/public/app/features/trails/DataTrailsHistory.tsx +++ b/public/app/features/trails/DataTrailsHistory.tsx @@ -1,8 +1,7 @@ import { css, cx } from '@emotion/css'; import { useMemo } from 'react'; -import { getTimeZoneInfo, GrafanaTheme2, InternalTimeZones, TIME_FORMAT } from '@grafana/data'; -import { convertRawToRange } from '@grafana/data/src/datetime/rangeutil'; +import { getTimeZoneInfo, GrafanaTheme2, InternalTimeZones, TIME_FORMAT, rangeUtil } from '@grafana/data'; import { config } from '@grafana/runtime'; import { SceneComponentProps, @@ -349,7 +348,7 @@ export function parseTimeTooltip(urlValues: SceneObjectUrlValues): string { return ''; } - const range = convertRawToRange({ + const range = rangeUtil.convertRawToRange({ from: urlValues.from, to: urlValues.to, }); diff --git a/public/app/features/trails/Integrations/logs/lokiRecordingRules.test.ts b/public/app/features/trails/Integrations/logs/lokiRecordingRules.test.ts index 673cb2d5348..8d7e5418b3a 100644 --- a/public/app/features/trails/Integrations/logs/lokiRecordingRules.test.ts +++ b/public/app/features/trails/Integrations/logs/lokiRecordingRules.test.ts @@ -1,7 +1,7 @@ import { of } from 'rxjs'; import type { DataSourceInstanceSettings, DataSourceJsonData } from '@grafana/data'; -import { getMockPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getMockPlugin } from '@grafana/data/test'; import * as runtime from '@grafana/runtime'; import { MetricsLogsConnector } from './base'; diff --git a/public/app/features/transformers/FilterByValueTransformer/FilterByValueFilterEditor.tsx b/public/app/features/transformers/FilterByValueTransformer/FilterByValueFilterEditor.tsx index f896c2a5759..1b2f85c51da 100644 --- a/public/app/features/transformers/FilterByValueTransformer/FilterByValueFilterEditor.tsx +++ b/public/app/features/transformers/FilterByValueTransformer/FilterByValueFilterEditor.tsx @@ -1,7 +1,7 @@ import { useCallback } from 'react'; import { Field, SelectableValue, valueMatchers } from '@grafana/data'; -import { FilterByValueFilter } from '@grafana/data/src/transformations/transformers/filterByValue'; +import { FilterByValueFilter } from '@grafana/data/internal'; import { Button, Select, InlineField, InlineFieldRow, Box } from '@grafana/ui'; import { valueMatchersUI } from './ValueMatchers/valueMatchersUI'; diff --git a/public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.test.tsx b/public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.test.tsx index e9cf39d1497..6c064b2ad0c 100644 --- a/public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.test.tsx +++ b/public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.test.tsx @@ -1,7 +1,7 @@ import { render, fireEvent } from '@testing-library/react'; import { DataFrame, FieldType, ValueMatcherID, valueMatchers } from '@grafana/data'; -import { FilterByValueMatch, FilterByValueType } from '@grafana/data/src/transformations/transformers/filterByValue'; +import { FilterByValueMatch, FilterByValueType } from '@grafana/data/internal'; import { FilterByValueTransformerEditor } from './FilterByValueTransformerEditor'; diff --git a/public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.tsx b/public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.tsx index 683350d47b1..57b42e72d32 100644 --- a/public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.tsx +++ b/public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.tsx @@ -19,7 +19,7 @@ import { FilterByValueMatch, FilterByValueTransformerOptions, FilterByValueType, -} from '@grafana/data/src/transformations/transformers/filterByValue'; +} from '@grafana/data/internal'; import { Button, RadioButtonGroup, InlineField, Box } from '@grafana/ui'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/calculateHeatmap/heatmap.test.ts b/public/app/features/transformers/calculateHeatmap/heatmap.test.ts index 0087b9fe22f..256cd576ebe 100644 --- a/public/app/features/transformers/calculateHeatmap/heatmap.test.ts +++ b/public/app/features/transformers/calculateHeatmap/heatmap.test.ts @@ -1,5 +1,4 @@ -import { FieldType } from '@grafana/data'; -import { toDataFrame } from '@grafana/data/src/dataframe/processDataFrame'; +import { FieldType, toDataFrame } from '@grafana/data'; import { HeatmapCalculationOptions } from '@grafana/schema'; import { rowsToCellsHeatmap, calculateHeatmapFromData } from './heatmap'; diff --git a/public/app/features/transformers/calculateHeatmap/heatmap.ts b/public/app/features/transformers/calculateHeatmap/heatmap.ts index 6a7a29ce69c..ed37d76651e 100644 --- a/public/app/features/transformers/calculateHeatmap/heatmap.ts +++ b/public/app/features/transformers/calculateHeatmap/heatmap.ts @@ -15,7 +15,7 @@ import { TransformationApplicabilityLevels, TimeRange, } from '@grafana/data'; -import { isLikelyAscendingVector } from '@grafana/data/src/transformations/transformers/joinDataFrames'; +import { isLikelyAscendingVector } from '@grafana/data/internal'; import { ScaleDistribution, HeatmapCellLayout, diff --git a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/BinaryOperationOptionsEditor.tsx b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/BinaryOperationOptionsEditor.tsx index 0dd7cc033cb..e0439cf7126 100644 --- a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/BinaryOperationOptionsEditor.tsx +++ b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/BinaryOperationOptionsEditor.tsx @@ -5,7 +5,7 @@ import { CalculateFieldMode, CalculateFieldTransformerOptions, checkBinaryValueType, -} from '@grafana/data/src/transformations/transformers/calculateField'; +} from '@grafana/data/internal'; import { getFieldTypeIconName, InlineField, InlineFieldRow, Select } from '@grafana/ui'; import { LABEL_WIDTH } from './constants'; diff --git a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CalculateFieldTransformerEditor.tsx b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CalculateFieldTransformerEditor.tsx index bc39a4e2c62..bd0e589dd88 100644 --- a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CalculateFieldTransformerEditor.tsx +++ b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CalculateFieldTransformerEditor.tsx @@ -21,7 +21,7 @@ import { CalculateFieldTransformerOptions, getNameFromOptions, defaultWindowOptions, -} from '@grafana/data/src/transformations/transformers/calculateField'; +} from '@grafana/data/internal'; import { getTemplateSrv, config as cfg } from '@grafana/runtime'; import { InlineField, InlineSwitch, Input, Select } from '@grafana/ui'; diff --git a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CumulativeOptionsEditor.tsx b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CumulativeOptionsEditor.tsx index 1194514bcf4..5d8eb17ea1d 100644 --- a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CumulativeOptionsEditor.tsx +++ b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CumulativeOptionsEditor.tsx @@ -1,9 +1,5 @@ import { ReducerID, SelectableValue } from '@grafana/data'; -import { - CalculateFieldMode, - CalculateFieldTransformerOptions, - CumulativeOptions, -} from '@grafana/data/src/transformations/transformers/calculateField'; +import { CalculateFieldMode, CalculateFieldTransformerOptions, CumulativeOptions } from '@grafana/data/internal'; import { InlineField, Select, StatsPicker } from '@grafana/ui'; import { LABEL_WIDTH } from './constants'; diff --git a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/IndexOptionsEditor.tsx b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/IndexOptionsEditor.tsx index c660ac21317..e812dfafb0e 100644 --- a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/IndexOptionsEditor.tsx +++ b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/IndexOptionsEditor.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { CalculateFieldTransformerOptions } from '@grafana/data/src/transformations/transformers/calculateField'; +import { CalculateFieldTransformerOptions } from '@grafana/data/internal'; import { InlineField, InlineSwitch } from '@grafana/ui'; import { LABEL_WIDTH } from './constants'; diff --git a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/ReduceRowOptionsEditor.tsx b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/ReduceRowOptionsEditor.tsx index c48870fc36b..e3e50a475ef 100644 --- a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/ReduceRowOptionsEditor.tsx +++ b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/ReduceRowOptionsEditor.tsx @@ -1,8 +1,5 @@ import { ReducerID } from '@grafana/data'; -import { - CalculateFieldTransformerOptions, - ReduceOptions, -} from '@grafana/data/src/transformations/transformers/calculateField'; +import { CalculateFieldTransformerOptions, ReduceOptions } from '@grafana/data/internal'; import { FilterPill, HorizontalGroup, InlineField, StatsPicker } from '@grafana/ui'; import { LABEL_WIDTH } from './constants'; diff --git a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/UnaryOperationEditor.tsx b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/UnaryOperationEditor.tsx index 3b38248b705..4c57fca1b9b 100644 --- a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/UnaryOperationEditor.tsx +++ b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/UnaryOperationEditor.tsx @@ -1,9 +1,5 @@ import { unaryOperators, SelectableValue, UnaryOperationID } from '@grafana/data'; -import { - UnaryOptions, - CalculateFieldMode, - CalculateFieldTransformerOptions, -} from '@grafana/data/src/transformations/transformers/calculateField'; +import { UnaryOptions, CalculateFieldMode, CalculateFieldTransformerOptions } from '@grafana/data/internal'; import { InlineField, InlineFieldRow, InlineLabel, Select } from '@grafana/ui'; import { LABEL_WIDTH } from './constants'; diff --git a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/WindowOptionsEditor.tsx b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/WindowOptionsEditor.tsx index b025c705c12..34fee4b264d 100644 --- a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/WindowOptionsEditor.tsx +++ b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/WindowOptionsEditor.tsx @@ -5,7 +5,7 @@ import { CalculateFieldTransformerOptions, WindowOptions, WindowSizeMode, -} from '@grafana/data/src/transformations/transformers/calculateField'; +} from '@grafana/data/internal'; import { InlineField, RadioButtonGroup, Select, StatsPicker } from '@grafana/ui'; import { NumberInput } from 'app/core/components/OptionsUI/NumberInput'; diff --git a/public/app/features/transformers/editors/ConcatenateTransformerEditor.tsx b/public/app/features/transformers/editors/ConcatenateTransformerEditor.tsx index 8c548fb2f38..91a0b251d74 100644 --- a/public/app/features/transformers/editors/ConcatenateTransformerEditor.tsx +++ b/public/app/features/transformers/editors/ConcatenateTransformerEditor.tsx @@ -8,10 +8,7 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { - ConcatenateFrameNameMode, - ConcatenateTransformerOptions, -} from '@grafana/data/src/transformations/transformers/concat'; +import { ConcatenateFrameNameMode, ConcatenateTransformerOptions } from '@grafana/data/internal'; import { InlineField, Input, Select } from '@grafana/ui'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/ConvertFieldTypeTransformerEditor.tsx b/public/app/features/transformers/editors/ConvertFieldTypeTransformerEditor.tsx index c7d0f4f2f39..e331388cb3e 100644 --- a/public/app/features/transformers/editors/ConvertFieldTypeTransformerEditor.tsx +++ b/public/app/features/transformers/editors/ConvertFieldTypeTransformerEditor.tsx @@ -12,10 +12,7 @@ import { TransformerCategory, getTimeZones, } from '@grafana/data'; -import { - ConvertFieldTypeOptions, - ConvertFieldTypeTransformerOptions, -} from '@grafana/data/src/transformations/transformers/convertFieldType'; +import { ConvertFieldTypeOptions, ConvertFieldTypeTransformerOptions } from '@grafana/data/internal'; import { Button, InlineField, InlineFieldRow, Input, Select } from '@grafana/ui'; import { allFieldTypeIconOptions, FieldNamePicker } from '@grafana/ui/internal'; import { findField } from 'app/features/dimensions'; diff --git a/public/app/features/transformers/editors/EnumMappingEditor.tsx b/public/app/features/transformers/editors/EnumMappingEditor.tsx index 09f1822302c..ed1947a7181 100644 --- a/public/app/features/transformers/editors/EnumMappingEditor.tsx +++ b/public/app/features/transformers/editors/EnumMappingEditor.tsx @@ -4,7 +4,7 @@ import { isEqual } from 'lodash'; import { useEffect, useState } from 'react'; import { DataFrame, EnumFieldConfig, GrafanaTheme2 } from '@grafana/data'; -import { ConvertFieldTypeTransformerOptions } from '@grafana/data/src/transformations/transformers/convertFieldType'; +import { ConvertFieldTypeTransformerOptions } from '@grafana/data/internal'; import { Button, HorizontalGroup, InlineFieldRow, useStyles2, VerticalGroup } from '@grafana/ui'; import EnumMappingRow from './EnumMappingRow'; diff --git a/public/app/features/transformers/editors/FilterByNameTransformerEditor.tsx b/public/app/features/transformers/editors/FilterByNameTransformerEditor.tsx index 8ac19f37e7f..f8035a86f0b 100644 --- a/public/app/features/transformers/editors/FilterByNameTransformerEditor.tsx +++ b/public/app/features/transformers/editors/FilterByNameTransformerEditor.tsx @@ -11,7 +11,7 @@ import { TransformerCategory, SelectableValue, } from '@grafana/data'; -import { FilterFieldsByNameTransformerOptions } from '@grafana/data/src/transformations/transformers/filterByName'; +import { FilterFieldsByNameTransformerOptions } from '@grafana/data/internal'; import { getTemplateSrv } from '@grafana/runtime/src/services'; import { Input, FilterPill, InlineFieldRow, InlineField, InlineSwitch, Select } from '@grafana/ui'; diff --git a/public/app/features/transformers/editors/FilterByRefIdTransformerEditor.tsx b/public/app/features/transformers/editors/FilterByRefIdTransformerEditor.tsx index f67a7cb2b95..05b9e196b83 100644 --- a/public/app/features/transformers/editors/FilterByRefIdTransformerEditor.tsx +++ b/public/app/features/transformers/editors/FilterByRefIdTransformerEditor.tsx @@ -6,7 +6,7 @@ import { TransformerCategory, FrameMatcherID, } from '@grafana/data'; -import { FilterFramesByRefIdTransformerOptions } from '@grafana/data/src/transformations/transformers/filterByRefId'; +import { FilterFramesByRefIdTransformerOptions } from '@grafana/data/internal'; import { FrameMultiSelectionEditor } from 'app/plugins/panel/geomap/editor/FrameSelectionEditor'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/FormatStringTransformerEditor.tsx b/public/app/features/transformers/editors/FormatStringTransformerEditor.tsx index e208d67976e..cf14f69a044 100644 --- a/public/app/features/transformers/editors/FormatStringTransformerEditor.tsx +++ b/public/app/features/transformers/editors/FormatStringTransformerEditor.tsx @@ -12,10 +12,7 @@ import { FieldNamePickerConfigSettings, TransformerCategory, } from '@grafana/data'; -import { - FormatStringOutput, - FormatStringTransformerOptions, -} from '@grafana/data/src/transformations/transformers/formatString'; +import { FormatStringOutput, FormatStringTransformerOptions } from '@grafana/data/internal'; import { Select, InlineFieldRow, InlineField } from '@grafana/ui'; import { FieldNamePicker } from '@grafana/ui/internal'; import { NumberInput } from 'app/core/components/OptionsUI/NumberInput'; diff --git a/public/app/features/transformers/editors/FormatTimeTransformerEditor.tsx b/public/app/features/transformers/editors/FormatTimeTransformerEditor.tsx index 4c2a646d93f..3f30a79d1a5 100644 --- a/public/app/features/transformers/editors/FormatTimeTransformerEditor.tsx +++ b/public/app/features/transformers/editors/FormatTimeTransformerEditor.tsx @@ -9,7 +9,7 @@ import { getFieldDisplayName, PluginState, } from '@grafana/data'; -import { FormatTimeTransformerOptions } from '@grafana/data/src/transformations/transformers/formatTime'; +import { FormatTimeTransformerOptions } from '@grafana/data/internal'; import { Select, InlineFieldRow, InlineField, Input } from '@grafana/ui'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/GroupByTransformerEditor.tsx b/public/app/features/transformers/editors/GroupByTransformerEditor.tsx index ca4386f541f..5dc4636bf59 100644 --- a/public/app/features/transformers/editors/GroupByTransformerEditor.tsx +++ b/public/app/features/transformers/editors/GroupByTransformerEditor.tsx @@ -11,11 +11,7 @@ import { TransformerCategory, GrafanaTheme2, } from '@grafana/data'; -import { - GroupByFieldOptions, - GroupByOperationID, - GroupByTransformerOptions, -} from '@grafana/data/src/transformations/transformers/groupBy'; +import { GroupByFieldOptions, GroupByOperationID, GroupByTransformerOptions } from '@grafana/data/internal'; import { useTheme2, Select, StatsPicker, InlineField, Stack, Alert } from '@grafana/ui'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/GroupToNestedTableTransformerEditor.tsx b/public/app/features/transformers/editors/GroupToNestedTableTransformerEditor.tsx index 17170be06cc..9b874bf5c64 100644 --- a/public/app/features/transformers/editors/GroupToNestedTableTransformerEditor.tsx +++ b/public/app/features/transformers/editors/GroupToNestedTableTransformerEditor.tsx @@ -16,11 +16,9 @@ import { GroupByFieldOptions, GroupByOperationID, GroupByTransformerOptions, -} from '@grafana/data/src/transformations/transformers/groupBy'; -import { GroupToNestedTableTransformerOptions, SHOW_NESTED_HEADERS_DEFAULT, -} from '@grafana/data/src/transformations/transformers/groupToNestedTable'; +} from '@grafana/data/internal'; import { useTheme2, Select, StatsPicker, InlineField, Field, Switch, Alert, Stack } from '@grafana/ui'; import { useAllFieldNamesFromDataFrames } from '../utils'; diff --git a/public/app/features/transformers/editors/HistogramTransformerEditor.tsx b/public/app/features/transformers/editors/HistogramTransformerEditor.tsx index a257f02b0af..e9fa82aec13 100644 --- a/public/app/features/transformers/editors/HistogramTransformerEditor.tsx +++ b/public/app/features/transformers/editors/HistogramTransformerEditor.tsx @@ -7,10 +7,7 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { - histogramFieldInfo, - HistogramTransformerInputs, -} from '@grafana/data/src/transformations/transformers/histogram'; +import { histogramFieldInfo, HistogramTransformerInputs } from '@grafana/data/internal'; import { InlineField, InlineFieldRow, InlineSwitch } from '@grafana/ui'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/JoinByFieldTransformerEditor.tsx b/public/app/features/transformers/editors/JoinByFieldTransformerEditor.tsx index cccf062d843..a28c8548780 100644 --- a/public/app/features/transformers/editors/JoinByFieldTransformerEditor.tsx +++ b/public/app/features/transformers/editors/JoinByFieldTransformerEditor.tsx @@ -8,7 +8,7 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { JoinByFieldOptions, JoinMode } from '@grafana/data/src/transformations/transformers/joinByField'; +import { JoinByFieldOptions, JoinMode } from '@grafana/data/internal'; import { getTemplateSrv } from '@grafana/runtime'; import { Select, InlineFieldRow, InlineField } from '@grafana/ui'; import { useFieldDisplayNames, useSelectOptions } from '@grafana/ui/internal'; diff --git a/public/app/features/transformers/editors/LabelsToFieldsTransformerEditor.tsx b/public/app/features/transformers/editors/LabelsToFieldsTransformerEditor.tsx index e41017a51a2..263aff71a36 100644 --- a/public/app/features/transformers/editors/LabelsToFieldsTransformerEditor.tsx +++ b/public/app/features/transformers/editors/LabelsToFieldsTransformerEditor.tsx @@ -8,10 +8,7 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { - LabelsToFieldsMode, - LabelsToFieldsOptions, -} from '@grafana/data/src/transformations/transformers/labelsToFields'; +import { LabelsToFieldsMode, LabelsToFieldsOptions } from '@grafana/data/internal'; import { InlineField, InlineFieldRow, RadioButtonGroup, Select, FilterPill, Stack } from '@grafana/ui'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/LimitTransformerEditor.tsx b/public/app/features/transformers/editors/LimitTransformerEditor.tsx index c55cb9bbfd3..fd10293e2ce 100644 --- a/public/app/features/transformers/editors/LimitTransformerEditor.tsx +++ b/public/app/features/transformers/editors/LimitTransformerEditor.tsx @@ -7,7 +7,7 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { LimitTransformerOptions } from '@grafana/data/src/transformations/transformers/limit'; +import { LimitTransformerOptions } from '@grafana/data/internal'; import { InlineFieldRow } from '@grafana/ui'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/MergeTransformerEditor.tsx b/public/app/features/transformers/editors/MergeTransformerEditor.tsx index cd55fbd5543..c81f59bcf9b 100644 --- a/public/app/features/transformers/editors/MergeTransformerEditor.tsx +++ b/public/app/features/transformers/editors/MergeTransformerEditor.tsx @@ -5,7 +5,7 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { MergeTransformerOptions } from '@grafana/data/src/transformations/transformers/merge'; +import { MergeTransformerOptions } from '@grafana/data/internal'; import { FieldValidationMessage } from '@grafana/ui'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/OrganizeFieldsTransformerEditor.tsx b/public/app/features/transformers/editors/OrganizeFieldsTransformerEditor.tsx index ef640a79dad..b253066abbf 100644 --- a/public/app/features/transformers/editors/OrganizeFieldsTransformerEditor.tsx +++ b/public/app/features/transformers/editors/OrganizeFieldsTransformerEditor.tsx @@ -10,8 +10,7 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { createOrderFieldsComparer } from '@grafana/data/src/transformations/transformers/order'; -import { OrganizeFieldsTransformerOptions } from '@grafana/data/src/transformations/transformers/organize'; +import { createOrderFieldsComparer, OrganizeFieldsTransformerOptions } from '@grafana/data/internal'; import { Input, IconButton, diff --git a/public/app/features/transformers/editors/ReduceTransformerEditor.tsx b/public/app/features/transformers/editors/ReduceTransformerEditor.tsx index fc8e10c6b7e..3131e85be1d 100644 --- a/public/app/features/transformers/editors/ReduceTransformerEditor.tsx +++ b/public/app/features/transformers/editors/ReduceTransformerEditor.tsx @@ -9,7 +9,7 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { ReduceTransformerMode, ReduceTransformerOptions } from '@grafana/data/src/transformations/transformers/reduce'; +import { ReduceTransformerMode, ReduceTransformerOptions } from '@grafana/data/internal'; import { selectors } from '@grafana/e2e-selectors'; import { InlineField, Select, StatsPicker, InlineSwitch } from '@grafana/ui'; diff --git a/public/app/features/transformers/editors/RenameByRegexTransformer.tsx b/public/app/features/transformers/editors/RenameByRegexTransformer.tsx index d192c4a9ee0..4530ad8b84a 100644 --- a/public/app/features/transformers/editors/RenameByRegexTransformer.tsx +++ b/public/app/features/transformers/editors/RenameByRegexTransformer.tsx @@ -8,7 +8,7 @@ import { stringToJsRegex, TransformerCategory, } from '@grafana/data'; -import { RenameByRegexTransformerOptions } from '@grafana/data/src/transformations/transformers/renameByRegex'; +import { RenameByRegexTransformerOptions } from '@grafana/data/internal'; import { InlineField, Input } from '@grafana/ui'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/SeriesToRowsTransformerEditor.tsx b/public/app/features/transformers/editors/SeriesToRowsTransformerEditor.tsx index 606d0cdb417..8b3b66e64ed 100644 --- a/public/app/features/transformers/editors/SeriesToRowsTransformerEditor.tsx +++ b/public/app/features/transformers/editors/SeriesToRowsTransformerEditor.tsx @@ -5,7 +5,7 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { SeriesToRowsTransformerOptions } from '@grafana/data/src/transformations/transformers/seriesToRows'; +import { SeriesToRowsTransformerOptions } from '@grafana/data/internal'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/SortByTransformerEditor.tsx b/public/app/features/transformers/editors/SortByTransformerEditor.tsx index 3faa19ebf8f..4247e1c4f66 100644 --- a/public/app/features/transformers/editors/SortByTransformerEditor.tsx +++ b/public/app/features/transformers/editors/SortByTransformerEditor.tsx @@ -7,7 +7,7 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { SortByField, SortByTransformerOptions } from '@grafana/data/src/transformations/transformers/sortBy'; +import { SortByField, SortByTransformerOptions } from '@grafana/data/internal'; import { getTemplateSrv } from '@grafana/runtime'; import { InlineField, InlineSwitch, InlineFieldRow, Select } from '@grafana/ui'; diff --git a/public/app/features/transformers/editors/TransposeTransformerEditor.tsx b/public/app/features/transformers/editors/TransposeTransformerEditor.tsx index 4190d385e48..9ba613fe78c 100644 --- a/public/app/features/transformers/editors/TransposeTransformerEditor.tsx +++ b/public/app/features/transformers/editors/TransposeTransformerEditor.tsx @@ -5,7 +5,7 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { TransposeTransformerOptions } from '@grafana/data/src/transformations/transformers/transpose'; +import { TransposeTransformerOptions } from '@grafana/data/internal'; import { InlineField, InlineFieldRow, Input } from '@grafana/ui'; export const TransposeTransfomerEditor = ({ options, onChange }: TransformerUIProps) => { diff --git a/public/app/features/transformers/extractFields/extractFields.test.ts b/public/app/features/transformers/extractFields/extractFields.test.ts index a6617aecea9..863b89163ca 100644 --- a/public/app/features/transformers/extractFields/extractFields.test.ts +++ b/public/app/features/transformers/extractFields/extractFields.test.ts @@ -5,10 +5,9 @@ import { Field, FieldType, transformDataFrame, + toDataFrame, } from '@grafana/data'; -import { toDataFrame } from '@grafana/data/src/dataframe/processDataFrame'; -import { SortByTransformerOptions, sortByTransformer } from '@grafana/data/src/transformations/transformers/sortBy'; -import { mockTransformationsRegistry } from '@grafana/data/src/utils/tests/mockTransformationsRegistry'; +import { mockTransformationsRegistry, SortByTransformerOptions, sortByTransformer } from '@grafana/data/internal'; import { extractFieldsTransformer } from './extractFields'; import { ExtractFieldsOptions, FieldExtractorID } from './types'; diff --git a/public/app/features/transformers/lookupGazetteer/fieldLookup.test.ts b/public/app/features/transformers/lookupGazetteer/fieldLookup.test.ts index 7f0072dd4d7..bc0ef8c8b82 100644 --- a/public/app/features/transformers/lookupGazetteer/fieldLookup.test.ts +++ b/public/app/features/transformers/lookupGazetteer/fieldLookup.test.ts @@ -1,6 +1,4 @@ -import { FieldMatcherID, fieldMatchers, FieldType } from '@grafana/data'; -import { toDataFrame } from '@grafana/data/src/dataframe/processDataFrame'; -import { DataTransformerID } from '@grafana/data/src/transformations/transformers/ids'; +import { DataTransformerID, toDataFrame, FieldMatcherID, fieldMatchers, FieldType } from '@grafana/data'; import { frameAsGazetter } from 'app/features/geo/gazetteer/gazetteer'; import { addFieldsFromGazetteer } from './fieldLookup'; diff --git a/public/app/features/transformers/partitionByValues/partitionByValues.ts b/public/app/features/transformers/partitionByValues/partitionByValues.ts index 80c349fe762..4ab8d360cbe 100644 --- a/public/app/features/transformers/partitionByValues/partitionByValues.ts +++ b/public/app/features/transformers/partitionByValues/partitionByValues.ts @@ -8,8 +8,7 @@ import { DataTransformContext, FieldMatcher, } from '@grafana/data'; -import { getMatcherConfig } from '@grafana/data/src/transformations/transformers/filterByName'; -import { noopTransformer } from '@grafana/data/src/transformations/transformers/noop'; +import { getMatcherConfig, noopTransformer } from '@grafana/data/internal'; import { partition } from './partition'; diff --git a/public/app/features/transformers/spatial/optionsHelper.tsx b/public/app/features/transformers/spatial/optionsHelper.tsx index 49f77cf7927..e493dfc7d0c 100644 --- a/public/app/features/transformers/spatial/optionsHelper.tsx +++ b/public/app/features/transformers/spatial/optionsHelper.tsx @@ -1,8 +1,7 @@ import { set, get as lodashGet } from 'lodash'; import { StandardEditorContext, TransformerUIProps, PanelOptionsEditorBuilder } from '@grafana/data'; -import { PanelOptionsSupplier } from '@grafana/data/src/panel/PanelPlugin'; -import { NestedValueAccess } from '@grafana/data/src/utils/OptionsUIBuilders'; +import { NestedValueAccess, PanelOptionsSupplier } from '@grafana/data/internal'; import { OptionsPaneCategoryDescriptor } from 'app/features/dashboard/components/PanelEditor/OptionsPaneCategoryDescriptor'; import { fillOptionsPaneItems } from 'app/features/dashboard/components/PanelEditor/getVisualizationOptions'; import { setOptionImmutably } from 'app/features/dashboard/components/PanelEditor/utils'; diff --git a/public/app/features/transformers/spatial/spatialTransformer.test.ts b/public/app/features/transformers/spatial/spatialTransformer.test.ts index b36315fefe5..196a6b3680d 100644 --- a/public/app/features/transformers/spatial/spatialTransformer.test.ts +++ b/public/app/features/transformers/spatial/spatialTransformer.test.ts @@ -1,6 +1,5 @@ -import { FieldMatcherID, fieldMatchers, FieldType } from '@grafana/data'; -import { toDataFrame } from '@grafana/data/src/dataframe/processDataFrame'; -import { DataTransformerID } from '@grafana/data/src/transformations/transformers/ids'; +import { toDataFrame, FieldMatcherID, fieldMatchers, FieldType } from '@grafana/data'; +import { DataTransformerID } from '@grafana/data/internal'; import { frameAsGazetter } from 'app/features/geo/gazetteer/gazetteer'; describe('spatial transformer', () => { diff --git a/public/app/features/variables/datasource/actions.test.ts b/public/app/features/variables/datasource/actions.test.ts index 4d3a5ca8e94..2a0b42b30ff 100644 --- a/public/app/features/variables/datasource/actions.test.ts +++ b/public/app/features/variables/datasource/actions.test.ts @@ -1,5 +1,5 @@ import { DataSourceInstanceSettings } from '@grafana/data'; -import { getMockPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getMockPlugin } from '@grafana/data/test'; import { reduxTester } from '../../../../test/core/redux/reduxTester'; import { variableAdapters } from '../adapters'; diff --git a/public/app/features/variables/datasource/reducer.test.ts b/public/app/features/variables/datasource/reducer.test.ts index 2acb6e96346..6a3abaa27cb 100644 --- a/public/app/features/variables/datasource/reducer.test.ts +++ b/public/app/features/variables/datasource/reducer.test.ts @@ -1,7 +1,7 @@ import { cloneDeep } from 'lodash'; import { DataSourceInstanceSettings, DataSourceVariableModel } from '@grafana/data'; -import { getMockPlugins } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getMockPlugins } from '@grafana/data/test'; import { reducerTester } from '../../../../test/core/redux/reducerTester'; import { getDataSourceInstanceSetting } from '../shared/testing/helpers'; diff --git a/public/app/features/variables/state/initVariableTransaction.test.ts b/public/app/features/variables/state/initVariableTransaction.test.ts index ba9939b8442..0e9c0070023 100644 --- a/public/app/features/variables/state/initVariableTransaction.test.ts +++ b/public/app/features/variables/state/initVariableTransaction.test.ts @@ -1,4 +1,4 @@ -import { DataSourceRef, LoadingState } from '@grafana/data/src'; +import { DataSourceRef, LoadingState } from '@grafana/data'; import { setDataSourceSrv } from '@grafana/runtime/src'; import { DashboardModel } from 'app/features/dashboard/state/DashboardModel'; diff --git a/public/app/features/variables/state/migrateVariablesDatasourceNameToRef.test.ts b/public/app/features/variables/state/migrateVariablesDatasourceNameToRef.test.ts index aea1a31a10b..7673e9bf8d5 100644 --- a/public/app/features/variables/state/migrateVariablesDatasourceNameToRef.test.ts +++ b/public/app/features/variables/state/migrateVariablesDatasourceNameToRef.test.ts @@ -1,4 +1,4 @@ -import { DataSourceRef } from '@grafana/data/src'; +import { DataSourceRef } from '@grafana/data'; import { adHocBuilder, queryBuilder } from '../shared/testing/builders'; import { toVariablePayload } from '../utils'; diff --git a/public/app/plugins/datasource/azuremonitor/__mocks__/utils.ts b/public/app/plugins/datasource/azuremonitor/__mocks__/utils.ts index 921573b797e..3e0204fdd6e 100644 --- a/public/app/plugins/datasource/azuremonitor/__mocks__/utils.ts +++ b/public/app/plugins/datasource/azuremonitor/__mocks__/utils.ts @@ -1,5 +1,4 @@ -import { VariableType, VariableWithOptions } from '@grafana/data'; -import { LoadingState } from '@grafana/data/src/types/data'; +import { LoadingState, VariableType, VariableWithOptions } from '@grafana/data'; interface TemplateableValue { variableName: string; diff --git a/public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/RawQuery.tsx b/public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/RawQuery.tsx index 742b12b9d50..bbf7c27cc5c 100644 --- a/public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/RawQuery.tsx +++ b/public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/RawQuery.tsx @@ -1,7 +1,7 @@ import { css, cx } from '@emotion/css'; import Prism, { Grammar } from 'prismjs'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { useTheme2 } from '@grafana/ui'; export interface Props { diff --git a/public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchMetricsQueryRunner.test.ts b/public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchMetricsQueryRunner.test.ts index 637328f022a..7654c6228cd 100644 --- a/public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchMetricsQueryRunner.test.ts +++ b/public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchMetricsQueryRunner.test.ts @@ -1,7 +1,6 @@ import { of } from 'rxjs'; -import { CustomVariableModel, getFrameDisplayName, VariableHide } from '@grafana/data'; -import { dateTime } from '@grafana/data/src/datetime/moment_wrapper'; +import { dateTime, CustomVariableModel, getFrameDisplayName, VariableHide } from '@grafana/data'; import { toDataQueryResponse } from '@grafana/runtime'; import { diff --git a/public/app/plugins/datasource/dashboard/datasource.test.ts b/public/app/plugins/datasource/dashboard/datasource.test.ts index 114bb966941..a543c5037d4 100644 --- a/public/app/plugins/datasource/dashboard/datasource.test.ts +++ b/public/app/plugins/datasource/dashboard/datasource.test.ts @@ -8,7 +8,7 @@ import { LoadingState, standardTransformersRegistry, } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { setPluginImportUtils } from '@grafana/runtime'; import { SafeSerializableSceneObject, diff --git a/public/app/plugins/datasource/elasticsearch/ElasticResponse.ts b/public/app/plugins/datasource/elasticsearch/ElasticResponse.ts index 5b46beee758..103a571b8a6 100644 --- a/public/app/plugins/datasource/elasticsearch/ElasticResponse.ts +++ b/public/app/plugins/datasource/elasticsearch/ElasticResponse.ts @@ -8,7 +8,7 @@ import { MutableDataFrame, PreferredVisualisationType, } from '@grafana/data'; -import { convertFieldType } from '@grafana/data/src/transformations/transformers/convertFieldType'; +import { convertFieldType } from '@grafana/data/internal'; import TableModel from 'app/core/TableModel'; import { isMetricAggregationWithField } from './components/QueryEditor/MetricAggregationsEditor/aggregations'; diff --git a/public/app/plugins/datasource/influxdb/components/editor/annotation/AnnotationEditor.tsx b/public/app/plugins/datasource/influxdb/components/editor/annotation/AnnotationEditor.tsx index a0feea2669b..71418a7904e 100644 --- a/public/app/plugins/datasource/influxdb/components/editor/annotation/AnnotationEditor.tsx +++ b/public/app/plugins/datasource/influxdb/components/editor/annotation/AnnotationEditor.tsx @@ -1,6 +1,6 @@ import { useState } from 'react'; -import { QueryEditorProps } from '@grafana/data/src'; +import { QueryEditorProps } from '@grafana/data'; import { InlineFormLabel, Input, Stack } from '@grafana/ui'; import InfluxDatasource from '../../../datasource'; diff --git a/public/app/plugins/datasource/influxdb/components/editor/constants.ts b/public/app/plugins/datasource/influxdb/components/editor/constants.ts index e234d7652ea..f9f0c4850a5 100644 --- a/public/app/plugins/datasource/influxdb/components/editor/constants.ts +++ b/public/app/plugins/datasource/influxdb/components/editor/constants.ts @@ -1,4 +1,4 @@ -import { SelectableValue } from '@grafana/data/src'; +import { SelectableValue } from '@grafana/data'; import { ResultFormat } from '../../types'; diff --git a/public/app/plugins/datasource/influxdb/components/editor/query/QueryEditor.tsx b/public/app/plugins/datasource/influxdb/components/editor/query/QueryEditor.tsx index acb8d949f4c..079bb5ba02e 100644 --- a/public/app/plugins/datasource/influxdb/components/editor/query/QueryEditor.tsx +++ b/public/app/plugins/datasource/influxdb/components/editor/query/QueryEditor.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { QueryEditorProps } from '@grafana/data/src'; +import { QueryEditorProps } from '@grafana/data'; import InfluxDatasource from '../../../datasource'; import { buildRawQuery } from '../../../queryUtils'; diff --git a/public/app/plugins/datasource/influxdb/components/editor/query/flux/FluxQueryEditor.tsx b/public/app/plugins/datasource/influxdb/components/editor/query/flux/FluxQueryEditor.tsx index b5b594f3445..daedc65855e 100644 --- a/public/app/plugins/datasource/influxdb/components/editor/query/flux/FluxQueryEditor.tsx +++ b/public/app/plugins/datasource/influxdb/components/editor/query/flux/FluxQueryEditor.tsx @@ -1,7 +1,7 @@ import { css, cx } from '@emotion/css'; import { PureComponent } from 'react'; -import { GrafanaTheme2, SelectableValue } from '@grafana/data/src'; +import { GrafanaTheme2, SelectableValue } from '@grafana/data'; import { getTemplateSrv } from '@grafana/runtime/src'; import { CodeEditor, diff --git a/public/app/plugins/datasource/influxdb/components/editor/query/fsql/FSQLEditor.tsx b/public/app/plugins/datasource/influxdb/components/editor/query/fsql/FSQLEditor.tsx index 4858da88623..e25e951c25d 100644 --- a/public/app/plugins/datasource/influxdb/components/editor/query/fsql/FSQLEditor.tsx +++ b/public/app/plugins/datasource/influxdb/components/editor/query/fsql/FSQLEditor.tsx @@ -1,7 +1,7 @@ import { css, cx } from '@emotion/css'; import { PureComponent } from 'react'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { SQLQuery, SqlQueryEditorLazy, applyQueryDefaults } from '@grafana/sql'; import { InlineFormLabel, LinkButton, Themeable2, withTheme2 } from '@grafana/ui'; diff --git a/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/getTemplateVariableOptions.ts b/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/getTemplateVariableOptions.ts index 51db862e4d9..b3e9860798e 100644 --- a/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/getTemplateVariableOptions.ts +++ b/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/getTemplateVariableOptions.ts @@ -1,4 +1,4 @@ -import { TypedVariableModel } from '@grafana/data/src'; +import { TypedVariableModel } from '@grafana/data'; import { getTemplateSrv } from '@grafana/runtime/src'; export function getTemplateVariableOptions(wrapper: (v: TypedVariableModel) => string) { diff --git a/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/withTemplateVariableOptions.ts b/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/withTemplateVariableOptions.ts index 89bd1372bcd..c346946dbfc 100644 --- a/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/withTemplateVariableOptions.ts +++ b/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/withTemplateVariableOptions.ts @@ -1,5 +1,5 @@ // helper function to make it easy to call this from the widget-render-code -import { TypedVariableModel } from '@grafana/data/src'; +import { TypedVariableModel } from '@grafana/data'; import { getTemplateVariableOptions } from './getTemplateVariableOptions'; diff --git a/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/wrapper.ts b/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/wrapper.ts index 769a9a435a4..745ada1dd39 100644 --- a/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/wrapper.ts +++ b/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/wrapper.ts @@ -1,4 +1,4 @@ -import { TypedVariableModel } from '@grafana/data/src'; +import { TypedVariableModel } from '@grafana/data'; export function wrapRegex(v: TypedVariableModel): string { return `/^$${v.name}$/`; diff --git a/public/app/plugins/datasource/influxdb/influxql_metadata_query.ts b/public/app/plugins/datasource/influxdb/influxql_metadata_query.ts index b343f668018..314b70c2d15 100644 --- a/public/app/plugins/datasource/influxdb/influxql_metadata_query.ts +++ b/public/app/plugins/datasource/influxdb/influxql_metadata_query.ts @@ -1,4 +1,4 @@ -import { ScopedVars } from '@grafana/data/src'; +import { ScopedVars } from '@grafana/data'; import config from 'app/core/config'; import InfluxDatasource from './datasource'; diff --git a/public/app/plugins/datasource/tempo/_importedDependencies/datasources/prometheus/RawQuery.tsx b/public/app/plugins/datasource/tempo/_importedDependencies/datasources/prometheus/RawQuery.tsx index 742b12b9d50..bbf7c27cc5c 100644 --- a/public/app/plugins/datasource/tempo/_importedDependencies/datasources/prometheus/RawQuery.tsx +++ b/public/app/plugins/datasource/tempo/_importedDependencies/datasources/prometheus/RawQuery.tsx @@ -1,7 +1,7 @@ import { css, cx } from '@emotion/css'; import Prism, { Grammar } from 'prismjs'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { useTheme2 } from '@grafana/ui'; export interface Props { diff --git a/public/app/plugins/datasource/tempo/types.ts b/public/app/plugins/datasource/tempo/types.ts index de6c050fb6c..02dbe712969 100644 --- a/public/app/plugins/datasource/tempo/types.ts +++ b/public/app/plugins/datasource/tempo/types.ts @@ -1,4 +1,4 @@ -import { DataSourceJsonData } from '@grafana/data/src'; +import { DataSourceJsonData } from '@grafana/data'; import { NodeGraphOptions, TraceToLogsOptions } from '@grafana/o11y-ds-frontend'; import { TempoQuery as TempoBase, TempoQueryType, TraceqlFilter } from './dataquery.gen'; diff --git a/public/app/plugins/panel/barchart/bars.ts b/public/app/plugins/panel/barchart/bars.ts index 7d3e318eea3..40a3c62f73d 100644 --- a/public/app/plugins/panel/barchart/bars.ts +++ b/public/app/plugins/panel/barchart/bars.ts @@ -1,7 +1,6 @@ import uPlot, { Axis, AlignedData, Scale } from 'uplot'; -import { DataFrame, dateTimeFormat, GrafanaTheme2, systemDateFormats, TimeZone } from '@grafana/data'; -import { alpha } from '@grafana/data/src/themes/colorManipulator'; +import { colorManipulator, DataFrame, dateTimeFormat, GrafanaTheme2, systemDateFormats, TimeZone } from '@grafana/data'; import { StackingMode, VisibilityMode, @@ -545,7 +544,8 @@ export function getConfig(opts: BarsOptions, theme: GrafanaTheme2) { }); barsColors.push({ - fill: fillOpacity < 1 ? colors.map((c) => (c != null ? alpha(c, fillOpacity) : null)) : colors, + fill: + fillOpacity < 1 ? colors.map((c) => (c != null ? colorManipulator.alpha(c, fillOpacity) : null)) : colors, stroke: colors, }); } diff --git a/public/app/plugins/panel/barchart/utils.ts b/public/app/plugins/panel/barchart/utils.ts index 9b25e678f1f..ebd8ac300af 100644 --- a/public/app/plugins/panel/barchart/utils.ts +++ b/public/app/plugins/panel/barchart/utils.ts @@ -13,7 +13,7 @@ import { getFieldSeriesColor, outerJoinDataFrames, } from '@grafana/data'; -import { decoupleHideFromState } from '@grafana/data/src/field/fieldState'; +import { decoupleHideFromState } from '@grafana/data/internal'; import { AxisColorMode, AxisPlacement, diff --git a/public/app/plugins/panel/bargauge/BarGaugeLegend.tsx b/public/app/plugins/panel/bargauge/BarGaugeLegend.tsx index 0ddecee36f6..5364552267a 100644 --- a/public/app/plugins/panel/bargauge/BarGaugeLegend.tsx +++ b/public/app/plugins/panel/bargauge/BarGaugeLegend.tsx @@ -1,7 +1,6 @@ import { memo } from 'react'; -import { cacheFieldDisplayNames, DataFrame, FieldType, getFieldSeriesColor } from '@grafana/data'; -import { Field } from '@grafana/data/'; +import { Field, cacheFieldDisplayNames, DataFrame, FieldType, getFieldSeriesColor } from '@grafana/data'; import { AxisPlacement, VizLegendOptions } from '@grafana/schema'; import { useTheme2, VizLayout, VizLayoutLegendProps, VizLegend, VizLegendItem } from '@grafana/ui'; import { getDisplayValuesForCalcs } from '@grafana/ui/internal'; diff --git a/public/app/plugins/panel/candlestick/fields.ts b/public/app/plugins/panel/candlestick/fields.ts index c370b953a72..5019dfe06d0 100644 --- a/public/app/plugins/panel/candlestick/fields.ts +++ b/public/app/plugins/panel/candlestick/fields.ts @@ -7,7 +7,7 @@ import { outerJoinDataFrames, TimeRange, } from '@grafana/data'; -import { maybeSortFrame } from '@grafana/data/src/transformations/transformers/joinDataFrames'; +import { maybeSortFrame } from '@grafana/data/internal'; import { findField } from 'app/features/dimensions'; import { prepareGraphableFields } from '../timeseries/utils'; diff --git a/public/app/plugins/panel/canvas/components/CanvasTooltip.tsx b/public/app/plugins/panel/canvas/components/CanvasTooltip.tsx index aa756baa9c8..ceb17a8ce7d 100644 --- a/public/app/plugins/panel/canvas/components/CanvasTooltip.tsx +++ b/public/app/plugins/panel/canvas/components/CanvasTooltip.tsx @@ -12,8 +12,8 @@ import { getFieldDisplayName, ScopedVars, ValueLinkConfig, -} from '@grafana/data/src'; -import { ActionModel } from '@grafana/data/src/types/action'; + ActionModel, +} from '@grafana/data'; import { Portal, useStyles2, VizTooltipContainer } from '@grafana/ui'; import { VizTooltipContent, diff --git a/public/app/plugins/panel/canvas/editor/connectionEditor.tsx b/public/app/plugins/panel/canvas/editor/connectionEditor.tsx index 96e8a21b331..869bcec4adb 100644 --- a/public/app/plugins/panel/canvas/editor/connectionEditor.tsx +++ b/public/app/plugins/panel/canvas/editor/connectionEditor.tsx @@ -1,6 +1,6 @@ import { get as lodashGet } from 'lodash'; -import { NestedPanelOptions, NestedValueAccess } from '@grafana/data/src/utils/OptionsUIBuilders'; +import { NestedPanelOptions, NestedValueAccess } from '@grafana/data/internal'; import { Scene } from 'app/features/canvas/runtime/scene'; import { setOptionImmutably } from 'app/features/dashboard/components/PanelEditor/utils'; diff --git a/public/app/plugins/panel/canvas/editor/element/QuickPositioning.tsx b/public/app/plugins/panel/canvas/editor/element/QuickPositioning.tsx index acfe2f3b755..c63a14aabc6 100644 --- a/public/app/plugins/panel/canvas/editor/element/QuickPositioning.tsx +++ b/public/app/plugins/panel/canvas/editor/element/QuickPositioning.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { IconButton, useStyles2 } from '@grafana/ui'; import { ElementState } from 'app/features/canvas/runtime/element'; import { QuickPlacement } from 'app/features/canvas/types'; diff --git a/public/app/plugins/panel/canvas/editor/element/elementEditor.tsx b/public/app/plugins/panel/canvas/editor/element/elementEditor.tsx index bdad1130a50..4e0164319ea 100644 --- a/public/app/plugins/panel/canvas/editor/element/elementEditor.tsx +++ b/public/app/plugins/panel/canvas/editor/element/elementEditor.tsx @@ -1,6 +1,6 @@ import { get as lodashGet } from 'lodash'; -import { NestedPanelOptions, NestedValueAccess } from '@grafana/data/src/utils/OptionsUIBuilders'; +import { NestedPanelOptions, NestedValueAccess } from '@grafana/data/internal'; import { CanvasElementOptions } from 'app/features/canvas/element'; import { canvasElementRegistry, diff --git a/public/app/plugins/panel/canvas/editor/inline/InlineEditBody.tsx b/public/app/plugins/panel/canvas/editor/inline/InlineEditBody.tsx index 5b13b982eb8..8c6a2764035 100644 --- a/public/app/plugins/panel/canvas/editor/inline/InlineEditBody.tsx +++ b/public/app/plugins/panel/canvas/editor/inline/InlineEditBody.tsx @@ -4,8 +4,7 @@ import { useMemo, useState } from 'react'; import { useObservable } from 'react-use'; import { DataFrame, GrafanaTheme2, PanelOptionsEditorBuilder, StandardEditorContext } from '@grafana/data'; -import { PanelOptionsSupplier } from '@grafana/data/src/panel/PanelPlugin'; -import { NestedValueAccess } from '@grafana/data/src/utils/OptionsUIBuilders'; +import { NestedValueAccess, PanelOptionsSupplier } from '@grafana/data/internal'; import { useStyles2 } from '@grafana/ui'; import { AddLayerButton } from 'app/core/components/Layers/AddLayerButton'; import { FrameState } from 'app/features/canvas/runtime/frame'; diff --git a/public/app/plugins/panel/canvas/editor/layer/layerEditor.tsx b/public/app/plugins/panel/canvas/editor/layer/layerEditor.tsx index 59c9b40fd46..69a0e9aa29e 100644 --- a/public/app/plugins/panel/canvas/editor/layer/layerEditor.tsx +++ b/public/app/plugins/panel/canvas/editor/layer/layerEditor.tsx @@ -1,6 +1,6 @@ import { get as lodashGet } from 'lodash'; -import { NestedPanelOptions, NestedValueAccess } from '@grafana/data/src/utils/OptionsUIBuilders'; +import { NestedPanelOptions, NestedValueAccess } from '@grafana/data/internal'; import { ElementState } from 'app/features/canvas/runtime/element'; import { FrameState } from 'app/features/canvas/runtime/frame'; import { Scene } from 'app/features/canvas/runtime/scene'; diff --git a/public/app/plugins/panel/canvas/editor/options.ts b/public/app/plugins/panel/canvas/editor/options.ts index 221ab5f7979..48640dfddb0 100644 --- a/public/app/plugins/panel/canvas/editor/options.ts +++ b/public/app/plugins/panel/canvas/editor/options.ts @@ -1,7 +1,7 @@ import { capitalize } from 'lodash'; import { FieldType } from '@grafana/data'; -import { PanelOptionsSupplier } from '@grafana/data/src/panel/PanelPlugin'; +import { PanelOptionsSupplier } from '@grafana/data/internal'; import { ConnectionDirection } from 'app/features/canvas/element'; import { SVGElements } from 'app/features/canvas/runtime/element'; import { ColorDimensionEditor, ResourceDimensionEditor, ScaleDimensionEditor } from 'app/features/dimensions/editors'; diff --git a/public/app/plugins/panel/canvas/utils.ts b/public/app/plugins/panel/canvas/utils.ts index bf5fb30b15f..386466d3378 100644 --- a/public/app/plugins/panel/canvas/utils.ts +++ b/public/app/plugins/panel/canvas/utils.ts @@ -1,7 +1,6 @@ import { isNumber, isString } from 'lodash'; -import { AppEvents, getFieldDisplayName, PluginState, SelectableValue } from '@grafana/data'; -import { DataFrame, Field } from '@grafana/data/'; +import { DataFrame, Field, AppEvents, getFieldDisplayName, PluginState, SelectableValue } from '@grafana/data'; import appEvents from 'app/core/app_events'; import { hasAlphaPanels, config } from 'app/core/config'; import { diff --git a/public/app/plugins/panel/datagrid/components/DatagridContextMenu.tsx b/public/app/plugins/panel/datagrid/components/DatagridContextMenu.tsx index f9629ce7053..1e06330c88d 100644 --- a/public/app/plugins/panel/datagrid/components/DatagridContextMenu.tsx +++ b/public/app/plugins/panel/datagrid/components/DatagridContextMenu.tsx @@ -3,7 +3,7 @@ import { capitalize } from 'lodash'; import * as React from 'react'; import { DataFrame, FieldType } from '@grafana/data'; -import { convertFieldType } from '@grafana/data/src/transformations/transformers/convertFieldType'; +import { convertFieldType } from '@grafana/data/internal'; import { reportInteraction } from '@grafana/runtime'; import { ContextMenu, MenuGroup, MenuItem } from '@grafana/ui'; import { MenuDivider } from '@grafana/ui/internal'; diff --git a/public/app/plugins/panel/geomap/components/MarkersLegend.tsx b/public/app/plugins/panel/geomap/components/MarkersLegend.tsx index 2d6cdabfc5d..34eda649940 100644 --- a/public/app/plugins/panel/geomap/components/MarkersLegend.tsx +++ b/public/app/plugins/panel/geomap/components/MarkersLegend.tsx @@ -4,8 +4,13 @@ import { useMemo } from 'react'; import { useObservable } from 'react-use'; import { of } from 'rxjs'; -import { DataFrame, formattedValueToString, getFieldColorModeForField, GrafanaTheme2 } from '@grafana/data'; -import { getMinMaxAndDelta } from '@grafana/data/src/field/scale'; +import { + getMinMaxAndDelta, + DataFrame, + formattedValueToString, + getFieldColorModeForField, + GrafanaTheme2, +} from '@grafana/data'; import { useStyles2, VizLegendItem } from '@grafana/ui'; import { ColorScale } from 'app/core/components/ColorScale/ColorScale'; import { SanitizedSVG } from 'app/core/components/SVG/SanitizedSVG'; diff --git a/public/app/plugins/panel/geomap/editor/layerEditor.tsx b/public/app/plugins/panel/geomap/editor/layerEditor.tsx index e0676fab740..064e6189cf7 100644 --- a/public/app/plugins/panel/geomap/editor/layerEditor.tsx +++ b/public/app/plugins/panel/geomap/editor/layerEditor.tsx @@ -1,7 +1,7 @@ import { get as lodashGet, isEqual } from 'lodash'; import { FrameGeometrySourceMode, getFrameMatchers, MapLayerOptions } from '@grafana/data'; -import { NestedPanelOptions, NestedValueAccess } from '@grafana/data/src/utils/OptionsUIBuilders'; +import { NestedPanelOptions, NestedValueAccess } from '@grafana/data/internal'; import { setOptionImmutably } from 'app/features/dashboard/components/PanelEditor/utils'; import { addLocationFields } from 'app/features/geo/editor/locationEditor'; diff --git a/public/app/plugins/panel/geomap/layers/data/routeLayer.tsx b/public/app/plugins/panel/geomap/layers/data/routeLayer.tsx index 43e9500ad0c..366b687c5aa 100644 --- a/public/app/plugins/panel/geomap/layers/data/routeLayer.tsx +++ b/public/app/plugins/panel/geomap/layers/data/routeLayer.tsx @@ -20,8 +20,8 @@ import { DataHoverClearEvent, DataFrame, FieldType, + colorManipulator } from '@grafana/data'; -import { alpha } from '@grafana/data/src/themes/colorManipulator'; import { MapLayerOptions, FrameGeometrySourceMode } from '@grafana/schema'; import { FrameVectorSource } from 'app/features/geo/utils/frameVectorSource'; import { getGeometryField, getLocationMatchers } from 'app/features/geo/utils/location'; @@ -207,10 +207,10 @@ export const routeLayer: MapLayerRegistryItem = { image: new Circle({ radius: crosshairRadius, stroke: new Stroke({ - color: alpha(crosshairColor, 1), + color: colorManipulator.alpha(crosshairColor, 1), width: 1, }), - fill: new Fill({ color: alpha(crosshairColor, 0.4) }), + fill: new Fill({ color: colorManipulator.alpha(crosshairColor, 0.4) }), }), }); const lineStyle = new Style({ diff --git a/public/app/plugins/panel/geomap/utils/checkFeatureMatchesStyleRule.ts b/public/app/plugins/panel/geomap/utils/checkFeatureMatchesStyleRule.ts index 569bbdf7c7b..cc0558c4e44 100644 --- a/public/app/plugins/panel/geomap/utils/checkFeatureMatchesStyleRule.ts +++ b/public/app/plugins/panel/geomap/utils/checkFeatureMatchesStyleRule.ts @@ -1,6 +1,6 @@ import { FeatureLike } from 'ol/Feature'; -import { compareValues } from '@grafana/data/src/transformations/matchers/compareValues'; +import { compareValues } from '@grafana/data/internal'; import { FeatureRuleConfig } from '../types'; diff --git a/public/app/plugins/panel/geomap/utils/tooltip.ts b/public/app/plugins/panel/geomap/utils/tooltip.ts index 74fc3d6a8ba..547ef6e498b 100644 --- a/public/app/plugins/panel/geomap/utils/tooltip.ts +++ b/public/app/plugins/panel/geomap/utils/tooltip.ts @@ -2,7 +2,7 @@ import { debounce } from 'lodash'; import { MapBrowserEvent } from 'ol'; import { toLonLat } from 'ol/proj'; -import { DataFrame, DataHoverClearEvent } from '@grafana/data/src'; +import { DataFrame, DataHoverClearEvent } from '@grafana/data'; import { GeomapPanel } from '../GeomapPanel'; import { GeomapHoverPayload, GeomapLayerHover } from '../event'; diff --git a/public/app/plugins/panel/geomap/utils/utils.ts b/public/app/plugins/panel/geomap/utils/utils.ts index 6587dda7ee2..44bb31c0876 100644 --- a/public/app/plugins/panel/geomap/utils/utils.ts +++ b/public/app/plugins/panel/geomap/utils/utils.ts @@ -1,8 +1,7 @@ import { Map as OpenLayersMap } from 'ol'; import { defaults as interactionDefaults } from 'ol/interaction'; -import { SelectableValue } from '@grafana/data'; -import { DataFrame, GrafanaTheme2 } from '@grafana/data/src'; +import { DataFrame, GrafanaTheme2, SelectableValue } from '@grafana/data'; import { getColorDimension, getScalarDimension, getScaledDimension, getTextDimension } from 'app/features/dimensions'; import { getGrafanaDatasource } from 'app/plugins/datasource/grafana/datasource'; diff --git a/public/app/plugins/panel/graph/data_processor.ts b/public/app/plugins/panel/graph/data_processor.ts index 21afccf65d3..0b97dd6efbd 100644 --- a/public/app/plugins/panel/graph/data_processor.ts +++ b/public/app/plugins/panel/graph/data_processor.ts @@ -1,7 +1,7 @@ import { find } from 'lodash'; import { DataFrame, dateTime, Field, FieldType, getFieldDisplayName, getTimeField, TimeRange } from '@grafana/data'; -import { applyNullInsertThreshold } from '@grafana/data/src/transformations/transformers/nulls/nullInsertThreshold'; +import { applyNullInsertThreshold } from '@grafana/data/internal'; import { colors } from '@grafana/ui'; import config from 'app/core/config'; import TimeSeries from 'app/core/time_series2'; diff --git a/public/app/plugins/panel/histogram/Histogram.tsx b/public/app/plugins/panel/histogram/Histogram.tsx index 024d3105a51..3225018263a 100644 --- a/public/app/plugins/panel/histogram/Histogram.tsx +++ b/public/app/plugins/panel/histogram/Histogram.tsx @@ -9,11 +9,9 @@ import { getFieldSeriesColor, GrafanaTheme2, roundDecimals, -} from '@grafana/data'; -import { histogramBucketSizes, histogramFrameBucketMaxFieldName, -} from '@grafana/data/src/transformations/transformers/histogram'; +} from '@grafana/data'; import { VizLegendOptions, ScaleDistribution, AxisPlacement, ScaleDirection, ScaleOrientation } from '@grafana/schema'; import { Themeable2, diff --git a/public/app/plugins/panel/histogram/HistogramPanel.tsx b/public/app/plugins/panel/histogram/HistogramPanel.tsx index 082b0be63c4..6ec723bd766 100644 --- a/public/app/plugins/panel/histogram/HistogramPanel.tsx +++ b/public/app/plugins/panel/histogram/HistogramPanel.tsx @@ -1,7 +1,14 @@ import { useMemo } from 'react'; -import { DataFrameType, PanelProps, buildHistogram, cacheFieldDisplayNames, getHistogramFields } from '@grafana/data'; -import { histogramFieldsToFrame, joinHistograms } from '@grafana/data/src/transformations/transformers/histogram'; +import { + histogramFieldsToFrame, + joinHistograms, + DataFrameType, + PanelProps, + buildHistogram, + cacheFieldDisplayNames, + getHistogramFields, +} from '@grafana/data'; import { TooltipDisplayMode, TooltipPlugin2, useTheme2 } from '@grafana/ui'; import { TooltipHoverMode } from '@grafana/ui/internal'; diff --git a/public/app/plugins/panel/histogram/module.tsx b/public/app/plugins/panel/histogram/module.tsx index cf95bbc463d..2584b008737 100644 --- a/public/app/plugins/panel/histogram/module.tsx +++ b/public/app/plugins/panel/histogram/module.tsx @@ -4,8 +4,8 @@ import { FieldType, identityOverrideProcessor, PanelPlugin, + histogramFieldInfo, } from '@grafana/data'; -import { histogramFieldInfo } from '@grafana/data/src/transformations/transformers/histogram'; import { commonOptionsBuilder, graphFieldOptions } from '@grafana/ui'; import { StackingEditor } from '@grafana/ui/internal'; diff --git a/public/app/plugins/panel/histogram/utils.ts b/public/app/plugins/panel/histogram/utils.ts index 51d041050bf..25e1f33c4bd 100644 --- a/public/app/plugins/panel/histogram/utils.ts +++ b/public/app/plugins/panel/histogram/utils.ts @@ -1,8 +1,9 @@ -import { DataFrame, FieldType } from '@grafana/data'; import { isHistogramFrameBucketMinFieldName, isHistogramFrameBucketMaxFieldName, -} from '@grafana/data/src/transformations/transformers/histogram'; + DataFrame, + FieldType, +} from '@grafana/data'; export function originalDataHasHistogram(frames?: DataFrame[]): boolean { if (frames?.length !== 1) { diff --git a/public/app/plugins/panel/logs/LogsPanel.tsx b/public/app/plugins/panel/logs/LogsPanel.tsx index a335e830aca..be0b279952a 100644 --- a/public/app/plugins/panel/logs/LogsPanel.tsx +++ b/public/app/plugins/panel/logs/LogsPanel.tsx @@ -29,8 +29,8 @@ import { urlUtil, LogSortOrderChangeEvent, LoadingState, + rangeUtil, } from '@grafana/data'; -import { convertRawToRange } from '@grafana/data/src/datetime/rangeutil'; import { config, getAppEvents } from '@grafana/runtime'; import { ScrollContainer, usePanelContext, useStyles2 } from '@grafana/ui'; import { getFieldLinksForExplore } from 'app/features/explore/utils/links'; @@ -574,7 +574,7 @@ export async function requestMoreLogs( return []; } - const range: TimeRange = convertRawToRange({ + const range: TimeRange = rangeUtil.convertRawToRange({ from: dateTimeForTimeZone(timeZone, timeRange.from), to: dateTimeForTimeZone(timeZone, timeRange.to), }); diff --git a/public/app/plugins/panel/nodeGraph/Node.test.tsx b/public/app/plugins/panel/nodeGraph/Node.test.tsx index a73f0b8334e..2c9bf841394 100644 --- a/public/app/plugins/panel/nodeGraph/Node.test.tsx +++ b/public/app/plugins/panel/nodeGraph/Node.test.tsx @@ -1,6 +1,6 @@ import { render, screen } from '@testing-library/react'; -import { FieldType } from '@grafana/data/src'; +import { FieldType } from '@grafana/data'; import { Node } from './Node'; diff --git a/public/app/plugins/panel/stat/StatPanel.tsx b/public/app/plugins/panel/stat/StatPanel.tsx index 2411ab49943..6d1c35cc63a 100644 --- a/public/app/plugins/panel/stat/StatPanel.tsx +++ b/public/app/plugins/panel/stat/StatPanel.tsx @@ -10,7 +10,7 @@ import { NumericRange, PanelProps, } from '@grafana/data'; -import { findNumericFieldMinMax } from '@grafana/data/src/field/fieldOverrides'; +import { findNumericFieldMinMax } from '@grafana/data/internal'; import { BigValueTextMode, BigValueGraphMode } from '@grafana/schema'; import { BigValue, DataLinksContextMenu, VizRepeater, VizRepeaterRenderValueProps } from '@grafana/ui'; import { DataLinksContextMenuApi } from '@grafana/ui/internal'; diff --git a/public/app/plugins/panel/status-history/utils.ts b/public/app/plugins/panel/status-history/utils.ts index cd683b7129c..d077a54a959 100644 --- a/public/app/plugins/panel/status-history/utils.ts +++ b/public/app/plugins/panel/status-history/utils.ts @@ -1,5 +1,4 @@ -import { ActionModel, Field, InterpolateFunction, LinkModel } from '@grafana/data'; -import { DataFrame } from '@grafana/data/'; +import { DataFrame, ActionModel, Field, InterpolateFunction, LinkModel } from '@grafana/data'; import { getActions } from 'app/features/actions/utils'; export const getDataLinks = (field: Field, rowIdx: number) => { diff --git a/public/app/plugins/panel/table/migrations.ts b/public/app/plugins/panel/table/migrations.ts index 734376e18be..aa4c635682c 100644 --- a/public/app/plugins/panel/table/migrations.ts +++ b/public/app/plugins/panel/table/migrations.ts @@ -10,7 +10,7 @@ import { DataFrame, FieldType, } from '@grafana/data'; -import { ReduceTransformerOptions } from '@grafana/data/src/transformations/transformers/reduce'; +import { ReduceTransformerOptions } from '@grafana/data/internal'; import { Options } from './panelcfg.gen'; diff --git a/public/app/plugins/panel/timeseries/utils.ts b/public/app/plugins/panel/timeseries/utils.ts index 02fc7ea3b34..8b974ac38fa 100644 --- a/public/app/plugins/panel/timeseries/utils.ts +++ b/public/app/plugins/panel/timeseries/utils.ts @@ -7,10 +7,10 @@ import { isBooleanUnit, TimeRange, cacheFieldDisplayNames, + applyNullInsertThreshold, + nullToValue, } from '@grafana/data'; -import { convertFieldType } from '@grafana/data/src/transformations/transformers/convertFieldType'; -import { applyNullInsertThreshold } from '@grafana/data/src/transformations/transformers/nulls/nullInsertThreshold'; -import { nullToValue } from '@grafana/data/src/transformations/transformers/nulls/nullToValue'; +import { convertFieldType } from '@grafana/data/internal'; import { GraphFieldConfig, LineInterpolation, TooltipDisplayMode, VizTooltipOptions } from '@grafana/schema'; import { buildScaleKey } from '@grafana/ui/internal'; diff --git a/public/app/plugins/panel/trend/TrendPanel.tsx b/public/app/plugins/panel/trend/TrendPanel.tsx index f043c113b1f..ff54529bbe4 100644 --- a/public/app/plugins/panel/trend/TrendPanel.tsx +++ b/public/app/plugins/panel/trend/TrendPanel.tsx @@ -1,7 +1,14 @@ import { useMemo } from 'react'; -import { DataFrame, FieldMatcherID, fieldMatchers, FieldType, PanelProps, TimeRange } from '@grafana/data'; -import { isLikelyAscendingVector } from '@grafana/data/src/transformations/transformers/joinDataFrames'; +import { + isLikelyAscendingVector, + DataFrame, + FieldMatcherID, + fieldMatchers, + FieldType, + PanelProps, + TimeRange, +} from '@grafana/data'; import { config, PanelDataErrorView } from '@grafana/runtime'; import { KeyboardPlugin, TooltipDisplayMode, usePanelContext, TooltipPlugin2 } from '@grafana/ui'; import { TooltipHoverMode } from '@grafana/ui/internal'; diff --git a/public/app/plugins/panel/xychart/XYChartPanel.tsx b/public/app/plugins/panel/xychart/XYChartPanel.tsx index 31d4784a7aa..e3e667730c2 100644 --- a/public/app/plugins/panel/xychart/XYChartPanel.tsx +++ b/public/app/plugins/panel/xychart/XYChartPanel.tsx @@ -1,8 +1,7 @@ import { css } from '@emotion/css'; import { useMemo } from 'react'; -import { FALLBACK_COLOR, PanelProps } from '@grafana/data'; -import { alpha } from '@grafana/data/src/themes/colorManipulator'; +import { colorManipulator, FALLBACK_COLOR, PanelProps } from '@grafana/data'; import { config } from '@grafana/runtime'; import { TooltipDisplayMode, @@ -72,7 +71,7 @@ export const XYChartPanel2 = (props: Props2) => { items.push({ yAxis: 1, // TODO: pull from y field label: s.name.value, - color: alpha(s.color.fixed ?? FALLBACK_COLOR, 1), + color: colorManipulator.alpha(s.color.fixed ?? FALLBACK_COLOR, 1), getItemKey: () => `${idx}-${s.name.value}`, fieldName: yField.state?.displayName ?? yField.name, disabled: yField.state?.hideFrom?.viz ?? false, diff --git a/public/app/plugins/panel/xychart/XYChartTooltip.tsx b/public/app/plugins/panel/xychart/XYChartTooltip.tsx index f9b0d588d31..f72a67b7b5e 100644 --- a/public/app/plugins/panel/xychart/XYChartTooltip.tsx +++ b/public/app/plugins/panel/xychart/XYChartTooltip.tsx @@ -1,7 +1,6 @@ import { ReactNode } from 'react'; -import { DataFrame, InterpolateFunction, LinkModel } from '@grafana/data'; -import { alpha } from '@grafana/data/src/themes/colorManipulator'; +import { colorManipulator, DataFrame, InterpolateFunction, LinkModel } from '@grafana/data'; import { VizTooltipContent, VizTooltipFooter, @@ -67,7 +66,7 @@ export const XYChartTooltip = ({ const headerItem: VizTooltipItem = { label, value: '', - color: alpha(seriesColor ?? '#fff', 0.5), + color: colorManipulator.alpha(seriesColor ?? '#fff', 0.5), colorIndicator: ColorIndicator.marker_md, }; diff --git a/public/app/plugins/panel/xychart/scatter.ts b/public/app/plugins/panel/xychart/scatter.ts index b2d9156ffbb..d7bb53a3838 100644 --- a/public/app/plugins/panel/xychart/scatter.ts +++ b/public/app/plugins/panel/xychart/scatter.ts @@ -11,8 +11,8 @@ import { MappingType, SpecialValueMatch, ThresholdsMode, + colorManipulator, } from '@grafana/data'; -import { alpha } from '@grafana/data/src/themes/colorManipulator'; import { AxisPlacement, FieldColorModeId, ScaleDirection, ScaleOrientation, VisibilityMode } from '@grafana/schema'; import { UPlotConfigBuilder } from '@grafana/ui'; import { FacetedData, FacetSeries } from '@grafana/ui/internal'; @@ -86,8 +86,8 @@ export const prepConfig = (xySeries: XYSeries[], theme: GrafanaTheme2) => { let pointAlpha = scatterInfo.fillOpacity / 100; - u.ctx.fillStyle = alpha((series.fill as any)(), pointAlpha); - u.ctx.strokeStyle = alpha((series.stroke as any)(), 1); + u.ctx.fillStyle = colorManipulator.alpha((series.fill as any)(), pointAlpha); + u.ctx.strokeStyle = colorManipulator.alpha((series.stroke as any)(), 1); u.ctx.lineWidth = strokeWidth; let deg360 = 2 * Math.PI; @@ -138,8 +138,8 @@ export const prepConfig = (xySeries: XYSeries[], theme: GrafanaTheme2) => { if (pointColors[i] !== curColorIdx) { curColorIdx = pointColors[i]; let c = curColorIdx === -1 ? FALLBACK_COLOR : pointPalette[curColorIdx]; - u.ctx.fillStyle = paletteHasAlpha ? c : alpha(c as string, pointAlpha); - u.ctx.strokeStyle = alpha(c as string, 1); + u.ctx.fillStyle = paletteHasAlpha ? c : colorManipulator.alpha(c as string, pointAlpha); + u.ctx.strokeStyle = colorManipulator.alpha(c as string, 1); } } @@ -421,8 +421,8 @@ export const prepConfig = (xySeries: XYSeries[], theme: GrafanaTheme2) => { pathBuilder: drawBubbles, // drawBubbles({disp: {size: {values: () => }}}) theme, scaleKey: '', // facets' scales used (above) - lineColor: alpha(lineColor ?? '#ffff', 1), - fillColor: alpha(pointColor ?? '#ffff', 0.5), + lineColor: colorManipulator.alpha(lineColor ?? '#ffff', 1), + fillColor: colorManipulator.alpha(pointColor ?? '#ffff', 0.5), show: !field.state?.hideFrom?.viz, }); }); diff --git a/public/app/plugins/panel/xychart/utils.ts b/public/app/plugins/panel/xychart/utils.ts index 47884a7540b..4425666fe0b 100644 --- a/public/app/plugins/panel/xychart/utils.ts +++ b/public/app/plugins/panel/xychart/utils.ts @@ -12,7 +12,7 @@ import { FieldMatcherID, FieldConfigSource, } from '@grafana/data'; -import { decoupleHideFromState } from '@grafana/data/src/field/fieldState'; +import { decoupleHideFromState } from '@grafana/data/internal'; import { config } from '@grafana/runtime'; import { VisibilityMode } from '@grafana/schema'; diff --git a/public/app/routes/RoutesWrapper.tsx b/public/app/routes/RoutesWrapper.tsx index 7e4701f040e..ee0318cb7a7 100644 --- a/public/app/routes/RoutesWrapper.tsx +++ b/public/app/routes/RoutesWrapper.tsx @@ -4,7 +4,7 @@ import { ComponentType, ReactNode } from 'react'; import { Router } from 'react-router-dom'; import { CompatRouter } from 'react-router-dom-v5-compat'; -import { GrafanaTheme2 } from '@grafana/data/'; +import { GrafanaTheme2 } from '@grafana/data'; import { config, locationService, From cacdf00067cd3ada5d03d4917ebbca61b9cd1ac9 Mon Sep 17 00:00:00 2001 From: Pepe Cano <825430+ppcano@users.noreply.github.com> Date: Mon, 17 Mar 2025 11:28:29 +0100 Subject: [PATCH 024/115] alerting(ui): add external links to read more about labels and annotations (#102187) * alerting(ui): add external link to read about labels * alerting(ui): add external link to read about annotations * fix i18n settings * fix i18n * fix i18n error with `make 18n-extract` --- .../rule-editor/AnnotationsStep.tsx | 27 ++++++++++++++++--- .../rule-editor/labels/LabelsField.tsx | 2 ++ .../rule-editor/labels/LabelsFieldInForm.tsx | 2 ++ public/locales/en-US/grafana.json | 5 ++++ 4 files changed, 33 insertions(+), 3 deletions(-) diff --git a/public/app/features/alerting/unified/components/rule-editor/AnnotationsStep.tsx b/public/app/features/alerting/unified/components/rule-editor/AnnotationsStep.tsx index aabe2aed1bd..7148c0e17e7 100644 --- a/public/app/features/alerting/unified/components/rule-editor/AnnotationsStep.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/AnnotationsStep.tsx @@ -98,9 +98,30 @@ const AnnotationsStep = () => { Add more context to your alert notifications. +

+ {t( + 'alerting.rule-form.annotations.description1', + 'Annotations add additional information to alerts, helping alert responders identify and address potential issues.' + )} +

+

+ {t( + 'alerting.rule-form.annotations.description2', + 'For example, add a Summary annotation to tell you which value caused the alert to fire or which server it happened on.' + )} +

+ {t( + 'alerting.rule-form.annotations.description3', + 'Annotations can contain a combination of text and template code, which is used to include data from queries.' + )} + + } title="Annotations" />
diff --git a/public/app/features/alerting/unified/components/rule-editor/labels/LabelsField.tsx b/public/app/features/alerting/unified/components/rule-editor/labels/LabelsField.tsx index b3d3dd81927..f3919ed0b09 100644 --- a/public/app/features/alerting/unified/components/rule-editor/labels/LabelsField.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/labels/LabelsField.tsx @@ -404,6 +404,8 @@ function LabelsField() { {getLabelText(type)} Date: Mon, 17 Mar 2025 11:36:38 +0100 Subject: [PATCH 025/115] feat(unified-storage): prune history table based on limits (#101970) --- .../src/types/featureToggles.gen.ts | 1 + pkg/services/featuremgmt/registry.go | 8 ++ pkg/services/featuremgmt/toggles_gen.csv | 1 + pkg/services/featuremgmt/toggles_gen.go | 4 + pkg/services/featuremgmt/toggles_gen.json | 14 +++ pkg/storage/unified/client.go | 2 +- pkg/storage/unified/sql/backend.go | 113 +++++++++++++++++- .../sql/data/resource_history_prune.sql | 22 ++++ pkg/storage/unified/sql/queries.go | 27 +++++ pkg/storage/unified/sql/queries_test.go | 15 +++ pkg/storage/unified/sql/server.go | 15 ++- pkg/storage/unified/sql/service.go | 2 +- .../mysql--resource_history_prune-simple.sql | 22 ++++ ...ostgres--resource_history_prune-simple.sql | 22 ++++ .../sqlite--resource_history_prune-simple.sql | 22 ++++ 15 files changed, 282 insertions(+), 8 deletions(-) create mode 100644 pkg/storage/unified/sql/data/resource_history_prune.sql create mode 100755 pkg/storage/unified/sql/testdata/mysql--resource_history_prune-simple.sql create mode 100755 pkg/storage/unified/sql/testdata/postgres--resource_history_prune-simple.sql create mode 100755 pkg/storage/unified/sql/testdata/sqlite--resource_history_prune-simple.sql diff --git a/packages/grafana-data/src/types/featureToggles.gen.ts b/packages/grafana-data/src/types/featureToggles.gen.ts index 033b7c30e05..2658b66d145 100644 --- a/packages/grafana-data/src/types/featureToggles.gen.ts +++ b/packages/grafana-data/src/types/featureToggles.gen.ts @@ -259,4 +259,5 @@ export interface FeatureToggles { extraLanguages?: boolean; noBackdropBlur?: boolean; alertingMigrationUI?: boolean; + unifiedStorageHistoryPruner?: boolean; } diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index c6abe10a09a..eb027590f7c 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -1820,6 +1820,14 @@ var ( HideFromAdminPage: true, HideFromDocs: true, }, + { + Name: "unifiedStorageHistoryPruner", + Description: "Enables the unified storage history pruner", + Stage: FeatureStageExperimental, + Owner: grafanaSearchAndStorageSquad, + HideFromAdminPage: true, + HideFromDocs: true, + }, } ) diff --git a/pkg/services/featuremgmt/toggles_gen.csv b/pkg/services/featuremgmt/toggles_gen.csv index f2c41c26500..8bdbad38ba8 100644 --- a/pkg/services/featuremgmt/toggles_gen.csv +++ b/pkg/services/featuremgmt/toggles_gen.csv @@ -240,3 +240,4 @@ inviteUserExperimental,experimental,@grafana/sharing-squad,false,false,true extraLanguages,experimental,@grafana/grafana-frontend-platform,false,false,true noBackdropBlur,experimental,@grafana/grafana-frontend-platform,false,false,true alertingMigrationUI,experimental,@grafana/alerting-squad,false,false,true +unifiedStorageHistoryPruner,experimental,@grafana/search-and-storage,false,false,false diff --git a/pkg/services/featuremgmt/toggles_gen.go b/pkg/services/featuremgmt/toggles_gen.go index 3fcc06d9d94..1f4dee5e21d 100644 --- a/pkg/services/featuremgmt/toggles_gen.go +++ b/pkg/services/featuremgmt/toggles_gen.go @@ -970,4 +970,8 @@ const ( // FlagAlertingMigrationUI // Enables the alerting migration UI, to migrate datasource-managed rules to Grafana-managed rules FlagAlertingMigrationUI = "alertingMigrationUI" + + // FlagUnifiedStorageHistoryPruner + // Enables the unified storage history pruner + FlagUnifiedStorageHistoryPruner = "unifiedStorageHistoryPruner" ) diff --git a/pkg/services/featuremgmt/toggles_gen.json b/pkg/services/featuremgmt/toggles_gen.json index ce2d9c3dcfa..7caf31a6d24 100644 --- a/pkg/services/featuremgmt/toggles_gen.json +++ b/pkg/services/featuremgmt/toggles_gen.json @@ -4195,6 +4195,20 @@ "codeowner": "@grafana/search-and-storage" } }, + { + "metadata": { + "name": "unifiedStorageHistoryPruner", + "resourceVersion": "1742163088045", + "creationTimestamp": "2025-03-16T22:11:28Z" + }, + "spec": { + "description": "Enables the unified storage history pruner", + "stage": "experimental", + "codeowner": "@grafana/search-and-storage", + "hideFromAdminPage": true, + "hideFromDocs": true + } + }, { "metadata": { "name": "unifiedStorageSearch", diff --git a/pkg/storage/unified/client.go b/pkg/storage/unified/client.go index 3eebaffeac8..c16fbc92ad3 100644 --- a/pkg/storage/unified/client.go +++ b/pkg/storage/unified/client.go @@ -136,7 +136,7 @@ func newClient(opts options.StorageOptions, if err != nil { return nil, err } - server, err := sql.NewResourceServer(db, cfg, tracer, reg, authzc, searchOptions, storageMetrics, indexMetrics) + server, err := sql.NewResourceServer(db, cfg, tracer, reg, authzc, searchOptions, storageMetrics, indexMetrics, features) if err != nil { return nil, err } diff --git a/pkg/storage/unified/sql/backend.go b/pkg/storage/unified/sql/backend.go index 9220633ad7b..53cf85ef9f5 100644 --- a/pkg/storage/unified/sql/backend.go +++ b/pkg/storage/unified/sql/backend.go @@ -10,6 +10,7 @@ import ( "time" "github.com/google/uuid" + "github.com/prometheus/client_golang/prometheus" "go.opentelemetry.io/otel/trace" "go.opentelemetry.io/otel/trace/noop" "google.golang.org/protobuf/proto" @@ -20,6 +21,7 @@ import ( "github.com/grafana/grafana/pkg/storage/unified/sql/db" "github.com/grafana/grafana/pkg/storage/unified/sql/dbutil" "github.com/grafana/grafana/pkg/storage/unified/sql/sqltemplate" + "github.com/grafana/grafana/pkg/util/debouncer" ) const tracePrefix = "sql.resource." @@ -35,11 +37,16 @@ type Backend interface { type BackendOptions struct { DBProvider db.DBProvider Tracer trace.Tracer + Reg prometheus.Registerer PollingInterval time.Duration WatchBufferSize int IsHA bool storageMetrics *resource.StorageMetrics + // If true, the backend will prune history on write events. + // Will be removed once fully rolled out. + withPruner bool + // testing SimulatedNetworkLatency time.Duration // slows down the create transactions by a fixed amount } @@ -65,15 +72,39 @@ func NewBackend(opts BackendOptions) (Backend, error) { cancel: cancel, log: log.New("sql-resource-server"), tracer: opts.Tracer, + reg: opts.Reg, dbProvider: opts.DBProvider, pollingInterval: opts.PollingInterval, watchBufferSize: opts.WatchBufferSize, storageMetrics: opts.storageMetrics, bulkLock: &bulkLock{running: make(map[string]bool)}, simulatedNetworkLatency: opts.SimulatedNetworkLatency, + withPruner: opts.withPruner, }, nil } +// pruningKey is a comparable key for pruning history. +type pruningKey struct { + namespace string + group string + resource string +} + +// Small abstraction to allow for different pruner implementations. +// This can be removed once the debouncer is deployed. +type pruner interface { + Add(key pruningKey) error + Start(ctx context.Context) +} + +type noopPruner struct{} + +func (p *noopPruner) Add(key pruningKey) error { + return nil +} + +func (p *noopPruner) Start(ctx context.Context) {} + type backend struct { //general isHA bool @@ -87,6 +118,7 @@ type backend struct { // o11y log log.Logger tracer trace.Tracer + reg prometheus.Registerer storageMetrics *resource.StorageMetrics // database @@ -106,6 +138,9 @@ type backend struct { // testing simulatedNetworkLatency time.Duration + + historyPruner pruner + withPruner bool } func (b *backend) Init(ctx context.Context) error { @@ -116,13 +151,18 @@ func (b *backend) Init(ctx context.Context) error { } func (b *backend) initLocked(ctx context.Context) error { - db, err := b.dbProvider.Init(ctx) + dbConn, err := b.dbProvider.Init(ctx) if err != nil { return fmt.Errorf("initialize resource DB: %w", err) } - b.db = db - driverName := db.DriverName() + if err := dbConn.PingContext(ctx); err != nil { + return fmt.Errorf("ping resource DB: %w", err) + } + + b.db = dbConn + + driverName := dbConn.DriverName() b.dialect = sqltemplate.DialectForDriver(driverName) if b.dialect == nil { return fmt.Errorf("no dialect for driver %q", driverName) @@ -146,7 +186,68 @@ func (b *backend) initLocked(ctx context.Context) error { } b.notifier = notifier - return b.db.PingContext(ctx) + if err := b.initPruner(ctx); err != nil { + return fmt.Errorf("failed to create pruner: %w", err) + } + + return nil +} + +func (b *backend) initPruner(ctx context.Context) error { + if !b.withPruner { + b.log.Debug("using noop history pruner") + b.historyPruner = &noopPruner{} + return nil + } + b.log.Debug("using debounced history pruner") + // Initialize history pruner. + pruner, err := debouncer.NewGroup(debouncer.DebouncerOpts[pruningKey]{ + Name: "history_pruner", + BufferSize: 1000, + MinWait: time.Second * 30, + MaxWait: time.Minute * 5, + ProcessHandler: func(ctx context.Context, key pruningKey) error { + return b.db.WithTx(ctx, ReadCommitted, func(ctx context.Context, tx db.Tx) error { + res, err := dbutil.Exec(ctx, tx, sqlResourceHistoryPrune, &sqlPruneHistoryRequest{ + SQLTemplate: sqltemplate.New(b.dialect), + HistoryLimit: 100, + Key: &resource.ResourceKey{ + Namespace: key.namespace, + Group: key.group, + Resource: key.resource, + }, + }) + if err != nil { + return fmt.Errorf("failed to prune history: %w", err) + } + rows, err := res.RowsAffected() + if err != nil { + return fmt.Errorf("failed to get rows affected: %w", err) + } + b.log.Debug("pruned history successfully", + "namespace", key.namespace, + "group", key.group, + "resource", key.resource, + "rows", rows) + return nil + }) + }, + ErrorHandler: func(key pruningKey, err error) { + b.log.Error("failed to prune history", + "namespace", key.namespace, + "group", key.group, + "resource", key.resource, + "error", err) + }, + Reg: b.reg, + }) + if err != nil { + return err + } + + b.historyPruner = pruner + b.historyPruner.Start(ctx) + return nil } func (b *backend) IsHealthy(ctx context.Context, r *resource.HealthCheckRequest) (*resource.HealthCheckResponse, error) { @@ -246,6 +347,7 @@ func (b *backend) create(ctx context.Context, event resource.WriteEvent) (int64, }); err != nil { return guid, fmt.Errorf("insert into resource history: %w", err) } + _ = b.historyPruner.Add(pruningKey{namespace: event.Key.Namespace, group: event.Key.Group, resource: event.Key.Resource}) if b.simulatedNetworkLatency > 0 { time.Sleep(b.simulatedNetworkLatency) } @@ -299,6 +401,7 @@ func (b *backend) update(ctx context.Context, event resource.WriteEvent) (int64, }); err != nil { return guid, fmt.Errorf("insert into resource history: %w", err) } + _ = b.historyPruner.Add(pruningKey{namespace: event.Key.Namespace, group: event.Key.Group, resource: event.Key.Resource}) return guid, nil }) @@ -346,6 +449,7 @@ func (b *backend) delete(ctx context.Context, event resource.WriteEvent) (int64, }); err != nil { return guid, fmt.Errorf("insert into resource history: %w", err) } + _ = b.historyPruner.Add(pruningKey{namespace: event.Key.Namespace, group: event.Key.Group, resource: event.Key.Resource}) return guid, nil }) @@ -394,6 +498,7 @@ func (b *backend) restore(ctx context.Context, event resource.WriteEvent) (int64 }); err != nil { return guid, fmt.Errorf("insert into resource history: %w", err) } + _ = b.historyPruner.Add(pruningKey{namespace: event.Key.Namespace, group: event.Key.Group, resource: event.Key.Resource}) // 3. Update all resource history entries with the new UID // Note: we do not update any history entries that have a deletion timestamp included. This will become diff --git a/pkg/storage/unified/sql/data/resource_history_prune.sql b/pkg/storage/unified/sql/data/resource_history_prune.sql new file mode 100644 index 00000000000..e636e9dc73c --- /dev/null +++ b/pkg/storage/unified/sql/data/resource_history_prune.sql @@ -0,0 +1,22 @@ +DELETE FROM {{ .Ident "resource_history" }} +WHERE {{ .Ident "guid" }} IN ( + SELECT {{ .Ident "guid" }} + FROM ( + SELECT + {{ .Ident "guid" }}, + ROW_NUMBER() OVER ( + PARTITION BY + {{ .Ident "namespace" }}, + {{ .Ident "group" }}, + {{ .Ident "resource" }}, + {{ .Ident "name" }} + ORDER BY {{ .Ident "resource_version" }} DESC + ) AS {{ .Ident "rn" }} + FROM {{ .Ident "resource_history" }} + WHERE + {{ .Ident "namespace" }} = {{ .Arg .Key.Namespace }} + AND {{ .Ident "group" }} = {{ .Arg .Key.Group }} + AND {{ .Ident "resource" }} = {{ .Arg .Key.Resource }} + ) AS {{ .Ident "ranked" }} + WHERE {{ .Ident "rn" }} > {{ .Arg .HistoryLimit }} +); diff --git a/pkg/storage/unified/sql/queries.go b/pkg/storage/unified/sql/queries.go index 3902ee8ecc3..3ea34472024 100644 --- a/pkg/storage/unified/sql/queries.go +++ b/pkg/storage/unified/sql/queries.go @@ -44,6 +44,7 @@ var ( sqlResourceHistoryPoll = mustTemplate("resource_history_poll.sql") sqlResourceHistoryGet = mustTemplate("resource_history_get.sql") sqlResourceHistoryDelete = mustTemplate("resource_history_delete.sql") + sqlResourceHistoryPrune = mustTemplate("resource_history_prune.sql") sqlResourceInsertFromHistory = mustTemplate("resource_insert_from_history.sql") // sqlResourceLabelsInsert = mustTemplate("resource_labels_insert.sql") @@ -252,6 +253,32 @@ func (r sqlGetHistoryRequest) Validate() error { return nil // TODO } +// prune resource history +type sqlPruneHistoryRequest struct { + sqltemplate.SQLTemplate + Key *resource.ResourceKey + HistoryLimit int64 +} + +func (r *sqlPruneHistoryRequest) Validate() error { + if r.HistoryLimit <= 0 { + return fmt.Errorf("history limit must be greater than zero") + } + if r.Key == nil { + return fmt.Errorf("missing key") + } + if r.Key.Namespace == "" { + return fmt.Errorf("missing namespace") + } + if r.Key.Group == "" { + return fmt.Errorf("missing group") + } + if r.Key.Resource == "" { + return fmt.Errorf("missing resource") + } + return nil +} + // update resource history type sqlResourceHistoryUpdateRequest struct { diff --git a/pkg/storage/unified/sql/queries_test.go b/pkg/storage/unified/sql/queries_test.go index c8662ad310a..4dfb7e13327 100644 --- a/pkg/storage/unified/sql/queries_test.go +++ b/pkg/storage/unified/sql/queries_test.go @@ -255,6 +255,21 @@ func TestUnifiedStorageQueries(t *testing.T) { }, }, + sqlResourceHistoryPrune: { + { + Name: "simple", + Data: &sqlPruneHistoryRequest{ + SQLTemplate: mocks.NewTestingSQLTemplate(), + Key: &resource.ResourceKey{ + Namespace: "nn", + Group: "gg", + Resource: "rr", + }, + HistoryLimit: 100, + }, + }, + }, + sqlResourceVersionGet: { { Name: "single path", diff --git a/pkg/storage/unified/sql/server.go b/pkg/storage/unified/sql/server.go index 330e265d9f7..0a6664187cc 100644 --- a/pkg/storage/unified/sql/server.go +++ b/pkg/storage/unified/sql/server.go @@ -10,6 +10,7 @@ import ( infraDB "github.com/grafana/grafana/pkg/infra/db" "github.com/grafana/grafana/pkg/infra/tracing" + "github.com/grafana/grafana/pkg/services/featuremgmt" "github.com/grafana/grafana/pkg/services/sqlstore/migrator" "github.com/grafana/grafana/pkg/setting" "github.com/grafana/grafana/pkg/storage/unified/resource" @@ -18,7 +19,9 @@ import ( // Creates a new ResourceServer func NewResourceServer(db infraDB.DB, cfg *setting.Cfg, - tracer tracing.Tracer, reg prometheus.Registerer, ac types.AccessClient, searchOptions resource.SearchOptions, storageMetrics *resource.StorageMetrics, indexMetrics *resource.BleveIndexMetrics) (resource.ResourceServer, error) { + tracer tracing.Tracer, reg prometheus.Registerer, ac types.AccessClient, + searchOptions resource.SearchOptions, storageMetrics *resource.StorageMetrics, + indexMetrics *resource.BleveIndexMetrics, features featuremgmt.FeatureToggles) (resource.ResourceServer, error) { apiserverCfg := cfg.SectionWithEnvOverrides("grafana-apiserver") opts := resource.ResourceServerOptions{ Tracer: tracer, @@ -46,8 +49,16 @@ func NewResourceServer(db infraDB.DB, cfg *setting.Cfg, } isHA := isHighAvailabilityEnabled(cfg.SectionWithEnvOverrides("database")) + withPruner := features.IsEnabledGlobally(featuremgmt.FlagUnifiedStorageHistoryPruner) - store, err := NewBackend(BackendOptions{DBProvider: eDB, Tracer: tracer, IsHA: isHA, storageMetrics: storageMetrics}) + store, err := NewBackend(BackendOptions{ + DBProvider: eDB, + Tracer: tracer, + Reg: reg, + IsHA: isHA, + withPruner: withPruner, + storageMetrics: storageMetrics, + }) if err != nil { return nil, err } diff --git a/pkg/storage/unified/sql/service.go b/pkg/storage/unified/sql/service.go index 6b4e3dc2a87..8148111e017 100644 --- a/pkg/storage/unified/sql/service.go +++ b/pkg/storage/unified/sql/service.go @@ -118,7 +118,7 @@ func (s *service) start(ctx context.Context) error { return err } - server, err := NewResourceServer(s.db, s.cfg, s.tracing, s.reg, authzClient, searchOptions, s.storageMetrics, s.indexMetrics) + server, err := NewResourceServer(s.db, s.cfg, s.tracing, s.reg, authzClient, searchOptions, s.storageMetrics, s.indexMetrics, s.features) if err != nil { return err } diff --git a/pkg/storage/unified/sql/testdata/mysql--resource_history_prune-simple.sql b/pkg/storage/unified/sql/testdata/mysql--resource_history_prune-simple.sql new file mode 100755 index 00000000000..fa50d446b4e --- /dev/null +++ b/pkg/storage/unified/sql/testdata/mysql--resource_history_prune-simple.sql @@ -0,0 +1,22 @@ +DELETE FROM `resource_history` +WHERE `guid` IN ( + SELECT `guid` + FROM ( + SELECT + `guid`, + ROW_NUMBER() OVER ( + PARTITION BY + `namespace`, + `group`, + `resource`, + `name` + ORDER BY `resource_version` DESC + ) AS `rn` + FROM `resource_history` + WHERE + `namespace` = 'nn' + AND `group` = 'gg' + AND `resource` = 'rr' + ) AS `ranked` + WHERE `rn` > 100 +); diff --git a/pkg/storage/unified/sql/testdata/postgres--resource_history_prune-simple.sql b/pkg/storage/unified/sql/testdata/postgres--resource_history_prune-simple.sql new file mode 100755 index 00000000000..9994708de39 --- /dev/null +++ b/pkg/storage/unified/sql/testdata/postgres--resource_history_prune-simple.sql @@ -0,0 +1,22 @@ +DELETE FROM "resource_history" +WHERE "guid" IN ( + SELECT "guid" + FROM ( + SELECT + "guid", + ROW_NUMBER() OVER ( + PARTITION BY + "namespace", + "group", + "resource", + "name" + ORDER BY "resource_version" DESC + ) AS "rn" + FROM "resource_history" + WHERE + "namespace" = 'nn' + AND "group" = 'gg' + AND "resource" = 'rr' + ) AS "ranked" + WHERE "rn" > 100 +); diff --git a/pkg/storage/unified/sql/testdata/sqlite--resource_history_prune-simple.sql b/pkg/storage/unified/sql/testdata/sqlite--resource_history_prune-simple.sql new file mode 100755 index 00000000000..9994708de39 --- /dev/null +++ b/pkg/storage/unified/sql/testdata/sqlite--resource_history_prune-simple.sql @@ -0,0 +1,22 @@ +DELETE FROM "resource_history" +WHERE "guid" IN ( + SELECT "guid" + FROM ( + SELECT + "guid", + ROW_NUMBER() OVER ( + PARTITION BY + "namespace", + "group", + "resource", + "name" + ORDER BY "resource_version" DESC + ) AS "rn" + FROM "resource_history" + WHERE + "namespace" = 'nn' + AND "group" = 'gg' + AND "resource" = 'rr' + ) AS "ranked" + WHERE "rn" > 100 +); From c46565f65218c9f39c66c829fc71366e897463f8 Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Mon, 17 Mar 2025 14:29:18 +0300 Subject: [PATCH 026/115] K8s/Dashboard: DeepCopy should deep copy (#102258) --- .../dashboard/v0alpha1/dashboard_object_gen.go | 2 +- .../dashboard/v1alpha1/dashboard_object_gen.go | 2 +- .../dashboard/v2alpha1/dashboard_object_gen.go | 2 +- .../pkg/migration/conversion/conversion_test.go | 17 +++++++++++++++++ 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/apps/dashboard/pkg/apis/dashboard/v0alpha1/dashboard_object_gen.go b/apps/dashboard/pkg/apis/dashboard/v0alpha1/dashboard_object_gen.go index ab406988c90..5e5643192a6 100644 --- a/apps/dashboard/pkg/apis/dashboard/v0alpha1/dashboard_object_gen.go +++ b/apps/dashboard/pkg/apis/dashboard/v0alpha1/dashboard_object_gen.go @@ -219,7 +219,7 @@ func (o *Dashboard) Copy() resource.Object { } func (o *Dashboard) DeepCopyObject() runtime.Object { - return o.Copy() + return o.DeepCopy() } // Interface compliance compile-time check diff --git a/apps/dashboard/pkg/apis/dashboard/v1alpha1/dashboard_object_gen.go b/apps/dashboard/pkg/apis/dashboard/v1alpha1/dashboard_object_gen.go index cdf11cabbd0..8d45c64fc1a 100644 --- a/apps/dashboard/pkg/apis/dashboard/v1alpha1/dashboard_object_gen.go +++ b/apps/dashboard/pkg/apis/dashboard/v1alpha1/dashboard_object_gen.go @@ -219,7 +219,7 @@ func (o *Dashboard) Copy() resource.Object { } func (o *Dashboard) DeepCopyObject() runtime.Object { - return o.Copy() + return o.DeepCopy() } // Interface compliance compile-time check diff --git a/apps/dashboard/pkg/apis/dashboard/v2alpha1/dashboard_object_gen.go b/apps/dashboard/pkg/apis/dashboard/v2alpha1/dashboard_object_gen.go index 504dc5a25f1..5b59fbd93aa 100644 --- a/apps/dashboard/pkg/apis/dashboard/v2alpha1/dashboard_object_gen.go +++ b/apps/dashboard/pkg/apis/dashboard/v2alpha1/dashboard_object_gen.go @@ -219,7 +219,7 @@ func (o *Dashboard) Copy() resource.Object { } func (o *Dashboard) DeepCopyObject() runtime.Object { - return o.Copy() + return o.DeepCopy() } // Interface compliance compile-time check diff --git a/apps/dashboard/pkg/migration/conversion/conversion_test.go b/apps/dashboard/pkg/migration/conversion/conversion_test.go index 23cbd9fc2ba..c77afd78e1f 100644 --- a/apps/dashboard/pkg/migration/conversion/conversion_test.go +++ b/apps/dashboard/pkg/migration/conversion/conversion_test.go @@ -45,3 +45,20 @@ func TestConversionMatrixExist(t *testing.T) { }) } } + +func TestDeepCopyValid(t *testing.T) { + dash1 := &v0alpha1.Dashboard{} + meta1, err := utils.MetaAccessor(dash1) + require.NoError(t, err) + meta1.SetFolder("f1") + require.Equal(t, "f1", dash1.Annotations[utils.AnnoKeyFolder]) + + dash1Copy := dash1.DeepCopyObject() + metaCopy, err := utils.MetaAccessor(dash1Copy) + require.NoError(t, err) + require.Equal(t, "f1", metaCopy.GetFolder()) + + // Changing a property on the copy should not effect the original + metaCopy.SetFolder("XYZ") + require.Equal(t, "f1", meta1.GetFolder()) // 💣💣💣 +} From 5cd85471315b7a0455f133a3b72bb064d738c4ea Mon Sep 17 00:00:00 2001 From: Jack Westbrook Date: Mon, 17 Mar 2025 13:26:59 +0100 Subject: [PATCH 027/115] Revert "Grafana Data: Use package.json exports for internal code (#102286) Revert "Grafana Data: Use package.json exports for internal code (#102036)" This reverts commit 91116de790c6c59248abd262721c40f169be6661. --- .betterer.results | 529 +++++++++++++----- packages/grafana-data/package.json | 20 - packages/grafana-data/src/internal/index.ts | 100 ---- .../panel/getPanelOptionsWithDefaults.test.ts | 3 +- .../{helpers => __mocks__}/pluginMocks.ts | 2 +- packages/grafana-data/test/index.ts | 2 - .../src/querybuilder/operationUtils.ts | 2 +- public/app/core/components/GraphNG/utils.ts | 6 +- .../core/components/OptionsUI/registry.tsx | 2 +- .../core/components/TimelineChart/timeline.ts | 5 +- .../core/components/TimelineChart/utils.ts | 6 +- .../GrafanaJavascriptAgentBackend.test.ts | 2 +- public/app/core/services/theme.ts | 2 +- public/app/core/utils/explore.test.ts | 11 +- public/app/core/utils/richHistory.ts | 10 +- .../DashboardsListModalButton.tsx | 2 +- .../DeleteUserModalButton.tsx | 2 +- .../unified/GrafanaRuleQueryViewer.tsx | 5 +- .../GrafanaAlertmanagerDeliveryWarning.tsx | 2 +- .../rule-editor/CloudAlertPreview.tsx | 2 +- .../rule-editor/DashboardPicker.tsx | 2 +- .../components/rule-editor/QueryOptions.tsx | 5 +- .../rule-editor/rule-types/RuleTypePicker.tsx | 2 +- .../rules/AlertInstanceStateFilter.tsx | 2 +- .../components/rules/RuleConfigStatus.tsx | 2 +- .../rules/central-state-history/utils.ts | 2 +- .../state-history/useRuleHistoryRecords.tsx | 2 +- .../unified/home/PluginIntegrations.tsx | 2 +- .../alerting/unified/styles/pagination.ts | 2 +- .../features/alerting/unified/utils/misc.ts | 2 +- .../alerting/unified/utils/routeTree.ts | 6 +- .../features/alerting/unified/utils/time.ts | 4 +- .../StandardAnnotationQueryEditor.test.tsx | 2 +- .../auth-config/AuthProvidersListPage.tsx | 2 +- public/app/features/canvas/element.ts | 2 +- .../app/features/canvas/elements/button.tsx | 3 +- public/app/features/canvas/types.ts | 2 +- .../inspect/HelpWizard/HelpWizard.test.tsx | 2 +- .../inspect/InspectJsonTab.test.tsx | 2 +- .../pages/DashboardScenePage.test.tsx | 2 +- .../pages/PublicDashboardScenePage.test.tsx | 2 +- .../PanelDataQueriesTab.test.tsx | 2 +- .../panel-edit/PanelEditor.test.ts | 2 +- .../panel-edit/PanelOptions.test.tsx | 2 +- .../DashboardDatasourceBehaviour.test.tsx | 2 +- .../scene/DashboardLinksControls.tsx | 2 +- .../scene/DashboardSceneRenderer.test.tsx | 2 +- .../scene/LibraryPanelBehavior.test.tsx | 2 +- .../scene/PanelMenuBehavior.test.tsx | 2 +- .../layout-default/DashboardGridItem.test.tsx | 2 +- .../RowRepeaterBehavior.test.tsx | 2 +- .../RowItemRepeaterBehavior.test.tsx | 2 +- .../serialization/angularMigration.test.ts | 2 +- .../transformSaveModelToScene.test.ts | 2 +- .../transformSceneToSaveModel.test.ts | 2 +- .../settings/VariablesEditView.test.tsx | 2 +- .../share-externally/ShareExternally.test.tsx | 2 +- .../sharing/ShareDrawer/ShareDrawer.test.tsx | 2 +- .../sharing/ShareLinkTab.test.tsx | 2 +- .../panel-share/SharePanelInternally.test.tsx | 2 +- .../DashboardPrompt/DashboardPrompt.test.tsx | 2 +- .../components/HelpWizard/HelpWizard.test.tsx | 2 +- .../PanelEditor/OptionsPaneOptions.test.tsx | 2 +- .../PanelEditor/PanelHeaderCorner.tsx | 3 +- .../PanelEditor/getVisualizationOptions.tsx | 8 +- .../PanelEditor/state/actions.test.ts | 2 +- .../PublicDashboardNotAvailable.tsx | 2 +- .../ConfigPublicDashboard.tsx | 2 +- .../ConfigPublicDashboard/Configuration.tsx | 2 +- .../AcknowledgeCheckboxes.tsx | 2 +- .../UnsupportedDataSourcesAlert.tsx | 2 +- .../SharePublicDashboard.test.tsx | 2 +- .../SharePublicDashboard.tsx | 2 +- .../SharePublicDashboardUtils.test.tsx | 3 +- .../components/SubMenu/DashboardLinks.tsx | 2 +- .../SubMenu/DashboardLinksDashboard.tsx | 2 +- .../dashboard/state/DashboardMigrator.test.ts | 2 +- .../dashboard/state/DashboardMigrator.ts | 3 +- .../dashboard/state/PanelModel.test.ts | 3 +- .../features/dashboard/utils/panel.test.ts | 2 +- .../app/features/dashboard/utils/timeRange.ts | 3 +- .../datasources/components/CloudInfoBox.tsx | 2 +- .../datasources/state/buildCategories.test.ts | 2 +- public/app/features/dimensions/context.ts | 2 +- public/app/features/dimensions/scale.ts | 3 +- .../app/features/explore/Logs/Logs.test.tsx | 2 +- .../explore/Logs/LogsColumnSearch.tsx | 2 +- .../explore/Logs/LogsMetaRow.test.tsx | 2 +- .../app/features/explore/Logs/LogsMetaRow.tsx | 2 +- .../features/explore/Logs/LogsTable.test.tsx | 2 +- .../explore/Logs/LogsTableActiveFields.tsx | 2 +- .../explore/Logs/LogsTableMultiSelect.tsx | 2 +- .../explore/Logs/LogsTableWrap.test.tsx | 10 +- .../explore/Logs/utils/testMocks.test.ts | 2 +- public/app/features/explore/NoData.tsx | 2 +- .../explore/PrometheusListView/ItemLabels.tsx | 2 +- .../explore/PrometheusListView/ItemValues.tsx | 2 +- .../RawListContainer.test.tsx | 2 +- .../PrometheusListView/RawListContainer.tsx | 2 +- .../PrometheusListView/RawListItem.tsx | 2 +- .../RawListItemAttributes.tsx | 2 +- .../app/features/explore/state/main.test.ts | 3 +- .../live/centrifuge/LiveDataStream.ts | 2 +- .../logs/components/InfiniteScroll.test.tsx | 5 +- .../logs/components/InfiniteScroll.tsx | 12 +- .../logs/components/LogDetailsRow.test.tsx | 3 +- public/app/features/logs/logsModel.ts | 2 +- .../DeletePublicDashboardModal.tsx | 2 +- .../app/features/panel/state/actions.test.ts | 3 +- .../plugins/components/AppRootPage.test.tsx | 2 +- .../extensions/registry/AddedLinksRegistry.ts | 2 +- .../features/plugins/extensions/validators.ts | 19 +- .../plugins/loader/sharedDependencies.ts | 2 +- .../app/features/plugins/pluginPreloader.ts | 7 +- .../features/scopes/tests/utils/render.tsx | 2 +- .../app/features/trails/DataTrailsHistory.tsx | 5 +- .../logs/lokiRecordingRules.test.ts | 2 +- .../FilterByValueFilterEditor.tsx | 2 +- .../FilterByValueTransformerEditor.test.tsx | 2 +- .../FilterByValueTransformerEditor.tsx | 2 +- .../calculateHeatmap/heatmap.test.ts | 3 +- .../transformers/calculateHeatmap/heatmap.ts | 2 +- .../BinaryOperationOptionsEditor.tsx | 2 +- .../CalculateFieldTransformerEditor.tsx | 2 +- .../CumulativeOptionsEditor.tsx | 6 +- .../IndexOptionsEditor.tsx | 2 +- .../ReduceRowOptionsEditor.tsx | 5 +- .../UnaryOperationEditor.tsx | 6 +- .../WindowOptionsEditor.tsx | 2 +- .../editors/ConcatenateTransformerEditor.tsx | 5 +- .../ConvertFieldTypeTransformerEditor.tsx | 5 +- .../editors/EnumMappingEditor.tsx | 2 +- .../editors/FilterByNameTransformerEditor.tsx | 2 +- .../FilterByRefIdTransformerEditor.tsx | 2 +- .../editors/FormatStringTransformerEditor.tsx | 5 +- .../editors/FormatTimeTransformerEditor.tsx | 2 +- .../editors/GroupByTransformerEditor.tsx | 6 +- .../GroupToNestedTableTransformerEditor.tsx | 4 +- .../editors/HistogramTransformerEditor.tsx | 5 +- .../editors/JoinByFieldTransformerEditor.tsx | 2 +- .../LabelsToFieldsTransformerEditor.tsx | 5 +- .../editors/LimitTransformerEditor.tsx | 2 +- .../editors/MergeTransformerEditor.tsx | 2 +- .../OrganizeFieldsTransformerEditor.tsx | 3 +- .../editors/ReduceTransformerEditor.tsx | 2 +- .../editors/RenameByRegexTransformer.tsx | 2 +- .../editors/SeriesToRowsTransformerEditor.tsx | 2 +- .../editors/SortByTransformerEditor.tsx | 2 +- .../editors/TransposeTransformerEditor.tsx | 2 +- .../extractFields/extractFields.test.ts | 5 +- .../lookupGazetteer/fieldLookup.test.ts | 4 +- .../partitionByValues/partitionByValues.ts | 3 +- .../transformers/spatial/optionsHelper.tsx | 3 +- .../spatial/spatialTransformer.test.ts | 5 +- .../variables/datasource/actions.test.ts | 2 +- .../variables/datasource/reducer.test.ts | 2 +- .../state/initVariableTransaction.test.ts | 2 +- ...igrateVariablesDatasourceNameToRef.test.ts | 2 +- .../azuremonitor/__mocks__/utils.ts | 3 +- .../components/LogsQueryEditor/RawQuery.tsx | 2 +- .../CloudWatchMetricsQueryRunner.test.ts | 3 +- .../datasource/dashboard/datasource.test.ts | 2 +- .../elasticsearch/ElasticResponse.ts | 2 +- .../editor/annotation/AnnotationEditor.tsx | 2 +- .../influxdb/components/editor/constants.ts | 2 +- .../components/editor/query/QueryEditor.tsx | 2 +- .../editor/query/flux/FluxQueryEditor.tsx | 2 +- .../editor/query/fsql/FSQLEditor.tsx | 2 +- .../utils/getTemplateVariableOptions.ts | 2 +- .../utils/withTemplateVariableOptions.ts | 2 +- .../editor/query/influxql/utils/wrapper.ts | 2 +- .../influxdb/influxql_metadata_query.ts | 2 +- .../datasources/prometheus/RawQuery.tsx | 2 +- public/app/plugins/datasource/tempo/types.ts | 2 +- public/app/plugins/panel/barchart/bars.ts | 6 +- public/app/plugins/panel/barchart/utils.ts | 2 +- .../plugins/panel/bargauge/BarGaugeLegend.tsx | 3 +- .../app/plugins/panel/candlestick/fields.ts | 2 +- .../panel/canvas/components/CanvasTooltip.tsx | 4 +- .../panel/canvas/editor/connectionEditor.tsx | 2 +- .../editor/element/QuickPositioning.tsx | 2 +- .../canvas/editor/element/elementEditor.tsx | 2 +- .../canvas/editor/inline/InlineEditBody.tsx | 3 +- .../panel/canvas/editor/layer/layerEditor.tsx | 2 +- .../plugins/panel/canvas/editor/options.ts | 2 +- public/app/plugins/panel/canvas/utils.ts | 3 +- .../components/DatagridContextMenu.tsx | 2 +- .../panel/geomap/components/MarkersLegend.tsx | 9 +- .../panel/geomap/editor/layerEditor.tsx | 2 +- .../panel/geomap/layers/data/routeLayer.tsx | 6 +- .../utils/checkFeatureMatchesStyleRule.ts | 2 +- .../app/plugins/panel/geomap/utils/tooltip.ts | 2 +- .../app/plugins/panel/geomap/utils/utils.ts | 3 +- .../app/plugins/panel/graph/data_processor.ts | 2 +- .../app/plugins/panel/histogram/Histogram.tsx | 4 +- .../panel/histogram/HistogramPanel.tsx | 11 +- public/app/plugins/panel/histogram/module.tsx | 2 +- public/app/plugins/panel/histogram/utils.ts | 5 +- public/app/plugins/panel/logs/LogsPanel.tsx | 4 +- .../app/plugins/panel/nodeGraph/Node.test.tsx | 2 +- public/app/plugins/panel/stat/StatPanel.tsx | 2 +- .../app/plugins/panel/status-history/utils.ts | 3 +- public/app/plugins/panel/table/migrations.ts | 2 +- public/app/plugins/panel/timeseries/utils.ts | 6 +- public/app/plugins/panel/trend/TrendPanel.tsx | 11 +- .../plugins/panel/xychart/XYChartPanel.tsx | 5 +- .../plugins/panel/xychart/XYChartTooltip.tsx | 5 +- public/app/plugins/panel/xychart/scatter.ts | 14 +- public/app/plugins/panel/xychart/utils.ts | 2 +- public/app/routes/RoutesWrapper.tsx | 2 +- 210 files changed, 718 insertions(+), 563 deletions(-) delete mode 100644 packages/grafana-data/src/internal/index.ts rename packages/grafana-data/test/{helpers => __mocks__}/pluginMocks.ts (98%) delete mode 100644 packages/grafana-data/test/index.ts diff --git a/.betterer.results b/.betterer.results index e56a82ec813..6849eaed996 100644 --- a/.betterer.results +++ b/.betterer.results @@ -392,9 +392,8 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "7"], [0, 0, 0, "Unexpected any. Specify a different type.", "8"] ], - "packages/grafana-data/test/helpers/pluginMocks.ts:5381": [ - [0, 0, 0, "Do not use any type assertions.", "0"], - [0, 0, 0, "Unexpected any. Specify a different type.", "1"] + "packages/grafana-data/test/__mocks__/pluginMocks.ts:5381": [ + [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], "packages/grafana-e2e-selectors/src/resolver.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] @@ -971,6 +970,11 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "4"], [0, 0, 0, "Unexpected any. Specify a different type.", "5"] ], + "public/app/core/components/GraphNG/utils.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/joinDataFrames\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/nulls/nullInsertThreshold\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/nulls/nullToUndefThreshold\' import is restricted from being used by a pattern. Import from the public export instead.", "2"] + ], "public/app/core/components/Layers/LayerDragDropList.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], @@ -993,6 +997,9 @@ exports[`better eslint`] = { "public/app/core/components/OptionsUI/fieldColor.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] ], + "public/app/core/components/OptionsUI/registry.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/field/overrides/processors\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/core/components/OptionsUI/units.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] ], @@ -1074,6 +1081,14 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "1"], [0, 0, 0, "Unexpected any. Specify a different type.", "2"] ], + "public/app/core/components/TimelineChart/timeline.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/themes/colorManipulator\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], + "public/app/core/components/TimelineChart/utils.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/joinDataFrames\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/nulls/nullInsertThreshold\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/nulls/nullToValue\' import is restricted from being used by a pattern. Import from the public export instead.", "2"] + ], "public/app/core/config.ts:5381": [ [0, 0, 0, "Do not re-export imported variable (\`Settings\`)", "0"], [0, 0, 0, "Do not re-export imported variable (\`config\`)", "1"] @@ -1116,6 +1131,12 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "2"], [0, 0, 0, "Unexpected any. Specify a different type.", "3"] ], + "public/app/core/services/echo/backends/grafana-javascript-agent/GrafanaJavascriptAgentBackend.test.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/types/config\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], + "public/app/core/services/theme.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/themes/registry\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/core/specs/backend_srv.test.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], @@ -1155,6 +1176,9 @@ exports[`better eslint`] = { "public/app/core/utils/deferred.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], + "public/app/core/utils/explore.test.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/utils/url\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/core/utils/fetch.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"], @@ -1176,9 +1200,10 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], "public/app/core/utils/richHistory.ts:5381": [ - [0, 0, 0, "Do not re-export imported variable (\`RichHistorySearchFilters\`)", "0"], - [0, 0, 0, "Do not re-export imported variable (\`RichHistorySettings\`)", "1"], - [0, 0, 0, "Do not re-export imported variable (\`SortOrder\`)", "2"] + [0, 0, 0, "\'@grafana/data/src/utils/url\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "Do not re-export imported variable (\`RichHistorySearchFilters\`)", "1"], + [0, 0, 0, "Do not re-export imported variable (\`RichHistorySettings\`)", "2"], + [0, 0, 0, "Do not re-export imported variable (\`SortOrder\`)", "3"] ], "public/app/core/utils/ticks.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], @@ -1365,9 +1390,9 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "4"] ], "public/app/features/alerting/unified/GrafanaRuleQueryViewer.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [0, 0, 0, "\'@grafana/data/src/datetime/rangeutil\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "2"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], [0, 0, 0, "No untranslated strings. Wrap text with ", "3"], [0, 0, 0, "No untranslated strings. Wrap text with ", "4"], [0, 0, 0, "No untranslated strings. Wrap text with ", "5"], @@ -1380,7 +1405,8 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "12"], [0, 0, 0, "No untranslated strings. Wrap text with ", "13"], [0, 0, 0, "No untranslated strings. Wrap text with ", "14"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "15"] + [0, 0, 0, "No untranslated strings. Wrap text with ", "15"], + [0, 0, 0, "No untranslated strings. Wrap text with ", "16"] ], "public/app/features/alerting/unified/NotificationPoliciesPage.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], @@ -2026,10 +2052,11 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] ], "public/app/features/alerting/unified/components/rule-editor/QueryOptions.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"], + [0, 0, 0, "\'@grafana/data/src/datetime/rangeutil\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings. Wrap text with ", "2"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "3"] + [0, 0, 0, "No untranslated strings. Wrap text with ", "3"], + [0, 0, 0, "No untranslated strings. Wrap text with ", "4"] ], "public/app/features/alerting/unified/components/rule-editor/QueryRows.tsx:5381": [ [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], @@ -2399,6 +2426,9 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "22"], [0, 0, 0, "No untranslated strings. Wrap text with ", "23"] ], + "public/app/features/alerting/unified/components/rules/central-state-history/utils.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/field/fieldComparers\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/features/alerting/unified/components/rules/state-history/LogRecordViewer.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] @@ -2420,6 +2450,9 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "3"], [0, 0, 0, "No untranslated strings. Wrap text with ", "4"] ], + "public/app/features/alerting/unified/components/rules/state-history/useRuleHistoryRecords.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/field/fieldComparers\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/features/alerting/unified/components/settings/AlertmanagerCard.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], @@ -2641,6 +2674,9 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "1"], [0, 0, 0, "Unexpected any. Specify a different type.", "2"] ], + "public/app/features/alerting/unified/utils/misc.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/types/config\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/features/alerting/unified/utils/receiver-form.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"], @@ -2657,6 +2693,9 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "6"], [0, 0, 0, "Unexpected any. Specify a different type.", "7"] ], + "public/app/features/alerting/unified/utils/routeTree.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/utils/arrayUtils\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/features/alerting/unified/utils/rule-form.ts:5381": [ [0, 0, 0, "\'@grafana/runtime/src/utils/DataSourceWithBackend\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] ], @@ -2666,6 +2705,9 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use any type assertions.", "2"], [0, 0, 0, "Unexpected any. Specify a different type.", "3"] ], + "public/app/features/alerting/unified/utils/time.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/datetime/rangeutil\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/features/annotations/components/AnnotationResultMapper.tsx:5381": [ [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], [0, 0, 0, "No untranslated strings. Wrap text with ", "1"], @@ -2731,8 +2773,9 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "6"] ], "public/app/features/auth-config/AuthProvidersListPage.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] + [0, 0, 0, "\'@grafana/data/src/types/config\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings. Wrap text with ", "1"], + [0, 0, 0, "No untranslated strings. Wrap text with ", "2"] ], "public/app/features/auth-config/ProviderConfigForm.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], @@ -2787,6 +2830,9 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"], [0, 0, 0, "Do not use export all (\`export * from ...\`)", "2"] ], + "public/app/features/canvas/element.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/panel/PanelPlugin\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/features/canvas/elements/notFound.tsx:5381": [ [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] ], @@ -3037,6 +3083,9 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] ], + "public/app/features/dashboard-scene/scene/DashboardLinksControls.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/text/sanitize\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/features/dashboard-scene/scene/PanelLinks.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] ], @@ -3517,8 +3566,10 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"] ], "public/app/features/dashboard/components/PanelEditor/getVisualizationOptions.tsx:5381": [ - [0, 0, 0, "Unexpected any. Specify a different type.", "0"], - [0, 0, 0, "Unexpected any. Specify a different type.", "1"] + [0, 0, 0, "\'@grafana/data/src/panel/PanelPlugin\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "\'@grafana/data/src/utils/OptionsUIBuilders\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], + [0, 0, 0, "Unexpected any. Specify a different type.", "2"], + [0, 0, 0, "Unexpected any. Specify a different type.", "3"] ], "public/app/features/dashboard/components/PanelEditor/utils.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], @@ -3630,13 +3681,20 @@ exports[`better eslint`] = { "public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboard.tsx:5381": [ [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] ], + "public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboardUtils.test.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/types/query\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/features/dashboard/components/ShareModal/ViewJsonModal.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] ], + "public/app/features/dashboard/components/SubMenu/DashboardLinks.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/text/sanitize\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/features/dashboard/components/SubMenu/DashboardLinksDashboard.tsx:5381": [ - [0, 0, 0, "Do not use any type assertions.", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "Unexpected any. Specify a different type.", "2"] + [0, 0, 0, "\'@grafana/data/src/text/sanitize\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "Do not use any type assertions.", "1"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], + [0, 0, 0, "Unexpected any. Specify a different type.", "3"] ], "public/app/features/dashboard/components/SubMenu/SubMenu.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] @@ -3749,12 +3807,12 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "11"] ], "public/app/features/dashboard/state/DashboardMigrator.ts:5381": [ - [0, 0, 0, "Do not use any type assertions.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"], + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/labelsToFields\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/merge\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], [0, 0, 0, "Do not use any type assertions.", "2"], [0, 0, 0, "Do not use any type assertions.", "3"], - [0, 0, 0, "Unexpected any. Specify a different type.", "4"], - [0, 0, 0, "Unexpected any. Specify a different type.", "5"], + [0, 0, 0, "Do not use any type assertions.", "4"], + [0, 0, 0, "Do not use any type assertions.", "5"], [0, 0, 0, "Unexpected any. Specify a different type.", "6"], [0, 0, 0, "Unexpected any. Specify a different type.", "7"], [0, 0, 0, "Unexpected any. Specify a different type.", "8"], @@ -3776,7 +3834,9 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "24"], [0, 0, 0, "Unexpected any. Specify a different type.", "25"], [0, 0, 0, "Unexpected any. Specify a different type.", "26"], - [0, 0, 0, "Unexpected any. Specify a different type.", "27"] + [0, 0, 0, "Unexpected any. Specify a different type.", "27"], + [0, 0, 0, "Unexpected any. Specify a different type.", "28"], + [0, 0, 0, "Unexpected any. Specify a different type.", "29"] ], "public/app/features/dashboard/state/DashboardModel.repeat.test.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], @@ -3889,9 +3949,10 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "2"] ], "public/app/features/datasources/components/CloudInfoBox.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [0, 0, 0, "\'@grafana/data/src/types/config\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "2"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], + [0, 0, 0, "No untranslated strings. Wrap text with ", "3"] ], "public/app/features/datasources/components/DashboardsTable.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], @@ -4072,7 +4133,8 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use export all (\`export * from ...\`)", "7"] ], "public/app/features/dimensions/scale.ts:5381": [ - [0, 0, 0, "Do not use any type assertions.", "0"] + [0, 0, 0, "\'@grafana/data/src/field/scale\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "Do not use any type assertions.", "1"] ], "public/app/features/dimensions/types.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] @@ -4150,6 +4212,9 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "1"], [0, 0, 0, "No untranslated strings. Wrap text with ", "2"] ], + "public/app/features/explore/Logs/Logs.test.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/organize\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/features/explore/Logs/Logs.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], @@ -4173,6 +4238,9 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] ], + "public/app/features/explore/Logs/LogsMetaRow.test.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/organize\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/features/explore/Logs/LogsMetaRow.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], @@ -4187,6 +4255,9 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "3"], [0, 0, 0, "No untranslated strings. Wrap text with ", "4"] ], + "public/app/features/explore/Logs/LogsTable.test.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/organize\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/features/explore/Logs/LogsTableAvailableFields.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] ], @@ -4202,6 +4273,9 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings. Wrap text with ", "2"] ], + "public/app/features/explore/Logs/LogsTableWrap.test.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/organize\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/features/explore/Logs/LogsTableWrap.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], @@ -4482,6 +4556,9 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "2"], [0, 0, 0, "Unexpected any. Specify a different type.", "3"] ], + "public/app/features/explore/state/main.test.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/utils/url\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/features/explore/state/time.test.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], @@ -4671,9 +4748,10 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] ], "public/app/features/live/centrifuge/LiveDataStream.ts:5381": [ - [0, 0, 0, "\'@grafana/runtime/src/services/live\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/runtime/src/utils/toDataQueryError\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], - [0, 0, 0, "Do not use any type assertions.", "2"] + [0, 0, 0, "\'@grafana/data/src/dataframe/StreamingDataFrame\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "\'@grafana/runtime/src/services/live\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], + [0, 0, 0, "\'@grafana/runtime/src/utils/toDataQueryError\' import is restricted from being used by a pattern. Import from the public export instead.", "2"], + [0, 0, 0, "Do not use any type assertions.", "3"] ], "public/app/features/live/centrifuge/channel.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] @@ -4695,8 +4773,12 @@ exports[`better eslint`] = { "public/app/features/live/live.ts:5381": [ [0, 0, 0, "\'@grafana/runtime/src/utils/DataSourceWithBackend\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] ], + "public/app/features/logs/components/InfiniteScroll.test.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/datetime/rangeutil\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/features/logs/components/InfiniteScroll.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] + [0, 0, 0, "\'@grafana/data/src/datetime/rangeutil\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] ], "public/app/features/logs/components/LogDetails.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], @@ -4744,6 +4826,9 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "4"], [0, 0, 0, "No untranslated strings. Wrap text with ", "5"] ], + "public/app/features/logs/logsModel.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/valueFormats/symbolFormatters\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/features/logs/utils.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], @@ -5083,15 +5168,24 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] ], + "public/app/features/plugins/extensions/registry/AddedLinksRegistry.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/types/pluginExtensions\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/features/plugins/extensions/usePluginComponents.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], "public/app/features/plugins/extensions/usePluginFunctions.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], + "public/app/features/plugins/extensions/validators.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/types/pluginExtensions\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/features/plugins/loader/sharedDependencies.ts:5381": [ [0, 0, 0, "* import is invalid because \'Layout,HorizontalGroup,VerticalGroup\' from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"] ], + "public/app/features/plugins/pluginPreloader.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/types/pluginExtensions\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/features/plugins/sandbox/distortion_map.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], @@ -5476,7 +5570,8 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] ], "public/app/features/trails/DataTrailsHistory.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] + [0, 0, 0, "\'@grafana/data/src/datetime/rangeutil\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] ], "public/app/features/trails/MetricScene.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], @@ -5510,16 +5605,21 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] ], "public/app/features/transformers/FilterByValueTransformer/FilterByValueFilterEditor.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/filterByValue\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"] + ], + "public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.test.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/filterByValue\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] ], "public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/filterByValue\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "2"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], + [0, 0, 0, "No untranslated strings. Wrap text with ", "3"] ], "public/app/features/transformers/FilterByValueTransformer/ValueMatchers/BasicMatcherEditor.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], @@ -5555,9 +5655,13 @@ exports[`better eslint`] = { "public/app/features/transformers/calculateHeatmap/editor/helper.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], + "public/app/features/transformers/calculateHeatmap/heatmap.test.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/dataframe/processDataFrame\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/features/transformers/calculateHeatmap/heatmap.ts:5381": [ - [0, 0, 0, "Do not use any type assertions.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"] + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/joinDataFrames\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "Do not use any type assertions.", "1"], + [0, 0, 0, "Do not use any type assertions.", "2"] ], "public/app/features/transformers/configFromQuery/ConfigFromQueryTransformerEditor.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], @@ -5565,58 +5669,66 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] ], "public/app/features/transformers/editors/CalculateFieldTransformerEditor/BinaryOperationOptionsEditor.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/calculateField\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] ], "public/app/features/transformers/editors/CalculateFieldTransformerEditor/CalculateFieldTransformerEditor.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/calculateField\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] + ], + "public/app/features/transformers/editors/CalculateFieldTransformerEditor/CumulativeOptionsEditor.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/calculateField\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "Do not use any type assertions.", "1"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"] + ], + "public/app/features/transformers/editors/CalculateFieldTransformerEditor/IndexOptionsEditor.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/calculateField\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] ], - "public/app/features/transformers/editors/CalculateFieldTransformerEditor/CumulativeOptionsEditor.tsx:5381": [ - [0, 0, 0, "Do not use any type assertions.", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] - ], - "public/app/features/transformers/editors/CalculateFieldTransformerEditor/IndexOptionsEditor.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"] - ], "public/app/features/transformers/editors/CalculateFieldTransformerEditor/ReduceRowOptionsEditor.tsx:5381": [ - [0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/calculateField\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "1"], + [0, 0, 0, "Do not use any type assertions.", "2"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"] ], "public/app/features/transformers/editors/CalculateFieldTransformerEditor/UnaryOperationEditor.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/calculateField\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "3"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], + [0, 0, 0, "No untranslated strings. Wrap text with ", "4"] ], "public/app/features/transformers/editors/CalculateFieldTransformerEditor/WindowOptionsEditor.tsx:5381": [ - [0, 0, 0, "Do not use any type assertions.", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/calculateField\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "Do not use any type assertions.", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "6"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "6"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "7"] ], "public/app/features/transformers/editors/CalculateFieldTransformerEditor/index.ts:5381": [ [0, 0, 0, "Do not re-export imported variable (\`CalculateFieldTransformerEditor\`)", "0"], [0, 0, 0, "Do not re-export imported variable (\`calculateFieldTransformRegistryItem\`)", "1"] ], "public/app/features/transformers/editors/ConcatenateTransformerEditor.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/concat\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] ], "public/app/features/transformers/editors/ConvertFieldTypeTransformerEditor.tsx:5381": [ - [0, 0, 0, "Do not use any type assertions.", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/convertFieldType\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "Do not use any type assertions.", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], @@ -5631,13 +5743,15 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "13"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "14"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "15"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "16"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "16"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "17"] ], "public/app/features/transformers/editors/EnumMappingEditor.tsx:5381": [ - [0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"], - [0, 0, 0, "\'VerticalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "1"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "2"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "3"] + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/convertFieldType\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "1"], + [0, 0, 0, "\'VerticalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "2"], + [0, 0, 0, "No untranslated strings. Wrap text with ", "3"], + [0, 0, 0, "No untranslated strings. Wrap text with ", "4"] ], "public/app/features/transformers/editors/EnumMappingRow.tsx:5381": [ [0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"], @@ -5645,40 +5759,49 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] ], "public/app/features/transformers/editors/FilterByNameTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/runtime/src/services\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/filterByName\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "\'@grafana/runtime/src/services\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "6"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "7"] + ], + "public/app/features/transformers/editors/FilterByRefIdTransformerEditor.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/filterByRefId\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], + "public/app/features/transformers/editors/FormatStringTransformerEditor.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/formatString\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] + ], + "public/app/features/transformers/editors/FormatTimeTransformerEditor.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/formatTime\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "6"] - ], - "public/app/features/transformers/editors/FormatStringTransformerEditor.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] - ], - "public/app/features/transformers/editors/FormatTimeTransformerEditor.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "5"] + [0, 0, 0, "No untranslated strings. Wrap text with ", "6"] ], "public/app/features/transformers/editors/GroupByTransformerEditor.tsx:5381": [ - [0, 0, 0, "Do not use any type assertions.", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] - ], - "public/app/features/transformers/editors/GroupToNestedTableTransformerEditor.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/groupBy\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "Do not use any type assertions.", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"] ], + "public/app/features/transformers/editors/GroupToNestedTableTransformerEditor.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/groupBy\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/groupToNestedTable\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "6"] + ], "public/app/features/transformers/editors/GroupingToMatrixTransformerEditor.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], @@ -5686,60 +5809,74 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] ], "public/app/features/transformers/editors/HistogramTransformerEditor.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] - ], - "public/app/features/transformers/editors/JoinByFieldTransformerEditor.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] - ], - "public/app/features/transformers/editors/LabelsToFieldsTransformerEditor.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/histogram\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] ], - "public/app/features/transformers/editors/LimitTransformerEditor.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "public/app/features/transformers/editors/MergeTransformerEditor.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] - ], - "public/app/features/transformers/editors/OrganizeFieldsTransformerEditor.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + "public/app/features/transformers/editors/JoinByFieldTransformerEditor.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/joinByField\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "2"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] ], - "public/app/features/transformers/editors/ReduceTransformerEditor.tsx:5381": [ - [0, 0, 0, "Do not use any type assertions.", "0"], + "public/app/features/transformers/editors/LabelsToFieldsTransformerEditor.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/labelsToFields\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"] ], + "public/app/features/transformers/editors/LimitTransformerEditor.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/limit\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"] + ], + "public/app/features/transformers/editors/MergeTransformerEditor.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/merge\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] + ], + "public/app/features/transformers/editors/OrganizeFieldsTransformerEditor.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/order\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/organize\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], + [0, 0, 0, "No untranslated strings. Wrap text with ", "4"] + ], + "public/app/features/transformers/editors/ReduceTransformerEditor.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/reduce\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "Do not use any type assertions.", "1"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "6"] + ], "public/app/features/transformers/editors/RenameByRegexTransformer.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] - ], - "public/app/features/transformers/editors/SortByTransformerEditor.tsx:5381": [ - [0, 0, 0, "Do not use any type assertions.", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] - ], - "public/app/features/transformers/editors/TransposeTransformerEditor.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/renameByRegex\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"] ], + "public/app/features/transformers/editors/SeriesToRowsTransformerEditor.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/seriesToRows\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], + "public/app/features/transformers/editors/SortByTransformerEditor.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/sortBy\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "Do not use any type assertions.", "1"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"] + ], + "public/app/features/transformers/editors/TransposeTransformerEditor.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/transpose\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"] + ], "public/app/features/transformers/extractFields/ExtractFieldsTransformerEditor.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"], @@ -5765,6 +5902,11 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "5"], [0, 0, 0, "No untranslated strings. Wrap text with ", "6"] ], + "public/app/features/transformers/extractFields/extractFields.test.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/dataframe/processDataFrame\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/sortBy\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], + [0, 0, 0, "\'@grafana/data/src/utils/tests/mockTransformationsRegistry\' import is restricted from being used by a pattern. Import from the public export instead.", "2"] + ], "public/app/features/transformers/extractFields/extractFields.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"] @@ -5807,6 +5949,10 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] ], + "public/app/features/transformers/lookupGazetteer/fieldLookup.test.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/dataframe/processDataFrame\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/ids\' import is restricted from being used by a pattern. Import from the public export instead.", "1"] + ], "public/app/features/transformers/lookupGazetteer/fieldLookup.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], @@ -5820,6 +5966,10 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "6"], [0, 0, 0, "No untranslated strings. Wrap text with ", "7"] ], + "public/app/features/transformers/partitionByValues/partitionByValues.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/filterByName\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/noop\' import is restricted from being used by a pattern. Import from the public export instead.", "1"] + ], "public/app/features/transformers/prepareTimeSeries/PrepareTimeSeriesEditor.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], @@ -5854,12 +6004,18 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"] ], "public/app/features/transformers/spatial/optionsHelper.tsx:5381": [ - [0, 0, 0, "Do not use any type assertions.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"], + [0, 0, 0, "\'@grafana/data/src/panel/PanelPlugin\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "\'@grafana/data/src/utils/OptionsUIBuilders\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], [0, 0, 0, "Do not use any type assertions.", "2"], - [0, 0, 0, "Unexpected any. Specify a different type.", "3"], - [0, 0, 0, "Unexpected any. Specify a different type.", "4"], - [0, 0, 0, "Unexpected any. Specify a different type.", "5"] + [0, 0, 0, "Do not use any type assertions.", "3"], + [0, 0, 0, "Do not use any type assertions.", "4"], + [0, 0, 0, "Unexpected any. Specify a different type.", "5"], + [0, 0, 0, "Unexpected any. Specify a different type.", "6"], + [0, 0, 0, "Unexpected any. Specify a different type.", "7"] + ], + "public/app/features/transformers/spatial/spatialTransformer.test.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/dataframe/processDataFrame\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/ids\' import is restricted from being used by a pattern. Import from the public export instead.", "1"] ], "public/app/features/transformers/suggestionsInput/SuggestionsInput.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], @@ -6142,6 +6298,9 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"] ], + "public/app/plugins/datasource/azuremonitor/__mocks__/utils.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/types/data\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/plugins/datasource/azuremonitor/azureMetadata/index.ts:5381": [ [0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"], [0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"] @@ -6312,6 +6471,9 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "1"], [0, 0, 0, "Unexpected any. Specify a different type.", "2"] ], + "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchMetricsQueryRunner.test.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/datetime/moment_wrapper\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/plugins/datasource/cloudwatch/types.ts:5381": [ [0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"], @@ -6334,9 +6496,9 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use any type assertions.", "1"] ], "public/app/plugins/datasource/elasticsearch/ElasticResponse.ts:5381": [ - [0, 0, 0, "Do not use any type assertions.", "0"], + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/convertFieldType\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"], - [0, 0, 0, "Unexpected any. Specify a different type.", "2"], + [0, 0, 0, "Do not use any type assertions.", "2"], [0, 0, 0, "Unexpected any. Specify a different type.", "3"], [0, 0, 0, "Unexpected any. Specify a different type.", "4"], [0, 0, 0, "Unexpected any. Specify a different type.", "5"], @@ -6365,7 +6527,8 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "28"], [0, 0, 0, "Unexpected any. Specify a different type.", "29"], [0, 0, 0, "Unexpected any. Specify a different type.", "30"], - [0, 0, 0, "Unexpected any. Specify a different type.", "31"] + [0, 0, 0, "Unexpected any. Specify a different type.", "31"], + [0, 0, 0, "Unexpected any. Specify a different type.", "32"] ], "public/app/plugins/datasource/elasticsearch/LanguageProvider.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], @@ -6740,15 +6903,22 @@ exports[`better eslint`] = { [0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"] ], "public/app/plugins/panel/barchart/bars.ts:5381": [ - [0, 0, 0, "Do not use any type assertions.", "0"] + [0, 0, 0, "\'@grafana/data/src/themes/colorManipulator\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "Do not use any type assertions.", "1"] ], "public/app/plugins/panel/barchart/quadtree.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], + "public/app/plugins/panel/barchart/utils.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/field/fieldState\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/plugins/panel/candlestick/CandlestickPanel.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"] ], + "public/app/plugins/panel/candlestick/fields.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/joinDataFrames\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/plugins/panel/candlestick/types.ts:5381": [ [0, 0, 0, "Do not re-export imported variable (\`CandleStyle\`)", "0"], [0, 0, 0, "Do not re-export imported variable (\`CandlestickColors\`)", "1"], @@ -6759,6 +6929,28 @@ exports[`better eslint`] = { [0, 0, 0, "Do not re-export imported variable (\`VizDisplayMode\`)", "6"], [0, 0, 0, "Do not re-export imported variable (\`defaultCandlestickColors\`)", "7"] ], + "public/app/plugins/panel/canvas/components/CanvasTooltip.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/types/action\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], + "public/app/plugins/panel/canvas/editor/connectionEditor.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/utils/OptionsUIBuilders\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], + "public/app/plugins/panel/canvas/editor/element/elementEditor.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/utils/OptionsUIBuilders\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], + "public/app/plugins/panel/canvas/editor/inline/InlineEditBody.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/panel/PanelPlugin\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "\'@grafana/data/src/utils/OptionsUIBuilders\' import is restricted from being used by a pattern. Import from the public export instead.", "1"] + ], + "public/app/plugins/panel/canvas/editor/layer/layerEditor.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/utils/OptionsUIBuilders\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], + "public/app/plugins/panel/canvas/editor/options.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/panel/PanelPlugin\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], + "public/app/plugins/panel/datagrid/components/DatagridContextMenu.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/convertFieldType\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/plugins/panel/debug/CursorView.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"] @@ -6771,9 +6963,10 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], "public/app/plugins/panel/geomap/components/MarkersLegend.tsx:5381": [ - [0, 0, 0, "Do not use any type assertions.", "0"], + [0, 0, 0, "\'@grafana/data/src/field/scale\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"], - [0, 0, 0, "Unexpected any. Specify a different type.", "2"] + [0, 0, 0, "Do not use any type assertions.", "2"], + [0, 0, 0, "Unexpected any. Specify a different type.", "3"] ], "public/app/plugins/panel/geomap/editor/GeomapStyleRulesEditor.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] @@ -6799,6 +6992,9 @@ exports[`better eslint`] = { "public/app/plugins/panel/geomap/editor/StyleRuleEditor.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], + "public/app/plugins/panel/geomap/editor/layerEditor.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/utils/OptionsUIBuilders\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/plugins/panel/geomap/layers/basemaps/esri.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], @@ -6806,7 +7002,8 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use any type assertions.", "0"] ], "public/app/plugins/panel/geomap/layers/data/routeLayer.tsx:5381": [ - [0, 0, 0, "Do not use any type assertions.", "0"] + [0, 0, 0, "\'@grafana/data/src/themes/colorManipulator\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "Do not use any type assertions.", "1"] ], "public/app/plugins/panel/geomap/layers/registry.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], @@ -6819,6 +7016,9 @@ exports[`better eslint`] = { "public/app/plugins/panel/geomap/types.ts:5381": [ [0, 0, 0, "Do not re-export imported variable (\`./panelcfg.gen\`)", "0"] ], + "public/app/plugins/panel/geomap/utils/checkFeatureMatchesStyleRule.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/matchers/compareValues\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/plugins/panel/geomap/utils/layers.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], @@ -6859,12 +7059,27 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use any type assertions.", "15"], [0, 0, 0, "Do not use any type assertions.", "16"] ], + "public/app/plugins/panel/histogram/Histogram.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/histogram\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], + "public/app/plugins/panel/histogram/HistogramPanel.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/histogram\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], + "public/app/plugins/panel/histogram/module.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/histogram\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], + "public/app/plugins/panel/histogram/utils.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/histogram\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/plugins/panel/live/LivePanel.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], "public/app/plugins/panel/logs/LogsPanel.test.tsx:5381": [ [0, 0, 0, "* import is invalid because \'Layout,HorizontalGroup,VerticalGroup\' from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"] ], + "public/app/plugins/panel/logs/LogsPanel.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/datetime/rangeutil\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/plugins/panel/logs/types.ts:5381": [ [0, 0, 0, "Do not re-export imported variable (\`./panelcfg.gen\`)", "0"] ], @@ -6898,6 +7113,9 @@ exports[`better eslint`] = { "public/app/plugins/panel/stat/StatMigrations.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], + "public/app/plugins/panel/stat/StatPanel.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/field/fieldOverrides\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/plugins/panel/state-timeline/migrations.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"] @@ -6906,10 +7124,11 @@ exports[`better eslint`] = { [0, 0, 0, "\'VerticalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"] ], "public/app/plugins/panel/table/migrations.ts:5381": [ - [0, 0, 0, "Unexpected any. Specify a different type.", "0"], + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/reduce\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"], [0, 0, 0, "Unexpected any. Specify a different type.", "2"], - [0, 0, 0, "Unexpected any. Specify a different type.", "3"] + [0, 0, 0, "Unexpected any. Specify a different type.", "3"], + [0, 0, 0, "Unexpected any. Specify a different type.", "4"] ], "public/app/plugins/panel/text/textPanelMigrationHandler.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] @@ -6948,17 +7167,31 @@ exports[`better eslint`] = { [0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"] ], + "public/app/plugins/panel/timeseries/utils.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/convertFieldType\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/nulls/nullInsertThreshold\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/nulls/nullToValue\' import is restricted from being used by a pattern. Import from the public export instead.", "2"] + ], + "public/app/plugins/panel/trend/TrendPanel.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/transformations/transformers/joinDataFrames\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/plugins/panel/xychart/SeriesEditor.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"], [0, 0, 0, "Do not use any type assertions.", "2"], [0, 0, 0, "Do not use any type assertions.", "3"] ], + "public/app/plugins/panel/xychart/XYChartPanel.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/themes/colorManipulator\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], + "public/app/plugins/panel/xychart/XYChartTooltip.tsx:5381": [ + [0, 0, 0, "\'@grafana/data/src/themes/colorManipulator\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + ], "public/app/plugins/panel/xychart/migrations.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], "public/app/plugins/panel/xychart/scatter.ts:5381": [ - [0, 0, 0, "Do not use any type assertions.", "0"], + [0, 0, 0, "\'@grafana/data/src/themes/colorManipulator\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"], [0, 0, 0, "Do not use any type assertions.", "2"], [0, 0, 0, "Do not use any type assertions.", "3"], @@ -6972,10 +7205,14 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use any type assertions.", "11"], [0, 0, 0, "Do not use any type assertions.", "12"], [0, 0, 0, "Do not use any type assertions.", "13"], - [0, 0, 0, "Unexpected any. Specify a different type.", "14"], + [0, 0, 0, "Do not use any type assertions.", "14"], [0, 0, 0, "Unexpected any. Specify a different type.", "15"], [0, 0, 0, "Unexpected any. Specify a different type.", "16"], - [0, 0, 0, "Unexpected any. Specify a different type.", "17"] + [0, 0, 0, "Unexpected any. Specify a different type.", "17"], + [0, 0, 0, "Unexpected any. Specify a different type.", "18"] + ], + "public/app/plugins/panel/xychart/utils.ts:5381": [ + [0, 0, 0, "\'@grafana/data/src/field/fieldState\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] ], "public/app/plugins/sdk.ts:5381": [ [0, 0, 0, "Do not re-export imported variable (\`loadPluginCss\`)", "0"] diff --git a/packages/grafana-data/package.json b/packages/grafana-data/package.json index aad57fcef43..c33053087f2 100644 --- a/packages/grafana-data/package.json +++ b/packages/grafana-data/package.json @@ -15,26 +15,6 @@ }, "main": "src/index.ts", "types": "src/index.ts", - "module": "src/index.ts", - "exports": { - "./package.json": "./package.json", - ".": { - "import": "./src/index.ts", - "require": "./src/index.ts" - }, - "./internal": { - "import": "./src/internal/index.ts", - "require": "./src/internal/index.ts" - }, - "./unstable": { - "import": "./src/unstable.ts", - "require": "./src/unstable.ts" - }, - "./test": { - "import": "./test/index.ts", - "require": "./test/index.ts" - } - }, "publishConfig": { "main": "./dist/cjs/index.cjs", "module": "./dist/esm/index.mjs", diff --git a/packages/grafana-data/src/internal/index.ts b/packages/grafana-data/src/internal/index.ts deleted file mode 100644 index c0e52d01c67..00000000000 --- a/packages/grafana-data/src/internal/index.ts +++ /dev/null @@ -1,100 +0,0 @@ -/** - * This file is used to share internal grafana/data code with Grafana core. - * Note that these exports are also used within Enterprise. - * - * Through the exports declared in package.json we can import this code in core Grafana and the grafana/data - * package will continue to be able to access all code when it's published to npm as it's private to the package. - * - * During the yarn pack lifecycle the exports[./internal] property is deleted from the package.json - * preventing the code from being importable by plugins or other npm packages making it truly "internal". - * - */ - -export { actionsOverrideProcessor } from '../field/overrides/processors'; -export { nullToUndefThreshold } from '../transformations/transformers/nulls/nullToUndefThreshold'; -export { applyNullInsertThreshold } from '../transformations/transformers/nulls/nullInsertThreshold'; -export { - NULL_EXPAND, - NULL_REMOVE, - NULL_RETAIN, - isLikelyAscendingVector, - maybeSortFrame, -} from '../transformations/transformers/joinDataFrames'; -export { ConcatenateFrameNameMode, type ConcatenateTransformerOptions } from '../transformations/transformers/concat'; -export { - type ConvertFieldTypeOptions, - type ConvertFieldTypeTransformerOptions, - convertFieldType, -} from '../transformations/transformers/convertFieldType'; -export { type FilterFieldsByNameTransformerOptions } from '../transformations/transformers/filterByName'; -export { type FilterFramesByRefIdTransformerOptions } from '../transformations/transformers/filterByRefId'; -export { FormatStringOutput, type FormatStringTransformerOptions } from '../transformations/transformers/formatString'; -export { organizeFieldsTransformer } from '../transformations/transformers/organize'; -export { labelsToFieldsTransformer } from '../transformations/transformers/labelsToFields'; -export { type FormatTimeTransformerOptions } from '../transformations/transformers/formatTime'; -export { - type GroupByFieldOptions, - GroupByOperationID, - type GroupByTransformerOptions, -} from '../transformations/transformers/groupBy'; -export { - type GroupToNestedTableTransformerOptions, - SHOW_NESTED_HEADERS_DEFAULT, -} from '../transformations/transformers/groupToNestedTable'; -export { - type BinaryValue, - type BinaryOptions, - CalculateFieldMode, - type CalculateFieldTransformerOptions, - getNameFromOptions, - defaultWindowOptions, - checkBinaryValueType, - type CumulativeOptions, - type ReduceOptions, - type UnaryOptions, - WindowAlignment, - type WindowOptions, - WindowSizeMode, -} from '../transformations/transformers/calculateField'; -export { type SeriesToRowsTransformerOptions } from '../transformations/transformers/seriesToRows'; -export { histogramFieldInfo, type HistogramTransformerInputs } from '../transformations/transformers/histogram'; -export { type JoinByFieldOptions, JoinMode } from '../transformations/transformers/joinByField'; -export { LabelsToFieldsMode, type LabelsToFieldsOptions } from '../transformations/transformers/labelsToFields'; -export { type LimitTransformerOptions } from '../transformations/transformers/limit'; -export { type MergeTransformerOptions } from '../transformations/transformers/merge'; -export { ReduceTransformerMode, type ReduceTransformerOptions } from '../transformations/transformers/reduce'; -export { createOrderFieldsComparer } from '../transformations/transformers/order'; -export { type RenameByRegexTransformerOptions } from '../transformations/transformers/renameByRegex'; -export { type OrganizeFieldsTransformerOptions } from '../transformations/transformers/organize'; -export { compareValues } from '../transformations/matchers/compareValues'; -export { - type SortByField, - type SortByTransformerOptions, - sortByTransformer, -} from '../transformations/transformers/sortBy'; -export { type TransposeTransformerOptions } from '../transformations/transformers/transpose'; -export { - type FilterByValueTransformerOptions, - FilterByValueMatch, - FilterByValueType, - type FilterByValueFilter, -} from '../transformations/transformers/filterByValue'; -export { getMatcherConfig } from '../transformations/transformers/filterByName'; -export { mockTransformationsRegistry } from '../utils/tests/mockTransformationsRegistry'; -export { noopTransformer } from '../transformations/transformers/noop'; -export { DataTransformerID } from '../transformations/transformers/ids'; - -export { mergeTransformer } from '../transformations/transformers/merge'; -export { getThemeById } from '../themes/registry'; -export { GrafanaEdition } from '../types/config'; -export { SIPrefix } from '../valueFormats/symbolFormatters'; - -export { type PluginAddedLinksConfigureFunc, type PluginExtensionEventHelpers } from '../types/pluginExtensions'; - -export { getStreamingFrameOptions } from '../dataframe/StreamingDataFrame'; -export { fieldIndexComparer } from '../field/fieldComparers'; -export { decoupleHideFromState } from '../field/fieldState'; -export { findNumericFieldMinMax } from '../field/fieldOverrides'; -export { type PanelOptionsSupplier } from '../panel/PanelPlugin'; -export { sanitize, sanitizeUrl } from '../text/sanitize'; -export { type NestedValueAccess, type NestedPanelOptions, isNestedPanelOptions } from '../utils/OptionsUIBuilders'; diff --git a/packages/grafana-data/src/panel/getPanelOptionsWithDefaults.test.ts b/packages/grafana-data/src/panel/getPanelOptionsWithDefaults.test.ts index f155696053d..01b42612f1d 100644 --- a/packages/grafana-data/src/panel/getPanelOptionsWithDefaults.test.ts +++ b/packages/grafana-data/src/panel/getPanelOptionsWithDefaults.test.ts @@ -11,7 +11,8 @@ import { ThresholdsMode, } from '@grafana/data'; -import { getPanelPlugin, mockStandardFieldConfigOptions } from '../../test'; +import { getPanelPlugin } from '../../test/__mocks__/pluginMocks'; +import { mockStandardFieldConfigOptions } from '../../test/helpers/fieldConfig'; import { getPanelOptionsWithDefaults, restoreCustomOverrideRules } from './getPanelOptionsWithDefaults'; diff --git a/packages/grafana-data/test/helpers/pluginMocks.ts b/packages/grafana-data/test/__mocks__/pluginMocks.ts similarity index 98% rename from packages/grafana-data/test/helpers/pluginMocks.ts rename to packages/grafana-data/test/__mocks__/pluginMocks.ts index 1fe23bb46f3..226d6eb87cb 100644 --- a/packages/grafana-data/test/helpers/pluginMocks.ts +++ b/packages/grafana-data/test/__mocks__/pluginMocks.ts @@ -1,7 +1,7 @@ import { defaultsDeep } from 'lodash'; import { ComponentType } from 'react'; -import { PanelPluginMeta, PluginMeta, PluginType, PanelPlugin, PanelProps } from '../../'; +import { PanelPluginMeta, PluginMeta, PluginType, PanelPlugin, PanelProps } from '../../src'; export const getMockPlugins = (amount: number): PluginMeta[] => { const plugins: PluginMeta[] = []; diff --git a/packages/grafana-data/test/index.ts b/packages/grafana-data/test/index.ts deleted file mode 100644 index c6f6494b213..00000000000 --- a/packages/grafana-data/test/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { getMockPlugin, getMockPlugins, getPanelPlugin } from './helpers/pluginMocks'; -export { mockStandardFieldConfigOptions } from './helpers/fieldConfig'; diff --git a/packages/grafana-prometheus/src/querybuilder/operationUtils.ts b/packages/grafana-prometheus/src/querybuilder/operationUtils.ts index 36b9a3f6bd8..bf5bc98c0ad 100644 --- a/packages/grafana-prometheus/src/querybuilder/operationUtils.ts +++ b/packages/grafana-prometheus/src/querybuilder/operationUtils.ts @@ -2,7 +2,7 @@ import { capitalize } from 'lodash'; import pluralize from 'pluralize'; -import { SelectableValue } from '@grafana/data'; +import { SelectableValue } from '@grafana/data/src'; import { LabelParamEditor } from './components/LabelParamEditor'; import { diff --git a/public/app/core/components/GraphNG/utils.ts b/public/app/core/components/GraphNG/utils.ts index 34757b4d81a..b0c4368f3bb 100644 --- a/public/app/core/components/GraphNG/utils.ts +++ b/public/app/core/components/GraphNG/utils.ts @@ -1,5 +1,7 @@ -import { DataFrame, Field, FieldType, outerJoinDataFrames, TimeRange, applyNullInsertThreshold } from '@grafana/data'; -import { NULL_EXPAND, NULL_REMOVE, NULL_RETAIN, nullToUndefThreshold } from '@grafana/data/internal'; +import { DataFrame, Field, FieldType, outerJoinDataFrames, TimeRange } from '@grafana/data'; +import { NULL_EXPAND, NULL_REMOVE, NULL_RETAIN } from '@grafana/data/src/transformations/transformers/joinDataFrames'; +import { applyNullInsertThreshold } from '@grafana/data/src/transformations/transformers/nulls/nullInsertThreshold'; +import { nullToUndefThreshold } from '@grafana/data/src/transformations/transformers/nulls/nullToUndefThreshold'; import { GraphDrawStyle } from '@grafana/schema'; import { XYFieldMatchers } from './types'; diff --git a/public/app/core/components/OptionsUI/registry.tsx b/public/app/core/components/OptionsUI/registry.tsx index d1c51c96de8..da20681e556 100644 --- a/public/app/core/components/OptionsUI/registry.tsx +++ b/public/app/core/components/OptionsUI/registry.tsx @@ -29,7 +29,7 @@ import { Action, DataLinksFieldConfigSettings, } from '@grafana/data'; -import { actionsOverrideProcessor } from '@grafana/data/internal'; +import { actionsOverrideProcessor } from '@grafana/data/src/field/overrides/processors'; import { FieldConfig } from '@grafana/schema'; import { RadioButtonGroup, TimeZonePicker, Switch } from '@grafana/ui'; import { FieldNamePicker } from '@grafana/ui/internal'; diff --git a/public/app/core/components/TimelineChart/timeline.ts b/public/app/core/components/TimelineChart/timeline.ts index 8fa0a8faef1..68acea164f6 100644 --- a/public/app/core/components/TimelineChart/timeline.ts +++ b/public/app/core/components/TimelineChart/timeline.ts @@ -1,6 +1,7 @@ import uPlot, { Series } from 'uplot'; -import { GrafanaTheme2, TimeRange, colorManipulator } from '@grafana/data'; +import { GrafanaTheme2, TimeRange } from '@grafana/data'; +import { alpha } from '@grafana/data/src/themes/colorManipulator'; import { TimelineValueAlignment, VisibilityMode } from '@grafana/schema'; import { FIXED_UNIT } from '@grafana/ui'; import { distribute, SPACE_BETWEEN } from 'app/plugins/panel/barchart/distribute'; @@ -532,5 +533,5 @@ function getFillColor(fieldConfig: { fillOpacity?: number; lineWidth?: number }, } const opacityPercent = (fieldConfig.fillOpacity ?? 100) / 100; - return colorManipulator.alpha(color, opacityPercent); + return alpha(color, opacityPercent); } diff --git a/public/app/core/components/TimelineChart/utils.ts b/public/app/core/components/TimelineChart/utils.ts index a9af674a839..bf38c4bc5c5 100644 --- a/public/app/core/components/TimelineChart/utils.ts +++ b/public/app/core/components/TimelineChart/utils.ts @@ -18,10 +18,10 @@ import { outerJoinDataFrames, ValueMapping, ThresholdsConfig, - applyNullInsertThreshold, - nullToValue, } from '@grafana/data'; -import { maybeSortFrame, NULL_RETAIN } from '@grafana/data/internal'; +import { maybeSortFrame, NULL_RETAIN } from '@grafana/data/src/transformations/transformers/joinDataFrames'; +import { applyNullInsertThreshold } from '@grafana/data/src/transformations/transformers/nulls/nullInsertThreshold'; +import { nullToValue } from '@grafana/data/src/transformations/transformers/nulls/nullToValue'; import { VizLegendOptions, AxisPlacement, diff --git a/public/app/core/services/echo/backends/grafana-javascript-agent/GrafanaJavascriptAgentBackend.test.ts b/public/app/core/services/echo/backends/grafana-javascript-agent/GrafanaJavascriptAgentBackend.test.ts index ca92345ccac..5ee5b184736 100644 --- a/public/app/core/services/echo/backends/grafana-javascript-agent/GrafanaJavascriptAgentBackend.test.ts +++ b/public/app/core/services/echo/backends/grafana-javascript-agent/GrafanaJavascriptAgentBackend.test.ts @@ -1,5 +1,5 @@ import { BuildInfo } from '@grafana/data'; -import { GrafanaEdition } from '@grafana/data/internal'; +import { GrafanaEdition } from '@grafana/data/src/types/config'; import { Faro, Instrumentation } from '@grafana/faro-core'; import * as faroWebSdkModule from '@grafana/faro-web-sdk'; import { BrowserConfig, FetchTransport } from '@grafana/faro-web-sdk'; diff --git a/public/app/core/services/theme.ts b/public/app/core/services/theme.ts index 30d63375f6b..b244b95e012 100644 --- a/public/app/core/services/theme.ts +++ b/public/app/core/services/theme.ts @@ -1,4 +1,4 @@ -import { getThemeById } from '@grafana/data/internal'; +import { getThemeById } from '@grafana/data/src/themes/registry'; import { ThemeChangedEvent } from '@grafana/runtime'; import appEvents from '../app_events'; diff --git a/public/app/core/utils/explore.test.ts b/public/app/core/utils/explore.test.ts index 011380fed79..76da92421a9 100644 --- a/public/app/core/utils/explore.test.ts +++ b/public/app/core/utils/explore.test.ts @@ -1,12 +1,5 @@ -import { - DataSourceApi, - dateTime, - ExploreUrlState, - GrafanaConfig, - locationUtil, - LogsSortOrder, - serializeStateToUrlParam, -} from '@grafana/data'; +import { DataSourceApi, dateTime, ExploreUrlState, GrafanaConfig, locationUtil, LogsSortOrder } from '@grafana/data'; +import { serializeStateToUrlParam } from '@grafana/data/src/utils/url'; import { config } from '@grafana/runtime'; import { DataQuery } from '@grafana/schema'; import { RefreshPicker } from '@grafana/ui'; diff --git a/public/app/core/utils/richHistory.ts b/public/app/core/utils/richHistory.ts index 8816613a51b..b99a16f5ceb 100644 --- a/public/app/core/utils/richHistory.ts +++ b/public/app/core/utils/richHistory.ts @@ -1,13 +1,7 @@ import { omit } from 'lodash'; -import { - DataQuery, - DataSourceApi, - dateTimeFormat, - ExploreUrlState, - urlUtil, - serializeStateToUrlParam, -} from '@grafana/data'; +import { DataQuery, DataSourceApi, dateTimeFormat, ExploreUrlState, urlUtil } from '@grafana/data'; +import { serializeStateToUrlParam } from '@grafana/data/src/utils/url'; import { getDataSourceSrv } from '@grafana/runtime'; import { notifyApp } from 'app/core/actions'; import { createErrorNotification, createWarningNotification } from 'app/core/copy/appNotification'; diff --git a/public/app/features/admin/UserListPublicDashboardPage/DashboardsListModalButton.tsx b/public/app/features/admin/UserListPublicDashboardPage/DashboardsListModalButton.tsx index 87d3b1fe591..cc0284d753d 100644 --- a/public/app/features/admin/UserListPublicDashboardPage/DashboardsListModalButton.tsx +++ b/public/app/features/admin/UserListPublicDashboardPage/DashboardsListModalButton.tsx @@ -1,6 +1,6 @@ import { css, cx } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data'; +import { GrafanaTheme2 } from '@grafana/data/src'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors/src'; import { config } from '@grafana/runtime'; import { Button, LoadingPlaceholder, Modal, ModalsController, useStyles2 } from '@grafana/ui'; diff --git a/public/app/features/admin/UserListPublicDashboardPage/DeleteUserModalButton.tsx b/public/app/features/admin/UserListPublicDashboardPage/DeleteUserModalButton.tsx index fa33265f205..1ca1f8d6656 100644 --- a/public/app/features/admin/UserListPublicDashboardPage/DeleteUserModalButton.tsx +++ b/public/app/features/admin/UserListPublicDashboardPage/DeleteUserModalButton.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data'; +import { GrafanaTheme2 } from '@grafana/data/src'; import { config } from '@grafana/runtime'; import { Button, Modal, ModalsController, useStyles2 } from '@grafana/ui'; import { Trans, t } from 'app/core/internationalization'; diff --git a/public/app/features/alerting/unified/GrafanaRuleQueryViewer.tsx b/public/app/features/alerting/unified/GrafanaRuleQueryViewer.tsx index b7946517a41..b591ece380d 100644 --- a/public/app/features/alerting/unified/GrafanaRuleQueryViewer.tsx +++ b/public/app/features/alerting/unified/GrafanaRuleQueryViewer.tsx @@ -2,7 +2,8 @@ import { css, cx } from '@emotion/css'; import { keyBy, startCase, uniqueId } from 'lodash'; import * as React from 'react'; -import { DataSourceInstanceSettings, GrafanaTheme2, PanelData, rangeUtil, urlUtil } from '@grafana/data'; +import { DataSourceInstanceSettings, GrafanaTheme2, PanelData, urlUtil } from '@grafana/data'; +import { secondsToHms } from '@grafana/data/src/datetime/rangeutil'; import { config } from '@grafana/runtime'; import { DataSourceRef } from '@grafana/schema'; import { Preview } from '@grafana/sql/src/components/visual-query-builder/Preview'; @@ -122,7 +123,7 @@ export function QueryPreview({ if (relativeTimeRange) { headerItems.push( - {rangeUtil.secondsToHms(relativeTimeRange.from)} to now + {secondsToHms(relativeTimeRange.from)} to now ); } diff --git a/public/app/features/alerting/unified/components/GrafanaAlertmanagerDeliveryWarning.tsx b/public/app/features/alerting/unified/components/GrafanaAlertmanagerDeliveryWarning.tsx index b16c50bbb44..239de85bd2d 100644 --- a/public/app/features/alerting/unified/components/GrafanaAlertmanagerDeliveryWarning.tsx +++ b/public/app/features/alerting/unified/components/GrafanaAlertmanagerDeliveryWarning.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data'; +import { GrafanaTheme2 } from '@grafana/data/src'; import { Alert, useStyles2 } from '@grafana/ui'; import { AlertmanagerChoice } from '../../../../plugins/datasource/alertmanager/types'; diff --git a/public/app/features/alerting/unified/components/rule-editor/CloudAlertPreview.tsx b/public/app/features/alerting/unified/components/rule-editor/CloudAlertPreview.tsx index b2fa4fa8297..a9d67203d14 100644 --- a/public/app/features/alerting/unified/components/rule-editor/CloudAlertPreview.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/CloudAlertPreview.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { DataFrame, GrafanaTheme2 } from '@grafana/data'; +import { DataFrame, GrafanaTheme2 } from '@grafana/data/src'; import { Icon, TagList, Tooltip, useStyles2 } from '@grafana/ui'; import { labelsToTags } from '../../utils/labels'; diff --git a/public/app/features/alerting/unified/components/rule-editor/DashboardPicker.tsx b/public/app/features/alerting/unified/components/rule-editor/DashboardPicker.tsx index 4428ba2e1a9..14eea33da9d 100644 --- a/public/app/features/alerting/unified/components/rule-editor/DashboardPicker.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/DashboardPicker.tsx @@ -5,7 +5,7 @@ import { useDebounce } from 'react-use'; import AutoSizer from 'react-virtualized-auto-sizer'; import { FixedSizeList } from 'react-window'; -import { GrafanaTheme2 } from '@grafana/data'; +import { GrafanaTheme2 } from '@grafana/data/src'; import { Alert, Button, diff --git a/public/app/features/alerting/unified/components/rule-editor/QueryOptions.tsx b/public/app/features/alerting/unified/components/rule-editor/QueryOptions.tsx index 215ae1d3646..1a046f8e2a3 100644 --- a/public/app/features/alerting/unified/components/rule-editor/QueryOptions.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/QueryOptions.tsx @@ -1,7 +1,8 @@ import { css } from '@emotion/css'; import { useState } from 'react'; -import { GrafanaTheme2, RelativeTimeRange, dateTime, getDefaultRelativeTimeRange, rangeUtil } from '@grafana/data'; +import { GrafanaTheme2, RelativeTimeRange, dateTime, getDefaultRelativeTimeRange } from '@grafana/data'; +import { relativeToTimeRange } from '@grafana/data/src/datetime/rangeutil'; import { Icon, InlineField, RelativeTimeRangePicker, Toggletip, clearButtonStyles, useStyles2 } from '@grafana/ui'; import { AlertQuery } from 'app/types/unified-alerting-dto'; @@ -26,7 +27,7 @@ export const QueryOptions = ({ const [showOptions, setShowOptions] = useState(false); - const timeRange = query.relativeTimeRange ? rangeUtil.relativeToTimeRange(query.relativeTimeRange) : undefined; + const timeRange = query.relativeTimeRange ? relativeToTimeRange(query.relativeTimeRange) : undefined; return ( <> diff --git a/public/app/features/alerting/unified/components/rule-editor/rule-types/RuleTypePicker.tsx b/public/app/features/alerting/unified/components/rule-editor/rule-types/RuleTypePicker.tsx index 17cbdcfcd6e..ab41cd3121f 100644 --- a/public/app/features/alerting/unified/components/rule-editor/rule-types/RuleTypePicker.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/rule-types/RuleTypePicker.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import { isEmpty } from 'lodash'; -import { GrafanaTheme2 } from '@grafana/data'; +import { GrafanaTheme2 } from '@grafana/data/src'; import { Stack, useStyles2 } from '@grafana/ui'; import { useRulesSourcesWithRuler } from '../../../hooks/useRuleSourcesWithRuler'; diff --git a/public/app/features/alerting/unified/components/rules/AlertInstanceStateFilter.tsx b/public/app/features/alerting/unified/components/rules/AlertInstanceStateFilter.tsx index 29afb21fa2c..97cf310a478 100644 --- a/public/app/features/alerting/unified/components/rules/AlertInstanceStateFilter.tsx +++ b/public/app/features/alerting/unified/components/rules/AlertInstanceStateFilter.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import { capitalize } from 'lodash'; -import { GrafanaTheme2 } from '@grafana/data'; +import { GrafanaTheme2 } from '@grafana/data/src'; import { Label, RadioButtonGroup, Tag, useStyles2 } from '@grafana/ui'; import { GrafanaAlertState, PromAlertingRuleState } from 'app/types/unified-alerting-dto'; diff --git a/public/app/features/alerting/unified/components/rules/RuleConfigStatus.tsx b/public/app/features/alerting/unified/components/rules/RuleConfigStatus.tsx index ed3f96dc960..8b10c1388bf 100644 --- a/public/app/features/alerting/unified/components/rules/RuleConfigStatus.tsx +++ b/public/app/features/alerting/unified/components/rules/RuleConfigStatus.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import { useMemo } from 'react'; -import { GrafanaTheme2 } from '@grafana/data'; +import { GrafanaTheme2 } from '@grafana/data/src'; import { config } from '@grafana/runtime/src'; import { Icon, Tooltip, useStyles2 } from '@grafana/ui'; diff --git a/public/app/features/alerting/unified/components/rules/central-state-history/utils.ts b/public/app/features/alerting/unified/components/rules/central-state-history/utils.ts index d78688c1ab8..21b2548dac9 100644 --- a/public/app/features/alerting/unified/components/rules/central-state-history/utils.ts +++ b/public/app/features/alerting/unified/components/rules/central-state-history/utils.ts @@ -11,7 +11,7 @@ import { ThresholdsMode, getDisplayProcessor, } from '@grafana/data'; -import { fieldIndexComparer } from '@grafana/data/internal'; +import { fieldIndexComparer } from '@grafana/data/src/field/fieldComparers'; import { mapStateWithReasonToBaseState } from 'app/types/unified-alerting-dto'; import { labelsMatchMatchers } from '../../../utils/alertmanager'; diff --git a/public/app/features/alerting/unified/components/rules/state-history/useRuleHistoryRecords.tsx b/public/app/features/alerting/unified/components/rules/state-history/useRuleHistoryRecords.tsx index 613938eebb5..9f18e9bea2c 100644 --- a/public/app/features/alerting/unified/components/rules/state-history/useRuleHistoryRecords.tsx +++ b/public/app/features/alerting/unified/components/rules/state-history/useRuleHistoryRecords.tsx @@ -9,7 +9,7 @@ import { GrafanaTheme2, getDisplayProcessor, } from '@grafana/data'; -import { fieldIndexComparer } from '@grafana/data/internal'; +import { fieldIndexComparer } from '@grafana/data/src/field/fieldComparers'; import { MappingType, ThresholdsMode } from '@grafana/schema'; import { useTheme2 } from '@grafana/ui'; diff --git a/public/app/features/alerting/unified/home/PluginIntegrations.tsx b/public/app/features/alerting/unified/home/PluginIntegrations.tsx index 4a7d560da38..f07a0738934 100644 --- a/public/app/features/alerting/unified/home/PluginIntegrations.tsx +++ b/public/app/features/alerting/unified/home/PluginIntegrations.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data'; +import { GrafanaTheme2 } from '@grafana/data/'; import { Stack, Text, useStyles2 } from '@grafana/ui'; import { useAlertingHomePageExtensions } from '../plugins/useAlertingHomePageExtensions'; diff --git a/public/app/features/alerting/unified/styles/pagination.ts b/public/app/features/alerting/unified/styles/pagination.ts index 0a16b5ce7ee..f3d92f70662 100644 --- a/public/app/features/alerting/unified/styles/pagination.ts +++ b/public/app/features/alerting/unified/styles/pagination.ts @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data'; +import { GrafanaTheme2 } from '@grafana/data/src'; export const getPaginationStyles = (theme: GrafanaTheme2) => { return css({ diff --git a/public/app/features/alerting/unified/utils/misc.ts b/public/app/features/alerting/unified/utils/misc.ts index 686194d24c6..c136c2aa883 100644 --- a/public/app/features/alerting/unified/utils/misc.ts +++ b/public/app/features/alerting/unified/utils/misc.ts @@ -1,7 +1,7 @@ import { sortBy } from 'lodash'; import { Labels, UrlQueryMap } from '@grafana/data'; -import { GrafanaEdition } from '@grafana/data/internal'; +import { GrafanaEdition } from '@grafana/data/src/types/config'; import { config, isFetchError } from '@grafana/runtime'; import { DataSourceRef } from '@grafana/schema'; import { contextSrv } from 'app/core/services/context_srv'; diff --git a/public/app/features/alerting/unified/utils/routeTree.ts b/public/app/features/alerting/unified/utils/routeTree.ts index ba08bfd7526..6aa80dcb030 100644 --- a/public/app/features/alerting/unified/utils/routeTree.ts +++ b/public/app/features/alerting/unified/utils/routeTree.ts @@ -5,7 +5,7 @@ import { produce } from 'immer'; import { omit } from 'lodash'; -import { arrayUtils } from '@grafana/data'; +import { insertAfterImmutably, insertBeforeImmutably } from '@grafana/data/src/utils/arrayUtils'; import { ROUTES_META_SYMBOL, Route, RouteWithID } from 'app/plugins/datasource/alertmanager/types'; import { @@ -109,12 +109,12 @@ export const addRouteToReferenceRoute = ( // insert new policy before / above the referenceRoute if (position === 'above') { - parentRoute.routes = arrayUtils.insertBeforeImmutably(parentRoute.routes ?? [], newRoute, positionInParent); + parentRoute.routes = insertBeforeImmutably(parentRoute.routes ?? [], newRoute, positionInParent); } // insert new policy after / below the referenceRoute if (position === 'below') { - parentRoute.routes = arrayUtils.insertAfterImmutably(parentRoute.routes ?? [], newRoute, positionInParent); + parentRoute.routes = insertAfterImmutably(parentRoute.routes ?? [], newRoute, positionInParent); } }); }; diff --git a/public/app/features/alerting/unified/utils/time.ts b/public/app/features/alerting/unified/utils/time.ts index 7e9eeea528a..14a52ab677f 100644 --- a/public/app/features/alerting/unified/utils/time.ts +++ b/public/app/features/alerting/unified/utils/time.ts @@ -1,4 +1,4 @@ -import { rangeUtil } from '@grafana/data'; +import { describeInterval } from '@grafana/data/src/datetime/rangeutil'; import { TimeOptions } from '../types/time'; @@ -18,7 +18,7 @@ export function parseInterval(value: string): [number, string] { } export function intervalToSeconds(interval: string): number { - const { sec, count } = rangeUtil.describeInterval(interval); + const { sec, count } = describeInterval(interval); return sec * count; } diff --git a/public/app/features/annotations/components/StandardAnnotationQueryEditor.test.tsx b/public/app/features/annotations/components/StandardAnnotationQueryEditor.test.tsx index c4126cb6aa1..c347a069369 100644 --- a/public/app/features/annotations/components/StandardAnnotationQueryEditor.test.tsx +++ b/public/app/features/annotations/components/StandardAnnotationQueryEditor.test.tsx @@ -1,6 +1,6 @@ import { render } from '@testing-library/react'; -import { AnnotationQuery, DataSourceApi, DataSourceInstanceSettings } from '@grafana/data'; +import { AnnotationQuery, DataSourceApi, DataSourceInstanceSettings } from '@grafana/data/src'; import StandardAnnotationQueryEditor, { Props as EditorProps } from './StandardAnnotationQueryEditor'; diff --git a/public/app/features/auth-config/AuthProvidersListPage.tsx b/public/app/features/auth-config/AuthProvidersListPage.tsx index 9ae5786703a..717906f0f3a 100644 --- a/public/app/features/auth-config/AuthProvidersListPage.tsx +++ b/public/app/features/auth-config/AuthProvidersListPage.tsx @@ -1,7 +1,7 @@ import { JSX, useEffect, useState } from 'react'; import { connect, ConnectedProps } from 'react-redux'; -import { GrafanaEdition } from '@grafana/data/internal'; +import { GrafanaEdition } from '@grafana/data/src/types/config'; import { reportInteraction } from '@grafana/runtime'; import { Grid, TextLink, ToolbarButton } from '@grafana/ui'; import { Page } from 'app/core/components/Page/Page'; diff --git a/public/app/features/canvas/element.ts b/public/app/features/canvas/element.ts index 7f987fed873..1d6c39dba0d 100644 --- a/public/app/features/canvas/element.ts +++ b/public/app/features/canvas/element.ts @@ -1,7 +1,7 @@ import { ComponentType } from 'react'; import { DataLink, RegistryItem, Action } from '@grafana/data'; -import { PanelOptionsSupplier } from '@grafana/data/internal'; +import { PanelOptionsSupplier } from '@grafana/data/src/panel/PanelPlugin'; import { ColorDimensionConfig, ScaleDimensionConfig } from '@grafana/schema'; import { config } from 'app/core/config'; import { BackgroundConfig, Constraint, LineConfig, Placement } from 'app/plugins/panel/canvas/panelcfg.gen'; diff --git a/public/app/features/canvas/elements/button.tsx b/public/app/features/canvas/elements/button.tsx index 2b70fa66e3a..eb926056ace 100644 --- a/public/app/features/canvas/elements/button.tsx +++ b/public/app/features/canvas/elements/button.tsx @@ -1,7 +1,8 @@ import { css } from '@emotion/css'; import { useState } from 'react'; -import { GrafanaTheme2, PluginState } from '@grafana/data'; +import { GrafanaTheme2 } from '@grafana/data'; +import { PluginState } from '@grafana/data/src'; import { TextDimensionMode } from '@grafana/schema'; import { Button, Spinner, useStyles2 } from '@grafana/ui'; import { DimensionContext } from 'app/features/dimensions/context'; diff --git a/public/app/features/canvas/types.ts b/public/app/features/canvas/types.ts index 50b926779a6..1dd3f298e7a 100644 --- a/public/app/features/canvas/types.ts +++ b/public/app/features/canvas/types.ts @@ -1,4 +1,4 @@ -import { LinkModel } from '@grafana/data'; +import { LinkModel } from '@grafana/data/src'; import { ColorDimensionConfig, ResourceDimensionConfig, TextDimensionConfig } from '@grafana/schema'; import { BackgroundImageSize } from 'app/plugins/panel/canvas/panelcfg.gen'; diff --git a/public/app/features/dashboard-scene/inspect/HelpWizard/HelpWizard.test.tsx b/public/app/features/dashboard-scene/inspect/HelpWizard/HelpWizard.test.tsx index be4fbbb8692..276c71f61dd 100644 --- a/public/app/features/dashboard-scene/inspect/HelpWizard/HelpWizard.test.tsx +++ b/public/app/features/dashboard-scene/inspect/HelpWizard/HelpWizard.test.tsx @@ -2,7 +2,7 @@ import userEvent from '@testing-library/user-event'; import { render, screen } from 'test/test-utils'; import { FieldType, getDefaultTimeRange, LoadingState, toDataFrame } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { config } from '@grafana/runtime'; import { SceneQueryRunner, SceneTimeRange, VizPanel, VizPanelMenu } from '@grafana/scenes'; import { contextSrv } from 'app/core/services/context_srv'; diff --git a/public/app/features/dashboard-scene/inspect/InspectJsonTab.test.tsx b/public/app/features/dashboard-scene/inspect/InspectJsonTab.test.tsx index b49a61cd1b8..582e0855008 100644 --- a/public/app/features/dashboard-scene/inspect/InspectJsonTab.test.tsx +++ b/public/app/features/dashboard-scene/inspect/InspectJsonTab.test.tsx @@ -10,7 +10,7 @@ import { standardTransformersRegistry, toDataFrame, } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { setPluginImportUtils, setRunRequest } from '@grafana/runtime'; import { SceneCanvasText, SceneDataTransformer, SceneQueryRunner, VizPanel } from '@grafana/scenes'; import * as libpanels from 'app/features/library-panels/state/api'; diff --git a/public/app/features/dashboard-scene/pages/DashboardScenePage.test.tsx b/public/app/features/dashboard-scene/pages/DashboardScenePage.test.tsx index 90dc4a7de07..77551f16579 100644 --- a/public/app/features/dashboard-scene/pages/DashboardScenePage.test.tsx +++ b/public/app/features/dashboard-scene/pages/DashboardScenePage.test.tsx @@ -6,7 +6,7 @@ import { TestProvider } from 'test/helpers/TestProvider'; import { getGrafanaContextMock } from 'test/mocks/getGrafanaContextMock'; import { PanelProps } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { selectors } from '@grafana/e2e-selectors'; import { LocationServiceProvider, diff --git a/public/app/features/dashboard-scene/pages/PublicDashboardScenePage.test.tsx b/public/app/features/dashboard-scene/pages/PublicDashboardScenePage.test.tsx index b5c05c830b8..a8c109d261b 100644 --- a/public/app/features/dashboard-scene/pages/PublicDashboardScenePage.test.tsx +++ b/public/app/features/dashboard-scene/pages/PublicDashboardScenePage.test.tsx @@ -4,7 +4,7 @@ import { of } from 'rxjs'; import { render } from 'test/test-utils'; import { getDefaultTimeRange, LoadingState, PanelData, PanelProps } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors'; import { config, getPluginLinkExtensions, setPluginImportUtils, setRunRequest } from '@grafana/runtime'; import { Dashboard } from '@grafana/schema'; diff --git a/public/app/features/dashboard-scene/panel-edit/PanelDataPane/PanelDataQueriesTab.test.tsx b/public/app/features/dashboard-scene/panel-edit/PanelDataPane/PanelDataQueriesTab.test.tsx index c88d60a527e..c0131b6847d 100644 --- a/public/app/features/dashboard-scene/panel-edit/PanelDataPane/PanelDataQueriesTab.test.tsx +++ b/public/app/features/dashboard-scene/panel-edit/PanelDataPane/PanelDataQueriesTab.test.tsx @@ -15,7 +15,7 @@ import { TimeRange, toDataFrame, } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { selectors } from '@grafana/e2e-selectors'; import { config, locationService, setPluginExtensionsHook } from '@grafana/runtime'; import { PANEL_EDIT_LAST_USED_DATASOURCE } from 'app/features/dashboard/utils/dashboard'; diff --git a/public/app/features/dashboard-scene/panel-edit/PanelEditor.test.ts b/public/app/features/dashboard-scene/panel-edit/PanelEditor.test.ts index ee2bda935fd..fe263ee3bde 100644 --- a/public/app/features/dashboard-scene/panel-edit/PanelEditor.test.ts +++ b/public/app/features/dashboard-scene/panel-edit/PanelEditor.test.ts @@ -1,7 +1,7 @@ import { of } from 'rxjs'; import { DataQueryRequest, DataSourceApi, LoadingState, PanelPlugin } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { CancelActivationHandler, CustomVariable, diff --git a/public/app/features/dashboard-scene/panel-edit/PanelOptions.test.tsx b/public/app/features/dashboard-scene/panel-edit/PanelOptions.test.tsx index afc761b080b..3f54a519b70 100644 --- a/public/app/features/dashboard-scene/panel-edit/PanelOptions.test.tsx +++ b/public/app/features/dashboard-scene/panel-edit/PanelOptions.test.tsx @@ -3,7 +3,7 @@ import userEvent from '@testing-library/user-event'; import { render } from 'test/test-utils'; import { standardEditorsRegistry, standardFieldConfigEditorRegistry } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { selectors } from '@grafana/e2e-selectors'; import { VizPanel } from '@grafana/scenes'; import { getAllOptionEditors, getAllStandardFieldConfigs } from 'app/core/components/OptionsUI/registry'; diff --git a/public/app/features/dashboard-scene/scene/DashboardDatasourceBehaviour.test.tsx b/public/app/features/dashboard-scene/scene/DashboardDatasourceBehaviour.test.tsx index 55aac56789a..59a27eacaad 100644 --- a/public/app/features/dashboard-scene/scene/DashboardDatasourceBehaviour.test.tsx +++ b/public/app/features/dashboard-scene/scene/DashboardDatasourceBehaviour.test.tsx @@ -10,7 +10,7 @@ import { LoadingState, PanelData, } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { setPluginImportUtils } from '@grafana/runtime'; import { SceneDataTransformer, SceneFlexLayout, SceneQueryRunner, VizPanel } from '@grafana/scenes'; import { SHARED_DASHBOARD_QUERY, DASHBOARD_DATASOURCE_PLUGIN_ID } from 'app/plugins/datasource/dashboard/constants'; diff --git a/public/app/features/dashboard-scene/scene/DashboardLinksControls.tsx b/public/app/features/dashboard-scene/scene/DashboardLinksControls.tsx index db7fb59dad7..72a046fc6e5 100644 --- a/public/app/features/dashboard-scene/scene/DashboardLinksControls.tsx +++ b/public/app/features/dashboard-scene/scene/DashboardLinksControls.tsx @@ -1,4 +1,4 @@ -import { sanitizeUrl } from '@grafana/data/internal'; +import { sanitizeUrl } from '@grafana/data/src/text/sanitize'; import { selectors } from '@grafana/e2e-selectors'; import { sceneGraph } from '@grafana/scenes'; import { DashboardLink } from '@grafana/schema'; diff --git a/public/app/features/dashboard-scene/scene/DashboardSceneRenderer.test.tsx b/public/app/features/dashboard-scene/scene/DashboardSceneRenderer.test.tsx index 74c91e3037e..3f456078a7e 100644 --- a/public/app/features/dashboard-scene/scene/DashboardSceneRenderer.test.tsx +++ b/public/app/features/dashboard-scene/scene/DashboardSceneRenderer.test.tsx @@ -1,7 +1,7 @@ import { screen } from '@testing-library/react'; import { render } from 'test/test-utils'; -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { config, setPluginImportUtils } from '@grafana/runtime'; import { transformSaveModelToScene } from '../serialization/transformSaveModelToScene'; diff --git a/public/app/features/dashboard-scene/scene/LibraryPanelBehavior.test.tsx b/public/app/features/dashboard-scene/scene/LibraryPanelBehavior.test.tsx index 5d95b292cb4..b6eb6872566 100644 --- a/public/app/features/dashboard-scene/scene/LibraryPanelBehavior.test.tsx +++ b/public/app/features/dashboard-scene/scene/LibraryPanelBehavior.test.tsx @@ -1,7 +1,7 @@ import { of } from 'rxjs'; import { FieldType, LoadingState, PanelData, getDefaultTimeRange, toDataFrame } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { setPluginImportUtils, setRunRequest } from '@grafana/runtime'; import { SceneCanvasText, sceneGraph, SceneGridLayout, VizPanel } from '@grafana/scenes'; import { LibraryPanel } from '@grafana/schema'; diff --git a/public/app/features/dashboard-scene/scene/PanelMenuBehavior.test.tsx b/public/app/features/dashboard-scene/scene/PanelMenuBehavior.test.tsx index 182ebac330f..d0aa2f56b9f 100644 --- a/public/app/features/dashboard-scene/scene/PanelMenuBehavior.test.tsx +++ b/public/app/features/dashboard-scene/scene/PanelMenuBehavior.test.tsx @@ -8,7 +8,7 @@ import { toDataFrame, urlUtil, } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { config, getPluginLinkExtensions, locationService } from '@grafana/runtime'; import { LocalValueVariable, diff --git a/public/app/features/dashboard-scene/scene/layout-default/DashboardGridItem.test.tsx b/public/app/features/dashboard-scene/scene/layout-default/DashboardGridItem.test.tsx index 00458d505a9..ec13a7992c8 100644 --- a/public/app/features/dashboard-scene/scene/layout-default/DashboardGridItem.test.tsx +++ b/public/app/features/dashboard-scene/scene/layout-default/DashboardGridItem.test.tsx @@ -1,4 +1,4 @@ -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { setPluginImportUtils } from '@grafana/runtime'; import { SceneGridLayout, SceneVariableSet, TestVariable, VizPanel } from '@grafana/scenes'; import { ALL_VARIABLE_TEXT, ALL_VARIABLE_VALUE } from 'app/features/variables/constants'; diff --git a/public/app/features/dashboard-scene/scene/layout-default/RowRepeaterBehavior.test.tsx b/public/app/features/dashboard-scene/scene/layout-default/RowRepeaterBehavior.test.tsx index 28effcf18b5..843f58b5640 100644 --- a/public/app/features/dashboard-scene/scene/layout-default/RowRepeaterBehavior.test.tsx +++ b/public/app/features/dashboard-scene/scene/layout-default/RowRepeaterBehavior.test.tsx @@ -1,5 +1,5 @@ import { VariableRefresh } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { setPluginImportUtils } from '@grafana/runtime'; import { SceneCanvasText, diff --git a/public/app/features/dashboard-scene/scene/layout-rows/RowItemRepeaterBehavior.test.tsx b/public/app/features/dashboard-scene/scene/layout-rows/RowItemRepeaterBehavior.test.tsx index ca967ce3d06..ec5b4710089 100644 --- a/public/app/features/dashboard-scene/scene/layout-rows/RowItemRepeaterBehavior.test.tsx +++ b/public/app/features/dashboard-scene/scene/layout-rows/RowItemRepeaterBehavior.test.tsx @@ -1,5 +1,5 @@ import { VariableRefresh } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { setPluginImportUtils } from '@grafana/runtime'; import { SceneGridRow, diff --git a/public/app/features/dashboard-scene/serialization/angularMigration.test.ts b/public/app/features/dashboard-scene/serialization/angularMigration.test.ts index a9f63b34cf0..cda96b97e9c 100644 --- a/public/app/features/dashboard-scene/serialization/angularMigration.test.ts +++ b/public/app/features/dashboard-scene/serialization/angularMigration.test.ts @@ -1,5 +1,5 @@ import { PanelTypeChangedHandler } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { PanelModel } from 'app/features/dashboard/state/PanelModel'; import { getAngularPanelMigrationHandler } from './angularMigration'; diff --git a/public/app/features/dashboard-scene/serialization/transformSaveModelToScene.test.ts b/public/app/features/dashboard-scene/serialization/transformSaveModelToScene.test.ts index 546c8e95038..e74c3f21664 100644 --- a/public/app/features/dashboard-scene/serialization/transformSaveModelToScene.test.ts +++ b/public/app/features/dashboard-scene/serialization/transformSaveModelToScene.test.ts @@ -1,5 +1,5 @@ import { LoadingState } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { config } from '@grafana/runtime'; import { AdHocFiltersVariable, diff --git a/public/app/features/dashboard-scene/serialization/transformSceneToSaveModel.test.ts b/public/app/features/dashboard-scene/serialization/transformSceneToSaveModel.test.ts index f1ed038dfb5..9d6061e3c6f 100644 --- a/public/app/features/dashboard-scene/serialization/transformSceneToSaveModel.test.ts +++ b/public/app/features/dashboard-scene/serialization/transformSceneToSaveModel.test.ts @@ -13,7 +13,7 @@ import { toDataFrame, VariableSupportType, } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { getPluginLinkExtensions, setPluginImportUtils } from '@grafana/runtime'; import { MultiValueVariable, sceneGraph, SceneGridRow, VizPanel } from '@grafana/scenes'; import { Dashboard, LoadingState, Panel, RowPanel, VariableRefresh } from '@grafana/schema'; diff --git a/public/app/features/dashboard-scene/settings/VariablesEditView.test.tsx b/public/app/features/dashboard-scene/settings/VariablesEditView.test.tsx index 8c5f690518e..f3d93596d03 100644 --- a/public/app/features/dashboard-scene/settings/VariablesEditView.test.tsx +++ b/public/app/features/dashboard-scene/settings/VariablesEditView.test.tsx @@ -8,7 +8,7 @@ import { getDefaultTimeRange, toDataFrame, } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { setPluginImportUtils, setRunRequest } from '@grafana/runtime'; import { SceneVariableSet, diff --git a/public/app/features/dashboard-scene/sharing/ShareButton/share-externally/ShareExternally.test.tsx b/public/app/features/dashboard-scene/sharing/ShareButton/share-externally/ShareExternally.test.tsx index b3c7a22a257..07fdec6b6a1 100644 --- a/public/app/features/dashboard-scene/sharing/ShareButton/share-externally/ShareExternally.test.tsx +++ b/public/app/features/dashboard-scene/sharing/ShareButton/share-externally/ShareExternally.test.tsx @@ -2,7 +2,7 @@ import { screen, waitForElementToBeRemoved } from '@testing-library/react'; import { render } from 'test/test-utils'; import { getDefaultTimeRange, LoadingState } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors'; import { config, setPluginImportUtils } from '@grafana/runtime'; import { diff --git a/public/app/features/dashboard-scene/sharing/ShareDrawer/ShareDrawer.test.tsx b/public/app/features/dashboard-scene/sharing/ShareDrawer/ShareDrawer.test.tsx index 35eaec800d1..5e7e71ee6b3 100644 --- a/public/app/features/dashboard-scene/sharing/ShareDrawer/ShareDrawer.test.tsx +++ b/public/app/features/dashboard-scene/sharing/ShareDrawer/ShareDrawer.test.tsx @@ -1,7 +1,7 @@ import { act, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { selectors } from '@grafana/e2e-selectors'; import { locationService, setPluginImportUtils } from '@grafana/runtime'; import { SceneTimeRange, UrlSyncContextProvider } from '@grafana/scenes'; diff --git a/public/app/features/dashboard-scene/sharing/ShareLinkTab.test.tsx b/public/app/features/dashboard-scene/sharing/ShareLinkTab.test.tsx index d149d075e02..cded7ef3abe 100644 --- a/public/app/features/dashboard-scene/sharing/ShareLinkTab.test.tsx +++ b/public/app/features/dashboard-scene/sharing/ShareLinkTab.test.tsx @@ -3,7 +3,7 @@ import userEvent from '@testing-library/user-event'; import { advanceTo, clear } from 'jest-date-mock'; import { dateTime } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { selectors } from '@grafana/e2e-selectors'; import { config, locationService, setPluginImportUtils } from '@grafana/runtime'; import { SceneTimeRange, VizPanel } from '@grafana/scenes'; diff --git a/public/app/features/dashboard-scene/sharing/panel-share/SharePanelInternally.test.tsx b/public/app/features/dashboard-scene/sharing/panel-share/SharePanelInternally.test.tsx index d2cbfaa14f7..ac5daf5eac4 100644 --- a/public/app/features/dashboard-scene/sharing/panel-share/SharePanelInternally.test.tsx +++ b/public/app/features/dashboard-scene/sharing/panel-share/SharePanelInternally.test.tsx @@ -1,6 +1,6 @@ import { render, screen } from '@testing-library/react'; -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors'; import { config, setPluginImportUtils } from '@grafana/runtime'; import { SceneTimeRange, VizPanel } from '@grafana/scenes'; diff --git a/public/app/features/dashboard/components/DashboardPrompt/DashboardPrompt.test.tsx b/public/app/features/dashboard/components/DashboardPrompt/DashboardPrompt.test.tsx index 8da1d2bb549..021060699b4 100644 --- a/public/app/features/dashboard/components/DashboardPrompt/DashboardPrompt.test.tsx +++ b/public/app/features/dashboard/components/DashboardPrompt/DashboardPrompt.test.tsx @@ -1,4 +1,4 @@ -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { ContextSrv, setContextSrv } from '../../../../core/services/context_srv'; import { PanelModel } from '../../state/PanelModel'; diff --git a/public/app/features/dashboard/components/HelpWizard/HelpWizard.test.tsx b/public/app/features/dashboard/components/HelpWizard/HelpWizard.test.tsx index 2eb805aa87e..8fdc82a5dd8 100644 --- a/public/app/features/dashboard/components/HelpWizard/HelpWizard.test.tsx +++ b/public/app/features/dashboard/components/HelpWizard/HelpWizard.test.tsx @@ -1,7 +1,7 @@ import { render, screen } from '@testing-library/react'; import { FieldType, getDefaultTimeRange, LoadingState, toDataFrame } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { PanelModel } from '../../state/PanelModel'; diff --git a/public/app/features/dashboard/components/PanelEditor/OptionsPaneOptions.test.tsx b/public/app/features/dashboard/components/PanelEditor/OptionsPaneOptions.test.tsx index 91351c87a85..6387aac97a8 100644 --- a/public/app/features/dashboard/components/PanelEditor/OptionsPaneOptions.test.tsx +++ b/public/app/features/dashboard/components/PanelEditor/OptionsPaneOptions.test.tsx @@ -13,7 +13,7 @@ import { TimeRange, toDataFrame, } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { selectors } from '@grafana/e2e-selectors'; import { getAllOptionEditors, getAllStandardFieldConfigs } from 'app/core/components/OptionsUI/registry'; diff --git a/public/app/features/dashboard/components/PanelEditor/PanelHeaderCorner.tsx b/public/app/features/dashboard/components/PanelEditor/PanelHeaderCorner.tsx index 7e0edec648b..07936f463b8 100644 --- a/public/app/features/dashboard/components/PanelEditor/PanelHeaderCorner.tsx +++ b/public/app/features/dashboard/components/PanelEditor/PanelHeaderCorner.tsx @@ -1,7 +1,8 @@ import { css, cx } from '@emotion/css'; import { Component } from 'react'; -import { GrafanaTheme2, renderMarkdown, LinkModelSupplier, ScopedVars, IconName } from '@grafana/data'; +import { renderMarkdown, LinkModelSupplier, ScopedVars, IconName } from '@grafana/data'; +import { GrafanaTheme2 } from '@grafana/data/'; import { selectors } from '@grafana/e2e-selectors'; import { locationService, getTemplateSrv } from '@grafana/runtime'; import { Tooltip, PopoverContent, Icon, Themeable2, withTheme2, useStyles2 } from '@grafana/ui'; diff --git a/public/app/features/dashboard/components/PanelEditor/getVisualizationOptions.tsx b/public/app/features/dashboard/components/PanelEditor/getVisualizationOptions.tsx index 4b003d91c84..b62d0493c2e 100644 --- a/public/app/features/dashboard/components/PanelEditor/getVisualizationOptions.tsx +++ b/public/app/features/dashboard/components/PanelEditor/getVisualizationOptions.tsx @@ -7,9 +7,13 @@ import { PanelPlugin, StandardEditorContext, VariableSuggestionsScope, - PanelOptionsEditorBuilder, } from '@grafana/data'; -import { NestedValueAccess, isNestedPanelOptions, PanelOptionsSupplier } from '@grafana/data/internal'; +import { PanelOptionsSupplier } from '@grafana/data/src/panel/PanelPlugin'; +import { + NestedValueAccess, + PanelOptionsEditorBuilder, + isNestedPanelOptions, +} from '@grafana/data/src/utils/OptionsUIBuilders'; import { VizPanel } from '@grafana/scenes'; import { Input } from '@grafana/ui'; import { LibraryVizPanelInfo } from 'app/features/dashboard-scene/panel-edit/LibraryVizPanelInfo'; diff --git a/public/app/features/dashboard/components/PanelEditor/state/actions.test.ts b/public/app/features/dashboard/components/PanelEditor/state/actions.test.ts index ab46604bb92..b661ef017b8 100644 --- a/public/app/features/dashboard/components/PanelEditor/state/actions.test.ts +++ b/public/app/features/dashboard/components/PanelEditor/state/actions.test.ts @@ -1,5 +1,5 @@ import { PanelPlugin } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { LibraryElementDTOMeta } from '@grafana/schema'; import { createDashboardModelFixture } from 'app/features/dashboard/state/__fixtures__/dashboardFixtures'; import { panelModelAndPluginReady, removePanel } from 'app/features/panel/state/reducers'; diff --git a/public/app/features/dashboard/components/PublicDashboardNotAvailable/PublicDashboardNotAvailable.tsx b/public/app/features/dashboard/components/PublicDashboardNotAvailable/PublicDashboardNotAvailable.tsx index e413a750181..4bf24218d60 100644 --- a/public/app/features/dashboard/components/PublicDashboardNotAvailable/PublicDashboardNotAvailable.tsx +++ b/public/app/features/dashboard/components/PublicDashboardNotAvailable/PublicDashboardNotAvailable.tsx @@ -1,6 +1,6 @@ import { css, cx } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data'; +import { GrafanaTheme2 } from '@grafana/data/src'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors/src'; import { useStyles2 } from '@grafana/ui'; diff --git a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/ConfigPublicDashboard.tsx b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/ConfigPublicDashboard.tsx index 5cf08218411..b83161aa968 100644 --- a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/ConfigPublicDashboard.tsx +++ b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/ConfigPublicDashboard.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import { useForm } from 'react-hook-form'; -import { GrafanaTheme2, TimeRange } from '@grafana/data'; +import { GrafanaTheme2, TimeRange } from '@grafana/data/src'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors/src'; import { Button, diff --git a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/Configuration.tsx b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/Configuration.tsx index 5156356f470..eb9a3d8a34f 100644 --- a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/Configuration.tsx +++ b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/Configuration.tsx @@ -1,6 +1,6 @@ import { UseFormRegister } from 'react-hook-form'; -import { TimeRange } from '@grafana/data'; +import { TimeRange } from '@grafana/data/src'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors/src'; import { FieldSet, Label, Switch, TimeRangeInput, Stack, VerticalGroup } from '@grafana/ui'; import { Trans, t } from 'app/core/internationalization'; diff --git a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/CreatePublicDashboard/AcknowledgeCheckboxes.tsx b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/CreatePublicDashboard/AcknowledgeCheckboxes.tsx index d1913aa3b9f..574e289609a 100644 --- a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/CreatePublicDashboard/AcknowledgeCheckboxes.tsx +++ b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/CreatePublicDashboard/AcknowledgeCheckboxes.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import { UseFormRegister } from 'react-hook-form'; -import { GrafanaTheme2 } from '@grafana/data'; +import { GrafanaTheme2 } from '@grafana/data/src'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors/src'; import { Checkbox, FieldSet, HorizontalGroup, LinkButton, useStyles2, VerticalGroup } from '@grafana/ui'; import { t, Trans } from 'app/core/internationalization'; diff --git a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ModalAlerts/UnsupportedDataSourcesAlert.tsx b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ModalAlerts/UnsupportedDataSourcesAlert.tsx index 1df2bbeac48..3850c5e8b17 100644 --- a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ModalAlerts/UnsupportedDataSourcesAlert.tsx +++ b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ModalAlerts/UnsupportedDataSourcesAlert.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import cx from 'classnames'; -import { GrafanaTheme2 } from '@grafana/data'; +import { GrafanaTheme2 } from '@grafana/data/src'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors/src'; import { config } from '@grafana/runtime'; import { Alert, useStyles2 } from '@grafana/ui'; diff --git a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboard.test.tsx b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboard.test.tsx index 9a0357f0626..12d213f8501 100644 --- a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboard.test.tsx +++ b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboard.test.tsx @@ -3,7 +3,7 @@ import userEvent from '@testing-library/user-event'; import { http, HttpResponse } from 'msw'; import { setupServer } from 'msw/node'; -import { BootData, DataQuery } from '@grafana/data'; +import { BootData, DataQuery } from '@grafana/data/src'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors/src'; import { reportInteraction, setEchoSrv } from '@grafana/runtime'; import { Panel } from '@grafana/schema'; diff --git a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboard.tsx b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboard.tsx index 329e0d5ef08..8cbfdd8bd57 100644 --- a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboard.tsx +++ b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboard.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data'; +import { GrafanaTheme2 } from '@grafana/data/src'; import { Spinner, useStyles2 } from '@grafana/ui'; import { useGetPublicDashboardQuery } from 'app/features/dashboard/api/publicDashboardApi'; import { publicDashboardPersisted } from 'app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboardUtils'; diff --git a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboardUtils.test.tsx b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboardUtils.test.tsx index 6ca108fc542..7a14d0a4e45 100644 --- a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboardUtils.test.tsx +++ b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboardUtils.test.tsx @@ -1,4 +1,5 @@ -import { DataSourceRef, DataQuery, TypedVariableModel } from '@grafana/data'; +import { TypedVariableModel } from '@grafana/data'; +import { DataSourceRef, DataQuery } from '@grafana/data/src/types/query'; import { DataSourceWithBackend } from '@grafana/runtime'; import { updateConfig } from 'app/core/config'; import { mockDataSource } from 'app/features/alerting/unified/mocks'; diff --git a/public/app/features/dashboard/components/SubMenu/DashboardLinks.tsx b/public/app/features/dashboard/components/SubMenu/DashboardLinks.tsx index 65a7c39b335..1fa176900eb 100644 --- a/public/app/features/dashboard/components/SubMenu/DashboardLinks.tsx +++ b/public/app/features/dashboard/components/SubMenu/DashboardLinks.tsx @@ -1,6 +1,6 @@ import { useEffectOnce } from 'react-use'; -import { sanitizeUrl } from '@grafana/data/internal'; +import { sanitizeUrl } from '@grafana/data/src/text/sanitize'; import { selectors } from '@grafana/e2e-selectors'; import { TimeRangeUpdatedEvent } from '@grafana/runtime'; import { DashboardLink } from '@grafana/schema'; diff --git a/public/app/features/dashboard/components/SubMenu/DashboardLinksDashboard.tsx b/public/app/features/dashboard/components/SubMenu/DashboardLinksDashboard.tsx index 7beb284f28b..f36232b7b2b 100644 --- a/public/app/features/dashboard/components/SubMenu/DashboardLinksDashboard.tsx +++ b/public/app/features/dashboard/components/SubMenu/DashboardLinksDashboard.tsx @@ -3,7 +3,7 @@ import { forwardRef } from 'react'; import { useAsync } from 'react-use'; import { GrafanaTheme2, ScopedVars } from '@grafana/data'; -import { sanitize, sanitizeUrl } from '@grafana/data/internal'; +import { sanitize, sanitizeUrl } from '@grafana/data/src/text/sanitize'; import { selectors } from '@grafana/e2e-selectors'; import { DashboardLink } from '@grafana/schema'; import { Dropdown, Icon, LinkButton, Button, Menu, ScrollContainer, useStyles2 } from '@grafana/ui'; diff --git a/public/app/features/dashboard/state/DashboardMigrator.test.ts b/public/app/features/dashboard/state/DashboardMigrator.test.ts index f0ed1f72c82..70a80fb2da1 100644 --- a/public/app/features/dashboard/state/DashboardMigrator.test.ts +++ b/public/app/features/dashboard/state/DashboardMigrator.test.ts @@ -1,7 +1,7 @@ import { each, map } from 'lodash'; import { DataLinkBuiltInVars, MappingType, VariableHide } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { FieldConfigSource } from '@grafana/schema'; import { config } from 'app/core/config'; import { GRID_CELL_HEIGHT, GRID_CELL_VMARGIN } from 'app/core/constants'; diff --git a/public/app/features/dashboard/state/DashboardMigrator.ts b/public/app/features/dashboard/state/DashboardMigrator.ts index 44796c1e6f9..bab206f9792 100644 --- a/public/app/features/dashboard/state/DashboardMigrator.ts +++ b/public/app/features/dashboard/state/DashboardMigrator.ts @@ -27,7 +27,8 @@ import { ValueMapping, VariableHide, } from '@grafana/data'; -import { labelsToFieldsTransformer, mergeTransformer } from '@grafana/data/internal'; +import { labelsToFieldsTransformer } from '@grafana/data/src/transformations/transformers/labelsToFields'; +import { mergeTransformer } from '@grafana/data/src/transformations/transformers/merge'; import { getDataSourceSrv, setDataSourceSrv } from '@grafana/runtime'; import { DataTransformerConfig } from '@grafana/schema'; import { AxisPlacement, GraphFieldConfig } from '@grafana/ui'; diff --git a/public/app/features/dashboard/state/PanelModel.test.ts b/public/app/features/dashboard/state/PanelModel.test.ts index 092ec0e0947..a8a7aaae420 100644 --- a/public/app/features/dashboard/state/PanelModel.test.ts +++ b/public/app/features/dashboard/state/PanelModel.test.ts @@ -11,7 +11,8 @@ import { PanelMigrationHandler, PanelTypeChangedHandler, } from '@grafana/data'; -import { getPanelPlugin, mockStandardFieldConfigOptions } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { mockStandardFieldConfigOptions } from '@grafana/data/test/helpers/fieldConfig'; import { setTemplateSrv } from '@grafana/runtime'; import { queryBuilder } from 'app/features/variables/shared/testing/builders'; diff --git a/public/app/features/dashboard/utils/panel.test.ts b/public/app/features/dashboard/utils/panel.test.ts index 0a444a7726a..a739dcedab4 100644 --- a/public/app/features/dashboard/utils/panel.test.ts +++ b/public/app/features/dashboard/utils/panel.test.ts @@ -2,7 +2,7 @@ import { advanceTo, clear } from 'jest-date-mock'; import { ComponentClass } from 'react'; import { dateTime, DateTime, PanelProps, TimeRange } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { applyPanelTimeOverrides, calculateInnerPanelHeight } from 'app/features/dashboard/utils/panel'; import { PanelModel } from '../state/PanelModel'; diff --git a/public/app/features/dashboard/utils/timeRange.ts b/public/app/features/dashboard/utils/timeRange.ts index da144cf427c..79cf1f10244 100644 --- a/public/app/features/dashboard/utils/timeRange.ts +++ b/public/app/features/dashboard/utils/timeRange.ts @@ -1,4 +1,5 @@ -import { dateMath, dateTime, isDateTime, DateTime, TimeRange } from '@grafana/data'; +import { DateTime, TimeRange } from '@grafana/data'; +import { dateMath, dateTime, isDateTime } from '@grafana/data/src'; import { TimeModel } from 'app/features/dashboard/state/TimeModel'; export const getTimeRange = ( diff --git a/public/app/features/datasources/components/CloudInfoBox.tsx b/public/app/features/datasources/components/CloudInfoBox.tsx index 17e6b6d26b8..c34c44ce810 100644 --- a/public/app/features/datasources/components/CloudInfoBox.tsx +++ b/public/app/features/datasources/components/CloudInfoBox.tsx @@ -1,5 +1,5 @@ import { DataSourceSettings } from '@grafana/data'; -import { GrafanaEdition } from '@grafana/data/internal'; +import { GrafanaEdition } from '@grafana/data/src/types/config'; import { Alert } from '@grafana/ui'; import { LocalStorageValueProvider } from 'app/core/components/LocalStorageValueProvider'; import { config } from 'app/core/config'; diff --git a/public/app/features/datasources/state/buildCategories.test.ts b/public/app/features/datasources/state/buildCategories.test.ts index 297c413073d..5370c5a5789 100644 --- a/public/app/features/datasources/state/buildCategories.test.ts +++ b/public/app/features/datasources/state/buildCategories.test.ts @@ -1,5 +1,5 @@ import { DataSourcePluginMeta } from '@grafana/data'; -import { getMockPlugin } from '@grafana/data/test'; +import { getMockPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { buildCategories } from './buildCategories'; diff --git a/public/app/features/dimensions/context.ts b/public/app/features/dimensions/context.ts index bd0755de986..a4693ada2a9 100644 --- a/public/app/features/dimensions/context.ts +++ b/public/app/features/dimensions/context.ts @@ -1,4 +1,4 @@ -import { PanelData } from '@grafana/data'; +import { PanelData } from '@grafana/data/src'; import { ColorDimensionConfig, ResourceDimensionConfig, diff --git a/public/app/features/dimensions/scale.ts b/public/app/features/dimensions/scale.ts index 7c82df3c29d..06f3be04dee 100644 --- a/public/app/features/dimensions/scale.ts +++ b/public/app/features/dimensions/scale.ts @@ -1,4 +1,5 @@ -import { getMinMaxAndDelta, DataFrame, Field } from '@grafana/data'; +import { DataFrame, Field } from '@grafana/data'; +import { getMinMaxAndDelta } from '@grafana/data/src/field/scale'; import { ScaleDimensionConfig, ScaleDimensionMode } from '@grafana/schema'; import { DimensionSupplier, ScaleDimensionOptions } from './types'; diff --git a/public/app/features/explore/Logs/Logs.test.tsx b/public/app/features/explore/Logs/Logs.test.tsx index 85b5906eef6..958bad54ad4 100644 --- a/public/app/features/explore/Logs/Logs.test.tsx +++ b/public/app/features/explore/Logs/Logs.test.tsx @@ -16,7 +16,7 @@ import { ExploreLogsPanelState, DataQuery, } from '@grafana/data'; -import { organizeFieldsTransformer } from '@grafana/data/internal'; +import { organizeFieldsTransformer } from '@grafana/data/src/transformations/transformers/organize'; import { config } from '@grafana/runtime'; import { extractFieldsTransformer } from 'app/features/transformers/extractFields/extractFields'; import { LokiQueryDirection } from 'app/plugins/datasource/loki/dataquery.gen'; diff --git a/public/app/features/explore/Logs/LogsColumnSearch.tsx b/public/app/features/explore/Logs/LogsColumnSearch.tsx index 6919e9e3fcf..16e24d48954 100644 --- a/public/app/features/explore/Logs/LogsColumnSearch.tsx +++ b/public/app/features/explore/Logs/LogsColumnSearch.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import * as React from 'react'; -import { GrafanaTheme2 } from '@grafana/data'; +import { GrafanaTheme2 } from '@grafana/data/src'; import { Field, Input, useTheme2 } from '@grafana/ui'; function getStyles(theme: GrafanaTheme2) { diff --git a/public/app/features/explore/Logs/LogsMetaRow.test.tsx b/public/app/features/explore/Logs/LogsMetaRow.test.tsx index e66a3d1bd77..ce63d19b4d0 100644 --- a/public/app/features/explore/Logs/LogsMetaRow.test.tsx +++ b/public/app/features/explore/Logs/LogsMetaRow.test.tsx @@ -4,7 +4,7 @@ import saveAs from 'file-saver'; import { ComponentProps } from 'react'; import { FieldType, LogLevel, LogsDedupStrategy, standardTransformersRegistry, toDataFrame } from '@grafana/data'; -import { organizeFieldsTransformer } from '@grafana/data/internal'; +import { organizeFieldsTransformer } from '@grafana/data/src/transformations/transformers/organize'; import { config } from '@grafana/runtime'; import { MAX_CHARACTERS } from '../../logs/components/LogRowMessage'; diff --git a/public/app/features/explore/Logs/LogsMetaRow.tsx b/public/app/features/explore/Logs/LogsMetaRow.tsx index ba07fdf71b2..9db3be0ebdd 100644 --- a/public/app/features/explore/Logs/LogsMetaRow.tsx +++ b/public/app/features/explore/Logs/LogsMetaRow.tsx @@ -14,8 +14,8 @@ import { DataTransformerConfig, CustomTransformOperator, Labels, - DataFrame, } from '@grafana/data'; +import { DataFrame } from '@grafana/data/'; import { config, reportInteraction } from '@grafana/runtime'; import { Button, Dropdown, Menu, ToolbarButton, Tooltip, useStyles2 } from '@grafana/ui'; diff --git a/public/app/features/explore/Logs/LogsTable.test.tsx b/public/app/features/explore/Logs/LogsTable.test.tsx index a8fa211431e..6dff92ec2c5 100644 --- a/public/app/features/explore/Logs/LogsTable.test.tsx +++ b/public/app/features/explore/Logs/LogsTable.test.tsx @@ -2,7 +2,7 @@ import { render, screen, waitFor } from '@testing-library/react'; import { ComponentProps } from 'react'; import { DataFrame, FieldType, LogsSortOrder, standardTransformersRegistry, toUtc } from '@grafana/data'; -import { organizeFieldsTransformer } from '@grafana/data/internal'; +import { organizeFieldsTransformer } from '@grafana/data/src/transformations/transformers/organize'; import { config } from '@grafana/runtime'; import { extractFieldsTransformer } from 'app/features/transformers/extractFields/extractFields'; diff --git a/public/app/features/explore/Logs/LogsTableActiveFields.tsx b/public/app/features/explore/Logs/LogsTableActiveFields.tsx index c228c7aaf7b..eb833030106 100644 --- a/public/app/features/explore/Logs/LogsTableActiveFields.tsx +++ b/public/app/features/explore/Logs/LogsTableActiveFields.tsx @@ -1,7 +1,7 @@ import { css, cx } from '@emotion/css'; import { DragDropContext, Draggable, DraggableProvided, Droppable, DropResult } from '@hello-pangea/dnd'; -import { GrafanaTheme2 } from '@grafana/data'; +import { GrafanaTheme2 } from '@grafana/data/src'; import { useTheme2 } from '@grafana/ui'; import { LogsTableEmptyFields } from './LogsTableEmptyFields'; diff --git a/public/app/features/explore/Logs/LogsTableMultiSelect.tsx b/public/app/features/explore/Logs/LogsTableMultiSelect.tsx index 19e10e72f4b..10308e761a7 100644 --- a/public/app/features/explore/Logs/LogsTableMultiSelect.tsx +++ b/public/app/features/explore/Logs/LogsTableMultiSelect.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data'; +import { GrafanaTheme2 } from '@grafana/data/src'; import { useTheme2 } from '@grafana/ui'; import { LogsTableActiveFields } from './LogsTableActiveFields'; diff --git a/public/app/features/explore/Logs/LogsTableWrap.test.tsx b/public/app/features/explore/Logs/LogsTableWrap.test.tsx index 3fd2add101f..a862b326065 100644 --- a/public/app/features/explore/Logs/LogsTableWrap.test.tsx +++ b/public/app/features/explore/Logs/LogsTableWrap.test.tsx @@ -1,8 +1,14 @@ import { act, fireEvent, render, screen, waitFor } from '@testing-library/react'; import { ComponentProps } from 'react'; -import { createTheme, ExploreLogsPanelState, LogsSortOrder, standardTransformersRegistry, toUtc } from '@grafana/data'; -import { organizeFieldsTransformer } from '@grafana/data/internal'; +import { + createTheme, + ExploreLogsPanelState, + LogsSortOrder, + standardTransformersRegistry, + toUtc, +} from '@grafana/data/src'; +import { organizeFieldsTransformer } from '@grafana/data/src/transformations/transformers/organize'; import { config } from '@grafana/runtime'; import { extractFieldsTransformer } from '../../transformers/extractFields/extractFields'; diff --git a/public/app/features/explore/Logs/utils/testMocks.test.ts b/public/app/features/explore/Logs/utils/testMocks.test.ts index aadea96a5e7..55a19433b20 100644 --- a/public/app/features/explore/Logs/utils/testMocks.test.ts +++ b/public/app/features/explore/Logs/utils/testMocks.test.ts @@ -1,4 +1,4 @@ -import { DataFrame, Field, FieldType } from '@grafana/data'; +import { DataFrame, Field, FieldType } from '@grafana/data/src'; import { DataFrameType } from '../../../../../../packages/grafana-data'; diff --git a/public/app/features/explore/NoData.tsx b/public/app/features/explore/NoData.tsx index 38384793050..130f38750ef 100644 --- a/public/app/features/explore/NoData.tsx +++ b/public/app/features/explore/NoData.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data'; +import { GrafanaTheme2 } from '@grafana/data/src'; import { useStyles2, PanelContainer } from '@grafana/ui'; export const NoData = () => { diff --git a/public/app/features/explore/PrometheusListView/ItemLabels.tsx b/public/app/features/explore/PrometheusListView/ItemLabels.tsx index 4fb465818cc..4f0884ab71b 100644 --- a/public/app/features/explore/PrometheusListView/ItemLabels.tsx +++ b/public/app/features/explore/PrometheusListView/ItemLabels.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { Field, GrafanaTheme2 } from '@grafana/data'; +import { Field, GrafanaTheme2 } from '@grafana/data/'; import { InstantQueryRefIdIndex } from '@grafana/prometheus'; import { useStyles2 } from '@grafana/ui'; diff --git a/public/app/features/explore/PrometheusListView/ItemValues.tsx b/public/app/features/explore/PrometheusListView/ItemValues.tsx index ab46049a540..2cb61be35c0 100644 --- a/public/app/features/explore/PrometheusListView/ItemValues.tsx +++ b/public/app/features/explore/PrometheusListView/ItemValues.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data'; +import { GrafanaTheme2 } from '@grafana/data/'; import { useStyles2 } from '@grafana/ui'; import { rawListItemColumnWidth, rawListPaddingToHoldSpaceForCopyIcon, RawListValue } from './RawListItem'; diff --git a/public/app/features/explore/PrometheusListView/RawListContainer.test.tsx b/public/app/features/explore/PrometheusListView/RawListContainer.test.tsx index 896b5dd7ba8..8f3d27dbac8 100644 --- a/public/app/features/explore/PrometheusListView/RawListContainer.test.tsx +++ b/public/app/features/explore/PrometheusListView/RawListContainer.test.tsx @@ -1,6 +1,6 @@ import { render, screen, within } from '@testing-library/react'; -import { FieldType, FormattedValue, toDataFrame } from '@grafana/data'; +import { FieldType, FormattedValue, toDataFrame } from '@grafana/data/src'; import RawListContainer, { RawListContainerProps } from './RawListContainer'; diff --git a/public/app/features/explore/PrometheusListView/RawListContainer.tsx b/public/app/features/explore/PrometheusListView/RawListContainer.tsx index eb0717b6c43..ee8dedfd5ab 100644 --- a/public/app/features/explore/PrometheusListView/RawListContainer.tsx +++ b/public/app/features/explore/PrometheusListView/RawListContainer.tsx @@ -4,7 +4,7 @@ import { useEffect, useId, useRef, useState } from 'react'; import { useWindowSize } from 'react-use'; import { VariableSizeList as List } from 'react-window'; -import { DataFrame, Field as DataFrameField } from '@grafana/data'; +import { DataFrame, Field as DataFrameField } from '@grafana/data/'; import { reportInteraction } from '@grafana/runtime/src'; import { Field, Switch } from '@grafana/ui'; diff --git a/public/app/features/explore/PrometheusListView/RawListItem.tsx b/public/app/features/explore/PrometheusListView/RawListItem.tsx index a396a636a2b..b5a4e5b9433 100644 --- a/public/app/features/explore/PrometheusListView/RawListItem.tsx +++ b/public/app/features/explore/PrometheusListView/RawListItem.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import { useCopyToClipboard } from 'react-use'; -import { Field, GrafanaTheme2 } from '@grafana/data'; +import { Field, GrafanaTheme2 } from '@grafana/data/'; import { isValidLegacyName, utf8Support } from '@grafana/prometheus/src/utf8_support'; import { reportInteraction } from '@grafana/runtime/src'; import { IconButton, useStyles2 } from '@grafana/ui'; diff --git a/public/app/features/explore/PrometheusListView/RawListItemAttributes.tsx b/public/app/features/explore/PrometheusListView/RawListItemAttributes.tsx index 8d9ecb28fe2..bbc7962c918 100644 --- a/public/app/features/explore/PrometheusListView/RawListItemAttributes.tsx +++ b/public/app/features/explore/PrometheusListView/RawListItemAttributes.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data'; +import { GrafanaTheme2 } from '@grafana/data/'; import { useStyles2 } from '@grafana/ui'; import { RawListValue } from './RawListItem'; diff --git a/public/app/features/explore/state/main.test.ts b/public/app/features/explore/state/main.test.ts index d52a1be7211..28fe5009234 100644 --- a/public/app/features/explore/state/main.test.ts +++ b/public/app/features/explore/state/main.test.ts @@ -1,6 +1,7 @@ import { thunkTester } from 'test/core/thunk/thunkTester'; -import { dateTime, ExploreUrlState, serializeStateToUrlParam } from '@grafana/data'; +import { dateTime, ExploreUrlState } from '@grafana/data'; +import { serializeStateToUrlParam } from '@grafana/data/src/utils/url'; import { locationService } from '@grafana/runtime'; import { PanelModel } from 'app/features/dashboard/state/PanelModel'; diff --git a/public/app/features/live/centrifuge/LiveDataStream.ts b/public/app/features/live/centrifuge/LiveDataStream.ts index 6d0787c205f..a4b6eb80255 100644 --- a/public/app/features/live/centrifuge/LiveDataStream.ts +++ b/public/app/features/live/centrifuge/LiveDataStream.ts @@ -12,7 +12,7 @@ import { LoadingState, StreamingDataFrame, } from '@grafana/data'; -import { getStreamingFrameOptions } from '@grafana/data/internal'; +import { getStreamingFrameOptions } from '@grafana/data/src/dataframe/StreamingDataFrame'; import { LiveDataStreamOptions, StreamingFrameAction, StreamingFrameOptions } from '@grafana/runtime/src/services/live'; import { toDataQueryError } from '@grafana/runtime/src/utils/toDataQueryError'; diff --git a/public/app/features/logs/components/InfiniteScroll.test.tsx b/public/app/features/logs/components/InfiniteScroll.test.tsx index dfbb093c17f..c6b92afaef5 100644 --- a/public/app/features/logs/components/InfiniteScroll.test.tsx +++ b/public/app/features/logs/components/InfiniteScroll.test.tsx @@ -2,7 +2,8 @@ import { act, render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { useEffect, useRef, useState } from 'react'; -import { CoreApp, LogRowModel, dateTimeForTimeZone, rangeUtil } from '@grafana/data'; +import { CoreApp, LogRowModel, dateTimeForTimeZone } from '@grafana/data'; +import { convertRawToRange } from '@grafana/data/src/datetime/rangeutil'; import { config } from '@grafana/runtime'; import { LogsSortOrder } from '@grafana/schema'; @@ -15,7 +16,7 @@ const absoluteRange = { from: 1702578600000, to: 1702578900000, }; -const defaultRange = rangeUtil.convertRawToRange({ +const defaultRange = convertRawToRange({ from: dateTimeForTimeZone(defaultTz, absoluteRange.from), to: dateTimeForTimeZone(defaultTz, absoluteRange.to), }); diff --git a/public/app/features/logs/components/InfiniteScroll.tsx b/public/app/features/logs/components/InfiniteScroll.tsx index df0b3109237..36d748d2db1 100644 --- a/public/app/features/logs/components/InfiniteScroll.tsx +++ b/public/app/features/logs/components/InfiniteScroll.tsx @@ -1,8 +1,8 @@ import { css } from '@emotion/css'; import { ReactNode, MutableRefObject, useCallback, useEffect, useRef, useState } from 'react'; -import { AbsoluteTimeRange, CoreApp, LogRowModel, TimeRange, rangeUtil } from '@grafana/data'; -// import { convertRawToRange, isRelativeTime, isRelativeTimeRange } from '@grafana/data/internal'; +import { AbsoluteTimeRange, CoreApp, LogRowModel, TimeRange } from '@grafana/data'; +import { convertRawToRange, isRelativeTime, isRelativeTimeRange } from '@grafana/data/src/datetime/rangeutil'; import { config, reportInteraction } from '@grafana/runtime'; import { LogsSortOrder, TimeZone } from '@grafana/schema'; import { Button, Icon } from '@grafana/ui'; @@ -140,8 +140,8 @@ export const InfiniteScroll = ({ }, [loadMoreLogs, loading, range, rows, scrollElement, sortOrder, timeZone, topScrollEnabled]); // We allow "now" to move when using relative time, so we hide the message so it doesn't flash. - const hideTopMessage = sortOrder === LogsSortOrder.Descending && rangeUtil.isRelativeTime(range.raw.to); - const hideBottomMessage = sortOrder === LogsSortOrder.Ascending && rangeUtil.isRelativeTime(range.raw.to); + const hideTopMessage = sortOrder === LogsSortOrder.Descending && isRelativeTime(range.raw.to); + const hideBottomMessage = sortOrder === LogsSortOrder.Ascending && isRelativeTime(range.raw.to); const loadOlderLogs = useCallback(() => { //If we are not on the last page, use next page's range @@ -344,7 +344,5 @@ export function canScrollBottom( // Given a TimeRange, returns a new instance if using relative time, or else the same. function updateCurrentRange(timeRange: TimeRange, timeZone: TimeZone) { - return rangeUtil.isRelativeTimeRange(timeRange.raw) - ? rangeUtil.convertRawToRange(timeRange.raw, timeZone) - : timeRange; + return isRelativeTimeRange(timeRange.raw) ? convertRawToRange(timeRange.raw, timeZone) : timeRange; } diff --git a/public/app/features/logs/components/LogDetailsRow.test.tsx b/public/app/features/logs/components/LogDetailsRow.test.tsx index 4463adde1f7..5f3229255b3 100644 --- a/public/app/features/logs/components/LogDetailsRow.test.tsx +++ b/public/app/features/logs/components/LogDetailsRow.test.tsx @@ -1,7 +1,8 @@ import { fireEvent, render, screen } from '@testing-library/react'; import { ComponentProps } from 'react'; -import { Field, CoreApp, FieldType, LinkModel } from '@grafana/data'; +import { CoreApp, FieldType, LinkModel } from '@grafana/data'; +import { Field } from '@grafana/data/'; import { LogDetailsRow } from './LogDetailsRow'; import { createLogRow } from './__mocks__/logRow'; diff --git a/public/app/features/logs/logsModel.ts b/public/app/features/logs/logsModel.ts index a63e464c62f..60aef4364bd 100644 --- a/public/app/features/logs/logsModel.ts +++ b/public/app/features/logs/logsModel.ts @@ -39,7 +39,7 @@ import { toDataFrame, toUtc, } from '@grafana/data'; -import { SIPrefix } from '@grafana/data/internal'; +import { SIPrefix } from '@grafana/data/src/valueFormats/symbolFormatters'; import { config } from '@grafana/runtime'; import { BarAlignment, GraphDrawStyle, StackingMode } from '@grafana/schema'; import { colors } from '@grafana/ui'; diff --git a/public/app/features/manage-dashboards/components/PublicDashboardListTable/DeletePublicDashboardModal.tsx b/public/app/features/manage-dashboards/components/PublicDashboardListTable/DeletePublicDashboardModal.tsx index dabaa6d3473..8e3766ce457 100644 --- a/public/app/features/manage-dashboards/components/PublicDashboardListTable/DeletePublicDashboardModal.tsx +++ b/public/app/features/manage-dashboards/components/PublicDashboardListTable/DeletePublicDashboardModal.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data'; +import { GrafanaTheme2 } from '@grafana/data/src'; import { config } from '@grafana/runtime'; import { ConfirmModal, useStyles2 } from '@grafana/ui'; import { t } from 'app/core/internationalization'; diff --git a/public/app/features/panel/state/actions.test.ts b/public/app/features/panel/state/actions.test.ts index 98c0105f848..0f6dc41284d 100644 --- a/public/app/features/panel/state/actions.test.ts +++ b/public/app/features/panel/state/actions.test.ts @@ -1,5 +1,6 @@ import { standardEditorsRegistry, standardFieldConfigEditorRegistry } from '@grafana/data'; -import { getPanelPlugin, mockStandardFieldConfigOptions } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { mockStandardFieldConfigOptions } from '@grafana/data/test/helpers/fieldConfig'; import { PanelModel } from 'app/features/dashboard/state/PanelModel'; import { panelPluginLoaded } from 'app/features/plugins/admin/state/actions'; diff --git a/public/app/features/plugins/components/AppRootPage.test.tsx b/public/app/features/plugins/components/AppRootPage.test.tsx index bef9ed62306..594028bcebf 100644 --- a/public/app/features/plugins/components/AppRootPage.test.tsx +++ b/public/app/features/plugins/components/AppRootPage.test.tsx @@ -4,7 +4,7 @@ import { Routes, Route, Link } from 'react-router-dom-v5-compat'; import { render } from 'test/test-utils'; import { AppPlugin, PluginType, AppRootProps, NavModelItem, PluginIncludeType, OrgRole } from '@grafana/data'; -import { getMockPlugin } from '@grafana/data/test'; +import { getMockPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { setEchoSrv } from '@grafana/runtime'; import { GrafanaRouteWrapper } from 'app/core/navigation/GrafanaRoute'; import { contextSrv } from 'app/core/services/context_srv'; diff --git a/public/app/features/plugins/extensions/registry/AddedLinksRegistry.ts b/public/app/features/plugins/extensions/registry/AddedLinksRegistry.ts index 12024fd0863..52a1ad9a96c 100644 --- a/public/app/features/plugins/extensions/registry/AddedLinksRegistry.ts +++ b/public/app/features/plugins/extensions/registry/AddedLinksRegistry.ts @@ -1,7 +1,7 @@ import { ReplaySubject } from 'rxjs'; import { IconName, PluginExtensionAddedLinkConfig } from '@grafana/data'; -import { PluginAddedLinksConfigureFunc, PluginExtensionEventHelpers } from '@grafana/data/internal'; +import { PluginAddedLinksConfigureFunc, PluginExtensionEventHelpers } from '@grafana/data/src/types/pluginExtensions'; import * as errors from '../errors'; import { isGrafanaDevMode } from '../utils'; diff --git a/public/app/features/plugins/extensions/validators.ts b/public/app/features/plugins/extensions/validators.ts index 4106544567f..cbdaf81e935 100644 --- a/public/app/features/plugins/extensions/validators.ts +++ b/public/app/features/plugins/extensions/validators.ts @@ -1,14 +1,13 @@ -import { - type PluginExtensionAddedLinkConfig, - type PluginExtension, - type PluginExtensionLink, - type PluginContextType, - type PluginExtensionAddedComponentConfig, - type PluginExtensionExposedComponentConfig, - type PluginExtensionAddedFunctionConfig, - PluginExtensionPoints, +import type { + PluginExtensionAddedLinkConfig, + PluginExtension, + PluginExtensionLink, + PluginContextType, + PluginExtensionAddedComponentConfig, + PluginExtensionExposedComponentConfig, + PluginExtensionAddedFunctionConfig, } from '@grafana/data'; -import { PluginAddedLinksConfigureFunc } from '@grafana/data/internal'; +import { PluginAddedLinksConfigureFunc, PluginExtensionPoints } from '@grafana/data/src/types/pluginExtensions'; import { config, isPluginExtensionLink } from '@grafana/runtime'; import * as errors from './errors'; diff --git a/public/app/features/plugins/loader/sharedDependencies.ts b/public/app/features/plugins/loader/sharedDependencies.ts index 0551cd8d170..dc88d5a292c 100644 --- a/public/app/features/plugins/loader/sharedDependencies.ts +++ b/public/app/features/plugins/loader/sharedDependencies.ts @@ -49,7 +49,7 @@ export const sharedDependenciesMap = { '@emotion/css': () => import('@emotion/css'), '@emotion/react': () => import('@emotion/react'), '@grafana/data': grafanaData, - '@grafana/data/unstable': () => import('@grafana/data/unstable'), + '@grafana/data/unstable': () => import('@grafana/data/src/unstable'), '@grafana/runtime': grafanaRuntime, '@grafana/runtime/unstable': () => import('@grafana/runtime/src/unstable'), '@grafana/slate-react': () => import('slate-react'), diff --git a/public/app/features/plugins/pluginPreloader.ts b/public/app/features/plugins/pluginPreloader.ts index 43b58f2d08e..8b7a85759be 100644 --- a/public/app/features/plugins/pluginPreloader.ts +++ b/public/app/features/plugins/pluginPreloader.ts @@ -1,8 +1,5 @@ -import type { - PluginExtensionAddedLinkConfig, - PluginExtensionExposedComponentConfig, - PluginExtensionAddedComponentConfig, -} from '@grafana/data'; +import type { PluginExtensionAddedLinkConfig, PluginExtensionExposedComponentConfig } from '@grafana/data'; +import { PluginExtensionAddedComponentConfig } from '@grafana/data/src/types/pluginExtensions'; import type { AppPluginConfig } from '@grafana/runtime'; import { getPluginSettings } from 'app/features/plugins/pluginSettings'; diff --git a/public/app/features/scopes/tests/utils/render.tsx b/public/app/features/scopes/tests/utils/render.tsx index 391331eb5f1..3fa447d952b 100644 --- a/public/app/features/scopes/tests/utils/render.tsx +++ b/public/app/features/scopes/tests/utils/render.tsx @@ -2,7 +2,7 @@ import { cleanup, waitFor } from '@testing-library/react'; import { KBarProvider } from 'kbar'; import { render } from 'test/test-utils'; -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { config, setPluginImportUtils } from '@grafana/runtime'; import { sceneGraph } from '@grafana/scenes'; import { defaultDashboard } from '@grafana/schema'; diff --git a/public/app/features/trails/DataTrailsHistory.tsx b/public/app/features/trails/DataTrailsHistory.tsx index 81e20a8b29c..bfd7af07344 100644 --- a/public/app/features/trails/DataTrailsHistory.tsx +++ b/public/app/features/trails/DataTrailsHistory.tsx @@ -1,7 +1,8 @@ import { css, cx } from '@emotion/css'; import { useMemo } from 'react'; -import { getTimeZoneInfo, GrafanaTheme2, InternalTimeZones, TIME_FORMAT, rangeUtil } from '@grafana/data'; +import { getTimeZoneInfo, GrafanaTheme2, InternalTimeZones, TIME_FORMAT } from '@grafana/data'; +import { convertRawToRange } from '@grafana/data/src/datetime/rangeutil'; import { config } from '@grafana/runtime'; import { SceneComponentProps, @@ -348,7 +349,7 @@ export function parseTimeTooltip(urlValues: SceneObjectUrlValues): string { return ''; } - const range = rangeUtil.convertRawToRange({ + const range = convertRawToRange({ from: urlValues.from, to: urlValues.to, }); diff --git a/public/app/features/trails/Integrations/logs/lokiRecordingRules.test.ts b/public/app/features/trails/Integrations/logs/lokiRecordingRules.test.ts index 8d7e5418b3a..673cb2d5348 100644 --- a/public/app/features/trails/Integrations/logs/lokiRecordingRules.test.ts +++ b/public/app/features/trails/Integrations/logs/lokiRecordingRules.test.ts @@ -1,7 +1,7 @@ import { of } from 'rxjs'; import type { DataSourceInstanceSettings, DataSourceJsonData } from '@grafana/data'; -import { getMockPlugin } from '@grafana/data/test'; +import { getMockPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import * as runtime from '@grafana/runtime'; import { MetricsLogsConnector } from './base'; diff --git a/public/app/features/transformers/FilterByValueTransformer/FilterByValueFilterEditor.tsx b/public/app/features/transformers/FilterByValueTransformer/FilterByValueFilterEditor.tsx index 1b2f85c51da..f896c2a5759 100644 --- a/public/app/features/transformers/FilterByValueTransformer/FilterByValueFilterEditor.tsx +++ b/public/app/features/transformers/FilterByValueTransformer/FilterByValueFilterEditor.tsx @@ -1,7 +1,7 @@ import { useCallback } from 'react'; import { Field, SelectableValue, valueMatchers } from '@grafana/data'; -import { FilterByValueFilter } from '@grafana/data/internal'; +import { FilterByValueFilter } from '@grafana/data/src/transformations/transformers/filterByValue'; import { Button, Select, InlineField, InlineFieldRow, Box } from '@grafana/ui'; import { valueMatchersUI } from './ValueMatchers/valueMatchersUI'; diff --git a/public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.test.tsx b/public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.test.tsx index 6c064b2ad0c..e9cf39d1497 100644 --- a/public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.test.tsx +++ b/public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.test.tsx @@ -1,7 +1,7 @@ import { render, fireEvent } from '@testing-library/react'; import { DataFrame, FieldType, ValueMatcherID, valueMatchers } from '@grafana/data'; -import { FilterByValueMatch, FilterByValueType } from '@grafana/data/internal'; +import { FilterByValueMatch, FilterByValueType } from '@grafana/data/src/transformations/transformers/filterByValue'; import { FilterByValueTransformerEditor } from './FilterByValueTransformerEditor'; diff --git a/public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.tsx b/public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.tsx index 57b42e72d32..683350d47b1 100644 --- a/public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.tsx +++ b/public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.tsx @@ -19,7 +19,7 @@ import { FilterByValueMatch, FilterByValueTransformerOptions, FilterByValueType, -} from '@grafana/data/internal'; +} from '@grafana/data/src/transformations/transformers/filterByValue'; import { Button, RadioButtonGroup, InlineField, Box } from '@grafana/ui'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/calculateHeatmap/heatmap.test.ts b/public/app/features/transformers/calculateHeatmap/heatmap.test.ts index 256cd576ebe..0087b9fe22f 100644 --- a/public/app/features/transformers/calculateHeatmap/heatmap.test.ts +++ b/public/app/features/transformers/calculateHeatmap/heatmap.test.ts @@ -1,4 +1,5 @@ -import { FieldType, toDataFrame } from '@grafana/data'; +import { FieldType } from '@grafana/data'; +import { toDataFrame } from '@grafana/data/src/dataframe/processDataFrame'; import { HeatmapCalculationOptions } from '@grafana/schema'; import { rowsToCellsHeatmap, calculateHeatmapFromData } from './heatmap'; diff --git a/public/app/features/transformers/calculateHeatmap/heatmap.ts b/public/app/features/transformers/calculateHeatmap/heatmap.ts index ed37d76651e..6a7a29ce69c 100644 --- a/public/app/features/transformers/calculateHeatmap/heatmap.ts +++ b/public/app/features/transformers/calculateHeatmap/heatmap.ts @@ -15,7 +15,7 @@ import { TransformationApplicabilityLevels, TimeRange, } from '@grafana/data'; -import { isLikelyAscendingVector } from '@grafana/data/internal'; +import { isLikelyAscendingVector } from '@grafana/data/src/transformations/transformers/joinDataFrames'; import { ScaleDistribution, HeatmapCellLayout, diff --git a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/BinaryOperationOptionsEditor.tsx b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/BinaryOperationOptionsEditor.tsx index e0439cf7126..0dd7cc033cb 100644 --- a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/BinaryOperationOptionsEditor.tsx +++ b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/BinaryOperationOptionsEditor.tsx @@ -5,7 +5,7 @@ import { CalculateFieldMode, CalculateFieldTransformerOptions, checkBinaryValueType, -} from '@grafana/data/internal'; +} from '@grafana/data/src/transformations/transformers/calculateField'; import { getFieldTypeIconName, InlineField, InlineFieldRow, Select } from '@grafana/ui'; import { LABEL_WIDTH } from './constants'; diff --git a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CalculateFieldTransformerEditor.tsx b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CalculateFieldTransformerEditor.tsx index bd0e589dd88..bc39a4e2c62 100644 --- a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CalculateFieldTransformerEditor.tsx +++ b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CalculateFieldTransformerEditor.tsx @@ -21,7 +21,7 @@ import { CalculateFieldTransformerOptions, getNameFromOptions, defaultWindowOptions, -} from '@grafana/data/internal'; +} from '@grafana/data/src/transformations/transformers/calculateField'; import { getTemplateSrv, config as cfg } from '@grafana/runtime'; import { InlineField, InlineSwitch, Input, Select } from '@grafana/ui'; diff --git a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CumulativeOptionsEditor.tsx b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CumulativeOptionsEditor.tsx index 5d8eb17ea1d..1194514bcf4 100644 --- a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CumulativeOptionsEditor.tsx +++ b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CumulativeOptionsEditor.tsx @@ -1,5 +1,9 @@ import { ReducerID, SelectableValue } from '@grafana/data'; -import { CalculateFieldMode, CalculateFieldTransformerOptions, CumulativeOptions } from '@grafana/data/internal'; +import { + CalculateFieldMode, + CalculateFieldTransformerOptions, + CumulativeOptions, +} from '@grafana/data/src/transformations/transformers/calculateField'; import { InlineField, Select, StatsPicker } from '@grafana/ui'; import { LABEL_WIDTH } from './constants'; diff --git a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/IndexOptionsEditor.tsx b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/IndexOptionsEditor.tsx index e812dfafb0e..c660ac21317 100644 --- a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/IndexOptionsEditor.tsx +++ b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/IndexOptionsEditor.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { CalculateFieldTransformerOptions } from '@grafana/data/internal'; +import { CalculateFieldTransformerOptions } from '@grafana/data/src/transformations/transformers/calculateField'; import { InlineField, InlineSwitch } from '@grafana/ui'; import { LABEL_WIDTH } from './constants'; diff --git a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/ReduceRowOptionsEditor.tsx b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/ReduceRowOptionsEditor.tsx index e3e50a475ef..c48870fc36b 100644 --- a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/ReduceRowOptionsEditor.tsx +++ b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/ReduceRowOptionsEditor.tsx @@ -1,5 +1,8 @@ import { ReducerID } from '@grafana/data'; -import { CalculateFieldTransformerOptions, ReduceOptions } from '@grafana/data/internal'; +import { + CalculateFieldTransformerOptions, + ReduceOptions, +} from '@grafana/data/src/transformations/transformers/calculateField'; import { FilterPill, HorizontalGroup, InlineField, StatsPicker } from '@grafana/ui'; import { LABEL_WIDTH } from './constants'; diff --git a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/UnaryOperationEditor.tsx b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/UnaryOperationEditor.tsx index 4c57fca1b9b..3b38248b705 100644 --- a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/UnaryOperationEditor.tsx +++ b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/UnaryOperationEditor.tsx @@ -1,5 +1,9 @@ import { unaryOperators, SelectableValue, UnaryOperationID } from '@grafana/data'; -import { UnaryOptions, CalculateFieldMode, CalculateFieldTransformerOptions } from '@grafana/data/internal'; +import { + UnaryOptions, + CalculateFieldMode, + CalculateFieldTransformerOptions, +} from '@grafana/data/src/transformations/transformers/calculateField'; import { InlineField, InlineFieldRow, InlineLabel, Select } from '@grafana/ui'; import { LABEL_WIDTH } from './constants'; diff --git a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/WindowOptionsEditor.tsx b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/WindowOptionsEditor.tsx index 34fee4b264d..b025c705c12 100644 --- a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/WindowOptionsEditor.tsx +++ b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/WindowOptionsEditor.tsx @@ -5,7 +5,7 @@ import { CalculateFieldTransformerOptions, WindowOptions, WindowSizeMode, -} from '@grafana/data/internal'; +} from '@grafana/data/src/transformations/transformers/calculateField'; import { InlineField, RadioButtonGroup, Select, StatsPicker } from '@grafana/ui'; import { NumberInput } from 'app/core/components/OptionsUI/NumberInput'; diff --git a/public/app/features/transformers/editors/ConcatenateTransformerEditor.tsx b/public/app/features/transformers/editors/ConcatenateTransformerEditor.tsx index 91a0b251d74..8c548fb2f38 100644 --- a/public/app/features/transformers/editors/ConcatenateTransformerEditor.tsx +++ b/public/app/features/transformers/editors/ConcatenateTransformerEditor.tsx @@ -8,7 +8,10 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { ConcatenateFrameNameMode, ConcatenateTransformerOptions } from '@grafana/data/internal'; +import { + ConcatenateFrameNameMode, + ConcatenateTransformerOptions, +} from '@grafana/data/src/transformations/transformers/concat'; import { InlineField, Input, Select } from '@grafana/ui'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/ConvertFieldTypeTransformerEditor.tsx b/public/app/features/transformers/editors/ConvertFieldTypeTransformerEditor.tsx index e331388cb3e..c7d0f4f2f39 100644 --- a/public/app/features/transformers/editors/ConvertFieldTypeTransformerEditor.tsx +++ b/public/app/features/transformers/editors/ConvertFieldTypeTransformerEditor.tsx @@ -12,7 +12,10 @@ import { TransformerCategory, getTimeZones, } from '@grafana/data'; -import { ConvertFieldTypeOptions, ConvertFieldTypeTransformerOptions } from '@grafana/data/internal'; +import { + ConvertFieldTypeOptions, + ConvertFieldTypeTransformerOptions, +} from '@grafana/data/src/transformations/transformers/convertFieldType'; import { Button, InlineField, InlineFieldRow, Input, Select } from '@grafana/ui'; import { allFieldTypeIconOptions, FieldNamePicker } from '@grafana/ui/internal'; import { findField } from 'app/features/dimensions'; diff --git a/public/app/features/transformers/editors/EnumMappingEditor.tsx b/public/app/features/transformers/editors/EnumMappingEditor.tsx index ed1947a7181..09f1822302c 100644 --- a/public/app/features/transformers/editors/EnumMappingEditor.tsx +++ b/public/app/features/transformers/editors/EnumMappingEditor.tsx @@ -4,7 +4,7 @@ import { isEqual } from 'lodash'; import { useEffect, useState } from 'react'; import { DataFrame, EnumFieldConfig, GrafanaTheme2 } from '@grafana/data'; -import { ConvertFieldTypeTransformerOptions } from '@grafana/data/internal'; +import { ConvertFieldTypeTransformerOptions } from '@grafana/data/src/transformations/transformers/convertFieldType'; import { Button, HorizontalGroup, InlineFieldRow, useStyles2, VerticalGroup } from '@grafana/ui'; import EnumMappingRow from './EnumMappingRow'; diff --git a/public/app/features/transformers/editors/FilterByNameTransformerEditor.tsx b/public/app/features/transformers/editors/FilterByNameTransformerEditor.tsx index f8035a86f0b..8ac19f37e7f 100644 --- a/public/app/features/transformers/editors/FilterByNameTransformerEditor.tsx +++ b/public/app/features/transformers/editors/FilterByNameTransformerEditor.tsx @@ -11,7 +11,7 @@ import { TransformerCategory, SelectableValue, } from '@grafana/data'; -import { FilterFieldsByNameTransformerOptions } from '@grafana/data/internal'; +import { FilterFieldsByNameTransformerOptions } from '@grafana/data/src/transformations/transformers/filterByName'; import { getTemplateSrv } from '@grafana/runtime/src/services'; import { Input, FilterPill, InlineFieldRow, InlineField, InlineSwitch, Select } from '@grafana/ui'; diff --git a/public/app/features/transformers/editors/FilterByRefIdTransformerEditor.tsx b/public/app/features/transformers/editors/FilterByRefIdTransformerEditor.tsx index 05b9e196b83..f67a7cb2b95 100644 --- a/public/app/features/transformers/editors/FilterByRefIdTransformerEditor.tsx +++ b/public/app/features/transformers/editors/FilterByRefIdTransformerEditor.tsx @@ -6,7 +6,7 @@ import { TransformerCategory, FrameMatcherID, } from '@grafana/data'; -import { FilterFramesByRefIdTransformerOptions } from '@grafana/data/internal'; +import { FilterFramesByRefIdTransformerOptions } from '@grafana/data/src/transformations/transformers/filterByRefId'; import { FrameMultiSelectionEditor } from 'app/plugins/panel/geomap/editor/FrameSelectionEditor'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/FormatStringTransformerEditor.tsx b/public/app/features/transformers/editors/FormatStringTransformerEditor.tsx index cf14f69a044..e208d67976e 100644 --- a/public/app/features/transformers/editors/FormatStringTransformerEditor.tsx +++ b/public/app/features/transformers/editors/FormatStringTransformerEditor.tsx @@ -12,7 +12,10 @@ import { FieldNamePickerConfigSettings, TransformerCategory, } from '@grafana/data'; -import { FormatStringOutput, FormatStringTransformerOptions } from '@grafana/data/internal'; +import { + FormatStringOutput, + FormatStringTransformerOptions, +} from '@grafana/data/src/transformations/transformers/formatString'; import { Select, InlineFieldRow, InlineField } from '@grafana/ui'; import { FieldNamePicker } from '@grafana/ui/internal'; import { NumberInput } from 'app/core/components/OptionsUI/NumberInput'; diff --git a/public/app/features/transformers/editors/FormatTimeTransformerEditor.tsx b/public/app/features/transformers/editors/FormatTimeTransformerEditor.tsx index 3f30a79d1a5..4c2a646d93f 100644 --- a/public/app/features/transformers/editors/FormatTimeTransformerEditor.tsx +++ b/public/app/features/transformers/editors/FormatTimeTransformerEditor.tsx @@ -9,7 +9,7 @@ import { getFieldDisplayName, PluginState, } from '@grafana/data'; -import { FormatTimeTransformerOptions } from '@grafana/data/internal'; +import { FormatTimeTransformerOptions } from '@grafana/data/src/transformations/transformers/formatTime'; import { Select, InlineFieldRow, InlineField, Input } from '@grafana/ui'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/GroupByTransformerEditor.tsx b/public/app/features/transformers/editors/GroupByTransformerEditor.tsx index 5dc4636bf59..ca4386f541f 100644 --- a/public/app/features/transformers/editors/GroupByTransformerEditor.tsx +++ b/public/app/features/transformers/editors/GroupByTransformerEditor.tsx @@ -11,7 +11,11 @@ import { TransformerCategory, GrafanaTheme2, } from '@grafana/data'; -import { GroupByFieldOptions, GroupByOperationID, GroupByTransformerOptions } from '@grafana/data/internal'; +import { + GroupByFieldOptions, + GroupByOperationID, + GroupByTransformerOptions, +} from '@grafana/data/src/transformations/transformers/groupBy'; import { useTheme2, Select, StatsPicker, InlineField, Stack, Alert } from '@grafana/ui'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/GroupToNestedTableTransformerEditor.tsx b/public/app/features/transformers/editors/GroupToNestedTableTransformerEditor.tsx index 9b874bf5c64..17170be06cc 100644 --- a/public/app/features/transformers/editors/GroupToNestedTableTransformerEditor.tsx +++ b/public/app/features/transformers/editors/GroupToNestedTableTransformerEditor.tsx @@ -16,9 +16,11 @@ import { GroupByFieldOptions, GroupByOperationID, GroupByTransformerOptions, +} from '@grafana/data/src/transformations/transformers/groupBy'; +import { GroupToNestedTableTransformerOptions, SHOW_NESTED_HEADERS_DEFAULT, -} from '@grafana/data/internal'; +} from '@grafana/data/src/transformations/transformers/groupToNestedTable'; import { useTheme2, Select, StatsPicker, InlineField, Field, Switch, Alert, Stack } from '@grafana/ui'; import { useAllFieldNamesFromDataFrames } from '../utils'; diff --git a/public/app/features/transformers/editors/HistogramTransformerEditor.tsx b/public/app/features/transformers/editors/HistogramTransformerEditor.tsx index e9fa82aec13..a257f02b0af 100644 --- a/public/app/features/transformers/editors/HistogramTransformerEditor.tsx +++ b/public/app/features/transformers/editors/HistogramTransformerEditor.tsx @@ -7,7 +7,10 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { histogramFieldInfo, HistogramTransformerInputs } from '@grafana/data/internal'; +import { + histogramFieldInfo, + HistogramTransformerInputs, +} from '@grafana/data/src/transformations/transformers/histogram'; import { InlineField, InlineFieldRow, InlineSwitch } from '@grafana/ui'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/JoinByFieldTransformerEditor.tsx b/public/app/features/transformers/editors/JoinByFieldTransformerEditor.tsx index a28c8548780..cccf062d843 100644 --- a/public/app/features/transformers/editors/JoinByFieldTransformerEditor.tsx +++ b/public/app/features/transformers/editors/JoinByFieldTransformerEditor.tsx @@ -8,7 +8,7 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { JoinByFieldOptions, JoinMode } from '@grafana/data/internal'; +import { JoinByFieldOptions, JoinMode } from '@grafana/data/src/transformations/transformers/joinByField'; import { getTemplateSrv } from '@grafana/runtime'; import { Select, InlineFieldRow, InlineField } from '@grafana/ui'; import { useFieldDisplayNames, useSelectOptions } from '@grafana/ui/internal'; diff --git a/public/app/features/transformers/editors/LabelsToFieldsTransformerEditor.tsx b/public/app/features/transformers/editors/LabelsToFieldsTransformerEditor.tsx index 263aff71a36..e41017a51a2 100644 --- a/public/app/features/transformers/editors/LabelsToFieldsTransformerEditor.tsx +++ b/public/app/features/transformers/editors/LabelsToFieldsTransformerEditor.tsx @@ -8,7 +8,10 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { LabelsToFieldsMode, LabelsToFieldsOptions } from '@grafana/data/internal'; +import { + LabelsToFieldsMode, + LabelsToFieldsOptions, +} from '@grafana/data/src/transformations/transformers/labelsToFields'; import { InlineField, InlineFieldRow, RadioButtonGroup, Select, FilterPill, Stack } from '@grafana/ui'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/LimitTransformerEditor.tsx b/public/app/features/transformers/editors/LimitTransformerEditor.tsx index fd10293e2ce..c55cb9bbfd3 100644 --- a/public/app/features/transformers/editors/LimitTransformerEditor.tsx +++ b/public/app/features/transformers/editors/LimitTransformerEditor.tsx @@ -7,7 +7,7 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { LimitTransformerOptions } from '@grafana/data/internal'; +import { LimitTransformerOptions } from '@grafana/data/src/transformations/transformers/limit'; import { InlineFieldRow } from '@grafana/ui'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/MergeTransformerEditor.tsx b/public/app/features/transformers/editors/MergeTransformerEditor.tsx index c81f59bcf9b..cd55fbd5543 100644 --- a/public/app/features/transformers/editors/MergeTransformerEditor.tsx +++ b/public/app/features/transformers/editors/MergeTransformerEditor.tsx @@ -5,7 +5,7 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { MergeTransformerOptions } from '@grafana/data/internal'; +import { MergeTransformerOptions } from '@grafana/data/src/transformations/transformers/merge'; import { FieldValidationMessage } from '@grafana/ui'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/OrganizeFieldsTransformerEditor.tsx b/public/app/features/transformers/editors/OrganizeFieldsTransformerEditor.tsx index b253066abbf..ef640a79dad 100644 --- a/public/app/features/transformers/editors/OrganizeFieldsTransformerEditor.tsx +++ b/public/app/features/transformers/editors/OrganizeFieldsTransformerEditor.tsx @@ -10,7 +10,8 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { createOrderFieldsComparer, OrganizeFieldsTransformerOptions } from '@grafana/data/internal'; +import { createOrderFieldsComparer } from '@grafana/data/src/transformations/transformers/order'; +import { OrganizeFieldsTransformerOptions } from '@grafana/data/src/transformations/transformers/organize'; import { Input, IconButton, diff --git a/public/app/features/transformers/editors/ReduceTransformerEditor.tsx b/public/app/features/transformers/editors/ReduceTransformerEditor.tsx index 3131e85be1d..fc8e10c6b7e 100644 --- a/public/app/features/transformers/editors/ReduceTransformerEditor.tsx +++ b/public/app/features/transformers/editors/ReduceTransformerEditor.tsx @@ -9,7 +9,7 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { ReduceTransformerMode, ReduceTransformerOptions } from '@grafana/data/internal'; +import { ReduceTransformerMode, ReduceTransformerOptions } from '@grafana/data/src/transformations/transformers/reduce'; import { selectors } from '@grafana/e2e-selectors'; import { InlineField, Select, StatsPicker, InlineSwitch } from '@grafana/ui'; diff --git a/public/app/features/transformers/editors/RenameByRegexTransformer.tsx b/public/app/features/transformers/editors/RenameByRegexTransformer.tsx index 4530ad8b84a..d192c4a9ee0 100644 --- a/public/app/features/transformers/editors/RenameByRegexTransformer.tsx +++ b/public/app/features/transformers/editors/RenameByRegexTransformer.tsx @@ -8,7 +8,7 @@ import { stringToJsRegex, TransformerCategory, } from '@grafana/data'; -import { RenameByRegexTransformerOptions } from '@grafana/data/internal'; +import { RenameByRegexTransformerOptions } from '@grafana/data/src/transformations/transformers/renameByRegex'; import { InlineField, Input } from '@grafana/ui'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/SeriesToRowsTransformerEditor.tsx b/public/app/features/transformers/editors/SeriesToRowsTransformerEditor.tsx index 8b3b66e64ed..606d0cdb417 100644 --- a/public/app/features/transformers/editors/SeriesToRowsTransformerEditor.tsx +++ b/public/app/features/transformers/editors/SeriesToRowsTransformerEditor.tsx @@ -5,7 +5,7 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { SeriesToRowsTransformerOptions } from '@grafana/data/internal'; +import { SeriesToRowsTransformerOptions } from '@grafana/data/src/transformations/transformers/seriesToRows'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/SortByTransformerEditor.tsx b/public/app/features/transformers/editors/SortByTransformerEditor.tsx index 4247e1c4f66..3faa19ebf8f 100644 --- a/public/app/features/transformers/editors/SortByTransformerEditor.tsx +++ b/public/app/features/transformers/editors/SortByTransformerEditor.tsx @@ -7,7 +7,7 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { SortByField, SortByTransformerOptions } from '@grafana/data/internal'; +import { SortByField, SortByTransformerOptions } from '@grafana/data/src/transformations/transformers/sortBy'; import { getTemplateSrv } from '@grafana/runtime'; import { InlineField, InlineSwitch, InlineFieldRow, Select } from '@grafana/ui'; diff --git a/public/app/features/transformers/editors/TransposeTransformerEditor.tsx b/public/app/features/transformers/editors/TransposeTransformerEditor.tsx index 9ba613fe78c..4190d385e48 100644 --- a/public/app/features/transformers/editors/TransposeTransformerEditor.tsx +++ b/public/app/features/transformers/editors/TransposeTransformerEditor.tsx @@ -5,7 +5,7 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { TransposeTransformerOptions } from '@grafana/data/internal'; +import { TransposeTransformerOptions } from '@grafana/data/src/transformations/transformers/transpose'; import { InlineField, InlineFieldRow, Input } from '@grafana/ui'; export const TransposeTransfomerEditor = ({ options, onChange }: TransformerUIProps) => { diff --git a/public/app/features/transformers/extractFields/extractFields.test.ts b/public/app/features/transformers/extractFields/extractFields.test.ts index 863b89163ca..a6617aecea9 100644 --- a/public/app/features/transformers/extractFields/extractFields.test.ts +++ b/public/app/features/transformers/extractFields/extractFields.test.ts @@ -5,9 +5,10 @@ import { Field, FieldType, transformDataFrame, - toDataFrame, } from '@grafana/data'; -import { mockTransformationsRegistry, SortByTransformerOptions, sortByTransformer } from '@grafana/data/internal'; +import { toDataFrame } from '@grafana/data/src/dataframe/processDataFrame'; +import { SortByTransformerOptions, sortByTransformer } from '@grafana/data/src/transformations/transformers/sortBy'; +import { mockTransformationsRegistry } from '@grafana/data/src/utils/tests/mockTransformationsRegistry'; import { extractFieldsTransformer } from './extractFields'; import { ExtractFieldsOptions, FieldExtractorID } from './types'; diff --git a/public/app/features/transformers/lookupGazetteer/fieldLookup.test.ts b/public/app/features/transformers/lookupGazetteer/fieldLookup.test.ts index bc0ef8c8b82..7f0072dd4d7 100644 --- a/public/app/features/transformers/lookupGazetteer/fieldLookup.test.ts +++ b/public/app/features/transformers/lookupGazetteer/fieldLookup.test.ts @@ -1,4 +1,6 @@ -import { DataTransformerID, toDataFrame, FieldMatcherID, fieldMatchers, FieldType } from '@grafana/data'; +import { FieldMatcherID, fieldMatchers, FieldType } from '@grafana/data'; +import { toDataFrame } from '@grafana/data/src/dataframe/processDataFrame'; +import { DataTransformerID } from '@grafana/data/src/transformations/transformers/ids'; import { frameAsGazetter } from 'app/features/geo/gazetteer/gazetteer'; import { addFieldsFromGazetteer } from './fieldLookup'; diff --git a/public/app/features/transformers/partitionByValues/partitionByValues.ts b/public/app/features/transformers/partitionByValues/partitionByValues.ts index 4ab8d360cbe..80c349fe762 100644 --- a/public/app/features/transformers/partitionByValues/partitionByValues.ts +++ b/public/app/features/transformers/partitionByValues/partitionByValues.ts @@ -8,7 +8,8 @@ import { DataTransformContext, FieldMatcher, } from '@grafana/data'; -import { getMatcherConfig, noopTransformer } from '@grafana/data/internal'; +import { getMatcherConfig } from '@grafana/data/src/transformations/transformers/filterByName'; +import { noopTransformer } from '@grafana/data/src/transformations/transformers/noop'; import { partition } from './partition'; diff --git a/public/app/features/transformers/spatial/optionsHelper.tsx b/public/app/features/transformers/spatial/optionsHelper.tsx index e493dfc7d0c..49f77cf7927 100644 --- a/public/app/features/transformers/spatial/optionsHelper.tsx +++ b/public/app/features/transformers/spatial/optionsHelper.tsx @@ -1,7 +1,8 @@ import { set, get as lodashGet } from 'lodash'; import { StandardEditorContext, TransformerUIProps, PanelOptionsEditorBuilder } from '@grafana/data'; -import { NestedValueAccess, PanelOptionsSupplier } from '@grafana/data/internal'; +import { PanelOptionsSupplier } from '@grafana/data/src/panel/PanelPlugin'; +import { NestedValueAccess } from '@grafana/data/src/utils/OptionsUIBuilders'; import { OptionsPaneCategoryDescriptor } from 'app/features/dashboard/components/PanelEditor/OptionsPaneCategoryDescriptor'; import { fillOptionsPaneItems } from 'app/features/dashboard/components/PanelEditor/getVisualizationOptions'; import { setOptionImmutably } from 'app/features/dashboard/components/PanelEditor/utils'; diff --git a/public/app/features/transformers/spatial/spatialTransformer.test.ts b/public/app/features/transformers/spatial/spatialTransformer.test.ts index 196a6b3680d..b36315fefe5 100644 --- a/public/app/features/transformers/spatial/spatialTransformer.test.ts +++ b/public/app/features/transformers/spatial/spatialTransformer.test.ts @@ -1,5 +1,6 @@ -import { toDataFrame, FieldMatcherID, fieldMatchers, FieldType } from '@grafana/data'; -import { DataTransformerID } from '@grafana/data/internal'; +import { FieldMatcherID, fieldMatchers, FieldType } from '@grafana/data'; +import { toDataFrame } from '@grafana/data/src/dataframe/processDataFrame'; +import { DataTransformerID } from '@grafana/data/src/transformations/transformers/ids'; import { frameAsGazetter } from 'app/features/geo/gazetteer/gazetteer'; describe('spatial transformer', () => { diff --git a/public/app/features/variables/datasource/actions.test.ts b/public/app/features/variables/datasource/actions.test.ts index 2a0b42b30ff..4d3a5ca8e94 100644 --- a/public/app/features/variables/datasource/actions.test.ts +++ b/public/app/features/variables/datasource/actions.test.ts @@ -1,5 +1,5 @@ import { DataSourceInstanceSettings } from '@grafana/data'; -import { getMockPlugin } from '@grafana/data/test'; +import { getMockPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { reduxTester } from '../../../../test/core/redux/reduxTester'; import { variableAdapters } from '../adapters'; diff --git a/public/app/features/variables/datasource/reducer.test.ts b/public/app/features/variables/datasource/reducer.test.ts index 6a3abaa27cb..2acb6e96346 100644 --- a/public/app/features/variables/datasource/reducer.test.ts +++ b/public/app/features/variables/datasource/reducer.test.ts @@ -1,7 +1,7 @@ import { cloneDeep } from 'lodash'; import { DataSourceInstanceSettings, DataSourceVariableModel } from '@grafana/data'; -import { getMockPlugins } from '@grafana/data/test'; +import { getMockPlugins } from '@grafana/data/test/__mocks__/pluginMocks'; import { reducerTester } from '../../../../test/core/redux/reducerTester'; import { getDataSourceInstanceSetting } from '../shared/testing/helpers'; diff --git a/public/app/features/variables/state/initVariableTransaction.test.ts b/public/app/features/variables/state/initVariableTransaction.test.ts index 0e9c0070023..ba9939b8442 100644 --- a/public/app/features/variables/state/initVariableTransaction.test.ts +++ b/public/app/features/variables/state/initVariableTransaction.test.ts @@ -1,4 +1,4 @@ -import { DataSourceRef, LoadingState } from '@grafana/data'; +import { DataSourceRef, LoadingState } from '@grafana/data/src'; import { setDataSourceSrv } from '@grafana/runtime/src'; import { DashboardModel } from 'app/features/dashboard/state/DashboardModel'; diff --git a/public/app/features/variables/state/migrateVariablesDatasourceNameToRef.test.ts b/public/app/features/variables/state/migrateVariablesDatasourceNameToRef.test.ts index 7673e9bf8d5..aea1a31a10b 100644 --- a/public/app/features/variables/state/migrateVariablesDatasourceNameToRef.test.ts +++ b/public/app/features/variables/state/migrateVariablesDatasourceNameToRef.test.ts @@ -1,4 +1,4 @@ -import { DataSourceRef } from '@grafana/data'; +import { DataSourceRef } from '@grafana/data/src'; import { adHocBuilder, queryBuilder } from '../shared/testing/builders'; import { toVariablePayload } from '../utils'; diff --git a/public/app/plugins/datasource/azuremonitor/__mocks__/utils.ts b/public/app/plugins/datasource/azuremonitor/__mocks__/utils.ts index 3e0204fdd6e..921573b797e 100644 --- a/public/app/plugins/datasource/azuremonitor/__mocks__/utils.ts +++ b/public/app/plugins/datasource/azuremonitor/__mocks__/utils.ts @@ -1,4 +1,5 @@ -import { LoadingState, VariableType, VariableWithOptions } from '@grafana/data'; +import { VariableType, VariableWithOptions } from '@grafana/data'; +import { LoadingState } from '@grafana/data/src/types/data'; interface TemplateableValue { variableName: string; diff --git a/public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/RawQuery.tsx b/public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/RawQuery.tsx index bbf7c27cc5c..742b12b9d50 100644 --- a/public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/RawQuery.tsx +++ b/public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/RawQuery.tsx @@ -1,7 +1,7 @@ import { css, cx } from '@emotion/css'; import Prism, { Grammar } from 'prismjs'; -import { GrafanaTheme2 } from '@grafana/data'; +import { GrafanaTheme2 } from '@grafana/data/src'; import { useTheme2 } from '@grafana/ui'; export interface Props { diff --git a/public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchMetricsQueryRunner.test.ts b/public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchMetricsQueryRunner.test.ts index 7654c6228cd..637328f022a 100644 --- a/public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchMetricsQueryRunner.test.ts +++ b/public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchMetricsQueryRunner.test.ts @@ -1,6 +1,7 @@ import { of } from 'rxjs'; -import { dateTime, CustomVariableModel, getFrameDisplayName, VariableHide } from '@grafana/data'; +import { CustomVariableModel, getFrameDisplayName, VariableHide } from '@grafana/data'; +import { dateTime } from '@grafana/data/src/datetime/moment_wrapper'; import { toDataQueryResponse } from '@grafana/runtime'; import { diff --git a/public/app/plugins/datasource/dashboard/datasource.test.ts b/public/app/plugins/datasource/dashboard/datasource.test.ts index a543c5037d4..114bb966941 100644 --- a/public/app/plugins/datasource/dashboard/datasource.test.ts +++ b/public/app/plugins/datasource/dashboard/datasource.test.ts @@ -8,7 +8,7 @@ import { LoadingState, standardTransformersRegistry, } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { setPluginImportUtils } from '@grafana/runtime'; import { SafeSerializableSceneObject, diff --git a/public/app/plugins/datasource/elasticsearch/ElasticResponse.ts b/public/app/plugins/datasource/elasticsearch/ElasticResponse.ts index 103a571b8a6..5b46beee758 100644 --- a/public/app/plugins/datasource/elasticsearch/ElasticResponse.ts +++ b/public/app/plugins/datasource/elasticsearch/ElasticResponse.ts @@ -8,7 +8,7 @@ import { MutableDataFrame, PreferredVisualisationType, } from '@grafana/data'; -import { convertFieldType } from '@grafana/data/internal'; +import { convertFieldType } from '@grafana/data/src/transformations/transformers/convertFieldType'; import TableModel from 'app/core/TableModel'; import { isMetricAggregationWithField } from './components/QueryEditor/MetricAggregationsEditor/aggregations'; diff --git a/public/app/plugins/datasource/influxdb/components/editor/annotation/AnnotationEditor.tsx b/public/app/plugins/datasource/influxdb/components/editor/annotation/AnnotationEditor.tsx index 71418a7904e..a0feea2669b 100644 --- a/public/app/plugins/datasource/influxdb/components/editor/annotation/AnnotationEditor.tsx +++ b/public/app/plugins/datasource/influxdb/components/editor/annotation/AnnotationEditor.tsx @@ -1,6 +1,6 @@ import { useState } from 'react'; -import { QueryEditorProps } from '@grafana/data'; +import { QueryEditorProps } from '@grafana/data/src'; import { InlineFormLabel, Input, Stack } from '@grafana/ui'; import InfluxDatasource from '../../../datasource'; diff --git a/public/app/plugins/datasource/influxdb/components/editor/constants.ts b/public/app/plugins/datasource/influxdb/components/editor/constants.ts index f9f0c4850a5..e234d7652ea 100644 --- a/public/app/plugins/datasource/influxdb/components/editor/constants.ts +++ b/public/app/plugins/datasource/influxdb/components/editor/constants.ts @@ -1,4 +1,4 @@ -import { SelectableValue } from '@grafana/data'; +import { SelectableValue } from '@grafana/data/src'; import { ResultFormat } from '../../types'; diff --git a/public/app/plugins/datasource/influxdb/components/editor/query/QueryEditor.tsx b/public/app/plugins/datasource/influxdb/components/editor/query/QueryEditor.tsx index 079bb5ba02e..acb8d949f4c 100644 --- a/public/app/plugins/datasource/influxdb/components/editor/query/QueryEditor.tsx +++ b/public/app/plugins/datasource/influxdb/components/editor/query/QueryEditor.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { QueryEditorProps } from '@grafana/data'; +import { QueryEditorProps } from '@grafana/data/src'; import InfluxDatasource from '../../../datasource'; import { buildRawQuery } from '../../../queryUtils'; diff --git a/public/app/plugins/datasource/influxdb/components/editor/query/flux/FluxQueryEditor.tsx b/public/app/plugins/datasource/influxdb/components/editor/query/flux/FluxQueryEditor.tsx index daedc65855e..b5b594f3445 100644 --- a/public/app/plugins/datasource/influxdb/components/editor/query/flux/FluxQueryEditor.tsx +++ b/public/app/plugins/datasource/influxdb/components/editor/query/flux/FluxQueryEditor.tsx @@ -1,7 +1,7 @@ import { css, cx } from '@emotion/css'; import { PureComponent } from 'react'; -import { GrafanaTheme2, SelectableValue } from '@grafana/data'; +import { GrafanaTheme2, SelectableValue } from '@grafana/data/src'; import { getTemplateSrv } from '@grafana/runtime/src'; import { CodeEditor, diff --git a/public/app/plugins/datasource/influxdb/components/editor/query/fsql/FSQLEditor.tsx b/public/app/plugins/datasource/influxdb/components/editor/query/fsql/FSQLEditor.tsx index e25e951c25d..4858da88623 100644 --- a/public/app/plugins/datasource/influxdb/components/editor/query/fsql/FSQLEditor.tsx +++ b/public/app/plugins/datasource/influxdb/components/editor/query/fsql/FSQLEditor.tsx @@ -1,7 +1,7 @@ import { css, cx } from '@emotion/css'; import { PureComponent } from 'react'; -import { GrafanaTheme2 } from '@grafana/data'; +import { GrafanaTheme2 } from '@grafana/data/src'; import { SQLQuery, SqlQueryEditorLazy, applyQueryDefaults } from '@grafana/sql'; import { InlineFormLabel, LinkButton, Themeable2, withTheme2 } from '@grafana/ui'; diff --git a/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/getTemplateVariableOptions.ts b/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/getTemplateVariableOptions.ts index b3e9860798e..51db862e4d9 100644 --- a/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/getTemplateVariableOptions.ts +++ b/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/getTemplateVariableOptions.ts @@ -1,4 +1,4 @@ -import { TypedVariableModel } from '@grafana/data'; +import { TypedVariableModel } from '@grafana/data/src'; import { getTemplateSrv } from '@grafana/runtime/src'; export function getTemplateVariableOptions(wrapper: (v: TypedVariableModel) => string) { diff --git a/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/withTemplateVariableOptions.ts b/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/withTemplateVariableOptions.ts index c346946dbfc..89bd1372bcd 100644 --- a/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/withTemplateVariableOptions.ts +++ b/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/withTemplateVariableOptions.ts @@ -1,5 +1,5 @@ // helper function to make it easy to call this from the widget-render-code -import { TypedVariableModel } from '@grafana/data'; +import { TypedVariableModel } from '@grafana/data/src'; import { getTemplateVariableOptions } from './getTemplateVariableOptions'; diff --git a/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/wrapper.ts b/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/wrapper.ts index 745ada1dd39..769a9a435a4 100644 --- a/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/wrapper.ts +++ b/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/wrapper.ts @@ -1,4 +1,4 @@ -import { TypedVariableModel } from '@grafana/data'; +import { TypedVariableModel } from '@grafana/data/src'; export function wrapRegex(v: TypedVariableModel): string { return `/^$${v.name}$/`; diff --git a/public/app/plugins/datasource/influxdb/influxql_metadata_query.ts b/public/app/plugins/datasource/influxdb/influxql_metadata_query.ts index 314b70c2d15..b343f668018 100644 --- a/public/app/plugins/datasource/influxdb/influxql_metadata_query.ts +++ b/public/app/plugins/datasource/influxdb/influxql_metadata_query.ts @@ -1,4 +1,4 @@ -import { ScopedVars } from '@grafana/data'; +import { ScopedVars } from '@grafana/data/src'; import config from 'app/core/config'; import InfluxDatasource from './datasource'; diff --git a/public/app/plugins/datasource/tempo/_importedDependencies/datasources/prometheus/RawQuery.tsx b/public/app/plugins/datasource/tempo/_importedDependencies/datasources/prometheus/RawQuery.tsx index bbf7c27cc5c..742b12b9d50 100644 --- a/public/app/plugins/datasource/tempo/_importedDependencies/datasources/prometheus/RawQuery.tsx +++ b/public/app/plugins/datasource/tempo/_importedDependencies/datasources/prometheus/RawQuery.tsx @@ -1,7 +1,7 @@ import { css, cx } from '@emotion/css'; import Prism, { Grammar } from 'prismjs'; -import { GrafanaTheme2 } from '@grafana/data'; +import { GrafanaTheme2 } from '@grafana/data/src'; import { useTheme2 } from '@grafana/ui'; export interface Props { diff --git a/public/app/plugins/datasource/tempo/types.ts b/public/app/plugins/datasource/tempo/types.ts index 02dbe712969..de6c050fb6c 100644 --- a/public/app/plugins/datasource/tempo/types.ts +++ b/public/app/plugins/datasource/tempo/types.ts @@ -1,4 +1,4 @@ -import { DataSourceJsonData } from '@grafana/data'; +import { DataSourceJsonData } from '@grafana/data/src'; import { NodeGraphOptions, TraceToLogsOptions } from '@grafana/o11y-ds-frontend'; import { TempoQuery as TempoBase, TempoQueryType, TraceqlFilter } from './dataquery.gen'; diff --git a/public/app/plugins/panel/barchart/bars.ts b/public/app/plugins/panel/barchart/bars.ts index 40a3c62f73d..7d3e318eea3 100644 --- a/public/app/plugins/panel/barchart/bars.ts +++ b/public/app/plugins/panel/barchart/bars.ts @@ -1,6 +1,7 @@ import uPlot, { Axis, AlignedData, Scale } from 'uplot'; -import { colorManipulator, DataFrame, dateTimeFormat, GrafanaTheme2, systemDateFormats, TimeZone } from '@grafana/data'; +import { DataFrame, dateTimeFormat, GrafanaTheme2, systemDateFormats, TimeZone } from '@grafana/data'; +import { alpha } from '@grafana/data/src/themes/colorManipulator'; import { StackingMode, VisibilityMode, @@ -544,8 +545,7 @@ export function getConfig(opts: BarsOptions, theme: GrafanaTheme2) { }); barsColors.push({ - fill: - fillOpacity < 1 ? colors.map((c) => (c != null ? colorManipulator.alpha(c, fillOpacity) : null)) : colors, + fill: fillOpacity < 1 ? colors.map((c) => (c != null ? alpha(c, fillOpacity) : null)) : colors, stroke: colors, }); } diff --git a/public/app/plugins/panel/barchart/utils.ts b/public/app/plugins/panel/barchart/utils.ts index ebd8ac300af..9b25e678f1f 100644 --- a/public/app/plugins/panel/barchart/utils.ts +++ b/public/app/plugins/panel/barchart/utils.ts @@ -13,7 +13,7 @@ import { getFieldSeriesColor, outerJoinDataFrames, } from '@grafana/data'; -import { decoupleHideFromState } from '@grafana/data/internal'; +import { decoupleHideFromState } from '@grafana/data/src/field/fieldState'; import { AxisColorMode, AxisPlacement, diff --git a/public/app/plugins/panel/bargauge/BarGaugeLegend.tsx b/public/app/plugins/panel/bargauge/BarGaugeLegend.tsx index 5364552267a..0ddecee36f6 100644 --- a/public/app/plugins/panel/bargauge/BarGaugeLegend.tsx +++ b/public/app/plugins/panel/bargauge/BarGaugeLegend.tsx @@ -1,6 +1,7 @@ import { memo } from 'react'; -import { Field, cacheFieldDisplayNames, DataFrame, FieldType, getFieldSeriesColor } from '@grafana/data'; +import { cacheFieldDisplayNames, DataFrame, FieldType, getFieldSeriesColor } from '@grafana/data'; +import { Field } from '@grafana/data/'; import { AxisPlacement, VizLegendOptions } from '@grafana/schema'; import { useTheme2, VizLayout, VizLayoutLegendProps, VizLegend, VizLegendItem } from '@grafana/ui'; import { getDisplayValuesForCalcs } from '@grafana/ui/internal'; diff --git a/public/app/plugins/panel/candlestick/fields.ts b/public/app/plugins/panel/candlestick/fields.ts index 5019dfe06d0..c370b953a72 100644 --- a/public/app/plugins/panel/candlestick/fields.ts +++ b/public/app/plugins/panel/candlestick/fields.ts @@ -7,7 +7,7 @@ import { outerJoinDataFrames, TimeRange, } from '@grafana/data'; -import { maybeSortFrame } from '@grafana/data/internal'; +import { maybeSortFrame } from '@grafana/data/src/transformations/transformers/joinDataFrames'; import { findField } from 'app/features/dimensions'; import { prepareGraphableFields } from '../timeseries/utils'; diff --git a/public/app/plugins/panel/canvas/components/CanvasTooltip.tsx b/public/app/plugins/panel/canvas/components/CanvasTooltip.tsx index ceb17a8ce7d..aa756baa9c8 100644 --- a/public/app/plugins/panel/canvas/components/CanvasTooltip.tsx +++ b/public/app/plugins/panel/canvas/components/CanvasTooltip.tsx @@ -12,8 +12,8 @@ import { getFieldDisplayName, ScopedVars, ValueLinkConfig, - ActionModel, -} from '@grafana/data'; +} from '@grafana/data/src'; +import { ActionModel } from '@grafana/data/src/types/action'; import { Portal, useStyles2, VizTooltipContainer } from '@grafana/ui'; import { VizTooltipContent, diff --git a/public/app/plugins/panel/canvas/editor/connectionEditor.tsx b/public/app/plugins/panel/canvas/editor/connectionEditor.tsx index 869bcec4adb..96e8a21b331 100644 --- a/public/app/plugins/panel/canvas/editor/connectionEditor.tsx +++ b/public/app/plugins/panel/canvas/editor/connectionEditor.tsx @@ -1,6 +1,6 @@ import { get as lodashGet } from 'lodash'; -import { NestedPanelOptions, NestedValueAccess } from '@grafana/data/internal'; +import { NestedPanelOptions, NestedValueAccess } from '@grafana/data/src/utils/OptionsUIBuilders'; import { Scene } from 'app/features/canvas/runtime/scene'; import { setOptionImmutably } from 'app/features/dashboard/components/PanelEditor/utils'; diff --git a/public/app/plugins/panel/canvas/editor/element/QuickPositioning.tsx b/public/app/plugins/panel/canvas/editor/element/QuickPositioning.tsx index c63a14aabc6..acfe2f3b755 100644 --- a/public/app/plugins/panel/canvas/editor/element/QuickPositioning.tsx +++ b/public/app/plugins/panel/canvas/editor/element/QuickPositioning.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data'; +import { GrafanaTheme2 } from '@grafana/data/src'; import { IconButton, useStyles2 } from '@grafana/ui'; import { ElementState } from 'app/features/canvas/runtime/element'; import { QuickPlacement } from 'app/features/canvas/types'; diff --git a/public/app/plugins/panel/canvas/editor/element/elementEditor.tsx b/public/app/plugins/panel/canvas/editor/element/elementEditor.tsx index 4e0164319ea..bdad1130a50 100644 --- a/public/app/plugins/panel/canvas/editor/element/elementEditor.tsx +++ b/public/app/plugins/panel/canvas/editor/element/elementEditor.tsx @@ -1,6 +1,6 @@ import { get as lodashGet } from 'lodash'; -import { NestedPanelOptions, NestedValueAccess } from '@grafana/data/internal'; +import { NestedPanelOptions, NestedValueAccess } from '@grafana/data/src/utils/OptionsUIBuilders'; import { CanvasElementOptions } from 'app/features/canvas/element'; import { canvasElementRegistry, diff --git a/public/app/plugins/panel/canvas/editor/inline/InlineEditBody.tsx b/public/app/plugins/panel/canvas/editor/inline/InlineEditBody.tsx index 8c6a2764035..5b13b982eb8 100644 --- a/public/app/plugins/panel/canvas/editor/inline/InlineEditBody.tsx +++ b/public/app/plugins/panel/canvas/editor/inline/InlineEditBody.tsx @@ -4,7 +4,8 @@ import { useMemo, useState } from 'react'; import { useObservable } from 'react-use'; import { DataFrame, GrafanaTheme2, PanelOptionsEditorBuilder, StandardEditorContext } from '@grafana/data'; -import { NestedValueAccess, PanelOptionsSupplier } from '@grafana/data/internal'; +import { PanelOptionsSupplier } from '@grafana/data/src/panel/PanelPlugin'; +import { NestedValueAccess } from '@grafana/data/src/utils/OptionsUIBuilders'; import { useStyles2 } from '@grafana/ui'; import { AddLayerButton } from 'app/core/components/Layers/AddLayerButton'; import { FrameState } from 'app/features/canvas/runtime/frame'; diff --git a/public/app/plugins/panel/canvas/editor/layer/layerEditor.tsx b/public/app/plugins/panel/canvas/editor/layer/layerEditor.tsx index 69a0e9aa29e..59c9b40fd46 100644 --- a/public/app/plugins/panel/canvas/editor/layer/layerEditor.tsx +++ b/public/app/plugins/panel/canvas/editor/layer/layerEditor.tsx @@ -1,6 +1,6 @@ import { get as lodashGet } from 'lodash'; -import { NestedPanelOptions, NestedValueAccess } from '@grafana/data/internal'; +import { NestedPanelOptions, NestedValueAccess } from '@grafana/data/src/utils/OptionsUIBuilders'; import { ElementState } from 'app/features/canvas/runtime/element'; import { FrameState } from 'app/features/canvas/runtime/frame'; import { Scene } from 'app/features/canvas/runtime/scene'; diff --git a/public/app/plugins/panel/canvas/editor/options.ts b/public/app/plugins/panel/canvas/editor/options.ts index 48640dfddb0..221ab5f7979 100644 --- a/public/app/plugins/panel/canvas/editor/options.ts +++ b/public/app/plugins/panel/canvas/editor/options.ts @@ -1,7 +1,7 @@ import { capitalize } from 'lodash'; import { FieldType } from '@grafana/data'; -import { PanelOptionsSupplier } from '@grafana/data/internal'; +import { PanelOptionsSupplier } from '@grafana/data/src/panel/PanelPlugin'; import { ConnectionDirection } from 'app/features/canvas/element'; import { SVGElements } from 'app/features/canvas/runtime/element'; import { ColorDimensionEditor, ResourceDimensionEditor, ScaleDimensionEditor } from 'app/features/dimensions/editors'; diff --git a/public/app/plugins/panel/canvas/utils.ts b/public/app/plugins/panel/canvas/utils.ts index 386466d3378..bf5fb30b15f 100644 --- a/public/app/plugins/panel/canvas/utils.ts +++ b/public/app/plugins/panel/canvas/utils.ts @@ -1,6 +1,7 @@ import { isNumber, isString } from 'lodash'; -import { DataFrame, Field, AppEvents, getFieldDisplayName, PluginState, SelectableValue } from '@grafana/data'; +import { AppEvents, getFieldDisplayName, PluginState, SelectableValue } from '@grafana/data'; +import { DataFrame, Field } from '@grafana/data/'; import appEvents from 'app/core/app_events'; import { hasAlphaPanels, config } from 'app/core/config'; import { diff --git a/public/app/plugins/panel/datagrid/components/DatagridContextMenu.tsx b/public/app/plugins/panel/datagrid/components/DatagridContextMenu.tsx index 1e06330c88d..f9629ce7053 100644 --- a/public/app/plugins/panel/datagrid/components/DatagridContextMenu.tsx +++ b/public/app/plugins/panel/datagrid/components/DatagridContextMenu.tsx @@ -3,7 +3,7 @@ import { capitalize } from 'lodash'; import * as React from 'react'; import { DataFrame, FieldType } from '@grafana/data'; -import { convertFieldType } from '@grafana/data/internal'; +import { convertFieldType } from '@grafana/data/src/transformations/transformers/convertFieldType'; import { reportInteraction } from '@grafana/runtime'; import { ContextMenu, MenuGroup, MenuItem } from '@grafana/ui'; import { MenuDivider } from '@grafana/ui/internal'; diff --git a/public/app/plugins/panel/geomap/components/MarkersLegend.tsx b/public/app/plugins/panel/geomap/components/MarkersLegend.tsx index 34eda649940..2d6cdabfc5d 100644 --- a/public/app/plugins/panel/geomap/components/MarkersLegend.tsx +++ b/public/app/plugins/panel/geomap/components/MarkersLegend.tsx @@ -4,13 +4,8 @@ import { useMemo } from 'react'; import { useObservable } from 'react-use'; import { of } from 'rxjs'; -import { - getMinMaxAndDelta, - DataFrame, - formattedValueToString, - getFieldColorModeForField, - GrafanaTheme2, -} from '@grafana/data'; +import { DataFrame, formattedValueToString, getFieldColorModeForField, GrafanaTheme2 } from '@grafana/data'; +import { getMinMaxAndDelta } from '@grafana/data/src/field/scale'; import { useStyles2, VizLegendItem } from '@grafana/ui'; import { ColorScale } from 'app/core/components/ColorScale/ColorScale'; import { SanitizedSVG } from 'app/core/components/SVG/SanitizedSVG'; diff --git a/public/app/plugins/panel/geomap/editor/layerEditor.tsx b/public/app/plugins/panel/geomap/editor/layerEditor.tsx index 064e6189cf7..e0676fab740 100644 --- a/public/app/plugins/panel/geomap/editor/layerEditor.tsx +++ b/public/app/plugins/panel/geomap/editor/layerEditor.tsx @@ -1,7 +1,7 @@ import { get as lodashGet, isEqual } from 'lodash'; import { FrameGeometrySourceMode, getFrameMatchers, MapLayerOptions } from '@grafana/data'; -import { NestedPanelOptions, NestedValueAccess } from '@grafana/data/internal'; +import { NestedPanelOptions, NestedValueAccess } from '@grafana/data/src/utils/OptionsUIBuilders'; import { setOptionImmutably } from 'app/features/dashboard/components/PanelEditor/utils'; import { addLocationFields } from 'app/features/geo/editor/locationEditor'; diff --git a/public/app/plugins/panel/geomap/layers/data/routeLayer.tsx b/public/app/plugins/panel/geomap/layers/data/routeLayer.tsx index 366b687c5aa..43e9500ad0c 100644 --- a/public/app/plugins/panel/geomap/layers/data/routeLayer.tsx +++ b/public/app/plugins/panel/geomap/layers/data/routeLayer.tsx @@ -20,8 +20,8 @@ import { DataHoverClearEvent, DataFrame, FieldType, - colorManipulator } from '@grafana/data'; +import { alpha } from '@grafana/data/src/themes/colorManipulator'; import { MapLayerOptions, FrameGeometrySourceMode } from '@grafana/schema'; import { FrameVectorSource } from 'app/features/geo/utils/frameVectorSource'; import { getGeometryField, getLocationMatchers } from 'app/features/geo/utils/location'; @@ -207,10 +207,10 @@ export const routeLayer: MapLayerRegistryItem = { image: new Circle({ radius: crosshairRadius, stroke: new Stroke({ - color: colorManipulator.alpha(crosshairColor, 1), + color: alpha(crosshairColor, 1), width: 1, }), - fill: new Fill({ color: colorManipulator.alpha(crosshairColor, 0.4) }), + fill: new Fill({ color: alpha(crosshairColor, 0.4) }), }), }); const lineStyle = new Style({ diff --git a/public/app/plugins/panel/geomap/utils/checkFeatureMatchesStyleRule.ts b/public/app/plugins/panel/geomap/utils/checkFeatureMatchesStyleRule.ts index cc0558c4e44..569bbdf7c7b 100644 --- a/public/app/plugins/panel/geomap/utils/checkFeatureMatchesStyleRule.ts +++ b/public/app/plugins/panel/geomap/utils/checkFeatureMatchesStyleRule.ts @@ -1,6 +1,6 @@ import { FeatureLike } from 'ol/Feature'; -import { compareValues } from '@grafana/data/internal'; +import { compareValues } from '@grafana/data/src/transformations/matchers/compareValues'; import { FeatureRuleConfig } from '../types'; diff --git a/public/app/plugins/panel/geomap/utils/tooltip.ts b/public/app/plugins/panel/geomap/utils/tooltip.ts index 547ef6e498b..74fc3d6a8ba 100644 --- a/public/app/plugins/panel/geomap/utils/tooltip.ts +++ b/public/app/plugins/panel/geomap/utils/tooltip.ts @@ -2,7 +2,7 @@ import { debounce } from 'lodash'; import { MapBrowserEvent } from 'ol'; import { toLonLat } from 'ol/proj'; -import { DataFrame, DataHoverClearEvent } from '@grafana/data'; +import { DataFrame, DataHoverClearEvent } from '@grafana/data/src'; import { GeomapPanel } from '../GeomapPanel'; import { GeomapHoverPayload, GeomapLayerHover } from '../event'; diff --git a/public/app/plugins/panel/geomap/utils/utils.ts b/public/app/plugins/panel/geomap/utils/utils.ts index 44bb31c0876..6587dda7ee2 100644 --- a/public/app/plugins/panel/geomap/utils/utils.ts +++ b/public/app/plugins/panel/geomap/utils/utils.ts @@ -1,7 +1,8 @@ import { Map as OpenLayersMap } from 'ol'; import { defaults as interactionDefaults } from 'ol/interaction'; -import { DataFrame, GrafanaTheme2, SelectableValue } from '@grafana/data'; +import { SelectableValue } from '@grafana/data'; +import { DataFrame, GrafanaTheme2 } from '@grafana/data/src'; import { getColorDimension, getScalarDimension, getScaledDimension, getTextDimension } from 'app/features/dimensions'; import { getGrafanaDatasource } from 'app/plugins/datasource/grafana/datasource'; diff --git a/public/app/plugins/panel/graph/data_processor.ts b/public/app/plugins/panel/graph/data_processor.ts index 0b97dd6efbd..21afccf65d3 100644 --- a/public/app/plugins/panel/graph/data_processor.ts +++ b/public/app/plugins/panel/graph/data_processor.ts @@ -1,7 +1,7 @@ import { find } from 'lodash'; import { DataFrame, dateTime, Field, FieldType, getFieldDisplayName, getTimeField, TimeRange } from '@grafana/data'; -import { applyNullInsertThreshold } from '@grafana/data/internal'; +import { applyNullInsertThreshold } from '@grafana/data/src/transformations/transformers/nulls/nullInsertThreshold'; import { colors } from '@grafana/ui'; import config from 'app/core/config'; import TimeSeries from 'app/core/time_series2'; diff --git a/public/app/plugins/panel/histogram/Histogram.tsx b/public/app/plugins/panel/histogram/Histogram.tsx index 3225018263a..024d3105a51 100644 --- a/public/app/plugins/panel/histogram/Histogram.tsx +++ b/public/app/plugins/panel/histogram/Histogram.tsx @@ -9,9 +9,11 @@ import { getFieldSeriesColor, GrafanaTheme2, roundDecimals, +} from '@grafana/data'; +import { histogramBucketSizes, histogramFrameBucketMaxFieldName, -} from '@grafana/data'; +} from '@grafana/data/src/transformations/transformers/histogram'; import { VizLegendOptions, ScaleDistribution, AxisPlacement, ScaleDirection, ScaleOrientation } from '@grafana/schema'; import { Themeable2, diff --git a/public/app/plugins/panel/histogram/HistogramPanel.tsx b/public/app/plugins/panel/histogram/HistogramPanel.tsx index 6ec723bd766..082b0be63c4 100644 --- a/public/app/plugins/panel/histogram/HistogramPanel.tsx +++ b/public/app/plugins/panel/histogram/HistogramPanel.tsx @@ -1,14 +1,7 @@ import { useMemo } from 'react'; -import { - histogramFieldsToFrame, - joinHistograms, - DataFrameType, - PanelProps, - buildHistogram, - cacheFieldDisplayNames, - getHistogramFields, -} from '@grafana/data'; +import { DataFrameType, PanelProps, buildHistogram, cacheFieldDisplayNames, getHistogramFields } from '@grafana/data'; +import { histogramFieldsToFrame, joinHistograms } from '@grafana/data/src/transformations/transformers/histogram'; import { TooltipDisplayMode, TooltipPlugin2, useTheme2 } from '@grafana/ui'; import { TooltipHoverMode } from '@grafana/ui/internal'; diff --git a/public/app/plugins/panel/histogram/module.tsx b/public/app/plugins/panel/histogram/module.tsx index 2584b008737..cf95bbc463d 100644 --- a/public/app/plugins/panel/histogram/module.tsx +++ b/public/app/plugins/panel/histogram/module.tsx @@ -4,8 +4,8 @@ import { FieldType, identityOverrideProcessor, PanelPlugin, - histogramFieldInfo, } from '@grafana/data'; +import { histogramFieldInfo } from '@grafana/data/src/transformations/transformers/histogram'; import { commonOptionsBuilder, graphFieldOptions } from '@grafana/ui'; import { StackingEditor } from '@grafana/ui/internal'; diff --git a/public/app/plugins/panel/histogram/utils.ts b/public/app/plugins/panel/histogram/utils.ts index 25e1f33c4bd..51d041050bf 100644 --- a/public/app/plugins/panel/histogram/utils.ts +++ b/public/app/plugins/panel/histogram/utils.ts @@ -1,9 +1,8 @@ +import { DataFrame, FieldType } from '@grafana/data'; import { isHistogramFrameBucketMinFieldName, isHistogramFrameBucketMaxFieldName, - DataFrame, - FieldType, -} from '@grafana/data'; +} from '@grafana/data/src/transformations/transformers/histogram'; export function originalDataHasHistogram(frames?: DataFrame[]): boolean { if (frames?.length !== 1) { diff --git a/public/app/plugins/panel/logs/LogsPanel.tsx b/public/app/plugins/panel/logs/LogsPanel.tsx index be0b279952a..a335e830aca 100644 --- a/public/app/plugins/panel/logs/LogsPanel.tsx +++ b/public/app/plugins/panel/logs/LogsPanel.tsx @@ -29,8 +29,8 @@ import { urlUtil, LogSortOrderChangeEvent, LoadingState, - rangeUtil, } from '@grafana/data'; +import { convertRawToRange } from '@grafana/data/src/datetime/rangeutil'; import { config, getAppEvents } from '@grafana/runtime'; import { ScrollContainer, usePanelContext, useStyles2 } from '@grafana/ui'; import { getFieldLinksForExplore } from 'app/features/explore/utils/links'; @@ -574,7 +574,7 @@ export async function requestMoreLogs( return []; } - const range: TimeRange = rangeUtil.convertRawToRange({ + const range: TimeRange = convertRawToRange({ from: dateTimeForTimeZone(timeZone, timeRange.from), to: dateTimeForTimeZone(timeZone, timeRange.to), }); diff --git a/public/app/plugins/panel/nodeGraph/Node.test.tsx b/public/app/plugins/panel/nodeGraph/Node.test.tsx index 2c9bf841394..a73f0b8334e 100644 --- a/public/app/plugins/panel/nodeGraph/Node.test.tsx +++ b/public/app/plugins/panel/nodeGraph/Node.test.tsx @@ -1,6 +1,6 @@ import { render, screen } from '@testing-library/react'; -import { FieldType } from '@grafana/data'; +import { FieldType } from '@grafana/data/src'; import { Node } from './Node'; diff --git a/public/app/plugins/panel/stat/StatPanel.tsx b/public/app/plugins/panel/stat/StatPanel.tsx index 6d1c35cc63a..2411ab49943 100644 --- a/public/app/plugins/panel/stat/StatPanel.tsx +++ b/public/app/plugins/panel/stat/StatPanel.tsx @@ -10,7 +10,7 @@ import { NumericRange, PanelProps, } from '@grafana/data'; -import { findNumericFieldMinMax } from '@grafana/data/internal'; +import { findNumericFieldMinMax } from '@grafana/data/src/field/fieldOverrides'; import { BigValueTextMode, BigValueGraphMode } from '@grafana/schema'; import { BigValue, DataLinksContextMenu, VizRepeater, VizRepeaterRenderValueProps } from '@grafana/ui'; import { DataLinksContextMenuApi } from '@grafana/ui/internal'; diff --git a/public/app/plugins/panel/status-history/utils.ts b/public/app/plugins/panel/status-history/utils.ts index d077a54a959..cd683b7129c 100644 --- a/public/app/plugins/panel/status-history/utils.ts +++ b/public/app/plugins/panel/status-history/utils.ts @@ -1,4 +1,5 @@ -import { DataFrame, ActionModel, Field, InterpolateFunction, LinkModel } from '@grafana/data'; +import { ActionModel, Field, InterpolateFunction, LinkModel } from '@grafana/data'; +import { DataFrame } from '@grafana/data/'; import { getActions } from 'app/features/actions/utils'; export const getDataLinks = (field: Field, rowIdx: number) => { diff --git a/public/app/plugins/panel/table/migrations.ts b/public/app/plugins/panel/table/migrations.ts index aa4c635682c..734376e18be 100644 --- a/public/app/plugins/panel/table/migrations.ts +++ b/public/app/plugins/panel/table/migrations.ts @@ -10,7 +10,7 @@ import { DataFrame, FieldType, } from '@grafana/data'; -import { ReduceTransformerOptions } from '@grafana/data/internal'; +import { ReduceTransformerOptions } from '@grafana/data/src/transformations/transformers/reduce'; import { Options } from './panelcfg.gen'; diff --git a/public/app/plugins/panel/timeseries/utils.ts b/public/app/plugins/panel/timeseries/utils.ts index 8b974ac38fa..02fc7ea3b34 100644 --- a/public/app/plugins/panel/timeseries/utils.ts +++ b/public/app/plugins/panel/timeseries/utils.ts @@ -7,10 +7,10 @@ import { isBooleanUnit, TimeRange, cacheFieldDisplayNames, - applyNullInsertThreshold, - nullToValue, } from '@grafana/data'; -import { convertFieldType } from '@grafana/data/internal'; +import { convertFieldType } from '@grafana/data/src/transformations/transformers/convertFieldType'; +import { applyNullInsertThreshold } from '@grafana/data/src/transformations/transformers/nulls/nullInsertThreshold'; +import { nullToValue } from '@grafana/data/src/transformations/transformers/nulls/nullToValue'; import { GraphFieldConfig, LineInterpolation, TooltipDisplayMode, VizTooltipOptions } from '@grafana/schema'; import { buildScaleKey } from '@grafana/ui/internal'; diff --git a/public/app/plugins/panel/trend/TrendPanel.tsx b/public/app/plugins/panel/trend/TrendPanel.tsx index ff54529bbe4..f043c113b1f 100644 --- a/public/app/plugins/panel/trend/TrendPanel.tsx +++ b/public/app/plugins/panel/trend/TrendPanel.tsx @@ -1,14 +1,7 @@ import { useMemo } from 'react'; -import { - isLikelyAscendingVector, - DataFrame, - FieldMatcherID, - fieldMatchers, - FieldType, - PanelProps, - TimeRange, -} from '@grafana/data'; +import { DataFrame, FieldMatcherID, fieldMatchers, FieldType, PanelProps, TimeRange } from '@grafana/data'; +import { isLikelyAscendingVector } from '@grafana/data/src/transformations/transformers/joinDataFrames'; import { config, PanelDataErrorView } from '@grafana/runtime'; import { KeyboardPlugin, TooltipDisplayMode, usePanelContext, TooltipPlugin2 } from '@grafana/ui'; import { TooltipHoverMode } from '@grafana/ui/internal'; diff --git a/public/app/plugins/panel/xychart/XYChartPanel.tsx b/public/app/plugins/panel/xychart/XYChartPanel.tsx index e3e667730c2..31d4784a7aa 100644 --- a/public/app/plugins/panel/xychart/XYChartPanel.tsx +++ b/public/app/plugins/panel/xychart/XYChartPanel.tsx @@ -1,7 +1,8 @@ import { css } from '@emotion/css'; import { useMemo } from 'react'; -import { colorManipulator, FALLBACK_COLOR, PanelProps } from '@grafana/data'; +import { FALLBACK_COLOR, PanelProps } from '@grafana/data'; +import { alpha } from '@grafana/data/src/themes/colorManipulator'; import { config } from '@grafana/runtime'; import { TooltipDisplayMode, @@ -71,7 +72,7 @@ export const XYChartPanel2 = (props: Props2) => { items.push({ yAxis: 1, // TODO: pull from y field label: s.name.value, - color: colorManipulator.alpha(s.color.fixed ?? FALLBACK_COLOR, 1), + color: alpha(s.color.fixed ?? FALLBACK_COLOR, 1), getItemKey: () => `${idx}-${s.name.value}`, fieldName: yField.state?.displayName ?? yField.name, disabled: yField.state?.hideFrom?.viz ?? false, diff --git a/public/app/plugins/panel/xychart/XYChartTooltip.tsx b/public/app/plugins/panel/xychart/XYChartTooltip.tsx index f72a67b7b5e..f9b0d588d31 100644 --- a/public/app/plugins/panel/xychart/XYChartTooltip.tsx +++ b/public/app/plugins/panel/xychart/XYChartTooltip.tsx @@ -1,6 +1,7 @@ import { ReactNode } from 'react'; -import { colorManipulator, DataFrame, InterpolateFunction, LinkModel } from '@grafana/data'; +import { DataFrame, InterpolateFunction, LinkModel } from '@grafana/data'; +import { alpha } from '@grafana/data/src/themes/colorManipulator'; import { VizTooltipContent, VizTooltipFooter, @@ -66,7 +67,7 @@ export const XYChartTooltip = ({ const headerItem: VizTooltipItem = { label, value: '', - color: colorManipulator.alpha(seriesColor ?? '#fff', 0.5), + color: alpha(seriesColor ?? '#fff', 0.5), colorIndicator: ColorIndicator.marker_md, }; diff --git a/public/app/plugins/panel/xychart/scatter.ts b/public/app/plugins/panel/xychart/scatter.ts index d7bb53a3838..b2d9156ffbb 100644 --- a/public/app/plugins/panel/xychart/scatter.ts +++ b/public/app/plugins/panel/xychart/scatter.ts @@ -11,8 +11,8 @@ import { MappingType, SpecialValueMatch, ThresholdsMode, - colorManipulator, } from '@grafana/data'; +import { alpha } from '@grafana/data/src/themes/colorManipulator'; import { AxisPlacement, FieldColorModeId, ScaleDirection, ScaleOrientation, VisibilityMode } from '@grafana/schema'; import { UPlotConfigBuilder } from '@grafana/ui'; import { FacetedData, FacetSeries } from '@grafana/ui/internal'; @@ -86,8 +86,8 @@ export const prepConfig = (xySeries: XYSeries[], theme: GrafanaTheme2) => { let pointAlpha = scatterInfo.fillOpacity / 100; - u.ctx.fillStyle = colorManipulator.alpha((series.fill as any)(), pointAlpha); - u.ctx.strokeStyle = colorManipulator.alpha((series.stroke as any)(), 1); + u.ctx.fillStyle = alpha((series.fill as any)(), pointAlpha); + u.ctx.strokeStyle = alpha((series.stroke as any)(), 1); u.ctx.lineWidth = strokeWidth; let deg360 = 2 * Math.PI; @@ -138,8 +138,8 @@ export const prepConfig = (xySeries: XYSeries[], theme: GrafanaTheme2) => { if (pointColors[i] !== curColorIdx) { curColorIdx = pointColors[i]; let c = curColorIdx === -1 ? FALLBACK_COLOR : pointPalette[curColorIdx]; - u.ctx.fillStyle = paletteHasAlpha ? c : colorManipulator.alpha(c as string, pointAlpha); - u.ctx.strokeStyle = colorManipulator.alpha(c as string, 1); + u.ctx.fillStyle = paletteHasAlpha ? c : alpha(c as string, pointAlpha); + u.ctx.strokeStyle = alpha(c as string, 1); } } @@ -421,8 +421,8 @@ export const prepConfig = (xySeries: XYSeries[], theme: GrafanaTheme2) => { pathBuilder: drawBubbles, // drawBubbles({disp: {size: {values: () => }}}) theme, scaleKey: '', // facets' scales used (above) - lineColor: colorManipulator.alpha(lineColor ?? '#ffff', 1), - fillColor: colorManipulator.alpha(pointColor ?? '#ffff', 0.5), + lineColor: alpha(lineColor ?? '#ffff', 1), + fillColor: alpha(pointColor ?? '#ffff', 0.5), show: !field.state?.hideFrom?.viz, }); }); diff --git a/public/app/plugins/panel/xychart/utils.ts b/public/app/plugins/panel/xychart/utils.ts index 4425666fe0b..47884a7540b 100644 --- a/public/app/plugins/panel/xychart/utils.ts +++ b/public/app/plugins/panel/xychart/utils.ts @@ -12,7 +12,7 @@ import { FieldMatcherID, FieldConfigSource, } from '@grafana/data'; -import { decoupleHideFromState } from '@grafana/data/internal'; +import { decoupleHideFromState } from '@grafana/data/src/field/fieldState'; import { config } from '@grafana/runtime'; import { VisibilityMode } from '@grafana/schema'; diff --git a/public/app/routes/RoutesWrapper.tsx b/public/app/routes/RoutesWrapper.tsx index ee0318cb7a7..7e4701f040e 100644 --- a/public/app/routes/RoutesWrapper.tsx +++ b/public/app/routes/RoutesWrapper.tsx @@ -4,7 +4,7 @@ import { ComponentType, ReactNode } from 'react'; import { Router } from 'react-router-dom'; import { CompatRouter } from 'react-router-dom-v5-compat'; -import { GrafanaTheme2 } from '@grafana/data'; +import { GrafanaTheme2 } from '@grafana/data/'; import { config, locationService, From d82a877f6569b4a61d49dfa34ae52a52c10ab108 Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Mon, 17 Mar 2025 12:27:40 +0000 Subject: [PATCH 028/115] GrafanaUI: Mark up or ignore remaining grafana-ui translations (#102203) * markup or ignore remaining grafana-ui translations * fix unit tests, commit betterer results which somehow didn't get autocommitted?! :o * fix SharedPreferences unit test * fix remaining unit tests * fix azure e2e test * better solution --- .betterer.results | 99 ++----------------- e2e/cloud-plugins-suite/azure-monitor.spec.ts | 5 +- .../src/components/DataSourcePicker.test.tsx | 4 +- .../DataLinks/DataLinkSuggestions.tsx | 2 +- .../components/FileDropzone/FileDropzone.tsx | 8 +- .../components/FileDropzone/FileListItem.tsx | 11 ++- .../src/components/FileUpload/FileUpload.tsx | 3 +- .../InteractiveTable/Expander/index.tsx | 3 +- .../FieldNameByRegexMatcherEditor.tsx | 9 +- .../MatchersUI/FieldValueMatcher.tsx | 5 +- .../src/components/Menu/MenuItem.tsx | 3 +- .../Monaco/ReactMonacoEditorLazy.tsx | 10 +- .../src/components/PanelChrome/PanelMenu.tsx | 5 +- .../src/components/Select/MultiValue.tsx | 11 ++- .../src/components/Select/SelectBase.tsx | 10 +- .../src/components/Select/SelectMenu.tsx | 6 +- .../src/components/Table/CellActions.tsx | 17 +++- .../src/components/Table/FilterList.tsx | 16 ++- .../src/components/Table/FilterPopup.tsx | 4 +- .../components/Table/TableCellInspector.tsx | 4 +- .../TableInputCSV/TableInputCSV.tsx | 4 +- .../src/components/Tags/TagList.tsx | 3 +- .../src/components/TagsInput/TagItem.tsx | 3 +- .../components/TagsInput/TagsInput.test.tsx | 4 +- .../src/components/Toggletip/Toggletip.tsx | 3 +- .../ToolbarButton/ToolbarButtonRow.tsx | 3 +- .../src/components/UnitPicker/UnitPicker.tsx | 3 +- .../components/UsersIndicator/UserIcon.tsx | 4 +- .../UsersIndicator/UsersIndicator.tsx | 6 +- .../src/components/VizTooltip/SeriesTable.tsx | 3 +- .../grafana-ui/src/options/builder/axis.tsx | 6 +- .../src/options/builder/stacking.tsx | 11 ++- .../SharedPreferences.test.tsx | 4 +- .../pages/DashboardScenePage.test.tsx | 2 +- .../FieldToConfigMappingEditor.test.tsx | 2 +- .../ArgQueryEditor/ArgQueryEditor.test.tsx | 2 +- .../LogGroups/LogGroupsSelector.test.tsx | 2 +- .../SearchTraceQLEditor/SearchField.test.tsx | 2 +- public/locales/en-US/grafana.json | 71 ++++++++++++- 39 files changed, 213 insertions(+), 160 deletions(-) diff --git a/.betterer.results b/.betterer.results index 6849eaed996..c5c5835206e 100644 --- a/.betterer.results +++ b/.betterer.results @@ -548,9 +548,6 @@ exports[`better eslint`] = { "packages/grafana-ui/src/components/DataLinks/DataLinkInput.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], - "packages/grafana-ui/src/components/DataLinks/DataLinkSuggestions.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], "packages/grafana-ui/src/components/DataSourceSettings/CustomHeadersSettings.tsx:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"] @@ -559,15 +556,6 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"] ], - "packages/grafana-ui/src/components/FileDropzone/FileDropzone.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "packages/grafana-ui/src/components/FileDropzone/FileListItem.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "packages/grafana-ui/src/components/FileUpload/FileUpload.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], "packages/grafana-ui/src/components/Forms/Legacy/Input/Input.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"], @@ -585,67 +573,39 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "1"], [0, 0, 0, "Unexpected any. Specify a different type.", "2"] ], - "packages/grafana-ui/src/components/InteractiveTable/Expander/index.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], "packages/grafana-ui/src/components/JSONFormatter/json_explorer/json_explorer.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"] ], - "packages/grafana-ui/src/components/MatchersUI/FieldNameByRegexMatcherEditor.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], "packages/grafana-ui/src/components/MatchersUI/FieldValueMatcher.tsx:5381": [ - [0, 0, 0, "Do not use any type assertions.", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] + [0, 0, 0, "Do not use any type assertions.", "0"] ], "packages/grafana-ui/src/components/MatchersUI/fieldMatchersUI.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], - "packages/grafana-ui/src/components/Menu/MenuItem.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], "packages/grafana-ui/src/components/Modal/ModalsContext.tsx:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"], [0, 0, 0, "Unexpected any. Specify a different type.", "2"], [0, 0, 0, "Unexpected any. Specify a different type.", "3"] ], - "packages/grafana-ui/src/components/Monaco/ReactMonacoEditorLazy.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"] - ], "packages/grafana-ui/src/components/PanelChrome/PanelContext.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"] ], - "packages/grafana-ui/src/components/PanelChrome/PanelMenu.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"] - ], "packages/grafana-ui/src/components/PanelChrome/index.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], "packages/grafana-ui/src/components/Segment/SegmentSelect.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], - "packages/grafana-ui/src/components/Select/MultiValue.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], "packages/grafana-ui/src/components/Select/SelectBase.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], + [0, 0, 0, "Unexpected any. Specify a different type.", "2"], + [0, 0, 0, "Unexpected any. Specify a different type.", "3"], [0, 0, 0, "Unexpected any. Specify a different type.", "4"], - [0, 0, 0, "Unexpected any. Specify a different type.", "5"], - [0, 0, 0, "Unexpected any. Specify a different type.", "6"], - [0, 0, 0, "Unexpected any. Specify a different type.", "7"] - ], - "packages/grafana-ui/src/components/Select/SelectMenu.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"] + [0, 0, 0, "Unexpected any. Specify a different type.", "5"] ], "packages/grafana-ui/src/components/Select/ValueContainer.tsx:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] @@ -691,21 +651,11 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "1"], [0, 0, 0, "Unexpected any. Specify a different type.", "2"] ], - "packages/grafana-ui/src/components/Table/CellActions.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] - ], "packages/grafana-ui/src/components/Table/Filter.tsx:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], - "packages/grafana-ui/src/components/Table/FilterList.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"] - ], "packages/grafana-ui/src/components/Table/FilterPopup.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "Unexpected any. Specify a different type.", "1"] + [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], "packages/grafana-ui/src/components/Table/FooterRow.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], @@ -726,8 +676,7 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "3"] ], "packages/grafana-ui/src/components/Table/TableCellInspector.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "Unexpected any. Specify a different type.", "1"] + [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], "packages/grafana-ui/src/components/Table/reducer.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], @@ -746,33 +695,9 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "4"], [0, 0, 0, "Unexpected any. Specify a different type.", "5"] ], - "packages/grafana-ui/src/components/TableInputCSV/TableInputCSV.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], "packages/grafana-ui/src/components/Tags/Tag.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], - "packages/grafana-ui/src/components/Tags/TagList.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "packages/grafana-ui/src/components/TagsInput/TagItem.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "packages/grafana-ui/src/components/Toggletip/Toggletip.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "packages/grafana-ui/src/components/ToolbarButton/ToolbarButtonRow.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "packages/grafana-ui/src/components/UnitPicker/UnitPicker.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "packages/grafana-ui/src/components/UsersIndicator/UserIcon.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "packages/grafana-ui/src/components/UsersIndicator/UsersIndicator.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], "packages/grafana-ui/src/components/ValuePicker/ValuePicker.tsx:5381": [ [0, 0, 0, "Use data-testid for E2E selectors instead of aria-label", "0"] ], @@ -784,9 +709,6 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"] ], - "packages/grafana-ui/src/components/VizTooltip/SeriesTable.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], "packages/grafana-ui/src/components/VizTooltip/VizTooltip.tsx:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"] @@ -815,18 +737,9 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"] ], - "packages/grafana-ui/src/options/builder/axis.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] - ], "packages/grafana-ui/src/options/builder/hideSeries.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], - "packages/grafana-ui/src/options/builder/stacking.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"] - ], "packages/grafana-ui/src/slate-plugins/braces.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], diff --git a/e2e/cloud-plugins-suite/azure-monitor.spec.ts b/e2e/cloud-plugins-suite/azure-monitor.spec.ts index 1c6db341089..23de1596f79 100644 --- a/e2e/cloud-plugins-suite/azure-monitor.spec.ts +++ b/e2e/cloud-plugins-suite/azure-monitor.spec.ts @@ -222,10 +222,7 @@ describe('Azure monitor datasource', () => { queriesForm: () => { e2eSelectors.queryEditor.header.select().find('input').type('Azure Resource Graph{enter}'); cy.wait(1000); // Need to wait for code editor to completely load - e2eSelectors.queryEditor.argsQueryEditor.subscriptions - .input() - .find('[aria-label="select-clear-value"]') - .click(); + e2eSelectors.queryEditor.argsQueryEditor.subscriptions.input().find('[aria-label="Clear value"]').click(); e2eSelectors.queryEditor.argsQueryEditor.subscriptions.input().find('input').type('datasources{enter}'); e2e.components.CodeEditor.container().type( "Resources | where resourceGroup == 'cloud-plugins-e2e-test-azmon' | project name, resourceGroup" diff --git a/packages/grafana-runtime/src/components/DataSourcePicker.test.tsx b/packages/grafana-runtime/src/components/DataSourcePicker.test.tsx index 6480a2644dc..6f7ceb6da00 100644 --- a/packages/grafana-runtime/src/components/DataSourcePicker.test.tsx +++ b/packages/grafana-runtime/src/components/DataSourcePicker.test.tsx @@ -11,7 +11,7 @@ describe('DataSourcePicker', () => { const onClear = jest.fn(); const select = render(); - const clearButton = select.getByLabelText('select-clear-value'); + const clearButton = select.getByLabelText('Clear value'); await userEvent.click(clearButton); expect(onClear).toHaveBeenCalled(); }); @@ -20,7 +20,7 @@ describe('DataSourcePicker', () => { const select = render(); expect(() => { - select.getByLabelText('select-clear-value'); + select.getByLabelText('Clear value'); }).toThrowError(); }); diff --git a/packages/grafana-ui/src/components/DataLinks/DataLinkSuggestions.tsx b/packages/grafana-ui/src/components/DataLinks/DataLinkSuggestions.tsx index 2e6ca8d215a..9d943c4e0c3 100644 --- a/packages/grafana-ui/src/components/DataLinks/DataLinkSuggestions.tsx +++ b/packages/grafana-ui/src/components/DataLinks/DataLinkSuggestions.tsx @@ -87,7 +87,7 @@ export const DataLinkSuggestions = ({ suggestions, ...otherProps }: DataLinkSugg - + {errors.map((error) => { switch (error.code) { case ErrorCode.FileTooLarge: diff --git a/packages/grafana-ui/src/components/FileDropzone/FileListItem.tsx b/packages/grafana-ui/src/components/FileDropzone/FileListItem.tsx index 4b69dc72219..4af1d39bdd1 100644 --- a/packages/grafana-ui/src/components/FileDropzone/FileListItem.tsx +++ b/packages/grafana-ui/src/components/FileDropzone/FileListItem.tsx @@ -4,7 +4,7 @@ import { formattedValueToString, getValueFormat, GrafanaTheme2 } from '@grafana/ import { useStyles2 } from '../../themes'; import { trimFileName } from '../../utils/file'; -import { Trans } from '../../utils/i18n'; +import { t, Trans } from '../../utils/i18n'; import { Button } from '../Button'; import { Icon } from '../Icon/Icon'; import { IconButton } from '../IconButton/IconButton'; @@ -26,7 +26,14 @@ export function FileListItem({ file: customFile, removeFile }: FileListItemProps return ( <> {error.message} - {retryUpload && } + {retryUpload && ( + + )} {removeFile && ( diff --git a/packages/grafana-ui/src/components/InteractiveTable/Expander/index.tsx b/packages/grafana-ui/src/components/InteractiveTable/Expander/index.tsx index e40d34d4ae8..ac9a4563f67 100644 --- a/packages/grafana-ui/src/components/InteractiveTable/Expander/index.tsx +++ b/packages/grafana-ui/src/components/InteractiveTable/Expander/index.tsx @@ -1,6 +1,7 @@ import { css } from '@emotion/css'; import { CellProps, HeaderProps } from 'react-table'; +import { t } from '../../../utils/i18n'; import { IconButton } from '../../IconButton/IconButton'; const expanderContainerStyles = css({ @@ -13,7 +14,7 @@ export function ExpanderCell({ row, __rowID }: CellProps >((props [onChange] ); - return ; + return ( + + ); }); FieldNameByRegexMatcherEditor.displayName = 'FieldNameByRegexMatcherEditor'; diff --git a/packages/grafana-ui/src/components/MatchersUI/FieldValueMatcher.tsx b/packages/grafana-ui/src/components/MatchersUI/FieldValueMatcher.tsx index 3efd06c618e..f5d28b03df7 100644 --- a/packages/grafana-ui/src/components/MatchersUI/FieldValueMatcher.tsx +++ b/packages/grafana-ui/src/components/MatchersUI/FieldValueMatcher.tsx @@ -14,6 +14,7 @@ import { import { ComparisonOperation } from '@grafana/schema'; import { useStyles2 } from '../../themes'; +import { t } from '../../utils/i18n'; import { Input } from '../Input/Input'; import { Select } from '../Select/Select'; @@ -70,7 +71,7 @@ export const FieldValueMatcherEditor = ({ options, onChange }: Props) => { value={reducer.current} options={reducer.options} onChange={onSetReducer} - placeholder="Select field reducer" + placeholder={t('grafana-ui.field-value-matcher.select-field-placeholder', 'Select field reducer')} /> {opts.reducer && !isBool && ( <> @@ -78,7 +79,7 @@ export const FieldValueMatcherEditor = ({ options, onChange }: Props) => { value={comparisonOperationOptions.find((v) => v.value === opts.op)} options={comparisonOperationOptions} onChange={onChangeOp} - aria-label={'Comparison operator'} + aria-label={t('grafana-ui.field-value-matcher.operator-label', 'Comparison operator')} width={19} /> diff --git a/packages/grafana-ui/src/components/Menu/MenuItem.tsx b/packages/grafana-ui/src/components/Menu/MenuItem.tsx index c2a4654113a..f295b8eb22b 100644 --- a/packages/grafana-ui/src/components/Menu/MenuItem.tsx +++ b/packages/grafana-ui/src/components/Menu/MenuItem.tsx @@ -7,6 +7,7 @@ import { GrafanaTheme2, LinkTarget } from '@grafana/data'; import { useStyles2 } from '../../themes'; import { getFocusStyles } from '../../themes/mixins'; import { IconName } from '../../types/icon'; +import { t } from '../../utils/i18n'; import { Icon } from '../Icon/Icon'; import { Stack } from '../Layout/Stack/Stack'; @@ -180,7 +181,7 @@ export const MenuItem = React.memo(
{hasShortcut && (
- + {shortcut}
)} diff --git a/packages/grafana-ui/src/components/Monaco/ReactMonacoEditorLazy.tsx b/packages/grafana-ui/src/components/Monaco/ReactMonacoEditorLazy.tsx index 4946ead2ba5..f5dc860567c 100644 --- a/packages/grafana-ui/src/components/Monaco/ReactMonacoEditorLazy.tsx +++ b/packages/grafana-ui/src/components/Monaco/ReactMonacoEditorLazy.tsx @@ -4,6 +4,7 @@ import { GrafanaTheme2 } from '@grafana/data'; import { selectors } from '@grafana/e2e-selectors'; import { useStyles2 } from '../../themes'; +import { t } from '../../utils/i18n'; import { useAsyncDependency } from '../../utils/useAsyncDependency'; import { ErrorWithStack } from '../ErrorBoundary/ErrorWithStack'; import { LoadingPlaceholder } from '../LoadingPlaceholder/LoadingPlaceholder'; @@ -22,13 +23,18 @@ export const ReactMonacoEditorLazy = (props: ReactMonacoEditorProps) => { ); if (loading) { - return ; + return ( + + ); } if (error) { return ( diff --git a/packages/grafana-ui/src/components/PanelChrome/PanelMenu.tsx b/packages/grafana-ui/src/components/PanelChrome/PanelMenu.tsx index d11fd2d4243..5116b76e41c 100644 --- a/packages/grafana-ui/src/components/PanelChrome/PanelMenu.tsx +++ b/packages/grafana-ui/src/components/PanelChrome/PanelMenu.tsx @@ -3,6 +3,7 @@ import { ReactElement, useCallback } from 'react'; import { selectors } from '@grafana/e2e-selectors'; +import { t } from '../../utils/i18n'; import { Dropdown } from '../Dropdown/Dropdown'; import { ToolbarButton } from '../ToolbarButton'; import { TooltipPlacement } from '../Tooltip'; @@ -40,8 +41,8 @@ export function PanelMenu({ return ( ) => { const theme = useTheme2(); const styles = getSelectStyles(theme); - return ; + return ( + + ); }; diff --git a/packages/grafana-ui/src/components/Select/SelectBase.tsx b/packages/grafana-ui/src/components/Select/SelectBase.tsx index 6a173554360..899a9a460d8 100644 --- a/packages/grafana-ui/src/components/Select/SelectBase.tsx +++ b/packages/grafana-ui/src/components/Select/SelectBase.tsx @@ -1,4 +1,3 @@ -import { t } from 'i18next'; import { isArray, negate } from 'lodash'; import { ComponentProps, useCallback, useEffect, useRef, useState } from 'react'; import * as React from 'react'; @@ -15,7 +14,7 @@ import Creatable from 'react-select/creatable'; import { SelectableValue, toOption } from '@grafana/data'; import { useTheme2 } from '../../themes'; -import { Trans } from '../../utils/i18n'; +import { t, Trans } from '../../utils/i18n'; import { Icon } from '../Icon/Icon'; import { Spinner } from '../Spinner/Spinner'; @@ -351,7 +350,7 @@ export function SelectBase({ { e.preventDefault(); @@ -369,7 +368,10 @@ export function SelectBase({ }, NoOptionsMessage() { return ( -
+
{noOptionsMessage}
); diff --git a/packages/grafana-ui/src/components/Select/SelectMenu.tsx b/packages/grafana-ui/src/components/Select/SelectMenu.tsx index e19c8d87546..779b737ef15 100644 --- a/packages/grafana-ui/src/components/Select/SelectMenu.tsx +++ b/packages/grafana-ui/src/components/Select/SelectMenu.tsx @@ -8,7 +8,7 @@ import { SelectableValue, toIconName } from '@grafana/data'; import { selectors } from '@grafana/e2e-selectors'; import { useTheme2 } from '../../themes/ThemeContext'; -import { Trans } from '../../utils/i18n'; +import { t, Trans } from '../../utils/i18n'; import { clearButtonStyles } from '../Button'; import { Icon } from '../Icon/Icon'; import { ScrollContainer } from '../ScrollContainer/ScrollContainer'; @@ -52,7 +52,7 @@ export const SelectMenu = ({ data-testid={selectors.components.Select.menu} className={styles.menu} style={{ maxHeight }} - aria-label="Select options menu" + aria-label={t('grafana-ui.select.menu-label', 'Select options menu')} > {toggleAllOptions && ( @@ -185,7 +185,7 @@ export const VirtualizedSelectMenu = ({ className={styles.menu} height={heightEstimate} width={widthEstimate} - aria-label="Select options menu" + aria-label={t('grafana-ui.select.menu-label', 'Select options menu')} itemCount={flattenedChildren.length} itemSize={VIRTUAL_LIST_ITEM_HEIGHT} > diff --git a/packages/grafana-ui/src/components/Table/CellActions.tsx b/packages/grafana-ui/src/components/Table/CellActions.tsx index 8c70d56a481..8adfe7e9747 100644 --- a/packages/grafana-ui/src/components/Table/CellActions.tsx +++ b/packages/grafana-ui/src/components/Table/CellActions.tsx @@ -2,6 +2,7 @@ import { useCallback } from 'react'; import * as React from 'react'; import { IconSize } from '../../types/icon'; +import { t } from '../../utils/i18n'; import { IconButton } from '../IconButton/IconButton'; import { Stack } from '../Layout/Stack/Stack'; import { TooltipPlacement } from '../Tooltip'; @@ -58,7 +59,7 @@ export function CellActions({ {inspectEnabled && ( { if (setInspectCell) { setInspectCell({ value: cell.value, mode: previewMode }); @@ -68,10 +69,20 @@ export function CellActions({ /> )} {showFilters && ( - + )} {showFilters && ( - + )}
diff --git a/packages/grafana-ui/src/components/Table/FilterList.tsx b/packages/grafana-ui/src/components/Table/FilterList.tsx index cce379ce575..9aa254062cc 100644 --- a/packages/grafana-ui/src/components/Table/FilterList.tsx +++ b/packages/grafana-ui/src/components/Table/FilterList.tsx @@ -7,7 +7,7 @@ import { GrafanaTheme2, formattedValueToString, getValueFormat, SelectableValue import { ButtonSelect, Checkbox, FilterInput, Label, Stack } from '..'; import { useStyles2, useTheme2 } from '../../themes'; -import { Trans } from '../../utils/i18n'; +import { t, Trans } from '../../utils/i18n'; interface Props { values: SelectableValue[]; @@ -172,7 +172,13 @@ export const FilterList = ({ return ( - {!showOperators && } + {!showOperators && ( + + )} {showOperators && ( - + )} {items.length > 0 ? ( diff --git a/packages/grafana-ui/src/components/Table/FilterPopup.tsx b/packages/grafana-ui/src/components/Table/FilterPopup.tsx index 30a3cf0d021..f80f9fb0627 100644 --- a/packages/grafana-ui/src/components/Table/FilterPopup.tsx +++ b/packages/grafana-ui/src/components/Table/FilterPopup.tsx @@ -6,7 +6,7 @@ import { Field, GrafanaTheme2, SelectableValue } from '@grafana/data'; import { Button, ClickOutsideWrapper, IconButton, Label, Stack } from '..'; import { useStyles2, useTheme2 } from '../../themes'; -import { Trans } from '../../utils/i18n'; +import { t, Trans } from '../../utils/i18n'; import { FilterList } from './FilterList'; import { TableStyles } from './styles'; @@ -75,7 +75,7 @@ export const FilterPopup = ({ { setMatchCase((s) => !s); diff --git a/packages/grafana-ui/src/components/Table/TableCellInspector.tsx b/packages/grafana-ui/src/components/Table/TableCellInspector.tsx index c9a78b51d53..21d8a5cde81 100644 --- a/packages/grafana-ui/src/components/Table/TableCellInspector.tsx +++ b/packages/grafana-ui/src/components/Table/TableCellInspector.tsx @@ -1,7 +1,7 @@ import { isString } from 'lodash'; import { useState } from 'react'; -import { Trans } from '../../utils/i18n'; +import { t, Trans } from '../../utils/i18n'; import { ClipboardButton } from '../ClipboardButton/ClipboardButton'; import { Drawer } from '../Drawer/Drawer'; import { Stack } from '../Layout/Stack/Stack'; @@ -68,7 +68,7 @@ export function TableCellInspector({ value, onDismiss, mode }: TableCellInspecto ); return ( - + text} style={{ marginLeft: 'auto', width: '200px' }}> Copy to Clipboard diff --git a/packages/grafana-ui/src/components/TableInputCSV/TableInputCSV.tsx b/packages/grafana-ui/src/components/TableInputCSV/TableInputCSV.tsx index c9559c8d07b..75a231b840e 100644 --- a/packages/grafana-ui/src/components/TableInputCSV/TableInputCSV.tsx +++ b/packages/grafana-ui/src/components/TableInputCSV/TableInputCSV.tsx @@ -7,7 +7,7 @@ import { DataFrame, CSVConfig, readCSV, GrafanaTheme2 } from '@grafana/data'; import { stylesFactory, withTheme2 } from '../../themes'; import { Themeable2 } from '../../types/theme'; -import { Trans } from '../../utils/i18n'; +import { t, Trans } from '../../utils/i18n'; import { Icon } from '../Icon/Icon'; import { TextArea } from '../TextArea/TextArea'; @@ -74,7 +74,7 @@ export class UnThemedTableInputCSV extends PureComponent {