Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parsing of docker-compose output. #424

Merged

Conversation

GrahamDennis
Copy link
Contributor

Before this PR

Newer versions of docker-compose (at least 1.25.0-rc4) adjust the output based on the number of columns available in the terminal. This interferes with parsing of the output and can cause errors like "No internal port X for container Y" when the port does exist. This is because of a parse failure while parsing the output of docker-compose ps.

After this PR

==COMMIT_MSG==
Set the COLUMNS environment variable to an artificially large value for the docker-compose process. This works around newer versions of docker-compose (at least 1.25.0-rc4+) which adjust their output based on the width of the terminal.
==COMMIT_MSG==

Newer versions of docker-compose (at least 1.25.0-rc4) adjust the output
based on the number of columns available in the terminal. This
interferes with parsing of the output. This is fixed by setting the
`COLUMNS` environment variable to an artificially large value.
@changelog-app
Copy link

changelog-app bot commented Dec 16, 2019

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Set the COLUMNS environment variable to an artificially large value for the docker-compose process. This works around newer versions of docker-compose (at least 1.25.0-rc4+) which adjust their output based on the width of the terminal.

Check the box to generate changelog(s)

  • Generate changelog entry

@policy-bot policy-bot bot requested a review from ferozco December 16, 2019 23:53
Copy link
Contributor

@CRogers CRogers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. #418 also aims to fix this same problem and will do port parsing in a more sensible way (than parsing ps output). I still need to review it though, as it's a much larger change, so I'm happy to merge this now to fix the immediate issue.

@bulldozer-bot bulldozer-bot bot merged commit 65a2d8a into palantir:master Dec 18, 2019
@svc-autorelease
Copy link
Collaborator

Released 1.4.2

@GrahamDennis
Copy link
Contributor Author

@CRogers: thanks! Note that the past few releases aren't getting published by Circle. It seems like the builds are getting stuck. See https://circleci.com/gh/palantir/docker-compose-rule/5316

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants