Skip to content
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

fix queryservice integration tests related to tableacl #937

Merged
merged 1 commit into from
Jul 29, 2015
Merged

fix queryservice integration tests related to tableacl #937

merged 1 commit into from
Jul 29, 2015

Conversation

yaoshengzhe
Copy link
Contributor

  1. Deny any table access by default if tableacl does not find a ACL entry.
  2. Fix queryservice integration test config file.
  3. Log tableacl error only when 'queryserver-config-strict-mode' flag
    is turned on (default: off)

@alainjobart
Copy link
Contributor

That's not gonna break production, right?

1. Deny any table access by default if tableacl does not find a ACL entry.
2. Fix queryservice integration test config file.
3. Log tableacl error only when 'queryserver-config-strict-table-acl' flag
   is turned on (default: off)
@yaoshengzhe
Copy link
Contributor Author

Fixed the comment. Production won't break, because the "queryserver-config-strict-table-acl" flag is set false by default (https://github.com/youtube/vitess/blob/master/go/vt/tabletserver/queryctl.go#L157).

In query_executor.go, we only log and return error if that flag is turned on; Otherwise, we always return nil.
https://github.com/youtube/vitess/pull/937/files#diff-dd62190fdeaddd82bdf2bc8928da965aR235

@sougou
Copy link
Contributor

sougou commented Jul 29, 2015

LGTM

yaoshengzhe added a commit that referenced this pull request Jul 29, 2015
fix queryservice integration tests related to tableacl
@yaoshengzhe yaoshengzhe merged commit eb09dc8 into vitessio:master Jul 29, 2015
@yaoshengzhe yaoshengzhe deleted the fix_tableacl_queryservice_test branch July 29, 2015 21:59
systay pushed a commit to planetscale/vitess that referenced this pull request Aug 19, 2022
…sio#937)

* Cleanup usage of go.rice in favor of go:embed

The usage of go.rice predates the availability of go:embed, but we
should switch to using go:embed instead to ship specific assets like
config files that we need.

go.rice is also incompatible with Go 1.19 and while it might see a fix
in the future, it seems better to go with the recommended Go approach
that is available these days.

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

* Move vtctld to also use `go embed` instead of go.rice

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

* Remove last rice-box related comments

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

* Remove config moving

This right now breaks building the actual tests since the tests might
also end up loading the regular code which has a `go embed` and refers
to the package with the config embeds.

This doesn't mean that the config isn't properly included in the
binaries. Also with using `go embed` we have a build time dependency on
the files and we always know the latest is included, so we don't have
the issue of potentially outdated files either.

All in all, it seems simplest to remove this logic and trust that Go
itself works as advertised.

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants