Skip to content

[build] Fix sonic-utilities-data submodule dep#22917

Merged
qiluo-msft merged 1 commit intosonic-net:masterfrom
jusherma:sonic-utilities-data-cache
Jun 18, 2025
Merged

[build] Fix sonic-utilities-data submodule dep#22917
qiluo-msft merged 1 commit intosonic-net:masterfrom
jusherma:sonic-utilities-data-cache

Conversation

@jusherma
Copy link
Contributor

Why I did it

The sonic-utilities-data_1.0-1_all.deb target depends on sources from the src/sonic-utilities submodule. However, the cache dependency file does not list this submodule as a dependency. So, when the build cache is used, updates to the src/sonic-utilities submodule pointer do not trigger the necessary rebuild of sonic-utilities-data_1.0-1_all.deb, leading to a stale build output.

Work item tracking
  • Microsoft ADO (number only):

How I did it

Updated rules/sonic-utilities-data.dep to include the proper SMDEP rules.

How to verify it

  1. Perform a build with the dpkg cache enabled
  2. Confirm the new output file target/debs/bookworm/sonic-utilities-data_1.0-1_all.deb.smdep is created, containing the submodule dependencies (smdeps)
  3. Archive the target/debs/bookworm/sonic-utilities-data_1.0-1_all.deb output outside the build workspace
  4. Clean the build workspace
  5. Update the src/sonic-utilities submodule pointer to a new commit that contains different source code
  6. Perform another build with the dpkg cache enabled
  7. Extract the previous and current sonic-utilities-data_1.0-1_all.deb outputs. Confirm that the contents of the debian packages are distinct and contain the expected source based on the respective src/sonic-utilities submodule pointers

Which release branch to backport (provide reason below if selected)

  • 202405
  • 202411
  • 202505

This is a build bug which silently results in incorrect build outputs when the dpkg cache is used. As such, it should be double committed.

Tested branch (Please provide the tested image version)

Description for the changelog

Fix submodule build dependency for sonic-utilities-data

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jusherma
Copy link
Contributor Author

@qiluo-msft can you please take a look? Diff is very small--just 3 LOC. This fixes a longstanding bug in the build cache

@qiluo-msft qiluo-msft enabled auto-merge (squash) June 13, 2025 01:01
@jusherma
Copy link
Contributor Author

@qiluo-msft thanks for the approval. Looks like the kvmtests have all failed due to timeout. I think this is unlikely to be related to this change. Is there any known issue? Should we rerun them?

@jusherma
Copy link
Contributor Author

@qiluo-msft thanks for the approval. Looks like the kvmtests have all failed due to timeout. I think this is unlikely to be related to this change. Is there any known issue? Should we rerun them?

@qiluo-msft gentle reminder

@qiluo-msft
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@qiluo-msft qiluo-msft merged commit 548443b into sonic-net:master Jun 18, 2025
24 of 27 checks passed
@jusherma
Copy link
Contributor Author

thanks @qiluo-msft. Who can help me get this double committed to 202405 and 202505?

@jusherma
Copy link
Contributor Author

thanks @qiluo-msft. Who can help me get this double committed to 202405 and 202505?

@qiluo-msft following up on this

@jusherma
Copy link
Contributor Author

jusherma commented Jul 8, 2025

thanks @qiluo-msft. Who can help me get this double committed to 202405 and 202505?

@qiluo-msft following up on this

@qiluo-msft As this fixes a bug in the build, it's important this makes it into at least 202505. Can you please assist?

@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202405: #23758

@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202505: #23762

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.

5 participants