Skip to content

Commit 9f4916b

Browse files
arnaudsjsinmantaci
authored andcommitted
Added documentation regarding the environment_settings option in the project.yml file (Issue #7654, PR #9392)
# Description Add documentation regarding the `environment_settings` option in `project.yml`. Part of #7654 # Self Check: - [x] Attached issue to pull request - [x] Changelog entry - [x] Type annotations are present - [x] Code is clear and sufficiently documented - [x] No (preventable) type errors (check using make mypy or make mypy-diff) - [x] Sufficient test cases (reproduces the bug/tests the requested feature) - [x] Correct, in line with design - [x] End user documentation is included or an issue is created for end-user documentation - [ ] ~~If this PR fixes a race condition in the test suite, also push the fix to the relevant stable branche(s) (see [test-fixes](https://internal.inmanta.com/development/core/tasks/build-master.html#test-fixes) for more info)~~
1 parent 4133df1 commit 9f4916b

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
description: "Added documentation regarding the `environment_settings` option in the project.yml file"
3+
issue-nr: 7654
4+
issue-repo: inmanta-core
5+
change-type: patch
6+
destination-branches: [master, iso8]

docs/reference/projectyml.rst

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ The code snippet below provides an example of a complete ``project.yml`` file:
5454
extra-index-url: []
5555
pre: false
5656
use-system-config: false
57+
environment_settings:
58+
auto_deploy: true
59+
server_compile: true
5760
5861
5962
.. _specify_location_pip:
@@ -93,7 +96,7 @@ Setting this to ``true`` will have the following consequences:
9396
environment variables or pip config files, and passed to pip as extra indexes.
9497

9598
- If ``pre`` is set, it will supersede pip's ``pre`` option set by the ``PIP_PRE`` environment variable or in pip
96-
config file. When true, pre-release versions are allowed when installing v2 modules or v1 modules' dependencies.
99+
config file. When true, pre-release versions are allowed when installing v2 modules or v1 modules' dependencies.
97100

98101
- :term:`Executors<executor>` live on the same host as the server, and so they will share the pip config at the system level.
99102

@@ -214,6 +217,18 @@ Changes relative to ``inmanta-2023.4`` (OSS):
214217
- Pip environment variables are no longer ignored when ``pip.use-system-config`` is true and the corresponding option
215218
from the ``project_yml`` is unset.
216219

220+
Environment settings
221+
--------------------
222+
223+
This section explains the behavior of the ``environment_settings`` configuration option in the ``project.yml`` file. This
224+
option allows a project to indicate that it needs certain environment settings to be set to a specific value. These environment
225+
settings are applied on the server each time the ``inmanta export`` command is executed. All environment settings exported like
226+
this will become protected. This means that it will no longer be possible to update these settings using the API endpoints to
227+
update environment settings or via the web-console. In other words, these environment settings are from then on managed using the
228+
project.yml file only. To unprotect an environment setting, remove it from the project.yml file again and run the
229+
``inmanta export`` command.
230+
231+
217232
Module metadata files
218233
#####################
219234

src/inmanta/module.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1511,8 +1511,9 @@ class ProjectMetadata(Metadata, MetadataFieldRequires):
15111511
:param pip: A configuration section that holds information about the pip configuration that should be taken into account
15121512
when installing Python packages (See: :py:class:`inmanta.module.ProjectPipConfig` for more details).
15131513
:param environment_settings: The environment settings that need to be configured on the server for this project.
1514-
The environment settings can be updated on export by setting the
1515-
`--update-environment-settings` option on the `inmanta export` command.
1514+
The settings will be applied on the server when the `inmanta export` command is run.
1515+
Environment settings specified here cannot be updated via the regular API endpoints
1516+
to update environment settings as long as they are in this list.
15161517
"""
15171518

15181519
_raw_parser: typing.ClassVar[type[YamlParser]] = YamlParser

0 commit comments

Comments
 (0)