Commit Graph
43 Commits
Author SHA1 Message Date
Mariell Hoversholm fda4d575a5 Provisioning: Fix tests (#101197)
* Provisioning: Refactor tests to be multiple functions

* Provisioning: Fix tests

* fix: make github-example sync
2025-02-24 12:05:40 +01:00
Mariell Hoversholm e137385a81 Merge remote-tracking branch 'origin/main' into grafana-git-ui-sync 2025-02-24 10:17:08 +01:00
279b641469 Provisioning: Define large parts of our infrastructure (#101029)
* Provisioning: Define secrets service

* Provisioning: Create and store secrets service

* Provisioning: Define safepath

* Provisioning: Define the repository

* Identity: Support a provisioning service

* Provisioning: Define a job queue

* Chore: Regen code

* Provisioning: Show progress more often

Co-Authored-By: Ryan McKinley <ryantxu@gmail.com>

* Provisioning: Rename hash field to lastRef

Co-Authored-By: =?UTF-8?q?Roberto=20Jim=C3=A9nez=20S=C3=A1nchez?= <roberto.jimenez@grafana.com>

* Provisioning: Workflows as write access

Co-Authored-By: Ryan McKinley <ryantxu@gmail.com>

* Provisioning: Regen OpenAPI snapshot

* Provisioning: Update tests to match new fields

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: =?UTF-8?q?Roberto=20Jim=C3=A9nez=20S=C3=A1nchez?= <roberto.jimenez@grafana.com>
2025-02-24 09:08:58 +01:00
Roberto Jiménez Sánchez d10200c5ad [Provisioning] Fix issue with last ref (#101056)
* Fix issue with last ref

* Update frontend code

* Fix the local tmp test

* Use lastRef
2025-02-20 16:03:51 +01:00
842f68f91b Provisioning: Workflows as write access (#101031)
* workflow as write access

* workflow as write access

* workflow as write access

* Update pkg/registry/apis/provisioning/repository/test.go

Co-authored-by: Mariell Hoversholm <mariell.hoversholm@grafana.com>

* POC/Provisioning: Add wizard (#100596)

* update refs

* update refs

* lint fix

* lint fix

* lint fix

* default everythign to read only

* reuse form components

* remove main

---------

Co-authored-by: Mariell Hoversholm <mariell.hoversholm@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2025-02-20 11:01:03 +01:00
f535a7804f Provisioning: Update types (#100722)
* Provisioning: Remove S3

* Provisioning: Use URL for GitHub

Co-Authored-By: Ryan McKinley <ryantxu@gmail.com>
Co-Authored-By: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Provisioning: Use workflow list

Co-Authored-By: =?UTF-8?q?Roberto=20Jim=C3=A9nez=20S=C3=A1nchez?= <roberto.jimenez@grafana.com>

* Provisioning: Model secrets

* Provisioning: Define a total in the job summary

* Provisioning: Generate code

* Provisioning: Update testdata

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: =?UTF-8?q?Roberto=20Jim=C3=A9nez=20S=C3=A1nchez?= <roberto.jimenez@grafana.com>
2025-02-17 12:45:23 +01:00
Roberto Jiménez Sánchez 18a938cf03 [Provisioning] Remove S3 Option (#100638)
Remove S3 option
2025-02-13 17:10:10 +01:00
Alex KhomenkoandRyan McKinley ecca6d32af POC/Provisioning: Combine owner/repo into URL field (#100397)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2025-02-11 16:34:57 +03:00
Roberto Jiménez SánchezandClarity-89 2a220b530d [Prototyping] Github Spec to allow push to main or force to use pull requests (#97001)
* Change to have workflows

* Update Frontend

* Run generation

* Add openapi file

* Revert unexpected changes

* Add enum

* Add description to workflows

* Add mapper function to please ESLint

* Remove pull request option

* Remove leftovers

* Configure sync interval in frontend

* Address most comments

* Regenerate client

* Fix compile issue

* Update WorkflowOption type

---------

Co-authored-by: Clarity-89 <homes89@ukr.net>
2025-02-10 15:23:49 +01:00
Ryan McKinley ea38dfcbdc Provisioning: Refactor export to simplify loading from legacy storage (#100335) 2025-02-10 14:21:14 +03:00
Mariell Hoversholm dfaa12b800 Provisioning: Sync API with current feature branch (#100252)
* Provisioning: Jobs: Define repository name field

* Provisioning: Jobs: Separate options per job type

* Provisioning: Define a sanitised settings resource

* Provisioning: Jobs: Define a job summary

* Provisioning: Remove linting

* Provisioning: Update docs for a few fields

* Provisioning: Remove HelloWorld

* Provisioning: Replace Repository with Message in job info

* Provisioning: Remove YAML support

* Provisioning: Remove custom folder specification

* Provisioning: Support read-only repositories

* Provisioning: Remove edit options

* Provisioning: Add sync options for repositories

* Provisioning: Add resource statistics

* Provisioning: Make slices atomic lists

* Provisioning: Message list needs to exist even if empty

If we don't do this, we can't clear the messages field, leading to buggy UX.

* Provisioning: Support incremental syncing

* Provisioning: Remove the 'items' subresource workaround

* Provisioning: Add resource list

* Provisioning: Reformat

* Provisioning: Declare new types

* OpenAPI: Generate openapi JSON spec from generated code

* Codegen: Generate OpenAPI spec

* Provisioning: Support generating frontend API

* Codegen: Generate Go code

* Provisioning: Define the base API

* Codegen: Generate frontend endpoints for provisioning

* Refactor: yarn prettier:write

* Provisioning: Tiger team takes ownership

* Chore: Remove dir we haven't added yet

* Provisioning: Remove frontend

* Test: Update example repositories
2025-02-07 15:35:55 +01:00
Mariell Hoversholm 4d732cb005 Merge remote-tracking branch 'origin/main' into grafana-git-ui-sync 2025-02-07 14:14:54 +01:00
Mariell Hoversholm e815a2850e Provisioning: Integration test that Repository resources work (#100197)
* Provisioning: Set up server in practice

* Provisioning: Integration test that Repository resources work
2025-02-07 12:04:58 +01:00
Ryan McKinley 9e14a5b046 Provisioning: Move sync options to a special section of the spec (#99691)
* sync options

* working ish

* move folder property

* more tests

* create at the beginning of sync

* error rather than update meta

* only one target root

* update comment/kick CI

* with admission controller

* with UI updaates

* few fixes

* use repo name

* use radio group

* use radio group

* use radio group

* more fixes
2025-01-30 15:24:19 +01:00
Mariell Hoversholm 74edadb379 Provisioning: Remove linting option (#99630)
* feat: remove linting option

* feat: drop linting from spec

* chore: regen code

* feat: remove linting spec option from apiserver

* chore: regen code

* test: update examples for removing the lint option
2025-01-29 09:20:10 +01:00
Ryan McKinley beaebcf606 Provisioning: Move openapi setup to core (#99701) 2025-01-29 08:47:04 +03:00
Clarity-89 b1f5a5fafc Update FE API 2025-01-28 15:18:46 +02:00
Ryan McKinley 5cdaf77bc9 POC/Provisioning/Jobs: Move PR options to their own object and add resource summary (#99489) 2025-01-24 14:55:45 +03:00
Mariell Hoversholm 93fa0b1aed Provisioning: Only support YAML (#99421)
* Spec: Remove PreferYaml option

* Spec: Regenerate code from spec

* Provisioning: Only export YAML

* chore: remove last preferYaml refs
2025-01-23 14:30:19 +01:00
Ryan McKinleyandClarity-89 f32d108810 POC/Provisioning: Export API stub (#99298)
Co-authored-by: Clarity-89 <homes89@ukr.net>
2025-01-22 16:24:08 +03:00
Ryan McKinleyandAlex Khomenko 75ac7acb91 POC/Provisioning: List objects from storage (#98874)
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2025-01-14 13:29:07 +03:00
Alex Khomenko c0a0c7bb3d POC/Provisioning: Use PUT endpoints for updates (#98674) 2025-01-08 18:46:15 +03:00
Mariell Hoversholm 654387e357 POC/Provisioning: Test happy-path syncing with GitHub (#98663)
* chore: regen openapi spec

* test: fix existing tests

* chore: pushing for Matheus

* test: ensure GH repository syncs successfully

* chore: ptr is not necessary

* chore: delete unnecessary function

* fix: use assert in require.Eventually blocks
2025-01-08 14:48:43 +01:00
Ryan McKinley f97fa5e5e9 Provisioning: Update OpenAPI and k8s codegen (#98568)
* revert folder changes

* update snapshots

* openapi cleanup

* update codegen
2025-01-07 13:43:19 +03:00
Ryan McKinley f0dc718a67 POC/Provisioning: Use cards layout to show more status info (#98155) 2024-12-18 12:37:45 +03:00
Ryan McKinleyandMariell Hoversholm 4e90c34b64 POC/Provisioning: Use healthy repositories (#97999)
Co-authored-by: Mariell Hoversholm <mariell.hoversholm@grafana.com>
2024-12-17 11:13:30 +03:00
Ryan McKinley efc0b6802f fix test 2024-12-17 09:30:41 +03:00
Alex KhomenkoandRyan McKinley dfb7d5110e POC/Provisioning: update generator (#98027)
* Add source

* Update filters

* Exclude all namespace endpoints

* Remove watch endpoints

* Exclude collection endpoint

* Update arg names

* Add parser script

* Update spec

* Update @rtk-query/codegen-openapi

* Update params for list endpoints

* Use new hooks and types in hooks

* alternative operation ID

* alternative operation ID

* alt operation

* alt operation

* Move some transformations to BE

* Update endpoints

* Update types after generation

* Remove spec and generated endpoints

* Add tags automatically

* Update pkg/services/apiserver/builder/helper.go

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

* add static openapi

* Use generated spec

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2024-12-16 16:27:31 +02:00
Ryan McKinleyandTodd Treece de2bff1d07 POC/Provisioning: Add informer (with healthcheck) (#97806)
Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2024-12-13 13:45:22 +03:00
Mariell Hoversholm 4127741ea8 POC/Provisioning: Local repo: Test importing a panel (#97900) 2024-12-13 08:59:05 +01:00
Mariell Hoversholm e5f43521a4 POC/Provisioning: Allow specific local path prefixes (#97822) 2024-12-12 10:38:41 +01:00
Mariell Hoversholm 1974f9c583 POC/Provisioning: Use forward-slashes everywhere (#97740)
* POC/Provisioning: Create utility for joining paths safely

* POC/Provisioning: Clarify ./ prefixes

* POC/Provisioning: Apply safe path rules

* POC/Provisioning: Linter: Fix comment

* POC/Provisioning: Test: Ensure invalid paths fail
2024-12-11 12:13:27 +01:00
Roberto Jiménez Sánchez 48feba66e6 [Prototyping] Lint dashboard in pull requests (#97199)
* Make lint issues comment

* Make it work

* Delete previous comments

* Move linting to separate package

* Fix issue with refactoring

* Update test fixture
2024-11-29 16:24:45 +01:00
Mariell Hoversholm cfe36270f5 POC/Provisioning: create folder if it does not exist (#96890)
* feat: create folder if it does not exist

* feat: test the folder creation behaviour

* test: make sure deletion doesn't fail

* test: remove unnecessary settings
2024-11-22 12:03:46 +01:00
Ryan McKinley b55cd2438c POC/Provisioning: Keep settings.Cfg out of the registry (#96746) 2024-11-20 14:05:11 +03:00
Ryan McKinley 8fda03d3d5 POC/Provisioning: Add write hooks (#96670) 2024-11-19 17:25:45 +03:00
Roberto Jiménez Sánchez 76e494209f [Prototyping] automatically create github webhook in provisioning (#96645) 2024-11-19 14:54:29 +01:00
Ryan McKinley d50afe3020 put back devenv 2024-11-19 06:18:32 +03:00
Ryan McKinley 9ca2d61620 fix tests 2024-11-19 05:54:34 +03:00
Ryan McKinleyandMariell Hoversholm 8289c8a5eb POC/Provisioning: Add basic validation (#96615)
Co-authored-by: Mariell Hoversholm <mariell.hoversholm@grafana.com>
2024-11-18 14:34:21 +03:00
Roberto Jiménez Sánchez cf15826360 [Prototype] Implement repository file read endpoint (#96569) 2024-11-15 17:33:40 +01:00
Ryan McKinley 264192a08b POC/Provisioning: update spec and examples (#96438) 2024-11-14 14:59:29 +03:00
Ryan McKinley 6e408f19fa POC/Provisioning: Add basic integration tests (#96424) 2024-11-14 11:24:33 +03:00