mirage: fix updateScript#2174
Open
jian-lin wants to merge 1 commit into
Open
Conversation
60cfb78 to
120b8da
Compare
8 tasks
76b130f to
6833bb4
Compare
19bcdbf to
5df33e4
Compare
MirageOS unikernels are a package set of many targets, which share the same `src`. To avoid race condition, instead of attaching the same updateScript to each target and running the same updateScript multiple times, we create a dummy package called `update` in the package set and only attach the updateScript to it. This way, the updateScript is only run once. The result of the updateScript is two independent update commits: 1. pname: old-version -> new-version 2. pname: update deps The 1st commit only exists if `src` is updated. The 2nd commit only exists if ocaml dependencies are updated. The existence of one does not affect the existence of the other. Some detailed changes: - fix meta.position of `configure`d unikernel - support updating src and related flake inputs - update src, related flake inputs and deps of all targets in lockstep - add a no-op updateScript to each target to prevent .github/workflows/update-packages.yaml from running a default updateScript In addition, we provide a script for each target to generate/update its own deps: ```shellSession $ nix run -f . dnsvizor.hvt.depsUpdateScriptForThisTarget ```
5df33e4 to
b890587
Compare
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.
MirageOS unikernels are a package set of many targets, which share the
same
src. To avoid race condition, instead of attaching the sameupdateScript to each target and running the same updateScript multiple
times, we create a dummy package called
updatein the package setand only attach the updateScript to it. This way, the updateScript is
only run once.
The result of the updateScript is two independent update commits:
The 1st commit only exists if
srcis updated. The 2nd commit onlyexists if ocaml dependencies are updated. The existence of one does
not affect the existence of the other.
Some detailed changes:
configured unikernel.github/workflows/update-packages.yaml from running a default
updateScript
In addition, we provide a script for each target to generate/update
its own deps:
$ nix run -f . dnsvizor.hvt.depsUpdateScriptForThisTargetThis PR needs: