update to 0.50.0
OBS-URL: https://build.opensuse.org/package/show/devel:kubic/perses-cli?expand=0&rev=11
This commit is contained in:
parent
83af581ba2
commit
cfdc8904cb
2
_service
2
_service
@ -3,7 +3,7 @@
|
||||
<param name="url">https://github.com/perses/perses/</param>
|
||||
<param name="scm">git</param>
|
||||
<param name="exclude">.git</param>
|
||||
<param name="revision">v0.49.0</param>
|
||||
<param name="revision">v0.50.0</param>
|
||||
<param name="versionformat">@PARENT_TAG@</param>
|
||||
<param name="changesgenerate">enable</param>
|
||||
<param name="versionrewrite-pattern">v(.*)</param>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<servicedata>
|
||||
<service name="tar_scm">
|
||||
<param name="url">https://github.com/perses/perses/</param>
|
||||
<param name="changesrevision">49fb6056c41c2f49a849ebb01d751be0400f1286</param></service></servicedata>
|
||||
<param name="changesrevision">86a9b193050c873f387e66d59b3d321e5559e021</param></service></servicedata>
|
@ -1,121 +0,0 @@
|
||||
From b04061023c941d879460d81e6e4c6019621dbc16 Mon Sep 17 00:00:00 2001
|
||||
From: Augustin Husson <husson.augustin@gmail.com>
|
||||
Date: Tue, 12 Nov 2024 10:42:49 +0100
|
||||
Subject: [PATCH] =?UTF-8?q?[BUGFIX]=C2=A0Fix=20login=20command=20avoiding?=
|
||||
=?UTF-8?q?=20reusing=20previous=20config?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
|
||||
---
|
||||
.github/ISSUE_TEMPLATE/bug_report.yml | 2 +-
|
||||
internal/cli/cmd/login/login.go | 29 +++++++++++++++------------
|
||||
internal/cli/config/config.go | 23 +++++++++++++++++++++
|
||||
3 files changed, 40 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
|
||||
index f7fbce82d1..f27470fe29 100644
|
||||
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
|
||||
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
|
||||
@@ -42,7 +42,7 @@ body:
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Perses configuration file
|
||||
- description: Insert relevant configuration here. Don't forget to remove secrets.
|
||||
+ description: Insert relevant configuration here. Don't forget to remove secrets. You can use the CLI to get it (all secret will be hidden). percli config --online
|
||||
render: yaml
|
||||
- type: textarea
|
||||
attributes:
|
||||
diff --git a/internal/cli/cmd/login/login.go b/internal/cli/cmd/login/login.go
|
||||
index b09b7a42b6..831daf2c6e 100644
|
||||
--- a/internal/cli/cmd/login/login.go
|
||||
+++ b/internal/cli/cmd/login/login.go
|
||||
@@ -90,20 +90,22 @@ func (o *option) Complete(args []string) error {
|
||||
return fmt.Errorf("no URL has been provided neither found in the previous configuration")
|
||||
}
|
||||
|
||||
- // create a new apiClient
|
||||
- o.restConfig = config.Global.RestClientConfig
|
||||
- o.restConfig.URL = o.url
|
||||
- if o.restConfig.TLSConfig == nil {
|
||||
- o.restConfig.TLSConfig = &secret.TLSConfig{}
|
||||
+ // Create a new apiClient from scratch.
|
||||
+ // We shouldn't use the previous context as for the moment we have a single config.
|
||||
+ // So, switching from a Perses instance to another one without restarting from scratch the context/ the Perses client doesn't make sense.
|
||||
+ o.restConfig = clientConfig.RestConfigClient{
|
||||
+ URL: o.url,
|
||||
+ TLSConfig: &secret.TLSConfig{
|
||||
+ InsecureSkipVerify: o.insecureTLS,
|
||||
+ },
|
||||
}
|
||||
- o.restConfig.TLSConfig.InsecureSkipVerify = o.insecureTLS
|
||||
restClient, err := clientConfig.NewRESTClient(o.restConfig)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
o.apiClient = api.NewWithClient(restClient)
|
||||
|
||||
- // Finally get the API config, we will need for later
|
||||
+ // Finally, get the API config; we will need it for later
|
||||
cfg, err := o.apiClient.Config()
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -173,9 +175,10 @@ func (o *option) Execute() error {
|
||||
o.accessToken = token.AccessToken
|
||||
o.refreshToken = token.RefreshToken
|
||||
}
|
||||
-
|
||||
- o.restConfig.Authorization = secret.NewBearerToken(o.accessToken)
|
||||
- if writeErr := config.Write(&config.Config{
|
||||
+ if len(o.accessToken) > 0 {
|
||||
+ o.restConfig.Authorization = secret.NewBearerToken(o.accessToken)
|
||||
+ }
|
||||
+ if writeErr := config.WriteFromScratch(&config.Config{
|
||||
RestClientConfig: o.restConfig,
|
||||
RefreshToken: o.refreshToken,
|
||||
}); writeErr != nil {
|
||||
@@ -224,9 +227,9 @@ func (o *option) newLoginOption() (loginOption, error) {
|
||||
|
||||
func (o *option) selectAndSetProvider() error {
|
||||
providers := o.remoteConfig.Security.Authentication.Providers
|
||||
- // The first step is to collect the different providers and store it into items + modifiers.
|
||||
- // items will be the selection items to display to users.
|
||||
- // modifiers will be the action to save the different user input into option struct.
|
||||
+ // The first step is to collect the different providers and store it into options and modifiers.
|
||||
+ // Options will be the selection items to display to users.
|
||||
+ // Modifiers will be the action to save the different user input into option struct.
|
||||
modifiers := map[string]func(){}
|
||||
var options []huh.Option[string]
|
||||
|
||||
diff --git a/internal/cli/config/config.go b/internal/cli/config/config.go
|
||||
index e301642c79..645ce90a20 100644
|
||||
--- a/internal/cli/config/config.go
|
||||
+++ b/internal/cli/config/config.go
|
||||
@@ -220,3 +220,26 @@ func Write(cfg *Config) error {
|
||||
|
||||
return os.WriteFile(filePath, data, 0600)
|
||||
}
|
||||
+
|
||||
+func WriteFromScratch(cfg *Config) error {
|
||||
+ // this value has been set by the root command, and that will be the path where the config must be saved
|
||||
+ filePath := Global.filePath
|
||||
+ directory := filepath.Dir(filePath)
|
||||
+
|
||||
+ if _, err := os.Stat(directory); os.IsNotExist(err) {
|
||||
+ mkdirError := os.Mkdir(directory, 0700)
|
||||
+ if mkdirError != nil {
|
||||
+ return err
|
||||
+ }
|
||||
+ } else if err != nil {
|
||||
+ return err
|
||||
+ }
|
||||
+
|
||||
+ data, err := json.Marshal(cfg)
|
||||
+
|
||||
+ if err != nil {
|
||||
+ return err
|
||||
+ }
|
||||
+
|
||||
+ return os.WriteFile(filePath, data, 0600)
|
||||
+}
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3eeeaf3e117145da6ee895d71e4adabe94bd988c11b64cd15a2ec452f10c9ac6
|
||||
size 10706445
|
3
perses-cli-0.50.0.obscpio
Normal file
3
perses-cli-0.50.0.obscpio
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a7ebf519e394b8bf909955047f8cb8fe5b66fd1878ccb3b4af6e5f586309b15d
|
||||
size 11027469
|
@ -1,3 +1,143 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 15 13:21:42 UTC 2025 - opensuse_buildservice@ojkastl.de
|
||||
|
||||
- Update to version 0.50.0:
|
||||
* Release v0.50.0 (#2553)
|
||||
* [BUGFIX] Update unit's migration (#2519)
|
||||
* [BUGFIX] GaugeChartPanel: fix empty state (#2548)
|
||||
* [BUGFIX] Fixes tooltip display in EDGE / IE (#2547)
|
||||
* [BUGFIX] Redirect to the desired page after login success
|
||||
(#2354)
|
||||
* [IGNORE] Correctly type useQuery fetch hooks error (#2546)
|
||||
* BUGFIX: `percli dac setup`: fix useless requirement of go CLI
|
||||
when using CUE (#2544)
|
||||
* Release v0.50.0-rc.1 (#2543)
|
||||
* [BUGFIX] DaC CUE SDK: Fix inconsistencies in mandatory vs
|
||||
optional attributes in dashboard lib (#2540)
|
||||
* [ENHANCEMENT] : percli plugin lint: improve the way to find the
|
||||
schema files (#2526)
|
||||
* [ENHANCEMENT] `percli dac diff`: add output + avoid early
|
||||
return when processing a directory (#2500)
|
||||
* [ENHANCEMENT] DaC CUE SDK: accurate constraints for duration
|
||||
attributes (#2525)
|
||||
* [ENHANCEMENT] DaC CUE SDK: add datasource param to the var
|
||||
group builder (#2524)
|
||||
* [BUGFIX] Fix preview display name with prefix (#2520)
|
||||
* [ENHANCEMENT] Use Perses logo for the app loader (#2518)
|
||||
* [BUGFIX] Fix for migration of decimal units (#2493)
|
||||
* [BUGFIX] Table panel: fix cell mapping for range condition
|
||||
(#2517)
|
||||
* [ENHANCEMENT] Table panel: editor text fields are debounced
|
||||
(#2470)
|
||||
* [DOC] Align plugin doc with the migration revamp (#2516)
|
||||
* Release v0.50.0-rc.0 (#2515)
|
||||
* [IGNORE] Upgrade to TypeScript 5.4 + upgrade eslint (#2513)
|
||||
* update go deps (#2512)
|
||||
* Bump the k8s-io group with 3 updates (#2508)
|
||||
* Downgrade TypeScript version to v5.3 + enforce return typing
|
||||
(#2504)
|
||||
* [IGNORE] Upgrade TypeScript to v5.4 (#2502)
|
||||
* [IGNORE] Enforce typing in eslint base config (#2499)
|
||||
* [IGNORE] Enforce typing for plugin-system package (#2494)
|
||||
* [IGNORE] Enforce typing for e2e package (#2498)
|
||||
* [IGNORE] Enforce typing for storybook package (#2497)
|
||||
* [IGNORE] Enforce typing for tempo-plugin package (#2496)
|
||||
* [IGNORE] Enforce typing for prometheus-plugin package (#2495)
|
||||
* [IGNORE] Enforce typing for panels-plugin package (#2491)
|
||||
* [IGNORE] Enforce typing for explore package (#2489)
|
||||
* [IGNORE] Enforce typing for internal-utils package (#2490)
|
||||
* [IGNORE] Enforce typing for dashboards package (#2488)
|
||||
* [ENHANCEMENT] Improve the migration (#2481)
|
||||
* Bump github.com/huandu/go-sqlbuilder from 1.32.0 to 1.33.1
|
||||
(#2477)
|
||||
* [IGNORE] Enforce typing for app package (#2487)
|
||||
* Bump github.com/labstack/echo/v4 from 4.12.0 to 4.13.0 (#2478)
|
||||
* Bump github.com/prometheus/common from 0.60.1 to 0.61.0 (#2476)
|
||||
* [DOC] Adjustments in CLI doc (#2480)
|
||||
* [IGNORE] Ignore more flaky links checks (#2486)
|
||||
* [IGNORE] Enforce typing for components package (#2485)
|
||||
* [BUGFIX] `dac diff`: fix output folder not found (#2484)
|
||||
* [ENHANCEMENT] Table: add default column sorting (#2482)
|
||||
* [IGNORE] Upgrade MUI to v6 (#2473)
|
||||
* [FEATURE] add plugin build command (#2471)
|
||||
* [ENHANCEMENT] Table panel: migrate custom column ordering via
|
||||
"organize" transformation (#2419)
|
||||
* [BUGFIX] Table: mapping with min range 0 not working (#2472)
|
||||
* [IGNORE] Replace some wrong usage of "chart" term by "panel"
|
||||
(#2468)
|
||||
* [IGNORE] CLI remove useless check for output flag (#2467)
|
||||
* [ENHANCEMENT] Add search in metric finder + new option for
|
||||
hiding panel (#2466)
|
||||
* [ENHANCEMENT] Add sparkline migration (#2463)
|
||||
* Bump perses/github-actions from 0.6.0 to 0.7.1 (#2434)
|
||||
* [ENHANCEMENT] CLI/DAC: return a success message after writing a
|
||||
diff files (#2464)
|
||||
* Update text migration (#2465)
|
||||
* Add yellow mapping from grafana (#2461)
|
||||
* [ENHANCEMENT] Table: add default column width setting (#2446)
|
||||
* [BUGFIX] Table: fix migration of joinByField transform (#2458)
|
||||
* [FEATURE] add plugin lint command (#2459)
|
||||
* [ENHANCEMENT] Prefix dashboard display name when using dac
|
||||
preview command (#2460)
|
||||
* [BUGFIX] Fix Panel JSON validation (#2456)
|
||||
* [ENHANCEMENT] Add piechart migration (#2449)
|
||||
* [ENHANCEMENT] Table: add column sorting (#2450)
|
||||
* [IGNORE] Add function type check on core package (#2447)
|
||||
* upgrade debian version in Dockerfiles (#2441)
|
||||
* [IGNORE] Upgrade react-table and react-virtuoso + remove some
|
||||
sx props leaks (#2445)
|
||||
* [ENHANCEMENT] Table: best-effort migration of
|
||||
fieldConfig.overrides to columnSettings (#2443)
|
||||
* [ENHANCEMENT] Add cell focus on hover (#2442)
|
||||
* [FEATURE] Status History panel (#2403)
|
||||
* [BUGFIX] Fix tree view broken when using prometheus built-in
|
||||
vars (#2405)
|
||||
* copy duration type from prometheus/common (#2440)
|
||||
* add @jgbernalp as maintainer of the perses org (#2438)
|
||||
* [ENHANCEMENT] Update kubebuilder validation (#2437)
|
||||
* Bump github.com/stretchr/testify from 1.9.0 to 1.10.0 (#2436)
|
||||
* Bump the k8s-io group with 3 updates (#2435)
|
||||
* [ENHANCEMENT] add kubebuilder annotations to all duration types
|
||||
(#2433)
|
||||
* [BUGFIX] TimeSeriesChart: fix migration for the format
|
||||
attribrute (#2432)
|
||||
* [ENHANCEMENT] RoleBinding prechecking if user and role exist
|
||||
has been removed (#2430)
|
||||
* [IGNORE] Add optional local prometheus and tempo to dev env
|
||||
(#2418)
|
||||
* [IGNORE] Bump CUE to latest release (#2423)
|
||||
* Bump github.com/zitadel/oidc/v3 from 3.32.1 to 3.33.1 (#2422)
|
||||
* [ENHANCEMENT] Refactor struct field names and add validation
|
||||
for duration fields (#2360)
|
||||
* [BUGFIX] PromQL Tree view: stop firing the parse query before
|
||||
the show button gets clicked (#2427)
|
||||
* Bump cuelang.org/go from 0.11.0-alpha.5 to 0.11.0-rc.1 (#2421)
|
||||
* [FEATURE] new CLI command for plugins development (#2410)
|
||||
* Bump golang.org/x/mod from 0.21.0 to 0.22.0 (#2411)
|
||||
* Bump golang.org/x/crypto from 0.28.0 to 0.29.0 (#2412)
|
||||
* Bump cuelang.org/go from 0.11.0-alpha.4 to 0.11.0-alpha.5
|
||||
(#2414)
|
||||
* [BUGFIX] Fix login command avoiding reusing previous config
|
||||
(#2416)
|
||||
* Bump github.com/huandu/go-sqlbuilder from 1.31.0 to 1.32.0
|
||||
(#2415)
|
||||
* Bump golang.org/x/oauth2 from 0.23.0 to 0.24.0 (#2413)
|
||||
* [FEATURE] Table panel: columns can be reordered (#2392)
|
||||
* [ENHANCEMENT] More user-friendly helpers for prometheus
|
||||
built-in variables (#2407)
|
||||
* [BUGFIX] Remove some SX props leaking (#2408)
|
||||
* [BUGFIX] Edit mode not working after clicking on the resource
|
||||
row (#2404)
|
||||
* Migrate defaultValue (#2406)
|
||||
* [IGNORE] small fix in DaC doc (#2402)
|
||||
* [IGNORE] Add some external variables to the dev data (#2088)
|
||||
* [IGNORE] fix remaining indentation issues for the doc website
|
||||
(#2400)
|
||||
* update contact list in github issue (#2398)
|
||||
* [DOC] Adjust markdown syntax following issues spotted on
|
||||
website (#2397)
|
||||
- remove patch b04061023c941d879460d81e6e4c6019621dbc16.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 17 09:32:55 UTC 2024 - Johannes Kastl <opensuse_buildservice@ojkastl.de>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
name: perses-cli
|
||||
version: 0.49.0
|
||||
mtime: 1730801076
|
||||
commit: 49fb6056c41c2f49a849ebb01d751be0400f1286
|
||||
version: 0.50.0
|
||||
mtime: 1736942058
|
||||
commit: 86a9b193050c873f387e66d59b3d321e5559e021
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package perses-cli
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -19,18 +19,16 @@
|
||||
%define executable_name percli
|
||||
|
||||
Name: perses-cli
|
||||
Version: 0.49.0
|
||||
Version: 0.50.0
|
||||
Release: 0
|
||||
Summary: CLI for the Perses observability visualisation project
|
||||
License: Apache-2.0
|
||||
URL: https://github.com/perses/perses
|
||||
Source: %{name}-%{version}.tar.gz
|
||||
Source1: vendor.tar.gz
|
||||
# PATCH-FIX-UPSTREAM https://github.com/perses/perses/pull/2416
|
||||
Patch1: https://github.com/perses/perses/commit/b04061023c941d879460d81e6e4c6019621dbc16.patch
|
||||
BuildRequires: bash-completion
|
||||
BuildRequires: fish
|
||||
BuildRequires: go1.22 >= 1.22.5
|
||||
BuildRequires: go1.23
|
||||
BuildRequires: zsh
|
||||
Provides: percli = %{version}
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a713a978bddcffa0d5e479eb2f79bcb8a57e7ff3218cc28974979cf333d21996
|
||||
size 11539421
|
||||
oid sha256:6671bcfe440937de69e3e0d1a7b47b06cbc8122165c64894044ab14cdf245ab1
|
||||
size 12167684
|
||||
|
Loading…
Reference in New Issue
Block a user