Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feature/fix-docker-co…
Browse files Browse the repository at this point in the history
…mpose-for-apple-silicon
  • Loading branch information
havardelnan committed Jan 13, 2025
2 parents 9db43c0 + 8f64bba commit 04cccc1
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 152 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/test-and-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
branches:
- main
paths-ignore:
paths:
- 'pkg/**'
jobs:
build-app:
Expand All @@ -21,6 +21,11 @@ jobs:
run: |
echo running generator...
go run cmd/generator/main.go
git diff --exit-code --numstat pkg/
if [ $? -ne 0 ]; then
echo "Generator generated new files, please run the generator locally and commit the changes"
exit 1
fi
- name: Test
run: |
echo testing...
Expand Down
2 changes: 1 addition & 1 deletion pkg/rorresources/fromstruct.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func NewResourceFromStruct(res Resource) *Resource {
r.SetCommonInterface(res.NetworkPolicyResource)

default:
rlog.Warn("Unknown resource kind", rlog.String("gvk", gvk.String()), rlog.String("kind", res.Kind), rlog.String("apiVersion", res.APIVersion))
rlog.Info("Unknown resource kind", rlog.String("gvk", gvk.String()), rlog.String("kind", res.Kind), rlog.String("apiVersion", res.APIVersion))
return nil
}
return r
Expand Down
1 change: 1 addition & 0 deletions pkg/rorresources/fromstruct.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func NewResourceFromStruct(res Resource) *Resource {
{{end}}
default:
rlog.Info("Unknown resource kind", rlog.String("gvk", gvk.String()), rlog.String("kind", res.Kind), rlog.String("apiVersion", res.APIVersion))
return nil
}
return r
}
3 changes: 3 additions & 0 deletions pkg/rorresources/resourceset.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ func (r *ResourceSet) Get() *Resource {
rlog.Error("ResourceSet.Get() cursor out of bounds", nil)
return nil
}
if r.Resources == nil {
return nil
}
return r.Resources[cursor]
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/rorresources/rorkubernetes/k8s.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func NewResourceFromDynamicClient(input *unstructured.Unstructured) *rorresource

default:
rlog.Warn("could not create ResourceSet")
return r
return nil
}
return r
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/rorresources/rorkubernetes/k8s.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func NewResourceFromDynamicClient(input *unstructured.Unstructured) *rorresource
{{end}}
default:
rlog.Warn("could not create ResourceSet")
return r
return nil
}
return r
}
Expand Down
Loading

0 comments on commit 04cccc1

Please sign in to comment.