-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Fleet] Update minimun package spec version to 2.3 #214600
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
Changes from all commits
e5d635b
31b4860
5879660
6f41b9b
02b20b2
04886c4
8d2ef15
1ba63ee
c2682f8
5a38f21
e9b00d9
457443a
353c911
15be35f
3cef56d
4be35e4
f81927b
68ce1e7
f4a6b98
2fd42fd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -280,13 +280,21 @@ function setSpecVersion(url: URL) { | |
| const specMax = appContextService.getConfig()?.internal?.registry?.spec?.max; | ||
|
|
||
| if (specMin) { | ||
| url.searchParams.set('spec.min', specMin); | ||
| url.searchParams.set('spec.min', formatSpecVersion(specMin)); | ||
| } | ||
| if (specMax) { | ||
| url.searchParams.set('spec.max', specMax); | ||
| url.searchParams.set('spec.max', formatSpecVersion(specMax)); | ||
| } | ||
| } | ||
|
|
||
| function formatSpecVersion(version: string): string { | ||
| // Version can be coerced from number when obtained through flags, in these cases X.0 versions are coerced to X. | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is still a problem for versions whose minor ends with 0, for example No idea what we can do to avoid flags being parsed as numbers.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we foresee problems with that loss of precision in how this value is used? Seems like if ideally we want to keep this value as a string, one thought is we could enhance the StringType validator to have an I see the repo already has the semver library already as a dependency, so we could lean on the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes, it is a problem here because we expect
I have tried some things but it looks like the value is directly parsed as number, so there is some loss. Maybe it is expected for strings to be used as quotes, though it didn't work well when used in tests. We can investigate this further in the future, this PR at least doesn't make things worse 🙂
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Issue created for further investigation: #215251 |
||
| if (version.indexOf('.') > 0) { | ||
| return version; | ||
| } | ||
| return version + '.0'; | ||
| } | ||
|
|
||
| function setCapabilities(url: URL) { | ||
| const capabilities = appContextService.getConfig()?.internal?.registry?.capabilities; | ||
| if (capabilities && capabilities.length > 0) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jsoriano the goal of that test what to mimic the cloud config, I am worried that if we introduce a change here, we may accidentally break cloud, it is because there no apm package compatible? should it be fixed by publishing one instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
APM packages are not released as GA in the registry since 8.4.2. So not sure if we can assume that there is going to be a package there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could it be that the GA package is bundled in GA Kibana, but the one in the registry is used for development? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I think in development we are using the old APM package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created issue about this: #215400