Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go client expects PipelineQueue to return Activity list, but it returns Feed list #2679

Closed
5 tasks done
runephilosof-karnovgroup opened this issue Oct 31, 2023 · 2 comments · Fixed by #2690
Closed
5 tasks done
Labels
bug Something isn't working

Comments

@runephilosof-karnovgroup
Copy link
Contributor

Component

other

Describe the bug

In the Go client PipelineQueue expects an Activity list

func (c *client) PipelineQueue() ([]*Activity, error) {

But GetPipelineQueue in the server returns a Feed list

func (s storage) GetPipelineQueue() ([]*model.Feed, error) {

Activity and Feed does not match

Activity

Feed

type Feed struct {

Either both server and go client should use the same file as model, or CI should ensure that they stay compatible.

System Info

next

Additional context

No response

Validations

  • Read the Contributing Guidelines.
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Checked that the bug isn't fixed in the next version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]
  • Check that this is a concrete bug. For Q&A join our Discord Chat Server or the Matrix room.
@runephilosof-karnovgroup runephilosof-karnovgroup added the bug Something isn't working label Oct 31, 2023
@runephilosof-karnovgroup
Copy link
Contributor Author

runephilosof-karnovgroup commented Oct 31, 2023

Activity has these extra fields

		Owner    string `json:"owner"`
		Name     string `json:"name"`
		FullName string `json:"full_name"`
		CloneURL string `json:"clone_url,omitempty"`

Feed has these extra fields

	"repo_id": 2,
	"id": 266,
	"remote": "https://github.com/woodpecker-ci/woodpecker",

@runephilosof-karnovgroup
Copy link
Contributor Author

Owner, Name and Fullname was replaced with RepoID in Feed as part of ff01a9f.
ID was added in 482678d.

runephilosof-karnovgroup added a commit to runephilosof-karnovgroup/woodpecker that referenced this issue Nov 1, 2023
The models had gotten out of sync.
Use the same definition to avoid them getting out of sync in the future.

Closes woodpecker-ci#2679
runephilosof-karnovgroup added a commit to runephilosof-karnovgroup/woodpecker that referenced this issue Nov 1, 2023
The models had gotten out of sync.
Use the same definition to avoid them getting out of sync in the future.

Closes woodpecker-ci#2679
runephilosof-karnovgroup added a commit to runephilosof-karnovgroup/woodpecker that referenced this issue Nov 1, 2023
The models had gotten out of sync.
Use the same definition to avoid them getting out of sync in the future.

Closes woodpecker-ci#2679
runephilosof-karnovgroup added a commit to runephilosof-karnovgroup/woodpecker that referenced this issue Nov 1, 2023
The models had gotten out of sync.

Closes woodpecker-ci#2679
qwerty287 pushed a commit that referenced this issue Nov 1, 2023
The models had gotten out of sync.
Use the same definition ~to avoid them getting out of sync in the
future~.

Closes #2679
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant