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

New endpoint: Queue updates on the servers in a topology#5016

Merged
rawlinp merged 11 commits intoapache:masterfrom
zrhoffman:top-queue-updates
Sep 22, 2020
Merged

New endpoint: Queue updates on the servers in a topology#5016
rawlinp merged 11 commits intoapache:masterfrom
zrhoffman:top-queue-updates

Conversation

@zrhoffman
Copy link
Member

What does this PR (Pull Request) do?

  • This PR allowes you to queue updates on all servers in a topology by adding the POST /topologies/{name}/queue_update endpoint.
  • This PR is not related to any Issue

Which Traffic Control components are affected by this PR?

  • Documentation
  • Traffic Control Client (Go, Python)
  • Traffic Ops
  • Traffic Portal

What is the best way to verify this PR?

  • Run TO API tests
  • Run TP UI tests
  • Build docs

The following criteria are ALL met by this PR

  • This PR includes tests
  • This PR includes documentation
  • This PR includes an update to CHANGELOG.md
  • This PR includes any and all required license headers
  • This PR ensures that database migration sequence does not include a database migration
  • This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY (see the Apache Software Foundation's security guidelines for details)

@zrhoffman zrhoffman added documentation related to documentation tests related to tests and/or testing infrastructure Traffic Ops related to Traffic Ops Traffic Portal v1 related to Traffic Portal version 1 labels Sep 8, 2020
@zrhoffman zrhoffman added this to the Flexible Topologies milestone Sep 8, 2020
Copy link
Member

@shamrickus shamrickus left a comment

Choose a reason for hiding this comment

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

Only looked at the docs/TP changes, the TO changes should be reviewed before merging

LGTM

@zrhoffman
Copy link
Member Author

Rebased to master

@zrhoffman
Copy link
Member Author

Fixed a merge conflict due to gofmt

`
var err error
if _, err = tx.Exec(query, queue, topologyName, cdnId); err != nil {
err = fmt.Errorf("queueing updates: %s", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be err.Error() instead?

Copy link
Member Author

@zrhoffman zrhoffman Sep 18, 2020

Choose a reason for hiding this comment

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

Should it, as in will it not work unless it is err.Error()? fmt's reflection successfully casts error to string type because it only has 1 field, which is string type, so err works.

@srijeet0406
Copy link
Contributor

Unit tests pass, API tests pass.
Tested manually, by queueing and dequeueing updates based on topologies, and made sure that only the servers in the topology got affected.
Code looks good.
LGTM 👍

@rawlinp rawlinp merged commit 271f6a9 into apache:master Sep 22, 2020
@zrhoffman zrhoffman deleted the top-queue-updates branch September 22, 2020 21:12
@zrhoffman zrhoffman removed this from the Flexible Topologies milestone Oct 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

documentation related to documentation tests related to tests and/or testing infrastructure Traffic Ops related to Traffic Ops Traffic Portal v1 related to Traffic Portal version 1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants