-
-
Notifications
You must be signed in to change notification settings - Fork 5
SF-3655 Do not update the draft in Mongo when another draft has started #3595
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3595 +/- ##
==========================================
- Coverage 82.83% 82.82% -0.01%
==========================================
Files 610 610
Lines 37184 37194 +10
Branches 6096 6073 -23
==========================================
+ Hits 30800 30805 +5
- Misses 5460 5477 +17
+ Partials 924 912 -12 ☔ View full report in Codecov by Sentry. |
| if (project.TranslateConfig.DraftConfig.CurrentScriptureRange != currentScriptureRange) | ||
| string currentScriptureRange = GetDraftedScriptureRange(lastTranslationBuild); | ||
| if ( | ||
| !string.IsNullOrWhiteSpace(currentScriptureRange) |
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.
📌 That's interesting. What are you thinking with regard to currentScriptureRange possibly being null or whitespace?
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.
These will be older builds that did not use the scripture range format.
| string currentScriptureRange = GetDraftedScriptureRange(lastTranslationBuild); | ||
| if ( | ||
| !string.IsNullOrWhiteSpace(currentScriptureRange) | ||
| && project.TranslateConfig.DraftConfig.CurrentScriptureRange != currentScriptureRange |
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.
📌 Actually, how would this be possible? If ExecuteWebhookAsync happens, and we mark a build as completed and run RetrievePreTranslationStatusAsync (from ExecuteWebhookAsync), wouldn't we have updated project.TranslateConfig.DraftConfig.CurrentScriptureRange from that completed build? Are we doing this because maybe we might not have heard back from a webhook, and so here we tidy up in case we had never heard back?
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.
Are we doing this because maybe we might not have heard back from a webhook, and so here we tidy up in case we had never heard back?
Yes.
| ); | ||
|
|
||
| // RetrievePreTranslationStatusAsync is run via a background job, so we verify that no new job was scheduled | ||
| env.BackgroundJobClient.DidNotReceive().Create(Arg.Any<Job>(), Arg.Any<IState>()); |
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.
📌 Oh, yes. Good fixing this check.
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.
Done.
|
Looks like still E2E failures :( |
pmachapman
left a comment
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.
Reviewable status: 0 of 2 files reviewed, 3 unresolved discussions (waiting on @marksvc)
| if (project.TranslateConfig.DraftConfig.CurrentScriptureRange != currentScriptureRange) | ||
| string currentScriptureRange = GetDraftedScriptureRange(lastTranslationBuild); | ||
| if ( | ||
| !string.IsNullOrWhiteSpace(currentScriptureRange) |
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.
These will be older builds that did not use the scripture range format.
| string currentScriptureRange = GetDraftedScriptureRange(lastTranslationBuild); | ||
| if ( | ||
| !string.IsNullOrWhiteSpace(currentScriptureRange) | ||
| && project.TranslateConfig.DraftConfig.CurrentScriptureRange != currentScriptureRange |
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.
Are we doing this because maybe we might not have heard back from a webhook, and so here we tidy up in case we had never heard back?
Yes.
| ); | ||
|
|
||
| // RetrievePreTranslationStatusAsync is run via a background job, so we verify that no new job was scheduled | ||
| env.BackgroundJobClient.DidNotReceive().Create(Arg.Any<Job>(), Arg.Any<IState>()); |
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.
Done.
d6d48fc to
4495143
Compare
4495143 to
060ae5c
Compare
This PR fixes a bug on QA, blocking its release to live, so I have marked as critical path.
This change is