Skip to content

Conversation

thesayyn
Copy link
Collaborator

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature (please, look at the "Scope of the project" section in the README.md file)
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: #3357

What is the new behavior?

nodejs toolchain was conditioned on the exec which led to nodejs_images using toolchain for the host instead of image target. hence images built from macOS were broken due to the wrong toolchain being used in runfiles.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Related issues;

bazelbuild/rules_docker#2009

bazelbuild/rules_docker#1963

@thesayyn
Copy link
Collaborator Author

I will add container image structure tests to ensure that this type of error never goes unnoticed.

Copy link
Collaborator

@alexeagle alexeagle left a comment

Choose a reason for hiding this comment

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

Neat, we should do a follow-up to add some comments about how the ordering matters (linux target toolchain must be declared before non-linux host toolchain) but can be after shipping a release, which I want to do now :)

if register:
native.register_toolchains("@%s_toolchains//:%s_toolchain" % (name, platform))
native.register_toolchains(
"@%s_toolchains//:%s_toolchain_target" % (name, platform),
Copy link
Collaborator

Choose a reason for hiding this comment

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

comment that this one needs to be first so it's resolved

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.

2 participants