-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Failed sessions should be inserted with ended_on
set
#644
Conversation
6798fbe
to
482d911
Compare
Codecov Report
@@ Coverage Diff @@
## main #644 +/- ##
=======================================
Coverage 61.99% 61.99%
=======================================
Files 132 132
Lines 12945 12944 -1
=======================================
Hits 8025 8025
+ Misses 4054 4053 -1
Partials 866 866
Help us with your feedback. Take ten seconds to tell us how you rate us. |
|
||
// if writing our sessions to S3, do so | ||
if rt.Config.SessionStorage == "s3" { | ||
err := WriteSessionOutputsToStorage(ctx, rt, sessions) | ||
if err != nil { | ||
// for now, continue on for errors, we are still reading from the DB | ||
logrus.WithError(err).Error("error writing sessions to s3") | ||
return nil, errors.Wrapf(err, "error writing sessions to storage") |
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.
this is a holdover from when we always read output from DB and we were just testing S3 writes - if S3 writing fails now, that's an error
core/models/sessions_test.go
Outdated
modelContact, _ := testdata.Cathy.Load(db, oa) | ||
|
||
_, flowSession, sprint1 := test.NewSessionBuilder().WithAssets(oa.SessionAssets()).WithFlow(ping.UUID). | ||
WithContact(testdata.Bob.UUID, flows.ContactID(testdata.Cathy.ID), "Cathy", "eng", "").MustBuild() |
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.
typo testdata.Bob.UUID
We set this correctly if things fail on later resumes, but in the insert case after the first sprint, we only set ended_on for status=C sessions.