I'm trying to enable pushing docker images noninte...
# development
m
I'm trying to enable pushing docker images noninteractively (https://github.com/pantsbuild/pants/issues/17613), and have this PR, but I'm running into some rule graph errors when spinning up pantsd (in 🧵 ).. Any pointers on what may be happening? My initial guess is that something in the rules engine doesn't like my
Union[Process, InteractiveProcess, None]
, but I'm just grasping at straws
Full error:
Copy code
[nix-shell:~/workspace/pants]$ pants test src/python/pants/backend/docker/goals/::
There is no pantsd metadata at /Users/tylerrhodes/workspace/pants/.pants.d/pids/e55f3967571d/pantsd.
Traceback (most recent call last):
  File "/Users/tylerrhodes/workspace/pants/src/python/pants/bin/pants_loader.py", line 118, in <module>
    main()
  File "/Users/tylerrhodes/workspace/pants/src/python/pants/bin/pants_loader.py", line 114, in main
    PantsLoader.main()
  File "/Users/tylerrhodes/workspace/pants/src/python/pants/bin/pants_loader.py", line 108, in main
    cls.run_alternate_entrypoint(entrypoint)
  File "/Users/tylerrhodes/workspace/pants/src/python/pants/bin/pants_loader.py", line 85, in run_alternate_entrypoint
    entrypoint_fn()
  File "/Users/tylerrhodes/workspace/pants/src/python/pants/pantsd/pants_daemon.py", line 237, in launch_new_pantsd_instance
    daemon = PantsDaemon.create(options_bootstrapper)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/tylerrhodes/workspace/pants/src/python/pants/pantsd/pants_daemon.py", line 77, in create
    core = PantsDaemonCore(options_bootstrapper, executor.to_borrowed(), cls._setup_services)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/tylerrhodes/workspace/pants/src/python/pants/pantsd/pants_daemon_core.py", line 49, in __init__
    self._options_initializer = OptionsInitializer(options_bootstrapper, executor)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/tylerrhodes/workspace/pants/src/python/pants/init/options_initializer.py", line 146, in __init__
    self._bootstrap_scheduler = create_bootstrap_scheduler(options_bootstrapper, executor)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/tylerrhodes/workspace/pants/src/python/pants/init/options_initializer.py", line 118, in create_bootstrap_scheduler
    EngineInitializer.setup_graph(
  File "/Users/tylerrhodes/workspace/pants/src/python/pants/init/engine_initializer.py", line 197, in setup_graph
    return EngineInitializer.setup_graph_extended(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/tylerrhodes/workspace/pants/src/python/pants/init/engine_initializer.py", line 340, in setup_graph_extended
    scheduler = Scheduler(
                ^^^^^^^^^^
  File "/Users/tylerrhodes/workspace/pants/src/python/pants/engine/internals/scheduler.py", line 235, in __init__
    self._py_scheduler = native_engine.scheduler_create(
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: Encountered 12 rule graph errors:
  No installed rules return the type EnvironmentNameRequest, and it was not provided by potential callers of @rule(pants.core.util_rules.environments:856:resolve_environment_name(EnvironmentNameRequest, EnvironmentsSubsystem, GlobalOptions) -> EnvironmentName, gets=[ChosenLocalEnvironmentName, ChosenLocalWorkspaceEnvironmentName, Get(EnvironmentTarget, [EnvironmentName]), Get(EnvironmentName, [EnvironmentNameRequest])]).
    If that type should be computed by a rule, ensure that that rule is installed.
    If it should be provided by a caller, ensure that it is included in any relevant Query or Get.
  No installed rules return the type SingleEnvironmentNameRequest, and it was not provided by potential callers of @rule(pants.core.util_rules.environments:822:resolve_single_environment_name(SingleEnvironmentNameRequest) -> EnvironmentName, gets=[Get(EnvironmentName, [EnvironmentNameRequest])]).
    If that type should be computed by a rule, ensure that that rule is installed.
    If it should be provided by a caller, ensure that it is included in any relevant Query or Get.
  No installed rules return the type _PublishProcessesForTargetRequest, and it was not provided by potential callers of @rule(pants.core.goals.deploy:121:publish_process_for_target(_PublishProcessesForTargetRequest) -> PublishProcesses, gets=[Get(FieldSetsPerTarget, [FieldSetsPerTargetRequest]), Get(PublishProcesses, [PublishProcessesRequest])]).
    If that type should be computed by a rule, ensure that that rule is installed.
    If it should be provided by a caller, ensure that it is included in any relevant Query or Get.
  No source of dependency ChosenLocalEnvironmentName for @rule(pants.core.util_rules.environments:856:resolve_environment_name(EnvironmentNameRequest, EnvironmentsSubsystem, GlobalOptions) -> EnvironmentName, gets=[ChosenLocalEnvironmentName, ChosenLocalWorkspaceEnvironmentName, Get(EnvironmentTarget, [EnvironmentName]), Get(EnvironmentName, [EnvironmentNameRequest])]). All potential sources were eliminated: []
  No source of dependency ChosenLocalWorkspaceEnvironmentName for @rule(pants.core.util_rules.environments:856:resolve_environment_name(EnvironmentNameRequest, EnvironmentsSubsystem, GlobalOptions) -> EnvironmentName, gets=[ChosenLocalEnvironmentName, ChosenLocalWorkspaceEnvironmentName, Get(EnvironmentTarget, [EnvironmentName]), Get(EnvironmentName, [EnvironmentNameRequest])]). All potential sources were eliminated: []
  No source of dependency EnvironmentsSubsystem for @rule(pants.core.util_rules.environments:856:resolve_environment_name(EnvironmentNameRequest, EnvironmentsSubsystem, GlobalOptions) -> EnvironmentName, gets=[ChosenLocalEnvironmentName, ChosenLocalWorkspaceEnvironmentName, Get(EnvironmentTarget, [EnvironmentName]), Get(EnvironmentName, [EnvironmentNameRequest])]). All potential sources were eliminated: []
  No source of dependency Get(EnvironmentName, [EnvironmentNameRequest]) for @rule(pants.core.util_rules.environments:822:resolve_single_environment_name(SingleEnvironmentNameRequest) -> EnvironmentName, gets=[Get(EnvironmentName, [EnvironmentNameRequest])]). All potential sources were eliminated: []
  No source of dependency Get(EnvironmentName, [EnvironmentNameRequest]) for @rule(pants.core.util_rules.environments:856:resolve_environment_name(EnvironmentNameRequest, EnvironmentsSubsystem, GlobalOptions) -> EnvironmentName, gets=[ChosenLocalEnvironmentName, ChosenLocalWorkspaceEnvironmentName, Get(EnvironmentTarget, [EnvironmentName]), Get(EnvironmentName, [EnvironmentNameRequest])]). All potential sources were eliminated: []
  No source of dependency Get(EnvironmentTarget, [EnvironmentName]) for @rule(pants.core.util_rules.environments:856:resolve_environment_name(EnvironmentNameRequest, EnvironmentsSubsystem, GlobalOptions) -> EnvironmentName, gets=[ChosenLocalEnvironmentName, ChosenLocalWorkspaceEnvironmentName, Get(EnvironmentTarget, [EnvironmentName]), Get(EnvironmentName, [EnvironmentNameRequest])]). All potential sources were eliminated: []
  No source of dependency Get(FieldSetsPerTarget, [FieldSetsPerTargetRequest]) for @rule(pants.core.goals.deploy:121:publish_process_for_target(_PublishProcessesForTargetRequest) -> PublishProcesses, gets=[Get(FieldSetsPerTarget, [FieldSetsPerTargetRequest]), Get(PublishProcesses, [PublishProcessesRequest])]). All potential sources were eliminated: []
  No source of dependency Get(PublishProcesses, [PublishProcessesRequest]) for @rule(pants.core.goals.deploy:121:publish_process_for_target(_PublishProcessesForTargetRequest) -> PublishProcesses, gets=[Get(FieldSetsPerTarget, [FieldSetsPerTargetRequest]), Get(PublishProcesses, [PublishProcessesRequest])]). All potential sources were eliminated: []
  No source of dependency GlobalOptions for @rule(pants.core.util_rules.environments:856:resolve_environment_name(EnvironmentNameRequest, EnvironmentsSubsystem, GlobalOptions) -> EnvironmentName, gets=[ChosenLocalEnvironmentName, ChosenLocalWorkspaceEnvironmentName, Get(EnvironmentTarget, [EnvironmentName]), Get(EnvironmentName, [EnvironmentNameRequest])]). All potential sources were eliminated: []
Ah, looks like I need to specify the environment in which the
Process
es are run