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

Correctly handle error scenario and propagate error message up #252

Merged
merged 1 commit into from
Mar 27, 2019

Conversation

tovbinm
Copy link
Collaborator

@tovbinm tovbinm commented Mar 26, 2019

Related issues
Error message was not propagated to the user following up on #237 change

Describe the proposed solution
Propagate the error and return Try correctly

Describe alternatives you've considered
NA

Copy link
Contributor

@clin-projects clin-projects left a comment

Choose a reason for hiding this comment

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

Thanks @tovbinm for updating this! LGTM

val distString = (json \ rawFeatureDistributionsEntryName).extract[String]
FeatureDistribution.fromJson(distString).map(d => RawFeatureFilterResults(rawFeatureDistributions = d))
} else {
Success(RawFeatureFilterResults())
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have a test for this issue?

Copy link
Contributor

Choose a reason for hiding this comment

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

We don't have a test for loading an old model with rawFeatureDistributions defined

I'll save a model with previous TMOG version in src/test/resources/ and create a test

@codecov
Copy link

codecov bot commented Mar 26, 2019

Codecov Report

Merging #252 into master will decrease coverage by 3.94%.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #252      +/-   ##
==========================================
- Coverage   86.53%   82.59%   -3.95%     
==========================================
  Files         314      314              
  Lines       10297    10294       -3     
  Branches      331      554     +223     
==========================================
- Hits         8911     8502     -409     
- Misses       1386     1792     +406
Impacted Files Coverage Δ
...cala/com/salesforce/op/OpWorkflowModelReader.scala 88.23% <71.42%> (+1.19%) ⬆️
...alesforce/op/cli/gen/templates/SimpleProject.scala 0% <0%> (-100%) ⬇️
.../scala/com/salesforce/op/cli/gen/ProblemKind.scala 0% <0%> (-100%) ⬇️
...cala/com/salesforce/op/cli/gen/FileInProject.scala 0% <0%> (-100%) ⬇️
...in/scala/com/salesforce/op/cli/CommandParser.scala 0% <0%> (-98.12%) ⬇️
...cala/com/salesforce/op/cli/gen/ProblemSchema.scala 0% <0%> (-96.56%) ⬇️
...src/main/scala/com/salesforce/op/cli/gen/Ops.scala 0% <0%> (-94%) ⬇️
...ain/scala/com/salesforce/op/cli/SchemaSource.scala 0% <0%> (-87.94%) ⬇️
...a/com/salesforce/op/cli/gen/ProjectGenerator.scala 0% <0%> (-87.5%) ⬇️
...in/scala/com/salesforce/op/cli/CliParameters.scala 0% <0%> (-80.96%) ⬇️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2566a08...1de81af. Read the comment docs.

@codecov
Copy link

codecov bot commented Mar 26, 2019

Codecov Report

Merging #252 into master will increase coverage by <.01%.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #252      +/-   ##
==========================================
+ Coverage   86.53%   86.54%   +<.01%     
==========================================
  Files         314      314              
  Lines       10297    10294       -3     
  Branches      331      570     +239     
==========================================
- Hits         8911     8909       -2     
+ Misses       1386     1385       -1
Impacted Files Coverage Δ
...cala/com/salesforce/op/OpWorkflowModelReader.scala 88.23% <71.42%> (+1.19%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2566a08...1de81af. Read the comment docs.

@tovbinm tovbinm merged commit 3e89a43 into master Mar 27, 2019
@tovbinm tovbinm deleted the mt/handleTry branch March 27, 2019 04:36
@tovbinm tovbinm mentioned this pull request Apr 10, 2019
@salesforce-cla
Copy link

Thanks for the contribution! It looks like @tovbinm is an internal user so signing the CLA is not required. However, we need to confirm this.

@salesforce-cla
Copy link

Thanks for the contribution! Unfortunately we can't verify the commit author(s): Matthew <m***@s***.com>. One possible solution is to add that email to your GitHub account. Alternatively you can change your commits to another email and force push the change. After getting your commits associated with your GitHub account, refresh the status of this Pull Request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants