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 deploys from main - remove migration file for now #1540

Merged
merged 7 commits into from
Sep 21, 2023
Merged

Conversation

otherview
Copy link
Contributor

Why this change is needed

Fixes deploying testnet/dev-testnet/sepolia from main.
This PR bypasses the use of migration and avoids triggering the bug in the migration code path.
The reason why the migration code is breaking is still to be determined, but likely a string format thing ?

Currently when adding a 002_init.sql file the enclave fails to start with the following error:

CRIT [09-20|17:25:22.278] Failed to connect to backing database    node_id=0xc272459070A881BfA28aB3E810f9b19E4F468531 component=enclave      
err="unable to execute migration for 001_init.sql - Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CREATE DATABASE obsdb;

create table if not exists obsdb.keyvalue
(
    ky  v...' at line 2"

What changes were made as part of this PR

  • Replaced the obsdb.rollup with the new version
  • Removed the 002_init.sql file

PR checks pre-merging

Please indicate below by ticking the checkbox that you have read and performed the required
PR checks

  • PR checks reviewed and performed

@otherview otherview changed the title Pedro/fix deploy Pedro/fix deploys from main Sep 20, 2023
Copy link
Contributor

@zkokelj zkokelj left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

@otherview otherview changed the title Pedro/fix deploys from main Fix deploys from main - remove migration file for now Sep 20, 2023
@@ -4,6 +4,7 @@ import (
"database/sql"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't understand the reason for the changes in this file? Since the 002 file was removed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It clears up comments and a variable name that threw me off the first time I was reading the code, and adds more info to the error.

Made those changes while debugging the code initially, and felt like they would be good to keep.
Likely it would be good to keep the comment and the error, but perhaps change back the var name if you prefer ?
What do you think ?

Copy link
Collaborator

@tudor-malene tudor-malene left a comment

Choose a reason for hiding this comment

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

lgtm

@otherview otherview merged commit 34208be into main Sep 21, 2023
10 checks passed
@otherview otherview deleted the pedro/fix_deploy branch September 21, 2023 10:26
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