-
Notifications
You must be signed in to change notification settings - Fork 16
e2e: use json-patch to patch reference values in manifest #2139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
katexochen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, great work!
| patchedManifest := patchFn(m) | ||
| patchedManifest, err := patchFn(m) | ||
| if err != nil { | ||
| return err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: wrap the error with
| declare -A specs=( | ||
| ["Metal-QEMU-SNP"]="./dev-docs/e2e/palutena/manifest.json" | ||
| ["Metal-QEMU-TDX"]="./dev-docs/e2e/olimar/manifest.json" | ||
| ["Metal-QEMU-SNP-GPU"]="./dev-docs/e2e/discovery/manifest.json" | ||
| ["Metal-QEMU-SNP-DEV"]="./dev-docs/e2e/hetzner-ax162-snp/manifest.json" | ||
| ["Metal-QEMU-TDX-GPU"]="./dev-docs/e2e/l-bgx-02/manifest.json" | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we maybe use something like
./dev-docs/e2e/$(hostname)/manifest.json
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you like, open an upstream PR in nixpkgs with this! Otherwise I can take care of that. :)
Also, try to use nix-init to get a boilerplate for packaging upstream stuff, it will fetch all the required metadata!
| fetchFromGitHub, | ||
| }: | ||
|
|
||
| buildGoModule { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| buildGoModule { | |
| buildGoModule (finalAttrs: { |
|
|
||
| buildGoModule { | ||
| pname = "json-patch"; | ||
| version = "v5.9.11"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| version = "v5.9.11"; | |
| version = "5.9.11"; |
| src = fetchFromGitHub { | ||
| owner = "evanphx"; | ||
| repo = "json-patch"; | ||
| rev = "v5.9.11"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| rev = "v5.9.11"; | |
| tag = "v${finalAttrs.version}"; |
| modRoot = "v5"; | ||
|
|
||
| vendorHash = "sha256-W6XVd68MS0ungMgam8jefYMVhyiN6/DB+bliFzs2rdk="; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add meta attribute (use nix-init).
This makes it easier to apply the reference values to the current manifest, thus making it easier to update the refernce values and configure reference values per host.