diff --git a/RELEASE.txt b/CHANGELOG.md similarity index 95% rename from RELEASE.txt rename to CHANGELOG.md index 76270a77a..0743646f2 100644 --- a/RELEASE.txt +++ b/CHANGELOG.md @@ -1,8 +1,18 @@ -# This number should track progressive changes in this software, and correspond to git tags -# denoting releases. It is entirely independent of the the Pavilion's VERSION. -RELEASE=2.6.1 +# Changelog -## 2.6.1 Release Notes +All notable changes to Pavilion will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [2.6.2] - 2026-06-10 + +### Fixed + +- Fixed a race condition which caused result loggers to sometimes read tests' result files before + they had been fully written, resulting in `null` results and missing keys in the result log. + +## [2.6.1] - 2026-05-12 - Fixed a bug which caused some tests in a series to be loaded multiple times and others not at all. - Fixed a bug in which test runs were placed in the wrong working directory when multiple @@ -21,7 +31,7 @@ RELEASE=2.6.1 of creation (in ISO 8601 format) to prevent result logs from being incorrectly combined when series IDs are reused. -## 2.6 Release Notes +## [2.6] - 2026-03-25 - Test run directories are now named based on the series-relative IDs of test runs (e.g. `s1.1`). This reduces lock contention when creating test runs, since IDs in different series are now @@ -43,9 +53,7 @@ RELEASE=2.6.1 - Various minor bug mixes. - Minor documentation edits. -# Release History - -## 2.5 Release Notes +## [2.5] - 2026-01-14 - Tests can (and should) now be structured as suites directories, which can contain test, host, mode, and os configs, as well as test source code. The `test_src` directory is now deprecated. @@ -92,7 +100,8 @@ RELEASE=2.6.1 - Added an '--all-passed' option to the results command - Added `pav log states` command, which lists all states a test has had. -## 2.4 Release Notes +## [2.4] - 2022-02-22 + - Minimum supported python version is now 3.6 - All IO or Processor intensive parts of Pavilion have been made multi-threaded or multi-process, vastly speeding up many Pavilion operations. @@ -189,7 +198,8 @@ Scheduler variables have also changed considerable. - All slurm `alloc_*` variables are now `test_*`. - Most can be converted directly. -## 2.3 Release Notes +## [2.3] - 2021-01-20 + - Added 'flatten_results' option to the base Pavilion config. Allows for producing a separate result log line for each 'per_file' result, making charting in Splunk significantly easier. The results can be significantly @@ -223,7 +233,8 @@ Scheduler variables have also changed considerable. - The results command '--json' argument and '--oneline' argments were removed. Use --summary instead. -## 2.2 Release notes +## [2.2] - 2020-07-16 + - All new test config parser. - Variable references are now 'expressions'. - In addition to variables, they can contain math and functions. @@ -289,10 +300,12 @@ Scheduler variables have also changed considerable. email: pferrell@lanl.gov ``` -## 2.1.2 +## [2.1.2] - 2020-03-17 + - Fixed some regressions from the 2.1.1 release. -## 2.1.1 +## [2.1.1] - 2020-03-17 + - Fixed speed of draw_table with new algorithm - Fixed some name conflicts with the 'per_fullname' and 'per_name' result parser options. - Fixed issue with pipe exceptions in pav results @@ -309,7 +322,8 @@ Scheduler variables have also changed considerable. - Added better build tracking output and verbosity under the 'run' command. -## 2.1 +## [2.1] - 2019-12-19 + - Quite a few bugfixes. - Simplified time output (and dropped pytz dependency) - Updated regex parser. @@ -325,7 +339,7 @@ Scheduler variables have also changed considerable. - Fixed RUN_COMPLETE files. They are now made when a test is finished, fails, is cancelled, and in most error cases. -## 2.0 +## [2.0] - 2019-11-18 - All new Pavilion 2.0 redesign - Pavilion was completely redesigned and reimplemented for this release. diff --git a/lib/pavilion/config.py b/lib/pavilion/config.py index b52e21b3e..bc66cbd32 100644 --- a/lib/pavilion/config.py +++ b/lib/pavilion/config.py @@ -8,6 +8,7 @@ import grp import os import stat +import re from collections import OrderedDict from operator import itemgetter from pathlib import Path @@ -23,6 +24,9 @@ PAV_CONFIG_NAME = 'pavilion.yaml' CONFIG_NAME = 'config.yaml' +CHANGELOG_NAME = "CHANGELOG.md" + +VERSION_REGEX = re.compile(r"\[(\d+\.\d+\.\d+)\]") try: USER_HOME_PAV = (Path('~')/'.pavilion').expanduser() @@ -824,16 +828,19 @@ def make_config(options: dict, setup_working_dirs: bool = True): def get_version() -> str: """Returns the current version of Pavilion.""" - version_path = PAV_ROOT / 'RELEASE.txt' + version_path = PAV_ROOT / CHANGELOG_NAME try: with version_path.open() as file: - lines = file.readlines() - for line in lines: - if line.startswith('RELEASE='): - return line.split('=')[1].strip() + for line in file: + match = VERSION_REGEX.search(line) + + if match: + return match.group(1) - return '' + raise RuntimeError("Version not found.") + return '' except FileNotFoundError: + raise return ''