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

codereview #1

Draft
wants to merge 213 commits into
base: main
Choose a base branch
from
Draft

codereview #1

wants to merge 213 commits into from

Conversation

stefanmcshane
Copy link
Owner

No description provided.

@stefanmcshane stefanmcshane changed the base branch from main to v3/main October 20, 2022 02:20
// Client argocdclient.
}

func NewArgoCDClient() (ArgoCD, error) {
Copy link
Owner Author

Choose a reason for hiding this comment

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

Catchall function for now, which would be broken up into:

  • NewArgoCDClient() which takes the config required as a param and returns the client
  • Convenience functions for reading whatever data we need from the ArgoCD server

Copy link
Contributor

@abelanger5 abelanger5 left a comment

Choose a reason for hiding this comment

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

This is awesome 💯

Left some minor comments for the moment where I noticed inconsistencies with how we're doing things elsewhere.

We'll definitely need some overall consolidation in the rest of the agent code (more explicitly naming of consumers/producers).

pkg/controllers/argocd_resource_hook_consumer.go Outdated Show resolved Hide resolved
pkg/controllers/argocd_resource_hook_consumer.go Outdated Show resolved Hide resolved
pkg/controllers/argocd_resource_hook_consumer.go Outdated Show resolved Hide resolved
}

err := h.ArgoCDResourceConsumer.Consume(r.Context(), req)
if err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

We use the apierrors package from porter to ensure consistent logging/formatting of internal errors -- see here for reference.

@stefanmcshane stefanmcshane changed the base branch from v3/main to main October 24, 2022 14:14
@stefanmcshane
Copy link
Owner Author

stefanmcshane commented Oct 24, 2022

TODO:

  • Enable auto-sync on any requests
  • Disable auto-sync on any rollback requests

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.

4 participants