Fix issue where replacement text is not getting evaluated when pack#5411
Merged
joperezr merged 3 commits intomicrosoft:mainfrom Aug 24, 2024
Merged
Fix issue where replacement text is not getting evaluated when pack#5411joperezr merged 3 commits intomicrosoft:mainfrom
joperezr merged 3 commits intomicrosoft:mainfrom
Conversation
radical
approved these changes
Aug 23, 2024
Member
radical
left a comment
There was a problem hiding this comment.
Waiting on the internal build for validation.
Member
Author
|
Found an issue with the initial approach as that was causing even more packages to get re-built post testing, which was causing other packages to be incorrectly built. This new approach is rolling that back and instead just avoiding causing a rebuild at all in that last pack call by no longer depending on restore when sending the tests to helix |
This was referenced Aug 24, 2024
Member
Author
|
I have validated with the internal build that this is working as expected. This is ready to go. |
Member
Author
|
/backport to release/8.2 |
Contributor
|
Started backporting to release/8.2: https://github.com/dotnet/aspire/actions/runs/10536228450 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
During our build, we currently are running Pack again after running tests (which is wrong and fixing it is tracked by #5404). Because of that, and due to a recent change that caused a new Restore operation to be called when sending our tests to Helix, the build is now trying to re-run pack one the package that was restored during test runs, but it is doing so by passing
/p:Restore=false /p:Build=false. Currently, our ReplacementText targets only run if you are running the Build target as well, but if you run Pack and skip the Build, then the replacement targets won't run, meaning the new generated package won't have the placeholders replaced, which is what is causing #5396 to happen. This change is making it so that our Replacement targets also are hooked into the Pack target even when Build gets skipped which will workaround the issue. The ultimate fix will be to not try to re-pack the projects after testing, which will be tracked by #5404.Fixes # #5396
cc: @eerhardt @radical
Checklist
<remarks />and<code />elements on your triple slash comments?Microsoft Reviewers: Open in CodeFlow