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

asset/ignition: clean up templates #259

Merged
merged 1 commit into from
Sep 17, 2018
Merged

asset/ignition: clean up templates #259

merged 1 commit into from
Sep 17, 2018

Conversation

crawford
Copy link
Contributor

This now distinguishes between constant strings and templates, which
will make it less likely that a template isn't executed when it should
be. This also has the advantage that the binary will panic immediately
if any of the templates are invalid.

@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 17, 2018
@crawford
Copy link
Contributor Author

/retest

@wking
Copy link
Member

wking commented Sep 17, 2018

This looks good to me, but as of 8936aa8, Bazel suggests some changes:

$ bazel run //:gazelle
$ git diff
diff --git a/pkg/asset/ignition/BUILD.bazel b/pkg/asset/ignition/BUILD.bazel
index d369141..778b4ed 100644
--- a/pkg/asset/ignition/BUILD.bazel
+++ b/pkg/asset/ignition/BUILD.bazel
@@ -14,7 +14,7 @@ go_library(
     visibility = ["//visibility:public"],
     deps = [
         "//pkg/asset:go_default_library",
-        "//pkg/asset/ignition/templates:go_default_library",
+        "//pkg/asset/ignition/content:go_default_library",
         "//pkg/asset/installconfig:go_default_library",
         "//pkg/asset/kubeconfig:go_default_library",
         "//pkg/asset/tls:go_default_library",
@@ -37,7 +37,7 @@ go_test(
     embed = [":go_default_library"],
     deps = [
         "//pkg/asset:go_default_library",
-        "//pkg/asset/ignition/templates:go_default_library",
+        "//pkg/asset/ignition/content:go_default_library",
         "//vendor/github.com/stretchr/testify/assert:go_default_library",
         "//vendor/github.com/vincent-petithory/dataurl:go_default_library",
     ],
diff --git a/pkg/asset/ignition/content/BUILD.bazel b/pkg/asset/ignition/content/BUILD.bazel
index eec25a1..7fd8c13 100644
--- a/pkg/asset/ignition/content/BUILD.bazel
+++ b/pkg/asset/ignition/content/BUILD.bazel
@@ -8,6 +8,6 @@ go_library(
         "kubelet.go",
         "tectonic.go",
     ],
-    importpath = "github.com/openshift/installer/pkg/asset/ignition/templates",
+    importpath = "github.com/openshift/installer/pkg/asset/ignition/content",
     visibility = ["//visibility:public"],
 )

@crawford
Copy link
Contributor Author

Crap. Forgot to run gazelle.

This now distinguishes between constant strings and templates, which
will make it less likely that a template isn't executed when it should
be. This also has the advantage that the binary will panic immediately
if any of the templates are invalid.
@wking
Copy link
Member

wking commented Sep 17, 2018

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: crawford, wking

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

@crawford
Copy link
Contributor Author

/retest

@openshift-merge-robot openshift-merge-robot merged commit 00cb2f1 into openshift:master Sep 17, 2018
@crawford crawford deleted the content branch September 17, 2018 23: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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants