Comments (6)
Quibbles aside, it’s good to see such thought put into it. Thanks for pushing the documentation clarification, and your efforts generally.
from docker.
Thanks for opening an issue for this @tobyspark
This is by design, let me try to outline a tl;dr: Our actions aren't a thin wrapper around a docker container. Their goal is actually to take away as much complexity for the user as possible. We do this by exposing a public API in the form of configuration options.
We allow people passing in custom parameters so that you can basically pass in anything, while at the same time having a documented place of what's passed into Unity, which also needs to be used in the build script, making users implementations cleaner and with less hidden complexity. This also means it's easier to share configurations and build scripts with other teams.
Finally, most teams need exactly the same functionality of a CI workflow. We much prefer making features visible (especially for people that are newer to Unity, or to CI). This is done by adding common features to said public API.
That said, perhaps it's useful to add a concise line in the docs about env
variables not being transparently passed into the container.
Although please note that that isn't exactly the default behaviour in other actions either, oftentimes you want to abstract away from "it using a container under the hood" completely. This is what we are doing.
Hope this helps :)
from docker.
That does help, thank you.
Also, having implemented the command-line reading version, my fears of leaking secrets were unfounded. At least, GitHub Actions does an excellent job of scrubbing them wherever they appear.
For what it’s worth, I share your motivation, but I struggle with the design conclusions here.
- Passing
env
is exactly what you would want to do given the goal of abstracting away that “it uses a container under the hood”. - Passing variables via
env
is what GitHub Actions promote, and is generally expected in CI environments.customParameters
is, well, custom and so not “removing complexity” for “people that are newer to Unity or to CI” or otherwise.
Plus, on taste –
- It’s ugly. Both in the workflow file and code required to parse them out.
One final thought is that because our app doesn’t have tests (at least, not that would run here, yet) I skipped that part of the getting started. And that’s where use of customParameters
is discussed, not Builder
.
from docker.
from docker.
- Passing env is exactly what you would want to do given the goal of abstracting away that “it uses a container under the hood”.
- Passing variables via env is what GitHub Actions promote, and is generally expected in CI environments. customParameters is, well, custom and so not “removing complexity” for “people that are newer to Unity or to CI” or otherwise.
The second point isn't completely accurate in my opinion. Actually they promote either using with
or env
to let's say "communicate" with the action. We have decided to go with the in our opinion cleaner with
variant where possible (after initially having used env
exclusively. note that with
still uses INPUT_*
env variables internally). For for most intents and purposes we already use what they promote. The only thing we don't do is allow arbitrary (and undocumented) env
variables, which brings me to your other point.
First off I think your point 1 is an excellent point.
It would however create a duality of APIs (the programmatic API and env variables). The latter can have conflicts that can be hard to debug. Allowing arbitrary env
variables adds a lot of variability to the behaviour of the container (for example date, timezone, charset, unintended variables, SDK version values etc. which are covered in actual logic instead - abstracting away from quite a bit of other complexity at the same time, like how to call the Unity Editor from command line in for different use cases - I promise, it's not straightforward like we initially thought too), which can end up making it hard to debug differences between different CI systems (we don't only support GHA). Instead we chose to keep it a bit more agnostic.
It is in fact very hard to find out how people use our actions, by having people collaborate on a shared API we believe we end up solving more problems and we're able to make it more user-friendly towards newer developers. Part of this rationale is also described in game-ci/cli#9.
I'd say your approach would have been sound too.
from docker.
Thanks for your contributions!
Closing this but feel free to reopen at any time.
from docker.
Related Issues (20)
- Missing WebGL/Android building docker containers for Windows HOT 2
- Build Failed on unityci/editor:2021.3.22f1-windows-mono-1.1 HOT 1
- Support for Windows Server 2022 HOT 1
- Build fails for editor-ubuntu-2023.1.0f1-webgl-1.1.2 with URP
- Update ubuntu version from 18.04 to 22.04 HOT 3
- Manifest unknown for certain images on unityci/editor but not for others. HOT 2
- Stop supporting EOL versions of Unity Editor
- manifest for unityci/editor:2022.3.8f1-linux-il2cpp-1 not found HOT 1
- manifest for unityci/editor:windows-2021.3.16f1-webgl-2 not found HOT 1
- "Build succeeded" but still getting "There was an error..." HOT 1
- Fail to build containers because of failing git lfs checkout HOT 2
- docker: invalid reference format: repository name must be lowercase. HOT 4
- Unable to Generate Logs and Hanging Execution with unityci/editor Docker Image on Mac with Apple Silicon HOT 1
- xvfb-run is not invoked as root user when using runAsHostUser
- GameCI WebGL builds have no audio. HOT 1
- Licensing issue with non root user
- Intermittent crashes when running unity builds on docker.
- Dedicated Server support for Linux is not installed after updating from 2022.3.16f1 to 6000.0.0f1 HOT 9
- Error when pulling ci editor image for version 2022.3.29.f1 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker.