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

feat: upstream sync #300

Merged
merged 13 commits into from
Oct 5, 2023
Merged

feat: upstream sync #300

merged 13 commits into from
Oct 5, 2023

Conversation

adityathebe
Copy link
Member

@adityathebe adityathebe commented Sep 26, 2023

jobs/sync_upstream.go Outdated Show resolved Hide resolved
jobs/jobs.go Outdated Show resolved Hide resolved
jobs/sync_upstream.go Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Sep 26, 2023

E2E -

0 tests   0 ✔️  0s ⏱️
0 suites  0 💤
0 files    0

Results for commit 630d85d.

♻️ This comment has been updated with latest results.

jobs/sync_upstream.go Outdated Show resolved Hide resolved
@adityathebe
Copy link
Member Author

adityathebe commented Sep 27, 2023

Pulling scrape configs

a. Pull everything that was updated since X timestamp

  • X could be empty on startup so agent fetches all scrape configs
  • or it could be a delta of 5 minutes.

Push config

A. Primary means of pushing to upstream

a. use event_queue to push real time changes to upstream, OR
b. On a schedule X, fetch all the results that were updated in the last (X + delta) interval. (Although config_analysis doesn't have updated_at table so we might need to add it.)

B. Reconcile

Every 8 hours, push all results that were updated in the last 48 hours.

@moshloop wdyt?

jobs/sync_upstream.go Outdated Show resolved Hide resolved
jobs/sync_upstream.go Outdated Show resolved Hide resolved
Base automatically changed from chore/refactor-context to main September 28, 2023 06:41
jobs/jobs.go Outdated Show resolved Hide resolved
cmd/root.go Show resolved Hide resolved
@moshloop
Copy link
Member

Pulling scrape configs

a. Pull everything that was updated since X timestamp

  • X could be empty on startup so agent fetches all scrape configs
  • or it could be a delta of 5 minutes.

Push config

A. Primary means of pushing to upstream

a. use event_queue to push real time changes to upstream, OR b. On a schedule X, fetch all the results that were updated in the last (X + delta) interval. (Although config_analysis doesn't have updated_at table so we might need to add it.)

B. Reconcile

Every 8 hours, push all results that were updated in the last 48 hours.

@moshloop wdyt?

Pulling scrape configs every 5 minutes or so is fine

For push I think the event_queue mechanism as the primary is fine + normal reconciliation.

We will probably need to included updated_at in the hash, and then in get upstream details return both ids and updated_at on hash mismatch, and only push the difference

chart/values.yaml Outdated Show resolved Hide resolved
chart/templates/deployment.yaml Outdated Show resolved Hide resolved
chart/values.yaml Outdated Show resolved Hide resolved
@adityathebe adityathebe requested a review from moshloop October 2, 2023 12:02
chart/values.yaml Outdated Show resolved Hide resolved
@adityathebe adityathebe requested a review from moshloop October 4, 2023 11:37
@moshloop moshloop merged commit d31f77a into main Oct 5, 2023
6 checks passed
@github-actions
Copy link

github-actions bot commented Oct 5, 2023

🎉 This PR is included in version 0.0.140 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@adityathebe adityathebe deleted the feat/upstream-sync branch December 7, 2023 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Push mode
3 participants