Skip to content

Separate workflow#9

Merged
CelestaLiu merged 6 commits intomainfrom
separate_workflow
Jul 19, 2025
Merged

Separate workflow#9
CelestaLiu merged 6 commits intomainfrom
separate_workflow

Conversation

@CelestaLiu
Copy link
Copy Markdown
Collaborator

Extract build process to build_environment():

  • Create network
  • Build SQLancer image
  • Build/pull Docker images of DBMS
  • Reuse the previously created Docker images if --cache is set
  • Start DBMS container

@CelestaLiu CelestaLiu requested a review from suyZhong July 17, 2025 17:46
…and restart new container if old container exists
Comment thread config.json Outdated
"timeout_seconds": 60,
"oracle": "FUZZER"
"init_sql": "CREATE DATABASE test;",
"init_sql_command": "docker exec {container_name} mysql -u{username} -p{password} -e \"{sql}\""
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This one sounds like init_database or? Not so clear for the meaning of this command

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I add init_sql for postgres to create default database test. Deleted from mysql./config.json.

Comment thread run_test.py Outdated


def test_single(dbms, config_path, use_cache=False):
def build_environment(dbms, config_path, use_cache, custom=False, dockerfile_path=""):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I feel that build_environment should mean that we build the images, and prepare configurations etc. We'll only start the container when we start testing.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Move start_db to test functions, and extract all the build function to build.py, e.g. build_environment(), build_db_image()...

Copy link
Copy Markdown
Collaborator

@suyZhong suyZhong left a comment

Choose a reason for hiding this comment

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

LGTM

@CelestaLiu CelestaLiu merged commit ebf45f0 into main Jul 19, 2025
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