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 APIv4.0 returning APIv4.1 DS structures #7156

Merged
merged 4 commits into from Oct 26, 2022

Conversation

ocket8888
Copy link
Contributor

This PR fixes a bug introduced by #7111 where APIv4.0 responses containing representations of Delivery Services used the representation from APIv4.1.


Which Traffic Control components are affected by this PR?

  • Traffic Ops

What is the best way to verify this PR?

Make sure all the tests still pass, request Delivery Services at APIv4.0 and observe no regional property, then again at APIv4.1 and observe that it now does have the v4.1 regional property.

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

  • master

PR submission checklist

  • This PR utilizes existing tests
  • This PR needs no documentation because the bug was never released and documentation matches the intended behavior, not the bugged behavior
  • This PR needs no CHANGELOG.md entry because the bug was never released
  • This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY

@ocket8888 ocket8888 added bug something isn't working as intended Traffic Ops related to Traffic Ops low impact affects only a small portion of a CDN, and cannot itself break one low difficulty the estimated level of effort to resolve this issue is low labels Oct 25, 2022
Copy link
Member

@zrhoffman zrhoffman left a comment

Choose a reason for hiding this comment

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

Almost ready to merge, just 1 comment

Copy link
Member

@zrhoffman zrhoffman left a comment

Choose a reason for hiding this comment

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

API tests fail

 --- FAIL: TestDeliveryServices (4.98s)
    --- FAIL: TestDeliveryServices/GET (0.01s)
        --- FAIL: TestDeliveryServices/GET/OK_when_VALID_XMLID_parameter (0.01s)
panic: interface conversion: interface {} is []tc.DeliveryServiceV41, not []tc.DeliveryServiceV40 [recovered]
	panic: interface conversion: interface {} is []tc.DeliveryServiceV41, not []tc.DeliveryServiceV40

Copy link
Member

@zrhoffman zrhoffman 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!

@zrhoffman zrhoffman merged commit 56b9d3c into apache:master Oct 26, 2022
@ocket8888 ocket8888 deleted the to/fix-ds-versioning branch October 26, 2022 15:07
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 low difficulty the estimated level of effort to resolve this issue is low 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.

None yet

2 participants