Skip to content

Instantly share code, notes, and snippets.

@alq666
Created July 18, 2012 17:25
Show Gist options
  • Save alq666/3137587 to your computer and use it in GitHub Desktop.
Save alq666/3137587 to your computer and use it in GitHub Desktop.
Patch for jenkins
diff --git a/checks/build.py b/checks/build.py
index 8563722..dbb75f8 100644
--- a/checks/build.py
+++ b/checks/build.py
@@ -38,6 +38,7 @@ class Hudson(object):
except ValueError:
raise Continue("Skipping non-timestamp dir: %s" % (dir_name))
else:
+ self.logger.debug("JENKINS path %s / ts %s / watermark %s" % (dir_name, timestamp, self.high_watermarks[job_name]))
# Check if it's a build we've seen already
if timestamp <= self.high_watermarks[job_name]:
raise Continue("Skipping old build: %s at %s" % (job_name, timestamp))
@@ -94,6 +95,7 @@ class Hudson(object):
def check(self, logger, agentConfig):
+ self.logger = logger
if self.high_watermarks is None:
# On the first run of check(), prime the high_watermarks dict
# so that we only send events that occured after the agent
@alq666
Copy link
Author

alq666 commented Jul 18, 2012

the builds are in the future because jenkins is recording its build timestamp in utc and we're parsing them as localtime

@alq666
Copy link
Author

alq666 commented Jul 18, 2012

Here's the bug for it DataDog/dd-agent#108

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment