Skip to content

Commit

Permalink
Merge pull request #68 from puzzle/logging
Browse files Browse the repository at this point in the history
Logging
  • Loading branch information
schlapzz authored Dec 30, 2023
2 parents 5124d22 + 44de1b3 commit 22c1727
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 7 deletions.
9 changes: 9 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [

{
"name": "Split",
"type": "go",
Expand All @@ -12,6 +13,14 @@
"program": "main.go",
"args": ["split", "/home/schlatter/tmp/argo-apps/out/all.yaml", "--output-dir=out/split"]
},
{
"name": "Issue 67",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "main.go",
"args": ["argocd","app","./foo/bar","--repo-server=localhost:8081","--output-dir=/tmp/source/"]
},
{
"name": "ArgoCD",
"type": "go",
Expand Down
2 changes: 1 addition & 1 deletion argocd/appSet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ OUTER:
continue OUTER
}
}
t.Errorf("no matching file found for: %s", e.Name())
t.Errorf("no matching file found for: %s", e.Name())
}
}
4 changes: 2 additions & 2 deletions argocd/repoClient.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ func Render(dir, repoServerUrl, outputDir string, creds RepoCredentails) error {

var lastErr error
for _, file := range files {
log.Debugf("processing ArgoCD Application at: %s", file)
log.Debugf("processing ArgoCD Application: %s", file)
err = renderFile(file, repoServerUrl, outputDir, client, creds)
if err != nil {
log.Errorf("could not render argoCD Application: %v", err)
log.Errorf("could not render ArgoCD Application: %v", err)
lastErr = err
}
}
Expand Down
1 change: 0 additions & 1 deletion argocd/repoClient_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package argocd
import "testing"

func TestRender(t *testing.T) {
//deactivate until https://github.com/dagger/dagger/issues/5382 is fixed
err := Render("../testdata/argocd/helm_app.yaml", "reposerver:8081", "../out/argocd/app/", RepoCredentails{})
if err != nil {
t.Error(err)
Expand Down
2 changes: 2 additions & 0 deletions error.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
┃ panic: input:1: container.from.withMountedCache.withMountedCache.withWorkdir.withExec.withExec.withDirectory.withExec.withDirectory.withServiceBindin
┃ g.withExec.sync start L8N20DJ2O3M6M (aliased as reposerver): health check errored: exit code: 1
6 changes: 4 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/puzzle/goff

go 1.20
go 1.21

toolchain go1.21.3

require (
github.com/pkg/errors v0.9.1
Expand Down Expand Up @@ -65,7 +67,7 @@ require (

require (
cloud.google.com/go/compute v1.14.0 // indirect
dagger.io/dagger v0.9.2
dagger.io/dagger v0.9.5
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd // indirect
github.com/Masterminds/semver/v3 v3.2.0 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ code.gitea.io/sdk/gitea v0.15.1 h1:WJreC7YYuxbn0UDaPuWIe/mtiNKTvLN8MLkaw71yx/M=
code.gitea.io/sdk/gitea v0.15.1/go.mod h1:klY2LVI3s3NChzIk/MzMn7G1FHrfU7qd63iSMVoHRBA=
dagger.io/dagger v0.9.2 h1:BE1l1MpX4Slay9kUx5NddL9NRDnFDVLY9kw3w7LWqN8=
dagger.io/dagger v0.9.2/go.mod h1:Nm6DnabJ6px/8AZByAr4y9C3+QQwGoIqopOnytcn368=
dagger.io/dagger v0.9.5 h1:44ypKgOjKZKrzqHSoa/wIfqnrSZM87tuoAKJpo5tGV4=
dagger.io/dagger v0.9.5/go.mod h1:ic2UD6gS5iBp2e6VWPxyb7h6VpAyhFN6U7/TDlriox8=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20201218220906-28db891af037/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/99designs/gqlgen v0.17.31 h1:VncSQ82VxieHkea8tz11p7h/zSbvHSxSDZfywqWt158=
Expand Down
2 changes: 1 addition & 1 deletion local.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ export REGISTRY_PASSWORD=bar
export REGISTRY_URL=ttl.sh
export REGISTRY_USER=foo
export OTEL_EXPORTER_JAEGER_ENDPOINT=http://localhost:14268/api/traces
export OTEL_RESOURCE_ATTRIBUTES="commit=SHA111,group=puzzle,project=goff,job=123,pipeline=local"
export OTEL_RESOURCE_ATTRIBUTES="commit=SHA111,group=puzzle,project=goff,job=123,pipeline=local"

0 comments on commit 22c1727

Please sign in to comment.