Skip to content

[Backport 8.5] Fix misc issues found with java-client+recordings #1949

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

Merged
merged 1 commit into from
Oct 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
591 changes: 312 additions & 279 deletions output/schema/schema.json

Large diffs are not rendered by default.

48 changes: 25 additions & 23 deletions output/typescript/types.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions specification/enrich/_types/Policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,16 @@
*/

import { Field, Fields, Indices, Name } from '@_types/common'
import { SingleKeyDictionary } from '@spec_utils/Dictionary'

export class Summary {
config: Configuration
config: SingleKeyDictionary<PolicyType, Policy>
}

export class Configuration {
geo_match?: Policy
match: Policy
range: Policy
export enum PolicyType {
geo_match,
match,
range
}

export class Policy {
Expand All @@ -35,4 +36,5 @@ export class Policy {
match_field: Field
query?: string
name?: Name
elasticsearch_version?: string
}
14 changes: 11 additions & 3 deletions specification/ingest/simulate/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
import { Dictionary } from '@spec_utils/Dictionary'
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
import { ActionStatusOptions } from '@watcher/_types/Action'
import { Id, IndexName, Name } from '@_types/common'
import { Id, IndexName, Name, VersionNumber, VersionType } from '@_types/common'
import { DateTime } from '@_types/Time'
import { AdditionalProperties } from '@spec_utils/behaviors'
import { Stringified } from '@spec_utils/Stringified'

export class Ingest {
timestamp: DateTime
Expand All @@ -42,11 +44,17 @@ export class Document {
_source: UserDefinedValue
}

export class DocumentSimulation {
/**
* The simulated document, with optional metadata.
*/
export class DocumentSimulation
implements AdditionalProperties<string, string>
{
_id: Id
_index: IndexName
_ingest: Ingest
_parent?: string
_routing?: string
_source: Dictionary<string, UserDefinedValue>
_version?: Stringified<VersionNumber>
_version_type?: VersionType
}
2 changes: 1 addition & 1 deletion specification/license/post/PostLicenseRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ export interface Request extends RequestBase {
/**
* A sequence of one or more JSON documents containing the license information.
*/
licenses: Array<License>
licenses?: Array<License>
}
}
1 change: 1 addition & 0 deletions specification/ssl/certificates/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export class CertificateInformation {
expiry: DateTime
format: string
has_private_key: boolean
issuer?: string
path: string
serial_number: string
subject_dn: string
Expand Down
10 changes: 10 additions & 0 deletions specification/transform/_types/Transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,16 @@ export class Settings {
* @server_default 500
*/
max_page_search_size?: integer

/**
* If `true`, the transform runs in unattended mode. In unattended mode, the transform retries indefinitely in case
* of an error which means the transform never fails. Setting the number of retries other than infinite fails in
* validation.
*
* @since 8.5.0
* @server_default false
*/
unattended?: boolean
}

export class Source {
Expand Down
25 changes: 9 additions & 16 deletions specification/xpack/usage/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { Job, JobStatistics } from '@ml/_types/Job'
import { double, integer, long, uint, ulong } from '@_types/Numeric'
import { AdditionalProperties } from '@spec_utils/behaviors'
import { Duration, DurationValue, UnitMillis } from '@_types/Time'
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'

export class Base {
available: boolean
Expand Down Expand Up @@ -230,6 +231,7 @@ export class MlInferenceTrainedModelsCount {
total: long
prepackaged: long
other: long
pass_through?: long
regression?: long
classification?: long
ner?: long
Expand Down Expand Up @@ -341,27 +343,18 @@ export class FrozenIndices extends Base {
indices_count: long
}

export class AllJobs {
export class JobUsage {
count: integer
detectors: Dictionary<string, integer>
created_by: Dictionary<string, string | integer>
model_size: Dictionary<string, integer>
forecasts: Dictionary<string, integer>
}

// The 'jobs' entry in MachineLearning can either contain a dictionary of
// individual jobs or a single summary entry under the key '_all'.
// The layout of the summary varies from that of the individual job,
// and is specified in the 'AllJobs' class (defined above).
export class Jobs implements AdditionalProperties<string, Job> {
_all?: AllJobs
created_by: Dictionary<string, long>
detectors: JobStatistics
forecasts: MlJobForecasts
model_size: JobStatistics
}

export class MachineLearning extends Base {
datafeeds: Dictionary<string, Datafeed>
// TODO: xPack marks the entire Job definition as optional
// while the MlJob has many required properties.
jobs: Jobs
/** Job usage statistics. The `_all` entry is always present and gathers statistics for all jobs. */
jobs: Dictionary<string, JobUsage>
node_count: integer
data_frame_analytics_jobs: MlDataFrameAnalyticsJobs
inference: MlInference
Expand Down