Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

status is not a var in hidden. #156

Open
vthirumale opened this issue Nov 5, 2018 · 0 comments
Open

status is not a var in hidden. #156

vthirumale opened this issue Nov 5, 2018 · 0 comments

Comments

@vthirumale
Copy link

status is not present in hidden.meta.v1 but referenced in many places.
It is defined in meta.v1.status

Is this a BUG REPORT or FEATURE REQUEST?:
/kind bug

What happened:

$ jsonnet bad.jsonnet
RUNTIME ERROR: field does not exist: status
   ksonnet.beta.3/k8s.libsonnet:6037:28-49    object <anonymous>
   bad.jsonnet:5:5-61 object <anonymous>
   During manifestation

What you expected to happen:

$ jsonnet bad.jsonnet
{
   "a": {
      "apiVersion": "meta/v1",
      "kind": "Status"
   },
   "b": {
      "apiVersion": "meta/v1",
      "kind": "Status"
   }
}

How to reproduce it (as minimally and precisely as possible):

cat bad.jsonnet
local k = import "ksonnet.beta.3/k.libsonnet";

{

 a: k.core.v1.binding.mixin.metadata.initializers.resultType.new(),                # hidden.meta.v1.status         L10843
 b: k.core.v1.persistentVolumeClaim.mixin.metadata.initializers.resultType.new(),
}

$ jsonnet bad.jsonnet
RUNTIME ERROR: field does not exist: status
   ksonnet.beta.3/k8s.libsonnet:6037:28-49    object <anonymous>
   bad.jsonnet:5:5-61 object <anonymous>
   During manifestation

Anything else we need to know?:
Probable fix:

$ git diff
diff --git a/ksonnet.beta.3/k8s.libsonnet b/ksonnet.beta.3/k8s.libsonnet
index 9d6038d..0da4f62 100644
--- a/ksonnet.beta.3/k8s.libsonnet
+++ b/ksonnet.beta.3/k8s.libsonnet
@@ -24685,6 +24685,8 @@
           mixin:: {
           },
         },
+        // Status is a return value for calls that don't return other objects.
+        status:: $.meta.v1.status,
         // StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.
         statusCause:: {
           new():: {},
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant