Skip to content

Commit

Permalink
Update depgaurd rules to prevent logrus from being imported in e
Browse files Browse the repository at this point in the history
The teleport.e repo was recently converted to log exclusively with
slog. In order to prevent logrus from accidentally being reintroduced
into teleport.e the logrus depguard rule was updated to include
the e repo. Additionally the e_imports.go file was updated to reflect
that logrus is no longer required.
  • Loading branch information
rosstimothy committed Oct 25, 2024
1 parent 399c16a commit 3ab89b3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,12 @@ linters-settings:
desc: 'use "golang.org/x/mod/semver" or "coreos/go-semver/semver" instead'
- pkg: github.com/microsoftgraph/msgraph-sdk-go
desc: 'use "github.com/gravitational/teleport/lib/msgraph" instead'
# Prevent logrus from being imported by api. Once everything in teleport has been converted
# Prevent logrus from being imported by api and e. Once everything in teleport has been converted
# to use log/slog this should be moved into the main block above.
logrus:
files:
- '**/api/**'
- '**/e/**'
deny:
- pkg: github.com/sirupsen/logrus
desc: 'use "log/slog" instead'
Expand Down
2 changes: 1 addition & 1 deletion e
Submodule e updated from 9af43d to fc67d2
9 changes: 3 additions & 6 deletions e_imports.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,16 @@ import (
_ "github.com/aws/aws-sdk-go-v2/service/athena"
_ "github.com/aws/aws-sdk-go-v2/service/athena/types"
_ "github.com/aws/aws-sdk-go-v2/service/glue"
_ "github.com/aws/aws-sdk-go-v2/service/identitystore"
_ "github.com/aws/aws-sdk-go-v2/service/organizations"
_ "github.com/aws/aws-sdk-go-v2/service/s3"
_ "github.com/aws/aws-sdk-go-v2/service/ssoadmin"
_ "github.com/aws/aws-sdk-go-v2/service/sts"
_ "github.com/aws/aws-sdk-go-v2/service/sts/types"
_ "github.com/beevik/etree"
_ "github.com/cloudflare/cfssl/csr"
_ "github.com/coreos/go-oidc/jose"
_ "github.com/coreos/go-oidc/oauth2"
_ "github.com/coreos/go-oidc/oidc"
_ "github.com/coreos/go-semver/semver"
_ "github.com/crewjam/saml"
_ "github.com/crewjam/saml/logger"
_ "github.com/crewjam/saml/samlsp"
_ "github.com/elimity-com/scim/schema"
_ "github.com/ghodss/yaml"
Expand All @@ -83,6 +80,8 @@ import (
_ "github.com/google/safetext/shsprintf"
_ "github.com/google/uuid"
_ "github.com/gravitational/license"
_ "github.com/gravitational/license/authority"
_ "github.com/gravitational/license/constants"
_ "github.com/gravitational/license/generate"
_ "github.com/gravitational/roundtrip"
_ "github.com/gravitational/trace"
Expand All @@ -105,7 +104,6 @@ import (
_ "github.com/russellhaering/goxmldsig"
_ "github.com/scim2/filter-parser/v2"
_ "github.com/sijms/go-ora/v2"
_ "github.com/sirupsen/logrus"
_ "github.com/stretchr/testify/assert"
_ "github.com/stretchr/testify/mock"
_ "github.com/stretchr/testify/require"
Expand All @@ -116,7 +114,6 @@ import (
_ "golang.org/x/crypto/bcrypt"
_ "golang.org/x/crypto/ssh"
_ "golang.org/x/crypto/ssh/agent"
_ "golang.org/x/exp/maps"
_ "golang.org/x/mod/semver"
_ "golang.org/x/net/html"
_ "golang.org/x/net/http/httpproxy"
Expand Down

0 comments on commit 3ab89b3

Please sign in to comment.