Repository navigation
promote: Merge latest prod-staging changes to prod-stable - #595
Open
unikraft-bot wants to merge 58 commits into
Open
unikraft-bot wants to merge 58 commits into
unikraft-bot wants to merge 58 commits into
Conversation
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
A build needed docker or a buildkitd on the caller's machine, since the CLI could only build with a local buildkit. --remote <url> builds on the build service instead, which pushes the image. The project directory, the registry logins, --secret and --ssh reach the builder through a buildkit session. Signed-off-by: Dragos Gheorghioiu <dragosg@unikraft.com>
Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.com> Approved-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.com>
The build service creates the account's builder on the first remote build, and the CLI could not create it beforehand, nor inspect or free its cache without deleting it. Add unikraft buildkit create, du and prune. create makes the builder with the service's sizes through x/buildkit's Platform.Create, unless it exists, and works in js too. du and prune wake it to call buildkit's DiskUsage and Prune. Bump x/buildkit for Platform.Create. Signed-off-by: Dragos Gheorghioiu <dragosg@unikraft.com>
Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.com> Approved-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.com>
Signed-off-by: Dragos Gheorghioiu <dragosg@unikraft.com>
instance exec exited with 130 for every signal that ended the command, since x/shell folded the plugin's negated signal into it. Exit with 128 plus the signal instead, as instance shell does. Signed-off-by: Dragos Gheorghioiu <dragosg@unikraft.com>
Reviewed-by: Alex-Andrei Cioc <andrei.cioc@unikraft.io> Approved-by: Alex-Andrei Cioc <andrei.cioc@unikraft.io>
The test checks only x/buildkit, which now runs it in its own CI. Signed-off-by: Dragos Gheorghioiu <dragosg@unikraft.com>
`instance exec` wrote the command's stderr into stdout, so a pipe or a redirect of stdout also took the command's warnings and `2>/dev/null` could not silence them. Send each stream to its local counterpart, as `docker exec` and `kubectl exec` do without a TTY. Signed-off-by: Dragos Gheorghioiu <dragosg@unikraft.com>
So that every push to prod-staging opens a PR to prod-stable. Signed-off-by: Justin Chadwell <justin@unikraft.com>
The server now redirects a tag to the digest held in a file of that name, the way an origin pins one. Both the tag and the digest are inspected, copied and run. Signed-off-by: Justin Chadwell <justin@unikraft.com>
unikraft buildkit created and pruned the builder on the platform itself, so it had to know the build service's instance names and sizes, and it does not find the builders the service now names remote-builder-<name>. Rename it to unikraft builder, which asks the build service at --remote to create a builder, or to report or prune its cache. Signed-off-by: Dragos Gheorghioiu <dragosg@unikraft.com>
Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.com> Approved-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.com>
Reviewed-by: Omar El Khatib <omar@unikraft.com> Approved-by: Omar El Khatib <omar@unikraft.com>
Reviewed-by: Justin Chadwell <justin@unikraft.com> Approved-by: Justin Chadwell <justin@unikraft.com>
Most resource fields had no help text, so --help and the fields reference showed bare names such as state or vcpus, and tools that read the field list had nothing to explain a value with. Give each field of the resource structs a help tag, and keep the help and example tags on resource.Field so that help output, the fields reference and tool schemas share one description. Signed-off-by: Dragos Gheorghioiu <dragosg@unikraft.com>
Reviewed-by: Justin Chadwell <justin@unikraft.com> Approved-by: Justin Chadwell <justin@unikraft.com>
Saving to a local archive failed with "profile not setup", even though the profile only supplies registry credentials, which nothing needed. Add Config.OptionalProfile, which gives a nil profile when none is set up, and use it for registry auth in builds and the image accessor. So pushing without a profile now fails at the registry instead. Signed-off-by: Justin Chadwell <justin@unikraft.com>
A metro's console page has no metro segment before the name, unlike the other resources, so linkToConsole now takes the path segments directly. Signed-off-by: Justin Chadwell <justin@unikraft.com>
Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.com> Approved-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.com>
Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.com> Approved-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.com>
Remote Taskfiles are enabled by default since Task v3.53.1. The Task pinned in the Makefile gets bumped to v3.54.0 along with it, since older versions still need the experiment. Signed-off-by: Justin Chadwell <justin@unikraft.com>
It's a platform quirk the SDK doesn't document, and it isn't something a user can act on. Signed-off-by: Justin Chadwell <justin@unikraft.com>
Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.com> Approved-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.com>
Reviewed-by: Justin Chadwell <justin@unikraft.com> Approved-by: Justin Chadwell <justin@unikraft.com>
The framework that models API objects was called resource, the same word as the API objects themselves and as MCP resources, which made code and reviews around the upcoming MCP server ambiguous. Move internal/resource to internal/model and rename its Resource identifiers to Model. User-facing names, help and output are kept. Signed-off-by: Dragos Gheorghioiu <dragosg@unikraft.com>
Reviewed-by: Justin Chadwell <justin@unikraft.com> Approved-by: Justin Chadwell <justin@unikraft.com>
The tests check only x/build, which now runs them in its own CI. The integration helpers that only they used go with them. Signed-off-by: Dragos Gheorghioiu <dragosg@unikraft.com>
The pinned SDK does not report the instance that owns the relay interface of a network interface. Bump the SDK to v0.4.1-staging.3. It adds the relay instance and the node fields, and renames ID to ResourceID. Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
The key=value form can set a nested struct field only when the outer field has a text form that holds all of its subfields. Split a key on its first dot and go into the named struct field. Render nested fields with the same dotted keys, so Parse reads them back. A bare word now fails. Before, a bare field name set the field to its zero value. Signed-off-by: Justin Chadwell <justin@unikraft.com> Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
The output does not show the name, TAP device, autoconfig or relay of a network interface. A relay refers to an interface by name, so you cannot find the interface to use as a relay. Mirror these fields from the API. Show the relay with its interface name, UUID, DNS setting and the instance that owns it. Signed-off-by: Justin Chadwell <justin@unikraft.com> Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
You cannot set the network interfaces of an instance from the CLI, so you cannot create a relay or an instance that uses one. Add --network to instance create and run, one interface per flag. Set the relay with relay.name, relay.uuid and relay.dns. Refuse --replicas with a name, tap-name, ip or mac that each replica needs, and hint at net_manager when the API does not know the field. Signed-off-by: Justin Chadwell <justin@unikraft.com> Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
No test creates instances that relay through another instance. Create a router with a named interface, and clients that relay through it by name and by UUID, with and without DNS. Check that a missing relay and a relay chain fail. Signed-off-by: Justin Chadwell <justin@unikraft.com> Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
Reviewed-by: Dragos Gheorghioiu <dragosg@unikraft.com> Approved-by: Dragos Gheorghioiu <dragosg@unikraft.com>
Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.com> Approved-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.com>
On macOS, the config file is in ~/Library/Application Support. That path has a space in it, so it is hard to type in a shell. So macOS now uses the same rule as Linux: $XDG_CONFIG_HOME/unikraft, or ~/.config/unikraft when XDG_CONFIG_HOME is not set or is relative. If only the old file exists, the CLI continues to use it. Windows does not change. Signed-off-by: aabedraba <abdallah@unikraft.com>
AI assistants could only drive Unikraft Cloud by shelling out to the CLI and parsing its text output. Add `unikraft mcp`. It serves typed list, create, edit and delete tools for each resource, instance control and logs, sandbox exec, read and write, and the docs as resources, over stdio or HTTP(S) with the current profile's credentials. Signed-off-by: Dragos Gheorghioiu <dragosg@unikraft.com>
Reviewed-by: Abdallah Abedraba <abdallah@unikraft.com> Approved-by: Abdallah Abedraba <abdallah@unikraft.com>
A create that fails for one instance, such as on a taken name, gets a partial success. The CLI dropped the instances that the response still listed, so they stayed on the platform and were never shown. The create now keeps every instance with a UUID in the response, and returns the error of the platform next to them. Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
A command that needed a create value before the create had to resolve the flags again, which runs an editor mode twice. 'CreateFields' resolves the flags and the edit mode into the create patches, and 'Create' takes them. A command can change the patches between the two calls. Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
Moving a service group onto a new image meant creating the new
instances and deleting the old ones by hand.
'--rollout' replaces the group one batch at a time ('batch', 1 by
default). Each old batch stops when its new batch runs, and the old
set is deleted at the end. A failed step starts the old set again
and deletes the new instances. Autoscale groups are refused.
Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
A rolling rollout runs both sets at once, which a workload with sole access to its volume cannot do, and a new instance that crashes just after it starts takes the group with it. '--rollout=type=recreate' stops the full old set before the new one starts and restores it on failure. 'healthy-after' checks each new batch again after a hold. Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
A rollout could only replace the instances of one service group, so instances that share a role through their tags, but not a service group, still had to be swapped by hand. '--rollout=by=tags' replaces every instance in the metro that has all the tags of the new instance, and the new set keeps those tags for the next rollout. An autoscale group on either side is refused. Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
A rollout selected the old instances only by every tag of the new instance or by its service. A new instance with an added tag, such as a version, selected no old instance to replace. The new 'target' key of '--rollout' takes one service or tag, or a JSON list. It selects only by the new instance's service or by a subset of its tags, and refuses a value that the new instance lacks. Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
The builder commands could create a builder and look after its cache, but not show the builders or the builds on them, nor delete one. builder get, list and delete call the build service's new builder endpoints. A builder shows its running and waiting builds, the images they push and its build limit, and links to its instance. Signed-off-by: Dragos Gheorghioiu <dragosg@unikraft.com>
Reviewed-by: Justin Chadwell <justin@unikraft.com> Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.com> Approved-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.com>
The integration jobs pull from Docker Hub anonymously and hit its rate limit (429 Too Many Requests), failing the rootfs OCI tests. Log in with the shared x login-docker-hub action. Fork pull requests get no secrets and keep pulling anonymously. Signed-off-by: Dragos Gheorghioiu <dragosg@unikraft.com>
Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.com> Approved-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.com>
cli used an old go-archivefs, without the cpio package that takes the place of the archived github.com/unikraft/go-cpio. Bump go-archivefs to 364b178. go-cpio stays as an indirect dependency until the Go SDK drops it. Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
The Go SDK pulled in the archived github.com/unikraft/go-cpio through its volimport package. Bump the Go SDK to v0.4.1-staging.4, which uses the cpio package of go-archivefs. Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
x/build and x/buildkit pulled in the archived github.com/unikraft/go-cpio. Bump both to 637dd37, which use the cpio package of go-archivefs. This removes go-cpio from the module graph. Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
Reviewed-by: Dragos Gheorghioiu <dragosg@unikraft.com> Approved-by: Dragos Gheorghioiu <dragosg@unikraft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warning
Blocked until follow-ups from:
Which @dragosgheorghioiu is working on.
Opened automatically by the
promoteworkflow.