* Add GPG keys to rgm, dont' clone RGM just use the docker image
* remove the cd command
* forgot to make drone :(
* idk
* reference script more specifically
* i guess we'll just cd /src
* Only show not found artifacts
* Use docs/reference for flexible linking for content reused in Grafana Cloud
Documented in https://github.com/grafana/website/pull/13878
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Use docs-base image that has docs/reference shortcode
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
---------
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Add whatsnewchecker
* Add whatsnewchecker_test
* Small fixes
* Add step in CI
* Fix lint
* Fix starlark
* t.Cleanup instead of separate func
* Skip check for test tags
* Add i18n verification step
* Add check for extracted translations
* Run extract
* Add newline for pseudo
* Format JSON output with prettier
* Print file diff
* Actually run make drone
* Only deo git diff on locales
* Update error message
* Verify that step fails on dynamic phrases
* Verify that it passes when fixed
* Verify that dynamic phrase fails, for real this time
* Extract error messages
* Change echo
* Fix string format
* Try double escaping
* Escape for Drone substitution
* Update character escape
* Remove dynamic phrase
* Verify multiple keys
* Remove double keys
* Readd en locale because of reasons
* Undo changes
* Format lint_frontend.star
* Update error message
* Update .drone.yml
* Add quotes for echo
* Verify fail to extract
* Fix diff stat command
* Reset footer changes
* Update dependency esbuild to v0.17.18
* chore(npm): update all esbuild dependencies to use esbuild@0.17.18
* build(esbuild): update configs so esbuild-loader matches loader from file extension
* build(webpack): fix failed monaco editor loading due to require not existing
* chore(esbuild): bump to 0.17.19
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
* chore: test drone step
* revert changes to lint_backend_step()
* try to add validate_modifle_step
* try to run check func
* remove CGO and wire-install
* update filepath to scripts/modowners
* make drone again
* correct the filepath
* try to ignore validate-modfile step if fail
* chore: remove log that says i am a programmer
* fix: spell modfile correctly
* chore: remove unecessary comment
* fix: check go.mod instead of go.txd
* chore: start modowners
* read go.mod, parse modfile, iterate through requires; add dummy go.mod
* make BEP owners of all grafana dependencies 😱
* push attempt at logging the require comments
* shrink dummy modfile
* revert changes in go.mod
* access comments suffix
* add Module struct; attempt to separate ParseGoMod functionality into its own func; add owner (third) for loop when interating modfile
* feat: print all owners in modfile
* add additional question in comment
* feat: add subcommands: check, owners, modules; chunk out some functions
* chunk out subcommand functions
* add flags
* start tests for common element
* refactor: test for common element
* attempt #1 to refactor modules to accept multiple args
* refactor: refactor modfule func to take 1+ owner arguments (0 arguments not working atm)
* chore: remove debug logging
* refine existing comments
* comment out indirect flag stuff, add example cli command for modules
* unsuccessful attempt #2 to refactor modules to accept -o and -i flags
* refactor funcs to take filesystem and logger
* test: add test for check when all modules have owners
* fail attempt 1 to get TestModules to work
* assert expected log result in TestModules; unsure if properly reading logs
* test: add TestModules to test modules func without any flags returns direct dependencies
* test: add TestInvalidCheck for scenario when some dependencies are missing an owner
* attempt 1 at refactoring TestCheck into a table
* chore: clean TestCheck
* chore: clean up comments for func check
* move files under scripts/modowners
* revert go.mod and go.sum
* CI: Add Windows backend tests in more places
* CI: Add promotion pipeline for publishing new windows-test-images
* CI: Ignore windows backend-test failures for now
* CI: Fix linting issue in ci_images.star file
* Draft: Feature: Trusted Types support
* remove trusted-types package
* Create policy before jQuery and Angular is loaded and add feature flag
* Add trustedTypePolicies
* Sanitize scriptURL
* Add TT meta tag for test env
* Move trusted types into core
* Add DOMParser support for TrustedHTML
* Seperate RSS sanitization and add better TrustedHTML support
* Get test CSP header from config
* Remove dompurify dep from core
* Add documentation for trusted types
* Apply suggestions from code review
Co-authored-by: Kristian Bremberg <114284895+KristianGrafana@users.noreply.github.com>
* Add comment about Github discussion thread and things breaking
* Remove changes from News panel
* Remove TT feature toggle
* Expose TT and CSPReportOnly to frontend
* Log errors in console when CSP report only is enabled
* Log error for reporting and remove test mode
* Only insert CSP header in HTML for dev env
* Update docs
---------
Co-authored-by: Tobias Skarhed <tobias.skarhed@gmail.com>
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
* fix(packages): remove double trailing slash from npmrc credentials
* chore(packages): add new line to storybook config to trigger an npm canary release
* try a different way to run integration tests
* fix formatting
* clean test cache again
* use previous command
* playing around with random commands
* dont run tests in parallel yet
* use parallel option instead of gomaxprocs
* use same package set for redis/memcached; use p=1
* Create full directory path for testing docs
The previous command was useless as the old image already had the
/hugo/content/docs/grafana directory. The old image also had the
/hugo/content/docs/grafana/latest directory but the new image does
not.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Modify a documentation file to to trigger docs PR tests
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Sentence case description
Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>
---------
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>
* Initial schema
- Add types based off of current frontend
* Rename and field-level comments
* Update report and regenerate files
* Rename frontend Azure folder
- Doing this for consistency and to ensure code-generation works
- Update betterer results due to file renames
* Remove default and add back enum vals that I deleted
* Set workspace prop as optional
* Replace template variable types
* Connect frontend query types
- Keep properties optional for now to avoid major changes
- Rename AzureMetricResource
- Correctly use ResultFormat
* Add TSVeneer decorator
* Update schema
* Update type
* Update CODEOWNERS
* Fix gen-cue issue
* Fix backend test
* Fix e2e test
* Update code coverage
* Remove references to old Azure Monitor path
* Review
* Regen files
* Add steps in the pipeline for cloning enterprise when running PR tests.
* Removed enterprise-check from the github action workflows, and removed it from the codeowners file.
* Add verify-starlark build action that returns an error for starlark files with lint
Relies on `buildifier` tool.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Add verify_starlark_step to PR pipeline
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Manually fetch buildifier in curl_image until a new build_image is created
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Format with buildifier
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Remove all unused variables retaining one unused function
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Use snake_case for variable
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Replace deprecated dictionary concatenation with .update() method
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Start adding docstrings for all modules and functions
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Prefer os.WriteFile as ioutil.WriteFile has been deprecated since go 1.16
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Attempt to document the behavior of the init_enterprise_step
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Document test_backend pipeline
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Document enterprise_downstream_step
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Document the pipeline utility function
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Document publish_images_step
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Document publish_images_steps
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Document enterprise2_pipelines function
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Add tags table for Starlark files.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Document test_frontend
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Document windows function
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Add docstrings to verifystarlark functions
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Refactor error handling to be more clear and document complex behavior
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Split errors into execution errors and verification errors
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Document all other library functions
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Add local variables to TAGS
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Add blank line between all Args and Returns sections
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Fix new linting errors
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Lint new Starlark files
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Correct buildifier binary mv
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Document the need to set nofile ulimit to at least 2048
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Update build-container to include buildifier
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Ensure buildifier binary is executable
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Fix valid content test
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Simply return execution error
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Only check files rather than fixing them
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Use updated build-container with executable buildifier
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Test that context cancellation stops execution
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Simplify error handling
Return execution errors that short circuit WalkDir rather than
separately tracking that error.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Remove fetching of buildifier binary now that it is in the build-container
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Use build image in verify-starlark step
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Use semver tag
The image is the same but uses a semver tag to make it clearer that
this is a forward upgrade from the old version.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Use node 18 image with buildifier
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
---------
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Move TraceView to core grafana
* Remove unused code
* yarn install
* Remove jaeger-ui-components from CODEOWNERS and other tools
* Type fixes
* yarn install
* Remove mock that we no longer need
* Fix merge conflicts
* Re-add Apache license for trace view components
* Use an exclamation-circle instead of triangle to denote errors
* Remove eslint disables and update betterer results instead
* 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
* move packed packages to npm-artifacts dir
* remove unnecessary any to trigger canary build
* update canary script to create dir only if it does not exist
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* chore(d3-color): resolve all copies to 3.1.0 to fix vulnerability
* chore(yarn): fix resolution version
* chore(jest): compile d3-color from esm to cjs
* chore(d3): bump d3 to latest, set jest config to transpile es modules
* chore: bump visx packages to resolve d3-color to latest
* chore(jest): add missing es modules to config
* chore(storybook): prevent storybook config failure due to nested esm imports
* chore(storybook): use a direct path to avoid es modules breaking config build
* build(sass): use esbuild to generate sass theme vars for esm deps
* chore: clean up swc dependencies
* revert: remove debug console.log breaking tests
* build(webpack): replace babel-loader with esbuild-loader
* build(webpack): add esbuild minifier to production builds
* Wip
* Removed ngInject and replaced with manual inject params
* chore: bump esbuild to 0.15.13
* Fixed angular issues
* build(frontend): update esbuild to 0.16.16
* chore(webpack): support browserslist for esbuild
* build(esbuild): unify versions of esbuild to 0.16.17 and esbuild-loader to 2.21.0
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
The tools in this repo need base64 but not in most other tools. I had to revert the change I made to the key
I created another key for base64 that we can use here
Follow-up to https://github.com/grafana/grafana/pull/61784
* Switching to new output format for detect breaking changes action
* linting: wrap $GITHUB_OUTPUT with double quotes
* linting: fix shellcheck issues in the right place 🤦♂️
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
Uses the feature added here: https://github.com/grafana/deployment_tools/pull/46301
When a version is named "beta", it will be distributed in the beta distribution, rather than in stable
Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
Just tested deb publishing, and confirmed it works. Noticed that RPM packages aren't published though
It's the exact same step, targetting the RPM files instead
Both steps will run in parallel
Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
* Trigger tag on CI changes
* Use github token available for PRs
Remove remote addition
* Replace origin with full url
Remove fetch for origin
Fix fetch
Remove --quite
Add rebase
Stash changes from verify-gen-cue
Cleanup
* Add --quiet when fetching
* Make shellcheck standalone pipeline
* Run shellcheck on every .sh change
* Change base image
* Trigger on script changes
* Run shellcheck on PRs only
* WIP
* Set public_suffix to a pre Ruby 2.6 version
* we don't need to install python
* Stretch->Buster
* Bump versions in lib.star
* Manually update linter
Sort of messy, but the .mod-file need to contain all dependencies that
use 1.16+ features, otherwise they're assumed to be compiled with
-lang=go1.16 and cannot access generics et al.
Bingo doesn't seem to understand that, but it's possible to manually
update things to get Bingo happy.
* undo reformatting
* Various lint improvements
* More from the linter
* goimports -w ./pkg/
* Disable gocritic
* Add/modify linter exceptions
* lint + flatten nested list
Go 1.19 doesn't support nested lists, and there wasn't an obvious workaround.
https://go.dev/doc/comment#lists
* Relocate dashboards test so it runs
* Cover newer schema versions in stripnulls
* Strip nulls and remove iteration fields
* Fix fiscalYearStartMonth bounds
* Fix up and format dashboard schema
* Update thema, tidy Go dependencies
* refactor(breaking-changes): make sure to pack and zip tarballed packages before artifact upload
* feat(check-breaking-changes): support extracting npm package tarballs before comparing packages
* chore(breaking-changes): fix typo preventing upload of pr_built_packages.zip
* Adding OpenApi target to makefile, to covert swagger spec into OpenAPI 3
* Adding endpoint to server swaggerui with new openapi3 specs
* Passing output file as parameter for OpenApi3 specs
* Implement workaround for missing host and prefix domain
* 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
* apt-transport-https is no longer needed (apt has builtin HTTPS support)
apt-transport-https is a virtual package since Ubuntu Bionic as apt
natively supports HTTPS repos since then, see:
https://packages.ubuntu.com/bionic/apt-transport-https
Signed-off-by: Simon Deziel <simon@sdeziel.info>
* Stop pulling software-properties-common (unused)
software-properties-common was used for the add-apt-repository
command that is no longer used since commit 26cf3d9c66
Signed-off-by: Simon Deziel <simon@sdeziel.info>
* 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>
* Remove integration tags for enterprise
* Adjust integration tests and backend tests for the current enterprise setup
* Remove entrerprise2 integration step and use go command for enterprise2 backend step
* CI: Tidy up `release-enterprise-*` pipeline dependencies (#51031)
* Tidy up enterprise deps
* Fixes according to reviewer's comments
Co-authored-by: dsotirakis <sotirakis.dim@gmail.com>
* Fix integration tests for mysql and postgres
* Package by package testing
* Adding make gen-go to the postgres and mysql integration step
* Rewrite command for backend integration tests
* Diffentiate command for OSS and enterprise
* Add wire-install as dependant for OSS integration tests
* set GRAFANA_TEST_DB variable in the go test command
* No verbose output
* Remove redundant env var
* Try fixing the tests
* Trying stg else
* Remove verbose
Co-authored-by: Sofia Papagiannaki <sofia@grafana.com>
* Chore: Exclude integration tests from running on test-backend step
* Remove -v from go test command
* Add check to skip integration tests before each integration test
* Try to restart pipeline
* Retrying to make pipeline run