Skip to content

Document new 'config' API #4331

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

Merged
merged 7 commits into from
Jul 8, 2024
Merged

Document new 'config' API #4331

merged 7 commits into from
Jul 8, 2024

Conversation

andreyaksenov
Copy link
Contributor

@andreyaksenov andreyaksenov commented Jul 2, 2024

Updated reference for the config module. Fixed doc issues:

Staging:

Note

New code examples are created using the sharded_cluster_crud_docker demo application.

@github-actions github-actions bot temporarily deployed to branch-config_module_new_api July 2, 2024 14:39 Destroyed
@andreyaksenov andreyaksenov force-pushed the config_module_new_api branch from 9fe23c1 to 8715bc2 Compare July 2, 2024 15:08
@github-actions github-actions bot temporarily deployed to branch-config_module_new_api July 2, 2024 15:10 Destroyed
@andreyaksenov andreyaksenov force-pushed the config_module_new_api branch from 8715bc2 to 869d095 Compare July 3, 2024 07:17
@github-actions github-actions bot temporarily deployed to branch-config_module_new_api July 3, 2024 07:18 Destroyed
@andreyaksenov andreyaksenov force-pushed the config_module_new_api branch from 869d095 to 055bbfc Compare July 3, 2024 07:51
@github-actions github-actions bot temporarily deployed to branch-config_module_new_api July 3, 2024 07:52 Destroyed
@andreyaksenov andreyaksenov marked this pull request as ready for review July 3, 2024 07:58
@andreyaksenov andreyaksenov force-pushed the config_module_new_api branch from 055bbfc to d16f367 Compare July 3, 2024 08:06
@github-actions github-actions bot temporarily deployed to branch-config_module_new_api July 3, 2024 08:08 Destroyed
@andreyaksenov andreyaksenov requested a review from Totktonada July 3, 2024 08:15
@github-actions github-actions bot temporarily deployed to branch-config_module_new_api July 3, 2024 15:36 Destroyed
@andreyaksenov andreyaksenov force-pushed the config_module_new_api branch from e28dbd0 to da9c332 Compare July 4, 2024 07:24
@github-actions github-actions bot temporarily deployed to branch-config_module_new_api July 4, 2024 07:25 Destroyed
@github-actions github-actions bot temporarily deployed to branch-config_module_new_api July 4, 2024 07:42 Destroyed
@andreyaksenov andreyaksenov force-pushed the config_module_new_api branch from b7ab107 to 07bb0a6 Compare July 4, 2024 07:43
@github-actions github-actions bot temporarily deployed to branch-config_module_new_api July 4, 2024 07:45 Destroyed
@github-actions github-actions bot temporarily deployed to branch-config_module_new_api July 4, 2024 07:47 Destroyed
@andreyaksenov andreyaksenov requested a review from lenkis July 4, 2024 08:20
@github-actions github-actions bot temporarily deployed to branch-config_module_new_api July 4, 2024 12:28 Destroyed
Get a configuration applied to the current instance.
Optionally, you can pass a configuration option name to get its value.
Get a configuration applied to the current or remote instance.
Note that there is the following difference between getting a configuration for the current and remote instance:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Note that there is the following difference between getting a configuration for the current and remote instance:
Note the following differences between getting a configuration for the current and remote instance:

Get a configuration applied to the current or remote instance.
Note that there is the following difference between getting a configuration for the current and remote instance:

- For the current instance, ``get()`` returns an instance configuration considering :ref:`environment variables <configuration_environment_variable>`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- For the current instance, ``get()`` returns an instance configuration considering :ref:`environment variables <configuration_environment_variable>`.
- For the current instance, ``get()`` returns instance configuration considering :ref:`environment variables <configuration_environment_variable>`.

Note that there is the following difference between getting a configuration for the current and remote instance:

- For the current instance, ``get()`` returns an instance configuration considering :ref:`environment variables <configuration_environment_variable>`.
- For a remote instance, ``get()`` only considers a cluster configuration and ignores environment variables.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- For a remote instance, ``get()`` only considers a cluster configuration and ignores environment variables.
- For a remote instance, ``get()`` only considers cluster configuration and ignores environment variables.

**Example: configuration warnings**

In the example below, the instance's state is ``check_warnings``.
The ``alerts`` section informs that privileges to the ``bands`` space for ``sampleuser`` cannot be granted because the ``bands`` space has not created yet:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
The ``alerts`` section informs that privileges to the ``bands`` space for ``sampleuser`` cannot be granted because the ``bands`` space has not created yet:
The ``alerts`` section informs that privileges to the ``bands`` space for ``sampleuser`` cannot be granted because the ``bands`` space has not been created yet:


Get a URI of the current or remote instance.

:param string uri_type: a URI type. There are the following URI types are supported:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
:param string uri_type: a URI type. There are the following URI types are supported:
:param string uri_type: a URI type. The following URI types are supported:

7, debug'
timestamp: 2024-02-29T12:55:54.366810+0300
...
In this example, the same actions are performed for instances from the specific replica set:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
In this example, the same actions are performed for instances from the specific replica set:
In this example, the same actions are performed for instances from a specific replica set:

@github-actions github-actions bot temporarily deployed to branch-config_module_new_api July 8, 2024 11:56 Destroyed
@andreyaksenov andreyaksenov force-pushed the config_module_new_api branch from 65f532d to ae8e911 Compare July 8, 2024 12:17
@github-actions github-actions bot temporarily deployed to branch-config_module_new_api July 8, 2024 12:19 Destroyed
@andreyaksenov andreyaksenov force-pushed the config_module_new_api branch from ae8e911 to 0e0243c Compare July 8, 2024 12:37
@andreyaksenov andreyaksenov merged commit 7f01c9d into latest Jul 8, 2024
1 check passed
@andreyaksenov andreyaksenov deleted the config_module_new_api branch July 8, 2024 12:41
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.

instance_uri() method for config module config: access configuration of other cluster members Expansion of config:info()
3 participants