Alexandros Kosiaris has submitted this change and it was merged.
Change subject: contint: do not cache api/json calls
..
contint: do not cache api/json calls
The Jenkins server is being the misc varnish, when creating a Jenkins
job the script we are using first verify whether it exists (which cause
a 404), then create the job and verify it got created. That last step
is being served a 404 because of the cache. That cause us to create
each jobs individually instead of in bulks.
More details:
http://lists.wikimedia.org/pipermail/wikitech-l/2014-February/074829.html
This patch set the header "Cache-Control: no-cache,must-revalidated" for
any URL matching api/json.
Live hacked on the production machine gallium and confirmed the jobs can
now be created properly.
Change-Id: I3391de4fffcbf77624ad566ef541dbd8621faa76
---
M modules/contint/files/apache/proxy_jenkins
1 file changed, 8 insertions(+), 0 deletions(-)
Approvals:
Hashar: Verified; Looks good to me, but someone else must approve
Alexandros Kosiaris: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/contint/files/apache/proxy_jenkins
b/modules/contint/files/apache/proxy_jenkins
index 9c81536..58dd452 100644
--- a/modules/contint/files/apache/proxy_jenkins
+++ b/modules/contint/files/apache/proxy_jenkins
@@ -26,4 +26,12 @@
Order deny,allow
deny from env=bad_browser
+ # Jenkins is behind the misc varnish, the API calls lacks cache headers
+ # and their 4xx errors ends up being cached which causes troubles when
+ #
+ # Jenkins job builder creates a job (it check whether a job exists by
+ # hitting the API, which cache a 404, then checks whether the job got
+ # successfullyy created and fails beacuse it is server the cached 404).
+ SetEnvIf Request_URI .*/api/json.* NO_CACHE
+ Header set Cache-Control "no-cache,must-revalidate" env=NO_CACHE
--
To view, visit https://gerrit.wikimedia.org/r/116748
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I3391de4fffcbf77624ad566ef541dbd8621faa76
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar
Gerrit-Reviewer: Alexandros Kosiaris
Gerrit-Reviewer: Hashar
Gerrit-Reviewer: Krinkle
Gerrit-Reviewer: Mark Bergsma
Gerrit-Reviewer: MarkTraceur
Gerrit-Reviewer: Mwalker
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits