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

WIP: Implement upload/download of trace records #22

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

pxor
Copy link
Contributor

@pxor pxor commented Mar 4, 2025

No description provided.

@pxor pxor added the enhancement New feature or request label Mar 4, 2025
@pxor pxor requested a review from alehander92 March 4, 2025 16:35
@pxor pxor self-assigned this Mar 4, 2025
@cla-bot cla-bot bot added the cla-signed label Mar 4, 2025
@pxor pxor marked this pull request as draft March 4, 2025 16:35
@pxor pxor force-pushed the feat-upload-download-traces branch 2 times, most recently from 09e65ca to c2f7a8a Compare March 6, 2025 14:59
pxor added 15 commits March 11, 2025 12:57
Currently there is a GUI for the upload button
When clicked, it zips the given trace with a random password encryption
and uploads it to the provided web api root
In the nim-lan/zip library password encryption is not supported
so we are currently using the standard zip and unzip packages
Still need to encrypt the file and set up the codetracer web api
…ding on the trace fields

Add fields for the downloadKey, controlId and expireTime to the trace object
Add a Command for delete of trace files
Handle deleting of the trace file's download key, controlId and expireTime
…nished and handle the frontend update of the trace object
@pxor pxor force-pushed the feat-upload-download-traces branch from f838285 to b8a295a Compare March 11, 2025 11:46
@Madman10K Madman10K self-requested a review March 11, 2025 12:04
Copy link
Contributor

@Madman10K Madman10K 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 to me, just needs to be changed to follow the common code style. Maybe @alehander92 can add to the review

@@ -54,7 +54,7 @@ proc recordSymbols(sourceDir: string, outputFolder: string, lang: Lang) =
# it's still good to have an option/opt-out, so we leave that
# as a flag in the internals, but not exposed to user yet
# that's why for now it's hardcoded for db
const DB_SELF_CONTAINED_DEFAULT = true
const DB_SELF_CONTAINED_DEFAULT* = true
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we need to move this to globals.nim

Copy link
Contributor

Choose a reason for hiding this comment

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

I just noticed that it is exported. I support moving this too

@@ -53,16 +53,16 @@ proc downloadCommand*(traceRegistryId: string) =
else:
let downloadId = stringSplit[1]
let password = stringSplit[2]
let zipPath = "/tmp/tmp.zip"
let zipPath = codetracerTmpPath / "tmp.zip"
Copy link
Contributor

Choose a reason for hiding this comment

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

this is /tmp/codetracer/ on unix though, maybe that's ok, just noting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants