Skip to content

Upgrade to Resonant v0.50.4#475

Open
brianhelba wants to merge 4 commits intomainfrom
resonant-upgrade
Open

Upgrade to Resonant v0.50.4#475
brianhelba wants to merge 4 commits intomainfrom
resonant-upgrade

Conversation

@brianhelba
Copy link
Copy Markdown
Member

No description provided.

Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
@brianhelba brianhelba marked this pull request as draft April 8, 2026 21:02
@brianhelba brianhelba force-pushed the resonant-upgrade branch 4 times, most recently from ced4f53 to 6a945a5 Compare April 9, 2026 14:51
@brianhelba brianhelba marked this pull request as ready for review April 9, 2026 15:00
Comment thread README.md
Comment thread README.md
```bash
docker compose run --rm -v /path/to/wav/files:/data django ./manage.py importRecordings /data
```sh
./manage.py importRecordings /data
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Modifying the volume mounts like this isn't really compatible with dev containers. Of course, it's possible to modify the Docker Compose files and then restart the whole stack, but I think the better approach is just to hardlink the files from their host filesystem into the repo.

@BryonLewis Can you test if hardlinks work, then we can update these docs accordingly?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Sorry, I forgot about this comment. This would mostly be softlinks (mounting a directory to import multiple wav files). This wouldn't work because it would be pointing to a location outside of the mounted container. This isn't something that is done frequently and if done I would probably utilize this: https://code.visualstudio.com/remote/advancedcontainers/add-local-file-mount

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Symlinks on the host system certainly wouldn't work: from within the container, they'd point seemingly nowhere.

I was thinking about whether we could use hardlinks instead, but I realize those only work with individual files, not directories.

I was hoping you wouldn't have to modify any of the volume mounts.

@brianhelba
Copy link
Copy Markdown
Member Author

@BryonLewis @naglepuff This is ready for testing and review. Any feedback is welcome.

@brianhelba brianhelba changed the title Upgrade to Resonant v0.50.2 Upgrade to Resonant v0.50.3 Apr 10, 2026
@brianhelba
Copy link
Copy Markdown
Member Author

I just rebased this and bumped it with an upstream patch version.

Comment thread .devcontainer/devcontainer.json
Comment thread .vscode/launch.json
"justMyCode": false
},
{
"name": "Pytest: Debug",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Test breakpoints weren't working for Bryon for some reason.

@BryonLewis
Copy link
Copy Markdown
Collaborator

So I decided to test this in MacOS to see how it functioned and below are some minor notes:

I modified the platform: linux/amd64 for django and celery for the Large Image wheels support so it will use Rosetta 2 translation layer.

I then removed all of my previous images and volumes for a fresh install.

I'm getting an npm access error:

npm error code EACCES
npm error syscall open
npm error path /home/vscode/pkg-cache/npm/_cacache/tmp/825561c2
npm error errno -13
npm error
npm error Your cache folder contains root-owned files, due to a bug in
npm error previous versions of npm which has since been addressed.
npm error
npm error To permanently fix this problem, please run:
npm error   sudo chown -R 1000:1000 "/home/vscode/pkg-cache/npm"
npm error Log files were not written due to an error writing to the directory: /home/vscode/pkg-cache/npm/_logs
npm error You can rerun the command with `--loglevel=verbose` to see the logs in your terminal

Exec-ing into the container and checking the folder:

$ pwd
/home/vscode/pkg-cache
$ ls -la
total 24
drwxr-xr-x 5 vscode vscode 4096 Apr 15 21:23 .
drwxr-x--- 1 vscode vscode 4096 Apr 15 21:23 ..
drwxrwxr-x 4 root   root   4096 Apr 15 21:23 npm
drwxr-xr-x 8 vscode vscode 4096 Apr 15 21:24 uv
drwxr-xr-x 4 vscode vscode 4096 Apr 15 21:23 uv-python

Looks like something is running during initialization that is writing to root access in the npm folder.

I know you have a comment in there about the User being set up in the docker file but I did try adding
"remoteUser": "vscode" to the devcontainer.json and it seems to still have this issue.

Then removed the npm command from onCreateCommand and updateContentCommand when exec-ing in there is still an npm folder in the ./pkg-cache that is owned by root. So I'm guessing it is the feature install of node:1 that is interacting with the NPM cache and some different way for MacOS rosetta that is causing problems.

To confirm the next line in this link: https://containers.dev/implementors/features/#user-env-var
States that features are typically ran as root.
I haven' parsed all of the node:1 install script but I'm guessing somethong is happening where the npm cache being set by the environment variable is initializing to root and causing problems. Weird I didn't see it in linux though.
https://github.com/devcontainers/features/blob/main/src/node/install.sh

If I exec in and delete npm cache all subsquent runs until a rebuild of the base image seem to be fine.

@brianhelba
Copy link
Copy Markdown
Member Author

@BryonLewis This is an incredibly helpful bug report, thank you!

From looking at the Node feature, I think it may be caused by the pnpm install step. I've just pushed a change to disable that. Could you drop the cache volume docker compose down -v on your MacOS machine and try again with this latest change?

@BryonLewis
Copy link
Copy Markdown
Collaborator

From looking at the Node feature, I think it may be caused by the pnpm install step. I've just pushed a change to disable that. Could you drop the cache volume docker compose down -v on your MacOS machine and try again with this latest change?

Just re-tested after removing everything and it seems to be working. The ./pkg-cache-npm directory is owned by vscode now.

There may be another side issue (after launch I tried cd client and npm run dev and it had some weird notfound issues with some specific part of rollup, but a quick rm -rf node_modules and reinstall fixed that. I'll debug further later.

@BryonLewis
Copy link
Copy Markdown
Collaborator

Update: That side issue with the rollup module and npm run dev didn't seem to be there this morning. A clear install allowed me to install and run the client without any issues.

@brianhelba brianhelba changed the title Upgrade to Resonant v0.50.3 Upgrade to Resonant v0.50.4 Apr 22, 2026
@brianhelba
Copy link
Copy Markdown
Member Author

@BryonLewis I've rebased this on main and pulled in bugfixes from v0.50.4 (many of which were reported by you).

Let me know what you think.


@naglepuff Any feedback would be welcome too. I'm happy to talk through this live if you'd prefer.

Copy link
Copy Markdown
Collaborator

@BryonLewis BryonLewis left a comment

Choose a reason for hiding this comment

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

I pulled down on both my Ubuntu workstation and M3 MacBook and tested the dev containers up to starting the celery container and importing/converting a wav file into its spectrogram and pulse/line metadata.

This worked on both the MacBook and Ubuntu systems without any problems.

LGTM

@brianhelba
Copy link
Copy Markdown
Member Author

@BryonLewis Any thoughts about this section of the docs: #475 (comment)

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 22, 2026

Deploying bats-ai with  Cloudflare Pages  Cloudflare Pages

Latest commit: b0fdab1
Status: ✅  Deploy successful!
Preview URL: https://35e906d8.bats-ai.pages.dev
Branch Preview URL: https://resonant-upgrade.bats-ai.pages.dev

View logs

@brianhelba
Copy link
Copy Markdown
Member Author

@naglepuff I'd like to get more of your feedback on this, but I think it might be easier to just merge it now, then have you try it out during normal development from main.

Is that ok?

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.

2 participants