Skip to content

fix(matter): bump matter-version to cap googleapis-common-protos - #263

Merged
cleithner-comcast merged 3 commits into
mainfrom
cleith/dev/fixMatterBuild
Aug 12, 2026
Merged

fix(matter): bump matter-version to cap googleapis-common-protos#263
cleithner-comcast merged 3 commits into
mainfrom
cleith/dev/fixMatterBuild

Conversation

@cleithner-comcast

Copy link
Copy Markdown
Contributor

Pin the Matter SDK to project-chip/connectedhomeip@41ddb15 (PR #73448 on v1.5-branch), which caps googleapis-common-protos below 1.75.1. The 1.75.1 release raised its protobuf requirement to >=6.33.5, conflicting with the pinned protobuf~=5.28.2 and making the pigweed build venv unresolvable. This was failing the Matter sample-app build (build_examples.py) in the builder Docker image across many CI jobs.

This only occurs from a cold pip cache, so existing developer workspaces and pre-built docker image layers should be fine. This SHA is not a formal released version but rather the SHA on the v1.5 branch that fixes this issue. At this time, the matter SDK maintainers seem resistant to generated a patch release tag. If one is generated, we will update to that tag.

Pin the Matter SDK to project-chip/connectedhomeip@41ddb15 (PR #73448 on
v1.5-branch), which caps googleapis-common-protos below 1.75.1. The 1.75.1
release raised its protobuf requirement to >=6.33.5, conflicting with the
pinned protobuf~=5.28.2 and making the pigweed build venv unresolvable. This
was failing the Matter sample-app build (build_examples.py) in the builder
Docker image across many CI jobs.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Pins the Matter SDK reference used by BartonCore builds to a specific connectedhomeip revision to avoid a Python dependency conflict (googleapis-common-protos vs pinned protobuf) that breaks cold-cache CI builds of Matter sample apps.

Changes:

  • Update the matter-version reference from the v1.5.1.0 tag to commit 41ddb15b08f30ea4d16c3306df0b5c4caa3a5845 on the v1.5 branch.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread matter-version
git clone --branch rejects raw commit SHAs, so pinning matter-version to a
SHA broke the clone in build-matter.sh and docker/Dockerfile. Replace the
--branch clone with git init + shallow fetch of MATTER_REF + checkout
FETCH_HEAD, which resolves tags, branches, and SHAs uniformly. Capture the
resolved commit for the subsequent git reset --hard.
Copilot AI review requested due to automatic review settings August 10, 2026 17:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings August 10, 2026 17:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Suppressed comments (3)

build-matter.sh:94

  • ${MATTER_COMMIT} is used in git reset --hard without quotes. While commit SHAs are normally safe, quoting prevents any unexpected word-splitting if the variable is ever empty or contains whitespace due to an earlier command failure.
    git am ${MY_DIR}/third_party/matter/barton-library/patches/*.patch || (git am --abort && git reset --hard ${MATTER_COMMIT} && exit 1)
    ${MY_DIR}/third_party/matter/barton-library/linux/build.sh -o ${MATTER_INSTALL_DIR} -c ${MATTER_CONF_DIR} ${BUILD_WITH_STACK_SMASH_PROTECTION} ${BUILD_WITH_SANITIZER} ${BUILD_WITH_MESSAGE_TRACING}

    cd ${MATTER_BUILD_DIR}
    git reset --hard ${MATTER_COMMIT}

build-matter.sh:86

  • In the new fetch-based checkout, ${MATTER_REF} is unquoted. If it ever contains whitespace (e.g., accidental trailing spaces from the version file) it will be word-split, which can break the fetch/checkout step. Quoting avoids this and matches how other variables are handled in this script.

This issue also appears on line 90 of the same file.

    git remote add origin https://github.com/project-chip/connectedhomeip.git
    git fetch --depth 1 origin ${MATTER_REF}
    git checkout -q FETCH_HEAD
    MATTER_COMMIT=$(git rev-parse HEAD)

docker/Dockerfile:292

  • ${MATTER_REF} is unquoted in the new git fetch invocation. Quoting avoids accidental word-splitting (e.g., if the build arg contains trailing whitespace) and makes the Docker build step more robust.
    git remote add origin https://github.com/project-chip/connectedhomeip.git && \
    git fetch --depth 1 origin ${MATTER_REF} && \
    git checkout -q FETCH_HEAD && \

@cleithner-comcast
cleithner-comcast merged commit 85887a4 into main Aug 12, 2026
13 checks passed
@cleithner-comcast
cleithner-comcast deleted the cleith/dev/fixMatterBuild branch August 12, 2026 15:11
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants