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 pixi to fix julia package permissions on Windows #1710

Merged
merged 3 commits into from
Aug 12, 2024

Conversation

evetion
Copy link
Member

@evetion evetion commented Aug 9, 2024

Fixes #1603

Given the recent changes in Teamcity, the original project is lost-ish https://dpcbuild.deltares.nl/buildConfiguration/Ribasim_Ribasim_Windows_FixJuliaArtifactPermissions?branch=continuous_control&buildTypeTab=overview&mode=builds? As in automatic (?), greyed-out, no build steps or builds visible. Furthermore, the new Template(s) used is/are platform-agnostic, so harder to integrate a Windows specific fix.

So the easier way is just to integrate it into pixi, and always running it at CI time, also useful when it irrevocably happens on Windows laptops. However, there seems to be no way to have platform specific tasks (@Hofer-Julian is that correct and maybe worth an issue? I know you proposed the deno shell 😉), so I now just append an exit, ignoring any exit code of the previous command.

@evetion evetion requested review from visr and Jingru923 August 9, 2024 17:13
@evetion evetion changed the title Use pixi to fix Windows permissions. Use pixi to fix julia package permissions on Windows Aug 9, 2024
Copy link
Member

@visr visr 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 to me. Technically the DEPOT_PATH can also be different, but this should in practice be sufficient.

pixi.toml Outdated Show resolved Hide resolved
pixi.toml Outdated Show resolved Hide resolved
@Hofer-Julian
Copy link
Contributor

However, there seems to be no way to have platform specific tasks

I think there could be a use case for dispatching which would also fulfill your use case.
Like pixi run task_x would run something else on linux than on windows. If a linux task doesn't exist it could be ignored like in your case. Feel free to tag me if you open an issue for this.

In your case, I would recommend a Python script, instead of your exit 0 hack.

Co-authored-by: Martijn Visser <mgvisser@gmail.com>
@evetion
Copy link
Member Author

evetion commented Aug 12, 2024

I think there could be a use case for dispatching which would also fulfill your use case. Like pixi run task_x would run something else on linux than on windows. If a linux task doesn't exist it could be ignored like in your case. Feel free to tag me if you open an issue for this.

Thanks, I will make an issue.

In your case, I would recommend a Python script, instead of your exit 0 hack.

I considered this, but I disliked the extra script and the layer of indirection.

@evetion evetion merged commit 2b2b3e5 into main Aug 12, 2024
24 of 30 checks passed
@evetion evetion deleted the fix/julia-dir-permissions branch August 12, 2024 06:54
@Hofer-Julian
Copy link
Contributor

@evetion turns out platform specific tasks is already a thing: https://pixi.sh/dev/reference/project_configuration/#the-target-table

@evetion
Copy link
Member Author

evetion commented Aug 15, 2024

@evetion turns out platform specific tasks is already a thing: pixi.sh/dev/reference/project_configuration#the-target-table

Ah great stuff! I made a PR. While I remembered there being overrides (had to use them for mac), I never connected these to tasks, and couldn't find examples in the documentation.

Jingru923 pushed a commit that referenced this pull request Aug 15, 2024
instead of running it everywhere and ignoring the exit code.

See #1710.
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.

Work around Julia artifacts permission errors
3 participants