fix: correct error message for full label length validation#1187
fix: correct error message for full label length validation#1187hobostay wants to merge 2 commits intoapple:mainfrom
Conversation
|
@hobostay you'll need to set up commit signing and re-push your commits; see https://github.com/apple/containerization/blob/main/CONTRIBUTING.md#pull-requests. |
afdb26d to
548e0a5
Compare
|
@hobostay It looks like you've signed your commit but haven't set up everything on the GitHub side, as the signature is unverified. Could you also rebase your change onto the latest main to pick up the CI fixes? Thank you! |
33069bc to
20cac53
Compare
|
Thanks @jglogan! I've made the following updates:
The commit should now show as verified. Please let me know if there's anything else needed! |
|
@hobostay In addition to the signatures, if looks like some test code is failing to compile. You can build, unit test, and run isolated integration tests locally using: |
20cac53 to
f7f787d
Compare
|
Thanks @jglogan for the review and detailed feedback! I've made the following updates:
The build should now pass. Regarding the commit signing, I'll continue working on getting my SSH keys properly configured with GitHub for signature verification. Sorry for the back-and-forth and thank you for your patience! |
|
@jglogan Could you please provide some guidance on how to properly set up commit signing for this project? I'd like to ensure my commits are verified correctly. Here's what I've tried so far:
But the signature still shows as "Unverified". Is there a specific email or key configuration requirement for this project? Thank you for your help! |
|
Sure! You had made a change in the right direction - the commits were getting signed, but GitHub could not verify the author. The ssh key in the GitHub settings ends with an email address. IIRC two conditions have to be met.
|
f7f787d to
5a24f70
Compare
|
Thanks @jglogan for the detailed guidance! I've now properly set up commit signing:
The signatures should now be verified. Please let me know if there's anything else needed! |
|
If I look at the patch view of your commit, I can see that you're using the email you mentioned in your last comment. You might be able to have Claude walk you through the setup step by step to see where the commit verification chain is being broken. |
5a24f70 to
93c071d
Compare
Fix incorrect error message in NetworkConfiguration label validation. The error previously stated "key length is greater than" when actually checking the full label length (key=value combination). Changes: - Update error message to say "full label length (key=value)" instead of "key length" - Add test case to verify the error message is correct This makes the error message more accurate and helpful for users debugging label validation issues. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
93c071d to
73ca1b9
Compare
|
@jglogan I've now set up a separate SSH key specifically for commit signing:
The commits have been re-signed and pushed. The signature should now show as Verified. Thank you for your patience! |



Summary
Fix incorrect error message in
NetworkConfigurationlabel validation. The error previously stated "key length is greater than" when actually checking the full label length (thekey=valuecombination).Problem
In
Sources/ContainerResource/Network/NetworkConfiguration.swift:123, when validating that a full label (key=value) doesn't exceed 4096 characters, the error message incorrectly said:This was misleading because:
fullLabel.count(the combinedkey=valuestring)Solution
Updated the error message to be more accurate:
Changes
testFullLabelLengthErrorMessage()to verify the error message contains "full label length"Testing
Added a new test that specifically validates the error message content:
Impact
Checklist
🤖 Generated with Claude Code