Skip to content

workflows/eval: add markdown of added, removed and changed#360339

Merged
Mic92 merged 3 commits intoNixOS:masterfrom
itepastra:ci-eval-markdown
Dec 1, 2024
Merged

workflows/eval: add markdown of added, removed and changed#360339
Mic92 merged 3 commits intoNixOS:masterfrom
itepastra:ci-eval-markdown

Conversation

@itepastra
Copy link
Member

@itepastra itepastra commented Nov 30, 2024

Makes the github action for eval output the added, removed and changed paths in the summary.

The paths were already available in json format in changed-paths.json.
This PR adds a human-readable representation to the summary of the format (not in a code block)

## Added


## Removed

graalvmCEPackages.graalvm-ce-musl
graalvmCEPackages.stdenv

## Changed

babashka
babashka-unwrapped
bbin
certificate-ripper
clj-kondo
cljfmt
clojure-lsp
cq
dapl-native
dbqn-native
graalvm-ce
graalvmCEPackages.graaljs
graalvmCEPackages.graalnodejs
graalvmCEPackages.graalpy
graalvmCEPackages.graalvm-ce
graalvmCEPackages.truffleruby
jet
neil
obb
scala-update
tests.writers.bin.babashka
tests.writers.simple.babashka
tests.writers.wrapping.babashka
tests.writers.wrapping.babashka-bin
vscode-extensions.betterthantomorrow.calva
yamlscript
zprint

Things done

created itepastra#3 to see what the result looks like


Add a 👍 reaction to pull requests you find important.

@itepastra itepastra requested a review from infinisil November 30, 2024 08:28
@github-actions github-actions bot added 6.topic: policy discussion Discuss policies to work in and around Nixpkgs 6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions labels Nov 30, 2024
@itepastra itepastra changed the title github/workflows/eval: add markdown of added, removed and changed workflows/eval: add markdown of added, removed and changed Nov 30, 2024
@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Nov 30, 2024
@Mic92
Copy link
Member

Mic92 commented Nov 30, 2024

Do you have a test PR, what this looks like? Just make a pull request against your ci-eval-markdown branch.

itepastra added a commit to itepastra/nixpkgs that referenced this pull request Nov 30, 2024
@itepastra
Copy link
Member Author

Copy link
Member

@infinisil infinisil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM!

Comment on lines 265 to 267
"## Added\n" + (.attrdiff.added | map("- \(. )") | join("\n")) + "\n" +
"## Removed\n" + (.attrdiff.removed | map("- \(. )") | join("\n")) + "\n" +
"## Changed\n" + (.attrdiff.changed | map("- \(. )") | join("\n")) + "\n"
Copy link
Contributor

@azuwis azuwis Nov 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"## Added\n" + (.attrdiff.added | map("- \(. )") | join("\n")) + "\n" +
"## Removed\n" + (.attrdiff.removed | map("- \(. )") | join("\n")) + "\n" +
"## Changed\n" + (.attrdiff.changed | map("- \(. )") | join("\n")) + "\n"
.attrdiff, .rebuildsByKernel | to_entries[] | "* \(.key | ascii_upcase) \(.value | length | tostring)", " * \(.value[])"

How about this, will produce something like:

Edit: Update to include .rebuildsByKernel


  • ADDED 0
  • REMOVED 0
  • CHANGED 6
    • hello
    • tests.checkpointBuildTools
    • tests.config.allowPkgsInPermittedInsecurePackages
    • tests.devShellTools.nixos
    • tests.devShellTools.unstructuredDerivationInputEnv
    • tests.devShellTools.valueToString
  • DARWIN 4
    • hello
    • tests.checkpointBuildTools
    • tests.config.allowPkgsInPermittedInsecurePackages
    • tests.devShellTools.nixos
  • LINUX 6
    • hello
    • tests.checkpointBuildTools
    • tests.config.allowPkgsInPermittedInsecurePackages
    • tests.devShellTools.nixos
    • tests.devShellTools.unstructuredDerivationInputEnv
    • tests.devShellTools.valueToString

@azuwis
Copy link
Contributor

azuwis commented Nov 30, 2024

Some experiments:

$ jq -r '.rebuildsByKernel | to_entries[] | "* \(.key) \(.value | length | tostring)", "  * \(.value[])"' < changed-paths.json
* darwin 4
  * hello
  * tests.checkpointBuildTools
  * tests.config.allowPkgsInPermittedInsecurePackages
  * tests.devShellTools.nixos
* linux 6
  * hello
  * tests.checkpointBuildTools
  * tests.config.allowPkgsInPermittedInsecurePackages
  * tests.devShellTools.nixos
  * tests.devShellTools.unstructuredDerivationInputEnv
  * tests.devShellTools.valueToString
  • darwin 4
    • hello
    • tests.checkpointBuildTools
    • tests.config.allowPkgsInPermittedInsecurePackages
    • tests.devShellTools.nixos
  • linux 6
    • hello
    • tests.checkpointBuildTools
    • tests.config.allowPkgsInPermittedInsecurePackages
    • tests.devShellTools.nixos
    • tests.devShellTools.unstructuredDerivationInputEnv
    • tests.devShellTools.valueToString

@azuwis
Copy link
Contributor

azuwis commented Nov 30, 2024

$ jq -r '.attrdiff | to_entries[] | "## \(.key | ascii_upcase) \(.value | length | tostring)", "- \(.value[])"'
## ADDED 0
## REMOVED 0
## CHANGED 5
- hello
- tests.checkpointBuildTools
- tests.config.allowPkgsInPermittedInsecurePackages
- tests.devShellTools.nixos
- tests.devShellTools.unstructuredDerivationInputEnv

Can produce very similar result to #360339 (comment)


ADDED 0

REMOVED 0

CHANGED 5

  • hello
  • tests.checkpointBuildTools
  • tests.config.allowPkgsInPermittedInsecurePackages
  • tests.devShellTools.nixos
  • tests.devShellTools.unstructuredDerivationInputEnv

@azuwis
Copy link
Contributor

azuwis commented Nov 30, 2024

Update #360339 (comment):

  • Use to_entries, less repetition
  • Include both attrdiff and rebuildsByKernel
  • Use nested list

See if you like it or not :D

@Mic92
Copy link
Member

Mic92 commented Dec 1, 2024

@azuwis I took the idea of adding numbers to each section, but also added a truncate function as step summaries have a 1MB size limit. Because of the size limitation, I would for now not include other section and just stick to added/removed/changed.

@Mic92
Copy link
Member

Mic92 commented Dec 1, 2024

@Mic92 Mic92 merged commit eaae909 into NixOS:master Dec 1, 2024
@Mic92 Mic92 mentioned this pull request Dec 1, 2024
7 tasks
@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2024

Git push to origin failed for release-24.11 with exitcode 1

@infinisil
Copy link
Member

Manual backport: #361168

@infinisil
Copy link
Member

Whoops we have a problem:

Error: $GITHUB_STEP_SUMMARY upload aborted, supports content up to a size of 1024k, got 1636k. For more information see: https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-markdown-summary

@Mic92
Copy link
Member

Mic92 commented Dec 12, 2024

To be honest, do we want those markdown files anyway for mass-rebuilds?
Maybe we can just skip them. Because there is not much point in listing all packages of nixpkgs.

@Mic92
Copy link
Member

Mic92 commented Dec 12, 2024

Maybe we just truncate the document with sed?

@Mic92
Copy link
Member

Mic92 commented Dec 12, 2024

Actually I already did a limit function there. So maybe we just need to adjust the limit to a safe value?

@infinisil
Copy link
Member

@Mic92 Oh yeah that sounds good

@infinisil
Copy link
Member

Ideally it also shows how to get the full list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions 6.topic: policy discussion Discuss policies to work in and around Nixpkgs 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants