Commit Graph

360 Commits

Author SHA1 Message Date
Mandie Smith f8e207653a
Update to use fs-extra to get recursive rm, updated tests 2018-10-22 10:59:58 -04:00
Baptiste Mathus 86debb6dec Merge branch 'master' into HEAD
# Conflicts:
#	distribution/client/src/lib/storage.ts
#	distribution/client/test/storage.test.ts
2018-10-18 11:24:12 +02:00
Baptiste Mathus 921be21dcc
Merge branch 'master' into update-package-lock 2018-10-17 20:05:19 +02:00
Baptiste Mathus fb6ba32621 Return a composed Promise with all deletes queued in
Was previously returning an array of calls to `fs.unlink`, which I think
was an array of undefined, and on which an `await` will not wait as
I think was intended.
2018-10-17 17:58:16 +02:00
Baptiste Mathus f41f19ee63 Do not mock anymore Downloader from update test 2018-10-17 17:40:23 +02:00
Baptiste Mathus c594d670de Change checkFileExists and touchFile from async to sync 2018-10-17 17:07:41 +02:00
Baptiste Mathus 94c58a4a8c Fix 'Cannot assign to 'level' because it is a constant or a read-only property.'
```
src/client.ts:186:10 - error TS2540: Cannot assign to 'level' because it is a constant or a read-only property.

186   logger.level = process.env.LOG_LEVEL || 'warn';
             ~~~~~

make: *** [Makefile:14: compile] Error 2
```

See https://github.com/Microsoft/TypeScript/issues/6751#issuecomment-269162714
and https://stackoverflow.com/questions/38818475/left-hand-side-of-assignment-expression-cannot-be-a-constant-or-a-read-only-prop/38833920#38833920
2018-10-17 14:01:09 +02:00
Baptiste Mathus 7eec987ca6 Update package-lock.json files and add tasks for it on top level Makefile 2018-10-17 13:50:26 +02:00
Mandie Smith 012399dfe5
Merge branch 'master' into JENKINS-53589_rm_plugin_dirs 2018-10-16 12:13:03 -04:00
Mandie Smith 7a4976c622
Updated test to put a file in the directory before deleting it 2018-10-16 12:12:05 -04:00
Mandie Smith 46247a5cb6
Added jest html report to help with test troubleshooting 2018-10-16 12:11:38 -04:00
Mandie Smith 3bba606ebb
Updated to include shell definition so that PATH would actually work, was getting error on not finding commands before that 2018-10-16 12:11:15 -04:00
Baptiste Mathus c8fad0ad33 Setting updateInProgress if null during a forced update
Added a warning because this isn't supposed to happen, as forced update
is supposed to be used only during a rollback, from a recursive call to
`applyUpdates`.
2018-10-16 13:16:40 +02:00
Baptiste Mathus ebace8026d Clarify that FIXME
Granted, that was cryptic.
2018-10-16 12:30:15 +02:00
Baptiste Mathus 3fbfe9848b Slightly condensing more for phone-sized screens :-P
For you @rtyler! :-)

```
``````````````````````````````````````````````````````````````````````  ```````````````````````````````````````````````````````````````````````````
```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````
```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````
```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````
```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````
```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````
```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````
```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````
``````````````````````````````````````````````````````````````````````````````` ``   `... `` `` ````````````````````.``````````````````````````````
``````````````````````````````````````````````````````````````````````````   '####+#+'++';'##;+.,````````````````````````````````````````````.`````
```````````````.``````````````````````````````````````````````````````` `,@#+++++#+++++++;:'+'+@,``.````````````````````````````````````````` `````
``````````````````````````````````````````````````````````````````````:@#++++##+#+'+++##++#+;.+##+'+;. ````````````````````````````````````````````
``````````````````````````````````````````````````````````````````` ;#+####+++#+##+##+#+#++#+++;'+##;;+':``````````````````````````````````````````
`````````````````````````````````````````````````````````````````.+#++++##+######++#+##+++##++'#+#+'+:':,' ````````````````````````````````````````
`````````````````````````````````````````````````````````````````#++#++########+##+####++++##+#++'':++;''`.````````````````````````````````````````
`````````````````````````````````````````````````````````````  @+#######++#+#+##########+#+##+##+'+++++... ````````````````````````````````````````
``````````````````````````````````````````````````````````` `+++#################+#####++++'##+##+#+#+++::'````````````````````````````````````````
```````````````````````````````````````````````````````````,'++######+#++#+##+#######+######++#++###+++#+,.```` ```````````````````````````````````
```````````````````````````````````````````````````````````#++########################++###+++######++'++;::`.`````````````````````````````````````
`````````````````````````````````````` ``````````````````:#++##++##++##++++##++#######++++++###'##+###++:++:.``````````````````````````````````````
````````````````````````````````````````````````````````'+++++++#+##+##+#+++#+#######+##+++###++####++'+;';;+`,````````````````````````````````````
```````````````````````````````````````````````````  ``:++++######+#+++#####+########+#######+###++#+#+++#+;'+'.` `````````````````````````````````
``````````````````````````````````` ``````````````````#+#+##########+++################+#########+##+++#+++#+':`,``````````````````````````````````
``````````````````````````````````````````` ````    ,:+###+#+#####+#++####+########+++++##++++#+#+++##+##+++'++'+``````````````````````````````````
``````````````````````````````````````````````` ```,,+#+#+++++++#+##+########++##+#++++##++++++##+++++##++#++++'+``````````````````````````````````
`````````````````````````````````````````` `  `` `:.+++#######+#++#+##+++####++#+++######+###'+##+'+####+#+++#++'.`````````````````````````````````
``````````````````````````````````````````````` `.;##+++###+##+#+####++++####+###+##+#######+##+###++++###+++++++;.````````````````````````````````
`````````````````````````````````````````````` ` .;+'+#+####++######+##+###+###+#######+++#+#+'####+#+'+#++#++++++; ```````````````````````````````
`````````````````````````````````````` ```````  .+#+++####+#+###++##++#+#######+++###++#+###+#'++##+#++++#++++++'',.```````````````````````````````
``````````````````````````````````````` ```````:#++#########+######++++#####+##++++##+#++##+++#'++###+++++#+###++@:.```````````````````````````````
```````````````````````````````````````````` ` @#++######++#+####+###+#++######+##+'##+##+#++';'+++#+#+++++#++++'@'````````````````````````````````
````````````````````````````````````````````  +++#####+++++##+##++++#+####+#++++++++#+++'++';'';;;'+''+''++#+++++#,````````````````````````````````
``````````````````````````````````````````````;'###++#++++++###+++#+++++#++#####++++++++'';';;:;;;;''';;'';++++++.+````````````````````````````````
`````````````````````````````````````` ````` `'++####+#'##+#++#+#+';''''++#++#++++++++';;::::;;;::;;;:;;;;;#+++++++````````````````````````````````
````````````````````````````````````` `````  `@#+####+#+#+###++++;;::,:;:::;''';;::::,:::::::,::,,:;:::;:;;'+++++'; ```````````````````````````````
``````````````````````````````````````` ``   ,+++++++'+#+#+++#+''':::,,,,;:::,,,::::,,:,,,,,,,,,,:::,:::;:::#++++++, ``````````````````````````````
```````````````````````````````````````````  ++++###+++#+#+#+++':;,:,:,.:::;:,:,::.,.,,,,..,,,,,::::::;;;;;;#+++++':```````````````````````````````
````````````````````````````````` ```` ``    :++++#+++###++##'+':::::;:,:,:,,,,,,,,,,,,,,.,.,,,,,:,,::::;:;;;+++''':```````````` ``````````````````
``````````````````````````````````````  ` ``;#+#####+++##+#+#+++::,:::,:::,:,,,:,,,,,,,,,,,,,`.,.,,,::::;::;:#++''+,```````````````````````````````
```````````````````````````````````````` ```;#+#####+++++#++'++;:;,:,,:,::,..,,.,,,,,.,.,,......,.,,,::,:;:;;#++++;`.` ````````````````````````````
`````````````````````````````````````` ```  :+#+#####++#+#####+':;;::,::,:,,,:,,,,,...,.,.`.....,,,,,,,:;:::;##+++;..``````````````````````````````
``````````````````````````````````````` ````+#+###+#####@##+##+;:,::::',,:,:,,..,,,,.,...`...`..,,,,.,,::;;;:+#+;'#````````````````````````````````
```````````````````````````````` ````````.`+'+#+##+######++##++::;:::::::,,,,,..,,`,....,,.....,,,,,,::::::;;++++#'.```````````````````````````````
``````````````````````````````````` ```` :+#+++#########+#####'';;;;::::::,.,.,,,,..,.,,.......,,,,:,::::;:::'++;:.````````````````````````````````
`````````````````````````````````````````+++++#+#############+''::::,::,::,....,,.,,,.......,....,,,:,:;;:,;:;++,``````````````````````````````````
````````````````````````````````````````.';+################++';,;::::,:,,,.:,,,.,..,,,,.,.,`..,.,:,.::;:,;;;'''+;.````````````````````````````````
````````````````````````````````````````.:;'##+++@##########+++;:,;,:::;::,:...,.,,:,,.,::::,::,,::::,,:::::;;'':` ````````````````````````````````
```````````````````````````````````   ` .`;+##+#+############+';;::::;:::::,:,,,,,.,..,.,........,,,,.,.::::;'+#; `````````````````````````````````
`````````````````````````````````` `` ```.+++##+#+########+##+'';;:::;::::,:,,:..,,.,,.,.,.,.:.,.:,,:,,,:::::@+:,``````````````````````````````````
````````````````````````````````````` `` :++######+##+######++'':;::::;:::::::,,.,,...,.....,,`..,.,,::,:,:;,'+,```````````````````````````````````
````````````````````````````````` ` ```` '''##+#++++++#+####+''';:::::,:::,,,:,::,::,::,,`...,....,:,,::::;;,;:,```````````````````````````````````
`````````````````````````````````````````;+'+###++++++##++##++';;:;:::,,::,:,.,,:,.,.....,,:,:,,,,.,..,,::::.#'````````````````````````````````````
`````````````````````````````````````` ``:+++###++##'++###+#+++;;,;::,,,:,,,:,,:.,,,.,...,,.,,.`...,,,,,,::;,:'``````` ````````````````````````````
``````````````````````````````````````````#++###++#'++'#++++++';:::,:,,:,:,,.,,,,,,,,.....,..,..`..,..,:,::;,:+````````````````````````````````````
`````````````````````````````````````    `#+++##++#+:+'#+#+#++';;::;:::.,::,,,,,,.,...,,...,.,,,..,,,,,:,,::,;`````````````````````````````````````
``````````````````````````````````````` `:###+##'++'++'+#++'#+':::,::,:::::,:::;.,:,.,,,.,,,,,:.,.,,,,,:.;;;,.`````````````````````````````````````
`````````````````````````````````````   :::'+#+##'';'''''##'++'::,::,:;,:;;;::;,+';;;,,,,:,.:::,.,,,:;::::'';``````````````````````````````````````
```````````````````` ````````````````   .,;++++#@'.:;'';'+###';::::::::,:';:';;':+'++'':::,,,:,,,::,:''++''+'  ````````````````````````````````````
`````````````````` ``````````````````   ,,'+'+##@'.;;'::''#+#+:::,::,,:,'';;;'+''';'++';:;;:,,,.,,'++'''+''+,``````````````````````````````````````
````````````````````````````````````   ``+:+++###+.:;;,:::+#:::::::::::,:,:+;;;+#'';',:';:::,,,,,''+#;+#'+':``` ```````````````````````````````````
``````````````` ````````````````   `` `...;+'++++#,,::,,;:;';;::::,:,:.;:::''###+`,:+;;;::,...,,;;.++##.;'#:```````````````````````````````````````
``````````````````````````````` ```  ```` `+++++##:,::.:,:;';;:;::::,..;,,:::.@#;``,:,::::,...,::`,,#@..,:;,```````````````````````````````````````
``````````````````````````````` ```  ` `..;++#+++++:,:';,:;'';:::,,,:;...,,`.;,`.,,;...:::,,..,::.```.::;,,,```````````````````````````````````````
`````````````````````````````````````````.,'++++++':.:;;,;;;;::::,:,..,::,.,,:,...,::,.;::,:,.,:;.::,::,,;::,``````````````````````````````````````
````````````````````````````````` `  ```` ,+++'+++''.,,',;;';'::::,,,:,,,,..:,,,,,,,,.::,:,,.,,,:::,:,:::,:;'``````````````````````````````````````
``````````````````````````````  `````` ``` +.+;+++#:,,.:,;:;;;:;;::,:,,,,..,..,,,,,..:,:,::,,,,::::,.:,,,,,:; `````````````````````````````````````
``````````````````````````  ` ```` ```  `  ``++;:#+:,,:,;;;;;;::;:::,.,.,...,,,.....,,,,:::,,,,::::,,,,,,,,:,` ````````````````````````````````````
```````````````````````` `` ` ` ` ````  `` :  +:,,+#;:,::;;;;;;::,::,.,,.....,,,,,,.,,,::,,,,.,::::,,.,,,,::;` ````````````````````````````````````
``````````````````````````````  `````  ` ` ` `+#;+++::,,:;;;;;;:,:;:,,:.,..,,,,,...,,,::::,,,,.:::::,,,,,:::'``````````````````````````````````````
````````````````````` ````` ``  ` ```` ``````.:'##++#.;::;;;;';;;:,,:,,,.......,..,.,,::::,,,..,::;,,.,,,,::;``````````````````````````````````````
````````` ````````````````` `````````` ` ` `., ++##;#;,;:;;;;';;:;::.,:.,,.....,,,,:,,,,::,,...::::::,.,::,:;``````````````````````````````````````
````````````````````````  ````````````      `.`. ,  +;;:::;;;;:;::::::,.,.:..,,::,,,:,,,,:,,,..,,;::::,,,:,:;``````````````````````````````````````
````````````````````````  `  `  ``````     `   .````';:;;;;;;;;;:::::::.:::,,,,,',.:::,,,:::..`,,::::;::::::.``````````````````````````````````````
``.`````````````````` ``````    ``````       `````  ';:;:::';;;::,:;:::,,,:,,::;...;:,,,,,,,,,.,:::::,::::::```````````````````````````````````````
```````````````````````      `  ```````      ```  ` ;;;;;;;;;;;;;:;;:;:,,,:::;:.,,.,;::,,::,`.`.::,::::::,;; ``````````````````````````````````````
````````````` ``````````  ` ``````````       `  `  +;;;:::;,;':;;;:;;:::::::';,:,,.,.:+'+;;:,,,,::;::;;::::````````````````````````````````````` ``
``````````````````````````````````` ``       `  ```;:;;:::::;;;;:::;;;;::::;::,,,,,..,,,,;':;::;.:;:'::;::.````````````````````````````````````````
`````````````````` ```````````` ``` ``        `   . ';;:;:::;';;;:,;:;,:;;:.,::,:.:,:,,:::;;':;':;;;:;;;;:   ``````````````````````````````````````
````````````` ``````` ``` `````                ```.`,;::;;::;';:;;:;;;::::,,:,:,,,:,,,,,,,::;:::;,;;;;;:;```````````` `````````````````````````````
```````````` `````  ```````````               `` ..``;;;:';:';;::::;';::::;:;::;,:,,,,,,,,::::::;:;;:,;:,` ````````````````````````````````````````
```````````````` ```````                    `  #.`````+;:;;:;;'::,::';:::::.,,+'':::,:,,:::,;::;:;:::::; ``````````````````````````````````````````
```````` ```` ```     ``                   ```+@```````';;;::;';:;::;':::,::,:.;+.;'',,,,..,.,:;,,;::::`````````````` `````````````````````````````
```````` ```````  `   ` ```                ` @+@.````` `;:';:'';,::::';::;:;..,,,:,``,.';';';::::,::::: ```````````````````````````````````````````
````````````````     `  `  `              ``#++# ````````,:;::'';::::;';:::,:,,,.,:.```.``:```;:::::::`` ``````````````````````````````````````````
````` ``````````    `   ````               +++++;`````````.;;:;;',;:;;;;::,,:,,,:.,,,:,:..+,+:,,:::::`` ```````````````````````````````````````````
````````` `` ````   `                    `.+++++# ``` `````+'':'':,;::;;:::,,:,,,,...,,:.::,,,.:::;' `  ```````````````````````````````````````````
`````````` ` ````    `                    #++++++@ `````````#;:;;;,.;:;;:,;::,,,,;:,`..`..,..,::,::`  `````````````````````````````````````````````
````````````` ```    `                  `#++++++++,````````` +;:;':;,::::;,:,,::,::;::,...`.,:::::;```   ``````````````````````````````````````````
`````````` ``````   `                   ++++++++#++` `` ``` ` +;:;;:,::;;:::,,,,,,:;:;:;:;::;;:'::```    ``````````````````````````````````````````
````````` ```````   `                  ;++#+++##+#+#  ` ```  ` '::';,.,;;:::,,,,,::;;;'';;;;''':;'` ``   ```` `````````````````````````````````````
`````````````````                      #+++###+++++#@  `  ``````:';';::;:::,:,:,,,,,,::::::;;::,:'`   ```````` ````````````````````````````````````
``````````````                       .#+++######+++#++ `   ` ` ``,;;;:,,;,;;:,:,,:,::.,,:,,:::,::;````````````````````````````````````` ``````````
``````````````                      ''#######+####+#++:`      `````+';:;;:;;:,,,,,:,,.::;,:;,.,,;. ````````````````````````````````````````````````
` `````````````` `              `  #+++###########++++'.    `` `  ` +;';;;;;:,:.,,.,,,..,,,,::,,;` ``   ` ````` ````````````` `` ``````````````````
````` ````````                   `#+#+############+#+++#``       ````;':';;';,,:::,.,..,.,.,::::+  `    ` ````````````````` ```````````````````````
 ````````  ```                  '+++#################+++#  ` `  ```````+;;;';;;:,:,:..,,,:,,,,,:.  `    ` ````````````` `````````````````````` ````
``````` ``````             `   #++++++###############+#++@   `  ` ``````,+;;':::,,,:,,,:::,::::;     `     `````````````````` `````````````````````
``` ``` `````                `#+++++###################+++# ``     ````````#;;;';;;;::,,::;::',`  `        ``````````   ````` `````````````````````
 `````                 ` `  :+++++####################+##++' `     ````````` :':;;;;;:;;:;;';  ``          ```````````  ```` ```     ``````````````
````` `                 ```#+++++########################+++.``    ``` ``````.`,+';;'+'+;'++' ` `     ````` `` ```````  ```` `        `````   `````
`````` ``              `  #++#++##########################++#``      ````````...`''';''` #+++#`       ```````` ```` ````   `````````````` ` ```````
``````                  ,#++++##+#########################+#+@ `  `   ````````````.':;#``@+++++, `                  ````   ```  ````````` ` ```````
```` `                 @++++###############################+'+#         ````````` ```;:`.'++++++: `                        ```  ```````````````````
```` `         `  `  ,##++##################################+++;`  ``   ` ````````` `#+:`:+++++++' `                    ``      ```````````````````
`` ` `          `   #+++++###################################+++. `  `        `` ````,'#` ++++++++:```                 ````     `````````` ````````
`````   `     `   ,#+++#####################################+#+#+ ``        `````````,++@ +++++++++, `        ```````` ```` ````````` `````````````
```` `          .#'++##########################################++@   `      ``````  `@++++#+++++++++`      `  `` `````````` `````````` ```    `````
  ``     ``   `+++#+#+##########################################++@ `       `````` ` +++++'++#++++++# `    `  ````````````` ````` ````````    `````
``  `        `@++++#############################################+#++```         ``  :++++++++++++++++@   `    ```````````````` `````````   ````````
            :++##################################################+++: `         ``  @++++++++++++++++++       ```````````````` ```    ``    ```````
``  `      ++++#################################################+##+#`     ` ` ``` `+++++++++++++++++++``     ```` ```` ` ````` `  ` ```````` `````
``` `     ++##########################################################     `````   ##+++++++++#++++++++@  `     `````` ``     `    ` ` `````  ` ```
 `  ` `  @+#########################################################++#       ```` ,@'#+++++++++++++++++:`      ```   `  `    ` ````` `````  ` ````
 ` ` ``;#+###########################################################++'```` ```  +'`.`++++++++#++++++++@ ``        ``  ``````   ``` ``````   `````
`` `  '+#+############################################################++`` `````  '++` ++++++++++++++++++;``    `````      ```  ````` ``````` `````
`    '+###############################################################++@ ```    ..'++.@#+++++++#++#+++++#      ```` `` ``````  ``` ``````    `  ``
    ,###+#########################@#####################################+.````   .,,+#`:++++++++++++++++++;`    ` ```` `          ````    `   `````
`   ##############################@####################################+#@  ` ``:,:,;;. ++++++++++#++++++'# `   ` `````  `        ````  ``    `````
   @#############################@#@####################################++'    ......`,`+++++++++#+++++++++:                 `     ``` ````  ``````
` ,#####################################################################+##   ..,,,....,:'+++++++##++++++++@       ```       `     ``` ` ``  ``````
` @#######################################################################+#,,::::......,:#+++++++##++++++++,`  `  `   ` ``  ```  ````````` ```````
 `+######################################@################################+;,:::::..``..,:++++++++##+##++++#+` ```  `   ``   ``      ````````` ````
 @######################@##############@#################################+:,::::::..``..,,++++++++###+##++++'#   ',`    ` ` ``` ``````````` ``````
 ############################################@###########################::::::::;,....,,:+++++++++#+';,,..:+#@ ,+@````  ```` ``` ````````````````
:+###########################@##########################################+::::::::;:,,..,::#+#+':::::::,,,...,'+.@+@  `` ` ` `   `  ````````````````
@####################################@@######################+##########;:::::::;;;::,::,.::::::::::::,,,,.,,,++++#  `` ` ` `   `  ``` ````````````
#######################################@###############################+::::::::;;;;;;;:...,:::::::;::,,,,.,,,;++++.  `   `           `    ```````
#######################################################################':::::;;;;;;;;;,,...,,::;;;;;;::,.....,:#+++'` `   `                ````` ``
#####################@#################################################;:,::,::;';;;;:,,....,:;;;;;;;::,.......#+++@ ` `  `     ```     ` ````   ``
##############@#######################################################+:::,,,,,,:::;;:,.....,:;;;;;';;:,,...,..;++++ ``  ``             ` `   ````
################+#####################################################;,:,,,,,..............,::;'''';;::,......;++++```` `````` ```     ` `     `
#############@##################@@####################################:,,,,,,,.................,,,:;';::,......,#+++'``` `````  ```           `````
####################@######@####@#@##################################':,,.....,.....................,:;;:,......;+++@ `` ```` ``                ```
###################@#################################################;:,......,,,,,,...................::,,,....;+++# ````` ````           `    ```
#####################@##@@#@#@######################################+::,,,,...,,,,,,,,..................,,::,,,.'++++ ``````````           `    ```
######################@#############################################'::,,,,..,,,,,,,,,,,.........`........,,::::#++++;` ````````       ```````  ```
#############@#####@#########@##@#######@###########################':::,,,.,.,,,,,,,,,.........``..........,,:,:#+++@ ``  ``         `````` ``````
@############@##########################@##########################+;:,,,,,,,.,,,,,,,,,,,.....,..............,,:,,#++# ` `````` ``````````` ``` ` `
#############@##@#################################################++;:,,,,,.,,..,:,,,,,,,,,,,,,,...,,,...,.,,,,:,.;+++,   ```   `      ``` ``  ```
##########@######################################################++;;:,...........,:;;:::::,,,,,,,,,,,,,,,,,,,:;,.:+++#`  `` `  `     ````  ``
###############################################################@,:';;:................,,:;'';:::,,::,,,,,,,,,,::,,'+++#  ``` ````` ``````    ``   `
#########@##################################################### ;';;;,....................,,:::;;;;;:::::::,,,;:::+++++`   ````````     ``      ```
############################################################## ;'';;;,..........................,,:;;;;'':;::,`.`;+++++,   `````   ````       `  ``
########################@###########@#####@#################@ .''';';:,.,,,...,,...................,::;''`.`+:`'#++++++@ ```````   `````````  ` ```
###############@##@##@##@##@@@@###@@@@###@#################@ `+;'''';:,,,,,,,,,,,,,,,.............,,,::;;'.,'##++++++++# ` ```````` ````````  `` `
##################@#@@@@@######@#####@##@##################.``#';;'';::,......,,,,,,,,,,,.........,,:,:::#`. #++++++++++.  ```````  ````   `` `` ``
###############@##########################################;``:'';;;';;:,.......,:,,,,,,,,,,.......,::::::' ..++#++++++++@ `  ````  ```     ```  ```
#########################################################@ ``#'';;'';';,.......,,,,,:,,,:,,,..,,,,:::::::':..`#+++++++++# ` `    ``````    ```  ```
##############################@##########################````@+';;'';;;:.........,:::;;::,,,,,,,,:::::::,+@`..@#+++++++++:`  `  ```  ````` ``
@###############@##########@###########################+;..` #+';''';;;:..............,::;;;;';;;:::,..:'++ ..:++++++++++@``      ` ``  `` ``
`+##########################@#########################++ ``` #+'';;''':,,.`.................,,:::;;'#++++++;,.`#++++++++++   ````` ```   ` ``   ` `
 ###################@@@##@##############@#############@ ```` #';;;;'';;,.....`...................,::+++++++@...#++++++++++:` ``  ```````  `   ``` `
 @#######@###########@@########@@##@#@@##############+,``````:';;;;;';;:.........................:::+++++++# ..`++++++++++@` ``` ``   ````      ```
 #####################@################@@############@ .````` ';:;;;'';:,,,,.....................,,+++++++++;,.`@#++++++++#````` ```````  ```` `  `
`:############@#@###########@########################:````````';::;;;'';::,,,,.,,......,...,.,..,,'+++++++++@`..++##++#+++#  ``` ```````  ```` ` `
``+#############+########@##@@########@############## `````````;:::;;;';;;::,,,,........,,,,,,,,;;#++++++++++`.. #+#+++++++````````````` `````````
` @######################@########################### `````````::::;;;;'''';;::,,....,,.,,,,,,::.,+++++#+++++@...@+++#+++++.```````````````````````
``######################@##########################++```````````:::;;;''''''';;;::,,.,,,,::::',.. +++++++++++# ..;+#+++++++.``````````````````  ``
``,+#################@@###@########################+'````````````,';;;''''''';;:::;;;:;'++++## ..`@#+##+++++++'...+++++++++.````  `` `` ```
`` ################################################+'``````````````;+''+';;'';;:,,::.:#++++++#:...'++++++++++++`` ###++++++.````  `` `` ```````` `
`` ++###############@@#########@#######@###########+;````````````````:#++';;'''';;:,;#+++###++@...`++##++++++++;,`@+#++++++`````` ``` `````````` ``
````####################@###@###@#@################+;``````````````..``.:'+'''++;;'+#########+#`.. #++++++++++++ .#+++++++# ` ``````````````````
``` ###############################################++```````````````......``````;##+##########++...@++++++++++++;.;#++++++@```  ```` ``````````````
``` @##############################################+# ```````````````````.```````:+##########+#@`..+#++++#++++++@` +##++++'`````````````````````
````;+#########################@########@##########+#```````````````````````````` @###########++..,;+++++##++++++,`###+++# ````````   ``````````
````.++###############@@############################+,````````````````````````````@+############@.,,########++++#@.#+++++@````````` ````````````
```` +#+#####################@######################+'``````````````````````````.:++############@`,,##+##+#+##++#+`:+++++, ```` ```` `````` ```````
`````@+##############################@##############++````````````````````````.. #+##############.,.####+#+++##++++`#+++'` ````` `` ```````````````
`````,+#################@###########@###############+'.`````````````````````...`:#+###############,`########+++++## #+++'` ```` ```````````````````
``````++++######################@@####@#############++;```````````````````..``. @#+##############@ .###########+##+;'+++' `````````````````````````
````` @+#+#############@#####@#######################+'``````````````````..`.`.,+#################..##########+#+##@`++++ ````` ```````````````````
``````'+++###########################################+'.```````````````````... #+#+################.############++++`@++# `````````````````````````
```````+++###################@##@####################+';``````````````````..`` ###+###############@`;###########++++,:##+ `````````````````````````
```````+++###########################################+'',`````````````````````:+###################..@########+#++#+@.@++ ``````  ` ```````````````
```````'++++##################@#######################+;:.````````````````````######################`@#######+++##+++``++`  ``` ````  `````````````
 ``````'+++++################@##@####@@###############+;;,````````````````..` #+###################@`+########+#++#++: #+#```  ` ` `` `````````` ``
`````` '++++#+##############@##########################';:.``````````````....:+#####################`;##########++###@`@+@ ``````````````````` ````
 ````` #++++#####################@@@####@##############+';,.```````````````` ########################.##+######++##++# @+# `````````````````````  `
```````@+++++###################@#@@####################;':,`````````````````#######################@ +##########+#++++@++ ````` ```````````````` `
```````#++++++####################@######################:::.```````````````++####################### ;#######+#####++@;++`````````````````````` ``
 ``````;+++++#+#+#################@##@####################:,:.`````````.`.`.#+#######################'.+############++++++;` `````````````````` ```
 ``````,+++++###################@#######@@@################',..```````...``##+#######################@.:#############+++#+#`````````````````` ````
````````''++++++##################@########################:;,,.......,,,,:########################### `'#############++++# ```````````` ```` ````
``````` #''+++++################@@@@@@@@@@@#################:,,:.,.:'::.,,.###########################;,.###########+++#### ` ```````` ````````````
 ```````.;++++++################@@@@@@@@@@@@@@##############;';;;:;:,,,,`,;###########################@..+##########+#++#++` ```` ``` ```` ```  `
 ````````#'++++++############@##@@@@@@@@@@@@@@@@@###########+..;:,..`.,`.,############################# .`@############++++;``````` ```  ``````` `
  ``````` +'+++++#########@#####@@@@@@@@@@@@@@##@############;,......,.`:;#############################:..`@############+++#```````  ``` ``````  ``
  `````````+++'+#+###########@##@@@@@@@@@@@@@@##@@###########'.,,,,,.,.:++##############################.,``@##########+#++# `````   ````` `````  `
  ``````````#+'++++############@@@@@@@@@@@@@@@@@@@############;,,:..,:;++##############################@,.,`+##########+#+++.```` `````  ``````   `
  ````````` `+++++#############@@@@@@@@@@@@@@@@@@@@@###########,:..,;'++################################,.:##+###########+++# ``` `     `  ````
   ` `````` ` #++############@#@@@@@@@@@@@@@@@@@#@@@@###########;:;++##############@@########@##########@,.+#############+++# ```````  ` ```    `
 `  ```````````'+++#########@@@@@@@@@@@@@@@@@@@@@@#+##@############################@##################### ..#############+++'````````      `     `
``  ``````````` ##+#########@@@@@@@@@@@@@@@@@@@@##+#@@@@#################################################,.`##############++++````   `   ` `
`   ` ````````  ###########@@@@@@@@@@@@@@@@@@@@@####@@@@###@########################@@@###################,,;##############++@```````````       `
 ` ```````````` '+###@###@#@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@##################@#####@@@@########@########@...@############+++# ```    ````    ````
    ``  `` `` `,'+#####@#@@@@@@@@@@@@@@@@@@@@@@@##@@@@@@@@@@@@@@##########@@@@####@#@#@@###@##############`,.@#############++# ` `````    `     `
          `````@+####@###@@@@@@@@@@@@@@@@@@@@@@@+@@@@@@@@@@@@@@@@@@@@@##@@@#@#'@##@###@@@@################'.,'##############+@ ``        `
`     `   `` ``@+########@@@@@@@@@@@@@@@@@@@@@@##@@@@@@@@@@@@@@@@@@@@@#####:@@+@##@@#@@@@@@#####@#########@..`@#############+#  `
          ```` @+####@#@@@@@@@@@@@@@@@@@@@@@@###@@@@@@@@@@@@@@@@@@@@@@####@##@#@@@@@@#@@@@@####@########### ..@#############++`  `
     `    `    #+######@@@@@@@@@@@@@@@@@@@@@@@##@@@@@@@@@@@@@@@@@@@@@@@@##@@##@@@@@@@#@@@@@####@###########;.`##############++.``
```
2018-10-16 12:24:39 +02:00
Baptiste Mathus bc7916e561 Add workaround for the race condition
If the borked UL upload happens *before* the of healthchecking for the
first startup, then test will fail because the new UL will be skipped.
That sleep shifts the new UL upload enough to make it unlikely to happen.

Real durable fix will be to scan logs for the end and success of the
healthcheck, not just the usual "Jenkins is fully up and running" log
2018-10-15 23:54:14 +02:00
Baptiste Mathus 95d896bb47 Also store the Supervisord.log file after test run 2018-10-15 14:55:29 +02:00
Baptiste Mathus 79a5eb02d9 Supervisord now waits for the process to be actually started/stopped before returning
Using the `wait=True` second param of http://supervisord.org/api.html#supervisor.rpcinterface.SupervisorNamespaceRPCInterface.stopProcess
to avoid cases where Jenkins would still be stopping while we healthcheck
it, etc.
2018-10-15 14:55:08 +02:00
Baptiste Mathus 90fdca47ea Moar linting - shellcheck & jsonlint here 2018-10-15 13:21:41 +02:00
Baptiste Mathus ec9f5f4022 Remove hardcoded sleep 600 and check Jenkins instead 2018-10-15 13:21:25 +02:00
Baptiste Mathus 4a96ff5c4d Remove outdated FIXME: the called method has been promisified correctly 2018-10-13 14:30:35 +02:00
Baptiste Mathus 98c77642ea Clearer log message
This should almost never happen.
2018-10-13 14:09:53 +02:00
Baptiste Mathus beb53cf7ed Remove that advanced Javascript trick
Kidding, was just a ridiculous typo from me :).
2018-10-13 14:06:18 +02:00
Baptiste Mathus 66db2f6576 Add link to https://github.com/jenkins-infra/evergreen/issues 2018-10-13 14:04:10 +02:00
Baptiste Mathus 6b9208a883 Remove lines and use the already in place way of logging into the console
UI.publish() already supports also logging into the console in a specific
level, so let's just reduce the duplication here.
2018-10-13 08:05:55 +02:00
Baptiste Mathus 52013fc3e7 Fix missing status parameter (mostly for tests) 2018-10-12 19:21:11 +02:00
Baptiste Mathus 5b39ffd556 🤦 2018-10-12 18:05:46 +02:00
Baptiste Mathus 16bd8d0209 Also check Supervisord.restartProcess was called 2018-10-12 17:45:54 +02:00
Baptiste Mathus d0d6677ee4 Wire and mock correctly missing status and Supervisord calls 2018-10-12 17:45:54 +02:00
Baptiste Mathus cf5206e91c More logging 2018-10-12 17:45:54 +02:00
Baptiste Mathus a1a10fedac Wait a tiny bit more before uploading the broken UL 2018-10-12 17:45:54 +02:00
Baptiste Mathus bef665cd08 Wait on the restart to actually have happened before healthchecking!
I'm stupid: without this, the healthcheck would often be applied on the
*current* running Jenkins, instead of the updated one. Hence missing the
fact it wouldn't restart! 🤦
2018-10-12 17:45:54 +02:00
Baptiste Mathus af1c6e2a71 Make Supervisord.restartProcess wait a bit before returning 2018-10-12 17:45:54 +02:00
Baptiste Mathus f2f1913af9 Bump to moar time to check CI behavior 2018-10-12 17:45:54 +02:00
Baptiste Mathus 01bc69ceaf Better differentiate the startup healthcheck from the ones after updates 2018-10-12 17:45:54 +02:00
Baptiste Mathus d34fc05dce Bump to more test 2018-10-12 17:45:54 +02:00
Baptiste Mathus 93c78e33af Unused parameter 2018-10-12 17:45:54 +02:00
Baptiste Mathus f5154df3e3 Will be done by the .finally clause already 2018-10-12 17:45:54 +02:00
Baptiste Mathus 86cf5bc138 Log into the console first 2018-10-12 17:45:54 +02:00
Baptiste Mathus 59ac9fdf12 Log also in the console when Jenkins is deemed unhealthy 2018-10-12 17:45:54 +02:00
Baptiste Mathus 37e5bd1c90 Also store manifest for audit log 2018-10-12 17:45:54 +02:00
Baptiste Mathus 5b5c3aea7b Test (almost) the full loop and check we do get back to previous UL
Mocking taintUpdateLevel() and query() instead, showing that applyUpdates()
can call itself without getting stopped by the if(updateInProgress)
condition. (it couldn't, this is fixed with this change).
2018-10-12 17:45:54 +02:00
Baptiste Mathus b13fad734b Add rollback test: all client tests are now passing locally
I.e. `make check` succeeds.
2018-10-12 17:45:54 +02:00
Baptiste Mathus 222959377f Remove state.healthy from Healthchecker: make it more Promise compliant
Instead of returning a healthy:true or healthy:false, we now either return
the content, or throw an error.
This allows using the HealthChecker as any other lib in a promise chain,
hopefully making the code more readable and as (or more) concise.
2018-10-12 17:45:54 +02:00
Baptiste Mathus eb93cff506 Correctly mock the update client class for testing
Had to bump to ES2018 to be allowed to use `Promise.finally`.
Also fixed type issue.
2018-10-12 17:45:54 +02:00
Baptiste Mathus f4f2eb0995 WIP rollback: working often, but flaky
Currently digging into why. Submitting to CI to see how/if it behaves
differently there.
2018-10-12 17:45:54 +02:00
Baptiste Mathus 0c258566fd Add rollback test (only test)
hence expected to fail
2018-10-12 17:45:54 +02:00
Baptiste Mathus cef1f33c74
Merge branch 'master' into JENKINS-53589_rm_plugin_dirs 2018-10-11 21:23:18 +02:00
Mandie Smith 7ab958d850
JENKINS-53589 delete exploded plugin dirs 2018-10-11 14:52:11 -04:00
Baptiste Mathus 51555d53b0 Adjust to new /evergreen => /evergreen/data layout 2018-10-11 10:04:48 +02:00