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: source hydrator #20345

Merged
merged 14 commits into from
Dec 16, 2024
Merged

feat: source hydrator #20345

merged 14 commits into from
Dec 16, 2024

Conversation

crenshaw-dev
Copy link
Member

@crenshaw-dev crenshaw-dev commented Oct 11, 2024

Implementation of this: #17755

Copy link

bunnyshell bot commented Oct 11, 2024

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

@crenshaw-dev crenshaw-dev force-pushed the hydrator-ui branch 3 times, most recently from 8ced464 to d4d24a1 Compare October 18, 2024 17:28
@crenshaw-dev crenshaw-dev force-pushed the hydrator-ui branch 3 times, most recently from 2f2279f to 23e5f5b Compare October 25, 2024 02:47
@crenshaw-dev crenshaw-dev force-pushed the hydrator-ui branch 6 times, most recently from 4621d30 to fb358a3 Compare November 4, 2024 21:03
@crenshaw-dev crenshaw-dev force-pushed the hydrator-ui branch 5 times, most recently from 1a31484 to 573e331 Compare November 21, 2024 21:53
@crenshaw-dev crenshaw-dev force-pushed the hydrator-ui branch 3 times, most recently from 77f14be to 0a3d16d Compare December 9, 2024 20:35
Copy link
Collaborator

@leoluz leoluz left a comment

Choose a reason for hiding this comment

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

added some documentation related comments

docs/user-guide/source-hydrator.md Outdated Show resolved Hide resolved
docs/user-guide/source-hydrator.md Show resolved Hide resolved
docs/user-guide/source-hydrator.md Outdated Show resolved Hide resolved
docs/user-guide/source-hydrator.md Outdated Show resolved Hide resolved
@crenshaw-dev crenshaw-dev force-pushed the hydrator-ui branch 6 times, most recently from a7eb346 to fb17e94 Compare December 14, 2024 17:20
Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Co-authored-by: Omer Azmon <omer_azmon@intuit.com>
Co-authored-by: daengdaengLee <gunho1020@gmail.com>
Co-authored-by: Juwon Hwang (Kevin) <juwon8891@gmail.com>
Co-authored-by: thisishwan2 <feel000617@gmail.com>
Co-authored-by: mirageoasis <kimhw0820@naver.com>
Co-authored-by: Robin Lieb <robin.j.lieb@gmail.com>
Co-authored-by: miiiinju1 <gms07073@ynu.ac.kr>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

fix(codegen): use kube_codegen.sh deepcopy and client gen correctly

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

deepcopy gen

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Co-authored-by: Omer Azmon <omer_azmon@intuit.com>
Co-authored-by: daengdaengLee <gunho1020@gmail.com>
Co-authored-by: Juwon Hwang (Kevin) <juwon8891@gmail.com>
Co-authored-by: thisishwan2 <feel000617@gmail.com>
Co-authored-by: mirageoasis <kimhw0820@naver.com>
Co-authored-by: Robin Lieb <robin.j.lieb@gmail.com>
Co-authored-by: miiiinju1 <gms07073@ynu.ac.kr>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

go mod tidy

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

one test file for both implementations

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

simplify

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

fix test for linux

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

fix git client mock

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

fix git client mock

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

address comments

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

unit tests

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

lint

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

fix image, fix health checks, fix merge issue

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

fix lint issues

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

remove code that doesn't work for GHE

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

changes from comments

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Co-authored-by: Omer Azmon <omer_azmon@intuit.com>
Co-authored-by: daengdaengLee <gunho1020@gmail.com>
Co-authored-by: Juwon Hwang (Kevin) <juwon8891@gmail.com>
Co-authored-by: thisishwan2 <feel000617@gmail.com>
Co-authored-by: mirageoasis <kimhw0820@naver.com>
Co-authored-by: Robin Lieb <robin.j.lieb@gmail.com>
Co-authored-by: miiiinju1 <gms07073@ynu.ac.kr>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

feat(hydrator): enable controller

Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Co-authored-by: Omer Azmon <omer_azmon@intuit.com>
Co-authored-by: daengdaengLee <gunho1020@gmail.com>
Co-authored-by: Juwon Hwang (Kevin) <juwon8891@gmail.com>
Co-authored-by: thisishwan2 <feel000617@gmail.com>
Co-authored-by: mirageoasis <kimhw0820@naver.com>
Co-authored-by: Robin Lieb <robin.j.lieb@gmail.com>
Co-authored-by: miiiinju1 <gms07073@ynu.ac.kr>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

allow opt-in

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

separation between app controller and hydrator

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

simplify diff

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

todos

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

simplify

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

add dry sha to logs

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

add app name to logs

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

more logging, no caching

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

fix cluster install

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

don't interrupt an ongoing hydrate operation

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

revert hydrate loop fix

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

handle project-scoped repo creds

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

codegen

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

improve docs

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

fixes from comments

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
@crenshaw-dev crenshaw-dev force-pushed the hydrator-ui branch 4 times, most recently from c383504 to c234bba Compare December 14, 2024 20:33
@crenshaw-dev crenshaw-dev marked this pull request as ready for review December 14, 2024 20:54
@crenshaw-dev crenshaw-dev requested review from a team as code owners December 14, 2024 20:54
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

fix manifests

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

improve docs

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Co-authored-by: Omer Azmon <omer_azmon@intuit.com>
Co-authored-by: daengdaengLee <gunho1020@gmail.com>
Co-authored-by: Juwon Hwang (Kevin) <juwon8891@gmail.com>
Co-authored-by: thisishwan2 <feel000617@gmail.com>
Co-authored-by: mirageoasis <kimhw0820@naver.com>
Co-authored-by: Robin Lieb <robin.j.lieb@gmail.com>
Co-authored-by: miiiinju1 <gms07073@ynu.ac.kr>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

feat(hydrator): enable controller

Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Co-authored-by: Omer Azmon <omer_azmon@intuit.com>
Co-authored-by: daengdaengLee <gunho1020@gmail.com>
Co-authored-by: Juwon Hwang (Kevin) <juwon8891@gmail.com>
Co-authored-by: thisishwan2 <feel000617@gmail.com>
Co-authored-by: mirageoasis <kimhw0820@naver.com>
Co-authored-by: Robin Lieb <robin.j.lieb@gmail.com>
Co-authored-by: miiiinju1 <gms07073@ynu.ac.kr>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

allow opt-in

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

separation between app controller and hydrator

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

simplify diff

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

todos

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

simplify

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

add dry sha to logs

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

add app name to logs

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

more logging, no caching

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

fix cluster install

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

don't interrupt an ongoing hydrate operation

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

revert hydrate loop fix

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

handle project-scoped repo creds

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

codegen

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

improve docs

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

fixes from comments

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Co-authored-by: Omer Azmon <omer_azmon@intuit.com>
Co-authored-by: daengdaengLee <gunho1020@gmail.com>
Co-authored-by: Juwon Hwang (Kevin) <juwon8891@gmail.com>
Co-authored-by: thisishwan2 <feel000617@gmail.com>
Co-authored-by: mirageoasis <kimhw0820@naver.com>
Co-authored-by: Robin Lieb <robin.j.lieb@gmail.com>
Co-authored-by: miiiinju1 <gms07073@ynu.ac.kr>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

fix(codegen): use kube_codegen.sh deepcopy and client gen correctly

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

deepcopy gen

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Co-authored-by: Omer Azmon <omer_azmon@intuit.com>
Co-authored-by: daengdaengLee <gunho1020@gmail.com>
Co-authored-by: Juwon Hwang (Kevin) <juwon8891@gmail.com>
Co-authored-by: thisishwan2 <feel000617@gmail.com>
Co-authored-by: mirageoasis <kimhw0820@naver.com>
Co-authored-by: Robin Lieb <robin.j.lieb@gmail.com>
Co-authored-by: miiiinju1 <gms07073@ynu.ac.kr>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

feat(hydrator): enable controller

Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Co-authored-by: Omer Azmon <omer_azmon@intuit.com>
Co-authored-by: daengdaengLee <gunho1020@gmail.com>
Co-authored-by: Juwon Hwang (Kevin) <juwon8891@gmail.com>
Co-authored-by: thisishwan2 <feel000617@gmail.com>
Co-authored-by: mirageoasis <kimhw0820@naver.com>
Co-authored-by: Robin Lieb <robin.j.lieb@gmail.com>
Co-authored-by: miiiinju1 <gms07073@ynu.ac.kr>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

allow opt-in

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

separation between app controller and hydrator

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

simplify diff

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

todos

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

simplify

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

add dry sha to logs

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

add app name to logs

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

more logging, no caching

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

fix cluster install

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

don't interrupt an ongoing hydrate operation

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

revert hydrate loop fix

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

handle project-scoped repo creds

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

codegen

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Co-authored-by: Omer Azmon <omer_azmon@intuit.com>
Co-authored-by: daengdaengLee <gunho1020@gmail.com>
Co-authored-by: Juwon Hwang (Kevin) <juwon8891@gmail.com>
Co-authored-by: thisishwan2 <feel000617@gmail.com>
Co-authored-by: mirageoasis <kimhw0820@naver.com>
Co-authored-by: Robin Lieb <robin.j.lieb@gmail.com>
Co-authored-by: miiiinju1 <gms07073@ynu.ac.kr>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

feat(hydrator): enable controller

Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Co-authored-by: Omer Azmon <omer_azmon@intuit.com>
Co-authored-by: daengdaengLee <gunho1020@gmail.com>
Co-authored-by: Juwon Hwang (Kevin) <juwon8891@gmail.com>
Co-authored-by: thisishwan2 <feel000617@gmail.com>
Co-authored-by: mirageoasis <kimhw0820@naver.com>
Co-authored-by: Robin Lieb <robin.j.lieb@gmail.com>
Co-authored-by: miiiinju1 <gms07073@ynu.ac.kr>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

allow opt-in

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

separation between app controller and hydrator

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

simplify diff

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

todos

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

simplify

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

add dry sha to logs

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

add app name to logs

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

more logging, no caching

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

fix cluster install

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

don't interrupt an ongoing hydrate operation

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

revert hydrate loop fix

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

feat(hydrator): write credentials handling + UI

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

WIP: add new APIs for write creds

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

write api and template api

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

fix time function

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

fix lint issues

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

don't enrich with read creds

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

revert tls change

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

don't disable buttons in UI

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

ask repo server for specific revision

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

fixes

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

lint ui

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

remove unnecessary change

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

fix test and lint

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

lint

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

enable hydrator for e2e tests

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

don't free disk space

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Copy link

codecov bot commented Dec 16, 2024

Codecov Report

Attention: Patch coverage is 61.33231% with 505 lines in your changes missing coverage. Please review.

Please upload report for BASE (master@030a7be). Learn more about missing BASE report.
Report is 18 commits behind head on master.

Files with missing lines Patch % Lines
server/repository/repository.go 12.50% 139 Missing and 1 partial ⚠️
controller/hydrator/hydrator.go 73.27% 48 Missing and 18 partials ⚠️
server/repocreds/repocreds.go 0.00% 61 Missing ⚠️
commitserver/commit/hydratorhelper.go 47.95% 34 Missing and 17 partials ⚠️
commitserver/commit/commit.go 73.52% 25 Missing and 11 partials ⚠️
controller/state.go 32.55% 29 Missing ⚠️
controller/appcontroller.go 66.66% 19 Missing and 7 partials ⚠️
pkg/apis/application/v1alpha1/repository_types.go 0.00% 23 Missing ⚠️
...ocd-commit-server/commands/argocd_commit_server.go 75.64% 18 Missing and 1 partial ⚠️
pkg/apis/application/v1alpha1/types.go 80.00% 9 Missing and 3 partials ⚠️
... and 11 more
Additional details and impacted files
@@            Coverage Diff            @@
##             master   #20345   +/-   ##
=========================================
  Coverage          ?   55.16%           
=========================================
  Files             ?      338           
  Lines             ?    57194           
  Branches          ?        0           
=========================================
  Hits              ?    31552           
  Misses            ?    22937           
  Partials          ?     2705           

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

controller/appcontroller.go Show resolved Hide resolved
controller/appcontroller.go Show resolved Hide resolved
Procfile Show resolved Hide resolved
cmd/argocd/commands/app.go Show resolved Hide resolved
cmd/argocd/commands/app.go Outdated Show resolved Hide resolved
controller/log_utils.go Outdated Show resolved Hide resolved
controller/state.go Outdated Show resolved Hide resolved
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Copy link
Collaborator

@leoluz leoluz left a comment

Choose a reason for hiding this comment

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

LGTM

@crenshaw-dev crenshaw-dev merged commit 433b317 into master Dec 16, 2024
31 of 32 checks passed
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