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

util: testing: manifest: shim: Initial commit #1273

Closed
wants to merge 25 commits into from
Closed

Conversation

pdxjohnny
Copy link
Member

@pdxjohnny pdxjohnny commented Nov 7, 2021

This concept of a manifest seems important (see 2ndparty dependency declaration section for background on how this applies to DFFML, it applies to other projects as well.

If we (talking to non-DFFML CI/CD community people here) use a shim layer it sets us up for forward compatibility. We can all work to define manifest formats that work well for our projects. By using the shim we ensure that they share enough properties that we set ourselves up for an easier eventual merging for manifest formats into one common CI/CD manifest format.

From the DFFML side, a manifest can easily be represented as a DataFlow. The manifest is a more user friendly form of a dataflow essentially, something more tailored to a given use case which describes which operations should be preformed, in what order, and what data types are involved. The shim layer allows projects to parse the manifest however they want. It allows them to easily switch what their next phase is at any time. This next phase might be their existing workflow, or it might be a dataflow enabled workflow. If the next phase parser outputs a dataflow when given a manifest we'll ensure auditability and achievability of the subsequent phase processing that will be taken.

The shim layer effectively operates as a trampoline (think UEFI shim, kexec, etc.) bridging the gap between the initial phase of manifest parsing and the next phase (which in DFFML's case is looking like metric collection, ml job execution, and executing our own CI both in the upcoming polyrepo setup as well as enabling local testing).

@pdxjohnny pdxjohnny force-pushed the manifest branch 2 times, most recently from e7cf793 to eece55a Compare November 7, 2021 21:32
@codecov-commenter
Copy link

codecov-commenter commented Nov 7, 2021

Codecov Report

Merging #1273 (eece55a) into master (e91235f) will decrease coverage by 0.21%.
The diff coverage is 53.62%.

❗ Current head eece55a differs from pull request most recent head 87e8a1e. Consider uploading reports for the commit 87e8a1e to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1273      +/-   ##
==========================================
- Coverage   84.97%   84.76%   -0.22%     
==========================================
  Files         174      175       +1     
  Lines       10975    11044      +69     
  Branches     1821     1829       +8     
==========================================
+ Hits         9326     9361      +35     
- Misses       1280     1310      +30     
- Partials      369      373       +4     
Impacted Files Coverage Δ
dffml/util/testing/manifest/shim.py 53.62% <53.62%> (ø)
dffml/df/memory.py 79.48% <0.00%> (-0.26%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e91235f...87e8a1e. Read the comment docs.

@pdxjohnny pdxjohnny force-pushed the manifest branch 2 times, most recently from 87e8a1e to 3118ac2 Compare November 8, 2021 03:52
Call :py:func:`subprocess.Popen`
"""
read_end, write_end = os.pipe()
proc = subprocess.Popen(cmd, stdin=read_end, **kwargs)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doctest and Popen.communicate were not playing nice together, so when with pipe for now

@pdxjohnny pdxjohnny force-pushed the manifest branch 2 times, most recently from 6568701 to cb02b31 Compare November 8, 2021 08:29
Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
…e_parsers so shim phase parsers have local variable

Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
…ad modules remotely on the fly

Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
…ad correct wheel on the fly

Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
Seriously not one person got the TPS report reference?

Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
…ailure

Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
This allows for reordering. YAML parser will parse anything that has colons
which might not be what the user wants.

Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
…mats

Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
…n targets

Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
…class

Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
Comment on lines +1318 to +1321
if not args.no_schema_check:
raise NotImplementedError(
f"schema validation not implemented {(schema_url, schema_validation_action, schema_validation_target)!r}"
)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

schema validation goes here

probably want to add only_schema_check here

Copy link
Member Author

@pdxjohnny pdxjohnny Nov 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO validate @context,vocab etc. see w3c/vc-data-model#953 (comment) as a part of DID related quest line

Copy link
Member Author

@pdxjohnny pdxjohnny Nov 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pdxjohnny pdxjohnny closed this Mar 12, 2022
@pdxjohnny pdxjohnny deleted the manifest branch March 12, 2022 22:22

.. code-block:: yaml

$schema: "https://example.com/my.document.format.0.0.0.schema.json#sha256=dfd781dca25694dd808630ff4f27f290ba394143bdcae02911bcafa4a13b8319"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could treat . as namespace

@pdxjohnny pdxjohnny restored the manifest branch November 8, 2022 15:17
@pdxjohnny pdxjohnny mentioned this pull request Nov 8, 2022
pdxjohnny added a commit that referenced this pull request Apr 18, 2023
Related: #1273
Signed-off-by: John Andersen <john.s.andersen@intel.com>
pdxjohnny added a commit that referenced this pull request Apr 18, 2023
Related: #1273
Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
pdxjohnny added a commit that referenced this pull request Apr 18, 2023
Related: #1273
Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
pdxjohnny added a commit that referenced this pull request Apr 18, 2023
Related: #1273
Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
pdxjohnny added a commit that referenced this pull request Apr 18, 2023
Related: #1273
Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
pdxjohnny added a commit that referenced this pull request Apr 18, 2023
Related: #1273
Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
pdxjohnny added a commit that referenced this pull request Apr 18, 2023
Related: #1273
Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
pdxjohnny added a commit that referenced this pull request Apr 18, 2023
Related: #1273
Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
pdxjohnny added a commit that referenced this pull request Apr 18, 2023
Related: #1273
Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
pdxjohnny added a commit that referenced this pull request Apr 18, 2023
Related: #1273
Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
pdxjohnny added a commit that referenced this pull request Apr 18, 2023
Related: #1273
Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
pdxjohnny added a commit that referenced this pull request Apr 18, 2023
Related: #1273
Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
pdxjohnny added a commit that referenced this pull request Apr 18, 2023
Related: #1273
Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
pdxjohnny added a commit that referenced this pull request Apr 18, 2023
Related: #1273
Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
pdxjohnny added a commit that referenced this pull request Apr 19, 2023
Related: #1273
Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
pdxjohnny added a commit that referenced this pull request Apr 19, 2023
Related: #1273
Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
pdxjohnny added a commit that referenced this pull request Apr 19, 2023
Related: #1273
Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants