Repository navigation
Conversation
* Add group/ trailing-slash key syntax for non-recursive group config, distinct from group/* which cascades to all subgroups * Add group_exact key type in _get_key_type() to classify /-ending keys * Update get_groups() to collect and deduplicate both /* and / keys * Update get_effective_config_for_group() to merge exact config on top of recursive config before the common merge * Add exact parameter to _get_group_config() to look up group/ keys * Add 14 unit tests covering config resolution, inherit: false interaction, key type classification, and project exclusion * Update docs/reference/index.md with the new configuration level Closes gitlabform#541. Based on the approach from PR gitlabform#986. Co-Authored-By: Claude Opus 4.6 [email protected]
|
this would also provide a resolution to: #1427 |
| if not has_parent_context: | ||
| self._validate_break_inheritance_flag(exact_config, group) | ||
| group_config = self._merge_configs(group_config, exact_config) | ||
| debug("*Effective* group/subgroup+exact config: %s", to_str(group_config)) |
There was a problem hiding this comment.
What happens when there's a config like below:
projects_and_groups:
my_group/:
group_settings:
inherit: false
visibility: publicWill it crash because there's no config from parent level to break the inheritance (i.e. no my_group/* paths with configs).
| debug("*Exact* (non-recursive) config for %s: %s", group, to_str(exact_config)) | ||
| has_parent_context = bool(common_config) or bool(group_config) | ||
| if not has_parent_context: | ||
| self._validate_break_inheritance_flag(exact_config, group) |
There was a problem hiding this comment.
Does it break inheritance for all hierarchy? For example:
projects_and_groups:
"*":
group_settings:
from_common: true # from the * (common) layer
some_group/*:
group_settings:
from_recursive: true # from the group/* layer
some_group/:
group_settings:
inherit: false # user expects to break ALL inheritance?
visibility: publicWill the above break inheritance from * also for some_group/?
| [project] | ||
| name = "gitlabform" | ||
| version = "6.2.2" | ||
| version = "6.3.0" |
There was a problem hiding this comment.
Please undo the version change. This is updated when we make a release.
| [[package]] | ||
| name = "gitlabform" | ||
| version = "6.2.2" | ||
| version = "6.3.0" |
There was a problem hiding this comment.
Please undo the version change. This is updated when we make a release.
|
havn't forgotten aboutu this. circling back in a day or two to do the redsquest updates and respond on the othe rchain. |
group/trailing-slash key syntax for non-recursive group config, distinct fromgroup/*which cascades to all subgroupsgroup_exactkey type in_get_key_type()to classify/-ending keysget_groups()to collect and deduplicate both/*and/keysget_effective_config_for_group()to merge exact config on top of recursive config before the common mergeexactparameter to_get_group_config()to look upgroup/keysinherit: falseinteraction, key type classification, and project exclusionCloses #541. Based on the approach from PR #986.
Co-Authored-By: Claude Opus 4.6 [email protected]