Module: check_mk
Branch: master
Commit: f996c5135956ecc4d9b998ce9067e5c7234e59b2
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f996c5135956ec…
Author: Tom Baerwinkel <tb(a)mathias-kettner.de>
Date: Fri Mar 2 17:13:05 2018 +0100
5745 FIX handle deferred notification properly
After the first retry deferred notification did not respect the cooldown time
defined in the global settings anymore. Furthermore the counting of the
configured retries was not done properly. If e.g. a retry count of one was
specified actually three retries were performed. These two issues have now
been fixed.
Change-Id: Ic5ba66ed8f2deba410217c595ada5d3205bc0f7e
---
.werks/5745 | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/.werks/5745 b/.werks/5745
new file mode 100644
index 0000000..83cabbe
--- /dev/null
+++ b/.werks/5745
@@ -0,0 +1,14 @@
+Title: handle deferred notification properly
+Level: 1
+Component: notifications
+Compatible: compat
+Edition: cee
+Version: 1.5.0i4
+Date: 1520006666
+Class: fix
+
+After the first retry deferred notification did not respect the cooldown time
+defined in the global settings anymore. Furthermore the counting of the
+configured retries was not done properly. If e.g. a retry count of one was
+specified actually three retries were performed. These two issues have now
+been fixed.
Module: check_mk
Branch: master
Commit: 247e5cf52613729b2aa0b2fb46e063204d05c462
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=247e5cf5261372…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Mar 2 13:34:35 2018 +0100
5875 FIX Git: Fixed error "git add --all ... is outside repository" with older git versions
When using older git versions (saw this with 1.7.1) an error could occur when enabling the
git integration of WATO. This was caused by an incompatibility with the "git add" command
used by WATO. It used absolute paths to add the new files that should be added to git instead
of relative paths to the current working directory.
This issue was present in all 1.4.0 releases.
Change-Id: Iaffb451bb6b16840926093fa4b21742956c73128
---
.werks/5875 | 16 ++++++++++++++++
web/htdocs/watolib.py | 7 ++++---
2 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/.werks/5875 b/.werks/5875
new file mode 100644
index 0000000..190f957
--- /dev/null
+++ b/.werks/5875
@@ -0,0 +1,16 @@
+Title: Git: Fixed error "git add --all ... is outside repository" with older git versions
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i4
+Date: 1519993814
+
+When using older git versions (saw this with 1.7.1) an error could occur when enabling the
+git integration of WATO. This was caused by an incompatibility with the "git add" command
+used by WATO. It used absolute paths to add the new files that should be added to git instead
+of relative paths to the current working directory.
+
+This issue was present in all 1.4.0 releases.
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index 66b8cde..de3e45e 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -9758,7 +9758,7 @@ def unlock_exclusive():
def git_command(args):
command = [ "git" ] + [ a.encode("utf-8") for a in args ]
- logger.debug("GIT: Execute %s" % subprocess.list2cmdline(command))
+ logger.debug("GIT: Execute in %s: %s" % (cmk.paths.default_config_dir, subprocess.list2cmdline(command)))
try:
p = subprocess.Popen(command, cwd=cmk.paths.default_config_dir,
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
@@ -9815,8 +9815,9 @@ def do_git_commit():
def git_add_files():
- git_command(["add", "--all", ".gitignore"]
- + glob.glob("%s/*.d/wato" % cmk.paths.default_config_dir))
+ path_pattern = os.path.join(cmk.paths.default_config_dir, "*.d/wato")
+ rel_paths = [ os.path.relpath(p, cmk.paths.default_config_dir) for p in glob.glob(path_pattern) ]
+ git_command(["add", "--all", ".gitignore"] + rel_paths)
def git_has_pending_changes():