Skip to content

[ResponseOps][Connectors] Fix headers for openai connector#237234

Merged
adcoelho merged 4 commits intoelastic:mainfrom
adcoelho:fix-openai-connector
Oct 2, 2025
Merged

[ResponseOps][Connectors] Fix headers for openai connector#237234
adcoelho merged 4 commits intoelastic:mainfrom
adcoelho:fix-openai-connector

Conversation

@adcoelho
Copy link
Contributor

@adcoelho adcoelho commented Oct 2, 2025

Fixes #237196

Summary

Reverts some of the changes from #233695 to keep the OpenAI-specific serializer logic.

@adcoelho adcoelho self-assigned this Oct 2, 2025
@adcoelho adcoelho requested a review from a team as a code owner October 2, 2025 08:17
@adcoelho adcoelho added release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// backport:version Backport to applied version labels v9.2.0 labels Oct 2, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@adcoelho adcoelho enabled auto-merge (squash) October 2, 2025 08:49
let configHeaders: Record<string, string>;
let secretHeaders: Record<string, string>;

if (formData.actionTypeId === '.gen-ai') {
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we sure that only gen-ai connector needs config headers this way?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Only 3 types have header logic(check line 118).

  if (
    formData.actionTypeId !== '.webhook' &&
    formData.actionTypeId !== '.cases-webhook' &&
    formData.actionTypeId !== '.gen-ai'
  ) {
    return formData;
  }

If it is not one of these, the data is returned as is.

The problem was that when the changes were introduced for the webhook connectors in #233695, they were applied to all these 3 types when gen-ai should have kept the old logic 😬

This is also the motivation for #236733. The whole serializer logic needs to be cleaned up.

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it, thanks!

@elasticmachine
Copy link
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

Test Failures

  • [job] [logs] Serverless Rule Management - Security Solution Cypress Tests #5 / Rules table: persistent state when corrupted and on the rules management tab DOES NOT persist after corrupting the session storage and url param data DOES NOT persist after corrupting the session storage and url param data
  • [job] [logs] Serverless Rule Management - Security Solution Cypress Tests #5 / Rules table: persistent state when persisted state is partially unavailable and on the rules management tab persists after clearing the session storage persists after clearing the session storage

History

cc @adcoelho

@adcoelho adcoelho merged commit c7f43df into elastic:main Oct 2, 2025
12 checks passed
@kibanamachine kibanamachine added backport:skip This PR does not require backporting and removed backport:version Backport to applied version labels labels Oct 2, 2025
adcoelho added a commit to adcoelho/kibana that referenced this pull request Oct 2, 2025
…37234)

Fixes elastic#237196

## Summary

Reverts some of the changes from elastic#233695 to keep the OpenAI-specific
serializer logic.

(cherry picked from commit c7f43df)
@adcoelho
Copy link
Contributor Author

adcoelho commented Oct 2, 2025

💚 All backports created successfully

Status Branch Result
9.2

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

adcoelho added a commit that referenced this pull request Oct 3, 2025
…7234) (#237312)

# Backport

This will backport the following commits from `main` to `9.2`:
- [[ResponseOps][Connectors] Fix headers for openai connector
(#237234)](#237234)

<!--- Backport version: 10.0.2 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT
[{"author":{"name":"Antonio","email":"antonio.coelho@elastic.co"},"sourceCommit":{"committedDate":"2025-10-02T13:44:34Z","message":"[ResponseOps][Connectors]
Fix headers for openai connector (#237234)\n\nFixes #237196\n\n##
Summary\n\nReverts some of the changes from #233695 to keep the
OpenAI-specific\nserializer
logic.","sha":"c7f43dfd248cac21d35f772aa4186f0530637f40","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:skip","Team:ResponseOps","v9.2.0"],"title":"[ResponseOps][Connectors]
Fix headers for openai
connector","number":237234,"url":"https://github.com/elastic/kibana/pull/237234","mergeCommit":{"message":"[ResponseOps][Connectors]
Fix headers for openai connector (#237234)\n\nFixes #237196\n\n##
Summary\n\nReverts some of the changes from #233695 to keep the
OpenAI-specific\nserializer
logic.","sha":"c7f43dfd248cac21d35f772aa4186f0530637f40"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/237234","number":237234,"mergeCommit":{"message":"[ResponseOps][Connectors]
Fix headers for openai connector (#237234)\n\nFixes #237196\n\n##
Summary\n\nReverts some of the changes from #233695 to keep the
OpenAI-specific\nserializer
logic.","sha":"c7f43dfd248cac21d35f772aa4186f0530637f40"}}]}]
BACKPORT-->

Co-authored-by: Janki Salvi <117571355+js-jankisalvi@users.noreply.github.com>
rylnd pushed a commit to rylnd/kibana that referenced this pull request Oct 17, 2025
…37234)

Fixes elastic#237196

## Summary

Reverts some of the changes from elastic#233695 to keep the OpenAI-specific
serializer logic.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// v9.2.0

5 participants