Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Benchmark repeat parameter and results pushed to s3 #406
Benchmark repeat parameter and results pushed to s3 #406
Changes from 4 commits
78cbfab
545e0e0
1796bc5
39690fc
d2224f2
9853d9f
0a22456
85a51f3
cc47c20
0484c5a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My hunch is we should be agnostic as multiple services offer the S3 api (including MINIO which we already use in this project).
How about
OBJECT_STORE_SERVER
,OBJECT_STORE_ACCESS_KEY
,OBJECT_STORE_BUCKET
etc as the environment variables? And open an issue to change them in the backend settings fromMINIO_
- https://github.com/data61/anonlink-entity-service/blob/develop/backend/entityservice/settings.py#L27There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm actually not convinced. My reasoning being the following:
AWS_BENCHMARK_...
to be sure that we cannot imagine they will be used for any other context than the chosen one. I would also point out that if we implement a script doing all at once (deploying and benchmarking), it's good to use different environment variable names to be sure that a mis-configuration will not lead to misuse of a token. E.g. I create a script deploying the entity service setting the env varOBJECT_STORE_ACCESS_KEY
, if the script also starts the benchmark but I forgot to update the env var, I would push the results to the same bucket. Here it is not important as we are not deleting anything but if we were, we could do really bad things...x
and one key for the buckety
? The underlying question being if we prefer to have keys per application, or keys per use-case (the application can do x, y and z, or key a can do x, key b can do y and key c can do z, and I give the application the keys a, b and c). Both have pros and cons, but we may want to think about itOBJECT_STORE_SERVER
, I think we will also need an extra fieldOBJECT_STORE_TYPE
, in which case we may also need to modify the description of the env variables: one object store type may not use a bucket and access key, but something totally different (I have no clue what it could be, but maybe :) ). This field would also help to know which service to use.But the more options we are adding, the more I would assume we should push them into a command line tool instead of env vars.
While not being convinced, I'm also not really strongly opinionated on this, so happy to change if that's the preference :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not too fussed with the variable names but it would be nice to include a way to set the object store server so the benchmark user can decide for themselves.
See the docs at https://docs.min.io/docs/minio-select-api-quickstart-guide.html it looks like all you would need is to add an
endpoint_url
which is only set if an environment variable is present e.g.S3_SERVER
or my preferenceOBJECT_STORE_SERVER
.I don't think we need to tell the benchmark component the
TYPE
of object store - that would defeat the purpose of an abstraction - in this case the S3 API.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OBJECT_STORE_SERVER
added, and other ones renamed to:OBJECT_STORE_ACCESS_KEY
,OBJECT_STORE_SECRET_KEY
andOBJECT_STORE_BUCKET
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if this benchmarking job is run multiple times in k8s with the same s3 bucket (extremely likely) the results get overridden. I suggest we include a timestamp or uuid in the uploaded filename.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I will use timestamps, to more easily access them after (the job may not be kept on k8s, so the UUID may become hard to access).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should uploading to s3 be optional? Someone might want to run this benchmarking locally and just see the output as before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I'll just check if the environment variables have been set, not adding an extra one.