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

[Backport 1.x] Code generation updates #755

Merged
merged 11 commits into from
Aug 17, 2024
Merged
Next Next commit
Implement the cat.pit_segments and cat.segment_replication operat…
…ions (#527)

* Implement `cat.pit_segments` and `cat.all_pit_segments`

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

Allow body on get/head

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Implement `cat.segment_replication`

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Add changelog entry

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

---------

Signed-off-by: Thomas Farr <tsfarr@amazon.com>
(cherry picked from commit c3deb70)
Xtansia committed Aug 14, 2024

Verified

This commit was signed with the committer’s verified signature.
Xtansia Thomas Farr
commit 119590e2298db63bd921c0cf878d5ccf02e025b5
4 changes: 2 additions & 2 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ jobs:
restore-keys: |
${{ runner.os }}-nuget-
- run: "./build.sh integrate ${{ matrix.version }} readonly,writable random:test_only_one --report"
- run: "./build.sh integrate ${{ matrix.version }} readonly,replicatedreadonly,writable random:test_only_one --report"
name: Integration Tests
working-directory: client

@@ -105,7 +105,7 @@ jobs:
knn_plugin: true
plugins_output_directory: ${{ env.OPENSEARCH_PLUGINS_DIRECTORY }}

- run: "./build.sh integrate $OPENSEARCH_VERSION readonly,writable random:test_only_one --report"
- run: "./build.sh integrate $OPENSEARCH_VERSION readonly,replicatedreadonly,writable random:test_only_one --report"
name: Integration Tests
working-directory: client
env:
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

## [Unreleased]
### Added
- Added support for the `Cat.PitSegments` and `Cat.SegmentReplication` APIs ([#527](https://github.com/opensearch-project/opensearch-net/pull/527))
- Added support for `MinScore` on `ScriptScoreQuery` ([#624](https://github.com/opensearch-project/opensearch-net/pull/624))
- Added support for serializing the `DateOnly` and `TimeOnly` types ([#734](https://github.com/opensearch-project/opensearch-net/pull/734))
- Added support for the `Ext` parameter on `SearchRequest` ([#738](https://github.com/opensearch-project/opensearch-net/pull/738))
Original file line number Diff line number Diff line change
@@ -131,11 +131,12 @@ public IDisposable Start(IConsoleLineHandler writer, TimeSpan waitForStarted)
OnBeforeStart();

var subscriptions = new Subscriptions();
foreach (var node in Nodes) subscriptions.Add(node.SubscribeLines(writer));

var waitHandles = Nodes.Select(w => w.StartedHandle).ToArray();
if (!WaitHandle.WaitAll(waitHandles, waitForStarted))
foreach (var node in Nodes)
{
subscriptions.Add(node.SubscribeLines(writer));
if (node.WaitForStarted(waitForStarted)) continue;

var nodeExceptions = Nodes.Select(n => n.LastSeenException).Where(e => e != null).ToList();
writer?.WriteError(
$"{{{GetType().Name}.{nameof(Start)}}} cluster did not start after {waitForStarted}");
Original file line number Diff line number Diff line change
@@ -88,7 +88,10 @@ private static StartArguments StartArgs(NodeConfiguration config)

private static Dictionary<string, string> EnvVars(NodeConfiguration config)
{
var environmentVariables = new Dictionary<string, string> { { "OPENSEARCH_JAVA_OPTS", "-Xms1g -Xmx1g" } };
var javaOpts = new List<string> { "-Xms1g", "-Xmx1g" };

var environmentVariables = new Dictionary<string, string> { { "OPENSEARCH_JAVA_OPTS", string.Join(" ", javaOpts) } };

if (!string.IsNullOrWhiteSpace(config.FileSystem.ConfigPath))
environmentVariables.Add(config.FileSystem.ConfigEnvironmentVariableName, config.FileSystem.ConfigPath);

3 changes: 2 additions & 1 deletion src/ApiGenerator/Configuration/CodeConfiguration.cs
Original file line number Diff line number Diff line change
@@ -41,7 +41,8 @@ public static class CodeConfiguration
{
new("{create,delete}_pit"),
new("{delete,get}_all_pits"),

new("cat.{all_pit,pit}_segments"),
new("cat.segment_replication"),
new("cluster.{delete,exists,get,put}_component_template"),
new("indices.{delete,exists,get,put}_index_template")
};
Loading