Skip to content

Commit 4ec05ca

Browse files
Merge branch 'main' into dependabot/go_modules/github.com/elastic/elastic-agent-autodiscover-0.7.0
2 parents 5236f18 + 3500a81 commit 4ec05ca

File tree

5 files changed

+92
-48
lines changed

5 files changed

+92
-48
lines changed

.buildkite/pull-requests.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"jobs": [
33
{
4-
"enabled": true,
4+
"enabled": true,
55
"pipelineSlug": "elastic-agent",
66
"allow_org_users": true,
77
"allowed_repo_permissions": ["admin", "write"],
@@ -11,13 +11,14 @@
1111
"build_on_comment": true,
1212
"trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:this|it))|^/test$",
1313
"always_trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:this|it))|^/test$",
14-
"skip_ci_labels": [ ],
14+
"skip_ci_labels": [ "skip-ci" ],
1515
"skip_target_branches": [ ],
16-
"skip_ci_on_only_changed": [ "changelog", "docs", "README.md", "sonar-project.properties", "docker-compose.yml", ".pre-commit-config.yaml", "skaffold.yaml", "Dockerfile.skaffold", "Dockerfile"],
16+
"skip_ci_on_only_changed": [ "^.ci/", "^.github/", "^changelog", "^docs/", "\\.md$", "^docker-compose.yml", "^.pre-commit-config.yaml", "skaffold.yaml", "^Dockerfile.skaffold", "^Dockerfile"],
1717
"always_require_ci_on_changed": [ ]
1818
},
1919
{
2020
"enabled": true,
21+
"build_drafts": false,
2122
"pipelineSlug": "elastic-agent-extended-testing",
2223
"allow_org_users": true,
2324
"allowed_repo_permissions": ["admin", "write"],
@@ -27,9 +28,9 @@
2728
"build_on_comment": true,
2829
"trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:extended))|^/test extended$",
2930
"always_trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:extended))|^/test extended$",
30-
"skip_ci_labels": [ ],
31+
"skip_ci_labels": [ "skip-ci", "skip-it" ],
3132
"skip_target_branches": [ ],
32-
"skip_ci_on_only_changed": [ "changelog", "docs", "README.md", "sonar-project.properties", "docker-compose.yml", ".pre-commit-config.yaml", "skaffold.yaml", "Dockerfile.skaffold", "Dockerfile"],
33+
"skip_ci_on_only_changed": [ "^.ci/", "^.github/", "^changelog", "^docs/", "\\.md$", "^sonar-project.properties", "^docker-compose.yml", "^.pre-commit-config.yaml", "skaffold.yaml", "^Dockerfile.skaffold", "^Dockerfile"],
3334
"always_require_ci_on_changed": [ ]
3435
},
3536
{

.github/PULL_REQUEST_TEMPLATE.md

+10
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,13 @@ Link related issues below. Insert the issue link or reference after the word "Cl
6969
- How are we going to debug this?
7070
- What are the metrics I should take care of?
7171
- ...
72+
73+
<!-- CI Cheatsheet
74+
Trigger comments:
75+
/test (Or `buildkite test this|it`) Triggers unit test pipeline
76+
/test extended (Or `buildkite test extended`) Triggers integration test pipeline
77+
78+
PR labels:
79+
skip-ci Skips unit and integration tests
80+
skip-it Skips integration tests
81+
-->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Kind can be one of:
2+
# - breaking-change: a change to previously-documented behavior
3+
# - deprecation: functionality that is being removed in a later release
4+
# - bug-fix: fixes a problem in a previous version
5+
# - enhancement: extends functionality but does not break or fix existing behavior
6+
# - feature: new functionality
7+
# - known-issue: problems that we are aware of in a given version
8+
# - security: impacts on the security of a product or a user’s deployment.
9+
# - upgrade: important information for someone upgrading from a prior version
10+
# - other: does not fit into any of the other categories
11+
kind: enhancement
12+
13+
# Change summary; a 80ish characters long description of the change.
14+
summary: Add benchmark input
15+
16+
# Long description; in case the summary is not enough to describe the change
17+
# this field accommodate a description without length limits.
18+
# NOTE: This field will be rendered only for breaking-change and known-issue kinds at the moment.
19+
#description:
20+
21+
# Affected component; a word indicating the component this changeset affects.
22+
component: elastic-agent
23+
24+
# PR URL; optional; the PR number that added the changeset.
25+
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added.
26+
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number.
27+
# Please provide it if you are adding a fragment for a different PR.
28+
pr: https://github.com/elastic/beats/pull/39789
29+
30+
# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of).
31+
# If not present is automatically filled by the tooling with the issue linked to the PR number.
32+
#issue: https://github.com/owner/repo/1234

pkg/testing/ess/deployment.go

+6-8
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"context"
1010
_ "embed"
1111
"encoding/json"
12+
"errors"
1213
"fmt"
1314
"io"
1415
"net/http"
@@ -251,20 +252,19 @@ func (c *Client) DeploymentIsReady(ctx context.Context, deploymentID string, tic
251252
ticker := time.NewTicker(tick)
252253
defer ticker.Stop()
253254

255+
var errs error
254256
statusCh := make(chan DeploymentStatus, 1)
255-
errCh := make(chan error)
256-
257257
for {
258258
select {
259259
case <-ctx.Done():
260-
return false, ctx.Err()
260+
return false, errors.Join(errs, ctx.Err())
261261
case <-ticker.C:
262-
statusCtx, statusCancel := context.WithTimeout(ctx, tick)
263-
defer statusCancel()
264262
go func() {
263+
statusCtx, statusCancel := context.WithTimeout(ctx, tick)
264+
defer statusCancel()
265265
status, err := c.DeploymentStatus(statusCtx, deploymentID)
266266
if err != nil {
267-
errCh <- err
267+
errs = errors.Join(errs, err)
268268
return
269269
}
270270
statusCh <- status.Overall
@@ -273,8 +273,6 @@ func (c *Client) DeploymentIsReady(ctx context.Context, deploymentID string, tic
273273
if status == DeploymentStatusStarted {
274274
return true, nil
275275
}
276-
case err := <-errCh:
277-
return false, err
278276
}
279277
}
280278
}

pkg/testing/ogc/supported.go

+38-35
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var ogcSupported = []LayoutOS{
2828
Version: "22.04",
2929
},
3030
Provider: Google,
31-
InstanceSize: "e2-standard-2", // 2 amd64 cpus
31+
InstanceSize: "e2-standard-2", // 2 amd64 cpus, 8 GB RAM
3232
RunsOn: "ubuntu-2204-lts",
3333
Username: "ubuntu",
3434
RemotePath: "/home/ubuntu/agent",
@@ -41,37 +41,40 @@ var ogcSupported = []LayoutOS{
4141
Version: "20.04",
4242
},
4343
Provider: Google,
44-
InstanceSize: "e2-standard-2", // 2 amd64 cpus
44+
InstanceSize: "e2-standard-2", // 2 amd64 cpus, 8 GB RAM
4545
RunsOn: "ubuntu-2004-lts",
4646
Username: "ubuntu",
4747
RemotePath: "/home/ubuntu/agent",
4848
},
49-
{
50-
OS: define.OS{
51-
Type: define.Linux,
52-
Arch: define.ARM64,
53-
Distro: runner.Ubuntu,
54-
Version: "22.04",
55-
},
56-
Provider: Google,
57-
InstanceSize: "t2a-standard-2", // 2 arm64 cpus
58-
RunsOn: "ubuntu-2204-lts-arm64",
59-
Username: "ubuntu",
60-
RemotePath: "/home/ubuntu/agent",
61-
},
62-
{
63-
OS: define.OS{
64-
Type: define.Linux,
65-
Arch: define.ARM64,
66-
Distro: runner.Ubuntu,
67-
Version: "20.04",
68-
},
69-
Provider: Google,
70-
InstanceSize: "t2a-standard-2", // 2 arm64 cpus
71-
RunsOn: "ubuntu-2004-lts-arm64",
72-
Username: "ubuntu",
73-
RemotePath: "/home/ubuntu/agent",
74-
},
49+
// These instance types are experimental on Google Cloud and very unstable
50+
// We will wait until Google introduces new ARM instance types
51+
// https://cloud.google.com/blog/products/compute/introducing-googles-new-arm-based-cpu
52+
// {
53+
// OS: define.OS{
54+
// Type: define.Linux,
55+
// Arch: define.ARM64,
56+
// Distro: runner.Ubuntu,
57+
// Version: "22.04",
58+
// },
59+
// Provider: Google,
60+
// InstanceSize: "t2a-standard-4", // 4 arm64 cpus, 16 GB RAM
61+
// RunsOn: "ubuntu-2204-lts-arm64",
62+
// Username: "ubuntu",
63+
// RemotePath: "/home/ubuntu/agent",
64+
// },
65+
// {
66+
// OS: define.OS{
67+
// Type: define.Linux,
68+
// Arch: define.ARM64,
69+
// Distro: runner.Ubuntu,
70+
// Version: "20.04",
71+
// },
72+
// Provider: Google,
73+
// InstanceSize: "t2a-standard-4", // 4 arm64 cpus, 16 GB RAM
74+
// RunsOn: "ubuntu-2004-lts-arm64",
75+
// Username: "ubuntu",
76+
// RemotePath: "/home/ubuntu/agent",
77+
// },
7578
{
7679
OS: define.OS{
7780
Type: define.Linux,
@@ -80,7 +83,7 @@ var ogcSupported = []LayoutOS{
8083
Version: "8",
8184
},
8285
Provider: Google,
83-
InstanceSize: "e2-standard-2", // 2 amd64 cpus
86+
InstanceSize: "e2-standard-2", // 2 amd64 cpus, 8 GB RAM
8487
RunsOn: "rhel-8",
8588
Username: "rhel",
8689
RemotePath: "/home/rhel/agent",
@@ -92,7 +95,7 @@ var ogcSupported = []LayoutOS{
9295
Version: "2022",
9396
},
9497
Provider: Google,
95-
InstanceSize: "e2-standard-4", // 4 amd64 cpus
98+
InstanceSize: "e2-standard-4", // 4 amd64 cpus, 16 GB RAM
9699
RunsOn: "windows-2022",
97100
Username: "windows",
98101
RemotePath: "C:\\Users\\windows\\agent",
@@ -104,7 +107,7 @@ var ogcSupported = []LayoutOS{
104107
Version: "2022-core",
105108
},
106109
Provider: Google,
107-
InstanceSize: "e2-standard-4", // 4 amd64 cpus
110+
InstanceSize: "e2-standard-4", // 4 amd64 cpus, 16 GB RAM
108111
RunsOn: "windows-2022-core",
109112
Username: "windows",
110113
RemotePath: "C:\\Users\\windows\\agent",
@@ -116,7 +119,7 @@ var ogcSupported = []LayoutOS{
116119
Version: "2019",
117120
},
118121
Provider: Google,
119-
InstanceSize: "e2-standard-4", // 4 amd64 cpus
122+
InstanceSize: "e2-standard-4", // 4 amd64 cpus, 16 GB RAM
120123
RunsOn: "windows-2019",
121124
Username: "windows",
122125
RemotePath: "C:\\Users\\windows\\agent",
@@ -128,7 +131,7 @@ var ogcSupported = []LayoutOS{
128131
Version: "2019-core",
129132
},
130133
Provider: Google,
131-
InstanceSize: "e2-standard-4", // 4 amd64 cpus
134+
InstanceSize: "e2-standard-4", // 4 amd64 cpus, 16 GB RAM
132135
RunsOn: "windows-2019-core",
133136
Username: "windows",
134137
RemotePath: "C:\\Users\\windows\\agent",
@@ -140,7 +143,7 @@ var ogcSupported = []LayoutOS{
140143
Version: "2016",
141144
},
142145
Provider: Google,
143-
InstanceSize: "e2-standard-4", // 4 amd64 cpus
146+
InstanceSize: "e2-standard-4", // 4 amd64 cpus, 16 GB RAM
144147
RunsOn: "windows-2016",
145148
Username: "windows",
146149
RemotePath: "C:\\Users\\windows\\agent",
@@ -152,7 +155,7 @@ var ogcSupported = []LayoutOS{
152155
Version: "2016-core",
153156
},
154157
Provider: Google,
155-
InstanceSize: "e2-standard-4", // 4 amd64 cpus
158+
InstanceSize: "e2-standard-4", // 4 amd64 cpus, 16 GB RAM
156159
RunsOn: "windows-2016-core",
157160
Username: "windows",
158161
RemotePath: "C:\\Users\\windows\\agent",

0 commit comments

Comments
 (0)