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

Move host info to the bus #1077

Merged
merged 34 commits into from Mar 28, 2024
Merged

Move host info to the bus #1077

merged 34 commits into from Mar 28, 2024

Conversation

peterjan
Copy link
Member

@peterjan peterjan commented Mar 19, 2024

This PR gets rid of the contractor cache. It stores the host checks in the bus and uses those when performing contract checks. To do so I extended search hosts with the ability to filter on usability and autopilot ID.

Closes #1034

@peterjan peterjan self-assigned this Mar 19, 2024
@peterjan peterjan changed the base branch from dev to pj/host-filter-mode March 19, 2024 11:00
@peterjan peterjan changed the base branch from pj/host-filter-mode to dev March 19, 2024 11:01
@peterjan peterjan marked this pull request as ready for review March 19, 2024 11:01
@peterjan
Copy link
Member Author

I will add an integration test but figured it'd be best to push it into review and get a first round of comments in before doing so.

@ChrisSchinnerl ChrisSchinnerl changed the title Move host info the the bus Move host info to the bus Mar 19, 2024
@ChrisSchinnerl
Copy link
Member

This seems alright overall but can we extract the stores code into a separate PR to make it easier to review?

@peterjan
Copy link
Member Author

peterjan commented Mar 20, 2024

This seems alright overall but can we extract the stores code into a separate PR to make it easier to review?

Jup, just wanted to get everything coded up to avoid going back and fourth between PRs. Moving this to DRAFT until the database entities are in.

@peterjan peterjan marked this pull request as draft March 20, 2024 13:36
@peterjan peterjan marked this pull request as ready for review March 25, 2024 21:33
autopilot/contractor.go Show resolved Hide resolved
autopilot/contractor.go Outdated Show resolved Hide resolved
autopilot/contractor.go Show resolved Hide resolved
We currently have two `Host` types. One in the `hostdb` package and one
in the `api` package. Merging these removes unnecessary nesting and
cleans up our API interfaces since we should exclusively return types
from the `api` package. The `hostdb` package is now left with
announcements stuff, which will be removed by `its-happening` after
which we can remove the `hostdb` package entirely.
api/host.go Outdated Show resolved Hide resolved
@ChrisSchinnerl ChrisSchinnerl merged commit 3f946f1 into dev Mar 28, 2024
8 checks passed
@ChrisSchinnerl ChrisSchinnerl deleted the pj/host-infos branch March 28, 2024 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Remove host info cache in autopilot and add it to the bus
2 participants