Add search action jobs for API routes, repo, org and global level #6300
No reviewers
Labels
No labels
arch
riscv64
backport/v1.19
backport/v1.20
backport/v1.21/forgejo
backport/v10.0/forgejo
backport/v11.0/forgejo
backport/v12.0/forgejo
backport/v13.0/forgejo
backport/v14.0/forgejo
backport/v15.0/forgejo
backport/v7.0/forgejo
backport/v8.0/forgejo
backport/v9.0/forgejo
breaking
bug
bug
confirmed
bug
duplicate
bug
needs-more-info
bug
new-report
bug
reported-upstream
code/actions
code/api
code/auth
code/auth/faidp
code/auth/farp
code/email
code/federation
code/git
code/migrations
code/packages
code/wiki
database
MySQL
database
PostgreSQL
database
SQLite
dependency-upgrade
dependency
certmagic
dependency
chart.js
dependency
Chi
dependency
Chroma
dependency
citation.js
dependency
codespell
dependency
css-loader
dependency
devcontainers
dependency
dropzone
dependency
editorconfig-checker
dependency
elasticsearch
dependency
enmime
dependency
F3
dependency
ForgeFed
dependency
garage
dependency
Git
dependency
git-backporting
dependency
Gitea
dependency
gitignore
dependency
go-ap
dependency
go-enry
dependency
go-gitlab
dependency
Go-org
dependency
go-rpmutils
dependency
go-sql-driver mysql
dependency
go-swagger
dependency
go-version
dependency
go-webauthn
dependency
gocron
dependency
Golang
dependency
goldmark
dependency
goquery
dependency
Goth
dependency
grpc-go
dependency
happy-dom
dependency
Helm
dependency
image-spec
dependency
jsonschema
dependency
KaTeX
dependency
lint
dependency
MariaDB
dependency
Mermaid
dependency
minio-go
dependency
misspell
dependency
Monaco
dependency
PDFobject
dependency
playwright
dependency
postcss
dependency
postcss-plugins
dependency
pprof
dependency
prometheus client_golang
dependency
protobuf
dependency
relative-time-element
dependency
renovate
dependency
reply
dependency
ssh
dependency
swagger-ui
dependency
tailwind
dependency
temporal-polyfill
dependency
terminal-to-html
dependency
tests-only
dependency
text-expander-element
dependency
urfave
dependency
vfsgen
dependency
vite
dependency
Woodpecker CI
dependency
x tools
dependency
XORM
Discussion
duplicate
enhancement/feature
forgejo/accessibility
forgejo/branding
forgejo/ci
forgejo/commit-graph
forgejo/documentation
forgejo/furnace cleanup
forgejo/i18n
forgejo/interop
forgejo/moderation
forgejo/privacy
forgejo/release
forgejo/scaling
forgejo/security
forgejo/ui
Gain
High
Gain
Nice to have
Gain
Undefined
Gain
Very High
good first issue
i18n/backport-stable
impact
large
impact
medium
impact
small
impact
unknown
Incompatible license
issue
closed
issue
do-not-exist-yet
issue
open
manual test
Manually tested during feature freeze
OS
FreeBSD
OS
Linux
OS
macOS
OS
Windows
problem
QA
regression
release blocker
Release Cycle
Feature Freeze
release-blocker
v7.0
release-blocker
v7.0.1
release-blocker
v7.0.2
release-blocker
v7.0.3
release-blocker
v7.0.4
release-blocker
v8.0.0
release-blocker/v9.0.0
run-all-playwright-tests
run-end-to-end-tests
test
manual
test
needed
test
needs-help
test
not-needed
test
present
untested
User research - time-tracker
valuable code
worth a release-note
User research - Accessibility
User research - Blocked
User research - Community
User research - Config (instance)
User research - Errors
User research - Filters
User research - Future backlog
User research - Git workflow
User research - Labels
User research - Moderation
User research - Needs input
User research - Notifications/Dashboard
User research - Rendering
User research - Repo creation
User research - Repo units
User research - Security
User research - Settings (in-app)
No milestone
No project
No assignees
6 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo/forgejo!6300
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "cobak78/forgejo:list-job-endpoints"
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 wants to improve information of the tasks waiting to be executed on a global, organization, user and repository leve.
The main motivation is explained here forgejo/discussions#241
Checklist
The contributor guide contains information that will be helpful to first time contributors. There also are a few conditions for merging Pull Requests in Forgejo repositories. You are also welcome to join the Forgejo development chatroom.
Tests
*_test.gofor unit tests.tests/integrationdirectory if it involves interactions with a live Forgejo server.web_src/js/*.test.jsif it can be unit tested.tests/e2e/*.test.e2e.jsif it requires interactions with a live Forgejo server (see also the developer guide for JavaScript testing).Documentation
Release notes
release-notes/<pull request number>.mdto be be used for the release notes instead of the title.Release notes
@ -0,0 +1,22 @@package structsPlease add license headers.
@ -33,0 +44,4 @@func GetActionRunJobs(ctx *context.APIContext, ownerID int64, repoID int64) {labels := strings.Split(ctx.FormTrim("labels"), ",")log.Printf("labels: %v", labels)Left debug statement.
@ -33,0 +81,4 @@return res}func isSubset(set, subset []string) bool {Please move this function to
modules/container/subset.goas this is also defined in inmodels/actions/task.go.This looks interesting 👍 Would you mind switching to WIP: until it is ready for a review? Removing the WIP: will notify me and I'll take a look 🙏
Add search action jobs for API routes, repo, org and global levelto WIP: Add search action jobs for API routes, repo, org and global level1d68fab1c553b405e3ccWIP: Add search action jobs for API routes, repo, org and global levelto Add search action jobs for API routes, repo, org and global levelWhere does that come from?
The following is a preview of the release notes for this pull request, as they will appear in the upcoming release. They are derived from the content of the `release-notes/6300.md` file, if it exists, or the title of the pull request. They were also added at the bottom of the description of this pull request for easier reference.This message and the release notes originate from a call to the release-notes-assistant.
Release notes
560e526c895b3d42cff4@ -30,2 +30,4 @@}func (s Set[T]) IsSubset(subset []T) bool {if len(subset) < 1 {len(subset) == 0is a more idomatic way to do this.Is there a good reason to do this? This isn't how subsets in mathematics are defined, for which
\emptyset \in Sholds true for every setS.A possible solution would be to keep the function mathematically correct and move the equality check against 0 to where it is called. However, I think it would be more appropriate to create a specific function for the labels, called ItRunsOn.
@ -0,0 +1,35 @@package integrationMissing copyright headers.
@ -0,0 +1,40 @@package integrationDitto
@ -0,0 +1,35 @@package integrationDitto
67c98bfe3bbdb16e66d5854412aca14e30805b26adding a jobs api seems useful. i think i find use-cases beside autoscaling
@ -0,0 +1,25 @@// SPDX-License-Identifier: MITAre you open to use
GPL-3.0-or-laterfor new files ?Excellent work.
Add search action jobs for API routes, repo, org and global levelto WIP: Add search action jobs for API routes, repo, org and global levelPlease remove the WIP: prefix once the tests pass.
WIP: Add search action jobs for API routes, repo, org and global levelto Add search action jobs for API routes, repo, org and global levelThe failure is related.
https://codeberg.org/forgejo/forgejo/actions/runs/52489/jobs/8#jobstep-5-2657
Could you please check that the tests run successfully before removing the WIP:? It signals me that I should take a look and that would save me a little time 🙏
Add search action jobs for API routes, repo, org and global levelto WIP: Add search action jobs for API routes, repo, org and global levelWIP: Add search action jobs for API routes, repo, org and global levelto Add search action jobs for API routes, repo, org and global level7db327a1b3bfac9a8e94@cobak78 this will be deployed on https://v11.next.forgejo.org and you'll be able to check how it behaves for real. 🚀
@ -33,0 +55,4 @@}res := new(RunJobList)res.Body = fromRunJobModelToResponse(total, labels)Is there a particular reason why the response is wrapped in
body?This is different from virtually any other endpoint I looked at and the generated Swagger schema is wrong.
"responses": {"200": {"$ref": "#/responses/RunJobList"},"RunJobList": {"description": "RunJobList is a list of action run jobs","schema": {"type": "array","items": {"$ref": "#/definitions/ActionRunJob"}}},An example response looks like
while the schema suggests:
Similarly, an empty result looks like
instead of
Huh, that's interesting. Could you open a new issue so it can be marked as an release blocker?
@cobak78 FYI
Yes, you're right, good catch. I think I mistakenly copied that result from a Swagger definition instead of a real response. Here's a small PR to fix it. #7050
@ -80,3 +80,3 @@PageSize: 30,},Status: actions_model.StatusUnknown, // Unknown means allStatus: []actions_model.Status{actions_model.StatusUnknown}, // Unknown means allSee #7643. The field should have been removed instead to ensure all tasks are listed.
forgejo-actions referenced this pull request from forgejo/website2025-11-27 18:11:38 +01:00
forgejo-actions referenced this pull request from forgejo/website2025-12-08 18:03:53 +01:00