Restrict fileset necessary for deployment tests #450
No reviewers
Labels
No labels
api service
blocked
bug
component: fediversity panel
component: nixops4
documentation
estimation high: >3d
estimation low: <2h
estimation mid: <8h
productisation
project-management
question
role: sysadmin
security
technical debt
testing
type unclear
type: key result
type: objective
type: task
type: user story
user experience
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Fediversity/Fediversity#450
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "Niols/Fediversity:restrict-filesets-2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR is based on #448 and #449, and should only be merged after them. From Matrix:
And here it is. You only need to read
be1fdc4643
, the other commits being just the PRs we depend on.@ -13,1 +18,4 @@
extraSourceFileset = lib.fileset.unions [
# REVIEW: I would like to be able to grab all of `/deployment` minus
# `/deployment/check`, but I can't because there is a bunch of other files
But you can literally
lib.fileset.subtract <this> <deployment/check>
-- today!I know, this is not what the comment is about!
If I take
/deployment
minus/deployment/check
, I grab all the data model stuff as well, and I don't want that.Ah got it
@ -56,0 +65,4 @@
extraSourceFileset = mkOption {
## FIXME: type? what is the type of a fileset? cf
## https://moduscreate.slack.com/archives/C0T4L4QPR/p1752048299160429
it's a slightly-more-than-slightly magical attrset, let's just take it for granted and link to reference documentation. in any case it doesn't have a module system type
don't have access to modus slack, sad 😸
I know, sorry about this :-/
This was just me asking on the Nix team how to make a type for file sets, but in the end it is just a discussion between Valentin and I, so it could have stayed on Matrix :p
I can revert it, of course, but what do you guys think of
128ddc60b3
?sourceFileset
option2686006e6a
to128ddc60b3
a4bb891231
to44e3e5db4c
Alright, all dependencies have been merged, we're ready for this one. I have pushed:
main
,44e3e5db4c
. Its CI run is here.2f1d898dad
, to trigger CI and showcase that the tests only run Nix evaluation but don't need to rebuild for just a small change. The CI run is here.There only remains to wait for CI to get green, and to validate
a840a8cabb
, a commit introducing a type for filesets.@ -55,1 +48,4 @@
extraTestScript = mkOption { };
sourceFileset = mkOption {
## REVIEW: Upstream to nixpkgs?
looks great! 🎉
Yaaaay. CI is all green. On
44e3e5db4c
:And on
2f1d898dad
, running right after:It is still a bit crazy that CI takes two minutes to realise that there is nothing to do, but OK, this pushes CI down to ~5 minutes when nothing touches the deployment code or tests, instead of nearly two hours.
2f1d898dad
to44e3e5db4c
This force push is only here to remove
2f1d898dad
. As far as I am concerned, this PR can be merged, that is if you guys are happy witha840a8cabb
.@ -56,0 +53,4 @@
name = "fileset";
description = "fileset";
descriptionClass = "noun";
check = (x: (builtins.tryEval (fileset.unions [ x ])).success);
clever!