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

chore: add exec.kdl docs #803

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

chore: add exec.kdl docs #803

wants to merge 1 commit into from

Conversation

aamohd
Copy link
Contributor

@aamohd aamohd commented Jan 17, 2025

Resolves #734.

@aamohd aamohd requested a review from j-lanson January 17, 2025 18:35
Copy link
Collaborator

@j-lanson j-lanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good start

Comment on lines 54 to 63
`Exec.kdl` file has been provided in `./config/`. You can use it by copying
the file to the root directory of Hipcheck. Any changes saved to the relocated
`./Exec.kdl` will override the default Execution Configuration values, whether
the file is stored at `hipcheck/Exec.kdl` or `.hipcheck/Exec.kdl`.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This description isn't clear enough. Firstly, we should only be looking for ./hipcheck/Exec.kdl, not also hipcheck. This also doesn't address the recursive parent dir searching. Can reference https://doc.rust-lang.org/cargo/reference/config.html for inspiration

Comment on lines 7 to 15

As part of the Hipcheck plugin start-up process, there are specific values
that are hardcoded during the connection to the gRPC channel, such as the
`backoff-interval` to indicate a wait time between connections. However,
depending on system requirements, for example, these values may need to be
updated.The Execution Configuration file is a [KDL](https://kdl.dev/) language
configuration file that provides custom values for the plugin start-up process.

Here's what the default Execution Configuration file looks like:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point of the Exec.kdl is to support any Hipcheck exec configuration, not just the plugin startup. That's all we have currently, but we may add other sections in the future. I would move most of this description to "## The plugin Section", and provide a more general explanation in this overview section

Comment on lines 41 to 47

The values in the Execution Configuration file are made available to
Hipcheck through three ways:

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section overview should state they are listed in order of priority, and reverse the order of the sections, so --exec is first.

Comment on lines 47 to 48
Hipcheck can run just fine without explicitly making changes to any of these
variables. The default values are hardcoded to be provided to the
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--> "In the case that an "Exec.kdl" file was not resolved using the above methods, Hipcheck will use in-memory defaults for the values in this file.

@aamohd aamohd requested a review from j-lanson January 21, 2025 17:46
Comment on lines +29 to +30
During the Hipcheck plugin start-up process, certain values are hardcoded for
the gRPC channel connection. However, depending on system requirements, these
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--> During the plugin start-up process, certain parameters are used for plugin initialization and gRPC connection establishment

Comment on lines +9 to +10
Execution Configuration file allows you to configure the Hipcheck execution
to support various needs, such as system requirements. The Execution
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

configure the Hipcheck execution to support various needs, such as system requirements --> configure parameters of Hipcheck's execution in the case that the defaults are inappropriate for your system or use-case.

Execution Configuration file allows you to configure the Hipcheck execution
to support various needs, such as system requirements. The Execution
Configuration file is a [KDL](https://kdl.dev/) configuration file
that provides custom values required for Hipcheck's execution, including the
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

required by --> used during.

Comment on lines +38 to +39
| `max-spawn-attempts` | 3 | Maximum number of attempts to spawn a gRPC channel. |
| `max-conn-attempts` | 5 | Maximum number of attempts to make a plugin connection. |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

max-spawn-attempts: Maximum number of attempts to spawn a plugin subprocess.
max-conn-attempts: Maximum number of attempts to establish a gRPC connection.

Comment on lines +59 to +60
to the root directory of Hipcheck. When Hipcheck runs, it will find the file
in `.hipcheck/Exec.kdl`. This search process starts in the current directory
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will first try Exec.kdl, then look for .hipcheck/Exec.kdl starting from the current directory and recursing upwards.

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

Successfully merging this pull request may close these issues.

Add Exec.kdl documentation to site
2 participants