Repository navigation
Allow submodule changes when reseting submodules - #7940
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Pull request overview
Updates the ChangeValidation tool so submodule-directory edits are permitted when they correspond to an actual submodule “reset” (i.e., the relevant entry in src/source-manifest.json changed compared to the PR merge-base), while still blocking submodule additions/removals and other unsupported edits.
Changes:
- Compute and carry the PR merge-base commit through
PrInfoso validations can compare “base vs HEAD” reliably. - Stop treating
src/source-manifest.jsonas a blanket-protected tooling file so it can change as part of submodule resets. - Rework
SubmoduleValidationto allow submodule file changes only when the corresponding manifest entry changed, and to reject adding/removing submodules.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| eng/tools/ChangeValidation/Validation.cs | Computes merge-base and includes it in PrInfo for downstream validation. |
| eng/tools/ChangeValidation/ToolingFilesValidation.cs | Removes src/source-manifest.json from “always disallowed” tooling file patterns. |
| eng/tools/ChangeValidation/SubmoduleValidation.cs | Implements merge-base vs HEAD manifest comparison to allow reset-associated submodule changes and disallow submodule add/remove. |
| eng/tools/ChangeValidation/PrInfo.cs | Extends PrInfo to include the merge-base commit SHA. |
Comments suppressed due to low confidence (1)
eng/tools/ChangeValidation/SubmoduleValidation.cs:8
- Several
usingdirectives here appear unused after the refactor (e.g.,System.Text,Microsoft.Extensions.Logging*,Microsoft.DotNet.DarcLib*). Unused usings can generate warnings and make the file harder to maintain; please remove the ones that are no longer needed.
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Extensions.FileSystemGlobbing;
using Microsoft.Extensions.FileSystemGlobbing.Abstractions;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@dotnet/source-build could I get an approval please? |
|
@dkurepa this needs to get backported |
yup, was doing it locally, but the bot should work too, gonna try it |
|
/backport to release/10.0.1xx |
|
Started backporting to |
|
/backport to release/10.0.3xx |
|
Started backporting to |
|
/backport to release/10.0.4xx |
|
Started backporting to |
dotnet/arcade-services#6443