Skip to content

Fix integrate-mysql CI: backtick-quote SQL columns, skip Pro-only workflow dredd tests#3965

Draft
Copilot wants to merge 2 commits into
developfrom
copilot/fix-integrate-mysql-job
Draft

Fix integrate-mysql CI: backtick-quote SQL columns, skip Pro-only workflow dredd tests#3965
Copilot wants to merge 2 commits into
developfrom
copilot/fix-integrate-mysql-job

Conversation

Copilot AI commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

The Workflows PR introduced dredd hooks for a Pro-only feature backed by an OSS no-op stub, causing the integrate-mysql CI job to fail with a MySQL syntax error, then a hooks process panic that took down all subsequent transactions.

Changes

  • db/sql/SqlDb.go — Backtick-quote all column names in InsertTemplateFromType. WorkflowEdge.Condition maps to condition, a reserved keyword in MySQL 8.x, producing:

    Error 1064: near 'condition) values (1, 1, 2, 'on_success')'
    

    Backticks are already transparently converted to double-quotes for PostgreSQL by the existing PrepareQuery path. This also proactively covers limit (WorkflowNode) and any future reserved-keyword columns.

  • .dredd/hooks/helpers.go — In addWorkflow(), fall back to input nodes when the store returns an empty struct (OSS stub). addWorkflowApproval() panics if workflow.Nodes is nil; that panic kills the hooks process and cascades every subsequent dredd transaction to fail.

  • .dredd/hooks/main.go — Add all 11 workflow transactions to skipTests. The OSS hook binary uses the stub, so workflowID is always 0 and every workflow endpoint returns 404 against the real Pro binary. Workflow endpoints are covered by the Pro integration suite.

…dredd tests

- db/sql/SqlDb.go: backtick-quote column names in InsertTemplateFromType to
  avoid MySQL reserved-keyword errors (e.g. `condition` in WorkflowEdge)
- .dredd/hooks/helpers.go: preserve input nodes in addWorkflow() return value
  when the workflow stub returns an empty struct, preventing a panic in
  addWorkflowApproval()
- .dredd/hooks/main.go: skip all 11 workflow transactions in dredd hooks;
  workflow is a Pro-only feature that cannot be exercised from the OSS hook binary
Copilot AI changed the title [WIP] Fix failing GitHub Actions job integrate-mysql Fix integrate-mysql CI: backtick-quote SQL columns, skip Pro-only workflow dredd tests Jun 15, 2026
Copilot AI requested a review from fiftin June 15, 2026 14:39
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.

2 participants