Skip to content

Commit

Permalink
Bump version to 1.28.0
Browse files Browse the repository at this point in the history
  • Loading branch information
karkhaz committed Mar 2, 2023
2 parents 2e96431 + 3bf8b6f commit 00e2dda
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
10 changes: 10 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
CHANGELOG
`````````

Version 1.28.0 -- 2023-03-02
----------------------------
This is a bugfix release containing the following fix:
- Ensure signal handler does not run concurrently

Currently, a signal handler may be invoked while another one is
running. This resulted in a race when two concurrent python functions
attempted to read from and write to the same file.


Version 1.27.0 -- 2022-08-03
----------------------------
- Modify behavior of acquire-html-dir command
Expand Down
2 changes: 1 addition & 1 deletion lib/litani.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
TIME_FORMAT_W = "%Y-%m-%dT%H:%M:%SZ"
TIME_FORMAT_MS = "%Y-%m-%dT%H:%M:%S.%fZ"
VERSION_MAJOR = 1
VERSION_MINOR = 27
VERSION_MINOR = 28
VERSION_PATCH = 0
RC = False

Expand Down
9 changes: 9 additions & 0 deletions lib/run_printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
DUMP_SIGNAL = signal.SIGUSR1
_DUMPED_RUN = "dumped-run.json"

_SIGNAL_HANDLER_RUNNING = False


def add_subparser(subparsers):
dump_run_pars = subparsers.add_parser("dump-run")
Expand Down Expand Up @@ -206,7 +208,14 @@ class DumpRunSignalHandler:


def __call__(self, _signum, _frame):
global _SIGNAL_HANDLER_RUNNING

if _SIGNAL_HANDLER_RUNNING:
return

_SIGNAL_HANDLER_RUNNING = True
run = lib.litani_report.get_run_data(self.cache_dir)
with lib.litani.atomic_write(
self.cache_dir / _DUMPED_RUN) as handle:
print(json.dumps(run, indent=2), file=handle)
_SIGNAL_HANDLER_RUNNING = False

0 comments on commit 00e2dda

Please sign in to comment.