Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trans: add transpiler #1

Draft
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@arithx
Copy link
Owner

commented Jul 3, 2019

Still testing against plume & stream-metadata-generator

@arithx

This comment has been minimized.

Copy link
Owner Author

commented Jul 3, 2019

Also looking for ideas on where this should live

Show resolved Hide resolved trans.py Outdated
Show resolved Hide resolved trans.py Outdated
Show resolved Hide resolved trans.py
Show resolved Hide resolved trans.py Outdated
Show resolved Hide resolved trans.py Outdated
Show resolved Hide resolved trans.py Outdated
Show resolved Hide resolved trans.py
@ashcrow
Copy link

left a comment

Added comments in the draft.

Show resolved Hide resolved trans.py Outdated
Show resolved Hide resolved trans.py Outdated
trans.py Outdated


parser = ArgumentParser()
parser.add_argument("file", type=FileType('r'), nargs='+')

This comment has been minimized.

Copy link
@jlebon

jlebon Jul 3, 2019

Hmm, so the idea here is that one would do e.g.:

./trans.py builds/ID/arch1/meta.json builds/ID/arch2/meta.json ...

?

Could we instead just point it at the cosa workdir and pass the ID separately? So e.g. ./trans.py [--workdir /cosa/workdir] --build-id ID. Then it can lookup which architectures are available using the new schema (for now, could probably just assume the basearch of the current machine if it's the old schema -- edit: or keep parsing the ref).

This comment has been minimized.

Copy link
@arithx

arithx Jul 3, 2019

Author Owner

I switched it over to accepting a --workdir & --build-id. It searches for a meta.json in all sub-directories in $workdir/builds/$buildid. I left the actual architecture determination to parsing out coreos-assembler.basearch.

While doing so I also dropped the --output-file argument to instead write the output file into $workdir/builds/$buildid/release.json every time.

@jlebon

This comment has been minimized.

Copy link

commented Jul 3, 2019

Also looking for ideas on where this should live

Hmm, tempted to just include it in cosa. Would just need to make the builds.coreos.fp.o/... URL a flag. Though it muddles the distinction with the existing meta.json.

Or maybe let's put it in https://github.com/coreos/fedora-coreos-releng-automation/ for now. And e.g. if RHCOS also wants to adopt this in the future, we can "upstream" it into cosa.

@ashcrow

This comment has been minimized.

Copy link

commented Jul 3, 2019

Also looking for ideas on where this should live

cosa makes the most sense but we should be careful to not allow it to trample on the current meta.json in use in RHCOS. If it is used to produce a file that won't be used by RHCOS but it will be helpful for FCOS I see no issue with it :-).

@arithx

This comment has been minimized.

Copy link
Owner Author

commented Jul 3, 2019

Putting it in https://github.com/coreos/fedora-coreos-releng-automation/ for now and eventually upstreaming it into cosa makes sense to me. I'll create a PR over there once I get this tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.