-
Notifications
You must be signed in to change notification settings - Fork 344
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
Set server XMPPID to hostname if empty #5725
Conversation
traffic_ops/app/db/migrations/2021040819481469_generate_uuid_for_xmpp_id_where_empty.sql
Outdated
Show resolved
Hide resolved
there is some incorrect documentation regarding XMPPID. want to fix that too? lots of this:
a better description may be something like:
^^ Pretty sure I got that wrong. Maybe @rawlinp has a better definition. |
This is pretty good, but I would add that it's an immutable property. |
Isn't that part of v1 docs.. soon to go away? I checked the codebase and couldn't find the above mention in any other documentation. |
you are right @rimashah25 and it looks like it's better defined elsewhere:
|
Using the newer XMPPID definition for API v1 in a20cdf0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good now, just nitpicking the changelog and title :)
CHANGELOG.md
Outdated
@@ -47,6 +47,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). | |||
- [#5405](https://github.com/apache/trafficcontrol/issues/5405) - Prevent Tenant update from choosing child as new parent | |||
- [#5384](https://github.com/apache/trafficcontrol/issues/5384) - New grids will now properly remember the current page number. | |||
- [#5548](https://github.com/apache/trafficcontrol/issues/5548) - Don't return a `403 Forbidden` when the user tries to get servers of a non-existent DS using `GET /servers?dsId={{nonexistent DS ID}}` | |||
- [#5724](https://github.com/apache/trafficcontrol/issues/5724) - Generate XMPPID on update if the server had none |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this PR no longer generates UUIDs for XMPPID, we should probably say Set XMPPID to hostname if the server had none, don't error on server update when XMPPID is empty
.
Also, would the title would make more sense now as "Set server XMPPID to hostname if empty"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated PR title and updated changelog entry in 04f137b.
Also if this PR is considered for backporting to a release branch, the backport should not include the DB migration. The code fix alone should be sufficient for fixing the bug. |
* Generate XMPPID on server update if it is empty * Hyphenate traffic-ops.yml * Simplify condition * Do not persistently set XMPPID on PUT if it is empty * Remove xmpp_id from SQL query * Include hostname in warning * Use newer definition of XMPPID for API v1 * More accurate changelog entry (cherry picked from commit f599571)
* Generate XMPPID on server update if it is empty * Hyphenate traffic-ops.yml * Simplify condition * Do not persistently set XMPPID on PUT if it is empty * Remove xmpp_id from SQL query * Include hostname in warning * Use newer definition of XMPPID for API v1 * More accurate changelog entry (cherry picked from commit f599571)
What does this PR (Pull Request) do?
This PR also adds a migration to set the XMPPID to the hostname for each server in the database for which the
xmpp_id
field is empty.Which Traffic Control components are affected by this PR?
What is the best way to verify this PR?
If this is a bug fix, what versions of Traffic Control are affected?
The following criteria are ALL met by this PR