-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[analyze] Add Analyzer for MySQL #3193
[analyze] Add Analyzer for MySQL #3193
Conversation
//go:embed expected_output.json | ||
var expectedOutput []byte |
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.
Neat!
This is also missing the enumerated permissions and generated types. |
Add the enumerated permission types. |
00fa5b2
to
44c2bc6
Compare
for _, database := range info.Databases { | ||
dbResource := analyzers.Resource{ | ||
Name: database.Name, | ||
FullyQualifiedName: database.Name, |
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.
Does the database name include the hostname? I think this needs to be a bit more unique..
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.
I included the hostname in database resources FQN.
for _, table := range *database.Tables { | ||
tableResource := analyzers.Resource{ | ||
Name: table.Name, | ||
FullyQualifiedName: table.Name, |
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.
I think the fully qualified name should probably be <db name> / <table name>
. It's supposed to be a unique identifier for this resource, right? Maybe it even needs the hostname
too 🤔
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.
Good suggestion, I included the hostname & database name in tableresources FQN.
validation for connection string in analyzer
simplified the mysql test due to huge structure
44c2bc6
to
e00c8dd
Compare
@mcastorina I have also simplified the test for mysql. |
Description:
implemented analyzer interface for Mysql.
Checklist:
make test-community
)?make lint
this requires golangci-lint)?