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
Choose a base branch
from
Draft

trans: add transpiler #1

wants to merge 2 commits into from

Conversation

arithx
Copy link
Owner

@arithx arithx commented Jul 3, 2019

Still testing against plume & stream-metadata-generator

@arithx
Copy link
Owner Author

arithx commented Jul 3, 2019

Also looking for ideas on where this should live

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 Show resolved Hide resolved
Copy link

@ashcrow ashcrow left a comment

Choose a reason for hiding this comment

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

Added comments in the draft.

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


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

@jlebon jlebon Jul 3, 2019

Choose a reason for hiding this comment

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

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).

Copy link
Owner Author

Choose a reason for hiding this comment

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

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
Copy link

jlebon 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
Copy link

ashcrow 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
Copy link
Owner Author

arithx 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants