* Continue rebasing.
* Wrote unit tests for external associations.
* Fix the generated SQL.
Some syntactic sugar (capitalizing the keywords), but use the 'ON' syntax on JOINs.
* We want "management.cattle.io.projects:spec.displayName" not "...spec.clusterName"
* Implement hard-wired external associations:
* The table is in sqlproxy.proxy_store
- externalGVKDependencies - a map of GVKs to dependencies.
When the key GVK is updated, it triggers the updates in the database for the dependent GVKs,
replacing fields as specified in the table.
* This is done in an afterUpsert handler, but it's done after the transaction for the core
GVK update is finished, because most likely the dependent GVK updates will depend on the
final database values for the GVK being updated, and if we do it as part of the transaction
the new values won't be committed to the database.
* When an object is modified/created, check for external deps that need updating.
* Stop emitting errors when joining tables if one of the tables doesn't exist.
* Update unit test syntax for SQL queries.
* And an override check
This ensures we don't overwrite good data when
pulling data from one table to another.
* Drop labels, and use mgmt.cattle.io/spec.displayName
There's no need to hardwire labels in proxy_store:typeSpecificIndexedFields
because all labels are indexed in the shadow labels table.
* Keep clusterName, add displayName for mgmt.cattle.io
* Fix rebase/merge breakage.
* Finish the merge: add the 'selfUpdateInfo' param where it didn't get inserted during merge.
* Patch up rebase failures.
* Now gomock generates named args. I give up.
* Continue rebasing.
* Wrote unit tests for external associations.
* Fix the generated SQL.
Some syntactic sugar (capitalizing the keywords), but use the 'ON' syntax on JOINs.
* whitespace fix post rebase
* We want "management.cattle.io.projects:spec.displayName" not "...spec.clusterName"
* Fix the database calls: drop the key
* Fix breakage during automatic rebase merging gone wrong.
* ws fix - NFC
* Post rebase-merge fixes
* Fix rebase-driven merge.
* Fix rebase breakage.
* go-uber v0.5.2 prefers real arg names to '<argN>'
* Run tests using sqlite DB in a temp directory.
I was running into write-file errors which happens when two sqlite processes try to update the DB at the same time.
* Implement and test the extractBarredValue custom SQL function.
* Explain the DB path constants better.
- Bump wrangler to get fix for 'GetValueFromAny'.
This adds string arrays to the types it supports.
- Use a newer go library sort function to maintain a stable sort
- Use the map-sort-map pattern to avoid repeatedly calculating the
same underlying value for `object[arg1][arg2][...]`
* block UI until we receive requests from kube-apiserver
* satisfy CI
* undo test code
---------
Co-authored-by: joshmeranda <joshua.meranda@gmail.com>
* Return watch error instead of logging it
The UI needs to know about watch error like `resourceversion too old` so
we need to return it.
* Sort by resourceVersion as number
The UI makes some assumption on resourceVersion. It assumes they are a
number and they are ordered by the number value. We'll want to fix this
at some point most likely but for now let's give something in a way that
UI wants.
* Remove -d suffix
After much testing, a delete of an object seems to have its own
resourceVersion so we don't need the -d suffix, we can simply use the
new resourceVersion.
* Add vai access-control for tokens.
* Check for both Token and Kubeconfig resources
* Add a unit test for verifying the generated filters for restricted resources.
* Remove a TODO comment as Tom points out we no longer need it.
* Return error if we can't get userinfo from apiOp.Request.Context
* Stop using camelCase for the user ID label.
* Add a test for the admin user.
* And fold the two user-access tests into a single parameterized test.
* Address reviewer comments.
* post-rebase merge fixes
* WIP - add a comment about determining admin users.
---------
Co-authored-by: Peter Matseykanets <peter.matseykanets@suse.com>
* Add ListOptionIndexerOptions to create ListOptionIndexer
* Remove unused function
* Implement configurable garbage collection on ListOptionIndexer
* Propagate Steve options from Server
* Re-order SQL event hooks so events are last
* Add QueryRowContext for single line queries
* Add test case for unknown resource version
* Properly check rows and close it
* More accurate error message when context.Context is canceled
* Re-order test check
* Split RegisterAfterUpsert into two
We're going to need to be able to differentiate between Add and Update
for storing events in the _events table.
* Update mocks
Add support for modifying the created Factory clients
This adds a new functional-opt based mechanism for configuring the factory clients, and provides a new function for allowing consumers to provide the QPS and Burst values for configuring clients.
* Small refactor in tests
* Small refactor around decoding
* Refactor decodeHelm3 so we can drop the helm dependency
* Vendor helmv2 protobuf types so we can drop the helmv2 old dependency
* go mod tidy
* Add test with sample HelmV2 data
* Update formatter signature to use the interface to facilitate using a fake for testing
* Add a few unit tests
* Avoid adding empty perms to permissions map
* Add context to the remotedialer ping logger - steve side.
* Use a custom type as a context key instead of a basic string
* Bump remotedialer so it can use the configured context.