Skip to content
This repository has been archived by the owner on Aug 25, 2024. It is now read-only.

df: overlay: Implement middleware/RBAC chains of ordered applications of overlays #1400

Open
johnandersen777 opened this issue Jun 23, 2022 · 0 comments

Comments

@johnandersen777
Copy link

johnandersen777 commented Jun 23, 2022

Enable stacking of chains of validation opertions executed in defined
sequence or with ordered registred prirority via overlays. Probably done by
modifying input/conditional flow of each operation with data type
targeted.

Take for instance the following (off eb9eaf9)

DEBUG:dffml.MemoryOperationImplementationNetworkContext:Stage: PROCESSING: alice.cli.AlicePleaseContributeRecommendedCommunityStandardsOverlayGitHubIssue:readme_issue
DEBUG:dffml.MemoryOperationImplementationNetworkContext:Inputs: {'repo': AliceGitRepo(directory='/tmp/tmp.jwFAqeBje6/testaa', URL=None), 'title': 'Recommended Community Standard: README', 'body': 'References:\n- https://docs.github.com/articles/about-readmes/'}
DEBUG:dffml.MemoryOperationImplementationNetworkContext:Conditions: {}
DEBUG:dffml.AliceCliAlicepleasecontributerecommendedcommunitystandardsoverlaygithubissue:ReadmeIssueImplementationContext:Running ['gh', 'issue', 'create', '-R', None, '--title', 'Recommended Community Standard: README', '--body', 'References:\n- https://docs.github.com/articles/about-readmes/'], {}
DEBUG:dffml.MemoryOperationImplementationNetworkContext:---
DEBUG:dffml.MemoryOperationImplementationNetworkContext:Stage: PROCESSING: alice.cli.AlicePleaseContributeRecommendedCommunityStandardsOverlayGitHubWritableRemotesFromPermissions:already_owns_repo
DEBUG:dffml.MemoryOperationImplementationNetworkContext:Inputs: {'repo': AliceGitRepo(directory='/tmp/tmp.jwFAqeBje6/testaa', URL=None)}
DEBUG:dffml.MemoryOperationImplementationNetworkContext:Conditions: {}
DEBUG:dffml.MemoryOperationImplementationNetworkContext:Outputs: None
DEBUG:dffml.MemoryOperationImplementationNetworkContext:---
Traceback (most recent call last):
  File "/tmp/tmp.3ZeJVCFmag/dffml-42ed3da715f1c89b4c31d705cf7f7738f17c9306/dffml/df/memory.py", line 1277, in run_dispatch
    outputs = await self.run(
  File "/tmp/tmp.3ZeJVCFmag/dffml-42ed3da715f1c89b4c31d705cf7f7738f17c9306/dffml/df/memory.py", line 1242, in run
    return await self.run_no_retry(ctx, octx, operation, inputs)
  File "/tmp/tmp.3ZeJVCFmag/dffml-42ed3da715f1c89b4c31d705cf7f7738f17c9306/dffml/df/memory.py", line 1220, in run_no_retry
    outputs = await opctx.run(inputs)
  File "/tmp/tmp.3ZeJVCFmag/dffml-42ed3da715f1c89b4c31d705cf7f7738f17c9306/dffml/df/base.py", line 544, in run
    result = await result
  File "/tmp/tmp.3ZeJVCFmag/dffml-42ed3da715f1c89b4c31d705cf7f7738f17c9306/entities/alice/alice/cli.py", line 367, in readme_issue
    async for event, result in dffml.run_command_events(
  File "/tmp/tmp.3ZeJVCFmag/dffml-42ed3da715f1c89b4c31d705cf7f7738f17c9306/dffml/util/subprocess.py", line 66, in run_command_events
    async for event, result in exec_subprocess(cmd, **kwargs):
  File "/tmp/tmp.3ZeJVCFmag/dffml-42ed3da715f1c89b4c31d705cf7f7738f17c9306/dffml/util/subprocess.py", line 23, in exec_subprocess
    proc = await asyncio.create_subprocess_exec(*cmd, **kwargs)
  File "/usr/lib/python3.9/asyncio/subprocess.py", line 236, in create_subprocess_exec
    transport, protocol = await loop.subprocess_exec(
  File "/usr/lib/python3.9/asyncio/base_events.py", line 1661, in subprocess_exec
    transport = await self._make_subprocess_transport(
  File "/usr/lib/python3.9/asyncio/unix_events.py", line 197, in _make_subprocess_transport
    transp = _UnixSubprocessTransport(self, protocol, args, shell,
  File "/usr/lib/python3.9/asyncio/base_subprocess.py", line 36, in __init__
    self._start(args=args, shell=shell, stdin=stdin, stdout=stdout,
  File "/usr/lib/python3.9/asyncio/unix_events.py", line 789, in _start
    self._proc = subprocess.Popen(
  File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.9/subprocess.py", line 1756, in _execute_child
    self.pid = _posixsubprocess.fork_exec(
TypeError: expected str, bytes or os.PathLike object, not NoneType

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/tmp/tmp.3ZeJVCFmag/dffml-42ed3da715f1c89b4c31d705cf7f7738f17c9306/dffml/df/memory.py", line 1277, in run_dispatch
    outputs = await self.run(
  File "/tmp/tmp.3ZeJVCFmag/dffml-42ed3da715f1c89b4c31d705cf7f7738f17c9306/dffml/df/memory.py", line 1242, in run
    return await self.run_no_retry(ctx, octx, operation, inputs)
  File "/tmp/tmp.3ZeJVCFmag/dffml-42ed3da715f1c89b4c31d705cf7f7738f17c9306/dffml/df/memory.py", line 1220, in run_no_retry
    outputs = await opctx.run(inputs)
  File "/tmp/tmp.3ZeJVCFmag/dffml-42ed3da715f1c89b4c31d705cf7f7738f17c9306/dffml/df/base.py", line 544, in run
    result = await result
  File "/tmp/tmp.3ZeJVCFmag/dffml-42ed3da715f1c89b4c31d705cf7f7738f17c9306/entities/alice/alice/cli.py", line 333, in cli_run_on_repo
    await dffml.run_dataflow.run_custom(
  File "/tmp/tmp.3ZeJVCFmag/dffml-42ed3da715f1c89b4c31d705cf7f7738f17c9306/dffml/operation/dataflow.py", line 203, in run_custom
    async for ctx, result in octx.run(subflow_inputs, parent=self.octx):
  File "/tmp/tmp.3ZeJVCFmag/dffml-42ed3da715f1c89b4c31d705cf7f7738f17c9306/dffml/df/memory.py", line 1689, in run
    raise exception
  File "/tmp/tmp.3ZeJVCFmag/dffml-42ed3da715f1c89b4c31d705cf7f7738f17c9306/dffml/df/memory.py", line 1857, in run_operations_for_ctx
    raise OperationException(
dffml.df.base.OperationException: alice.cli.AlicePleaseContributeRecommendedCommunityStandardsOverlayGitHubIssue:readme_issue({'repo': AliceGitRepo, 'title': ReadmeIssueTitle, 'body': ReadmeIssueBody}): {'repo': AliceGitRepo(directory='/tmp/tmp.jwFAqeBje6/testaa', URL=None), 'title': 'Recommended Community Standard: RE
ADME', 'body': 'References:\n- https://docs.github.com/articles/about-readmes/'}

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/pdxjohnny/.local/bin/alice", line 33, in <module>
    sys.exit(load_entry_point('alice', 'console_scripts', 'alice')())
  File "/tmp/tmp.3ZeJVCFmag/dffml-42ed3da715f1c89b4c31d705cf7f7738f17c9306/dffml/util/cli/cmd.py", line 283, in main
    result = loop.run_until_complete(cls._main(*argv[1:]))
  File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/tmp/tmp.3ZeJVCFmag/dffml-42ed3da715f1c89b4c31d705cf7f7738f17c9306/dffml/util/cli/cmd.py", line 249, in _main
    return await cls.cli(*args)
  File "/tmp/tmp.3ZeJVCFmag/dffml-42ed3da715f1c89b4c31d705cf7f7738f17c9306/dffml/util/cli/cmd.py", line 235, in cli
    return await cmd.do_run()
  File "/tmp/tmp.3ZeJVCFmag/dffml-42ed3da715f1c89b4c31d705cf7f7738f17c9306/dffml/util/cli/cmd.py", line 213, in do_run
    return await self.run()
  File "/tmp/tmp.3ZeJVCFmag/dffml-42ed3da715f1c89b4c31d705cf7f7738f17c9306/entities/alice/alice/cli.py", line 624, in run
    async for ctx, results in dffml.run(
  File "/tmp/tmp.3ZeJVCFmag/dffml-42ed3da715f1c89b4c31d705cf7f7738f17c9306/dffml/high_level/dataflow.py", line 231, in run
    async for ctx, results in ctx.run(*input_sets, strict=strict):
  File "/tmp/tmp.3ZeJVCFmag/dffml-42ed3da715f1c89b4c31d705cf7f7738f17c9306/dffml/df/memory.py", line 1689, in run
    raise exception
  File "/tmp/tmp.3ZeJVCFmag/dffml-42ed3da715f1c89b4c31d705cf7f7738f17c9306/dffml/df/memory.py", line 1857, in run_operations_for_ctx
    raise OperationException(
dffml.df.base.OperationException: alice.cli.AlicePleaseContributeRecommendedCommunityStandardsOverlayCLI:cli_run_on_repo({'repo': CLIRunOnRepo}): {'repo': '/tmp/tmp.jwFAqeBje6/testaa'}
$ git remote -v
origin  https://github.com/pdxjohnny/testaa (fetch)
origin  https://github.com/pdxjohnny/testaa (push)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant