trafficcontrol
trafficcontrol copied to clipboard
Add comment field to parameters
Closes: #7456
Add field "comment" to parameter
Which Traffic Control components are affected by this PR?
- Traffic Ops
- Traffic Portal
What is the best way to verify this PR?
- Enable show parameters "comment" field in traffic_portal_properties.json: properties.parameters.comment.show = true
- Provisioning CDN in a Box, select Configure/Parameters, 1 more columns "comment" should show
- Create/Update Parameters with "comment"
If this is a bugfix, which Traffic Control versions contained the bug?
PR submission checklist
- [x] This PR has a CHANGELOG.md entry
- [x] This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY (see the Apache Software Foundation's security guidelines for details)
Codecov Report
Attention: 18 lines
in your changes are missing coverage. Please review.
Comparison is base (
fa231d7
) 65.64% compared to head (c6c3fd7
) 31.83%. Report is 33 commits behind head on master.
Files | Patch % | Lines |
---|---|---|
...fic_ops/traffic_ops_golang/parameter/parameters.go | 14.28% | 18 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #7845 +/- ##
=============================================
- Coverage 65.64% 31.83% -33.81%
Complexity 98 98
=============================================
Files 323 719 +396
Lines 12836 82740 +69904
Branches 970 970
=============================================
+ Hits 8426 26340 +17914
- Misses 4050 54241 +50191
- Partials 360 2159 +1799
Flag | Coverage Δ | |
---|---|---|
golib_unit | 53.85% <ø> (?) |
|
grove_unit | 12.02% <ø> (?) |
|
t3c_unit | 5.88% <ø> (?) |
|
traffic_monitor_unit | 25.47% <ø> (?) |
|
traffic_ops_integration | 69.42% <ø> (ø) |
|
traffic_ops_unit | 21.67% <14.28%> (?) |
|
traffic_portal_v2 | 74.35% <ø> (ø) |
|
traffic_stats_unit | 10.78% <ø> (?) |
|
unit_tests | 29.15% <14.28%> (-45.21%) |
:arrow_down: |
v3 | 57.79% <ø> (ø) |
|
v4 | 79.18% <ø> (ø) |
|
v5 | 78.58% <ø> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I am -1 on this idea. The promise of a comments field being used only for humans' benefits has been repeatedly broken on other objects, and a Parameter ought to be too small to express anything complex enough to require a comment. In fact, Parameters as objects should not even exist in their own right, IMO, and - especially now that Profile layering is possible - instead just be properties of Profiles. In some respects, they are represented that way already, and that means that this amounts to, in those cases, having an unbounded number of free-form text fields on a collection of free-form text fields on a Profile.
at way already, and that means that this amounts to, in those cases, having an unbounded number of free-form text fields on a collection of free-form text fields on a Profile.
IMO I still need a description of some special parameters that are required for the Profile
Any Parameter that is required for a Profile of some given type ought not to be optionally provided by the data model; instead it should be a required property of a Profile.
@ntheanh201 - can you make it optional to show this comment field in traffic portal? for example, add a config setting like parameter.comment.show = false to the traffic portal properties file and key off that in the UI.
@ntheanh201 - can you make it optional to show this comment field in traffic portal? for example, add a config setting like parameter.comment.show = false to the traffic portal properties file and key off that in the UI.
Updated like this, please take a look!
I'm still -1 on this idea. Adding tech debt doesn't seem like a good way to resolve tech debt.
@ntheanh201 ^
Sorry to amend my response. But can you verify this test failure. Looks like it needs a test update.
It has not failed because of this code, this failure is related to the integration tests themselves being broken, you can see some other commits
@ocket8888 Responded in https://github.com/apache/trafficcontrol/issues/7456#issuecomment-1917912002 because a PR is not the place to discuss the validity of an Issue. With no response after a week, I'll assume you agree and will merge