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

JSON responses contain key with dot in 'kibana.version' #730

Closed
andrewkroh opened this issue Sep 22, 2021 · 2 comments · Fixed by #733
Closed

JSON responses contain key with dot in 'kibana.version' #730

andrewkroh opened this issue Sep 22, 2021 · 2 comments · Fixed by #733
Labels
bug Something isn't working discussion

Comments

@andrewkroh
Copy link
Member

The response from the /package endpoint uses a key name that contains a dot. It's not common to use field names that contain dots and this might lead to confusion when processing the response data. For example the elastic-package tool would not unmarshal this field if it were returned.

Example: https://epr.elastic.co/package/gcp/1.1.0/

  "conditions": {
    "kibana.version": "^7.15.0"
  },

My preferred representation would be

  "conditions": {
    "kibana": {
      "version": "^7.15.0"
    }
  },

It should be easy to fix the package-registry, but changing it could break clients. So are there any clients using this field? I can check Kibana, but is that the only user?

@andrewkroh andrewkroh added discussion bug Something isn't working labels Sep 22, 2021
andrewkroh added a commit to andrewkroh/package-registry that referenced this issue Sep 22, 2021
This changes the response JSON from

```
  "conditions": {
    "kibana.version": "^7.15.0"
  },
```

to

```
  "conditions": {
    "kibana": {
      "version": "^7.15.0"
    }
  },
```

Closes elastic#730
andrewkroh added a commit to andrewkroh/package-registry that referenced this issue Sep 22, 2021
This changes the response JSON from

```
  "conditions": {
    "kibana.version": "^7.15.0"
  },
```

to

```
  "conditions": {
    "kibana": {
      "version": "^7.15.0"
    }
  },
```

Closes elastic#730
andrewkroh added a commit to andrewkroh/package-registry that referenced this issue Sep 22, 2021
This changes the response JSON from

```
  "conditions": {
    "kibana.version": "^7.15.0"
  },
```

to

```
  "conditions": {
    "kibana": {
      "version": "^7.15.0"
    }
  },
```

Closes elastic#730
andrewkroh added a commit to andrewkroh/package-registry that referenced this issue Sep 22, 2021
This changes the response JSON from

```
  "conditions": {
    "kibana.version": "^7.15.0"
  },
```

to

```
  "conditions": {
    "kibana": {
      "version": "^7.15.0"
    }
  },
```

Closes elastic#730
@andrewkroh
Copy link
Member Author

andrewkroh commented Sep 22, 2021

I did a search in Kibana and didn't find anything reading the value. Probably it has no need to read the value because it can query using ?kibana.version and receive results that are already filtered.

@ruflin
Copy link
Member

ruflin commented Sep 23, 2021

I assume you are right but lets @joshdover confirm it. There are some scripts that use the API but I doubt any of these uses the "output" value at the moment.

andrewkroh added a commit that referenced this issue Sep 29, 2021
This changes the response JSON from

```
  "conditions": {
    "kibana.version": "^7.15.0"
  },
```

to

```
  "conditions": {
    "kibana": {
      "version": "^7.15.0"
    }
  },
```

Closes #730
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working discussion
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants