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

Added CBOR support. #371

Merged
merged 1 commit into from
Jul 2, 2024
Merged

Added CBOR support. #371

merged 1 commit into from
Jul 2, 2024

Conversation

dblock
Copy link
Member

@dblock dblock commented Jul 1, 2024

Description

OpenSearch supports to CBOR, Concise Binary Object Representation format.

$ curl -k https://localhost:9200/_cat/health?format=cbor -u admin:$OPENSEARCH_PASSWORD

??eepochj1719875040itimestamph23:04:00gclusterndocker-clusterfstatusfyellowjnode.totala1inode.dataa1xdiscovered_cluster_managerdtruefshardsb24cprib24dreloa0dinita0hunassignb19mpending_tasksa0rmax_task_wait_timea-uactive_shards_percente55.8%??
pip install cbor2
curl -k https://localhost:9200/_cat/health?format=cbor -u admin:$OPENSEARCH_PASSWORD | cbor2 | jq

[
  {
    "epoch": "1719875014",
    "timestamp": "23:03:34",
    "cluster": "docker-cluster",
    "status": "yellow",
    "node.total": "1",
    "node.data": "1",
    "discovered_cluster_manager": "true",
    "shards": "24",
    "pri": "24",
    "relo": "0",
    "init": "0",
    "unassign": "19",
    "pending_tasks": "0",
    "max_task_wait_time": "-",
    "active_shards_percent": "55.8%"
  }
]

This adds support for that.

Not sure what's up with tests and coverage, will work on this tomorrow.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@dblock dblock force-pushed the cbor branch 2 times, most recently from 21260f9 to 707d1f5 Compare July 1, 2024 23:08
@dblock dblock marked this pull request as ready for review July 1, 2024 23:08
@dblock dblock marked this pull request as draft July 1, 2024 23:11
Copy link
Contributor

github-actions bot commented Jul 2, 2024

Changes Analysis

Commit SHA: 95823e9
Comparing To SHA: e96f70d

API Changes

Summary


└─┬Paths
  ├─┬/_cat/indices
  │ └─┬GET
  │   └─┬Responses
  │     └─┬200
  │       └──[➕] content (23209:11)
  ├─┬/_cat/health
  │ └─┬GET
  │   └─┬Responses
  │     └─┬200
  │       └──[➕] content (23183:11)
  └─┬/_cat/indices/{index}
    └─┬GET
      └─┬Responses
        └─┬200
          └──[➕] content (23209:11)

Document Element Total Changes Breaking Changes
paths 3 0
  • Total Changes: 3
  • Additions: 3

Report

The full API changes report is available at: https://github.com/opensearch-project/opensearch-api-specification/actions/runs/9766861983/artifacts/1661109102

API Coverage

Before After Δ
Covered (%) 483 (47.31 %) 483 (47.31 %) 0 (0 %)
Uncovered (%) 538 (52.69 %) 538 (52.69 %) 0 (0 %)
Unknown 24 24 0

@dblock dblock force-pushed the cbor branch 2 times, most recently from d6f87c2 to 2b79a69 Compare July 2, 2024 15:55
@dblock dblock marked this pull request as ready for review July 2, 2024 15:57
@dblock dblock requested a review from Xtansia July 2, 2024 15:57
@dblock dblock force-pushed the cbor branch 2 times, most recently from b3e8a93 to 20c7933 Compare July 2, 2024 19:19
Signed-off-by: dblock <[email protected]>
@Xtansia Xtansia merged commit 176310c into opensearch-project:main Jul 2, 2024
8 of 9 checks passed
@dblock dblock deleted the cbor branch July 2, 2024 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants