-
Notifications
You must be signed in to change notification settings - Fork 370
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
feat: Add experimental & nightly release channels for vsce #6997
Conversation
This adds support for publishing nightly builds of the VS Code extension under a different package name and display name to avoid conflicts with the main extension. - Added 'nightly' as a new ReleaseType enum value - Added updatePackageForNightly() function to modify package.json for nightly builds - Changed package name to 'cody-ai-nightly' for nightly releases - Updated display name to 'Cody: AI Code Assistant - Nightly' - Refactored insiders build checks to include nightly builds - Updated publishing logic to handle nightly builds same as insiders ## Test plan 1. Run release script with `CODY_RELEASE_TYPE=nightly pnpm -C vscode run release:dry-run` to generate a package for the nightly 2. Install the nightly builld using the package you can find in `vscode/dist/cody.vsix` - Verify extension is installed with the updated name and display name. You might need to disable the stable release to avoid conflicts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feedback inline, I think we should make nightlies use the prerelease channel of the testing extension.
Related question... people seem to really want to see things "straight away" on this channel. Can we simply make this build continuously? Like every commit that passes the tests, we pop out a version?
service_account: "[email protected]" | ||
create_credentials_file: true | ||
export_environment_variables: true | ||
- run: CODY_RELEASE_TYPE=experimental pnpm -C vscode run release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like I mentioned in chat, I think should use the prerelease channel of the testing extension for nightlies so that if we cut an experimental build it is not immediately hidden by nightlies. Think it through... if we wanted to distribute an experimental build (say, to a customer or to teammates for testing something like the merged network requests I'm working on) and we use the release channel of the testing extension for nightlies, then:
- We will make the experimental build on the prerelease channel
- That night, the nightly build will run and do a build on the release channel
- Then the experimental build is hidden on the prerelease channel by the nightly, confusion reigns.
You know the thing we see where we have to cut the prerelease build after the stable release? Same thing is happening here. Does that make sense?
Slack message for context:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think should use the prerelease channel of the testing extension for nightlies
@dominiccooney See https://github.com/sourcegraph/cody/pull/6997/files#r1953839488
function updatePackageForTestingExtension(): void { | ||
if (releaseType === ReleaseType.Nightly || releaseType === ReleaseType.Experimental) { | ||
packageJSON.name = 'cody-testing' | ||
packageJSON.displayName = 'Testing Extension' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -124,7 +140,7 @@ if (!insidersVersion) { | |||
} | |||
|
|||
const githubOutputPath = process.env.GITHUB_OUTPUT | |||
if (releaseType === ReleaseType.Insiders && githubOutputPath) { | |||
if (isInsiderBuild && githubOutputPath) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh this is interesting, "insider" means something different from "prerelease" now... Prerelease and Nightly are "insiders."
|
||
// Package (build and bundle) the extension. | ||
console.error(`Packaging ${releaseType} release at version ${version}...`) | ||
execFileSync( | ||
'vsce', | ||
[ | ||
'package', | ||
...(releaseType === ReleaseType.Insiders | ||
...(isInsiderBuild |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dominiccooney nightly is actually using the pre-release channel. You can see const isInsiderBuild = releaseType === ReleaseType.Insiders || releaseType === ReleaseType.Nightly, so we would add the
--pre-release` flag here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! To summarize:
We want to have four "channels":
- Stable
- Prerelease
- Nightly
- Experimental
We have to map them to two extensions, I'll just call them Cody and Test for now. And they each have two channels:
- Release
- Prerelease
You see those labels on the IDE extensions page:
Most important fact here is that 🌵 Release "overwrites" Prerelease until there is another prerelease. This is why we wait to do the stable build before we make the next milestone's prerelease. If we did it the other way, then both channels would show the stable version and nobody would dogfood the prerelease. This is a quirk of VSCode Marketplace.
We're going to split the channels between the extensions this way:
Cody: Stable and Prerelease ⬅️ most people here
Test: Nightly and Experimental ⬅️ some teammates and customers trying bleeding-edge things here
Within each extension, there's a "fast" one that gets produced more and a "slow" one that gets produced less often. Because of 🌵 , we need the "fast" one to be on the pre-release channel.
So we need this:
Cody - Release - Stable
Cody - Prerelease - Prerelease
Test - Release - Experimental
Test - Prerelease - Nightly
Could we add something like the above to Notion, on the branching and releasing page?
service_account: "[email protected]" | ||
create_credentials_file: true | ||
export_environment_variables: true | ||
- run: CODY_RELEASE_TYPE=nightly pnpm -C vscode run release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dominiccooney here we are adding nightly so we would add --pre-release
later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, got it... it is the environment variable set to nightly that puts these on the test extension prerelease channel. Perfect!
|
||
// Package (build and bundle) the extension. | ||
console.error(`Packaging ${releaseType} release at version ${version}...`) | ||
execFileSync( | ||
'vsce', | ||
[ | ||
'package', | ||
...(releaseType === ReleaseType.Insiders | ||
...(isInsiderBuild |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! To summarize:
We want to have four "channels":
- Stable
- Prerelease
- Nightly
- Experimental
We have to map them to two extensions, I'll just call them Cody and Test for now. And they each have two channels:
- Release
- Prerelease
You see those labels on the IDE extensions page:
Most important fact here is that 🌵 Release "overwrites" Prerelease until there is another prerelease. This is why we wait to do the stable build before we make the next milestone's prerelease. If we did it the other way, then both channels would show the stable version and nobody would dogfood the prerelease. This is a quirk of VSCode Marketplace.
We're going to split the channels between the extensions this way:
Cody: Stable and Prerelease ⬅️ most people here
Test: Nightly and Experimental ⬅️ some teammates and customers trying bleeding-edge things here
Within each extension, there's a "fast" one that gets produced more and a "slow" one that gets produced less often. Because of 🌵 , we need the "fast" one to be on the pre-release channel.
So we need this:
Cody - Release - Stable
Cody - Prerelease - Prerelease
Test - Release - Experimental
Test - Prerelease - Nightly
Could we add something like the above to Notion, on the branching and releasing page?
@dominiccooney Thanks for the review! I've created a issue to add that to Notion release handbook: https://linear.app/sourcegraph/issue/CODY-5050/update-release-handbook-to-include-cody-test-release |
CLOSE: https://linear.app/sourcegraph/issue/CODY-4777
This adds support for publishing nightly builds of the VS Code extension under a different package name and display name to avoid conflicts with the main extension.
NOTE: The nightly build is not intended to work with the main extension and is expected to cause conflicts if both are installed.
Test plan
CODY_RELEASE_TYPE=nightly pnpm -C vscode run release:dry-run
to generate a package for the nightlyvscode/dist/cody.vsix
Expected behavior per release type
Stable (sourcegraph.cody-ai):
Insiders / Pre-release (sourcegraph.cody-ai):
Experimental (sourcegraph.cody-testing):
Nightly (sourcegraph.cody-testing):