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 8971f94
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 18 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
5 changes: 1 addition & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,14 @@ require (
github.com/aws/aws-sdk-go-v2/service/eks v1.49.3
github.com/aws/aws-sdk-go-v2/service/glue v1.99.2
github.com/aws/aws-sdk-go-v2/service/iam v1.36.3
github.com/aws/aws-sdk-go-v2/service/identitystore v1.27.2
github.com/aws/aws-sdk-go-v2/service/kms v1.36.3
github.com/aws/aws-sdk-go-v2/service/organizations v1.34.2
github.com/aws/aws-sdk-go-v2/service/rds v1.85.2
github.com/aws/aws-sdk-go-v2/service/redshift v1.47.3
github.com/aws/aws-sdk-go-v2/service/s3 v1.63.3
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.33.3
github.com/aws/aws-sdk-go-v2/service/sns v1.32.3
github.com/aws/aws-sdk-go-v2/service/sqs v1.35.3
github.com/aws/aws-sdk-go-v2/service/ssm v1.54.3
github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.29.2
github.com/aws/aws-sdk-go-v2/service/sts v1.31.3
github.com/aws/aws-sigv4-auth-cassandra-gocql-driver-plugin v1.1.0
github.com/aws/smithy-go v1.22.0
Expand All @@ -79,6 +76,7 @@ require (
github.com/charmbracelet/bubbles v0.20.0
github.com/charmbracelet/bubbletea v1.1.0
github.com/charmbracelet/lipgloss v0.13.0
github.com/cloudflare/cfssl v1.6.4
github.com/coreos/go-oidc v2.2.1+incompatible // replaced
github.com/coreos/go-semver v0.3.1
github.com/creack/pty v1.1.23
Expand Down Expand Up @@ -289,7 +287,6 @@ require (
github.com/chai2010/gettext-go v1.0.2 // indirect
github.com/charmbracelet/x/ansi v0.2.3 // indirect
github.com/charmbracelet/x/term v0.2.0 // indirect
github.com/cloudflare/cfssl v1.6.4 // indirect
github.com/cncf/xds/go v0.0.0-20240822171458-6449f94b4d59 // indirect
github.com/containerd/containerd v1.7.18 // indirect
github.com/containerd/errdefs v0.1.0 // indirect
Expand Down
6 changes: 0 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -889,8 +889,6 @@ github.com/aws/aws-sdk-go-v2/service/glue v1.99.2 h1:pfX1qky3shRS3rgxkdXKtiNWtMU
github.com/aws/aws-sdk-go-v2/service/glue v1.99.2/go.mod h1:rCyUHLWGaSR9/oQgj2nGKRmPqFwtq3qxL14LkuQdadA=
github.com/aws/aws-sdk-go-v2/service/iam v1.36.3 h1:dV9iimLEHKYAz2qTi+tGAD9QCnAG2pLD7HUEHB7m4mI=
github.com/aws/aws-sdk-go-v2/service/iam v1.36.3/go.mod h1:HSvujsK8xeEHMIB18oMXjSfqaN9cVqpo/MtHJIksQRk=
github.com/aws/aws-sdk-go-v2/service/identitystore v1.27.2 h1:QSrf6HsounqUtlFAwArhVNHPt3WXmSm0pz7RtojjBdo=
github.com/aws/aws-sdk-go-v2/service/identitystore v1.27.2/go.mod h1:PtkL4CXOQy84zudggyFtyJFXCGDRY8igg9Nfo9df1sU=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 h1:QFASJGfT8wMXtuP3D5CRmMjARHv9ZmzFUMJznHDOY3w=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5/go.mod h1:QdZ3OmoIjSX+8D1OPAzPxDfjXASbBMDsz9qvtyIhtik=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.20 h1:rTWjG6AvWekO2B1LHeM3ktU7MqyX9rzWQ7hgzneZW7E=
Expand All @@ -904,8 +902,6 @@ github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.18 h1:eb+tFOIl9ZsUe
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.18/go.mod h1:GVCC2IJNJTmdlyEsSmofEy7EfJncP7DNnXDzRjJ5Keg=
github.com/aws/aws-sdk-go-v2/service/kms v1.36.3 h1:iHi6lC6LfW6SNvB2bixmlOW3WMyWFrHZCWX+P+CCxMk=
github.com/aws/aws-sdk-go-v2/service/kms v1.36.3/go.mod h1:OHmlX4+o0XIlJAQGAHPIy0N9yZcYS/vNG+T7geSNcFw=
github.com/aws/aws-sdk-go-v2/service/organizations v1.34.2 h1:ndH1E8olS/rDB+tiUMKj09g0o11PoOLAC+xRFB13bJw=
github.com/aws/aws-sdk-go-v2/service/organizations v1.34.2/go.mod h1:YZvv/wXIgIviYq9P/fQDhoMlzlI89M0D45GnYvIorLk=
github.com/aws/aws-sdk-go-v2/service/rds v1.85.2 h1:KDO/FSO8V+zlvnQF6v4nOariw2qwPx5/z2pyb6X7ibk=
github.com/aws/aws-sdk-go-v2/service/rds v1.85.2/go.mod h1:lhiPj6RvoJHWG2STp+k5az55YqGgFLBzkKYdYHgUh9g=
github.com/aws/aws-sdk-go-v2/service/redshift v1.47.3 h1:TRJP6RflPN5A4yRpyXgznsJTJMT46tKigNAKzd7owic=
Expand All @@ -923,8 +919,6 @@ github.com/aws/aws-sdk-go-v2/service/ssm v1.54.3/go.mod h1:qs3TBNpFEnVubl0WL3jru
github.com/aws/aws-sdk-go-v2/service/sso v1.12.10/go.mod h1:ouy2P4z6sJN70fR3ka3wD3Ro3KezSxU6eKGQI2+2fjI=
github.com/aws/aws-sdk-go-v2/service/sso v1.23.3 h1:rs4JCczF805+FDv2tRhZ1NU0RB2H6ryAvsWPanAr72Y=
github.com/aws/aws-sdk-go-v2/service/sso v1.23.3/go.mod h1:XRlMvmad0ZNL+75C5FYdMvbbLkd6qiqz6foR1nA1PXY=
github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.29.2 h1:O6MhOmqKN1dSmc04jaxmfdmSb3UbeQ715SYdVzNBiL4=
github.com/aws/aws-sdk-go-v2/service/ssoadmin v1.29.2/go.mod h1:QkSUZzFJsxztercu38+HLsTz9kHqRvAhVwp9+6SAeFA=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10/go.mod h1:AFvkxc8xfBe8XA+5St5XIHHrQQtkxqrRincx4hmMHOk=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3 h1:S7EPdMVZod8BGKQQPTBK+FcX9g7bKR7c4+HxWqHP7Vg=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3/go.mod h1:FnvDM4sfa+isJ3kDXIzAB9GAwVSzFzSy97uZ3IsHo4E=
Expand Down

0 comments on commit 8971f94

Please sign in to comment.