Skip to content

[ci] Use real OpenAI credencials for Lighspeed application tests - #150

Open
malingatembo wants to merge 2 commits into
openstack-k8s-operators:mainfrom
malingatembo:feat/OSPRH-40297-real-openai
Open

malingatembo wants to merge 2 commits into
openstack-k8s-operators:mainfrom
malingatembo:feat/OSPRH-40297-real-openai

Conversation

@malingatembo

@malingatembo malingatembo commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Disabled the mock provider and use gpt-4o-mini throught the OpenAi end point. Instead of the dummy tocken, provider secrete created through the pre-run is used.

Related-Issue: OSPRH-40297

Disabled the mock provider and use gpt-4o-mini throught
the OpenAi end point. Instead of the dummy tocken, provider
secrete created through the pre-run is used.

Signed-off-by: malingatembo <tembomalinga@gmail.com>
@openshift-ci
openshift-ci Bot requested review from Akrog and jancervenka November 5, 2026 13:52
@openshift-ci

openshift-ci Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: malingatembo
Once this PR has been reviewed and has the lgtm label, please assign lpiwowar for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@lpiwowar

lpiwowar commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

/ok-to-test

@lpiwowar

lpiwowar commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

We need to wait for this in order to be able to verify this PR -> #151 (currently in draft; once we confirm it is a valid fix, it gets opened).

@malingatembo

Copy link
Copy Markdown
Contributor Author

recheck

@lpiwowar lpiwowar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It looks like there is something wrong with the configuration or OpenStack Lightspeed can not reach OpenAI [1]. A bit of investigation is needed (maybe an autohold needed?):

<testcase classname="src.rhos_lightspeed_tests.tests.integration.test_okp_virtualization_filter.TestOKPVirtualizationFilter" name="test_query_excludes_openshift_virtualization_docs[What tools can I use to pause, resume, or stop a VM?]" time="17.318">
<failure message="assert 500 == 200 + where 500 = <Response [500]>.status_code">
src/rhos_lightspeed_tests/tests/integration/test_okp_virtualization_filter.py:36: in test_query_excludes_openshift_virtualization_docs assert response.status_code == 200 E assert 500 == 200 E + where 500 = <Response [500]>.status_code
</failure>
</testcase>

[1] https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/logs//19b/rdoproject.org/19b28baaae204e57b55551a0d72c5fcf/controller/ci-framework-data/tests/test_operator/baseline.xml

Trim surrounding whitespace from the token and disable
ansibles automatic stdin /n.

Signed-off-by: malingatembo <tembomalinga@gmail.com>
@malingatembo

malingatembo commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks for the review @lpiwowar
I looked into the failure and found trailing newlines in the bearer header causing
LocalProtocolError: Illegal header value

The Secret-creation task passes the key through stdin, and ansible adds a /n by default.
I’ve pushed a8a5de0 to trim the supplied key and set stdin_add_newline: false.
Let's see if this fixes the issue, if not i'll revert and rerun zuul with autohold.<

[1] Ansible official documentation:

[1] https://docs.ansible.com/projects/ansible/latest/collections/ansible/builtin/shell_module.html#parameters

This branch has not been deployed

No deployments
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.

2 participants