Netflix / security_monkey

Security Monkey monitors AWS, GCP, OpenStack, and GitHub orgs for assets and their changes over time.
Apache License 2.0
4.35k stars 798 forks source link

Docker failed to build dart #1202

Closed oba11 closed 5 years ago

oba11 commented 5 years ago

Please make sure that you have checked the boxes:

Description of issue:

Tried to build the dart locally with the latest commit but got errors and the UI is broken

Command

docker build --no-cache -t securitymonkey-nginx -f docker/nginx/Dockerfile .

Stack Trace

Step 7/14 : RUN cd /usr/local/src/security_monkey/dart &&  /usr/lib/dart/bin/pub get &&   /usr/lib/dart/bin/pub build &&   /bin/mkdir -p /usr/local/src/security_monkey/security_monkey/static/ &&   /bin/cp -R /usr/local/src/security_monkey/dart/build/web/* /usr/local/src/security_monkey/security_monkey/static/ &&   rm -r /usr/local/src/security_monkey/dart/build
 ---> Running in 288518c9a391
Resolving dependencies...
Downloading angular 1.1.2+2...
Downloading analyzer 0.26.4...
Downloading angular_ui 0.6.8...
Downloading args 0.12.2+3...
Downloading async 1.9.0...
Downloading aws_policy_expander_minimizer 0.0.5...
Downloading barback 0.15.2+2...
Downloading browser 0.10.0+2...
Downloading code_transformers 0.2.11...
Downloading cli_util 0.0.1...
Downloading collection 1.1.3...
Downloading dart_to_js_script_rewriter 0.0.2...
Downloading di 3.3.5+1...
Downloading glob 1.1.2...
Downloading hammock 0.4.0...
Downloading html 0.12.2+2...
Downloading csslib 0.11.0+4...
Downloading html5lib 0.12.0...
Downloading http_server 0.9.5+1...
Downloading intl 0.8.10+4...
Downloading logging 0.9.3...
Downloading meta 0.12.1...
Downloading mime 0.9.1...
Downloading ng_infinite_scroll 0.2.0...
Downloading observe 0.13.1+3...
Downloading package_config 0.1.3...
Downloading charcode 1.1.0...
Downloading path 1.3.2...
Downloading perf_api 0.0.9...
Downloading plugin 0.1.0...
Downloading pool 1.0.1...
Downloading route_hierarchical 0.6.1+1...
Downloading smoke 0.3.5...
Downloading source_maps 0.10.0+1...
Downloading source_span 1.0.3...
Downloading stack_trace 1.1.1...
Downloading string_scanner 0.1.4+1...
Downloading unittest 0.11.0+2...
Downloading matcher 0.10.1+1...
Downloading utf 0.9.0+2...
Downloading watcher 0.9.7...
Downloading web_components 0.10.1...
Downloading initialize 0.2.0...
Downloading which 0.1.2...
Downloading when 0.2.0...
Downloading yaml 2.1.9...
Got dependencies!
Precompiling dependencies...
Loading source assets...
Loading dart_to_js_script_rewriter, di/module_transformer, initialize/build/loader_replacer, observe, smoke/src/default_transformer and initialize transformers...
Loading angular transformers...
Precompiled angular_ui, dart_to_js_script_rewriter, di, initialize, observe, smoke and web_components.
Precompiling executables...
Loading source assets...
Loading di/module_transformer, observe and smoke/src/default_transformer transformers...
Precompiled angular:pub_build.
Precompiled angular:parser_generator_for_spec.
Precompiled angular:template_cache_generator.
Precompiled angular:expression_extractor.
Loading source assets...
Loading dart_to_js_script_rewriter, di/module_transformer, initialize/build/loader_replacer, observe, smoke/src/default_transformer and initialize transformers...
Loading angular transformers...
Building security_monkey...
[Info from Dart2JS]:
Compiling security_monkey|web/main.dart...
[Warning from Dart2JS on security_monkey|web/main.dart]:
web/packages/angular/core/annotation_src.dart:3:44:
Library 'package:di/di.dart' doesn't export a 'Visibility' declaration.
Try removing 'Visibility' from the 'show' clause.
import "package:di/di.dart" show Injector, Visibility, Factory;
                                           ^^^^^^^^^^
[Warning from Dart2JS on security_monkey|web/main.dart]:
web/packages/angular/core/annotation_src.dart:3:56:
Library 'package:di/di.dart' doesn't export a 'Factory' declaration.
Try removing 'Factory' from the 'show' clause.
import "package:di/di.dart" show Injector, Visibility, Factory;
                                                       ^^^^^^^
[Warning from Dart2JS on security_monkey|web/main.dart]:
web/packages/angular/core/annotation.dart:11:5:
Library 'package:angular/core/annotation_src.dart' doesn't export a 'ShadowRootAware' declaration.
Try removing 'ShadowRootAware' from the 'show' clause.
    ShadowRootAware,
    ^^^^^^^^^^^^^^^
[Warning from Dart2JS on security_monkey|web/main.dart]:
web/packages/angular/core/module.dart:70:5:
Library 'package:angular/core/module_internal.dart' doesn't export a 'CacheStats' declaration.
Try removing 'CacheStats' from the 'show' clause.
    CacheStats,
    ^^^^^^^^^^
[Warning from Dart2JS on security_monkey|web/main.dart]:
web/packages/angular/core/module.dart:71:5:
Library 'package:angular/core/module_internal.dart' doesn't export a 'ComponentCssRewriter' declaration.
Try removing 'ComponentCssRewriter' from the 'show' clause.
    ComponentCssRewriter,
    ^^^^^^^^^^^^^^^^^^^^
[Warning from Dart2JS on security_monkey|web/main.dart]:
web/packages/angular/core/module.dart:50:5:
Library 'package:angular/core_dom/module_internal.dart' doesn't export a 'NgAnimate' declaration.
Try removing 'NgAnimate' from the 'show' clause.
    NgAnimate,
    ^^^^^^^^^
[Warning from Dart2JS on security_monkey|web/main.dart]:
web/packages/angular/core/module.dart:54:5:
Library 'package:angular/core_dom/module_internal.dart' doesn't export a 'PendingAsync' declaration.
Try removing 'PendingAsync' from the 'show' clause.
    PendingAsync,
    ^^^^^^^^^^^^
[Dart2JS on security_monkey|web/main.dart]:

****************************************************************
* WARNING: dart:mirrors support in dart2js is experimental,
*          and not recommended.
*          This implementation of mirrors is incomplete,
*          and often greatly increases the size of the generated
*          JavaScript code.
*
* Your app imports dart:mirrors via:
*   main.dart => package:security_monkey/security_monkey.dart => package:security_monkey/model/hammock_config.dart => dart:mirrors
*   main.dart => main_generated_type_factory_maps.dart => package:security_monkey/security_monkey.dart => package:security_monkey/model/hammock_config.dart => dart:mirrors
*   main.dart => main_static_metadata.dart => package:security_monkey/security_monkey.dart => package:security_monkey/model/hammock_config.dart => dart:mirrors
*   main.dart => main_static_type_to_uri_mapper.dart => package:security_monkey/security_monkey.dart => package:security_monkey/model/hammock_config.dart => dart:mirrors
*
* You can disable this message by using the --enable-experimental-mirrors
* command-line flag.
*
* To learn what to do next, please visit:
*    http://dartlang.org/dart2js-reflection
****************************************************************
[Warning from Dart2JS on security_monkey|web/main.dart]:
web/main_generated_type_factory_maps.dart:373:58:
Additional argument.
  import_44.Rect: (a1, a2, a3, a4) => new import_44.Rect(a1, a2, a3, a4),
                                                         ^^
[Info from Dart2JS on security_monkey|web/main.dart]:
web/packages/angular_ui/utils/position.dart:100:3:
This is the method declaration.
  Rect({this.left:0, this.top:0, this.width:0, this.height:0});
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Warning from Dart2JS on security_monkey|web/main.dart]:
web/main_generated_type_factory_maps.dart:373:62:
Additional argument.
  import_44.Rect: (a1, a2, a3, a4) => new import_44.Rect(a1, a2, a3, a4),
                                                             ^^
[Info from Dart2JS on security_monkey|web/main.dart]:
web/packages/angular_ui/utils/position.dart:100:3:
This is the method declaration.
  Rect({this.left:0, this.top:0, this.width:0, this.height:0});
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Warning from Dart2JS on security_monkey|web/main.dart]:
web/main_generated_type_factory_maps.dart:373:66:
Additional argument.
  import_44.Rect: (a1, a2, a3, a4) => new import_44.Rect(a1, a2, a3, a4),
                                                                 ^^
[Info from Dart2JS on security_monkey|web/main.dart]:
web/packages/angular_ui/utils/position.dart:100:3:
This is the method declaration.
  Rect({this.left:0, this.top:0, this.width:0, this.height:0});
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Warning from Dart2JS on security_monkey|web/main.dart]:
web/main_generated_type_factory_maps.dart:373:70:
Additional argument.
  import_44.Rect: (a1, a2, a3, a4) => new import_44.Rect(a1, a2, a3, a4),
                                                                     ^^
[Info from Dart2JS on security_monkey|web/main.dart]:
web/packages/angular_ui/utils/position.dart:100:3:
This is the method declaration.
  Rect({this.left:0, this.top:0, this.width:0, this.height:0});
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Dart2JS on security_monkey|web/main.dart]:
16 warning(s) and 1 hint(s) suppressed in package:security_monkey.
[Dart2JS on security_monkey|web/main.dart]:
6 warning(s) suppressed in package:angular.
[Warning from Dart2JS]:
web/main.dart:
27 methods retained for use by dart:mirrors out of 6575 total methods (0%).
[Info from Dart2JS on security_monkey|web/main.dart]:
web/packages/security_monkey/model/hammock_config.dart:31:1:
Import of 'dart:mirrors'.
import 'dart:mirrors';
^^^^^^^^^^^^^^^^^^^^^^
[Info from Dart2JS]:
Took 0:00:31.591269 to compile security_monkey|web/main.dart.
Built 288 files to "build".
Removing intermediate container 288518c9a391
 ---> a42a428ae087
oba11 commented 5 years ago

Looks to have been fixed in https://github.com/Netflix/security_monkey/pull/1207