Skip to content

feat(mysql): Allow to Grant permissions on specific columns in table#330

Open
ymaniukevich wants to merge 3 commits intocrossplane-contrib:masterfrom
ymaniukevich:feature/mysql-grant-perms-to-column
Open

feat(mysql): Allow to Grant permissions on specific columns in table#330
ymaniukevich wants to merge 3 commits intocrossplane-contrib:masterfrom
ymaniukevich:feature/mysql-grant-perms-to-column

Conversation

@ymaniukevich
Copy link

@ymaniukevich ymaniukevich commented Feb 23, 2026

Description of your changes

Improved regexp expression for granting permission to specific columns in MySQL.

Fixes #214, #176

I have:

  • Read and followed Crossplane's [contribution process].
  • Run make reviewable to ensure this PR is ready for review.

How has this code been tested

apiVersion: mysql.sql.crossplane.io/v1alpha1
kind: Grant
metadata:
  name: user-example
spec:
  forProvider:
    databaseRef:
      name: example-db
    privileges:
      - UPDATE (status, updated_at)
      - SELECT
    table: requests
    user: user-example@%
  providerConfigRef:
    name: example

Simplify e2e setup by using the shared code here. This code will
support crossplane 2.2.0, which changes the cache paths again.

When CROSSPLANE_HELM_CHART_VERSION contains rc we enable --devel for
helm to find the appropriate chart.

Related: crossplane/build#52

Signed-off-by: Carl Henrik Lunde <chlunde@ifi.uio.no>
@ymaniukevich ymaniukevich force-pushed the feature/mysql-grant-perms-to-column branch from ce36e61 to b41ee96 Compare February 23, 2026 08:09
@chlunde
Copy link
Collaborator

chlunde commented Feb 23, 2026

@ymaniukevich would it make sense to update the examples to get e2e coverage here? We'll also need to rebase this PR after #328 is in because e2e will fail now

Signed-off-by: Carl Henrik Lunde <chlunde@ifi.uio.no>
@ymaniukevich ymaniukevich force-pushed the feature/mysql-grant-perms-to-column branch from b41ee96 to 21e7234 Compare February 23, 2026 16:00
@chlunde
Copy link
Collaborator

chlunde commented Feb 24, 2026

@ymaniukevich I guess this also fixes #176 ?

@ymaniukevich
Copy link
Author

@chlunde I'll add an e2e test to cover the case of granting table permissions. I've checked issue #176 — you're right, this will fix it as well.

@ymaniukevich ymaniukevich force-pushed the feature/mysql-grant-perms-to-column branch 5 times, most recently from c07dc00 to 6fdc292 Compare February 24, 2026 21:04
mysql: add e2e tests to cover granting permission on table

Signed-off-by: ymaniukevich <yauheni.maniukevich@gmail.com>
@ymaniukevich ymaniukevich force-pushed the feature/mysql-grant-perms-to-column branch from 6fdc292 to 9c8f974 Compare February 24, 2026 21:10
@ymaniukevich
Copy link
Author

@ymaniukevich would it make sense to update the examples to get e2e coverage here?

@chlunde I've updated the examples to improve e2e coverage.

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.

[mysql] Unable to Grant permissions on specific columns in table

2 participants