Skip to content

Conversation

@cadojo
Copy link
Contributor

@cadojo cadojo commented Jun 29, 2025

If we add the ability to install multiple channels in the feature (as opposed to using lifecycle scripts) then users can take advantage of pre-build image caching!

Copy link
Member

@eitsupi eitsupi left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!

However, I would be very careful to determine if this additional feature makes sense.

If we add the ability to install multiple channels in the feature (as opposed to using lifecycle scripts) then users can take advantage of pre-build image caching!

In that case, I suspect you can use the onCreateCommand.
https://containers.dev/implementors/json_reference/#lifecycle-scripts


As a general matter, please also correct the followings:

  1. Bump the Feature's minor (or major) version.
  2. Update to pass tests.

Feel free to ask any questions!

@cadojo
Copy link
Contributor Author

cadojo commented Jun 30, 2025

Thank you @eitsupi!

In that case, I suspect you can use the onCreateCommand.

I recently thought to too, but I've recently learned that lifecycle commands are not included in prebuilt Dev Container images. This is a bit confusing to me, because there is actually a --prebuild option to the up command of the reference implementation.

devcontainer up --prebuild

Do you agree? Perhaps I'm missing something! If my description above is correct, then I think users would benefit from the ability to add multiple channels to the feature.

Bump the Feature's minor (or major) version.

Do you have any preference here? I'd be inclined to make no breaking changes and release this as a minor version, personally. But I'm happy to implement whatever you think is best.

Cheers!

@eitsupi
Copy link
Member

eitsupi commented Jul 2, 2025

Thanks for explaining!
Actually I agree that it is worth implementing this approach if you have already tried it, because I do not use pre-built images.

Do you have any preference here? I'd be inclined to make no breaking changes and release this as a minor version, personally. But I'm happy to implement whatever you think is best.

As you say, if it passes all existing tests, it is a good idea to bump the minor version.


What I remembered about this was that some official Features use a separate environment variable to install multiple versions.
https://github.com/devcontainers/features/blob/a69dd5c8be227b635c007233e1a840e3e336fd05/src/node/install.sh#L17-L19
https://github.com/devcontainers/features/blob/a69dd5c8be227b635c007233e1a840e3e336fd05/test/node/scenarios.json#L10-L19

The excellence of this approach is that it is clear which is the default version.
So why not add a new option additionalChannels instead of allowing comma-separated values for the existing option?

@cadojo
Copy link
Contributor Author

cadojo commented Jul 2, 2025

So why not add a new option additionalChannels instead of allowing comma-separated values for the existing option?

Oh good idea, I like this approach better. I'll take a crack at that on Friday.

@cadojo cadojo force-pushed the patch-1 branch 2 times, most recently from fde0cf7 to 95426e9 Compare July 12, 2025 16:53
Copy link
Member

@eitsupi eitsupi left a comment

Choose a reason for hiding this comment

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

Could you change the version to 1.2.0?

chore: cleanup whitespace

test: add unit test for comma-separated channels

test: correct unit test

fix: dynamically find '$HOME'

fix: variable expansion

feat: add additionalChannels
@cadojo
Copy link
Contributor Author

cadojo commented Jul 12, 2025

Could you change the version to 1.2.0?

Done!

@cadojo cadojo requested a review from eitsupi July 12, 2025 17:36
Copy link
Member

@eitsupi eitsupi left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!
Some minor comments.

Copy link
Member

@eitsupi eitsupi left a comment

Choose a reason for hiding this comment

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

Looks nice, thanks!

@eitsupi eitsupi merged commit 98d5764 into JuliaLang:main Jul 13, 2025
7 checks passed
@cadojo
Copy link
Contributor Author

cadojo commented Jul 13, 2025

Thank you!

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