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

🐛 Bug: Snapshot repo settings is missing required types #1988

Closed
DesAWSume opened this issue Aug 28, 2023 · 5 comments
Closed

🐛 Bug: Snapshot repo settings is missing required types #1988

DesAWSume opened this issue Aug 28, 2023 · 5 comments
Assignees

Comments

@DesAWSume
Copy link

🐛 Bug Report

This typescript client is missing required type for the creating Snapshot repo (S3).
and it is missing require field like:
bucket,
base_path,
client

Reference:
https://www.elastic.co/guide/en/elasticsearch/reference/8.9/repository-s3.html

the most 3 important fields to successfully create the snapshot repo

To Reproduce

Current interface

export interface SnapshotRepositorySettings {
    chunk_size?: string;
    compress?: string | boolean;
    concurrent_streams?: string | integer;
    location: string;
    read_only?: string | boolean;
    readonly?: string | boolean;
}
Which will cause the Repository failed to create, 

Error:
ResponseError: repository_verification_exception
Caused by:
i_o_exception: Exception when listing blobs by prefix [index-]
Root causes:
repository_verification_exception: [xxx-xx-xx] path is not accessible on master node

Paste your code here:

    const resquest = client.snapshot.createRepository({
        type: 's3',
        name: repo,
        settings:{
            location: 'dev/abc',
            read_only: true,
            readonly: true,
        },
    })

Expected behavior

Create the s3 snapshot repo with no issue
Paste the results here:
After manually modify the SnapshotRepositorySettings in type.ts under src/api/type.ts

it will create with no issue

export interface SnapshotRepositorySettings {
    chunk_size?: string;
    compress?: string | boolean;
    concurrent_streams?: string | integer;
    location: string;
    read_only?: string | boolean;
    readonly?: string | boolean;
    client: string;
    base_path: string;
    bucket: string;
}

Your Environment

  • node version: 6,8,10
  • @elastic/elasticsearch version: >=7.0.0
  • os: Mac, Windows, Linux
  • any other relevant information
@JoshMock
Copy link
Member

Thanks for calling this out @DesAWSume! I referred to the spec we use to generate these type definitions and noticed that it was missing a lot of key differences between each of the snapshot repository types, so I've opened a PR there to resolve this for all repository types across all Elasticsearch clients.

@DesAWSume
Copy link
Author

@JoshMock Many Thanks!! Very looking forward this got moving forward, and appreciated your prompt turn around

@DesAWSume
Copy link
Author

Any movement to this?

Copy link
Contributor

This issue is stale because it has been open 90 days with no activity. Remove the stale label, or leave a comment, or this will be closed in 14 days.

@github-actions github-actions bot added the stale label Feb 19, 2024
@JoshMock JoshMock removed the stale label Feb 28, 2024
@JoshMock
Copy link
Member

JoshMock commented Mar 6, 2024

elastic/elasticsearch-specification#2255 was finished and merged today. This fix will show up in the next minor release, 8.13.

@JoshMock JoshMock closed this as completed Mar 6, 2024
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

No branches or pull requests

2 participants