Commit Graph

187 Commits

Author SHA1 Message Date
Andres Martinez Gotor
157ea31b03
Build testdata frontend standalone (#75833) 2023-10-16 17:31:43 +02:00
Josh Hunt
354c1e992e
Devenv: Create script to provision many folders (#75427)
* user essentials mob! 🔱

* user essentials mob! 🔱

lastFile:devenv/bulk-folders/bulk-folders.sh

* user essentials mob! 🔱

lastFile:devenv/setup.sh

* user essentials mob! 🔱

lastFile:devenv/setup.sh

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* codeowners

---------

Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: Laura Benz <laura.benz@grafana.com>
Co-authored-by: Tobias Skarhed <tobias.skarhed@gmail.com>
2023-09-26 15:05:37 +03:00
Kat Yang
9532ff3799
Chore: Split OSS and Enterprise OAPI Spec Generation (#75133)
* chore: implement sofia makefile changes from #62456

* chore: clean up makefile and generate specs

* docs: update command to delete old specs

* fix: regenerate specs with enterprise linked

* chore: implement review comments

* Update Makefile

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* chore: update make command in drone step

* chore: update bingo, fix makefile indentation error, regen specs

* fix: revert .bingo/README changes to make prettier happy

* chore: add BEP as owners of api-enterprise-spec.json

* chore: rerun drone

---------

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2023-09-25 15:34:57 -04:00
Yulia Shanyrova
77bf8215d4
Plugins: Remove deprecated grafana-toolkit (#73489)
* remove grafana-toolkit

* replaces old tsconfig with grafana tsconfig

* fix betterer
2023-09-05 09:56:04 +02:00
Andres Martinez Gotor
d4301aec32
Chore: .gitignore vscode debug binary (#72185) 2023-07-24 11:50:09 +02:00
Horst Gutmann
2b10d31bac
CI: Ignore .pr-body.txt file (#70798)
This file is used during the backporting process but should never be
committed.
2023-06-28 12:12:25 +03:00
Jack Baldry
3c655821e8
Update make-docs script (#66841)
Update centralized make-docs procedure

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2023-04-24 16:23:33 +01:00
Jack Baldry
43fbb9804e
Use centralized make-docs script from Writers' Toolkit (#66440)
- Adds ability to build multiple projects simultaneously using, for example, `make docs PROJECTS='grafana grafana-cloud'`.
- Adds `make doc-validator` which runs [`doc-validator`](https://github.com/grafana/technical-documentation/tree/main/tools/cmd/doc-validator) on all documentation.

Using a centralized script will help ensure consistency in workflow across all projects.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2023-04-18 11:46:10 +01:00
Jack Westbrook
efa641040d
Build: Improve NPM publishing (#65171)
* chore(packages): remove redundant npm scripts for publishing packages

* feat(packages): rewrite npm publishing script to work for manual and ci publishes

* ci(drone): update release-canary-npm-packages step to use new script

* docs(packages): update manual release instructions

* wip(packages): attempt to validate packed npm package

* fix(packages): release-canary-npm-packages should provide canary dist-tag

* ci(packages): clean up npm package validation script

* chore(devenv): add verdaccio config to allow anon publishing for easier dev npm testing

* ci(packages): clean up publishing script

* ci(drone): during build-frontend-packages, pack and validate packed tarballs

* chore(codeowners): update for publish/validate npm packages scripts

* ci(packages): fix esm loop bug matching e2e package

* ci(npm-packages): fix failing regex

* style(lib.star): run make format-drone

* style(npm-packages): shellcheck fixes for validate-npm-packages script

* docs(packages): update readme instructions for publishing locally and manually

* refactor(npm-publish): use drone when to trigger canary releases

* chore(drone): remove redundant trigger_npm_publish var

* chore(npm-publish): remove redundant echo
2023-04-18 10:19:37 +02:00
gotjosh
406431df4e
Alerting: QoL improvements to the unified alerting multi-replica devenv (#64907) 2023-03-17 07:14:31 +00:00
Jo
3b22955ebb
Orgs: Remove auto assign globals (#63754)
* remove auto assign globals

* add missing gitignore entries
2023-02-27 10:23:38 +01:00
Sofia Papagiannaki
29d3e696f0
Swagger: Fix circular reference (#62673)
* Swagger: Fix circular reference

* gitignore intermediate swagger file

* Update specs

* Do not generate specs when building the backend
2023-02-02 13:18:04 +02:00
Guilherme Caulada
9a25a03e49
Tests: Add boilerplate code to support e2e tests on enterprise (#61959)
* Add e2e boilerplate for enterprise tests

* Remove enterprise symlink file

* Add tsconfig to e2e extensions folder and gitignore

* Update run-suite to use extensions folder

* Remove unnecessary tsconfig file

* Update e2e enterprise paths on gitignore

* Copy symlinked e2e enterprise files on run-suite

* Add cleanup command to run-suite

* Improve cleanup and setup for enterprise e2e tests

* Update e2e path for enterprise tests on gitignore

* Support to run different e2e tests for each license
2023-01-26 18:04:13 -03:00
Josh Hunt
2d8910d9de
Chore: gitignore storage.json (#59225) 2022-11-23 09:31:40 -05:00
sam boyer
07e5f8117f
Reconcile coremodels, entities, objects under new kind framework (#56492)
* Update thema to latest

* Deal with s/Library/*Runtime/

* Commit new, working results of codegen

* We like pointers now

* Always take runtime arg for NewBase()

* Sketchy handwavy pass at entity meta framework

* Little nibbles

* Update pkg/framework/coremodel/entityframework.cue

Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>

* Move file into new framework location

* Introduce loaders, Go code

* Complete rename to kind

* Flesh out framework, add svg/dashboard examples

* Cruft removal

* Remove generated kind go files from gitignore

* Refine maturity concept, add SlotKind

* Update embed and go deps

* Export PrefixWithGrafanaCUE

* Make the loader actually work, holy crap

* Many small tweaks to type.cue

* Add Apache 2 licensing exceptions for kinds

* Add new kinds dir, start of generator

* Roll back to earlier oapi-codegen

* Introduce new grafana-specific CUE loaders

* Introduce new tidy code generators framework

* Catch up kind framework with tinkering

* Add slices for the generators

* Add write/verify step to main generator

* Many renames

* Split up kind framework cue files

* Use kind.Decl within generated kinds

* Create kind.SomeDecl wrapper type to cache lineages

* Better names again

* Get one generated implemented, hopefully

* Copy dashboard schema into new kind.cue

* Small fixes to make the initial gen work

* Put svg kind in its new home

* Add generated Go dashboard type

* More renames and cleanups

* Add base kind registry and generator

* Stop blacklisting *_gen.go files

This is not the Go best practice, anyway. All we actually want to ignore
for enterprise is generated wire files.

* Change codegen output directories

pkg/kind -> pkg/kinds
pkg/registry/kindreg -> pkg/registry/corekind

* Rename pkg/framework/kind to pkg/kindsys

* Add core structured kind generator

* Add plural and machine names to kind spec

* Copy playlist over to kind system

* Consolidate kindsys files

* Add raw kind generator

* Update CODEOWNERS for kind framework

* Touch up comments a bit

* More docs tweaks

* Remove generated types to reduce noise for review

* Split each generator into its own file

* Rename Slot kind to Composable kind

* Add handwavy types for customkind loading

* Guard against init calls to framework loader

* First pass at doc on extending the kind system

* Improve attribute example in docs

* Fix wire imports

* Add basic TS types generator

* Fix composable kind category def

* No need for a separate file with generate directive

* Catch dashboard schema up

* Rename generator types to something saner and generic

* Make version configurable in ts/go generators

* Add CommonMeta to ease property access

* Add kindsys prop indicating whether lineage is group

* Put all kind categories back in a single file

* Finish with kindsys group props

* Refactor maturity progression per discussion

- Replace "committed" with "merged"
- All kindcats can use all maturity levels, at least for now

* Convert ts veneer index generator to modular system

* Move over to new jennywrites framework

* Strip down old coremodel generator

* Use public version of jennywrites

* Pull latest thema

* Commit generated Go types

* Add header injection postprocessor

* Move sdboyer/jennywrites to grafana/codejen

* Tweak header output

* Remove dashboard and playlist coremodels

* Fix up backend dashboards devenv test

* Fix TS import patterns to new gen filename

* Update internal imports, remove coremodel registry

* Fix compilation errors, wire generation

* Export and replace the prefix dropper

* More Go struct and field name changes

* Last name fixes, hopefully

* Fix lint errors

* Last lint error

Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
2022-11-10 12:36:40 -08:00
owensmallwood
7de093738d
PublicDashboards: Adds command to generate map of supported datasources (#57841)
generates map of supported datasources for pubdash
2022-11-02 13:35:57 -06:00
Konrad Lalik
9d0380cbdd
Alerting: Fix folder picker clear action (#56864) 2022-10-14 08:48:05 +02:00
Ashley Harrison
8348f486d9
Navigation: Make sure topnav is translated (#56643)
* initial translation progress

* more nav translations

* add subtitle translations

* more specific gitignore path

* fix unit tests
2022-10-11 11:45:58 +01:00
Josh Hunt
5361efc225
I18n: Migrate to I18next (#55845)
* Switch from lingui from i18next

* Change lingui messages to i18next messages

* Change lingui messages to i18next messages (grafana-ui)

* Init i18n for tests
2022-10-06 16:34:04 +01:00
renovate[bot]
6856784134
Update Storybook updates to v6.5.10 (#49793)
* Update Storybook updates to v6.5.6

* refactor(storybook): fix up dependencies and webpack configs

* chore(storybook): bump to 6.5.7

* chore(yarn): refresh lock file

* chore(storybook): bump storybook to 6.5.10

* refactor(storybook): update configuration to use babel, tidy webpack config, clean dependencies

* chore(storybook): bump to 6.5.12

* chore(storybook): bump storybook-dark-mode to 1.1.2

* chore(storybook): workaround resolving storybook-docs addon for yarn pnp

* refactor(storybook): remove preview-head.html in favour of global theme styles

* chore(storybook): patch storybook-dark-mode to work with SB 6.5.x and yarn PnP

* feat(storybook): move to using MDXv2

* fix(icon): make sure icon story doesn't disappear offscreen and is scrollable

* chore(grafana-ui): clean up dependencies related to storybook

* feat(storybook): enable webpack5 filesystem cache

* feat(storybook): replace babel with esbuild

* fix(emotionperftest): fix jsx pragma for esbuild

* fix(emotionperftest): force jsxRuntime to classic so esbuild and babel compile without error

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-10-03 09:23:47 +02:00
Jack Westbrook
b81f90cd0c
Toolkit: Fix script failures due to missing import paths (#55857)
* fix(toolkit): package without dist folder so config file paths are correct

* chore(packages): make sure to bundle readme, changelog and apache2 license

* refactor(packages): recursively copy src when prepacking toolkit

* chore(toolkit): lock down babel dependencies. use grafana-eslint-config@5 for TS4.8 support
2022-09-28 17:04:55 +02:00
owensmallwood
c946e44741
Ignore docker-compose override. (#55407)
adds docker-compose override to gitignore
2022-09-19 12:17:54 -06:00
Misi
8405a99fef
Chore: Add changed enterprise devenv path to .gitignore (#55408) 2022-09-19 12:15:28 -04:00
sam boyer
ced53a8dc2
plugins: Introduce generated, static core plugin registry (#54118)
* Refactor towards template/codegen framework

* Add templates for plugin gen

* Add Go codegen for plugins; overhaul framework, too

* Add new codegen output; assorted framework fixes

* Regenerate after merge

* Remove accidental commit file, update templates

* Export the pfs.Tree loader from plugin types

* Print details from cuetsy errors

* Generate loaders for all plugins and list in registry

* Use pfs_gen.go over lineage_gen.go

* Un-un-ignore main file

* Introduce simple List static registry for plugins

* Last tweaks to codegen

* remove unused tvars

* Ensure loop-local instances for both vars

* Generate pfs parsing in-place in registry

* Stop generating pfs_gen.go

* Move Tree into pfs, rename subdir

* Change package name to match dir

* Ignore gocyclo on HTTPServer.getNavTree
2022-09-14 10:15:09 -04:00
kay delaney
a70aba1384
Chore: Update slate and related packages (#54566)
* Chore: Update slate and related packages
2022-09-06 15:23:48 +01:00
Jack Westbrook
5ea01dc9b9
Build: Introduce webpack manifest plugin (#49798)
* build(webpack): introduce manifest plugin

* build(webpack): move manifest.json to root of project and git ignore
2022-08-30 05:18:55 -04:00
Jack Westbrook
d87bf30e9e
Build: Introduce ESM and Treeshaking to NPM package builds (#51517)
* Revert "Chore: Bump terser to fix security vulnerability (#53052)"

This reverts commit 7ae74d2a18.

* feat: use tsc and rollup directly with esbuild and publishConfig, files props

* refactor(grafana-data): fix isolatedModules re-export type error

* refactor(grafana-data): import paths from src not package name

* refactor(rollup): fix dts output.file

* chore(grafana-schema): delete dashboard_experimental.gen.ts - cannot work with isolatedModules

* refactor(grafana-e2e-selectors): fix export types isolatedModules error

* refactor(grafana-runtime): fix isolatedModules re-export type error

* refactor(grafana-ui): fix isolatedModules re-export type error

* feat(grafana-ui): use named imports for treeshaking

* refactor(grafana-ui): use named imports for treeshaking

* feat: react and react-dom as peerDeps for packages

* feat(grafana-ui): emotion packages as peerDeps

* feat(grafana-e2e): use tsc, rollup, esbuild for bundling

* chore(packages): clean up redundant dependencies

* chore(toolkit): deprecate unused package:build task

* chore(schema): put back dashboard_experimental and exclude to prevent isolatedModules error

* docs(packages): update readme

* chore(storybook): disable isolatedModules for builds

* chore: relax peerDeps for emotion and react

* revert(grafana-ui): put @emotion dependencies back

* refactor: replace relative package imports with package name

* build(packages): set emitDeclaration false for typecheck scripts to work

* test(publicdashboarddatasource): move test next to implementation. try to appease the betterer gods

* chore(storybook): override ts-node config for storybook compilation

* refactor(grafana-data): use ternary so babel doesnt complain about expecting flow types

* chore(toolkit): prefer files and publishConfig package.json props over copying

* build(npm): remove --contents dist arg from publishing commands

* chore(packages): introduce sideEffects prop to package.json to hint package can be treeshaken

* chore(packages): remove redundant index.js files

* feat(packages): set publishConfig.access to public

* feat(packages): use yarn berry and npm for packaging and publishing

* refactor(packages): simplify rollup configs

* chore(schema): add comment explaining need to exclude dashboard_experimental

* revert(toolkit): put back clean to prevent cli failures

* ci(packages): run packages:pack before a canary publish

* chore(gitignore): add npm-artifacts directory to ignore list

* test(publicdashboarddatasource): fix module mocking

* chore(packages): delete package.tgz when running clean

* chore(grafana-data): move dependencies from devDeps to prevent build resolution errors
2022-08-03 15:47:09 +02:00
Joey Tawadrous
1592ea45b0
Tempo: Devenv update to support all features (#52728)
* Tempo devenv

* Add logging to tempo devenv

* Update readme

* Formatting

* Update loki image

* Update tempo image
2022-08-03 11:24:50 +01:00
Josh Hunt
62a3f2ed32
Chore: Align on 'internationalization' for feature name (#52585)
* rename internationalization docs

* Move localisation.tsx to internationalization/index.tsx
2022-07-21 06:31:08 -04:00
Kat Yang
400c662fa1
Chore: Add scripts/go/bin/** to .gitignore (#51343) 2022-06-24 10:20:46 +03:00
Ashley Harrison
ded3d53d89
Chore: Additional betterer tests for type assertions and explicit any (#45901)
* Add betterer tests to prevent adding more type assertions and explicit any's into the codebase

* update betterer results file

* better glob matching

* updated results

* update results again...

* use more up to date betterer packages

* they're devdeps...

* Commit latest betterer results

* latest .betterer.results

Co-authored-by: joshhunt <josh@trtr.co>
2022-06-23 11:36:20 +01:00
ying-jeanne
62531715b3
Chore: remove bra and scripts/go from grafana (#51130) 2022-06-21 11:08:08 +02:00
sam boyer
4c4aa95d38
coremodels: Automatically generate coremodel registries (#50057)
* coremodel: Generate static registry

* Actually make codegen work

Also, remove the per-coremodel assignability test from generator set.

* Make wire gen depend on cue gen

This is necessary now that we're generating a wire set as part of
coremodel registry generation.

* Add wire inject bits to http server

* s/staticregistry/registry/

* move to static and dynamic wording

* Move registry type into registry package

* Use static registry in http handler

* Oi comments
2022-06-15 15:47:04 +02:00
Josh Hunt
3cebd87bbb
I18n: Add locale to user preference (#49425)
* Add __debug_bin file to gitignore

* Add locale user preference

* undo defaulting to existing JSONData in preferences save
2022-06-14 12:53:51 +01:00
sam boyer
be06d37a20
schema: Generate Go and Typescript from Thema coremodels (#49193)
* Add go code generator for coremodels

* Just generate the entire coremodel for now

Maybe we'll need more flexibility as more coremodels are added, but for
now this is fine.

* Add note on type comment about stability, grodkit

* Remove local replace directive for thema

* Generate typescript from coremodel

* Update pkg/coremodel/dashboard/addenda.go

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* Update cuetsy to new release

* Update thema to latest

* Fix enum generation for FieldColorModeId

* Put main generated object at the end of the file

* Tweaks to generated Go output

* Retweak back to var

* Add generated coremodel test

* Remove local replace statement again

* Add Make target and call into cuetsy cmd from gen

* Rename and comment linsrc for readability

* Move key codegen bits into reusable package

* Move body of cuetsifier into codegen pkg

Also genericize the diffing output into reusable WriteDiffer.

* Refactor coremodel generator to use WriteDiffer

* Add gen-cue step to CI

* Whip all the codegen automation into shape

* Add simplistic coremodel canonicality controls

* Remove erroneously committed test

* Bump thema version

* Remove dead code

* Improve wording of non-canonicality comment

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-27 03:21:37 +02:00
Jack Westbrook
efe9eed758
Chore: Move Typescript cache file to root (#45964)
* chore(typescript): move TS cache file to root of repo

* chore(typescript): cache packages ts checks to disk for faster yarn typecheck
2022-03-04 09:26:25 +01:00
Gabriel MABILLE
e7cff11edd
devenv: Adding gitignore for the saml-enterprise block (#45042) 2022-02-08 09:56:03 +01:00
Ryan McKinley
5d66194ec5
FeatureFlags: define features outside settings.Cfg (take 3) (#44443) 2022-01-26 09:44:20 -08:00
Agnès Toulet
65bdb3a899
FeatureFlags: Revert managing feature flags outside of settings.Cfg (#44382)
* Revert "FeatureToggles: register all enterprise feature toggles (#44336)"

This reverts commit f53b3fb007.

* Revert "FeatureFlags: manage feature flags outside of settings.Cfg (#43692)"

This reverts commit f94c0decbd.
2022-01-24 16:08:05 +01:00
Ryan McKinley
f94c0decbd
FeatureFlags: manage feature flags outside of settings.Cfg (#43692) 2022-01-20 13:42:05 -08:00
Dimitris Sotirakis
22eb2df602
E2E: Rename end-to-end-tests-server to grafana-server (#44249)
* Rename to grafana-server / move scripts into new directory

* Change grafana-server step command

* Change scripts paths

* Use test grabpl version

* Update run-suite script

* Further name updates

* Update grabpl version

* Update contribute/style-guides/e2e-core.md

Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>

Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
2022-01-20 17:01:00 +00:00
Ashley Harrison
e9f8b40e18
Chore: remove e2e/build_results.zip and add to .gitignore (#44197) 2022-01-19 10:50:55 +00:00
Artur Wierzbicki
e01ac44cfa
Live: performance tests e2e part (#43915)
* #41993: live perf tests e2e part

* #41993: added bash upgrade instructions

* #41993: remove custom feature toggle

* #41993: fix typo in 'integrationFolder'
2022-01-12 22:15:29 +04:00
Josh Hunt
4f6d08f14b
I18N: Add Lingui core translation framework. (#41827)
* I18N: Add Core Lingui framework for translating the UI

* Make FieldSet accept ReactNode for the label, so it can be translated

* Translate a phrase in the User profile edit form

* Translate phrase

* run lingui compile before webpack builds

* init i18n more lazily

* i1n:compile in drone lint step

* wip for getting tests to work

* Use mock lingui/macros because its too hard to use the real macros in Jest...

* mock messages for tests

* use specific lingui version

* add comment for test helper

* we actually don't need the i18n setup in tests because we mock out <Trans />

* update package.json

* remove unneded imports

* revert back babel core version

* Create a I18nProvider wrapper
2021-12-15 17:00:37 +01:00
Dimitris Sotirakis
4b2c90b834
Add deployment_tools_config.json to git and eslint ignore (#42053)
(cherry picked from commit 15a603dae0)
2021-11-22 12:36:21 +01:00
Joan López de la Franca Beltran
d49230d291
Grafana CLI Wire Runner (#41012)
* Set up Wire build graph

* Remove enterprise Wire set

* Move runner package outside commands

* Update Makefile (gen-go path)

* Minor prettier fix

* Include new Wire enterprise file into .gitignore

* Update Wire deps

* Update the grabpl version

Co-authored-by: Dan Cech <dcech@grafana.com>
2021-11-17 20:43:09 +01:00
Jack Westbrook
5fad5511e9
Build: Enable persistent cache for faster Webpack builds (#41430)
* build(webpack): enable caching for development and production builds

* build(webpack): introduce unminified production build script

* build(typescript): introduce incremental flag to cache typechecking

* chore(git): ignore typescript cache file

* chore(webpack): bump dependencies to latest
2021-11-11 14:32:34 +01:00
Jack Westbrook
6e2237c02f
Chore: Replace Sass-lint with Stylelint (#40617)
* chore(sass): introduce stylelint

* chore(sass): introduce stylelint config that closely matches sass-lint config

* chore: remove sass-lint from codebase

* style(theme): disable stylelint string-quotes rule

* chore(sass): introduce stylelint-prettier-config to prevent config conflicts

* chore: delete sass-lint file

* style(sass): fix remaining stylelint errors
2021-10-20 11:34:24 +02:00
Dimitris Sotirakis
b926edf666
Add /packaging/**/*.tar.gz.sha256 to .gitignore (#40651) 2021-10-19 20:15:18 +02:00
Gábor Farkas
51c5afe840
yarn2: commit the pa11y-ci package from the cache (#40372) 2021-10-14 08:28:24 +02:00