rob05c edited a comment on issue #4534: Fix ORT atstccfg to allow using new 
features in the latest Traffic Ops
URL: https://github.com/apache/trafficcontrol/pull/4534#issuecomment-605357520
 
 
   >things it already does today like attempting to re-login once when a 401 is 
received using request(). 
   
   Yep, that's one of the pain points I've hit. And I'm certainly not blaming 
anyone--pretty sure I wrote that. And it's mostly what you need as a user. 
Until you don't.
   
   >My idea is similar to that, except it wouldn't have to be a hidden behavior 
-- it could be optionally enabled when creating a new client instance but 
disabled by default. 
   
   +1. In fact, if you have to have the funcs anyway, e.g. `GetDSPrev() DSV14`, 
`GetDSLatest() DS`, `GetDS() { if !GetDSLatest() && cl.FallbackToPrev { 
GetDSPrev() }`, if it's not any more code, I'd vote exposing those. Give users 
the option of always using the prev, if they don't need new features and feel 
it's safer. Even more client control, for people who want/need it.
   
   >We should probably make re-login attempts optional as well. 
   
   +1
   
   >Regardless, I don't think that needs to be done in this PR. Really the 
entire Go client needs an overhaul.
   
   +1. Again, as someone who frequently uses the client, I've put a lot of 
thought into it; and to be honest, I'm still not certain what the ideal, 
least-painful client looks like. But I agree it's worth trying to make it 
better.
   
   >Unmarshalling 1.4 requests into a 1.5 struct without sanitizing to 1.5 
defaults does still kind of worry me, but that depends on whether or not the 
fields actually have defaults to sanitize to. For DSes going from 1.4 to 2.0, 
they probably don't need sanitized.
   
   I'd vote we make all new fields default nil, and require that all TC apps 
handle that. That seems safest anyway. Doing otherwise would require hackery to 
make upgrading work at all anyway.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to