fix: job list response to avoid wrapped body. #7050

Merged
Gusted merged 4 commits from cobak78/forgejo:fix-job-list-response into forgejo 2025-02-24 19:14:16 +01:00
Member

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

  • I added test coverage for Go changes...
    • in their respective *_test.go for unit tests.
    • in the tests/integration directory if it involves interactions with a live Forgejo server.
  • I added test coverage for JavaScript changes...

Documentation

  • I created a pull request to the documentation to explain to Forgejo users how to use this change.
  • I did not document these changes and I do not expect someone else to do it.

Release notes

  • I do not want this change to show in the release notes.
  • I want the title to show in the release notes with a link to this pull request.
  • I want the content of the release-notes/<pull request number>.md to be be used for the release notes instead of the title.
## Checklist The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org). ### Tests - I added test coverage for Go changes... - [x] in their respective `*_test.go` for unit tests. - [x] in the `tests/integration` directory if it involves interactions with a live Forgejo server. - I added test coverage for JavaScript changes... - [ ] in `web_src/js/*.test.js` if it can be unit tested. - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)). ### Documentation - [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change. - [x] I did not document these changes and I do not expect someone else to do it. ### Release notes - [x] I do not want this change to show in the release notes. - [ ] I want the title to show in the release notes with a link to this pull request. - [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title.
cobak78 requested review from Gusted 2025-02-24 11:10:07 +01:00
Owner

Could you run make generate-swagger and commit the result?

Could you run `make generate-swagger` and commit the result?
Author
Member

@Gusted done

@Gusted done
Owner

CI failure is related, could you add a EOL to the file again?

templates/swagger/v1_json.tmpl:
	Wrong line endings or no final newline
CI failure is related, could you add a EOL to the file again? ``` templates/swagger/v1_json.tmpl: Wrong line endings or no final newline ```
earl-warren changed title from fix job list response to avoid wrapped body. to fix: job list response to avoid wrapped body. 2025-02-24 12:01:39 +01:00
@ -34,13 +34,6 @@ func GetRegistrationToken(ctx *context.APIContext, ownerID, repoID int64) {
ctx.JSON(http.StatusOK, RegistrationToken{Token: token.Token})
}
// RunJobList is a list of action run jobs
Owner

Reverse the removal of this code:

/workspace/forgejo/forgejo/templates/swagger/v1_json.tmpl
 1015:21  error  invalid-ref  '#/responses/RunJobList' does not exist  paths./admin/runners/jobs.get.responses[200].$ref

If possible please move this definition (and modify it to match the existing definitions) to routers/api/v1/swagger/action.go.

Reverse the removal of this code: ``` /workspace/forgejo/forgejo/templates/swagger/v1_json.tmpl 1015:21 error invalid-ref '#/responses/RunJobList' does not exist paths./admin/runners/jobs.get.responses[200].$ref ``` If possible please move this definition (and modify it to match the existing definitions) to `routers/api/v1/swagger/action.go`.
Gusted marked this conversation as resolved
cobak78 force-pushed fix-job-list-response from 9ab3156c23
All checks were successful
requirements / merge-conditions (pull_request) Successful in 3s
issue-labels / release-notes (pull_request_target) Has been skipped
testing / frontend-checks (pull_request) Successful in 1m9s
testing / backend-checks (pull_request) Successful in 2m53s
testing / test-e2e (pull_request) Successful in 3m27s
testing / test-unit (pull_request) Successful in 6m2s
testing / test-remote-cacher (redis) (pull_request) Successful in 2m25s
testing / test-remote-cacher (valkey) (pull_request) Successful in 2m26s
testing / test-remote-cacher (garnet) (pull_request) Successful in 2m26s
testing / test-remote-cacher (redict) (pull_request) Successful in 2m26s
testing / test-mysql (pull_request) Successful in 19m31s
testing / test-sqlite (pull_request) Successful in 21m33s
testing / test-pgsql (pull_request) Successful in 24m48s
testing / security-check (pull_request) Successful in 1m4s
to 1d058cd4d3
All checks were successful
requirements / merge-conditions (pull_request) Successful in 2s
issue-labels / release-notes (pull_request_target) Has been skipped
testing / frontend-checks (pull_request) Successful in 57s
testing / backend-checks (pull_request) Successful in 2m46s
testing / test-e2e (pull_request) Successful in 3m21s
testing / test-unit (pull_request) Successful in 5m41s
testing / test-remote-cacher (redis) (pull_request) Successful in 2m16s
testing / test-remote-cacher (valkey) (pull_request) Successful in 2m18s
testing / test-remote-cacher (garnet) (pull_request) Successful in 2m19s
testing / test-remote-cacher (redict) (pull_request) Successful in 2m18s
testing / test-mysql (pull_request) Successful in 19m9s
testing / test-sqlite (pull_request) Successful in 21m0s
testing / test-pgsql (pull_request) Successful in 24m38s
testing / security-check (pull_request) Successful in 1m2s
issue-labels / backporting (pull_request_target) Has been skipped
milestone / set (pull_request_target) Successful in 11s
2025-02-24 17:42:08 +01:00
Compare
Gusted approved these changes 2025-02-24 19:13:53 +01:00
Gusted left a comment
Owner

Thank you for the fix!

Thank you for the fix!
Gusted merged commit a4778fc970 into forgejo 2025-02-24 19:14:16 +01:00
Author
Member

@Gusted When is the next version expected to be released? I need an official image to create the E2E tests in the KEDA pull request that uses these endpoints

@Gusted When is the next version expected to be released? I need an official image to create the E2E tests in the KEDA pull request that uses these endpoints
Owner

When is the next version expected to be released?

v11 is expected to be released on 16 April 2025, per https://forgejo.org/docs/next/admin/release-schedule/

I need an official image to create the E2E tests in the KEDA pull request that uses these endpoints

I think you can use https://codeberg.org/forgejo-experimental/-/packages/container/forgejo/11, as long as its purely for testing. CC @earl-warren

> When is the next version expected to be released? v11 is expected to be released on 16 April 2025, per https://forgejo.org/docs/next/admin/release-schedule/ > I need an official image to create the E2E tests in the KEDA pull request that uses these endpoints I think you can use https://codeberg.org/forgejo-experimental/-/packages/container/forgejo/11, as long as its purely for testing. CC @earl-warren
Contributor

@Gusted wrote in #7050 (comment):

I think you can use https://codeberg.org/forgejo-experimental/-/packages/container/forgejo/11, as long as its purely for testing. CC @earl-warren

Yes, that's exactly what they are meant for. It was deployed last night at:

https://v11.next.forgejo.org/api/swagger/#/admin/adminSearchRunJobs

@Gusted wrote in https://codeberg.org/forgejo/forgejo/pulls/7050#issuecomment-2873914: > I think you can use https://codeberg.org/forgejo-experimental/-/packages/container/forgejo/11, as long as its purely for testing. CC @earl-warren Yes, that's exactly what they are meant for. It was deployed last night at: https://v11.next.forgejo.org/api/swagger/#/admin/adminSearchRunJobs
Author
Member

Thanks for the answer, i will us that image.

Thanks for the answer, i will us that image.
Sign in to join this conversation.
No reviewers
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
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo/forgejo!7050
No description provided.