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
chore: improve error logs #10944
chore: improve error logs #10944
Conversation
Codecov ReportBase: 45.83% // Head: 45.65% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #10944 +/- ##
==========================================
- Coverage 45.83% 45.65% -0.19%
==========================================
Files 237 237
Lines 28720 28728 +8
==========================================
- Hits 13165 13115 -50
- Misses 13742 13809 +67
+ Partials 1813 1804 -9
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@crenshaw-dev please review. Thanks. |
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com> Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>
Signed-off-by: wujunwei <wjw3323@live.com> Signed-off-by: wujunwei <wjw3323@live.com> Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>
* Adding bcrypt support for argocd CLI Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com> * Fixing linter issues Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com> * Nesting bcrypt under account instead of admin Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com> * Removing admin bcrypt docs Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com> * Update docs/faq.md Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: Amey Totawar <ameytotawar@gmail.com> Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com> Signed-off-by: Amey Totawar <ameytotawar@gmail.com> Co-authored-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>
* consolidate checksums into one file Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> * sign container images Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> * sign container images Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> * remove id-token permissions Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> Signed-off-by: Smriti Prakash <smriti_prakash@intuit.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> Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>
Signed-off-by: Ryan Talbot <ryan-talbot@outlook.com> Signed-off-by: Ryan Talbot <ryan-talbot@outlook.com> Signed-off-by: Smriti Prakash <smriti_prakash@intuit.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> Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>
Signed-off-by: Niharika <ns8gupta@gmail.com> Signed-off-by: Niharika <niharika_sahai@intuit.com> Signed-off-by: Niharika <ns8gupta@gmail.com> Signed-off-by: Niharika <niharika_sahai@intuit.com> Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com> Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>
Signed-off-by: CI <ci@argoproj.com> Signed-off-by: CI <ci@argoproj.com> Co-authored-by: CI <ci@argoproj.com> Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>
#10961) Signed-off-by: toVersus <toversus2357@gmail.com> Signed-off-by: toVersus <toversus2357@gmail.com> Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>
Signed-off-by: Shawn Toffel <shawn.toffel@gmail.com> Signed-off-by: Shawn Toffel <shawn.toffel@gmail.com> Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wording and format tweaks. Thanks!
cmd/argocd/commands/admin/app.go
Outdated
@@ -292,11 +292,11 @@ func saveToFile(err error, outputFormat string, result reconcileResults, outputP | |||
switch outputFormat { | |||
case "yaml": | |||
if data, err = yaml.Marshal(result); err != nil { | |||
return err | |||
return fmt.Errorf("error marshalling yaml file %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return fmt.Errorf("error marshalling yaml file %w", err) | |
return fmt.Errorf("error marshalling yaml: %w", err) |
cmd/argocd/commands/admin/app.go
Outdated
} | ||
case "json": | ||
if data, err = json.Marshal(result); err != nil { | ||
return err | ||
return fmt.Errorf("error marshalling json file %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return fmt.Errorf("error marshalling json file %w", err) | |
return fmt.Errorf("error marshalling json: %w", err) |
@@ -43,7 +43,7 @@ func PrintResources(output string, out io.Writer, resources ...interface{}) erro | |||
} | |||
filteredResource, err := omitFields(resource) | |||
if err != nil { | |||
return err | |||
return fmt.Errorf("error printing the resource %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return fmt.Errorf("error printing the resource %w", err) | |
return fmt.Errorf("error omitting filtered fields from the resource: %w", err) |
@@ -56,14 +56,14 @@ func PrintResources(output string, out io.Writer, resources ...interface{}) erro | |||
case "json": | |||
jsonBytes, err := json.MarshalIndent(obj, "", " ") | |||
if err != nil { | |||
return err | |||
return fmt.Errorf("error printing the json file %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return fmt.Errorf("error printing the json file %w", err) | |
return fmt.Errorf("error marshaling json: %w", err) |
} | ||
|
||
_, _ = fmt.Fprintln(out, string(jsonBytes)) | ||
case "yaml": | ||
yamlBytes, err := yaml.Marshal(obj) | ||
if err != nil { | ||
return err | ||
return fmt.Errorf("error printing the yaml file %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return fmt.Errorf("error printing the yaml file %w", err) | |
return fmt.Errorf("error marshaling yaml: %w", err) |
cmd/util/applicationset.go
Outdated
@@ -40,7 +40,7 @@ func readAppsetFromURI(fileURL string, appset *[]*argoprojiov1alpha1.Application | |||
|
|||
yml, err := readFilePayload() | |||
if err != nil { | |||
return err | |||
return fmt.Errorf("error reading file payload %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return fmt.Errorf("error reading file payload %w", err) | |
return fmt.Errorf("error reading file payload: %w", err) |
cmd/util/applicationset.go
Outdated
@@ -49,18 +49,18 @@ func readAppsetFromURI(fileURL string, appset *[]*argoprojiov1alpha1.Application | |||
func readAppset(yml []byte, appsets *[]*argoprojiov1alpha1.ApplicationSet) error { | |||
yamls, err := kube.SplitYAMLToString(yml) | |||
if err != nil { | |||
return err | |||
return fmt.Errorf("error splitting YAML to string %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return fmt.Errorf("error splitting YAML to string %w", err) | |
return fmt.Errorf("error splitting YAML to string: %w", err) |
cmd/util/applicationset.go
Outdated
} | ||
|
||
for _, yml := range yamls { | ||
var appset argoprojiov1alpha1.ApplicationSet | ||
err = config.Unmarshal([]byte(yml), &appset) | ||
if err != nil { | ||
return err | ||
return fmt.Errorf("error unmarshalling appset %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return fmt.Errorf("error unmarshalling appset %w", err) | |
return fmt.Errorf("error unmarshalling appset: %w", err) |
cmd/util/applicationset.go
Outdated
} | ||
*appsets = append(*appsets, &appset) | ||
|
||
} | ||
|
||
return err | ||
return fmt.Errorf("error reading app set %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return fmt.Errorf("error reading app set %w", err) | |
return fmt.Errorf("error reading app set: %w", err) |
controller/clusterinfoupdater.go
Outdated
@@ -93,7 +93,7 @@ func (c *clusterInfoUpdater) updateClusters() { | |||
func (c *clusterInfoUpdater) updateClusterInfo(cluster appv1.Cluster, info *cache.ClusterInfo) error { | |||
apps, err := c.appLister.List(labels.Everything()) | |||
if err != nil { | |||
return err | |||
return fmt.Errorf("error while fetching the apps list %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return fmt.Errorf("error while fetching the apps list %w", err) | |
return fmt.Errorf("error while fetching the apps list: %w", err) |
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks @smriti0710!
* fix: Resource list loading slowly due to Sync Wave sorting (argoproj#10932) Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com> Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com> * chore: fix wrong annotation in function (argoproj#10923) Signed-off-by: wujunwei <wjw3323@live.com> Signed-off-by: wujunwei <wjw3323@live.com> Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com> * feat: add bcrypt support for argocd CLI (argoproj#10934) * Adding bcrypt support for argocd CLI Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com> * Fixing linter issues Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com> * Nesting bcrypt under account instead of admin Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com> * Removing admin bcrypt docs Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com> * Update docs/faq.md Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: Amey Totawar <ameytotawar@gmail.com> Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com> Signed-off-by: Amey Totawar <ameytotawar@gmail.com> Co-authored-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com> * chore: improve error logs Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com> * chore: improve error logs Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com> * chore: implement signed images (argoproj#10925) * consolidate checksums into one file Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> * sign container images Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> * sign container images Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> * remove id-token permissions Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com> * chore: delete old snyk reports (argoproj#10938) 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: Smriti Prakash <smriti_prakash@intuit.com> * chore: rewording of misleading message (argoproj#10407) Signed-off-by: Ryan Talbot <ryan-talbot@outlook.com> Signed-off-by: Ryan Talbot <ryan-talbot@outlook.com> Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com> * chore: delete old snyk reports, 2nd attempt (argoproj#10950) 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: Smriti Prakash <smriti_prakash@intuit.com> * chore: wrap error objects to include context (argoproj#10592) (argoproj#10940) Signed-off-by: Niharika <ns8gupta@gmail.com> Signed-off-by: Niharika <niharika_sahai@intuit.com> Signed-off-by: Niharika <ns8gupta@gmail.com> Signed-off-by: Niharika <niharika_sahai@intuit.com> Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com> * fix: Use os.PathSeparator instead of hard-coded string to resolve local file paths (argoproj#10945) (argoproj#10946) fix: Use os.PathSeparator instead of hard-coded string to resolve local file paths (argoproj#10945) (argoproj#10946) Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com> * chore: improve error logs Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com> * chore: covered error log in controllers Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com> Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com> * chore: sign checksums file for release binaries (argoproj#10963) Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com> * [Bot] Update Snyk reports (argoproj#10953) Signed-off-by: CI <ci@argoproj.com> Signed-off-by: CI <ci@argoproj.com> Co-authored-by: CI <ci@argoproj.com> Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com> * feat: make applicationset controller configurable in argocd-cmd-params (argoproj#10961) Signed-off-by: toVersus <toversus2357@gmail.com> Signed-off-by: toVersus <toversus2357@gmail.com> Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com> * docs: message is no longer truncated (argoproj#10962) Signed-off-by: Shawn Toffel <shawn.toffel@gmail.com> Signed-off-by: Shawn Toffel <shawn.toffel@gmail.com> Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com> * fix: addressed review comments Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com> Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com> Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com> Signed-off-by: wujunwei <wjw3323@live.com> Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com> Signed-off-by: Amey Totawar <ameytotawar@gmail.com> Signed-off-by: Justin Marquis <34fathombelow@protonmail.com> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: Ryan Talbot <ryan-talbot@outlook.com> Signed-off-by: Niharika <ns8gupta@gmail.com> Signed-off-by: Niharika <niharika_sahai@intuit.com> Signed-off-by: CI <ci@argoproj.com> Signed-off-by: toVersus <toversus2357@gmail.com> Signed-off-by: Shawn Toffel <shawn.toffel@gmail.com> Co-authored-by: Alexander Matyushentsev <AMatyushentsev@gmail.com> Co-authored-by: Adam <wjw3323@live.com> Co-authored-by: Amey Totawar <ameytotawar@gmail.com> Co-authored-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: Smriti Prakash <smriti_prakash@intuit.com> Co-authored-by: 34FathomBelow <34fathombelow@protonmail.com> Co-authored-by: Ryan Talbot <4523072+RyanTalbot@users.noreply.github.com> Co-authored-by: nsahai8 <ns8gupta@gmail.com> Co-authored-by: Chris Davis <chris@codeflow.org.uk> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: CI <ci@argoproj.com> Co-authored-by: Tsubasa Nagasawa <toversus2357@gmail.com> Co-authored-by: Shawn Toffel <shawn.toffel+github@gmail.com> Signed-off-by: Nicholas Johnson <nbjohnson10@gmail.com>
Note on DCO:
This PR is related to this issue #10592