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

Rename provision config instance #400

Conversation

cgchinmay
Copy link
Collaborator

@cgchinmay cgchinmay commented Oct 28, 2023

Description

[Describe what this change achieves]
renames provision_config_instance to cluster-config

Issues Resolved

[List any issues this PR will resolve]
#310

Testing

  • New functionality includes testing

[Describe how this change was tested]

validated with make test and make it

Running help with list command shows the renamed options

python3 benchmark.py list cluster-configs

Available cluster-configs:

Name                  Type            Description
--------------------  --------------  --------------------------------------
16gheap               cluster-config  Sets the Java heap to 16GB
1gheap                cluster-config  Sets the Java heap to 1GB
24gheap               cluster-config  Sets the Java heap to 24GB
2gheap                cluster-config  Sets the Java heap to 2GB
4gheap                cluster-config  Sets the Java heap to 4GB
8gheap                cluster-config  Sets the Java heap to 8GB
defaults              cluster-config  Sets the Java heap to 1GB
basic-license         mixin           Basic License
debug-non-safepoints  mixin           More accurate CPU profiles
ea                    mixin           Enables Java assertions
fp                    mixin           Preserves frame pointers
g1gc                  mixin           Enables the G1 garbage collector
parallelgc            mixin           Enables the Parallel garbage collector
trial-license         mixin           Trial License
unpooled              mixin           Enables Netty's unpooled allocator

-------------------------------
[INFO] SUCCESS (took 0 seconds)
-------------------------------

--------------------------------------------------
python3 benchmark.py list --help             
usage: benchmark.py list [-h] [--limit LIMIT] [--workload-repository WORKLOAD_REPOSITORY | --workload-path WORKLOAD_PATH] [--workload-revision WORKLOAD_REVISION]
                         [--distribution-version DISTRIBUTION_VERSION] [--cluster-config-path CLUSTER_CONFIG_PATH]
                         [--cluster-config-repository CLUSTER_CONFIG_REPOSITORY] [--cluster-config-revision CLUSTER_CONFIG_REVISION] [--quiet] [--offline]
                         configuration

positional arguments:
  configuration         The configuration for which Benchmark should show the available options. Possible values are: telemetry, workloads, pipelines,
                        test_executions, cluster-configs, opensearch-plugins

optional arguments:
  -h, --help            show this help message and exit
  --limit LIMIT         Limit the number of search results for recent test_executions (default: 10).
  --workload-repository WORKLOAD_REPOSITORY
                        Define the repository from where Benchmark will load workloads (default: default).
  --workload-path WORKLOAD_PATH
                        Define the path to a workload.
  --workload-revision WORKLOAD_REVISION
                        Define a specific revision in the workload repository that Benchmark should use.
  --distribution-version DISTRIBUTION_VERSION
                        Define the version of the OpenSearch distribution to download. Check https://opensearch.org/docs/version-history/ for released versions.
  --cluster-config-path CLUSTER_CONFIG_PATH
                        Define the path to the cluster-config and plugin configurations to use.
  --cluster-config-repository CLUSTER_CONFIG_REPOSITORY
                        Define repository from where Benchmark will load cluster-configs (default: default).
  --cluster-config-revision CLUSTER_CONFIG_REVISION
                        Define a specific revision in the cluster-configs repository that Benchmark should use.
  --quiet               Suppress as much as output as possible (default: false).
  --offline             Assume that Benchmark has no connection to the Internet (default: false).

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

default="default")
p.add_argument(
"--provision-config-revision",
help="Define a specific revision in the provision_config repository that Benchmark should use.",
help="Define a specific revision in the cluster_configs repository that Benchmark should use.",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: cluster_configs --> cluster-configs to keep consistency in the help definitions

f"provision_config_instances with `{PROGRAM_NAME} list "
f"provision_config_instances` (default: defaults).",
"--cluster-config",
help=f"Define the cluster_config to use. List possible "
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: Update cluster_config --> cluster-config to keep consistency in help texts

"--provision-config-instance-params",
help="Define a comma-separated list of key:value pairs that are injected verbatim as variables for the provision_config_instance.",
"--cluster-config-params",
help="Define a comma-separated list of key:value pairs that are injected verbatim as variables for the cluster_config.",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: cluster_config --> cluster-config

"--cluster-config",
help=f"Define the cluster_config to use. List possible "
f"cluster_configs with `{PROGRAM_NAME} list "
f"cluster_configs` (default: defaults).",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: cluster_configs --> cluster-configs

f"provision_config_instances with `{PROGRAM_NAME} list "
f"provision_config_instances` (default: defaults).",
"--cluster-config",
help=f"Define the cluster_config to use. List possible "
Copy link
Collaborator

@IanHoang IanHoang Oct 31, 2023

Choose a reason for hiding this comment

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

Nit: cluster_config and cluster_configs --> cluster-config and cluster-configs

default="default")
install_parser.add_argument(
"--provision-config-revision",
help="Define a specific revision in the provision_config repository that Benchmark should use.",
default=None)
install_parser.add_argument(
"--provision-config-path",
help="Define the path to the provision_config_instance and plugin configurations to use.")
help="Define the path to the cluster_config and plugin configurations to use.")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: cluster_config --> cluster-config

Copy link
Collaborator

@IanHoang IanHoang left a comment

Choose a reason for hiding this comment

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

Left some minor suggestions but overall looks good to me! Were you able to test this? Could you provide a sample output of the help text and a brief run with a cluster-config to ensure that it works?

When we merge this in, we'll merge this into a separate branch first since these changes are considered breaking-changes. Thus, we don't want to merge this into mainline yet until we're ready to release OSB 2.0.0

@cgchinmay
Copy link
Collaborator Author

cgchinmay commented Oct 31, 2023 via email

Signed-off-by: Chinmay Gadgil <[email protected]>

renamed provision_config_instances directory

Signed-off-by: Chinmay Gadgil <[email protected]>

renamed pending provision_config_instance to cluster_config

Signed-off-by: Chinmay Gadgil <[email protected]>

renamed provision-config-path,repostiry and revision to cluster-config-path,repository and revision respectively

renamed provision_config_instance_types to cluster_config_types

Signed-off-by: Chinmay Gadgil <[email protected]>

renamed provision_config_instance_descriptor to cluster_config_descriptor

Signed-off-by: Chinmay Gadgil <[email protected]>
@cgchinmay cgchinmay force-pushed the rename_provision_config_instance branch from 49c219b to 385ff96 Compare November 5, 2023 23:15
@IanHoang IanHoang changed the base branch from main to renaming-components November 8, 2023 21:41
@IanHoang IanHoang merged commit a23c0a5 into opensearch-project:renaming-components Nov 14, 2023
8 checks passed
@IanHoang IanHoang mentioned this pull request Feb 14, 2024
5 tasks
IanHoang pushed a commit to IanHoang/opensearch-benchmark that referenced this pull request Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants