Skip to content

Add preference for release channel #7534

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

Merged
merged 2 commits into from
May 6, 2025
Merged

Add preference for release channel #7534

merged 2 commits into from
May 6, 2025

Conversation

timtmok
Copy link
Contributor

@timtmok timtmok commented May 5, 2025

Address #6489

Adds a preference for choosing where to get updates. The environment variable can still override the preference.

This allows users to switch to getting updates from the dailies.

Altering the preference will prompt the user to restart for the changes to take effect.

image

Release Notes

New Features

Bug Fixes

  • N/A

QA Notes

@timtmok timtmok requested a review from Copilot May 5, 2025 17:34
Copy link
Contributor

@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.

Pull Request Overview

This PR adds a configurable release channel preference for Positron updates.

  • Introduces a new nested configuration property "update.positron.channel" to allow selection of the update channel.
  • Updates the relauncher and update service to observe and use the new "positron.channel" configuration.
  • Removes the old UpdateChannel enum and adds a corresponding configuration contribution with limited enum options.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/vs/workbench/contrib/relauncher/browser/relauncher.contribution.ts Added a "positron" object with a "channel" property to the update configuration and registered it to trigger relaunch on change.
src/vs/platform/update/electron-main/abstractUpdateService.ts Replaced the deprecated UpdateChannel enum with a dynamic configuration value for the update channel.
src/vs/platform/update/common/update.config.contribution.ts Introduced a new configuration entry for "update.positron.channel" with specific allowed values and descriptions.

Copy link

github-actions bot commented May 5, 2025

E2E Tests 🚀
This PR will run tests tagged with: @:critical

readme  valid tags

@timtmok timtmok marked this pull request as ready for review May 5, 2025 18:22
@timtmok timtmok requested a review from jmcphers May 5, 2025 18:22
jmcphers
jmcphers previously approved these changes May 6, 2025
@@ -93,7 +86,7 @@ export abstract class AbstractUpdateService implements IUpdateService {
*/
protected async initialize(): Promise<void> {
// --- Start Positron ---
const updateChannel = process.env.POSITRON_UPDATE_CHANNEL ?? UpdateChannel.Prereleases;
const updateChannel = process.env.POSITRON_UPDATE_CHANNEL ?? this.configurationService.getValue<string>('update.positron.channel');
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would recommend emitting a log statement when we ignore the user-set value in favor of the environment variable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea!

@timtmok timtmok merged commit 55dad0b into main May 6, 2025
8 checks passed
@timtmok timtmok deleted the 6489-daily-build-updates branch May 6, 2025 20:54
@github-actions github-actions bot locked and limited conversation to collaborators May 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants