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

Create asset graph engine #120

Merged
merged 11 commits into from
Aug 25, 2018
Merged

Create asset graph engine #120

merged 11 commits into from
Aug 25, 2018

Conversation

staebler
Copy link
Contributor

@staebler staebler commented Aug 10, 2018

This PR establishes the initial framework for generating assets using a graph engine (https://jira.coreos.com/browse/CORS-758).

  • Adds an openshift-install binary for generating assets. This is not hooked up to the build process yet. To build the executable, run go build ./cmd/openshift-install.
  • Adds an asset.Store type that generates an asset by walking the tree of dependencies for the asset ensuring that each asset of a dependency has been generated prior to generating the dependent asset.
  • Adds an asset.Stock type that establishes the available assets that can be generated.
  • Adds the install-config asset and its dependent assets (https://jira.coreos.com/browse/CORS-760, https://jira.coreos.com/browse/CORS-759). To generate the install-config asset, run ./openshift-install install-config. The user-provided assets as crude with respect to UX and still need further refinement. The install-config asset does not fully populate the install-config.yml yet.
  • Vendors https://github.com/stretchr/testify to provide some convenience functions for use in unit tests.
  • Vendors https://github.com/pborman/uuid to generate a random UUID for the cluster ID.

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Aug 10, 2018
@staebler staebler closed this Aug 10, 2018
@staebler staebler reopened this Aug 10, 2018

type Asset interface {
Dependencies() []Asset
Generate([]*AssetState) (*AssetState, error)
Copy link
Contributor

@abhinavdahiya abhinavdahiya Aug 10, 2018

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What would be nice about getting the entire State? The asset has already stated what its dependencies are. If it needs anything from State beyond those dependencies, then it is using a dependencies that it did not declare. The AssetStore has already fetched all of the states for all of the dependencies, so there is no need for the asset to relocate them from the entire State.

@@ -0,0 +1,35 @@
package asset
Copy link
Contributor

Choose a reason for hiding this comment

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

We should try to avoid defining this graph defining.

return nil, fmt.Errorf("unknown platform type %q", platform)
}

json, err := jsoniter.ConfigFastest.Marshal(installConfig)
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure why specfically marshal to json then, marshal to yaml is required. "github.com/ghodss/yaml".Marshal() already does it?


type Graph struct {
// Targetable assets
InstallConfig nextgen.Asset
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need this specialization.

Copy link
Contributor

Choose a reason for hiding this comment

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

Targetable assets vs Non-targetable assets

// Targetable assets
InstallConfig nextgen.Asset

// Non-targetable assets
Copy link
Member

Choose a reason for hiding this comment

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

Do we need a targetable/non-targetable distinction? Why couldn't the password asset, etc. correspond to on-disk files?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't need the distinction. There is no code that differentiates a targetable asset from a non-targetable asset. This is just a helpful delineation to make clear which asset are the ones that the user would directly generate as opposed to being indirectly generated by other assets.

I don't see why the password asset could not correspond to on-disk files.

package nextgen

type Asset interface {
Dependencies() []Asset
Copy link
Member

Choose a reason for hiding this comment

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

Related to @abhinavdahiya's comment, this should return a slice of parent hashes, not the parent assets themselves. That makes it a bit easier to get the asset's Merkle hash, and you would Fetch the parent by hash if you needed more detail about it.

Copy link
Contributor

@abhinavdahiya abhinavdahiya Aug 14, 2018

Choose a reason for hiding this comment

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

So you explain a little more how the assetstore might use the hash from Dependencies to actually generate the corresponding asset.

Copy link
Contributor

Choose a reason for hiding this comment

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

Dependencies() defines the assets it requires. asset store ensures that those assets are in state before calling generate on the it asset.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I missed the discussion related to using a Merkle DAG for the asset store. Could someone elaborate on how we plan on using the properties of a Merkle DAG? Maybe this could be added to the design document.

package nextgen

type AssetStore interface {
Fetch(Asset) (*AssetState, error)
Copy link
Member

Choose a reason for hiding this comment

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

nit: Maybe I'm biased by Git, but for me "fetch" hints of remote access. Can we use the more generic Get? And adjust this to be content-addressable retrieval:

Get(hash string) (Asset, error)

I also think the store needs a property for the root hash (or maybe a slice of root hashes?) so we can walk the current DAG rebuilding/extracting assets without tripping over stale entries.

LibvirtPlatformType = "libvirt"
)

type Platform struct{}
Copy link
Member

@wking wking Aug 11, 2018

Choose a reason for hiding this comment

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

It feels like the platform asset should be an instance of UserProvided instead of a type in its own right. Maybe add a Validate property holding a validation function to UserProvided?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think it much matters whether it is one type or two separate types. In the end, I decided on having Platform as a separate type because there was extra code that needed to go somewhere to define the Validate for the platform and to define the acceptable platforms. Either I put this extra code in stock.go, which will tend to make that file grow too large, or I create a separate file for the extra platform code. If I create a separate file, then I may as well create a separate type, too, which has the extra benefit of keeping the UserProvided type smaller.

@@ -0,0 +1,50 @@
package main
Copy link
Contributor

@yifan-gu yifan-gu Aug 15, 2018

Choose a reason for hiding this comment

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

Can we put it under just ${installer_root}/pkg?
I was expecting something like:

openshift-installer/
├── cmd
│   └── openshift-install
└── pkg
    └── graph(or asset?)

We should just create a greenfield for the new installer binary.

g.License = &UserProvided{Prompt: "License: "}
g.PullSecret = &UserProvided{Prompt: "Pull Secret: "}
g.Platform = &UserProvided{Prompt: "Platform: "}
g.EmailAddress = &UserProvided{Prompt: "Email Addres: "}
Copy link
Contributor

@yifan-gu yifan-gu Aug 15, 2018

Choose a reason for hiding this comment

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

s/Email Addres/Email Address

}

func (a *InstallConfig) Generate(dependencies []*nextgen.AssetState) (*nextgen.AssetState, error) {
//emailAddress := string(dependencies[0].Contents[0].Data)
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we should pass a map?

@yifan-gu
Copy link
Contributor

@staebler lgtm so far

metav1.ObjectMeta `json:"metadata"`

// ClusterID is the ID of the cluster.
ClusterID uuid.UUID `json:"clusterID"`
Copy link
Member

Choose a reason for hiding this comment

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

I'd rather have this be a []byte (or hex-encoded string?). Is there a reason to preserve the UUID type in this config? Using a UUID algorithm to generate a unique ID makes sense, but once it's generated I think we can treat it as an opaque ID and won't need access to any UUID-specific methods.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the design (https://github.com/openshift/installer/blame/master/Documentation/design/installconfig.md#L246), it is specified as a uuid.UUID, so that is what I used. I agree that we can likely treat is as an opaque ID, but in the short-term I will leave it as a uuid.UUID to match the design.

log "github.com/Sirupsen/logrus"
"gopkg.in/alecthomas/kingpin.v2"

"github.com/openshift/installer/pkg/asset"
Copy link
Member

Choose a reason for hiding this comment

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

I like these new package paths, avoiding our current github.com/openshift/installer/installer/... redundancy. But to get CI tests for these new locations, we'll need updates to go-lint.sh, go-vet.sh, ci-operator (also here), etc. I'm not sure about the best way to roll those out. Maybe something like:

  1. Land an installer PR with a stub cmd/openshift-installer/main.go and pkg/ directory with the associated local CI updates.
  2. Land a release PR with updates to add tests for the new locations.
  3. Come back and rebase this PR around the stubs from step 1.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will it be OK to add the CI updates after this PR lands?

Copy link
Member

Choose a reason for hiding this comment

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

Will it be OK to add the CI updates after this PR lands?

I've filed openshift/release#1289 bumping unit and go-lint to cover the new directories. And I've filed #185 with the local hack/ changes.

@@ -0,0 +1,49 @@
package main
Copy link
Contributor

@abhinavdahiya abhinavdahiya Aug 16, 2018

Choose a reason for hiding this comment

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

nit: maybe just rename this folder to cmd/openshift-install/main.go,
So the binary will be openshift-install.
Then we can say things like
openshift-install installconfig
openshift-install manifests
openshift-install ignconfigs
openshift-install cluster

Copy link
Member

Choose a reason for hiding this comment

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

Then we can say things like

openshift-install installconfig
openshift-install manifests

👍 to cmd/openshift-install, but I don't see why we'd want sub-commands for subsets of the graph. Why not generate to (re)generate all the assets, install to push them out, and destroy to tear down?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@wking The sub-commands are used so that the user has an opportunity to make manual modifications to the generated assets from the previous step before they are used by subsequent steps.

@staebler staebler changed the title WIP: Create asset graph engine Create asset graph engine Aug 16, 2018
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 16, 2018
for {
fmt.Print(prompt)
var input string
if _, err := fmt.Scanln(&input); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

It seems like Scanln is breaking on whitespace (regardless of newline-ness). I think we may need to use a Scanner.Scan (although there are other options as well). Here's a play showing the issue (note the "expected newline" error on the first Fscanln).

For most of our inputs (email addresses, domain names, ...), we don't want spaces in the input. But the pull secret is JSON, which may contain spaces. And folks could have spaces in their password(/phrase). So where we want to enforce "this line contains no spaces" (or "this line contains an @ and other valid email-address structure"), I'd rather leave that to explicit validation, instead of having it be a limit imposed by the generic queryUser.

"os"
)

// Stock is the stock of assets that cen be generated.
Copy link
Member

Choose a reason for hiding this comment

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

nit: typo "cen" -> "can"

input = input[:len(input)-1]
}
if a.validation != nil {
validatedInput, ok := a.validation(input)
Copy link
Member

Choose a reason for hiding this comment

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

I'm fine returning a cleaned version of the raw input (your validatedInput), but I think the UX would be better if you returned an error with a message instead of the boolean ok. One benefit of that approach is that you can use a number of our existing validators (with a wrapper if you keep validatedInput). For example, see the ValidateInput type in my mock-up, used here and configured here.

@yifan-gu
Copy link
Contributor

yifan-gu commented Aug 17, 2018

@staebler Was implementing the tls assets generation (#145) based on this PR, but then I realized the baseDomain is used not in the installconfig?
Thought that the installconfig should store those user inputs?

@abhinavdahiya
Copy link
Contributor

@yifan-gu There are few other missing fields, Admin.Email Admin.Password SSHKey(public key) BaseDomain We should add these fields iteratively ? Or atleast add these mentioned above and update installconfig.md ?

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 24, 2018
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: staebler, yifan-gu

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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 24, 2018
@wking
Copy link
Member

wking commented Aug 24, 2018

/lint

^ this should run checks on pkg/... as well, since we're currently not covering those in our golint Prow job.

Copy link
Contributor

@openshift-ci-robot openshift-ci-robot left a comment

Choose a reason for hiding this comment

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

@wking: 12 warnings.

In response to this:

/lint

^ this should run checks on pkg/... as well, since we're currently not covering those in our golint Prow job.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@@ -0,0 +1,36 @@
package asset
Copy link
Contributor

Choose a reason for hiding this comment

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

Golint comments: should have a package comment, unless it's in another file for this package. More info.

@@ -0,0 +1,122 @@
package types
Copy link
Contributor

Choose a reason for hiding this comment

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

Golint comments: should have a package comment, unless it's in another file for this package. More info.

@@ -0,0 +1,40 @@
package asset
Copy link
Contributor

Choose a reason for hiding this comment

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

Golint comments: should have a package comment, unless it's in another file for this package. More info.

@@ -0,0 +1,100 @@
package installconfig
Copy link
Contributor

Choose a reason for hiding this comment

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

Golint comments: should have a package comment, unless it's in another file for this package. More info.

@@ -0,0 +1,46 @@
package asset
Copy link
Contributor

Choose a reason for hiding this comment

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

Golint comments: should have a package comment, unless it's in another file for this package. More info.

@@ -0,0 +1,98 @@
package installconfig
Copy link
Contributor

Choose a reason for hiding this comment

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

Golint comments: should have a package comment, unless it's in another file for this package. More info.

@@ -0,0 +1,44 @@
package main
Copy link
Contributor

Choose a reason for hiding this comment

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

Golint comments: should have a package comment, unless it's in another file for this package. More info.

@@ -0,0 +1,55 @@
package types
Copy link
Contributor

Choose a reason for hiding this comment

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

Golint comments: should have a package comment, unless it's in another file for this package. More info.

@@ -0,0 +1,27 @@
package stock
Copy link
Contributor

Choose a reason for hiding this comment

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

Golint comments: should have a package comment, unless it's in another file for this package. More info.

@@ -0,0 +1,125 @@
package installconfig
Copy link
Contributor

Choose a reason for hiding this comment

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

Golint comments: should have a package comment, unless it's in another file for this package. More info.

@yifan-gu
Copy link
Contributor

/test e2e-aws

@wking
Copy link
Member

wking commented Aug 24, 2018

The e2e-aws error was:

Waiting for router to be created ...
NAME                        STATUS    ROLES       AGE       VERSION
ip-10-0-0-79.ec2.internal   Ready     master      2m        v1.11.0+d4cacc0
ip-10-0-8-38.ec2.internal   Ready     bootstrap   3m        v1.11.0+d4cacc0
NAME      DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
router    1         0         0            0           12s
error: timed out waiting for the condition
Installation failed

That's a flake we see occasionally (e.g. here). Retesting would probably complete without this error, but since the error removes us from the merge queue, we may want to take the opportunity to address the golint issues.

@yifan-gu
Copy link
Contributor

@wking I think it's fine, I can take care of the golint warning in my PR.

}

states := map[asset.Asset]*asset.State{
stock.clusterID: &asset.State{
Copy link
Member

Choose a reason for hiding this comment

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

We currently don't run gofmt in CI (I've got work in flight to add that, #173), but running it locally complains about this line and the later ones following the same pattern:

$ git describe --always --abbrev=0
1273983432bf1ee9dbf51cd71cf8aaf7a6be798b
$ find . -name '*.go' ! -path '*/vendor/*' ! -path '*/.build/*' -exec gofmt -s -w {} \+
$ git diff --exit-code pkg
diff --git a/pkg/asset/installconfig/installconfig_test.go b/pkg/asset/installconfig/installconfig_test.go
index 32fcb58..0355717 100644
--- a/pkg/asset/installconfig/installconfig_test.go
+++ b/pkg/asset/installconfig/installconfig_test.go
@@ -120,28 +120,28 @@ func TestInstallConfigGenerate(t *testing.T) {
 			}
 
 			states := map[asset.Asset]*asset.State{
-				stock.clusterID: &asset.State{
+				stock.clusterID: {
 					Contents: []asset.Content{{Data: []byte("test-cluster-id")}},
 				},
-				stock.emailAddress: &asset.State{
+				stock.emailAddress: {
 					Contents: []asset.Content{{Data: []byte("test-email")}},
 				},
...

Copy link
Member

Choose a reason for hiding this comment

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

Fixed via #181.

@wking
Copy link
Member

wking commented Aug 24, 2018

The e2e-aws error was resource exhaustion:

8 error(s) occurred:

* module.vpc.aws_eip.nat_eip[0]: 1 error(s) occurred:

* aws_eip.nat_eip.0: Error creating EIP: AddressLimitExceeded: The maximum number of addresses has been reached.
	status code: 400, request id: bb635bac-678c-42ff-a9c8-626f1afd68a1
* module.vpc.aws_eip.nat_eip[5]: 1 error(s) occurred:

* aws_eip.nat_eip.5: Error creating EIP: AddressLimitExceeded: The maximum number of addresses has been reached.
	status code: 400, request id: 64aa4bf0-67a1-413e-97ab-a3614eb7ef8a
* module.vpc.aws_eip.nat_eip[4]: 1 error(s) occurred:

* aws_eip.nat_eip.4: Error creating EIP: AddressLimitExceeded: The maximum number of addresses has been reached.
	status code: 400, request id: d578f0cd-d4df-4ba3-a855-7d939e36dfbb
* module.vpc.data.aws_route_table.worker[5]: data.aws_route_table.worker.5: Your query returned no results. Please change your search criteria and try again.
* module.vpc.aws_eip.nat_eip[2]: 1 error(s) occurred:

* aws_eip.nat_eip.2: Error creating EIP: AddressLimitExceeded: The maximum number of addresses has been reached.
	status code: 400, request id: 21fbc1bd-6c72-4660-92af-ef78229cab46
* module.vpc.aws_eip.nat_eip[3]: 1 error(s) occurred:

* aws_eip.nat_eip.3: Error creating EIP: AddressLimitExceeded: The maximum number of addresses has been reached.
	status code: 400, request id: 88081db8-12cd-4e9b-a161-2db6f122aba0
* module.vpc.aws_eip.nat_eip[1]: 1 error(s) occurred:

* aws_eip.nat_eip.1: Error creating EIP: AddressLimitExceeded: The maximum number of addresses has been reached.
	status code: 400, request id: d13cb6bc-f50c-4ca2-9ae2-d358d4f9f72c
* module.vpc.aws_route_table_association.worker_routing[5]: index 5 out of range for list aws_route_table.private_routes.*.id (max 5) in:

${aws_route_table.private_routes.*.id[count.index]}

I'm cleaning up the CI account with my v3 script now.

@wking
Copy link
Member

wking commented Aug 24, 2018

We're down to one pending e2e-aws job, so there should be plenty of resources free.

/retest

@wking
Copy link
Member

wking commented Aug 24, 2018

Error:

time="2018-08-24T22:34:52Z" level=error msg="error 1: the etcd field requires at least one node pool to be specified"

Broke by openshift/release#1274 landing before #168 :/

@yifan-gu
Copy link
Contributor

/test e2e-aws

@wking
Copy link
Member

wking commented Aug 24, 2018

openshift/release#1284 has reverted openshift/release#1274 until we get #168 landed.

@openshift-merge-robot openshift-merge-robot merged commit 4e92db8 into openshift:master Aug 25, 2018
wking added a commit to wking/openshift-installer that referenced this pull request Aug 27, 2018
Catching up with 4e92db8 (Merge pull request openshift#120 from
staebler/asset_graph_engine, 2018-08-24).

* Drop the go-lint comment from go-fmt.sh.  I'd accidentally
  copy/pasted this over in 87b3e17 (hack/go-fmt: Make it easy to
  auto-format Go, 2018-08-24, openshift#173).
* Suggest users run go-lint over pkg/... as well.

* Simplify the 'go vet' invocation.  The code I'm removing is from
  eb71c8d (Added go-vet shell script, 2018-08-06, openshift#110).  The Travis
  config it replaced was removed in 1765e93 (.travis.yml: Prune
  moved-to-Prow tf-lint, etc., 2018-08-14, openshift#123), but was just
  running:

    go vet ./installer/...

  inside the container.  So I don't think we need the directory
  changing or moving here.  And we should certainly be able to cover
  the test from a single container, instead of launch a new container
  for each requested directory (at least as long as the requested
  directories are under $PWD, and the old script required that
  anyway).
wking added a commit to wking/openshift-release that referenced this pull request Aug 29, 2018
Cover ./pkg/... (and, for go-lint, ./cmd/...).  These directories are
new with openshift/installer@4e92db8 (Merge pull request openshift#120 from
staebler/asset_graph_engine, 2018-08-24, openshift/installer#120).

There's no particular reason to not run the Go unit tests on ./cmd/...
But we're unlikely to have unit tests there, and the old tests
restricted themselves to ./installer/pkg/..., so I've stuck with that
pattern here.

Steve recommended using 'go list ...' to run the lint commands [1].
We just want something that will give us our Go directories without
dropping down into the vendor directories.

[1]: openshift#1289 (comment)
wking added a commit to wking/openshift-installer that referenced this pull request Sep 6, 2018
We've had the dependency since 989532b (Add some dependencies used
for asset generation, 2018-08-10, openshift#120), so using it here doesn't cost
anything more than we're already paying ;).  And it's nice to have
compact diffs like:

  Diff:
  --- Expected
  +++ Actual
  @@ -33,8 +33,4 @@
      networking:
  -     podCIDR:
  -       IP: 10.2.0.0
  -       Mask: //8AAA==
  -     serviceCIDR:
  -       IP: 10.3.0.0
  -       Mask: //8AAA==
  +     podCIDR: 10.2.0.0/16
  +     serviceCIDR: 10.3.0.0/16
        type: canal
  Test:        TestKubeSystem

instead of comparing long YAML docs by eye.

The library does expect the expected value to be passed in before the
actual value [1].

[1]: https://godoc.org/github.com/stretchr/testify/assert#Equal
wking added a commit to wking/openshift-installer that referenced this pull request Nov 12, 2018
…rmName*

The old *PlatformType are from cccbb37 (Generate installation assets
via a dependency graph, 2018-08-10, openshift#120), but since 476be07
(pkg/asset: use vendored cluster-api instead of go templates,
2018-10-30, openshift#573), we've had variables for the name strings in the
more central pkg/types.  With this commit, we drop the more peripheral
forms.

I've added a unit test to enforce sorting in PlatformNames, because
the order is required by sort.SearchStrings in queryUserForPlatform.
wking added a commit to wking/openshift-installer that referenced this pull request Nov 13, 2018
…orm}.Name

The old *PlatformType are from cccbb37 (Generate installation assets
via a dependency graph, 2018-08-10, openshift#120), but since 476be07
(pkg/asset: use vendored cluster-api instead of go templates,
2018-10-30, openshift#573), we've had variables for the name strings in the
more central pkg/types.  With this commit, we drop the more peripheral
forms.  I've also pushed the types.PlatformName{Platform} variables
down into types.{platform}.Name at Ahbinav's suggestion [1].

I've added a unit test to enforce sorting in PlatformNames, because
the order is required by sort.SearchStrings in queryUserForPlatform.

[1]: openshift#659 (comment)
wking added a commit to wking/openshift-installer that referenced this pull request Nov 13, 2018
…orm}.Name

The old *PlatformType are from cccbb37 (Generate installation assets
via a dependency graph, 2018-08-10, openshift#120), but since 476be07
(pkg/asset: use vendored cluster-api instead of go templates,
2018-10-30, openshift#573), we've had variables for the name strings in the
more central pkg/types.  With this commit, we drop the more peripheral
forms.  I've also pushed the types.PlatformName{Platform} variables
down into types.{platform}.Name at Ahbinav's suggestion [1].

I've added a unit test to enforce sorting in PlatformNames, because
the order is required by sort.SearchStrings in queryUserForPlatform.

[1]: openshift#659 (comment)
EmilienM pushed a commit to shiftstack/installer that referenced this pull request Dec 8, 2020
…le.rhel-baseimages-to-mach-ocp-build-data-config

Bug 1878163: Updating Dockerfile.rhel baseimages to mach ocp-build-data config
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. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants