Automated dependency updates #65

Open
opened 2024-12-21 16:19:52 +01:00 by Niols · 12 comments
Owner

As a Fediversity maintainer,
I want for our packages to stay up to date with nixpkgs in an automated fashion,
so that we can offer security and feature updates without manually having to create merge requests for updates.

implementation notes

options seem:

**As** a Fediversity maintainer, **I want** for our packages to stay up to date with nixpkgs in an automated fashion, **so that** we can offer security and feature updates without manually having to create merge requests for updates. ### implementation notes options seem: - [renovate](https://github.com/renovatebot/renovate) - [update-flake-lock](https://github.com/DeterminateSystems/update-flake-lock) - [update-npins](https://github.com/getchoo/update-npins)
kiara added this to the Fediversity project 2025-04-18 10:07:15 +02:00
kiara changed title from Automated flake inputs update with eg. RenovateBot? to Automated dependency updates with eg. RenovateBot? 2025-04-30 09:08:42 +02:00
kiara self-assigned this 2025-05-28 11:00:32 +02:00
kiara closed this issue 2025-06-01 16:00:11 +02:00
Owner

while a week has passed, i've yet to see a PR come out of this

while a week has passed, i've yet to see a PR come out of this
kiara reopened this issue 2025-06-10 18:46:02 +02:00
kiara removed this from the Fediversity project 2025-06-10 18:47:21 +02:00
kiara changed title from Automated dependency updates with eg. RenovateBot? to Automated dependency updates 2025-06-10 20:21:54 +02:00
Author
Owner

Your workflow seems to be running on the first day of the month, so we'll have to wait for beginning July to confirm.

Your workflow seems to be running on the first day of the month, so we'll have to wait for beginning July to confirm.
Author
Owner

Also, your workflow expects ubuntu:latest for which we don't have any runner, so nothing will happen ever (and knowing Forgejo you will not get notifications of this on a cron type of workflow).

Also, your workflow expects `ubuntu:latest` for which we don't have any runner, so nothing will happen ever (and knowing Forgejo you will not get notifications of this on a `cron` type of workflow).
Owner

okay, i guess this needs configuring the runner (c.f. #356)?

okay, i guess this needs [configuring the runner](https://wiki.nixos.org/wiki/Forgejo#Runner) (c.f. #356)?
kiara closed this issue 2025-06-20 09:41:40 +02:00
kiara referenced this issue from a commit 2025-06-20 09:41:41 +02:00
kiara reopened this issue 2025-06-21 09:31:13 +02:00
Owner

as per a new run this fails on nix-shell relying on the nix path to have made a <nixpkgs> available.

while an alternative could be to directly include the npins package on the runner, that may imply a level of tight coupling of the runner with specific jobs (or dependency management libraries) that would seem not necessarily preferable.

as per a new [run](https://git.fediversity.eu/Fediversity/Fediversity/actions/runs/782) this fails on `nix-shell` relying on the nix path to have made a `<nixpkgs>` available. while an alternative could be to directly include the `npins` package on the runner, that may imply a level of tight coupling of the runner with specific jobs (or dependency management libraries) that would seem not necessarily preferable.
Owner

this seems to now get stuck on Create PR step's git remote prune origin command, which would run indefinitely (initially left to run over an hour, a second time i gave up in a minute). an upstream search seems to reveal no similar issues, somehow.
in this case it also seems less trivial to just 'unwrap' this action as we did for the previous one: they seem to run some huge js script.

this seems to now get [stuck](https://git.fediversity.eu/Fediversity/Fediversity/actions/runs/796) on `Create PR` step's `git remote prune origin` command, which would run indefinitely (initially left to run over an hour, a second time i gave up in a minute). an [upstream](https://github.com/peter-evans/create-pull-request) search seems to reveal no similar issues, somehow. in this case it also seems less trivial to just 'unwrap' this action as we did for the previous one: they seem to run [some huge js script](https://github.com/peter-evans/create-pull-request/blob/main/dist/index.js).
Owner

unfortunately, the gitea fork of create-pull-request seems to similarly hang.

that said, the command in question may matter only for --force-with-lease (which afaik we don't use).

that said, the invocation in question may also be the first invocation of git.exec() in our execution path, so maybe something is up with that? definitely not the first git command in the CI run tho...

unfortunately, the [gitea fork](https://github.com/quentinlegot/gitea-create-pull-request) of `create-pull-request` seems to [similarly hang](https://git.fediversity.eu/Fediversity/Fediversity/actions/runs/939). that said, the command in question may matter [only for `--force-with-lease`](https://github.com/peter-evans/create-pull-request/blob/56cdd05eb2cd4cbc18954377c5774f8438239ae8/src/create-pull-request.ts#L126-L127) (which afaik we don't use). that said, the invocation in question may also be the first invocation of `git.exec()` in our execution path, so maybe something is up with that? definitely not the first git command in the CI run tho...
kiara referenced this issue from a commit 2025-07-07 13:38:12 +02:00
Owner

using a fork stripping that out, the PR step now yields this log.

Prepare git configuration
[command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git config --global --name-only --get-regexp safe.directory /var/lib/gitea-runner/default/.cache/act/694a392c30733999/hostexecutor
[command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git config --global --add safe.directory /var/lib/gitea-runner/default/.cache/act/694a392c30733999/hostexecutor
[command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git config --local --get remote.origin.url
https://git.fediversity.eu/Fediversity/Fediversity
[command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git config --local --name-only --get-regexp http.https://git.fediversity.eu/.extraheader ^AUTHORIZATION:
http.https://git.fediversity.eu/.extraheader
[command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git config --local --get-regexp http.https://git.fediversity.eu/.extraheader ^AUTHORIZATION:
http.https://git.fediversity.eu/.extraheader AUTHORIZATION: basic ***
[command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git config --local --unset http.https://git.fediversity.eu/.extraheader ^AUTHORIZATION:
Unset config key 'http.https://git.fediversity.eu/.extraheader'
Determining the base and head repositories
Remote is https://git.fediversity.eu/api/v1
Remote is https://git.fediversity.eu/api/v1
Pull request branch target repository set to Fediversity/Fediversity
Configuring credential for HTTPS authentication
[command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git config --local http.https://git.fediversity.eu/.extraheader AUTHORIZATION: basic ***
[command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git rev-parse --git-dir
.git
Checking the base repository state
[command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git symbolic-ref HEAD --short
main
Working base is branch 'main'
Pull request branch to create or update set to 'npins-update'
Configuring the committer and author
Configured git committer as 'github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>'
Configured git author as 'kiara +kiara@users.noreply.github.com'
Create or update the pull request branch
[command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git symbolic-ref HEAD --short
main
Working base is branch 'main'
[command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git checkout --progress -B 79332a4c-23cb-4d2d-82bb-232cd0c17560 HEAD --
Switched to a new branch '79332a4c-23cb-4d2d-82bb-232cd0c17560'
M npins/sources.json
[command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git status --porcelain -unormal --
M npins/sources.json
Uncommitted changes found. Adding a commit.
[command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git add -A
[command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git -c author.name=kiara -c author.email=+kiara@users.noreply.github.com -c committer.name=github-actions[bot] -c committer.email=41898282+github-actions[bot]@users.noreply.github.com commit -m npins: update sources
deadnix..............................................(no files to check)Skipped
nixfmt-rfc-style.....................................(no files to check)Skipped
shellcheck...........................................(no files to check)Skipped
trim-trailing-whitespace.............................(no files to check)Skipped
[79332a4c-23cb-4d2d-82bb-232cd0c17560 9a4937a] npins: update sources
Author: kiara +kiara@users.noreply.github.com
1 file changed, 26 insertions(+), 26 deletions(-)
[command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git stash push --include-untracked
No local changes to save
Resetting working base branch 'main'
[command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git checkout --progress main --
Switched to branch 'main'
Your branch is up to date with 'origin/main'.
[command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git reset --hard origin/main
HEAD is now at 5520fa7 gitea PR unpruned (#445)
[command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git rev-list --right-only --count main...79332a4c-23cb-4d2d-82bb-232cd0c17560
1
[command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git -c protocol.version=2 fetch --no-tags --progress --no-recurse-submodules --force --depth=11 origin npins-update:refs/remotes/origin/npins-update

this seems to at least progress further than before, altho it still just seems to hang somehow.

<details> <summary> using a [fork](https://git.fediversity.eu/Fediversity/Fediversity/commit/5520fa721b3f8a80cd0e9e9d07f174e47d62ea74) stripping that out, the PR step now yields this log. </summary> > Prepare git configuration [command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git config --global --name-only --get-regexp safe.directory /var/lib/gitea-runner/default/.cache/act/694a392c30733999/hostexecutor [command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git config --global --add safe.directory /var/lib/gitea-runner/default/.cache/act/694a392c30733999/hostexecutor [command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git config --local --get remote.origin.url https://git.fediversity.eu/Fediversity/Fediversity [command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git config --local --name-only --get-regexp http.https://git.fediversity.eu/.extraheader ^AUTHORIZATION: http.https://git.fediversity.eu/.extraheader [command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git config --local --get-regexp http.https://git.fediversity.eu/.extraheader ^AUTHORIZATION: http.https://git.fediversity.eu/.extraheader AUTHORIZATION: basic *** [command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git config --local --unset http.https://git.fediversity.eu/.extraheader ^AUTHORIZATION: Unset config key 'http.https://git.fediversity.eu/.extraheader' Determining the base and head repositories Remote is https://git.fediversity.eu/api/v1 Remote is https://git.fediversity.eu/api/v1 Pull request branch target repository set to Fediversity/Fediversity Configuring credential for HTTPS authentication [command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git config --local http.https://git.fediversity.eu/.extraheader AUTHORIZATION: basic *** [command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git rev-parse --git-dir .git Checking the base repository state [command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git symbolic-ref HEAD --short main Working base is branch 'main' Pull request branch to create or update set to 'npins-update' Configuring the committer and author Configured git committer as 'github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>' Configured git author as 'kiara <+kiara@users.noreply.github.com>' Create or update the pull request branch [command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git symbolic-ref HEAD --short main Working base is branch 'main' [command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git checkout --progress -B 79332a4c-23cb-4d2d-82bb-232cd0c17560 HEAD -- Switched to a new branch '79332a4c-23cb-4d2d-82bb-232cd0c17560' M npins/sources.json [command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git status --porcelain -unormal -- M npins/sources.json Uncommitted changes found. Adding a commit. [command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git add -A [command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git -c author.name=kiara -c author.email=+kiara@users.noreply.github.com -c committer.name=github-actions[bot] -c committer.email=41898282+github-actions[bot]@users.noreply.github.com commit -m npins: update sources deadnix..............................................(no files to check)Skipped nixfmt-rfc-style.....................................(no files to check)Skipped shellcheck...........................................(no files to check)Skipped trim-trailing-whitespace.............................(no files to check)Skipped [79332a4c-23cb-4d2d-82bb-232cd0c17560 9a4937a] npins: update sources Author: kiara <+kiara@users.noreply.github.com> 1 file changed, 26 insertions(+), 26 deletions(-) [command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git stash push --include-untracked No local changes to save Resetting working base branch 'main' [command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git checkout --progress main -- Switched to branch 'main' Your branch is up to date with 'origin/main'. [command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git reset --hard origin/main HEAD is now at 5520fa7 gitea PR unpruned (#445) [command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git rev-list --right-only --count main...79332a4c-23cb-4d2d-82bb-232cd0c17560 1 [command]/nix/store/lqx2rv26sdndpa2vyy2vxsahj03km69z-git-2.48.1/bin/git -c protocol.version=2 fetch --no-tags --progress --no-recurse-submodules --force --depth=11 origin npins-update:refs/remotes/origin/npins-update </details> this seems to at least [progress further](https://github.com/KiaraGrouwstra/gitea-create-pull-request/blob/d1fd3e1f0c98ee7a009c035f9b7ad3f3bdc0f281/src/create-pull-request.ts#L216-L217) than before, altho it still just seems to hang somehow.
Owner

there's technically a commit decreasing verbosity on the action that could be reversed in a fork

there's technically a [commit decreasing verbosity](https://github.com/peter-evans/create-pull-request/pull/3776/files) on the action that could be reversed in a fork
Owner

if #463 converges on gerrit, that might overhaul this as well

if #463 converges on gerrit, that might overhaul this as well
Owner

lon advertises built-in PR creation including for forgejo.

(c.f. #302 - i'm not sure lon handles it for gerrit.)

edit: i may wanna find out if its PR creation (if it works) could be split off, for separation of concerns.

[lon](https://github.com/nikstur/lon) advertises built-in PR creation including for forgejo. (c.f. #302 - i'm not sure lon handles it for gerrit.) edit: i may wanna find out if its PR creation (if it works) could be split off, for separation of concerns.
kiara referenced this issue from a commit 2025-10-28 13:04:20 +01:00
Owner

another approach i hadn't tried is the PR implementation of https://github.com/Mic92/update-flake-inputs-gitea

another approach i hadn't tried is the PR implementation of https://github.com/Mic92/update-flake-inputs-gitea
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks
#224 automated dev-ops workflows
fediversity/fediversity
#611 Update applications
fediversity/fediversity
Depends on
Reference: fediversity/fediversity#65
No description provided.