Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

TP: do not mark DSR (ds request) complete if ds update fails due to validation error#5198

Merged
rawlinp merged 3 commits intoapache:masterfrom
mitchell852:dsr-complete-error
Oct 26, 2020
Merged

TP: do not mark DSR (ds request) complete if ds update fails due to validation error#5198
rawlinp merged 3 commits intoapache:masterfrom
mitchell852:dsr-complete-error

Conversation

@mitchell852
Copy link
Copy Markdown
Member

@mitchell852 mitchell852 commented Oct 26, 2020

If DSRs are enabled in traffic_portal_properties.json and your user has the override role, when you make a change to an existing DS, you must create a DSR first and you have the following options:

image

If you have the override role, you will see the Fulfill Request Immediately option which will do 2 things:

  1. it creates a DSR (for historical purposes) and sets it to "complete"
  2. it updates the DS

However, if #2 fails API validation, the DSR should not be marked as "complete" but should rather be left in the "submitted" state so it can be modified per the error message.

Which Traffic Control components are affected by this PR?

  • Traffic Portal

What is the best way to verify this PR?

If this is a bug fix, what versions of Traffic Control are affected?

  • master (5940129)
  • 4.1.0
  • 5.0.0 (RC1)

The following criteria are ALL met by this PR

  • This PR includes tests OR I have explained why tests are unnecessary
  • This PR includes documentation OR I have explained why documentation is unnecessary
  • This PR includes an update to CHANGELOG.md OR such an update is not necessary
  • This PR includes any and all required license headers
  • This PR ensures that database migration sequence is correct OR this PR does not include a database migration
  • This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY (see the Apache Software Foundation's security guidelines for details)

@mitchell852 mitchell852 added bug something isn't working as intended Traffic Portal v1 related to Traffic Portal version 1 labels Oct 26, 2020
@rawlinp rawlinp self-assigned this Oct 26, 2020
@mitchell852 mitchell852 added this to the 5.0.0 milestone Oct 26, 2020
Copy link
Copy Markdown
Contributor

@rawlinp rawlinp left a comment

Choose a reason for hiding this comment

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

Tested, it works as the description says

@rawlinp rawlinp merged commit eff7c18 into apache:master Oct 26, 2020
rawlinp pushed a commit to rawlinp/trafficcontrol that referenced this pull request Oct 26, 2020
…alidation error (apache#5198)

* do not mark dsr complete is ds update fails due to validation error

* adds CHANGELOG.md entry

* updates comment

(cherry picked from commit eff7c18)
rawlinp added a commit that referenced this pull request Oct 26, 2020
…alidation error (#5198) (#5200)

* do not mark dsr complete is ds update fails due to validation error

* adds CHANGELOG.md entry

* updates comment

(cherry picked from commit eff7c18)

Co-authored-by: Jeremy Mitchell <mitchell852@users.noreply.github.com>
ocket8888 pushed a commit to ocket8888/trafficcontrol that referenced this pull request Oct 29, 2020
…alidation error (apache#5198)

* do not mark dsr complete is ds update fails due to validation error

* adds CHANGELOG.md entry

* updates comment

(cherry picked from commit eff7c18)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug something isn't working as intended Traffic Portal v1 related to Traffic Portal version 1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TP: error message doesn't display properly when fulfilling an invalid DSR immediately

2 participants