This is an automated email from the ASF dual-hosted git repository.
ocket8888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
The following commit(s) were added to refs/heads/master by this push:
new 6ec05e5778 Fixes alert message for POST and PUT invalidationjobs API
(#7517)
6ec05e5778 is described below
commit 6ec05e5778eb3391fb4dd9278134a4446250e164
Author: Rima Shah <[email protected]>
AuthorDate: Thu May 25 10:32:22 2023 -0600
Fixes alert message for POST and PUT invalidationjobs API (#7517)
* Fixed alert message for POST and PUT invalidationjobs API
* merge changelog
* Fixed error message.
---
CHANGELOG.md | 1 +
traffic_ops/traffic_ops_golang/invalidationjobs/invalidationjobs.go | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bed1df5502..f8b8afc7e0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -54,6 +54,7 @@ The format is based on [Keep a
Changelog](http://keepachangelog.com/en/1.0.0/).
- [#7469](https://github.com/apache/trafficcontrol/pull/7469) *Traffic Ops*
Changed logic to not report empty or missing cookies into TO error.log.
### Fixed
+- [#6340](https://github.com/apache/trafficcontrol/issues/6340) *Traffic Ops*
Fixed alert messages for POST and PUT invalidation job APIs.
- [#7511](https://github.com/apache/trafficcontrol/pull/7511) *Traffic Ops*
Fixed the changelog registration message to include the username instead of
duplicate email entry.
- [#7465](https://github.com/apache/trafficcontrol/issues/7465) *Traffic Ops*
Fixes server_capabilities v5 apis to respond with RFC3339 date/time Format
- [#7441](https://github.com/apache/trafficcontrol/pull/7441) *Traffic Ops*
Fixed the invalidation jobs endpoint to respect CDN locks.
diff --git
a/traffic_ops/traffic_ops_golang/invalidationjobs/invalidationjobs.go
b/traffic_ops/traffic_ops_golang/invalidationjobs/invalidationjobs.go
index 22f9d887b5..41a0f5a5aa 100644
--- a/traffic_ops/traffic_ops_golang/invalidationjobs/invalidationjobs.go
+++ b/traffic_ops/traffic_ops_golang/invalidationjobs/invalidationjobs.go
@@ -958,7 +958,7 @@ func UpdateV40(w http.ResponseWriter, r *http.Request) {
if job.InvalidationType != input.InvalidationType {
if input.InvalidationType == tc.REFETCH &&
!refetchAllowed(inf.Tx.Tx) {
- userErr = errors.New("Invalidation Type REFRESH is
disallowed")
+ userErr = errors.New("Invalidation Type REFETCH is
disallowed")
errCode = http.StatusBadRequest
api.HandleErr(w, r, inf.Tx.Tx, errCode, userErr, nil)
return
@@ -1455,7 +1455,7 @@ func validateJobCreateV4(job tc.InvalidationJobCreateV4,
tx *sql.Tx) error {
}
if job.InvalidationType == tc.REFETCH && !refetchAllowed(tx) {
- errs = append(errs, "InvalidationType is invalid")
+ errs = append(errs, "invalidationType is not allowed since
'refetch_enabled' parameter doesn't exists or the value is not set to a
case-insensitive 'true'")
}
if len(errs) > 0 {