Skip to content
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

requiring target's selectable checks #3160

Closed
wants to merge 1 commit into from
Closed

Conversation

nelsonkopliku
Copy link
Member

Description

During hackweek I attempted implementing a TUI (trentoctl) to interact with Trento.

I wanted to be able to:

  • list hosts/clusters
  • select an entry
  • show selectable checks for such entry
  • select desired checks
  • issue a checks execution

Now, besides the fanciness and challenges of implementing a tui in rust and https://ratatui.rs/, it is mainly a matter of integrating with Trento APIs: serialize/deserialize json, making http requests, checking responses... pretty common things.


Let's focus on: showing selectable checks for a target

In order to answer the question which are the selectable checks for a given target (cluster/host)? we need to query Wanda's catalog API with a specific set of parameters based on the target for which we are querying selectable checks.

For a host we need just a provider, while for a cluster we need its type, the architecture type if hana scale up or hana scale out, while we need ensa version and filesystem type when talking about an ascs/ers cluster...

This sounds like delegating too much to integrating clients (logic leakage), and leads to a lot of boilerplate code to achieve a well known outcome like the selectable checks for a given target (cluster/host/maybemorecomingnext).

As someone integrating with trento I'd find it useful having something more straightforward to interact with in order to get that information.

Here is where I was considering the option of having two endpoints in trento doing this

  • GET /clusters/:cluster_id/available_checks
  • GET /hosts/:id/available_checks

What I like about this option:

  • simplifies integrating with checks execution process within trento context
  • reduces cognitive overhead of who integrates
  • reduces logic duplication and possibility for errors
  • allows for frontend code simplification

What I don't like much:

  • proxy controller towards wanda (which anyway is what we do with SUMA integration)

Note that wanda as such remains untouched in it's agnosticism.

Happy to hear thoughts. If the team agrees on this approach the implementation will be finalized.

@nelsonkopliku nelsonkopliku changed the title wip requiring target's selectable checks Nov 22, 2024
@nelsonkopliku
Copy link
Member Author

Closing as there seems to be not much interest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant