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

manage C#-only experiments with ExperimentsManager #10868

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

brettfo
Copy link
Contributor

@brettfo brettfo commented Oct 30, 2024

The new updater work requires the ability to parse a job file which contains the experiments section, so instead of continuing to manage that with environment variables, this PR adds a new parameter --job-file to the update task, where the value is a well-known environment variable set by the updater when the job is started.

This way we'll have one location for strongly-typed experiments.

The bulk of this PR was threading through the new ExperimentsManager object, with the next chunk being adding the --job-file argument.

@github-actions github-actions bot added the L: dotnet:nuget NuGet packages via nuget or dotnet label Oct 30, 2024
{
return new ExperimentsManager()
{
UseLegacyDependencySolver = IsEnabled(experiments, "nuget_legacy_dependency_solver"),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This (and the property definition 6 lines up) will now be the only changes necessary when a new experiment is added or an old one removed.

@brettfo brettfo force-pushed the dev/brettfo/nuget-experiments branch from 322c4ff to ae4931c Compare October 31, 2024 21:06
@brettfo brettfo force-pushed the dev/brettfo/nuget-experiments branch from ae4931c to 8469e2f Compare October 31, 2024 21:36
@brettfo brettfo marked this pull request as ready for review October 31, 2024 22:50
@brettfo brettfo requested a review from a team as a code owner October 31, 2024 22:50
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 17 changed files in this pull request and generated 1 suggestion.

Files not reviewed (12)
  • nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/DependencySolverEnvironment.cs: Evaluated as low risk
  • nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/UpdateWorkerTests.DirsProj.cs: Evaluated as low risk
  • nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/RunWorker.cs: Evaluated as low risk
  • nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/PackageReferenceUpdater.cs: Evaluated as low risk
  • nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/MSBuildHelper.cs: Evaluated as low risk
  • nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/UpdateWorkerTests.PackagesConfig.cs: Evaluated as low risk
  • nuget/lib/dependabot/nuget/native_helpers.rb: Evaluated as low risk
  • nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/UpdateWorkerTests.PackageReference.cs: Evaluated as low risk
  • nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Cli/Commands/UpdateCommand.cs: Evaluated as low risk
  • nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/UpdaterWorker.cs: Evaluated as low risk
  • nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Cli.Test/EntryPointTests.Update.cs: Evaluated as low risk
  • nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/UpdateWorkerTestBase.cs: Evaluated as low risk

Tip: Leave feedback on Copilot's review comments with the 👎 and 👍 buttons to help improve review quality. Learn more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: dotnet:nuget NuGet packages via nuget or dotnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants