Skip to content

test: add password to users creation#67

Merged
pmishchenko-ua merged 2 commits into
masterfrom
pavlo/password
May 20, 2026
Merged

test: add password to users creation#67
pmishchenko-ua merged 2 commits into
masterfrom
pavlo/password

Conversation

@pmishchenko-ua
Copy link
Copy Markdown
Collaborator

No description provided.

@cursor
Copy link
Copy Markdown

cursor Bot commented May 19, 2026

PR Summary

Medium Risk
Medium risk because it changes how CI test database users are provisioned and relies on SQL_USER_PASSWORD being set/compatible with SingleStore CREATE USER ... IDENTIFIED BY syntax, which could break cluster setup/auth in workflows.

Overview
Updates the SingleStore CI cluster bootstrap (s2ms_cluster.py) to create user_1/user_2/user_3 with an explicit password (IDENTIFIED BY using SQL_USER_PASSWORD) instead of creating passwordless users.

Reviewed by Cursor Bugbot for commit 751b017. Configure here.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default mode and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Password with quotes breaks SQL via f-string interpolation
    • Single quotes in SQL_USER_PASSWORD are doubled before embedding in IDENTIFIED BY string literals so the generated SQL stays valid and cannot break out of the literal.

Create PR

Or push these changes by commenting:

@cursor push 190627bb9d
Preview (190627bb9d)
diff --git a/.github/workflows/s2ms_cluster.py b/.github/workflows/s2ms_cluster.py
--- a/.github/workflows/s2ms_cluster.py
+++ b/.github/workflows/s2ms_cluster.py
@@ -39,9 +39,14 @@
                 cur.execute(f"DROP DATABASE IF EXISTS {create_db}")
                 cur.execute(f"CREATE DATABASE {create_db}")
         elif command == Command.CREATE_ROLES:
-            cur.execute(f"CREATE USER user_1 IDENTIFIED BY '{SQL_USER_PASSWORD}'")
-            cur.execute(f"CREATE USER user_2 IDENTIFIED BY '{SQL_USER_PASSWORD}'")
-            cur.execute(f"CREATE USER user_3 IDENTIFIED BY '{SQL_USER_PASSWORD}'")
+            sql_password = (
+                SQL_USER_PASSWORD.replace("'", "''")
+                if SQL_USER_PASSWORD is not None
+                else None
+            )
+            cur.execute(f"CREATE USER user_1 IDENTIFIED BY '{sql_password}'")
+            cur.execute(f"CREATE USER user_2 IDENTIFIED BY '{sql_password}'")
+            cur.execute(f"CREATE USER user_3 IDENTIFIED BY '{sql_password}'")
     finally:
         cur.close()
         conn.close()

You can send follow-ups to the cloud agent here.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 751b017. Configure here.

Comment thread .github/workflows/s2ms_cluster.py Outdated
@pmishchenko-ua pmishchenko-ua merged commit cdf3d0b into master May 20, 2026
10 of 15 checks passed
@pmishchenko-ua pmishchenko-ua deleted the pavlo/password branch May 20, 2026 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants