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

Feature/export experiments #15

Merged
merged 42 commits into from
Nov 25, 2022
Merged

Feature/export experiments #15

merged 42 commits into from
Nov 25, 2022

Conversation

krebsni
Copy link
Contributor

@krebsni krebsni commented May 27, 2022

  • refactor export/import experiments into long-running tasks
  • add filter for experiment export

@krebsni krebsni requested a review from buehlefs May 27, 2022 18:53
@krebsni krebsni linked an issue May 27, 2022 that may be closed by this pull request
2 tasks
@krebsni krebsni marked this pull request as draft May 27, 2022 18:54
@krebsni krebsni marked this pull request as ready for review October 8, 2022 18:55
@krebsni krebsni requested review from buehlefs and removed request for buehlefs October 28, 2022 10:35
Copy link
Contributor

@buehlefs buehlefs left a comment

Choose a reason for hiding this comment

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

We need to investigate the path join issues before we can merge this

Dockerfile Outdated Show resolved Hide resolved
main.bal Outdated Show resolved Hide resolved
main.bal Outdated Show resolved Hide resolved
main.bal Show resolved Hide resolved
main.bal Show resolved Hide resolved
modules/database/export.bal Outdated Show resolved Hide resolved
modules/database/export.bal Outdated Show resolved Hide resolved
modules/database/export.bal Outdated Show resolved Hide resolved
modules/database/export.bal Outdated Show resolved Hide resolved
modules/database/export.bal Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
modules/database/database.bal Outdated Show resolved Hide resolved
#
# + test - some config field
public type ExperimentExportConfig record {|
string test; // TODO
Copy link
Contributor

Choose a reason for hiding this comment

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

What is there TODO?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

for a future PR export config needs to be added

Copy link
Contributor

Choose a reason for hiding this comment

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

Then clarify the TODO comment (just TODO is not enough...)

modules/database/export.bal Outdated Show resolved Hide resolved
modules/database/export.bal Outdated Show resolved Hide resolved
modules/database/export.bal Outdated Show resolved Hide resolved
result = check os:exec({value: "powershell", arguments: ["Compress-Archive", "-Update", jsonPath, zipPath]});
} else {
return error("Unsupported operating system! At the moment, we support 'linux' and 'windows' for importing/exporting experiments. Please make sure to properly specify the os env var or config entry.");
if !os.toLowerAscii().includes("linux") {
Copy link
Contributor

Choose a reason for hiding this comment

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

see comment above, also check if else needs {} if it is meant as else-if.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

in case it's not linux but linux-like it may be worth printing an error and still trying to run the exec. If it fails an exception should be raised. Therefore the if within the else.

modules/database/util.bal Outdated Show resolved Hide resolved
modules/database/import.bal Outdated Show resolved Hide resolved
main.bal Show resolved Hide resolved
modules/database/database.bal Outdated Show resolved Hide resolved
modules/database/database.bal Outdated Show resolved Hide resolved
Copy link
Contributor

@buehlefs buehlefs left a comment

Choose a reason for hiding this comment

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

Just one minor change left.

modules/database/database.bal Outdated Show resolved Hide resolved
@krebsni krebsni merged commit 3d7a54d into main Nov 25, 2022
@krebsni krebsni deleted the feature/export-experiments branch November 25, 2022 13:32
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.

Add endpoint to export experiment as zip file
2 participants