AGENTS.md@public/files/airflow/providers/opensearch · git:20260915.997c05b · 2026-09-15 · sha256 512a42d3eb47a574

AGENTS.md@public/files/airflow/providers/opensearch git:20260915.997c05bA

Immutable. This exact content is served forever at /api/v1/blob/512a42d3eb47a574.

<!-- SPDX-License-Identifier: Apache-2.0
     https://www.apache.org/licenses/LICENSE-2.0 -->

# OpenSearch Provider — Agent Instructions

## Keep in sync with `providers/elasticsearch`

OpenSearch was forked from Elasticsearch and the two providers share most of
their task-log handler code and surface. File layouts mirror each other:

| OpenSearch                              | Elasticsearch                                   |
| --------------------------------------- | ----------------------------------------------- |
| `log/os_task_handler.py`                | `log/es_task_handler.py`                        |
| `log/os_response.py`                    | `log/es_response.py`                            |
| `log/os_json_formatter.py`              | `log/es_json_formatter.py`                      |
| `OpensearchTaskHandler`                 | `ElasticsearchTaskHandler`                      |
| `OpensearchRemoteLogIO`                 | `ElasticsearchRemoteLogIO`                      |

**When fixing a bug or changing behaviour here, check whether the equivalent
change is needed in `providers/elasticsearch` (and vice-versa).** This applies
especially to: task-log handler logic, log grouping / formatting, connection
handling, URL/credential treatment, and response parsing. The two packages
ship on independent release cadences, so the fix should usually land as two
separate PRs on the same day.

Legitimate reasons to diverge: upstream client API differences (`opensearchpy`
vs `elasticsearch`), provider-specific features that only one side has (e.g.
`write_to_os`), or changes gated on config that only exists in one provider.