vinyldns icon indicating copy to clipboard operation
vinyldns copied to clipboard

Allow add for already exists DNS records.

Open Jay07GIT opened this issue 3 years ago • 2 comments

Fixes #1139 and Fixes #1149.

Changes in this pull request:

  • Allow add for already exists DNS records.

Scenario:

  • Users can add the recordset in DNS change page. VinylDNS will notify with
  1. if record data already exists => "No further actions require."
  2. if record data does not exists => This will go for Manual approval. "RecordName "$name" already exists. Your request will be manually reviewed. If you intended to update this record, you can avoid manual review by adding a DeleteRecordSet entry followed by an Add."

Jay07GIT avatar Jun 10 '22 07:06 Jay07GIT

Codecov Report

Base: 92.15% // Head: 92.10% // Decreases project coverage by -0.05% :warning:

Coverage data is based on head (721a601) compared to base (21c3d90). Patch coverage: 79.31% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1144      +/-   ##
==========================================
- Coverage   92.15%   92.10%   -0.06%     
==========================================
  Files         172      172              
  Lines        7014     7026      +12     
  Branches      188      182       -6     
==========================================
+ Hits         6464     6471       +7     
- Misses        550      555       +5     
Impacted Files Coverage Δ
.../vinyldns/core/domain/record/RecordSetChange.scala 96.42% <ø> (ø)
...a/vinyldns/api/engine/RecordSetChangeHandler.scala 93.33% <50.00%> (-4.06%) :arrow_down:
...nyldns/api/domain/batch/BatchChangeConverter.scala 98.30% <100.00%> (ø)
...ldns/api/domain/batch/BatchChangeValidations.scala 97.80% <100.00%> (+0.03%) :arrow_up:
...nyldns/api/domain/batch/BatchTransformations.scala 96.05% <100.00%> (+0.10%) :arrow_up:
...cala/vinyldns/core/domain/batch/SingleChange.scala 82.14% <100.00%> (+0.66%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Jun 22 '22 11:06 codecov[bot]

So I was testing locally and it seems like adding a totally new record to a zone results in a This record already exists. No further action is required. message. I was wondering if this is intended. Included some screenshots of that test below. Other scenarios seem to work as expected. Screen Shot 2022-07-07 at 12 22 53 PM Screen Shot 2022-07-07 at 12 23 01 PM

@nspadaccino Thanks for alerting me on this issue.

Reason for the issue:- For creating a new record, Vinyldns will first create a record, then it will try to validate the record already exists, then it will update the status as completed. (i.e. both already exists and newly created record has same message and same validations)

Solution:- Updated the message as "No further action required." Since its understood.

Jay07GIT avatar Jul 11 '22 04:07 Jay07GIT