Skip to content
This repository has been archived by the owner on Nov 14, 2020. It is now read-only.

grant/default privileges: Fix schema verification. #74

Merged
merged 1 commit into from
Apr 18, 2019

Conversation

cyrilgdn
Copy link
Contributor

To check if postgresql_grant or postgresql_default_privileges resources exist,
the provider is first checking if database/schema for which they will be applied exist.

For the schema, we created a specific connection on the right database to check
it but it was mistakenly using the wrong connection and was checking if schema exists
on the database defined in provider.

(Basically it was working only for schema public which exists by default in all databases)

@multani This is the bug we talked about. Could you have a look please?

To check if `postgresql_grant` or `postgresql_default_privileges` resources exists,
the provider was first checking if database/schema for which they will be applied exist.

For the schema, we created a specific connection on the right database to check
it it was mistakenly using the wrong connection and was checking if schema exists
on the database defined in provider.

(Basically it was working only for schema `public` which exists by default in all databases)
@ghost ghost added the size/S label Apr 17, 2019
@multani
Copy link
Contributor

multani commented Apr 18, 2019

@cyrilgdn Looks good to me. Travis doesn't pass but the failure is unrelated.

@cyrilgdn
Copy link
Contributor Author

@multani Thanks !

Travis doesn't pass but the failure is unrelated.

Yes it's a known problem that I need to look at. It randomly fails just for this Postgres version, restarting the build works.

@cyrilgdn cyrilgdn merged commit eee60d1 into master Apr 18, 2019
@cyrilgdn cyrilgdn deleted the grant_fix_schema_check branch April 18, 2019 08:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants