Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Conversation

@rawlinp
Copy link
Contributor

@rawlinp rawlinp commented Sep 21, 2018

What does this PR do?

Prevent the submission of content invalidation requests against DS types
that don't have origins (e.g. CLIENT_STEERING).

Which TC components are affected by this PR?

  • Documentation
  • Grove
  • Traffic Analytics
  • Traffic Monitor
  • Traffic Ops
  • Traffic Ops ORT
  • Traffic Portal
  • Traffic Router
  • Traffic Stats
  • Traffic Vault
  • Other _________

What is the best way to verify this PR?

Submit a content invalidation job for a delivery service with an origin and make sure the API allows it. Then submit a job for a delivery service without an origin (like CLIENT_STEERING) and make sure the API prohibits it.

Check all that apply

  • This PR includes tests
  • This PR includes documentation updates
  • This PR includes an update to CHANGELOG.md
  • This PR includes all required license headers
  • This PR includes a database migration (ensure that migration sequence is correct)
  • This PR fixes a serious security flaw. Read more: www.apache.org/security

@rawlinp rawlinp added bug something isn't working as intended Traffic Ops API high impact impacts the basic function, deployment, or operation of a CDN labels Sep 21, 2018
Prevent the submission of content invalidation requests against DS types
that don't have origins (e.g. CLIENT_STEERING).
@rawlinp rawlinp force-pushed the fix-jobs-with-no-origin branch from 7113ebc to b18f625 Compare September 21, 2018 21:29
return $self->not_found();
}
my $org_server_fqdn = UI::DeliveryService::compute_org_server_fqdn($self, $ds_id);
if ( !defined($org_server_fqdn) ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should check for empty string as well as !defined.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The compute_org_server_fqdn function will never return an empty string, only undef or a valid-looking orgServerFqdn string built from the DS's primary origin.

@asfgit
Copy link
Contributor

asfgit commented Sep 21, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/2485/
Test FAILed.

@mitchell852 mitchell852 self-assigned this Sep 21, 2018
@mitchell852 mitchell852 merged commit c06696a into apache:master Sep 21, 2018
@rawlinp rawlinp deleted the fix-jobs-with-no-origin branch October 29, 2018 20:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug something isn't working as intended high impact impacts the basic function, deployment, or operation of a CDN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants