Material notification in combination with config repositories

35 views
Skip to first unread message

AquilaNiger

unread,
Feb 19, 2020, 11:23:59 AM2/19/20
to go-cd
Hi community, 

we are currently in a transition phase, where we have two GoCD servers:
  • Old server A is a 19.11.0, grown over time and using some "old school" configuration
  • New server B is a 19.12.0, fresh installed and using config repositories for its pipelines
We decided to copy our pipelines step by step from server A to B thereby replacing the manual configuration with the nice config repositories feature, which is working fine.

Polling for materials is disabled, as we are using the SVN post-commit hook to trigger the relevant pipelines (also see ). For the transition phase I wanted to enable the hook for both servers, but unfortunately, the behavior is somehow different. In the post-commit hook I'm using:
curl https:/server-a:8154/go/api/admin/materials/svn/notify -k -u $username:$password -H 'Accept: application/vnd.go.cd.v2+json' -H 'Content-Type: application/json' -X POST -d '{"uuid": "cda78940-f9d9-4cad-b8c4-c86af5d00173"}'
curl https:/server-b:8154/go/api/admin/materials/svn/notify -k -u $username:$password -H 'Accept: application/vnd.go.cd.v2+json' -H 'Content-Type: application/json' -X POST -d '{"uuid": "cda78940-f9d9-4cad-b8c4-c86af5d00173"}'

Response of server A is 
{
  "message" : "The material is now scheduled for an update. Please check relevant pipeline(s) for status."
}
and the pipeline is triggered successfully.

Server B responds to the same request with 
{
  "message" : ""
}
and does not trigger anything.

Now I'm wondering if 
  • Something has changed in materials notification with 19.12.0
  • the concept of config repositories somehow conflicts with such notification hooks
  • I am doing something wrong that I'm not seeing
Is the API call logged somewhere? As always any help of this great community is appreciated.

Thanks in advance!

Ganesh Patil

unread,
Feb 20, 2020, 4:58:06 AM2/20/20
to go-cd
Hi AquilaNiger,

The GoCD Server v19.12.0 sending an empty message in the response seems like a bug to me.

Can you help us with the following information to debug this issue further?
- run the same command with -i option? It will provide the response code and the headers.
- the contents of the logs/go-server.log during the period when the API call is made.

Please make sure you redact sensitive information from the logs before sending it.

Thanks,
Ganesh

AquilaNiger

unread,
Feb 21, 2020, 8:42:42 AM2/21/20
to go-cd
Hi, 

I did what you said with the following results:

Server A working with 19.11.0:
curl https://server-a:8154/go/api/admin/materials/svn/notify -k -i -u $username:$password -H 'Accept: application/vnd.go.cd.v2+json' -H 'Content-Type: application/json' -X POST -d '{"uuid": "<uuid>"}'
HTTP
/1.1 202 Accepted
Date: Fri, 21 Feb 2020 08:56:51 GMT
X
-XSS-Protection: 1; mode=block
X
-Content-Type-Options: nosniff
X
-Frame-Options: SAMEORIGIN
X
-UA-Compatible: chrome=1
Set-Cookie: JSESSIONID=node0<sessionid>.node0; Path=/go; Expires=Fri, 06-Mar-2020 08:57:08 GMT; Max-Age=1209600; Secure; HttpOnly
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: max-age=0, private, must-revalidate
Content-Type: application/
vnd.go.cd.v2+json;charset=utf-8
Vary: Accept-Encoding, User-Agent
Transfer-Encoding: chunked


{
 
"message" : "The material is now scheduled for an update. Please check relevant pipeline(s) for status."
}



Server B failing with 19.12.0:
curl https://server-b:8154/go/api/admin/materials/svn/notify -k -i -u $username:$password -H 'Accept: application/vnd.go.cd.v2+json' -H 'Content-Type: application/json' -X POST -d '{"uuid": "<uuid>"}'
HTTP
/1.1 422 Unprocessable Entity
Date: Fri, 21 Feb 2020 08:57:36 GMT
X
-XSS-Protection: 1; mode=block
X
-Content-Type-Options: nosniff
X
-Frame-Options: SAMEORIGIN
X
-UA-Compatible: chrome=1
Set-Cookie: JSESSIONID=node0<sessionid>.node0; Path=/go; Expires=Fri, 06-Mar-2020 08:57:36 GMT; Max-Age=1209600; Secure; HttpOnly
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: max-age=0, private, must-revalidate
Content-Type: application/
vnd.go.cd.v2+json;charset=utf-8
X
-Runtime: 1
Transfer-Encoding: chunked


{
 
"message" : ""
}


So... what does "unprocessable entity" mean? Should I file an issue on GitHub?

Thanks for the help,
Julia

Aravind SV

unread,
Feb 21, 2020, 8:54:09 AM2/21/20
to go...@googlegroups.com
Hello Julia,

Yes, please open a GitHub issue. It'll be easier to track this there, and someone will take a look early next week.

Cheers,
Aravind

AquilaNiger

unread,
Feb 24, 2020, 4:40:57 AM2/24/20
to go-cd
Reply all
Reply to author
Forward
0 new messages