-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQLite backed cache: Support sorting mgmt clusters on value in a specific condition #447
SQLite backed cache: Support sorting mgmt clusters on value in a specific condition #447
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ericpromislow, this looks good to undraft to me.
As a side note, I see there are three concerns being addressed in this PR:
- adding support for an arbitrary number of sort conditions
- adding support for fields containing a dot
- adding a transformation to the v3 cluster object in order to contain a virtual
.connected
field in its status
I understand the reasoning behind keeping all of these in one PR, as the end-user concern/ask is actually unique. OTOH, an argument could be made to to split the change into three PRs addressing one concern each, especially because the first two affect non-Vai use cases too.
I will leave it the Frameworks team to make that decision.
From my perspective, most things look good - apart from suggestions there is only a couple of questions that are hopefully quick to settle.
Thanks!
996aced
to
afffb77
Compare
e0e1b73
to
2411277
Compare
2411277
to
91cbf32
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good from my perspective once the README fully reflects the syntax change introduced.
I guess it can be merged as soon as @tomleb also approves.
Thanks for this contribution!
This should be added to the README for filter queries in the PR for 46333.
…cific condition (rancher#447) * Replace primary/secondary sort fields with an array of sort directives. * Allow more than 2 sort-params in a search query. * Add a virtual 'status.ready' field to clusters. * Rename status.ready -> status.connected * Set virtual field 'spec.internal' <- spec.displayName == 'local' * Need to declare all virtual fields to index. * Ready clusters have condition[type==Ready && status=True] * Update the README to reflect generalized sorting. * Bump lasso to get revised sort directives. * Review-driven changes, mostly comments and drop unneeded code. * Add unit tests to verify sort-order stringification. * Ignore empty-string sort components. * Fix a rebase mishap. * Drop unneeded commented-out code. * Clusters have a 'spec.internal' field, no need to synthesize one. * Added a note on square-brackets for label references. This should be added to the README for filter queries in the PR for 46333. * Bump to latest sqlcache-free lasso
Supports the UI to display managed clusters in a "saner" way.
Sample URL:
This sort order puts the internal clusters first, then ready (secondarily sorting by the cluster's friendly name), then the
non-ready ones.
Note putting a hyphen before boolean fields does a reverse (or DESC) sort, so the true ones appear before the false ones.
Related to #48092
Depends on:
#122 - Only because lasso is doing some sql code-generation that steve should be doing.