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

Service Category in TO API uses non-RFC3339 date/time strings #7413

Closed
jagan-parthiban opened this issue Mar 18, 2023 · 0 comments · Fixed by #7408
Closed

Service Category in TO API uses non-RFC3339 date/time strings #7413

jagan-parthiban opened this issue Mar 18, 2023 · 0 comments · Fixed by #7408
Labels
bug something isn't working as intended tech debt rework due to choosing easy/limited solution Traffic Ops related to Traffic Ops

Comments

@jagan-parthiban
Copy link
Contributor

jagan-parthiban commented Mar 18, 2023

Parent Issue: #5911

Breaking down the parent issue #5911 in smaller issues to raise separate, reviewable PRs for each of the services.

Traffic Control components affected:

  • Traffic Ops
  • Documentation

Current behavior:

Using Deprecated TimeNoMod & TimeLayout

curl -k -X GET -H "Content-Type: application/json" --cookie $mojolicious_id "https://localhost:8443/api/4.1/service_categories?name=demo_app"

{"response":[{"lastUpdated":"2023-03-18 10:55:09+05","name":"demo_app"}]}

Expected behavior:

Using RFC3339 Format

curl -k -X GET -H "Content-Type: application/json" --cookie $mojolicious_id "https://localhost:8443/api/5.0/service_categories?name=demo_app"

{"response":[{"lastUpdated":"2023-03-18T10:55:09+05:30.979849","name":"demo_app"}]}

Steps to reproduce:

Make the above api call to 4.1 version

@jagan-parthiban jagan-parthiban added the improvement The functionality exists but it could be improved in some way. label Mar 18, 2023
jagan-parthiban added a commit to jagan-parthiban/trafficcontrol that referenced this issue Mar 24, 2023
Removing dependency of service catergory on generic cruder for V5 version
@zrhoffman zrhoffman added bug something isn't working as intended Traffic Ops related to Traffic Ops tech debt rework due to choosing easy/limited solution and removed improvement The functionality exists but it could be improved in some way. labels Mar 28, 2023
ocket8888 pushed a commit that referenced this issue Apr 19, 2023
…7408)

* This fixes service_category apis to respond with RFC3339 date/time strings. Issue: #5911

* This fixes service_category apis to respond with RFC3339 date/time strings.

* This fixes service_category apis to respond with RFC3339 date/time strings. This commit removed new struct TimeRFC3339 and uses time.Time instead

* This commit removed new struct TimeRFC3339 and uses time.Time instead

* #7413

Removing dependency of service catergory on generic cruder for V5 version

* Corrected Error messages statement

* Added Doc content for RFC 3339 Date/Time Format and updated service category docs.

* Updated Http Get operations for Service Category V5 to handle If-Modified-Since request HTTP header

* Added Unit Test Cases for V5 service_category functions

* Updated comments for the V5 service category functions.

* Updated CHANGELOG.md

* Added Unit test for db_helpers.go

* Addressed Code review from the PR.

* Addressed Code review from the PR.

* Addressed Code review from the PR.

* Addressed Code review from the PR.
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 tech debt rework due to choosing easy/limited solution Traffic Ops related to Traffic Ops
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants