Skip to content

Update Compose reference API to v2.16.0#16702

Merged
aevesdocker merged 1 commit intodocker:mainfrom
glours:compose-api-reference-v2.16.0
Feb 10, 2023
Merged

Update Compose reference API to v2.16.0#16702
aevesdocker merged 1 commit intodocker:mainfrom
glours:compose-api-reference-v2.16.0

Conversation

@glours
Copy link
Copy Markdown
Contributor

@glours glours commented Feb 9, 2023

Signed-off-by: GitHub noreply@github.com

Proposed changes

Replace auto-generated PR #16692

Related issues (optional)

@netlify
Copy link
Copy Markdown

netlify Bot commented Feb 9, 2023

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit 76a2954
🔍 Latest deploy log https://app.netlify.com/sites/docsdocker/deploys/63e600635f62950007c36574
😎 Deploy Preview https://deploy-preview-16702--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@glours
Copy link
Copy Markdown
Contributor Author

glours commented Feb 9, 2023

@thaJeztah I opened this PR as I was able to update the one opened by the bot.
You could see the error I mentioned to you.
Feel free to update directly this PR
@ndeloof if you can follow that one during my time off please 🙏

@thaJeztah
Copy link
Copy Markdown
Member

I'm looking at the failure;

#15 40.02   Liquid Exception: undefined method `gsub' for nil:NilClass in engine/reference/commandline/compose_config.md
#15 40.02                     ------------------------------------------------
#15 40.02       Jekyll 4.2.2   Please append `--trace` to the `build` command 
#15 40.02                      for any additional information or backtrace. 
#15 40.02                     ------------------------------------------------
#15 40.02 /src/_plugins/relative_links_filter.rb:47:in `replace_relative_links': undefined method `gsub' for nil:NilClass (NoMethodError)

Comment thread _redirects.yml Outdated
Comment on lines +131 to +132

"/engine/reference/commandline/compose_config/":
- /engine/reference/commandline/compose_convert/
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not the cause of the error, but for these, we usually use the redirects_from metadata in the target markdown file. That way the redirects get preserved when the file moves around, which can make it easier to maintain.

@thaJeztah
Copy link
Copy Markdown
Member

Ah! I think I see what's happening; I'll push a commit.

Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah force-pushed the compose-api-reference-v2.16.0 branch from 9d77a44 to 76a2954 Compare February 10, 2023 08:29
@thaJeztah
Copy link
Copy Markdown
Member

@glours this was the issue; the stub has a reference to the name of the datafile (yaml) to include, so that had to be updated. I also moved the redirect to that file; https://github.com/docker/docs/compare/9d77a4495080202daeb66b365ec12e6687a9f7a0..76a295426016557f883f9775c61c71ab16f8e9db
Screenshot 2023-02-10 at 09 31 24

@thaJeztah
Copy link
Copy Markdown
Member

I must say that the BuildKit error output is not very informative here; I'll open a ticket for that;

It's outputing the Dockerfile instructions that failed 3 (4?) times, but none of the errors contain the output of the command (which is the actual error you'd be looking for #16702 (comment) in this case);

#15 ERROR: process "/bin/sh -c   set -eu\n  CONFIG_FILES=\"_config.yml\"\n  if [ \"${JEKYLL_ENV}\" = \"production\" ]; then\n    CONFIG_FILES=\"${CONFIG_FILES},_config_production.yml\"\n  elif [ \"${DOCS_URL}\" = \"https://docs-stage.docker.com\" ]; then\n    CONFIG_FILES=\"${CONFIG_FILES},_config_stage.yml\"\n  fi\n  set -x\n  bundle exec jekyll build --profile -d ${TARGET} --config ${CONFIG_FILES}\n" did not complete successfully: exit code: 1
------
 > [generate 1/1] RUN --mount=type=bind,target=.,rw     --mount=type=cache,target=/tmp/docker-docs-clone     --mount=type=cache,target=/src/.jekyll-cache <<EOT (set -eu...):
#15 40.02 	from /usr/local/bundle/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
#15 40.02 	from /usr/local/bundle/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
#15 40.02 	from /usr/local/bundle/gems/bundler-2.3.13/lib/bundler/cli.rb:31:in `dispatch'
#15 40.02 	from /usr/local/bundle/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
#15 40.02 	from /usr/local/bundle/gems/bundler-2.3.13/lib/bundler/cli.rb:25:in `start'
#15 40.02 	from /usr/local/bundle/gems/bundler-2.3.13/exe/bundle:48:in `block in <top (required)>'
#15 40.02 	from /usr/local/bundle/gems/bundler-2.3.13/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
#15 40.02 	from /usr/local/bundle/gems/bundler-2.3.13/exe/bundle:36:in `<top (required)>'
#15 40.02 	from /usr/local/bundle/bin/bundle:23:in `load'
#15 40.02 	from /usr/local/bundle/bin/bundle:23:in `<main>'
------
Dockerfile:52
--------------------
  51 |     ENV TARGET=/out
  52 | >>> RUN --mount=type=bind,target=.,rw \
  53 | >>>     --mount=type=cache,target=/tmp/docker-docs-clone \
  54 | >>>     --mount=type=cache,target=/src/.jekyll-cache <<EOT
  55 | >>>   set -eu
  56 | >>>   CONFIG_FILES="_config.yml"
  57 | >>>   if [ "${JEKYLL_ENV}" = "production" ]; then
  58 | >>>     CONFIG_FILES="${CONFIG_FILES},_config_production.yml"
  59 | >>>   elif [ "${DOCS_URL}" = "https://docs-stage.docker.com" ]; then
  60 | >>>     CONFIG_FILES="${CONFIG_FILES},_config_stage.yml"
  61 | >>>   fi
  62 | >>>   set -x
  63 | >>>   bundle exec jekyll build --profile -d ${TARGET} --config ${CONFIG_FILES}
  64 | >>> EOT
  65 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c   set -eu\n  CONFIG_FILES=\"_config.yml\"\n  if [ \"${JEKYLL_ENV}\" = \"production\" ]; then\n    CONFIG_FILES=\"${CONFIG_FILES},_config_production.yml\"\n  elif [ \"${DOCS_URL}\" = \"https://docs-stage.docker.com\" ]; then\n    CONFIG_FILES=\"${CONFIG_FILES},_config_stage.yml\"\n  fi\n  set -x\n  bundle exec jekyll build --profile -d ${TARGET} --config ${CONFIG_FILES}\n" did not complete successfully: exit code: 1
Error: buildx bake failed with: ERROR: failed to solve: process "/bin/sh -c   set -eu\n  CONFIG_FILES=\"_config.yml\"\n  if [ \"${JEKYLL_ENV}\" = \"production\" ]; then\n    CONFIG_FILES=\"${CONFIG_FILES},_config_production.yml\"\n  elif [ \"${DOCS_URL}\" = \"https://docs-stage.docker.com\" ]; then\n    CONFIG_FILES=\"${CONFIG_FILES},_config_stage.yml\"\n  fi\n  set -x\n  bundle exec jekyll build --profile -d ${TARGET} --config ${CONFIG_FILES}\n" did not complete successfully: exit code: 1

Copy link
Copy Markdown
Contributor

@aevesdocker aevesdocker left a comment

Choose a reason for hiding this comment

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

Thanks @glours and thank you @thaJeztah for your help with this!

@aevesdocker aevesdocker merged commit 3923985 into docker:main Feb 10, 2023
@glours glours deleted the compose-api-reference-v2.16.0 branch February 10, 2023 09:26
@glours
Copy link
Copy Markdown
Contributor Author

glours commented Feb 10, 2023

Thanks @thaJeztah for the fix and explanation, I'll know for the next time 😉

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants