-
Notifications
You must be signed in to change notification settings - Fork 17
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
Simplify e2e tests #33
Conversation
/gcbrun |
2 similar comments
/gcbrun |
/gcbrun |
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.
Couple of minor changes but overall looks great!
/gcbrun |
/gcbrun |
/gcbrun |
dd7829f
to
9907264
Compare
/gcbrun |
/gcbrun |
/gcbrun |
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 happy with the changes, just noticed that test
task isn't documented in this Makefile
.
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 might have missed this during the rebase. @roberta-dt please could you take a look?
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.
make run pipeline=training build=false wait=true && \ | ||
make run pipeline=prediction build=false wait=true |
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.
@browningjp-datatonic why don't we build containers when running e2e tests?
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.
The containers are built in the previous pipeline step. We pass build=false
here because make build
would create a separate Cloud Build job (which fails in this case, because it relies on the gcloud
command that is not available in the CI container image)
if args.wait.lower() == "true": | ||
wait = True | ||
elif args.wait.lower() != "false": | ||
raise ValueError("wait variable must be 'true' or 'false'") | ||
wait = False |
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.
@becky-dt can you please check for similar logic elsewhere in this repo? would like to follow the same logic or even import a reusable function for parsing boolean flags from the command-line. thanks!
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.
@felix-datatonic There are a couple more booleans in the Makefile but in this case the logic is all run in the makefile (unlike above where the wait param is passed into the python function)
Do we want to add similar logic in the makefile too to catch ValueErrors? and if so is there a good way to raise errors in bash
(let me know if this doesnt make sense and needs more explaining!)
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.
@roberta-dt and I added this logic to the makefile in the latest commit :)
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.
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.
@browningjp-datatonic can you please take a look at the change we made to the run command?
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.
The other place where similar logic is used in Python is for ENABLE_PIPELINE_CACHING
- however this is a bit different, because it's not just True
/False
, but True
/False
/None
(None
default)
The compile=true
and build=true
flags are implemented in the Makefile itself as you say, and it's not simple to replicate the logic exactly.
For consistency in behaviour, I would suggest to modify your Python logic here to:
if args.wait == "true":
wait = True
elif args.wait != "false":
raise ValueError("wait variable must be 'true' or 'false'")
wait = False
(value from user must be true
or false
exactly - case sensitive)
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.
/gcbrun |
/gcbrun |
/gcbrun |
/gcbrun |
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.
LGTM
Description
Removing e2e pytest tests and adding a wait in so that
make run
waits for the pipeline to finish before returning. Replacedmake e2e-tests
withmake run wait=true
ine2e-test.yaml
CI pipelineHow has this been tested?
CI checks should be sufficient
Checklist