Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
6 changes: 3 additions & 3 deletions .buildkite/pipeline.trigger.compliance.tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ steps:
EOF

# Generate each test we want to do.
compliance_test 9.1.0-SNAPSHOT 3.4.2
compliance_test 8.19.0-SNAPSHOT 3.4.2
compliance_test 9.0.1 3.3.5
compliance_test 9.2.0-SNAPSHOT 3.5.0
compliance_test 8.19.3 3.4.2
compliance_test 9.0.6 3.3.5
compliance_test 8.14.0 3.1.5
compliance_test 8.9.0 2.7.0

Expand Down
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.23.6
1.24.6
2 changes: 1 addition & 1 deletion compliance/features/basic.feature
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Feature: Basic package types support
Then there is a dashboard "basic_content-dashboard-abc-1"
And there is a detection rule "12cea9e9-5766-474d-a9dc-34ef7c7677c7"

@3.5.0
@3.6.0
Scenario: Content package can be installed
Given the "good_content" package is installed
And prebuilt detection rules are loaded
Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/elastic/package-spec/v3

go 1.23.0
go 1.24.0

toolchain go1.24.7

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsoriano Should we apply this same change for package-registry? elastic/package-registry#1425

In package-registry, it is used .go-version to build the binary as well as the docker:

At least, building the docker requires to read .go-version file.
Following the approach in this PR, it would mean to set 1.24.6. IIRC then golang version used depends on the GOTOOLCHAIN environment variable value, it could use one or another version. As an example:

# Installed Golang 1.24.6 in my host via `gvm`
 $ eval "$(gvm 1.24.6)"

# Toolchain defined in `go.mod`
 $ grep toolchain go.mod
toolchain go1.24.7

 $ export GOTOOLCHAIN=local
 $ go env |grep GOTOOLC; go version
GOTOOLCHAIN='local'
go version go1.24.6 linux/amd64

 $ export GOTOOLCHAIN=auto
 $ go env |grep GOTOOLC; go version
GOTOOLCHAIN='auto'
go version go1.24.7 linux/amd64

At least it is mentioned that in standard Go toolchains, it is set as auto by default: https://go.dev/doc/toolchain#GOTOOLCHAIN

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or should we set .go-version as 1.24.7, and then update the PS1 scripts used in CI to take into account the exceptions for Windows golang versions?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, if we want to make the change only for Windows, and the same for all repos, we could try to make the change in the pre-commit hook as you suggested in #979 (comment).

In any case in Package Registry we could use the latest version of Go, that is also available for Windows. Here I would be more cautious because package-spec is used as library.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, if we want to make the change only for Windows, and the same for all repos, we could try to make the change in the pre-commit hook as you suggested in #979 (comment).

Not a strong opinion. What I like about the approach I mentioned is that the required version is set explicitly in .go-version file.

In any case in Package Registry we could use the latest version of Go, that is also available for Windows. Here I would be more cautious because package-spec is used as library.

Agreed that we need to be more cautious here with package-spec 👍
Should we try to update then to 1.25.1 in package-registry ?


require (
Comment thread
jsoriano marked this conversation as resolved.
github.com/Masterminds/semver/v3 v3.4.0
Expand Down
10 changes: 7 additions & 3 deletions spec/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@
## This file documents changes in the package specification. It is NOT a package specification file.
## Newer entries go at the bottom of each in-development version.
##
- version: 3.5.0-next
- version: 3.6.0-next
changes:
# Pending on https://github.com/elastic/kibana/pull/186974
- description: Add support for `slo` assets.
type: enhancement
link: https://github.com/elastic/package-spec/pull/767
# Pending on https://github.com/elastic/kibana/issues/220294
- description: Add support for semantic_text field definition.
type: enhancement
link: https://github.com/elastic/package-spec/pull/807
- version: 3.5.0
changes:
- description: Add `duration` variable data type with `min_duration` and `max_duration` validation properties.
type: enhancement
link: https://github.com/elastic/package-spec/pull/948
Expand All @@ -22,7 +26,7 @@
- description: Add support for OTel collector configuration in input packages.
type: enhancement
link: https://github.com/elastic/package-spec/pull/975
- version: 3.4.2-next
- version: 3.4.2
changes:
- description: Add support for opentelemetry category.
type: enhancement
Expand All @@ -39,7 +43,7 @@
- description: Fix paths with slashes displayed on Windows.
type: bugfix
link: https://github.com/elastic/package-spec/pull/953
- description: Add support for lookup indices.
- description: Add support for lookup indices in transforms.
type: enhancement
link: https://github.com/elastic/package-spec/pull/936
- description: Fix dynamic_date_formats example type in data stream manifest schema.
Expand Down
10 changes: 6 additions & 4 deletions spec/content/kibana/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,15 @@ spec:
contentMediaType: "application/json"
pattern: '^.+\.json$'
versions:
- before: 3.6.0
patch:
- op: remove
path: "/contents/2" # remove SLO definitions
- before: 3.5.0
patch:
- op: remove
path: "/contents/5" # remove alerting rule template definitions
path: "/contents/4" # remove alerting rule template definitions
- before: 3.4.0
patch:
- op: remove
path: "/contents/3" # remove AI prompt definitions
- op: remove
path: "/contents/2" # remove SLO definitions
path: "/contents/2" # remove AI prompt definitions
2 changes: 1 addition & 1 deletion spec/integration/data_stream/fields/fields.spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ spec:

# JSON patches for newer versions should be placed on top
versions:
- before: 3.5.0
- before: 3.6.0
patch:
- op: remove
path: "/items/properties/type/enum/35" #remove semantic_text type
Expand Down
8 changes: 5 additions & 3 deletions spec/integration/kibana/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,14 @@ spec:
contentMediaType: "application/json"
pattern: '^.+\.json$'
versions:
- before: 3.5.0
- before: 3.6.0
patch:
- op: remove
path: "/contents/14" # remove alerting rule template definitions
- op: remove
path: "/contents/13" # remove SLO definitions
- before: 3.5.0
patch:
- op: remove
path: "/contents/13" # remove alerting rule template definitions
- before: 2.10.0
patch:
- op: remove
Expand Down
2 changes: 1 addition & 1 deletion test/packages/good_content/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
format_version: 3.5.0
format_version: 3.6.0
name: good_content
title: Good content package
description: >
Expand Down
2 changes: 1 addition & 1 deletion test/packages/good_v3/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
format_version: 3.5.0
format_version: 3.6.0
name: good_v3
title: Good package
description: This package is good for format version 3
Expand Down