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

Change log / audit log error when snapshotting a cdn #5195

Closed
mitchell852 opened this issue Oct 26, 2020 · 0 comments · Fixed by #5366
Closed

Change log / audit log error when snapshotting a cdn #5195

mitchell852 opened this issue Oct 26, 2020 · 0 comments · Fixed by #5366
Labels
bug something isn't working as intended good first issue first-time committers will find this easy to resolve low impact affects only a small portion of a CDN, and cannot itself break one Traffic Ops related to Traffic Ops

Comments

@mitchell852
Copy link
Member

I'm submitting a ...

  • bug report

Traffic Control components affected ...

  • Traffic Ops

Current behavior:

Expected behavior:

The following change/audit log entry is created when a cdn is snapshotted:

CDN: cdn-name, ID: 0, ACTION: Snapshot of CRConfig and Monitor

Should be:

CDN: cdn-name, ID: {{cdn-id}}, ACTION: Snapshot of CRConfig and Monitor

Minimal reproduction of the problem with instructions:

PUT /api/version/snapshot and view the created change/audit log entry.

@mitchell852 mitchell852 added bug something isn't working as intended Traffic Ops related to Traffic Ops good first issue first-time committers will find this easy to resolve low impact affects only a small portion of a CDN, and cannot itself break one labels Oct 26, 2020
tcfdev pushed a commit to tcfdev/trafficcontrol that referenced this issue Dec 4, 2020
Currently, when a CDN snapshot has taken place a log entry with the
CDN ID is written to the Changelog. The handler is still responsible
for maintaining backwards compatibility with v1 API parameters.

As such, the log entry is currently only logging the CDN ID should
the API parameters match v1 legacy parameters.

Going forward the CDN ID shown in the changelog will match either
the v1 legacy "id" parameter or the newer "cdnID" parameter.
ocket8888 pushed a commit that referenced this issue Dec 10, 2020
* Show correct CDN ID in Changelog for snapshots (#5195)

Currently, when a CDN snapshot has taken place a log entry with the
CDN ID is written to the Changelog. The handler is still responsible
for maintaining backwards compatibility with v1 API parameters.

As such, the log entry is currently only logging the CDN ID should
the API parameters match v1 legacy parameters.

Going forward the CDN ID shown in the changelog will match either
the v1 legacy "id" parameter or the newer "cdnID" parameter.

* Include bug fix information in CHANGELOG

* Ensure ID value is validated in tests

* Make ID value check specific integer in test

* Add positive test to ensure ID result is returned

Co-authored-by: Taylor Frey <taylor_frey@comcast.com>
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 good first issue first-time committers will find this easy to resolve 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 a pull request may close this issue.

1 participant