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

Implement repo agents #4150

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

6543
Copy link
Member

@6543 6543 commented Sep 30, 2024

followup to #3539

@6543 6543 added the feature add new functionality label Sep 30, 2024
@6543 6543 added the build_pr_images If set, the CI will build images for this PR and push to Dockerhub label Oct 1, 2024
@woodpecker-bot
Copy link
Collaborator

Deploying preview to https://woodpecker-ci-woodpecker-pr-4150.surge.sh

@6543
Copy link
Member Author

6543 commented Oct 1, 2024

pull preview images should be published now, to be tested

Copy link

codecov bot commented Oct 2, 2024

Codecov Report

Attention: Patch coverage is 13.54839% with 134 lines in your changes missing coverage. Please review.

Project coverage is 26.38%. Comparing base (f8cfda1) to head (c8150a7).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
server/api/agent.go 0.00% 100 Missing ⚠️
server/store/mocks/store.go 0.00% 22 Missing ⚠️
server/router/api.go 0.00% 8 Missing ⚠️
...r/store/datastore/migration/017_add_repo_agents.go 70.00% 2 Missing and 1 partial ⚠️
server/grpc/auth_server.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4150      +/-   ##
==========================================
- Coverage   26.44%   26.38%   -0.07%     
==========================================
  Files         376      377       +1     
  Lines       27455    27605     +150     
==========================================
+ Hits         7260     7283      +23     
- Misses      19530    19656     +126     
- Partials      665      666       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@qwerty287 qwerty287 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if the repo is moved to a new owner? You would have to update the OrgID of all repo agents, right?

} // @name Agent

const (
IDNotSet = -1
agentFilterOrgID = "org-id"
IDNotSet = -1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we put this var into a generic file?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it used elsewhere?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not that I know, but it's a generic var. If it's called AgentIDNotSet or something similar it would fit here, but just IDNotSet is a generic name so it should be in a generic file.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anbraten what was the exact reasoning for the comst name suggestion?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was called SystemAgentOwnerID before which was misleading IMO. AgentIDNotSet would be fine as well.

server/api/agent.go Outdated Show resolved Hide resolved
@6543 6543 requested a review from qwerty287 October 6, 2024 20:15
@qwerty287
Copy link
Contributor

What about my comment above?

What happens if the repo is moved to a new owner? You would have to update the OrgID of all repo agents, right?

Copy link
Member

@anbraten anbraten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would like to test and get feedback for org agents in addition with repo-id=... / repo=owner/name filter first with the 3.0 release as those filters should allow the exact same result while being more flexibel already. We should add some docs how org agents work in general and how they could be used with filters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build_pr_images If set, the CI will build images for this PR and push to Dockerhub feature add new functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants