Skip to content

Conversation

@slagle
Copy link
Contributor

@slagle slagle commented Dec 11, 2025

go was formatting the servicesOverride slice without commas between the
items, which causes the value to be interpreted as a YAML list of one
string item. Marshal'ing the value to JSON first causes proper JSON
syntax so that the resulting YAML value is properly formatted with
commas.

This was breaking the download-cache service that relies on the proper
value of edpm_services_override when using download-cache and
servicesOverride on a Deployment.

Jira: OSPRH-21737
Signed-off-by: James Slagle jslagle@redhat.com

go was formatting the servicesOverride slice without commas between the
items, which causes the value to be interpreted as a YAML list of one
string item. Marshal'ing the value to JSON first causes proper JSON
syntax so that the resulting YAML value is properly formatted with
commas.

This was breaking the download-cache service that relies on the proper
value of edpm_services_override when using download-cache and
servicesOverride on a Deployment.

Jira: OSPRH-21737
Signed-off-by: James Slagle <jslagle@redhat.com>
@openshift-ci openshift-ci bot requested review from dprince and fultonj December 11, 2025 22:47
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 11, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: slagle

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 12, 2025

@slagle: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/openstack-operator-build-deploy-kuttl-4-18 7c6ab83 link true /test openstack-operator-build-deploy-kuttl-4-18
ci/prow/openstack-operator-build-deploy-kuttl 7c6ab83 link true /test openstack-operator-build-deploy-kuttl

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Copy link
Contributor

@bshephar bshephar left a comment

Choose a reason for hiding this comment

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

Hey man,

I couldn't open the Jira to see the full context of what the error was. But my suggestion is an implementation detail rather than a fixing the reported problem suggestion.


if len(deployment.Spec.ServicesOverride) > 0 {
a.ExtraVars["edpm_services_override"] = json.RawMessage([]byte(fmt.Sprintf("\"%s\"", deployment.Spec.ServicesOverride)))
extraVarsJSON, _ := json.Marshal(deployment.Spec.ServicesOverride)
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like this err should probably be checked, no?

I understand that is complicated by the fact that this function doesn't return anything and changing the signature of the function isn't nice. It is only used in one place though, so probably not the end of the world to update the signature to:

func (a *EEJob) FormatAEEExtraVars(
	aeeSpec *dataplanev1.AnsibleEESpec,
	service *dataplanev1.OpenStackDataPlaneService,
	deployment *dataplanev1.OpenStackDataPlaneDeployment,
	nodeSet client.Object,
) error {
}

Which does also necessitate changing the signature of BuildAeeJobSpec to also return an error to facilitate back propagating the error. But I think it would probably be nicer if the error was captured and returned rather than silently dropped.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 14, 2026

@bshephar: changing LGTM is restricted to collaborators

Details

In response to this:

Hey man,

I couldn't open the Jira to see the full context of what the error was. But my suggestion is an implementation detail rather than a fixing the reported problem suggestion.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants