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: sync repository content with datastore #467

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

Conversation

LucasMrqes
Copy link
Collaborator

@LucasMrqes LucasMrqes commented Jan 3, 2025

This implements the first step to implement repository polling

  • New git provider features: fetch the latest revision (commit sha) for a ref, download a git bundle for a specific revision
  • New datastore routes: get latest revision, put git bundle
  • Implement TerraformRepository states and conditions in its controller (SyncNeeded, Synced). A sync consists of downloading git bundles for the latest revision of all refs managed by burrito (branch names or tag names of all associated TerraformLayers) and pushing them to the datastore

@LucasMrqes LucasMrqes force-pushed the feat/repository-polling branch from c355a7d to fff66c4 Compare January 6, 2025 11:14
@LucasMrqes LucasMrqes changed the base branch from main to feat/datastore-repo-storage January 6, 2025 11:14
@LucasMrqes LucasMrqes changed the base branch from feat/datastore-repo-storage to main January 6, 2025 11:15
@LucasMrqes LucasMrqes changed the title feat: add repository polling w/ datastore feat: sync repository content with datastore Jan 6, 2025
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 7.32648% with 721 lines in your changes missing coverage. Please review.

Project coverage is 44.48%. Comparing base (b44c05f) to head (fff66c4).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/controllers/terraformrepository/states.go 0.00% 138 Missing ⚠️
...rnal/controllers/terraformrepository/conditions.go 0.00% 97 Missing ⚠️
internal/utils/gitprovider/github/github.go 0.00% 92 Missing ⚠️
internal/utils/gitprovider/standard/standard.go 9.09% 77 Missing and 3 partials ⚠️
internal/utils/gitprovider/gitlab/gitlab.go 0.00% 70 Missing ⚠️
internal/datastore/client/client.go 0.00% 58 Missing ⚠️
internal/utils/zip/bundle.go 0.00% 51 Missing ⚠️
...rnal/controllers/terraformrepository/controller.go 0.00% 48 Missing ⚠️
...nternal/controllers/terraformrepository/polling.go 0.00% 33 Missing ⚠️
internal/datastore/client/mock.go 19.04% 17 Missing ⚠️
... and 6 more

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #467      +/-   ##
==========================================
- Coverage   50.05%   44.48%   -5.57%     
==========================================
  Files          72       78       +6     
  Lines        4805     5516     +711     
==========================================
+ Hits         2405     2454      +49     
- Misses       2197     2853     +656     
- Partials      203      209       +6     

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants