Skip to content

Commit

Permalink
Use docker compose v2, add nodes stats global io usage struct, tests …
Browse files Browse the repository at this point in the history
…against opesnearch 2.13 (#506)

* opensearchapi: Adds GlobalIOUsage struct for nodes stats

Signed-off-by: Jakob Hahn <jakob.hahn@hetzner.com>

* github/workflows: tests against opensearch 2.13.0

Signed-off-by: Jakob Hahn <jakob.hahn@hetzner.com>

* change from docker compose v1 to v2

Signed-off-by: Jakob Hahn <jakob.hahn@hetzner.com>

---------

Signed-off-by: Jakob Hahn <jakob.hahn@hetzner.com>
  • Loading branch information
Jakob3xD authored Apr 3, 2024
1 parent e0278ab commit 3b901c7
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
- { opensearch_version: 2.10.0 }
- { opensearch_version: 2.11.1 }
- { opensearch_version: 2.12.0 }
- { opensearch_version: 2.13.0 }
steps:
- uses: actions/checkout@v4

Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
## [Unreleased]

### Added
- Adds GlobalIOUsage struct for nodes stats ([#506]((https://github.com/opensearch-project/opensearch-go/pull/506))

### Changed
- Use docker compose v2 instead of v1 ([#506]((https://github.com/opensearch-project/opensearch-go/pull/506))

### Deprecated

Expand Down Expand Up @@ -171,4 +173,4 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
[2.1.0]: https://github.com/opensearch-project/opensearch-go/compare/v2.0.1...v2.1.0
[2.0.1]: https://github.com/opensearch-project/opensearch-go/compare/v2.0.0...v2.0.1
[2.0.0]: https://github.com/opensearch-project/opensearch-go/compare/v1.1.0...v2.0.0
[1.0.0]: https://github.com/opensearch-project/opensearch-go/compare/v1.0.0...v1.1.0
[1.0.0]: https://github.com/opensearch-project/opensearch-go/compare/v1.0.0...v1.1.0
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,13 @@ godoc: ## Display documentation for the package
godoc --http=localhost:6060 --play

cluster.build:
docker-compose --project-directory .ci/opensearch build;
docker compose --project-directory .ci/opensearch build;

cluster.start:
docker-compose --project-directory .ci/opensearch up -d ;
docker compose --project-directory .ci/opensearch up -d ;

cluster.stop:
docker-compose --project-directory .ci/opensearch down ;
docker compose --project-directory .ci/opensearch down ;


cluster.clean: ## Remove unused Docker volumes and networks
Expand Down
4 changes: 2 additions & 2 deletions guides/index_lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ To start the cluster, run the following command:

```bash
cd /path/to/docker-compose.yml
docker-compose up -d
docker compose up -d
```

Let's create a client instance to access this cluster:
Expand Down Expand Up @@ -258,5 +258,5 @@ Notice that we are passing `ignore unavailable` to the request. This tells the s
All resources created in this guide are automatically deleted when the cluster is stopped. You can stop the cluster by running the following command:

```bash
docker-compose down -v
docker compose down -v
```
5 changes: 5 additions & 0 deletions opensearchapi/api_nodes-stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -704,4 +704,9 @@ type NodesStatsAdmissionControl struct {
RejectionCount json.RawMessage `json:"rejection_count"`
} `json:"transport"`
} `json:"global_cpu_usage"`
GlobalIOUsage struct {
Transport struct {
RejectionCount json.RawMessage `json:"rejection_count"`
} `json:"transport"`
} `json:"global_io_usage"`
}

0 comments on commit 3b901c7

Please sign in to comment.