-
-
Notifications
You must be signed in to change notification settings - Fork 263
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
errorWhenMissingUnityBuildResults
exposed as with
parameter
#575
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary addition to public api that doesn't add any value.
errorWhenMissingUnityBuildResults: | ||
default: true | ||
required: false | ||
description: | ||
'Check if Unity build product is present after build, and error if not. Set to false to not check, useful if | ||
producing alternative build products.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is effectively a discrepancy in the application (builder and/or container). I feel adding an option in the (functional) public api isn't the answer to this technical issue.
We should probably agree on how the application should handle this case and then handle it correctly without exposing any new "options".
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #575 +/- ##
==========================================
+ Coverage 36.96% 37.01% +0.05%
==========================================
Files 77 77
Lines 3038 3042 +4
Branches 641 632 -9
==========================================
+ Hits 1123 1126 +3
+ Misses 1915 1766 -149
- Partials 0 150 +150
|
Is this a technical issue? There may indeed be some internal need to change this parameter depending on builder or container. But that’s not why I made the PR. There appears to be a design change in v3 that a successful action completion requires there to be a built player app. That means the Unity Builder action isn’t suitable for a whole range of uses, for example building addressables content. A quick look at the issues list shows many people hitting this, e.g. #563 #564 #567 #572 |
You're probably right. And you're definitely more in the know than I am. Perhaps @davidmfinol and @AndrewKahr could continue the review on this one? |
Also @GabLeRoux |
I’ve also just read the discord post mentioned in #563, which prompted me to re-read the code for The basic point remains though – that it’s requiring something specific to be output by the build method, that not all build methods will output. This makes me wonder if a more elegant design might be either
|
I think one of the problems we're facing of why we're checking for a specific text in the first place is that the exit code isn't always reliable. But it is a long time ago that I've implemented the first code for that and unfortunately I've lost context. |
Separately, I’ve hit the issue that you can’t write a
If either pass, we don’t error. |
I’m going to abandon this PR in favour of the approach above. It’s more elegant, solves more problems, and having implemented it for my own purposes, can be self-documenting for someone who experiences the conundrum of seeing ‘Build succeeded’ (i.e. exit code 0) but have the step fail on the results check. |
Changes
Seemingly a breaking change in v2 → v3 is the action reporting error if the built player app isn’t present. Not all Unity builds are for the player, e.g. addressable content. Examining the build scripts shows a boolean
errorWhenMissingUnityBuildResults
managing this behaviour. This is now exposed as awith
parameter in the action YAML. Also, a slightly opinionated refactor ofdocker.run
to include an options object instead of the fixed signature requiring all options prior toerrorWhen...
to be defined.Checklist
code of conduct
a PR in the documentation repo)