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

Fix enabled for parent options #11707

Merged
merged 1 commit into from
May 12, 2022
Merged

Fix enabled for parent options #11707

merged 1 commit into from
May 12, 2022

Conversation

fanny-jiang
Copy link
Contributor

@fanny-jiang fanny-jiang commented Mar 21, 2022

What does this PR do?

Fixes the enabled option for parent config options. Previously, enabled: false was not getting taken into account.

Motivation

Bug

Additional Notes

The enabled option value does not propagate to the nested options. enabled would still need to be configured for the nested options, if applicable.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached

@github-actions
Copy link

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

@codecov
Copy link

codecov bot commented Mar 21, 2022

Codecov Report

Merging #11707 (ee0d719) into master (9fc3a7b) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Flag Coverage Δ
activemq_xml 82.31% <ø> (ø)
ambari 85.75% <ø> (ø)
apache 95.08% <ø> (ø)
avi_vantage 91.92% <ø> (ø)
azure_iot_edge 82.00% <ø> (ø)
btrfs 82.91% <ø> (ø)
cacti 83.95% <ø> (ø)
calico 83.33% <ø> (ø)
cilium 75.34% <ø> (+0.93%) ⬆️
cisco_aci 95.83% <ø> (ø)
citrix_hypervisor 87.50% <ø> (ø)
cloud_foundry_api 95.98% <ø> (+0.12%) ⬆️
cockroachdb 97.35% <ø> (ø)
consul 91.74% <ø> (ø)
coredns 94.54% <ø> (ø)
crio 89.79% <ø> (ø)
datadog_cluster_agent 90.00% <ø> (ø)
directory 94.87% <ø> (ø)
disk 89.42% <ø> (ø)
dns_check 93.84% <ø> (ø)
druid 97.70% <ø> (ø)
ecs_fargate 80.23% <ø> (ø)
eks_fargate 94.05% <ø> (ø)
etcd 93.87% <ø> (ø)
external_dns 89.09% <ø> (ø)
fluentd 94.77% <ø> (ø)
foundationdb 83.07% <ø> (?)
go_expvar 92.73% <ø> (ø)
hazelcast 92.39% <ø> (ø)
hdfs_datanode 89.74% <ø> (ø)
hdfs_namenode 86.72% <ø> (ø)
http_check 91.15% <ø> (+1.71%) ⬆️
ibm_i 80.65% <ø> (ø)
istio 77.46% <ø> (+0.56%) ⬆️
kong 88.58% <ø> (ø)
kube_apiserver_metrics 97.67% <ø> (ø)
kube_controller_manager 96.85% <ø> (ø)
kube_dns 98.85% <ø> (ø)
kube_metrics_server 100.00% <ø> (ø)
kube_proxy 100.00% <ø> (ø)
kube_scheduler 96.20% <ø> (ø)
kubelet 90.42% <ø> (ø)
kubernetes_state 89.78% <ø> (+0.23%) ⬆️
kyototycoon 85.96% <ø> (ø)
lighttpd 83.64% <ø> (ø)
linkerd 85.14% <ø> (+1.14%) ⬆️
linux_proc_extras 96.22% <ø> (ø)
mapr 82.70% <ø> (ø)
marathon 83.12% <ø> (ø)
mcache 93.52% <ø> (ø)
mesos_master 89.75% <ø> (ø)
nagios 89.53% <ø> (ø)
network 78.10% <ø> (+0.90%) ⬆️
nfsstat 95.20% <ø> (ø)
nginx 95.24% <ø> (+0.54%) ⬆️
nginx_ingress_controller 98.36% <ø> (ø)
openldap 96.33% <ø> (ø)
openmetrics 97.14% <ø> (ø)
openstack 51.45% <ø> (ø)
openstack_controller 90.74% <ø> (ø)
oracle 91.70% <ø> (+2.69%) ⬆️
pgbouncer 90.45% <ø> (ø)
postfix 88.04% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Copy link
Contributor

@kayayarai kayayarai left a comment

Choose a reason for hiding this comment

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

No docs to review

Copy link
Contributor

@djova djova left a comment

Choose a reason for hiding this comment

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

Thanks!

@hithwen hithwen requested a review from ofek March 22, 2022 10:09
@@ -183,7 +183,11 @@ def write_option(option, writer, indent='', start_list=False):
multiple = option['multiple']
multiple_instances_defined = option.get('multiple_instances_defined')

writer.write(indent, option_name, ':', '\n')
if not option_enabled(option):
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't it be true by default?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems for the other non-nested options that if the option is not explicitly enabled, it is commented out: options with a value option and sections with an example option

@fanny-jiang fanny-jiang merged commit 3bdc4ce into master May 12, 2022
@fanny-jiang fanny-jiang deleted the fanny/ddev_spec branch May 12, 2022 16:56
@fanny-jiang fanny-jiang mentioned this pull request May 12, 2022
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants