Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Waves Refactoring #5756

Closed
7 of 10 tasks
benvillalobos opened this issue Sep 25, 2020 · 6 comments
Closed
7 of 10 tasks

Change Waves Refactoring #5756

benvillalobos opened this issue Sep 25, 2020 · 6 comments
Assignees

Comments

@benvillalobos
Copy link
Member

benvillalobos commented Sep 25, 2020

Issue Description

Change Waves shipped with a few quirks. In rough order of importance:

To Do

Done

  • Make ChangeWaves internal
  • Update change wave docs (Tracking here: Update Change Wave Docs #5851)
  • Assign a code to the warnings thrown by change waves.
  • Throwing warnings is not correctly caught in build logs
  • When testing change waves on existing functionality, there's a chance that a new test will set the MSBuildDisableFeaturesFromVersion env var, and THEN an existing test runs (that is now conditioned on change waves), failing the existing test. This is worked around by calling SetChangeWave(string.Empty) on TestEnvironment's Dispose (or Cleanup) functions. We should call BuildEnvironmentHelper.ResetInstance_ForUnitTestsOnly(); here as well.
  • Convert change waves to use versions exclusively.
  • Refer to Enable Change Waves #5710
@benvillalobos benvillalobos self-assigned this Sep 25, 2020
@benvillalobos
Copy link
Member Author

Warnings thrown from BuildManager.BeginBuild do not show in Output window.

These warnings are not caught at all through VS. I tested this by capturing a binlog and replaying it with -flp:v=diag and MSBuildDisableFeaturesFromVersion=16.5. cmd line shows the proper warning, VS does not see this at all.

@benvillalobos
Copy link
Member Author

Referencing ChangeWaves from traits produces does not exist errors, and when including it in the projects where it was previously unavailable, it produces the error The type 'ChangeWaves' exists in both 'Microsoft.Build' .... and 'Microsoft.Build.Tasks.Core'.

This is an issue for developers that want set escape hatches and feature flags based on a change wave, rather than placing the change wave check at the site of their feature, which I'm not entirely convinced is better. Unfortunately, devs don't have the choice and enabling that would be great.

@japj
Copy link

japj commented Oct 29, 2020

Could you perhaps also add some information on why “risky features are developed under the same opt-out flag”.
That confused me a bit, since if they are risky why not have it be opt-in until it is “safe”?

@benvillalobos
Copy link
Member Author

@japj Unfortunately, some of what we work on are improvements that would never be considered safe because it may break some very specific scenario. If there's something we think is worth the risk, whether it be for performance or functionality improvement, we found that Change Waves were a good middle ground between making necessary changes and warning customers of these changes.

Opt-out is a better approach for us because we'd likely get limited feedback when a feature impacts customer builds. When a feature does impact a customer negatively, it's a quick switch to disable and allows time to adapt. The key aspect to Change Waves is that it smooths the transition for customers adapting to risky changes that the MSBuild team feels strongly enough to implement.

benvillalobos added a commit that referenced this issue Nov 4, 2020
* Better messaging on opt-in vs opt-out. partial fix on #5756
@benvillalobos
Copy link
Member Author

This will be closed out when #5864 merges in, as the last two items have separate issues tracking them.

@benvillalobos
Copy link
Member Author

Closed as of #5864.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants