Add update notifications for daily/continuous builds#6656
Add update notifications for daily/continuous builds#6656
Conversation
Co-authored-by: Petermarcu <8228359+Petermarcu@users.noreply.github.com>
Co-authored-by: Petermarcu <8228359+Petermarcu@users.noreply.github.com>
…ents Co-authored-by: Petermarcu <8228359+Petermarcu@users.noreply.github.com>
Co-authored-by: Petermarcu <8228359+Petermarcu@users.noreply.github.com>
danieljurek
left a comment
There was a problem hiding this comment.
The Good
- EngSys changes look pretty correct. I've had problems with DevOps YAML in various AI scenarios in the past but that's improved remarkably.
- It's good to build on the existing config system
The Bad
- The user experience for this is going to point toward stable install channels in the case of a "daily" configuration. This will not result in the user getting the latest bits. "daily" can be most easily installed using the scripts. So, the output logic should be there
- Use a user-level persistent config to determine the channel instead of requiring that an environment variable be set correctly
The Ugly
This is intended as a note to the product team, I don't think the fundamental user experience should change at this time* -- If a user opts into the "daily" channel there may be a brief time where the "latest" package supersedes what they have installed in terms of functionality (depending on the success of CI builds, etc.). I don't think that's a good enough reason to move the user off of the daily channel or, in the case of daily, check both daily and latest to see what's the freshest. In most cases, a CI build from a new commit shortly after release will keep the bits fresh enough.
This is also a note to product, not a change of design -- @rajeshkamal5050, does it make sense to use the channel of the current executable to determine the default channel to check in the case of no config value? (Right now it uses "latest" as the safe default, but if you download "daily" bits you're kind of opting into the daily channel)
| github.com/openai/openai-go/v3 v3.2.0 | ||
| github.com/sethvargo/go-retry v0.3.0 | ||
| github.com/spf13/cobra v1.10.1 | ||
| github.com/stretchr/testify v1.11.1 |
There was a problem hiding this comment.
Why is this file changed in a PR that is intended to change behavior only in core azd and not in an extension?
There was a problem hiding this comment.
Reverted in 657baa3. These were unintended dependency updates that got pulled in during development.
| golang.org/x/net v0.48.0 // indirect | ||
| golang.org/x/sys v0.39.0 // indirect | ||
| golang.org/x/term v0.37.0 // indirect | ||
| golang.org/x/term v0.38.0 // indirect |
There was a problem hiding this comment.
Why is this file changed in a PR that is intended to change behavior only in core azd and not in an extension?
There was a problem hiding this comment.
Reverted in 657baa3. These were unintended dependency updates.
| golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | ||
| golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY= | ||
| golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU= | ||
| golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU= |
There was a problem hiding this comment.
Why is this file changed in a PR that is intended to change behavior only in core azd and not in an extension?
There was a problem hiding this comment.
Reverted in 657baa3. These were unintended dependency updates.
| description: "Override the default configuration directory location." | ||
| type: envvar | ||
| example: "/path/to/config" | ||
| - key: (env) AZD_UPDATE_CHANNEL |
There was a problem hiding this comment.
Is there a good reason to use only an environment-based config and not a global config?
There was a problem hiding this comment.
Added global config support in 657baa3. Now supports defaults.updateChannel config setting with environment variable taking precedence. Users can use azd config set defaults.updateChannel daily for a persistent setting.
| log.Print("fetching latest version information for update check") | ||
| req, err := http.NewRequest(http.MethodGet, "https://aka.ms/azure-dev/versions/cli/latest", nil) | ||
|
|
||
| versionURL := fmt.Sprintf("https://aka.ms/azure-dev/versions/cli/%s", updateChannel) |
There was a problem hiding this comment.
TODO for engineering: ensure appropriate aka.ms links and consumed assets are set up
cli/installer/README.md
Outdated
| [System.Environment]::SetEnvironmentVariable('AZD_UPDATE_CHANNEL', 'daily', 'User') | ||
| ``` | ||
|
|
||
| **Linux/MacOS (bash):** |
There was a problem hiding this comment.
Shell-specific configs are redundant, just show the export like is done with switching back to stable.
There was a problem hiding this comment.
Simplified in 657baa3. Now shows the recommended azd config set approach and a simple export example for environment variable.
- Revert unintended extension go.mod/go.sum changes - Add support for defaults.updateChannel config setting - Environment variable AZD_UPDATE_CHANNEL overrides config - Simplify installer README with recommended config approach - Emphasize using install scripts for daily builds Co-authored-by: danieljurek <2158838+danieljurek@users.noreply.github.com>
danieljurek
left a comment
There was a problem hiding this comment.
See cli/azd/main.go near line 111... Using the "daily" channel will not work on any other isntaller type except InstallerTypeSh and InstallerTypePs.
If the user is on the "daily" channel only use those commands described in those cases, and make sure that the command invoked uses the "daily" channel for upgrades. It might be worth writing a new set of conditions and extracting this logic into a separate module because it's increasing complexity.
cli/installer/README.md
Outdated
| ##### Install | ||
|
|
There was a problem hiding this comment.
Removed in 8ae518c. The duplicate "Install" header has been deleted.
- Pass channel info from fetchLatestVersion through versionCheckResult struct - Show daily-specific upgrade instructions for daily channel users - Only show script-based install commands for daily builds - Package managers (winget, choco, brew, deb, rpm) don't support daily channel - Remove redundant "Install" header in installer README Co-authored-by: danieljurek <2158838+danieljurek@users.noreply.github.com>
Fixed in 8ae518c. Now passes channel info through a
|
Daily build users don't receive update notifications because there's no version.txt published to the daily channel.
Changes
Pipeline (
eng/pipelines/templates/stages/publish.yml)release/dailyafter continuous deployment buildsCLI (
cli/azd/main.go)defaults.updateChannelconfig setting for persistent channel selectionAZD_UPDATE_CHANNELenvironment variable (daily|stable|latest) that overrides configupdate-check-{channel}.json) to prevent conflicts when switching channelshttps://aka.ms/azure-dev/versions/cli/{channel}--version dailyflagDocumentation
defaults.updateChannelto config reference withAZD_UPDATE_CHANNELenvironment variable overrideUsage
Recommended approach (persistent setting):
azd config set defaults.updateChannel dailyEnvironment variable (temporary override):
export AZD_UPDATE_CHANNEL=dailyImportant: Daily builds should be installed using the install scripts with
--version dailyto ensure the latest daily build is used.Update Message Behavior
Users on the daily channel will see appropriate upgrade instructions:
Script-based installations (supported):
-Version 'daily'--version dailyOther installation types:
Users on stable/latest channel see standard upgrade instructions as before.
Note
The aka.ms redirect for
/versions/cli/dailyneeds to be configured to point toazd/standalone/release/daily/version.txtin Azure Storage.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.