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

Improve ConstraintAction Error Messages #1177

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

Mythicaeda
Copy link
Contributor

  • Tickets addressed: Hotfix
  • Review: By commit
  • Merge strategy: Merge (no squash)

Description

Follow up to #1169.

The action will now correctly distinguish between a plan never being simulated and a specified sim dataset not existing when erroring on resultsHandle$ being empty.

Additionally, the serializer for SimDatasetMismatch now refers to the correct extension.

Verification

A bindings test has been added. The bindings test fo the SimDatasetMismatch exception has been updated.

Documentation

No docs changes needed.

@Mythicaeda Mythicaeda added refactor A code change that neither fixes a bug nor adds a feature constraints Anything related to the constraints domain labels Oct 3, 2023
@Mythicaeda Mythicaeda requested a review from mattdailis October 3, 2023 18:42
@Mythicaeda Mythicaeda requested a review from a team as a code owner October 3, 2023 18:42
@Mythicaeda Mythicaeda requested a review from jmdelfa October 3, 2023 18:42
@mattdailis
Copy link
Collaborator

I'm highly supportive of improving these error messages 🚀 I was preparing for a demo this morning, and ran into "input mismatch exception". I think longer term we'll want the UI to specially handle these messages.

As far as this PR is concerned, I want to workshop the messages to make sure they are accurate enough to be actionable. The two cases seem to be:

  • The provided simulation dataset id either doesn't exist, or it does exist, but isn't associated with this plan. Can we put this succinctly?
  • No simulation dataset id was provided, and the latest revision of the plan has never been simulated

@Mythicaeda
Copy link
Contributor Author

Mythicaeda commented Oct 3, 2023

The two cases seem to be:

There are three cases, actually:

  1. There was a simulation dataset id specified, but that dataset doesn't exist
  2. There was a simulation dataset id specified, and that dataset exists, but it's a dataset for a different plan
  3. There was no simulation dataset id specified, and the plan has never been simulated (note that plan revision is not actually used, it only still exists as a param due to the unused UncachedSimulationService. All checking a plan revision does is prove that the plan exists)

Cases 1 and 3 share an error class but have unique error messages in the cause field. Case 2 has its own error class.

@Mythicaeda Mythicaeda force-pushed the refactor/adjust-constraints-error-messages branch from 07462aa to 0e1757e Compare October 3, 2023 20:04
@Mythicaeda Mythicaeda temporarily deployed to e2e-test October 3, 2023 20:04 — with GitHub Actions Inactive
Copy link
Collaborator

@mattdailis mattdailis left a comment

Choose a reason for hiding this comment

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

Couple clarifying questions - I have a feeling the messages might still be a bit misleading

@Mythicaeda Mythicaeda force-pushed the refactor/adjust-constraints-error-messages branch from 0e1757e to bb8f048 Compare October 4, 2023 16:14
@Mythicaeda Mythicaeda temporarily deployed to e2e-test October 4, 2023 16:14 — with GitHub Actions Inactive
@Mythicaeda Mythicaeda requested a review from mattdailis October 4, 2023 16:14
Copy link
Collaborator

@mattdailis mattdailis left a comment

Choose a reason for hiding this comment

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

💯

The errors will now correctly distinguish between a plan never being simulated and a specified sim dataset not existing.
Additionally, the serialializer for SimDatasetMismatch now refers to the correct extension.
@Mythicaeda Mythicaeda force-pushed the refactor/adjust-constraints-error-messages branch from bb8f048 to f597278 Compare October 4, 2023 19:39
@Mythicaeda Mythicaeda temporarily deployed to e2e-test October 4, 2023 19:39 — with GitHub Actions Inactive
@Mythicaeda Mythicaeda assigned Mythicaeda and unassigned mattdailis Oct 4, 2023
@Mythicaeda Mythicaeda merged commit 644660d into develop Oct 4, 2023
6 checks passed
@Mythicaeda Mythicaeda deleted the refactor/adjust-constraints-error-messages branch October 4, 2023 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
constraints Anything related to the constraints domain refactor A code change that neither fixes a bug nor adds a feature
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants