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

Fixed error message for assignment of non-existent parameters to a profile #7241

Merged
merged 2 commits into from
Dec 15, 2022

Conversation

rimashah25
Copy link
Contributor

Closes: #6229


Which Traffic Control components are affected by this PR?

  • Traffic Ops

What is the best way to verify this PR?

Using curl cmd, call api: profileparameter with a post body as follows (eg). Note: 14, 30, 400 are non-existent parameter

{
    "profileId": 10,
    "paramIds": [14, 13, 400, 1]
}

and you should see the following message

{"alerts":
    [{
         "text":"parse error: validating: parameters with IDs [14 13 400] don't all exist",
         "level":"error"
     }]
}

Note, 1 didn't show up since it is an existing parameter.

If this is a bugfix, which Traffic Control versions contained the bug?

7.0.1

PR submission checklist

@rimashah25 rimashah25 force-pushed the refactor/parameter-error-message branch from a2f09df to 1c10713 Compare December 9, 2022 16:10
@codecov
Copy link

codecov bot commented Dec 9, 2022

Codecov Report

Merging #7241 (b43d921) into master (bf8e18f) will increase coverage by 0.00%.
The diff coverage is 0.00%.

@@            Coverage Diff            @@
##             master    #7241   +/-   ##
=========================================
  Coverage     28.37%   28.37%           
  Complexity       98       98           
=========================================
  Files           617      617           
  Lines         69197    69205    +8     
  Branches         90       90           
=========================================
+ Hits          19634    19638    +4     
- Misses        47754    47758    +4     
  Partials       1809     1809           
Flag Coverage Δ
golib_unit 53.07% <0.00%> (-0.01%) ⬇️
grove_unit 4.60% <ø> (ø)
t3c_generate_unit 24.96% <ø> (ø)
traffic_monitor_unit 20.43% <ø> (ø)
traffic_ops_unit 19.81% <ø> (ø)
traffic_stats_unit 10.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
lib/go-tc/parameters.go 0.00% <0.00%> (ø)
lib/go-atscfg/serverunknown.go 77.96% <0.00%> (-1.70%) ⬇️
lib/go-atscfg/strategiesdotconfig.go 91.78% <0.00%> (+0.03%) ⬆️
lib/go-atscfg/ipallowdotyaml.go 71.61% <0.00%> (+0.25%) ⬆️
lib/go-atscfg/ipallowdotconfig.go 69.62% <0.00%> (+0.28%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ocket8888 ocket8888 added Traffic Ops related to Traffic Ops low impact affects only a small portion of a CDN, and cannot itself break one improvement The functionality exists but it could be improved in some way. labels Dec 9, 2022
lib/go-tc/parameters.go Outdated Show resolved Hide resolved
lib/go-tc/parameters.go Outdated Show resolved Hide resolved
lib/go-tc/parameters.go Outdated Show resolved Hide resolved
@srijeet0406 srijeet0406 removed their request for review December 14, 2022 19:37
@rimashah25 rimashah25 requested a review from ocket8888 December 14, 2022 21:59
@ocket8888 ocket8888 merged commit 20882f7 into apache:master Dec 15, 2022
@asf-ci asf-ci mentioned this pull request Jan 1, 2023
4 tasks
@rimashah25 rimashah25 deleted the refactor/parameter-error-message branch February 8, 2023 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement The functionality exists but it could be improved in some way. low impact affects only a small portion of a CDN, and cannot itself break one Traffic Ops related to Traffic Ops
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error message when adding nonexistent parameters to a profile is unhelpful
2 participants