Change the language around reproducibility/matching outputs
It's more accurate to describe the specifics of the relevant data here through terms like "matching" and "not matching", as a statement that something built reproducibility needs to be made alongside the test conditions. So just say that build outputs matched, or didn't match, as this is more descriptive of the data available.
This commit is contained in:
parent
6c1adfa9e6
commit
f56935a8a6
4 changed files with 46 additions and 46 deletions
|
|
@ -325,7 +325,7 @@ ORDER BY derivations.file_name
|
|||
(define* (select-derivation-outputs-in-revision conn
|
||||
commit-hash
|
||||
#:key
|
||||
reproducibility-status
|
||||
output-consistency
|
||||
system
|
||||
target
|
||||
limit-results
|
||||
|
|
@ -387,9 +387,9 @@ WHERE guix_revisions.commit = $1
|
|||
criteria
|
||||
(iota (length criteria) 2))))
|
||||
(cond
|
||||
((string=? reproducibility-status "any")
|
||||
((string=? output-consistency "any")
|
||||
"")
|
||||
((string=? reproducibility-status "fixed-output")
|
||||
((string=? output-consistency "fixed-output")
|
||||
" AND derivation_output_details.hash IS NOT NULL")
|
||||
(else
|
||||
(string-append
|
||||
|
|
@ -397,15 +397,15 @@ WHERE guix_revisions.commit = $1
|
|||
SELECT
|
||||
"
|
||||
(cond
|
||||
((string=? reproducibility-status "unknown")
|
||||
((string=? output-consistency "unknown")
|
||||
"COUNT(DISTINCT narinfo_fetch_records.build_server_id) <= 1")
|
||||
((string=? reproducibility-status "reproducible")
|
||||
((string=? output-consistency "matching")
|
||||
"
|
||||
CASE
|
||||
WHEN (COUNT(DISTINCT narinfo_fetch_records.build_server_id) <= 1) THEN NULL
|
||||
ELSE (COUNT(DISTINCT nars.hash) = 1)
|
||||
END")
|
||||
((string=? reproducibility-status "unreproducible")
|
||||
((string=? output-consistency "not-matching")
|
||||
"
|
||||
CASE
|
||||
WHEN (COUNT(DISTINCT narinfo_fetch_records.build_server_id) <= 1) THEN NULL
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
select-nars-for-output
|
||||
select-signing-key
|
||||
|
||||
select-reproducibility-status-for-revision
|
||||
select-output-consistency-for-revision
|
||||
|
||||
record-narinfo-details-and-return-ids))
|
||||
|
||||
|
|
@ -236,7 +236,7 @@ VALUES ($1, $2)")
|
|||
(list (list (cons "jsonb"
|
||||
public-key-json-string)))))))
|
||||
|
||||
(define (select-reproducibility-status-for-revision conn revision-commit)
|
||||
(define (select-output-consistency-for-revision conn revision-commit)
|
||||
(define query
|
||||
"
|
||||
SELECT system, target, reproducible, COUNT(*)
|
||||
|
|
@ -291,8 +291,8 @@ ORDER BY COUNT(*) DESC")
|
|||
((system target status count)
|
||||
(list system
|
||||
(match status
|
||||
("t" 'reproducible)
|
||||
("f" 'unreproducible)
|
||||
("t" 'matching)
|
||||
("f" 'not-matching)
|
||||
("" 'unknown))
|
||||
(string->number count))))
|
||||
(exec-query conn query (list revision-commit)))))
|
||||
|
|
|
|||
|
|
@ -198,8 +198,8 @@
|
|||
(parse-query-parameters
|
||||
request
|
||||
`((after_path ,identity)
|
||||
(reproducibility_status ,identity
|
||||
#:default "any")
|
||||
(output_consistency ,identity
|
||||
#:default "any")
|
||||
(system ,parse-system #:default "x86_64-linux")
|
||||
(target ,parse-system #:default "x86_64-linux")
|
||||
(limit_results ,parse-result-limit
|
||||
|
|
@ -348,8 +348,8 @@
|
|||
conn
|
||||
commit-hash
|
||||
#:key path-base)
|
||||
(let ((reproducibility-status
|
||||
(select-reproducibility-status-for-revision conn commit-hash)))
|
||||
(let ((output-consistency
|
||||
(select-output-consistency-for-revision conn commit-hash)))
|
||||
(case (most-appropriate-mime-type
|
||||
'(application/json text/html)
|
||||
mime-types)
|
||||
|
|
@ -360,7 +360,7 @@
|
|||
(render-html
|
||||
#:sxml (view-revision-package-reproducibility
|
||||
commit-hash
|
||||
reproducibility-status
|
||||
output-consistency
|
||||
#:header-text '("Package reproducibility status")))))))
|
||||
|
||||
(define (render-revision-news mime-types
|
||||
|
|
@ -710,8 +710,8 @@
|
|||
(select-derivation-outputs-in-revision
|
||||
conn
|
||||
commit-hash
|
||||
#:reproducibility-status
|
||||
(assq-ref query-parameters 'reproducibility_status)
|
||||
#:output-consistency
|
||||
(assq-ref query-parameters 'output_consistency)
|
||||
#:system (assq-ref query-parameters 'system)
|
||||
#:target (assq-ref query-parameters 'target)
|
||||
#:limit-results limit-results
|
||||
|
|
|
|||
|
|
@ -647,7 +647,7 @@
|
|||
'())))))
|
||||
|
||||
(define* (view-revision-package-reproducibility revision-commit-hash
|
||||
reproducibility-status
|
||||
output-consistency
|
||||
#:key path-base
|
||||
header-text header-link)
|
||||
(layout
|
||||
|
|
@ -729,18 +729,18 @@ figure {
|
|||
;; https://medium.com/@heyoka/scratch-made-svg-donut-pie-charts-in-html5-2c587e935d72
|
||||
,@(map
|
||||
(match-lambda
|
||||
((system . reproducibility-status)
|
||||
((system . output-consistency)
|
||||
|
||||
(define total
|
||||
(apply + (map cdr reproducibility-status)))
|
||||
(apply + (map cdr output-consistency)))
|
||||
|
||||
(define keys
|
||||
'(reproducible unreproducible unknown))
|
||||
'(matching not-matching unknown))
|
||||
|
||||
(define reproducibility-status-percentages
|
||||
(define output-consistency-percentages
|
||||
(map (lambda (key)
|
||||
(exact->inexact
|
||||
(* 100 (/ (or (assq-ref reproducibility-status key)
|
||||
(* 100 (/ (or (assq-ref output-consistency key)
|
||||
0)
|
||||
total))))
|
||||
keys))
|
||||
|
|
@ -804,10 +804,10 @@ figure {
|
|||
;; colour and count
|
||||
,(format #f "~2,2f%"
|
||||
(or percentage 0)))))
|
||||
'(reproducible unreproducible unknown)
|
||||
'("Reproducible" "Unreproducible" "Unknown")
|
||||
'(matching not-matching unknown)
|
||||
'("Matching" "Not matching" "Unknown")
|
||||
'("green" "red" "#d2d3d4")
|
||||
reproducibility-status-percentages
|
||||
output-consistency-percentages
|
||||
(cons 25
|
||||
(map (lambda (cumalative-percentage)
|
||||
(+ (- 100
|
||||
|
|
@ -821,16 +821,16 @@ figure {
|
|||
(cons (+ val (first result))
|
||||
result))
|
||||
(list
|
||||
(first reproducibility-status-percentages))
|
||||
(cdr reproducibility-status-percentages))))))
|
||||
(first output-consistency-percentages))
|
||||
(cdr output-consistency-percentages))))))
|
||||
(g
|
||||
(@ (class "chart-text"))
|
||||
,@(if (and (eq? (or (assq-ref reproducibility-status
|
||||
'reproducible)
|
||||
,@(if (and (eq? (or (assq-ref output-consistency
|
||||
'matching)
|
||||
0)
|
||||
0)
|
||||
(eq? (or (assq-ref reproducibility-status
|
||||
'unreproducible)
|
||||
(eq? (or (assq-ref output-consistency
|
||||
'not-matching)
|
||||
0)
|
||||
0))
|
||||
`((text
|
||||
|
|
@ -845,12 +845,12 @@ figure {
|
|||
,(simple-format
|
||||
#f "~~~A%"
|
||||
(inexact->exact
|
||||
(round (car reproducibility-status-percentages)))))
|
||||
(round (car output-consistency-percentages)))))
|
||||
(text
|
||||
(@ (x "50%")
|
||||
(y "50%")
|
||||
(class "chart-label"))
|
||||
"Reproducible"))))))
|
||||
"Matching"))))))
|
||||
(figcaption
|
||||
(@ (class "figure-key"))
|
||||
(p (@ (class "sr-only"))
|
||||
|
|
@ -872,21 +872,21 @@ figure {
|
|||
,(string-append
|
||||
"/revision/" revision-commit-hash
|
||||
"/derivation-outputs?"
|
||||
"reproducibility_status=" key
|
||||
"output_consistency=" key
|
||||
"&system=" system
|
||||
"&target=" system)))
|
||||
,(format #f "~a (~d, ~2,2f%)"
|
||||
label
|
||||
(or count 0)
|
||||
(or percentage 0)))))
|
||||
'("reproducible" "unreproducible" "unknown")
|
||||
'("Reproducible" "Unreproducible" "Unknown")
|
||||
'("matching" "not-matching" "unknown")
|
||||
'("Matching" "Not matching" "Unknown")
|
||||
(map (lambda (key)
|
||||
(assq-ref reproducibility-status key))
|
||||
(assq-ref output-consistency key))
|
||||
keys)
|
||||
reproducibility-status-percentages
|
||||
output-consistency-percentages
|
||||
'("green" "red" "#d2d3d4"))))))))
|
||||
reproducibility-status))))))
|
||||
output-consistency))))))
|
||||
|
||||
(define* (view-revision-derivations commit-hash
|
||||
query-parameters
|
||||
|
|
@ -1050,13 +1050,13 @@ figure {
|
|||
#:help-text
|
||||
"List packages where the derivation output path matches this query.")
|
||||
,(form-horizontal-control
|
||||
"Reproducibility status" query-parameters
|
||||
"Output consistency" query-parameters
|
||||
#:allow-selecting-multiple-options #f
|
||||
#:options '(("Any" . "any")
|
||||
("Fixed output" . "fixed-output")
|
||||
("Unknown" . "unknown")
|
||||
("Reproducible" . "reproducible")
|
||||
("Unreproducible" . "unreproducible"))
|
||||
("Matching" . "matching")
|
||||
("Not-matching" . "not-matching"))
|
||||
#:help-text "Do the known hashes for this output suggest it's reproducible, or not reproducible.")
|
||||
,(form-horizontal-control
|
||||
"System" query-parameters
|
||||
|
|
@ -1098,7 +1098,7 @@ figure {
|
|||
(tr
|
||||
(th (@ (class "col-sm-5")) "Path")
|
||||
(th (@ (class "col-sm-5")) "Data")
|
||||
(th (@ (class "col-sm-2")) "Reproducibility Status")))
|
||||
(th (@ (class "col-sm-2")) "Output consistency")))
|
||||
(tbody
|
||||
,@(map
|
||||
(match-lambda
|
||||
|
|
@ -1153,10 +1153,10 @@ figure {
|
|||
"Unknown")
|
||||
((eq? hash-count 1)
|
||||
'(span (@ (class "text-success"))
|
||||
"Reproducible"))
|
||||
"Matching"))
|
||||
((> hash-count 1)
|
||||
'(span (@ (class "text-danger"))
|
||||
"Unreproducible"))))))))
|
||||
"Not matching"))))))))
|
||||
derivation-outputs)))
|
||||
,@(if show-next-page?
|
||||
`((div
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue