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

Fix t3c update when fallback occurs #6169

Merged
merged 1 commit into from
Sep 7, 2021

Conversation

rob05c
Copy link
Member

@rob05c rob05c commented Sep 7, 2021

Fixed t3c-update when a fallback to a previous Traffic Ops API version occurs.

The bug was that when a fallback occurred, the "old" client was doing a Get instead of a Set.

This also adds a log message of exactly the client's latest version and the version being fallen back to, e.g. INFO: client.go:112: 2021-09-07T19:56:59.82297Z: cache-config Traffic Ops client: 4.0 not supported, falling back to 3.1, which should be helpful in debugging, and in manually testing this fix.

No automated tests, unfortunately this can't be reasonably unit-tested since it's the TO request function itself, and the t3c Integration Test Framework doesn't yet have the ability to use multiple TO versions and fall back between them, and that'd be a pretty big feature to add. FWIW I manually tested and verified it's fixed, and sets the update flags in TO appropriately on a TO without the latest major in the client.
Includes changelog.
No docs, no interface change.

Which Traffic Control components are affected by this PR?

  • Traffic Control Cache Config (T3C, formerly ORT)

What is the best way to verify this PR?

Run t3c-update against a TO without the latest major version in the client, verify flags are set and unset as specified.

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

PR submission checklist

  • [x] This PR has tests explained above, can't be tested without a significant test framework enhancement
  • This PR has documentation
  • This PR has a CHANGELOG.md entry
  • This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY (see the Apache Software Foundation's security guidelines for details)

@rob05c rob05c added bug something isn't working as intended cache-config Cache config generation labels Sep 7, 2021
Copy link
Contributor

@jrushford jrushford left a comment

Choose a reason for hiding this comment

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

looks good. tested and it fixes the bug

@zrhoffman zrhoffman merged commit 96afe89 into apache:master Sep 7, 2021
zrhoffman pushed a commit that referenced this pull request Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working as intended cache-config Cache config generation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants