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

export parsed composite specs #1139

Conversation

grokspawn
Copy link
Contributor

@grokspawn grokspawn commented Sep 5, 2023

Description of the change:
export parsed yaml/json specs so that other tooling can leverage it

Motivation for the change:
tap-fitter tooling will be able to generate some pipeline-specific pieces from the composite template, but the current implementation parses and executes the specs in an uninterrupted flow

example:

c := composite.NewTemplate(
         composite.WithCatalogFile(tempCatalog),
         composite.WithContributionFile(compositeReader)
)
specs, err := c.Parse()

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /docs
  • Commit messages sensible and descriptive

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 5, 2023
@grokspawn
Copy link
Contributor Author

/hold for consolidating types

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 5, 2023
@codecov
Copy link

codecov bot commented Sep 5, 2023

Codecov Report

❗ No coverage uploaded for pull request base (master@56771f7). Click here to learn what that means.
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1139   +/-   ##
=========================================
  Coverage          ?   53.82%           
=========================================
  Files             ?      108           
  Lines             ?    10199           
  Branches          ?        0           
=========================================
  Hits              ?     5490           
  Misses            ?     3741           
  Partials          ?      968           
Files Changed Coverage Δ
alpha/template/composite/composite.go 79.50% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@grokspawn grokspawn force-pushed the export-composite-metadata branch from 0327319 to 1ddd983 Compare September 5, 2023 18:57
Signed-off-by: Jordan Keister <[email protected]>
@grokspawn grokspawn force-pushed the export-composite-metadata branch from 1ddd983 to 545b4cb Compare September 5, 2023 19:05
@oceanc80
Copy link
Contributor

oceanc80 commented Sep 5, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 5, 2023
Copy link
Contributor

@everettraven everettraven left a comment

Choose a reason for hiding this comment

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

Looks good to me.

I do have a teeny nit (totally non-blocking) - I personally prefer to have methods co-located with the type they are associated with because it makes it easier for me to dig into the code due to less jumping between different files.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 5, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: everettraven, grokspawn

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@grokspawn
Copy link
Contributor Author

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 5, 2023
@grokspawn
Copy link
Contributor Author

Looks good to me.

I do have a teeny nit (totally non-blocking) - I personally prefer to have methods co-located with the type they are associated with because it makes it easier for me to dig into the code due to less jumping between different files.

I'm of two minds on this. But we already had a types.go file for composite templates, and I thought it was confusing to have some types there, but not others. So when considering whether to obsolete the module and move all the types here, or add a couple more types to that one .... I landed on the 'consolidation' move.

If we find that it causes issue later, I'm totally OK with a future PR to move them out of that file so we can have everything in one place.

@openshift-merge-robot openshift-merge-robot merged commit d02b0b6 into operator-framework:master Sep 5, 2023
@grokspawn grokspawn deleted the export-composite-metadata branch September 5, 2023 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants