Skip to content

Commit a61d5c1

Browse files
authored
Merge branch 'main' into 4534
2 parents 65e0e84 + 4bbbec0 commit a61d5c1

File tree

171 files changed

+848
-12505
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+848
-12505
lines changed

.buildkite/common.py

Lines changed: 43 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,18 @@
1313
import subprocess
1414
from pathlib import Path
1515

16-
DEFAULT_INSTANCES = [
17-
"c5n.metal", # Intel Skylake
18-
"m5n.metal", # Intel Cascade Lake
19-
"m6i.metal", # Intel Icelake
20-
"m6a.metal", # AMD Milan
21-
"m6g.metal", # Graviton2
22-
"m7g.metal", # Graviton3
23-
]
16+
DEFAULT_INSTANCES = {
17+
"c5n.metal": "x86_64", # Intel Skylake
18+
"m5n.metal": "x86_64", # Intel Cascade Lake
19+
"m6i.metal": "x86_64", # Intel Icelake
20+
"m6a.metal": "x86_64", # AMD Milan
21+
"m6g.metal": "aarch64", # Graviton2
22+
"m7g.metal": "aarch64", # Graviton3
23+
}
2424

2525
DEFAULT_PLATFORMS = [
2626
("al2", "linux_5.10"),
27-
# TODO: unpin 6.1 AMI once the bug is fixed
28-
("al2023", "linux_6.1-pinned"),
27+
("al2023", "linux_6.1"),
2928
]
3029

3130

@@ -146,7 +145,7 @@ def __call__(self, parser, namespace, value, option_string=None):
146145
"--instances",
147146
required=False,
148147
nargs="+",
149-
default=DEFAULT_INSTANCES,
148+
default=DEFAULT_INSTANCES.keys(),
150149
)
151150
COMMON_PARSER.add_argument(
152151
"--platforms",
@@ -233,7 +232,7 @@ class BKPipeline:
233232

234233
parser = COMMON_PARSER
235234

236-
def __init__(self, initial_steps=None, with_build_step=True, **kwargs):
235+
def __init__(self, with_build_step=True, **kwargs):
237236
self.steps = []
238237
self.args = args = self.parser.parse_args()
239238
# Retry one time if agent was lost. This can happen if we terminate the
@@ -258,33 +257,22 @@ def __init__(self, initial_steps=None, with_build_step=True, **kwargs):
258257
# Build sharing
259258
if with_build_step:
260259
build_cmds, self.shared_build = shared_build()
261-
step_build = group("🏗️ Build", build_cmds, **self.per_arch)
262-
self.steps += [step_build, "wait"]
260+
self.build_group_per_arch(
261+
"🏗️ Build", build_cmds, depends_on_build=False, set_key=True
262+
)
263263
else:
264264
self.shared_build = None
265265

266-
# If we run initial_steps before the "wait" step above, then a failure of the initial steps
267-
# would result in the build not progressing past the "wait" step (as buildkite only proceeds past a wait step
268-
# if everything before it passed). Thus put the initial steps after the "wait" step, but set `"depends_on": null`
269-
# to start running them immediately (e.g. without waiting for the "wait" step to unblock).
270-
#
271-
# See also https://buildkite.com/docs/pipelines/dependencies#explicit-dependencies-in-uploaded-steps
272-
if initial_steps:
273-
for step in initial_steps:
274-
step["depends_on"] = None
275-
276-
self.steps += initial_steps
277-
278-
def add_step(self, step, decorate=True):
266+
def add_step(self, step, depends_on_build=True):
279267
"""
280268
Add a step to the pipeline.
281269
282270
https://buildkite.com/docs/pipelines/step-reference
283271
284272
:param step: a Buildkite step
285-
:param decorate: inject needed commands for sharing builds
273+
:param depends_on_build: inject needed commands for sharing builds
286274
"""
287-
if decorate and isinstance(step, dict):
275+
if depends_on_build and isinstance(step, dict):
288276
step = self._adapt_group(step)
289277
self.steps.append(step)
290278
return step
@@ -307,6 +295,10 @@ def _adapt_group(self, group):
307295

308296
for step in group["steps"]:
309297
step["command"] = prepend + step["command"]
298+
if self.shared_build is not None:
299+
step["depends_on"] = self.build_key(
300+
DEFAULT_INSTANCES[step["agents"]["instance"]]
301+
)
310302
return group
311303

312304
def build_group(self, *args, **kwargs):
@@ -315,16 +307,34 @@ def build_group(self, *args, **kwargs):
315307
316308
https://buildkite.com/docs/pipelines/group-step
317309
"""
318-
decorate = kwargs.pop("decorate", True)
310+
depends_on_build = kwargs.pop("depends_on_build", True)
319311
combined = overlay_dict(self.per_instance, kwargs)
320-
return self.add_step(group(*args, **combined), decorate=decorate)
312+
return self.add_step(
313+
group(*args, **combined), depends_on_build=depends_on_build
314+
)
315+
316+
def build_key(self, arch):
317+
"""Return the Buildkite key for the build step, for the specified arch"""
318+
return self.shared_build.replace("$(uname -m)", arch).replace(".tar.gz", "")
321319

322-
def build_group_per_arch(self, *args, **kwargs):
320+
def build_group_per_arch(self, label, *args, **kwargs):
323321
"""
324322
Build a group, parametrizing over the architectures only.
323+
324+
kwargs consumed by this method and not passed down to `group`:
325+
- `depends_on_build` (default: `True`): Whether the steps in this group depend on the artifacts from the shared compilation steps
326+
- `set_key`: If True, causes the generated steps to have a "key" field
325327
"""
328+
depends_on_build = kwargs.pop("depends_on_build", True)
329+
set_key = kwargs.pop("set_key", None)
326330
combined = overlay_dict(self.per_arch, kwargs)
327-
return self.add_step(group(*args, **combined))
331+
grp = group(label, *args, **combined)
332+
if set_key:
333+
for step in grp["steps"]:
334+
step["key"] = self.build_key(
335+
DEFAULT_INSTANCES[step["agents"]["instance"]]
336+
)
337+
return self.add_step(grp, depends_on_build=depends_on_build)
328338

329339
def to_dict(self):
330340
"""Render the pipeline as a dictionary."""

.buildkite/pipeline_cpu_template.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class BkStep(str, Enum):
3434
"tools/devtool -y test --no-build -- -m no_block_pr integration_tests/functional/test_cpu_template_helper.py -k test_guest_cpu_config_change",
3535
],
3636
BkStep.LABEL: "🖐️ fingerprint",
37-
"instances": DEFAULT_INSTANCES,
37+
"instances": DEFAULT_INSTANCES.keys(),
3838
"platforms": DEFAULT_PLATFORMS,
3939
},
4040
"cpuid_wrmsr": {
@@ -117,11 +117,11 @@ def group_snapshot_restore(test_step):
117117
BkStep.COMMAND: restore_commands,
118118
BkStep.LABEL: restore_label,
119119
BkStep.TIMEOUT: test_step["restore"][BkStep.TIMEOUT],
120-
"agents": [
121-
f"instance={restore_instance}",
122-
f"kv={restore_kv}",
123-
f"os={restore_os}",
124-
],
120+
"agents": {
121+
"instance": restore_instance,
122+
"kv": restore_kv,
123+
"os": restore_os,
124+
},
125125
}
126126
)
127127

.buildkite/pipeline_pr.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,17 @@
2121
pipeline = BKPipeline(
2222
priority=DEFAULT_PRIORITY,
2323
timeout_in_minutes=45,
24-
initial_steps=[
25-
{
26-
"command": "./tools/devtool -y checkstyle",
27-
"label": "🪶 Style",
28-
},
29-
],
3024
with_build_step=not DOC_ONLY_CHANGE,
3125
)
3226

27+
pipeline.add_step(
28+
{
29+
"command": "./tools/devtool -y checkstyle",
30+
"label": "🪶 Style",
31+
},
32+
depends_on_build=False,
33+
)
34+
3335
# run sanity build of devtool if Dockerfile is changed
3436
if any(x.parent.name == "devctr" for x in changed_files):
3537
pipeline.build_group_per_arch(
@@ -58,17 +60,17 @@
5860
platforms=[("al2", "linux_5.10")],
5961
timeout_in_minutes=300,
6062
**DEFAULTS_PERF,
61-
decorate=False,
63+
depends_on_build=False,
6264
)
6365
# modify Kani steps' label
6466
for step in kani_grp["steps"]:
6567
step["label"] = "🔍 Kani"
66-
kani_grp["depends_on"] = None
6768

6869
if run_all_tests(changed_files):
6970
pipeline.build_group(
7071
"📦 Build",
7172
pipeline.devtool_test(pytest_opts="integration_tests/build/"),
73+
depends_on_build=False,
7274
)
7375

7476
pipeline.build_group(

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,20 @@ and this project adheres to
1616

1717
### Removed
1818

19+
- [#4804](https://github.com/firecracker-microvm/firecracker/pull/4804): Drop
20+
Support for guest kernel 4.14. Linux 4.14 reached end-of-life in
21+
[January 2024](https://lore.kernel.org/lkml/2024011046-ecology-tiptoeing-ce50@gregkh/)
22+
The minimum supported guest kernel now is 5.10.
23+
1924
### Fixed
2025

2126
- [#4796](https://github.com/firecracker-microvm/firecracker/pull/4796): Fixed
2227
Vsock not notifying guest about `TRANSPORT_RESET_EVENT` event after snapshot
2328
restore. This resulted in guest waiting indefinitely on a connection which was
2429
reset during snapshot creation.
30+
- [#4790](https://github.com/firecracker-microvm/firecracker/pull/4790): v1.9.0
31+
was missing most of the debugging information in the debuginfo file, due to a
32+
change in the Cargo defaults. This has been corrected.
2533

2634
## \[1.9.0\]
2735

Cargo.lock

Lines changed: 34 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,7 @@ panic = "abort"
2727
[profile.release]
2828
panic = "abort"
2929
lto = true
30+
strip = "none"
31+
32+
[profile.bench]
33+
strip = "debuginfo"

0 commit comments

Comments
 (0)