\r\n\n\n### Steps to reproduce\n\n.\n\n### Expected behavior\n\n_No response_\n\n### System Info\n\n```shell\n\"next-d126cf9e35\"\n```\n\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Read the [docs](https://woodpecker-ci.org/docs/intro).\n- [X] Check that there isn't [already an issue](https://github.com/woodpecker-ci/woodpecker/issues) that reports the same bug to avoid creating a duplicate.\n- [X] Checked that the bug isn't fixed in the `next` version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]",[1998,1999],{"name":1985,"color":1986},{"name":2000,"color":2001},"ui","46DEA2",4677,"`tag` pipelines are missing avatar and commit title","2025-01-12T06:19:42Z","https://github.com/woodpecker-ci/woodpecker/issues/4677",0.71661586,{"description":2008,"labels":2009,"number":2013,"owner":1988,"repository":1989,"state":1990,"title":2014,"updated_at":2015,"url":2016,"score":2017},"### Component\n\nserver\n\n### Describe the bug\n\nWhile testing the ntfy plugin to send notifications after pipeline failure I wanted to use `CI_STEP_NAME` but it doesn't return a value. The other CI_STEP_* variables are not returning anything either.\r\n\r\nHere a example pipeline. I have added `CI_WORKFLOW_NAME` which does work.\r\n```\r\npipeline:\r\n deploy:\r\n image: alpine:latest\r\n commands:\r\n - exit 1\r\n\r\n notify_on_failure:\r\n image: codeberg.org/l-x/woodpecker-ntfy\r\n settings:\r\n url: https://ntfy.example.com/ci\r\n token:\r\n from_secret: ntfy_token\r\n title: Build failure\r\n priority: urgent\r\n icon: https://woodpecker-ci.org/img/logo.svg\r\n tags: x, robot\r\n message: >\r\n Workflow: ${CI_WORKFLOW_NAME}\r\n Step name: ${CI_STEP_NAME}\r\n Step status: ${CI_STEP_STATUS}\r\n Step started: ${CI_STEP_STARTED}\r\n Step finished: ${CI_STEP_FINISHED}\r\n when:\r\n status: [ failure ]\r\n```\n\n### System Info\n\n```shell\nVersion: next-02913fa7\n```\n\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Read the [Contributing Guidelines](https://github.com/woodpecker-ci/woodpecker/blob/master/CONTRIBUTING.md).\n- [X] Read the [docs](https://woodpecker-ci.org/docs/intro).\n- [X] Check that there isn't [already an issue](https://github.com/woodpecker-ci/woodpecker/issues) that reports the same bug to avoid creating a duplicate.\n- [X] Checked that the bug isn't fixed in the `next` version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]\n- [X] Check that this is a concrete bug. For Q&A join our [Discord Chat Server](https://discord.gg/fcMQqSMXJy) or the [Matrix room](https://matrix.to/#/#woodpecker:matrix.org).",[2010],{"name":2011,"color":2012},"enhancement","7E1FE4",1760,"`CI_STEP_*` environment variables do not return values","2024-10-05T23:54:48Z","https://github.com/woodpecker-ci/woodpecker/issues/1760",0.7224746,{"description":2019,"labels":2020,"number":2025,"owner":1988,"repository":1989,"state":1990,"title":2026,"updated_at":2027,"url":2028,"score":2029},"we currently don't have a concept how to translate/interpreter the services into \"local backend\" and just ignore them.\r\n\r\nwe should have it that way so it works very similar to what the user know with docker or kube backend.",[2021,2022],{"name":2011,"color":2012},{"name":2023,"color":2024},"backend/local","bfdadc",3095,"Implement services for local backend","2025-02-10T13:40:24Z","https://github.com/woodpecker-ci/woodpecker/issues/3095",0.7239384,{"description":2031,"labels":2032,"number":2036,"owner":1988,"repository":1989,"state":1990,"title":2037,"updated_at":2038,"url":2039,"score":2040},"we should create a dedicated module who handle the shutdown context logic ...\r\n\r\nand make it so we dont have to switch out an global context but rather influence it ...\r\n\r\nbased on #3895 and #3896 pre-work",[2033],{"name":2034,"color":2035},"refactor","4f8cc9",3907,"Refactor note: move shutdown context creation into own module","2024-07-14T00:27:20Z","https://github.com/woodpecker-ci/woodpecker/issues/3907",0.7504428,{"description":2042,"labels":2043,"number":2048,"owner":1988,"repository":1989,"state":1990,"title":2049,"updated_at":2050,"url":2051,"score":2052},"### Component\r\n\r\nserver, agent\r\n\r\n### Describe the bug\r\n\r\nThis is mainly a summary issue of https://github.com/woodpecker-ci/woodpecker/issues/833, https://github.com/woodpecker-ci/woodpecker/issues/2062, https://github.com/woodpecker-ci/woodpecker/issues/2911\rand #4349\n\r\nI've been trying to debug this without real success.\r\n\r\nI've been using the local backend, and can do the following observations:\r\n- cancel pipeline while running: completely broken. The commands are finished, the step is marked as success, the pipeline too (https://github.com/woodpecker-ci/woodpecker/issues/2911)\r\n- cancelling a pending pipeline seems to work for me\r\n\r\nOn ci.woodpecker-ci.org, I can see (uses docker backend):\r\n- cancel pending pipeline, agent is available: the pipeline starts anyways (this probably is #2062)\r\n- cancel running pipeline: works in general, but new status is failing but should be killed\r\n\r\n### System Info\r\n\r\n```shell\r\nnext\r\n```\r\n\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Validations\r\n\r\n- [X] Read the [Contributing Guidelines](https://github.com/woodpecker-ci/woodpecker/blob/main/CONTRIBUTING.md).\r\n- [X] Read the [docs](https://woodpecker-ci.org/docs/intro).\r\n- [X] Check that there isn't [already an issue](https://github.com/woodpecker-ci/woodpecker/issues) that reports the same bug to avoid creating a duplicate.\r\n- [X] Checked that the bug isn't fixed in the `next` version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]\r\n- [X] Check that this is a concrete bug. For Q&A join our [Discord Chat Server](https://discord.gg/fcMQqSMXJy) or the [Matrix room](https://matrix.to/#/#woodpecker:matrix.org).",[2044,2045],{"name":1985,"color":1986},{"name":2046,"color":2047},"summary","C3DC73",2875,"Fix pipeline cancelling","2024-12-08T12:10:57Z","https://github.com/woodpecker-ci/woodpecker/issues/2875",0.750719,{"description":2054,"labels":2055,"number":2057,"owner":1988,"repository":1989,"state":2058,"title":2059,"updated_at":2060,"url":2061,"score":2062},"### Component\r\n\r\nagent\r\n\r\n### Describe the bug\r\n\r\nWhen having a backend error in the config, i.e. a malformed env var, the step and build are marked as successful even though they should be marked as \"failed\". \r\n\r\n\r\n\r\n\r\nk8s backend\r\n\r\n\r\n### System Info\r\n\r\n```shell\r\n{\"source\":\"https://github.com/woodpecker-ci/woodpecker\",\"version\":\"next-6ab9f802\"}\r\n```\r\n\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Validations\r\n\r\n- [X] Read the [Contributing Guidelines](https://github.com/woodpecker-ci/woodpecker/blob/master/CONTRIBUTING.md).\r\n- [X] Read the [docs](https://woodpecker-ci.org/docs/intro).\r\n- [X] Check that there isn't [already an issue](https://github.com/woodpecker-ci/woodpecker/issues) that reports the same bug to avoid creating a duplicate.\r\n- [X] Checked that the bug isn't fixed in the `next` version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]\r\n- [X] Check that this is a concrete bug. For Q&A join our [Discord Chat Server](https://discord.gg/fcMQqSMXJy) or the [Matrix room](https://matrix.to/#/#woodpecker:matrix.org).",[2056],{"name":1985,"color":1986},1871,"closed","Build is marked as \"successful\" although a backend error occurred","2025-01-10T21:25:48Z","https://github.com/woodpecker-ci/woodpecker/issues/1871",0.65761495,{"description":2064,"labels":2065,"number":2069,"owner":1988,"repository":1989,"state":2058,"title":2070,"updated_at":2071,"url":2072,"score":2073},"### Clear and concise description of the problem\r\n\r\nI'm trying to run a container image build step in my pipeline that uses [buildah](https://quay.io/repository/buildah/stable?tab=info). I'm running into a lot of permission errors like this:\r\n\r\n```\r\ntime=\"2023-10-07T19:59:26Z\" level=error msg=\"writing \\\"0 0 4294967295\\\\n\\\" to /proc/17/uid_map: write /proc/17/uid_map: operation not permitted\"\r\ntime=\"2023-10-07T19:59:26Z\" level=error msg=\"(Unable to determine exit status)\"\r\n```\r\n\r\nAfter some experimentation with podman and buildah containers on my cluster, I have determined that I need to configure a few different settings at the Pod level for this to work:\r\n\r\n- `metadata.annotations`: I need to be able to set `container.apparmor.security.beta.kubernetes.io/\u003Ccontainer_name>` to use a custom apparmor profile for my buildah container. I would like to use the `WOODPECKER_BACKEND_K8S_POD_ANNOTATIONS` env variable, but since the container names are randomly generated I'm not sure how to make this work.\r\n- `spec.securityContext`: The only way I have found to make buildah work is to run it as non-root. This means that I need to set `runAsUser`, `runAsGroup`, and `fsGroup` on the Pod level `securityContext` (not the container level).\r\n\r\n### Suggested solution\r\n\r\nAdding support for `securityContext` seems like it should be fairly straightforward. We could just follow that same approach that is currently used for `resources`, `nodeSelector`, etc. [documented here](https://woodpecker-ci.org/docs/next/administration/backends/kubernetes#resources).\r\n\r\nThe AppArmor profile is trickier since the container name needs to be included in the annotation key. I'm imagining a configuration like `backend_options.kubernetes.appArmorProfile` that could take all of the possible values for the annotation [documented here](https://kubernetes.io/docs/tutorials/security/apparmor/). Then, the pod generation logic would just look for this configuration and add the appropriate annotation if it's found.\r\n\r\n### Alternative\r\n\r\nI could disable AppArmor entirely, but that's not really advisable for a production environment. I could also try to find a way to get the buildah container running as root (it should be possible), but again, that's not ideal from a security perspective.\r\n\r\n### Additional context\r\n\r\nThis is somewhat of a follow up from #2510. I'm trying to get Woodpecker to run on my kubeadm/CRI-O based cluster running on Debian which I believe makes me some kind of leprechaun/unicorn/lochness monster. There definitely aren't many of us out there.\r\n\r\n### Validations\r\n\r\n- [X] Checked that the feature isn't part of the `next` version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]\r\n- [X] Read the [Contributing Guidelines](https://github.com/woodpecker-ci/woodpecker/blob/main/CONTRIBUTING.md).\r\n- [X] Read the [docs](https://woodpecker-ci.org/docs/intro).\r\n- [X] Check that there isn't already an [issue](https://github.com/woodpecker-ci/woodpecker/issues) that request the same feature to avoid creating a duplicate.",[2066,2067],{"name":2011,"color":2012},{"name":2068,"color":2024},"backend/kubernetes",2545,"Support AppArmor annotations and securityContext in kubernetes backend","2024-01-12T22:32:26Z","https://github.com/woodpecker-ci/woodpecker/issues/2545",0.6851769,{"description":2075,"labels":2076,"number":2078,"owner":1988,"repository":1989,"state":2058,"title":2079,"updated_at":2080,"url":2081,"score":2082},"### Component\n\nserver\n\n### Describe the bug\n\nTrying out woodpecker, my docker-compose file:\n```\nservices:\n woodpecker-server:\n image: woodpeckerci/woodpecker-server:v3\n ports:\n - 8000:8000\n volumes:\n - woodpecker-server-data:/var/lib/woodpecker/\n environment:\n - WOODPECKER_OPEN=true\n - WOODPECKER_HOST=http://192.168.10.162:8000\n\nvolumes:\n woodpecker-server-data:\n```\n\nWhen running with `docker compose up`, I get the following:\n```\n~/projects/foss/woodpecker$ docker compose up\n[+] Running 1/1\n ✔ Container woodpecker-woodpecker-server-1 Created 0.1s \nAttaching to woodpecker-server-1\nwoodpecker-server-1 | {\"level\":\"info\",\"time\":\"2025-03-07T05:42:55Z\",\"message\":\"log level: info\"}\nwoodpecker-server-1 | {\"level\":\"warn\",\"time\":\"2025-03-07T05:42:55Z\",\"message\":\"no sqlite3 file found, will create one at '/var/lib/woodpecker/woodpecker.sqlite'\"}\nwoodpecker-server-1 | {\"level\":\"error\",\"error\":\"can't setup store: could not migrate datastore: unable to open database file: no such file or directory\",\"time\":\"2025-03-07T05:42:55Z\",\"message\":\"error running server\"}\nwoodpecker-server-1 exited with code 0\n~/projects/foss/woodpecker$ \n```\n\nAlso, I doubled checked the volume dir, and there is no files there:\n```\nroot@[REDACTED]:/var/lib/docker/volumes/woodpecker_woodpecker-server-data/_data# ls -la\ntotal 0\ndrwxr-xr-x. 1 root root 0 Mar 5 04:50 .\ndrwx-----x. 1 root root 10 Mar 7 18:37 ..\nroot@[REDACTED]:/var/lib/docker/volumes/woodpecker_woodpecker-server-data/_data# \n```\n\n\n### Steps to reproduce\n\n1. Woodperker with docker (configuration from docs) & agent entry removed. (only service)\n2. `docker compose up`\n3. Observe the error\n\n### Expected behavior\n\n_No response_\n\n### System Info\n\n```shell\nDocker version 28.0.1, build 068a01e\n```\n\n### Additional context\n\n**However**, when running with `woodpeckerci/woodpecker-server:v3-alpine` image - this issue goes away.\n\n### Validations\n\n- [x] Read the [docs](https://woodpecker-ci.org/docs/intro).\n- [x] Check that there isn't [already an issue](https://github.com/woodpecker-ci/woodpecker/issues) that reports the same bug to avoid creating a duplicate.\n- [x] Checked that the bug isn't fixed in the `next` version already [https://woodpecker-ci.org/versions]",[2077],{"name":1985,"color":1986},4939,"Fresh run with docker results in \"unable to open database file\"","2025-03-18T16:47:23Z","https://github.com/woodpecker-ci/woodpecker/issues/4939",0.71775025,{"description":2084,"labels":2085,"number":2090,"owner":1988,"repository":1989,"state":2058,"title":2091,"updated_at":2092,"url":2093,"score":2094},"### Component\n\nagent\n\n### Describe the bug\n\nAgent image builds with `next-*` version instead of tag/release. Server version is OK.\n\n### System Info\n\n```shell\n{\"level\":\"info\",\"time\":\"2023-08-17T11:47:41Z\",\"message\":\"Starting Woodpecker server with version '1.0.2'\"}\r\n{\"level\":\"info\",\"time\":\"2023-08-17T12:01:26Z\",\"message\":\"Starting Woodpecker agent with version 'next-d9e06696' and backend 'kubernetes' using platform 'linux/amd64' running up to 1 pipelines in parallel\"}\n```\n\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Read the [Contributing Guidelines](https://github.com/woodpecker-ci/woodpecker/blob/main/CONTRIBUTING.md).\n- [X] Read the [docs](https://woodpecker-ci.org/docs/intro).\n- [X] Check that there isn't [already an issue](https://github.com/woodpecker-ci/woodpecker/issues) that reports the same bug to avoid creating a duplicate.\n- [X] Checked that the bug isn't fixed in the `next` version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]\n- [X] Check that this is a concrete bug. For Q&A join our [Discord Chat Server](https://discord.gg/fcMQqSMXJy) or the [Matrix room](https://matrix.to/#/#woodpecker:matrix.org).",[2086,2087],{"name":1985,"color":1986},{"name":2088,"color":2089},"build","6AB8BA",2236,"Incorrect version of agent","2023-08-18T14:39:20Z","https://github.com/woodpecker-ci/woodpecker/issues/2236",0.72333544,["Reactive",2096],{},["Set"],["ShallowReactive",2099],{"TRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"rnxV3qc1NOg_CcKdBPcQgJRq27SwO_uj9xQWuwmD_SY":-1},"/woodpecker-ci/woodpecker/3689"]