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

PoC: allow running tracetest locally without dependencies #1611

Closed
wants to merge 12 commits into from

Conversation

schoren
Copy link
Collaborator

@schoren schoren commented Nov 30, 2022

This PR allows the server to run without dependencies by directly running the tracetest-server binary locally.

It embed the web build in the server binary, and uses a (unfinished) filesystem based testDB.

To run this version, you need to checkout this branch and build (you need goreleaser installed):

# on project root 
goreleaser release --skip-announce  --skip-publish --snapshot --rm-dist

This will create a dist/[architecture]/tracetest-server file. You can run that file to start the server


Now you need to run the server, passing a root "database" dir. This will hold your "ignorable" db (like runs and config) and your "persistable" db (tests, envs, transactions).
You can use the tracetesting dir from the project:

dist/[architecture]/tracetest-server ./tracetesting/transactions

Finally, go to http://localhost:11633

Changes

Fixes

Checklist

  • tested locally
  • added new dependencies
  • updated the docs
  • added a test

Copy link
Member

@mathnogueira mathnogueira left a comment

Choose a reason for hiding this comment

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

Looks good! Just a few minor comments

@@ -26,14 +28,16 @@ var cfg = flag.String("config", "config.yaml", "path to the config file")
func main() {

flag.Parse()
root := flag.Arg(0)
Copy link
Member

Choose a reason for hiding this comment

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

I think we should have a default here. Probably some directory in the working directory, such as: ./.tracetest or so.

}

func (td *fsDB) Drop() error {
panic("not implemented")
Copy link
Member

Choose a reason for hiding this comment

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

I think it's worth implementing this because it's very simple:

Suggested change
panic("not implemented")
return os.RemoveAll(td.root)

@xoscar xoscar added future Capture an idea but with the knowledge it is 2 months+ out do not merge labels Dec 19, 2022
@schoren schoren closed this Mar 2, 2023
@schoren schoren deleted the explore-local-run branch May 22, 2023 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge future Capture an idea but with the knowledge it is 2 months+ out
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants