MCPcopy Create free account
hub / github.com/apache/arrow / _execute_compose

Method _execute_compose

dev/archery/archery/docker/core.py:197–224  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

195 self.pull_memory = set()
196
197 def _execute_compose(self, *args, **kwargs):
198 # execute as a docker compose command
199 try:
200 result = super().run(f'--file={self.config.path}', *args,
201 env=self.config.env, **kwargs)
202 result.check_returncode()
203 except subprocess.CalledProcessError as e:
204 def formatdict(d, template):
205 return '\n'.join(
206 template.format(k, v) for k, v in sorted(d.items())
207 )
208 msg = (
209 "`{cmd}` exited with a non-zero exit code {code}, see the "
210 "process log above.\n\nThe {bin} command was "
211 "invoked with the following parameters:\n\nDefaults defined "
212 "in .env:\n{dotenv}\n\nArchery was called with:\n{params}"
213 )
214 raise RuntimeError(
215 msg.format(
216 cmd=' '.join(e.cmd),
217 code=e.returncode,
218 bin=self.bin,
219 dotenv=formatdict(self.config.dotenv, template=' {}: {}'),
220 params=formatdict(
221 self.config.params, template=' export {}={}'
222 )
223 )
224 )
225
226 def _execute_docker(self, *args, **kwargs):
227 # execute as a plain docker cli command

Callers 4

_pullMethod · 0.95
_buildMethod · 0.95
runMethod · 0.95
_pushMethod · 0.95

Calls 4

check_returncodeMethod · 0.80
runMethod · 0.45
formatMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected