iTop icon indicating copy to clipboard operation
iTop copied to clipboard

N°5235 - Add tmp dir is writable check in setup

Open piRGoif opened this issue 2 years ago • 6 comments

If not present, will crash curing compilation (in \MFCompiler::Compile, when doing unlink($sTempTargetDir);)

piRGoif avatar Jun 15 '22 13:06 piRGoif

Accepted in technical review. @piRGoif will test on Windows / Linux env to ensure it does not bring any regression before reviewing it in functional review.

Molkobain avatar Jul 05 '22 14:07 Molkobain

For now, \SetupUtils::CheckWritableDirs only checks under APPROOT :(

piRGoif avatar Jul 05 '22 15:07 piRGoif

Now the readonly is correctly detected ! Rebased the branch by the way O:)

piRGoif avatar Jul 05 '22 15:07 piRGoif

Error message :

image

And success message :

image

piRGoif avatar Jul 05 '22 15:07 piRGoif

Nice addition to the preliminary checks ✌

Molkobain avatar Jul 26 '22 21:07 Molkobain

Discussed during technical review: Why not include the directory test in the already existing self::CheckWritableDirs() method? Is it just for the specific error message?

Molkobain avatar Aug 02 '22 14:08 Molkobain

Discussed during technical review: Why not include the directory test in the already existing self::CheckWritableDirs() method? Is it just for the specific error message?

That was what I wrote in my message dated of 5th july : this method is meant only to check dirs under approot for now... I tried first to refactor it, but it made the code complicated so I added the tmp dir check as a standalone test : simplier, much easier to read and understand.

piRGoif avatar Aug 16 '22 07:08 piRGoif

Ok thanks for the clarification, maybe we should add a comment above it to avoid someone to refactor this and put the tmp dir in the above array. What do you think?

Molkobain avatar Aug 16 '22 15:08 Molkobain

Yep, adding a phpdoc block to \SetupUtils::CheckWritableDirs would be a good idea ! I'll do it in the upcoming days

piRGoif avatar Aug 16 '22 16:08 piRGoif

Rebase branch + force push

piRGoif avatar Aug 17 '22 07:08 piRGoif

PHPDoc added : 4a026469

piRGoif avatar Aug 17 '22 07:08 piRGoif

Processed today in technical review : good to go for functional review next week !

piRGoif avatar Sep 06 '22 14:09 piRGoif

Rebased & forced pushed !

piRGoif avatar Sep 07 '22 06:09 piRGoif

Functional review: See with @Rorcha07 for possible complications on exotic setups (eg. lodabalancers, netwrk drives, ...) If any concern raised will be part of 3.1.0, if green light from Stephane then 2.7.8

Molkobain avatar Sep 13 '22 14:09 Molkobain

Discussed with Stephane : we will switch the check to warning so it will become non blocking. The information will still be there, and we won't block setup wrongly !

piRGoif avatar Sep 13 '22 15:09 piRGoif

New message when dir isn't writable moved to warning :

image

And after opening the details :

image

piRGoif avatar Sep 13 '22 16:09 piRGoif

Extra commit under bdfe3a3b to actually push the error to warning change

Molkobain avatar Sep 14 '22 19:09 Molkobain