Repository navigation
Conversation
The stats of the queue info were an anonymous struct that had to be written out a second time to fill it. Name it QueueStats so it can be referenced, also by the types of the go client. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BXsZqxJcVXs3vETtUHiG5r
The types of woodpecker-go are copies of the server models written by hand, and they have fallen behind: fields are missing, some are named differently and some no longer exist. typegen writes them from the source of the server models instead. It keeps the json tags only, names a model like its swag '@name' and adds the fields of embedded structs to the struct itself. A type the client declares by hand is used as is, so enums can stay typed where the client wants that. It only reads the source files, so the client still does not import the server. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BXsZqxJcVXs3vETtUHiG5r
The types the API uses are now written by typegen from server/model. The client gets every field the API has, among them the changed files, labels and cron of a pipeline and the extension settings of a repo. Names follow the server now, which renames some types and fields and drops fields the server never knew. They are listed in the migration notes. Types that only the client has stay in types.go. A CI step fails if the generated types are not up to date. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BXsZqxJcVXs3vETtUHiG5r
Member
Author
|
if #7586 landed .. last patch is not needed anymore ;) |
Contributor
|
Surge PR preview deployment succeeded. View it at https://woodpecker-ci-woodpecker-pr-7588.surge.sh |
Member
Author
|
PS: we also might generate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
depends on #7587
the types where out of sync fast ... and with this we just generate them ...
Overview
CancelInfo,QueueTaskInfo->QueueInfoLogEntry,LogLevel,OrgPatch,PipelineError,Release,Secret,TrustedConfiguration,TrustedConfigurationPatch,VersionBreaking changes (Go API)
InfoQueueInfoQueueStatsWorkers,Pending,WaitingOnDeps,RunningbecomeWorkerCount,PendingCount,WaitingOnDepsCount,RunningCount.Completeis dropped.PipelineDeploybecomesDeployToStep,WorkflowStoppedbecomesFinishedRepoSCMKindremovedFeedRemoteremovedUserActiveremovedRepoPatchIsTrustedandPipelineCounterremoved.RequireApprovalgoes from*ApprovalModeto*string.Per type
Added
QueueInfo:Pending,WaitingOnDepsandRunning(all[]QueueTask),Stats,Paused.QueueTask: the task shape the queue endpoints return (15 fields).CancelInfo: 3 fields, used byPipeline.CancelInfo.Changed
Agent: newFilters.Cron: newTimezoneandVariables.Feed:Remoteremoved. NewReleaseandTagTitle.Org: newForgeID. Theidtag gainsomitempty.Pipeline:DeploybecomesDeployTo.DeployTask,Version,RerunCount,Cron,ChangedFiles,AdditionalVariables(variables),CancelInfo,FromFork,IsPrerelease,TagTitle, and the PR fieldsPullRequestDraft,PullRequestLabelsandPullRequestMilestone.PipelineOptions: newMessage.Registry: newReadOnly. Thepasswordtag losesomitempty.Repo:SCMKindremoved.ConfigExtensionExclusive.ApprovalAllowedUsers,AllowDeploy.ForgeID,HasForgeNameConflict,HasNoForgeRepo.OrgID,CloneSSH,PREnabled.RepoPatch:IsTrustedandPipelineCounterremoved.RequireApprovalis now*string.Trustedlosesomitempty,Visibilitygains it.AllowDeploy,ApprovalAllowedUsers,CancelPreviousPipelineEvents,NetrcTrusted, and the config, secret and registry extension endpoint, netrc and exclusive fields.Step:StoppedbecomesFinished. NewUUID,PipelineIDandDependsOn.Workflow:StoppedbecomesFinished. NewPipelineIDandDependsOn.Task: now the full server model. It gainsPID,Name,PipelineID,RepoID,Created,ConcurrencyLimitandConcurrencyGroup.User:Activeremoved.AdminEnv,AdminRevokedandOrgID.adminandforge_idgainomitempty.