-
Notifications
You must be signed in to change notification settings - Fork 4.2k
update mono-devel in dockerfile, and don't cache later commands #32885
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
Conversation
03fc902 to
b3bda77
Compare
| # Update previously installed mono-devel. | ||
| # Cache bust ensures we'll always run the commands following regardless of docker cache status | ||
| ARG CACHE_BUST=0 | ||
| RUN apt-get update && apt-get upgrade -y |
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.
Should we restrict this to just mono-devel?
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.
Me and @agocke spoke about this yesterday. We figured that we should keep everything up to date as otherwise we could get into weird states where an 'incremental' build fails differently to a new build due to package versioning diffs.
My thinking was to update all, then restrict if we see it taking too long in the future.
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.
Running this in the middle will disable caching for all subsequent statements. Is that what you intended?
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.
Yes, we edit the user permissions to make them match the outer user. That causes the upgrade/update to have issues, so it's simpler to do it before hand. The user stuff takes a trivial amount of time to run, so we aren't hurt by not caching it. (Also, we have no guarantees that the outer user will stay the same, so we'd potentially not want to cache it anyway, although the chance of it changing and the cache remaining seem slim)
In reply to: 251963406 [](ancestors = 251963406)
eng/targets/XUnit.targets
Outdated
| adding our argument in, then having a second empty quoted argument before the real args. Hmmmmmm. | ||
| --> | ||
| <PropertyGroup> | ||
| <MonoTool>$(MonoTool)" --debug"</MonoTool> |
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.
@tmat as we'll need a proper way of doing this at some point.
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.
Can't we set MonoTool to a Bash file that invokes mono with the extra argument?
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.
We get the MonoTool path as part of our build script
Line 245 in b84562d
| mono_path=`command -v mono` |
So we'd need to dynamically emit that script to a temp path, then pass that in to MSBuild. That seems just as clunky as this?
I'm going to file an issue/PR against arcade to allow add an extensibility point here that we can tap into
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.
Opened dotnet/arcade#1902
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.
Why? The script can just call mono --debug $@. Mono will then be searched on $PATH
|
Looks like the docker kill command is wrong:
How can we tell what Mono version got installed here? I can't see the line with the date that you prevously sent in slack. Note: I'm doing a rebuild of this just to see the effect on the Mono run / caching. Everything passed first time around. |
|
I'll take a look at the docker kill. Due to rendering issues between VT and ADO web view the version info doesn't show up, but its there in the log. Download the txt version and search for In reply to: 458567955 [](ancestors = 458567955) |
agocke
left a comment
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.
I think we should file a bug to remove --no-cache when the machines have been cleared.
| # Update previously installed mono-devel. | ||
| # Cache bust ensures we'll always run the commands following regardless of docker cache status | ||
| ARG CACHE_BUST=0 | ||
| RUN apt-get update && apt-get upgrade -y |
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.
Running this in the middle will disable caching for all subsequent statements. Is that what you intended?
|
I think the kill command is ok actually. We grab the running PID and pass it to kill, but if it's already exited there's nothing to kill. We In reply to: 458654516 [](ancestors = 458654516,458567955) |
Filed #32916 |
eng/targets/XUnit.targets
Outdated
| </None> | ||
| </ItemGroup> | ||
| </Target> | ||
|
|
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.
revert?
jaredpar
left a comment
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 fixes a couple of related Mono CI things:
Pass --debug on the command line for future debugging:
Docker compose caches layers, causing out of date mono builds:
A mono upgrade bug between 5.21 and 5.23 breaks
apt-get update:--no-cacheoption and just do an incremental update (bullet 2).