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

use posit cdn instead of github release asset for download url #6496

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

sharon-wang
Copy link
Member

We no longer publish the release binaries as assets, but the downloadAndUnzipPositron() function still assumes that we do.

This PR updates the script to use the CDN url so we shouldn't see this error anymore when running Python extension MacOS tests:

Run GabrielBB/xvfb-action@v1.7
/Users/runner/hostedtoolcache/node/20.12.1/arm64/bin/npm run testDebugger

> python@2025.99.0-dev testDebugger
> node ./out/test/testBootstrap.js ./out/test/debuggerTest.js

Test server listening on port 49253
****************************************************************************************************
Start Debugger tests
Using Github PAT from environment variable POSITRON_GITHUB_PAT.
End Debugger tests (with errors) Error: No asset found with suffix .dmg for platform darwin
    at downloadAndUnzipPositron (/Users/runner/work/positron/positron/path with spaces/extensions/positron-python/out/test/positron/testElectron.js:197:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async runTests (/Users/runner/work/positron/positron/path with spaces/extensions/positron-python/out/test/positron/testElectron.js:269:63)
Exiting with test failures
Killing VSC
Error: The process '/Users/runner/hostedtoolcache/node/20.12.1/arm64/bin/npm' failed with exit code 1

QA Notes

Python Mac OS tests should now pass locally and in CI.

Copy link

github-actions bot commented Feb 26, 2025

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

readme  valid tags

Comment on lines -243 to -248
case 'linux':
suffix = '.deb';
break;
case 'win32':
suffix = '.exe';
break;
Copy link
Member Author

Choose a reason for hiding this comment

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

Removed this as it doesn't seem like we support linux/win32 anyways? See lower down in this function where we look for the executablePath -- only mac is supported there.

Comment on lines -255 to -258
const asset = release.assets.find((a: any) => a.name.endsWith(suffix));
if (!asset) {
throw new Error(`No asset found with suffix ${suffix} for platform ${platform}`);
}
Copy link
Member Author

Choose a reason for hiding this comment

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

This is where the error was occurring. We no longer publish assets for the binaries.

@timtmok
Copy link
Contributor

timtmok commented Feb 26, 2025

@petetronic Should we add something to the download URL to exclude this from download reporting? This is going to download a prerelease Positron on every PR. I'm not even sure why we need to download it for a PR test.

@petetronic
Copy link
Collaborator

@petetronic Should we add something to the download URL to exclude this from download reporting? This is going to download a prerelease Positron on every PR. I'm not even sure why we need to download it for a PR test.

Good point, if we can set a user agent, or if not, a query param, that marks it as Positron CI, that would be useful.

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

Successfully merging this pull request may close these issues.

3 participants