1
0
mirror of https://github.com/rancher/steve.git synced 2025-08-31 15:11:31 +00:00
Commit Graph

595 Commits

Author SHA1 Message Date
renovate-rancher[bot]
403d0e67fd chore(deps): update module github.com/urfave/cli to v3 2025-08-13 04:46:43 +00:00
renovate-rancher[bot]
d98fb4809c chore(deps): update module modernc.org/sqlite to v1.38.2 (#755)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-07-30 11:41:19 -04:00
renovate-rancher[bot]
e84e22aff3 chore(deps): update module modernc.org/sqlite to v1.38.1 (#749)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-07-28 13:39:19 -04:00
Eric Promislow
c4edb77306 49270 backport ping logging to 2.11: steve side (#711)
* Backport issue 49270 to 2.11: add context to remotedialer ping logger (steve side).

* Bump remotedialer to v0.3.3

* Bump remotedialer to v0.3.5 - gets latest fix.
v0.5.16
2025-07-10 12:40:07 -07:00
renovate-rancher[bot]
a44818637f chore(deps): update module go.uber.org/mock to v0.5.2 (#591)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-07-04 17:47:43 -07:00
renovate-rancher[bot]
e01a5320a3 chore(deps): update registry.suse.com/bci/golang docker tag to v1.24 (#565)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-07-04 17:33:18 -07:00
renovate-rancher[bot]
fbe0fb0bbb chore(deps): update module github.com/rancher/wrangler/v3 to v3.2.1 (#564)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-07-04 17:32:40 -07:00
renovate-rancher[bot]
3069dad637 chore(deps): update module golang.org/x/sync to v0.15.0 (#560)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-07-04 17:20:10 -07:00
renovate-rancher[bot]
6f6958eba1 chore(deps): update module github.com/google/go-cmp to v0.7.0 (#559)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-07-04 16:29:59 -07:00
renovate-rancher[bot]
9fa9423732 chore(deps): update github actions (#558)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-07-04 16:24:45 -07:00
renovate-rancher[bot]
b6611b2e47 chore(deps): update module modernc.org/sqlite to v1.38.0 (#556)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-07-04 16:24:08 -07:00
renovate-rancher[bot]
7933436237 chore(deps): update module github.com/urfave/cli/v2 to v2.27.7 (#555)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-07-04 16:23:23 -07:00
Alejandro Ruiz
2179eeb696 Calculate AccessSets once per request instead of per resource (#647) (#659) v0.5.15 2025-06-03 12:46:37 +02:00
Felipe Gehrke
9ba9849945 [v2.11] bump wrangler to v3.2.1-rc.4 (#634)
* bump wrangler

* updated wrangler to new rc

* go mod tidy

---------

Co-authored-by: Felipe C. Gehrke <felipe@rancher.local>
v0.5.14
2025-05-09 18:15:13 -03:00
Sakala Venkata Krishna Rohit
4101ed2f30 Add log message to log the error from http client (#596) v0.5.13 2025-04-14 12:37:15 -07:00
Tom Lebreux
53f2165aee Revert "Fix not finding ClusterRoleBinding or RoleBinding for service account…" (#540)
This reverts commit 0f4fd1fde6.
v0.5.12 v0.6.0
2025-03-11 11:14:21 -04:00
Tom Lebreux
0f4fd1fde6 Fix not finding ClusterRoleBinding or RoleBinding for service accounts (#539) v0.5.11 2025-03-10 13:35:01 -04:00
Eric Promislow
f486902100 Add support for another field: (#532)
provisioning.cattle.io.clusters\
metadata.annotations[provisioning.cattle.io/management-cluster-display-name]

Needed to add another character to the subfieldRegex in
listoption_indexer to allow hyphens in annotation field names.
v0.5.10
2025-03-05 12:53:59 -08:00
Eric Promislow
2f331b1a1a Ensure complex accessors from schema don't result in double-bracketing. (#531) v0.5.9 2025-03-04 09:52:35 -08:00
Eric Promislow
2711fd1f46 Added more fields - part 6. (#485)
* Added more fields - part 6.

* Tweaks needed to get 'batch.cronjobs' working

* Add a clarifying comment on pulling values out of an array.

* Use the correct capitalization for the etcd-snapshot kind.
2025-03-04 09:31:21 -08:00
Eric Promislow
0edba0da3e Sort labels (#527)
* Support sorting on metadata.labels.NAME

The key to doing this is if we want to sort on, say, `metadata.labels.foo`, we need to
search for all rows with a label of the name `foo` in all the various
join tables we create for each label the query references.

We ignore nulls by giving them lowest priority using "NULLS LAST"
("NULLS FIRST" if sorting in descending order).

* Ensure labels that are mentioned only in sort params are still selected.

If we don't do this -- say we sort on metadata.labels.foo but never
make a test on it, the sort resuilts are ignored.

* Remove extraneous debugger statements.
2025-03-04 09:30:14 -08:00
renovate-rancher[bot]
a85993129e chore(deps): update module modernc.org/sqlite to v1.36.0 (#528)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-27 17:10:58 -05:00
Eric Promislow
3b45729415 Generate field names with brackets when needed. (#477)
* Generate field names with brackets when needed.

* Stop hard-wiring complex selectors as `["field1", "field2[sub-field3]"]`

and instead represent them as a more consistent `["field1", "field2", "sub-field3"]`

* Convert all filter strings ending with square brackets to an array.

Stop special-casing 'metadata.labels[X]' and handle any query string that ends with '[...]'.

* Stop checking for pre-bracketed terms in constant field-accessor arrays.

In this commit we stop converting string arrays like
`["metadata", "labels[k8s.io/deepcode]"]` into the database field
`"metadata.labels[k8s.io/deepcode]"` and instead will do a
naive `join` to give `metadata[labels[k8s.io/deepcode]]`.  The solution
is to never express the above terms in separate fields, like
`["metadata", "labels", "k8s.io/deepcode"]`. This also better reflects
the stucture of the referenced object.

* gofmt changes

* Simplify comment about 'smartJoin'.
v0.5.8
2025-02-25 10:39:29 -08:00
Sakala Venkata Krishna Rohit
527d44a3a7 Bump golang lint (#524) 2025-02-24 09:51:38 -08:00
renovate-rancher[bot]
078ddfe47d chore(deps): update module github.com/rancher/saml to v0.4.14 (#496)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-23 10:59:59 -08:00
Sakala Venkata Krishna Rohit
0c73b199be Update renovate.json to ignore packages (#516)
* Rancher 2.7 is EOL, so removing release/v0.1

* Ignore dependencies for steve renovate

* Ignore major, minor bumps of rancher deps

* test
2025-02-21 10:37:19 -08:00
Eric Promislow
c906c36bc3 support unwatchables in vai (#458)
* Create and use a synthetic watcher for non-watchable resources.

* Write unit tests for the synthetic watcher.

* Make the refresh interval for synthetic watchers configurable.

The default is to call `client.List(...)` every 5 seconds for each unwatchable GVK.

There are currently only 3 such GVKs right now so this will be informative
enough but not really noticeable.

* Pass the context into the synthetic watch func.

* Restore changes lost in rebasing.

---------

Co-authored-by: Tom Lebreux <tom.lebreux@suse.com>
v0.5.7
2025-02-20 12:45:58 -08:00
Alejandro Ruiz
6559fa9ad7 Fix "Unable to cancel request for *client.addQuery" warnings (#512) 2025-02-20 12:03:03 -05:00
renovate-rancher[bot]
d7746fd993 chore(deps): update module modernc.org/sqlite to v1.35.0 (#454)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-14 09:05:49 -08:00
Chad Roberts
5b5db5c40f [main&2.10.3] Add schema links and resource methods for resource verb patch (#450)
* Show patch link on the API resource when patch permission is present and add patch ResourceMethod to the schema.

* Added tests for new functionality and corrected disallowed method for patch
2025-02-14 06:12:17 -05:00
renovate-rancher[bot]
f51f89196c chore(deps): update module golang.org/x/sync to v0.11.0 (#487)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-13 10:07:08 -08:00
Chad Roberts
ccbadbd75f Update to k8s 1.32 libraries (#491)
* Rebase

* Update dynamiclistener to v0.6.2-rc.3
2025-02-12 13:26:58 -05:00
renovate-rancher[bot]
36b97a97fb chore(deps): update actions/checkout action to v4.2.2 (#339)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-12 09:26:50 -08:00
Richard Cox
eab91bb3d3 Fix code blocks in README (#490)
- an errant set of backticks broke quotes below
2025-02-12 09:26:25 -08:00
renovate-rancher[bot]
f664022933 chore(deps): update module github.com/rancher/dynamiclistener to v0.6.1 (#334)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-12 09:20:45 -08:00
renovate-rancher[bot]
d314442a42 chore(deps): update module github.com/urfave/cli/v2 to v2.27.5 (#336)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-12 09:20:20 -08:00
renovate-rancher[bot]
b72a24c0bc chore(deps): update module github.com/google/gnostic-models to v0.6.9 (#372)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-12 09:17:27 -08:00
Silvio Moioli
3350323f91 sql: propagate and use contexts (#465)
Previous SQLite-related code used context.Background() and context.TODO() because it was not developed with context awareness.

This commit propagates the main Steve context so that it can be used when interacting with SQL context-aware functions.

This PR removes all production-code use of context.Background() and context.TODO() and replaces test-code use of TODO with Background.

Contributes to rancher/rancher#47825
2025-02-12 09:46:10 +01:00
renovate-rancher[bot]
e71f8c455d chore(deps): update module github.com/rancher/wrangler/v3 to v3.1.0 (#344)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-11 13:04:45 -08:00
renovate-rancher[bot]
b4551c5472 chore(deps): update module go.uber.org/mock to v0.5.0 (#345)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-11 13:03:15 -08:00
renovate-rancher[bot]
cab3ff10b5 chore(deps): update golangci/golangci-lint-action action to v6.3.2 (#341)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-11 12:54:07 -08:00
renovate-rancher[bot]
ac1e70719e chore(deps): update actions/setup-go action to v5.3.0 (#340)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-11 12:53:45 -08:00
renovate-rancher[bot]
747284103a chore(deps): update module github.com/urfave/cli to v1.22.16 (#335)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-11 12:53:19 -08:00
renovate-rancher[bot]
b826f74af2 chore(deps): update module github.com/adrg/xdg to v0.5.3 (#332)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-11 12:52:43 -08:00
renovate-rancher[bot]
8c96897309 chore(deps): update dependency go to v1.23.6 (#331)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-11 12:52:20 -08:00
renovate-rancher[bot]
4768bba63b chore(deps): update module github.com/gorilla/websocket to v1.5.3 (#333)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-11 12:52:00 -08:00
renovate-rancher[bot]
43f0f7cf62 Add initial Renovate configuration (#457)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-11 12:27:15 -08:00
Silvio Moioli
9139e492e0 vai: do not discard closing statement errors (#462) 2025-02-07 08:31:08 +01:00
Silvio Moioli
772dc7577e sql: use a closure to wrap transactions (#469)
This introduces the a `WithTransaction` function, which is then used for all transactional work in Steve.

Because `WithTransaction` takes care of all `Begin`s, `Commit`s and `Rollback`s, it eliminates the problem where forgotten open transactions can block all other operations (with long stalling and `SQLITE_BUSY` errors).

This also:

- merges together the disparate `DBClient` interfaces in one only `db.Client` interface with one unexported non-test implementation. I found this much easier to follow
- refactors the transaction package in order to make it as minimal as possible, and as close to the wrapped `sql.Tx` and `sql.Stmt` functions as possible, in order to reduce cognitive load when working with this part of the codebase
- simplifies tests accordingly
- adds a couple of known files to `.gitignore`
    
Credits to @tomleb for suggesting the approach: https://github.com/rancher/lasso/pull/121#pullrequestreview-2515872507
2025-02-05 10:05:52 +01:00
Silvio Moioli
6a46a1e091 sql: encrypt Tokens by default (#467)
Co-authored-by: Eric Promislow <epromislow@suse.com>
v0.5.6
2025-02-03 09:12:02 +01:00