Merge lp:~jelmer/brz/config-race-trunk into lp:brz

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: 7931
Merged at revision: 7931
Proposed branch: lp:~jelmer/brz/config-race-trunk
Merge into: lp:brz
Diff against target: 29 lines (+7/-3)
1 file modified
breezy/config.py (+7/-3)
To merge this branch: bzr merge lp:~jelmer/brz/config-race-trunk
Reviewer Review Type Date Requested Status
Jelmer Vernooij Approve
Review via email: mp+462105@code.launchpad.net

Commit message

Ignore race conditions loading config

Description of the change

Ignore race conditions loading config

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :
Download full text (15.1 KiB)

The attempt to merge lp:~jelmer/brz/config-race-trunk into lp:brz failed. Command exited with 2.
Below is the output from the failed tests.

Collecting setuptools-gettext
  Using cached setuptools_gettext-0.1.11-py3-none-any.whl.metadata (1.9 kB)
Requirement already satisfied: setuptools>=60.8 in ./lib/python3.11/site-packages (from setuptools-gettext) (68.1.2)
Using cached setuptools_gettext-0.1.11-py3-none-any.whl (13 kB)
Installing collected packages: setuptools-gettext
Successfully installed setuptools-gettext-0.1.11
Obtaining file:///tmp/tarmac/branch.oulr26om
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Checking if build backend supports build_editable: started
  Checking if build backend supports build_editable: finished with status 'done'
  Getting requirements to build editable: started
  Getting requirements to build editable: finished with status 'done'
  Installing backend dependencies: started
  Installing backend dependencies: finished with status 'done'
  Preparing editable metadata (pyproject.toml): started
  Preparing editable metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: configobj in /usr/lib/python3/dist-packages (from breezy==3.4.0.dev0) (5.0.8)
Requirement already satisfied: fastbencode in /usr/lib/python3/dist-packages (from breezy==3.4.0.dev0) (0.2)
Requirement already satisfied: patiencediff in /usr/lib/python3/dist-packages (from breezy==3.4.0.dev0) (0.2.13)
Requirement already satisfied: merge3 in /usr/lib/python3/dist-packages (from breezy==3.4.0.dev0) (0.0.8)
Requirement already satisfied: dulwich>=0.21.6 in /usr/lib/python3/dist-packages (from breezy==3.4.0.dev0) (0.21.6)
Requirement already satisfied: urllib3>=1.24.1 in /usr/lib/python3/dist-packages (from breezy==3.4.0.dev0) (1.26.18)
Requirement already satisfied: pyyaml in /usr/lib/python3/dist-packages (from breezy==3.4.0.dev0) (6.0.1)
Collecting testtools>=0.9.5 (from breezy==3.4.0.dev0)
  Using cached testtools-2.7.1-py3-none-any.whl.metadata (5.3 kB)
Collecting testscenarios (from breezy==3.4.0.dev0)
  Using cached testscenarios-0.5.0-py2.py3-none-any.whl.metadata (12 kB)
Collecting python-subunit (from breezy==3.4.0.dev0)
  Using cached python_subunit-1.4.4-py3-none-any.whl.metadata (22 kB)
Collecting cython>=0.29 (from breezy==3.4.0.dev0)
  Using cached Cython-3.0.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.2 kB)
Requirement already satisfied: ruff in /usr/local/lib/python3.11/dist-packages (from breezy==3.4.0.dev0) (0.3.2)
Collecting docutils (from breezy==3.4.0.dev0)
  Using cached docutils-0.20.1-py3-none-any.whl.metadata (2.8 kB)
Requirement already satisfied: setuptools in ./lib/python3.11/site-packages (from breezy==3.4.0.dev0) (68.1.2)
Collecting sphinx (from breezy==3.4.0.dev0)
  Using cached sphinx-7.2.6-py3-none-any.whl.metadata (5.9 kB)
Collecting sphinx-epytext (from breezy==3.4.0.dev0)
  Using cached sphinx_epytext-0.0.4-py3-none-any.whl
Collecting fastimport (from breezy==3.4.0.dev0)
  Using cached fastimport-0.9.14-py2.py3-none-any.whl
Requirement already satisfied: launchpadlib>=1.6.3 in /usr/lib/python3/dist-pac...

Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :
Download full text (13.4 KiB)

The attempt to merge lp:~jelmer/brz/config-race-trunk into lp:brz failed. Command exited with 2.
Below is the output from the failed tests.

Collecting setuptools-gettext
  Downloading setuptools_gettext-0.1.11-py3-none-any.whl.metadata (1.9 kB)
Requirement already satisfied: setuptools>=60.8 in ./lib/python3.11/site-packages (from setuptools-gettext) (68.1.2)
Downloading setuptools_gettext-0.1.11-py3-none-any.whl (13 kB)
Installing collected packages: setuptools-gettext
Successfully installed setuptools-gettext-0.1.11
Obtaining file:///tmp/tarmac/branch.svcsxw51
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Checking if build backend supports build_editable: started
  Checking if build backend supports build_editable: finished with status 'done'
  Getting requirements to build editable: started
  Getting requirements to build editable: finished with status 'done'
  Installing backend dependencies: started
  Installing backend dependencies: finished with status 'done'
  Preparing editable metadata (pyproject.toml): started
  Preparing editable metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: configobj in /usr/lib/python3/dist-packages (from breezy==3.4.0.dev0) (5.0.8)
Requirement already satisfied: fastbencode in /usr/lib/python3/dist-packages (from breezy==3.4.0.dev0) (0.2)
Requirement already satisfied: patiencediff in /usr/lib/python3/dist-packages (from breezy==3.4.0.dev0) (0.2.13)
Requirement already satisfied: merge3 in /usr/lib/python3/dist-packages (from breezy==3.4.0.dev0) (0.0.8)
Requirement already satisfied: dulwich>=0.21.6 in /usr/lib/python3/dist-packages (from breezy==3.4.0.dev0) (0.21.6)
Requirement already satisfied: urllib3>=1.24.1 in /usr/lib/python3/dist-packages (from breezy==3.4.0.dev0) (1.26.18)
Requirement already satisfied: pyyaml in /usr/lib/python3/dist-packages (from breezy==3.4.0.dev0) (6.0.1)
Collecting testtools>=0.9.5 (from breezy==3.4.0.dev0)
  Downloading testtools-2.7.1-py3-none-any.whl.metadata (5.3 kB)
Collecting testscenarios (from breezy==3.4.0.dev0)
  Downloading testscenarios-0.5.0-py2.py3-none-any.whl.metadata (12 kB)
Collecting python-subunit (from breezy==3.4.0.dev0)
  Downloading python_subunit-1.4.4-py3-none-any.whl.metadata (22 kB)
Collecting cython>=0.29 (from breezy==3.4.0.dev0)
  Using cached Cython-3.0.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.2 kB)
Requirement already satisfied: ruff in /usr/local/lib/python3.11/dist-packages (from breezy==3.4.0.dev0) (0.3.3)
Collecting docutils (from breezy==3.4.0.dev0)
  Downloading docutils-0.20.1-py3-none-any.whl.metadata (2.8 kB)
Requirement already satisfied: setuptools in ./lib/python3.11/site-packages (from breezy==3.4.0.dev0) (68.1.2)
Collecting sphinx (from breezy==3.4.0.dev0)
  Downloading sphinx-7.2.6-py3-none-any.whl.metadata (5.9 kB)
Collecting sphinx-epytext (from breezy==3.4.0.dev0)
  Downloading sphinx-epytext-0.0.4.tar.gz (3.6 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting fastimport (from breezy==3.4.0.dev0)
  Downloading fastimport-0.9.14.tar.gz (...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/config.py'
2--- breezy/config.py 2023-11-16 15:15:02 +0000
3+++ breezy/config.py 2024-03-16 16:21:54 +0000
4@@ -3169,18 +3169,22 @@
5 Args:
6 bytes: A string representing the file content.
7 """
8- if self.is_loaded():
9- raise AssertionError(f"Already loaded: {self._config_obj!r}")
10 co_input = BytesIO(bytes)
11 try:
12 # The config files are always stored utf8-encoded
13- self._config_obj = ConfigObj(co_input, encoding="utf-8", list_values=False)
14+ new_config_obj = ConfigObj(co_input, encoding="utf-8", list_values=False)
15 except configobj.ConfigObjError as e:
16 self._config_obj = None
17 raise ParseConfigError(e.errors, self.external_url()) from e
18 except UnicodeDecodeError as e:
19 raise ConfigContentError(self.external_url()) from e
20
21+ if self._config_obj is not None:
22+ if new_config_obj != self._config_obj:
23+ raise AssertionError("ConfigObj instances are not equal")
24+
25+ self._config_obj = new_config_obj
26+
27 def save_changes(self):
28 if not self.is_loaded():
29 # Nothing to save

Subscribers

People subscribed via source and target branches