pitrou commented on code in PR #14345:
URL: https://github.com/apache/arrow/pull/14345#discussion_r991314402
##########
dev/archery/archery/docker/cli.py:
##########
@@ -289,3 +289,26 @@ def docker_compose_images(obj):
click.echo('Available images:')
for image in compose.images():
click.echo(f' - {image}')
+
+
[email protected]('info')
[email protected]('service_name')
[email protected]('--only', '-o', required=False,
+ help="Show only specific docker-compose key. Examples of keys:"
+ " command, environment, build, dockerfile")
[email protected]_obj
+def docker_compose_info(obj, service_name, only):
+ """Show docker-compose definition info for service_name.
+
+ SERVICE_NAME is the name of the docker service defined on
+ the docker-compose. Look at `archery docker images` output for names.
+ """
+ compose = obj['compose']
+ try:
+ service = compose.config.raw_config["services"][service_name]
+ except KeyError:
+ click.echo(f'Service name {service_name} could not be found')
Review Comment:
This should behave more as an error, so for example:
```suggestion
click.echo(f'Service name {service_name} could not be found',
err=True)
sys.exit(1)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]