Code Monkey home page Code Monkey logo

dhall-packages's People

Contributors

amarrella avatar arnaudbos avatar barambani avatar fiadliel avatar gabriella439 avatar kevoriordan avatar michae1t avatar retnuh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dhall-packages's Issues

Supposed conflict between k8s 1.14 and 1.17 imports

Hello folks ๐Ÿ‘‹

First of all, thank you for your work, and if there's a preferred way to ask questions than opening an issue, please redirect me (as I didn't find anything) and slam this issue closed.

I'm experimenting with Dhall and Argo Workflows (and intend to compare with Pachyderm, FWIW) and I'm new to both.
The rationale for using Dhall for me is I'm sick of YAML and Helm, basically.

I've tried the example from the readme, even though it's Argo CD and not Workflows it's okay because I'm just getting started.
But for some reason the ObjectMeta type keeps failing me.

let packages = https://raw.githubusercontent.com/EarnestResearch/dhall-packages/master/package.dhall

let argocd = packages.kubernetes.argocd

let k8s = packages.kubernetes.k8s.schemas

in  argocd.Application::{
    , metadata = k8s.ObjectMeta::{ name = "hello-app" }
    , spec =
        argocd.ApplicationSpec::{
        , project = "hello-project"
        , source =
            argocd.SourceSpec.TypesUnion.Plugin
              argocd.PluginSourceSpec::{
              , repoURL =
                  "https://github.com/EarnestResearch/dhall-packages.git"
              , path = "kubernetes"
              , plugin = argocd.PluginSpec::{ name = "dhall-to-yaml" }
              }
        , destination =
            argocd.DestinationSpec::{
            , server = "kubernetes.svc.local"
            , namespace = "default"
            }
        }
    }

I get

ฮป dhall-to-json --explain <<< './test.dhall'
โ†ณ ./test.dhall

Error: Missing record field: schemas
5โ”‚           packages.kubernetes.k8s.schemas

/Users/arnaud/Lab/monkeypatch/CS-Group/test.dhall:5:11
1โ”‚ ./test.dhall

(stdin):1:1

I've messed around this example a bit, removed the .schema part and other things. And eventually I've found something more interesting with an example which, I think, is more illustrative.
deployment is from dhall-kubernetes' readme and works ok, but application fails even though they're using the same k8s.ObjectMeta:: defaults completion.

let k8s = https://raw.githubusercontent.com/dhall-lang/dhall-kubernetes/381306bcc3fd87aafe042c23bb66fe58227b85f4/1.17/package.dhall

let deployment =
      k8s.Deployment::{
      , metadata = k8s.ObjectMeta::{ name = "nginx" }
      , spec = Some k8s.DeploymentSpec::{
        , selector = k8s.LabelSelector::{
          , matchLabels = Some (toMap { name = "nginx" })
          }
        , replicas = Some 2
        , template = k8s.PodTemplateSpec::{
          , metadata = k8s.ObjectMeta::{ name = "nginx" }
          , spec = Some k8s.PodSpec::{
            , containers =
              [ k8s.Container::{
                , name = "nginx"
                , image = Some "nginx:1.15.3"
                , ports = Some
                    [ k8s.ContainerPort::{ containerPort = 80 } ]
                }
              ]
            }
          }
        }
      }

let argocd = https://raw.githubusercontent.com/EarnestResearch/dhall-packages/8d228f578fbc7bb16c04a7c9ac8c6c7d2e13d1f7/kubernetes/argocd/package.dhall

let application = 
    argocd.Application::{
    , metadata = k8s.ObjectMeta::{ name = "hello-app" }
    , spec =
        argocd.ApplicationSpec::{
        , project = "hello-project"
        , source =
            argocd.SourceSpec.TypesUnion.Plugin
              argocd.PluginSourceSpec::{
              , repoURL =
                  "https://github.com/EarnestResearch/dhall-packages.git"
              , path = "kubernetes"
              , plugin = argocd.PluginSpec::{ name = "dhall-to-yaml" }
              }
        , destination =
            argocd.DestinationSpec::{
            , server = "kubernetes.svc.local"
            , namespace = "default"
            }
        }
    }

in  { deployment = deployment, application = application }

I get

ฮป dhall-to-json --explain <<< './test.dhall'
โ†ณ ./test.dhall

Error: Expression doesn't match annotation
{ metadata : { - initializers : โ€ฆ
             ,   annotations : - List
                               + Optional
                               - { โ€ฆ : โ€ฆ }
                               + List โ€ฆ
             ,   finalizers : - List
                              + Optional
                              - Text
                              + List โ€ฆ
             ,   labels : - List
                          + Optional
                          - { โ€ฆ : โ€ฆ }
                          + List โ€ฆ
             ,   managedFields : - List
                                 + Optional
                                 - { โ€ฆ : โ€ฆ }
                                 + List โ€ฆ
             ,   ownerReferences : - List
                                   + Optional
                                   - { โ€ฆ : โ€ฆ }
                                   + List โ€ฆ
             , โ€ฆ
             }
, โ€ฆ
}

30โ”‚     argocd.Application::{
31โ”‚     , metadata = k8s.ObjectMeta::{ name = "hello-app" }
32โ”‚     , spec =
33โ”‚         argocd.ApplicationSpec::{
34โ”‚         , project = "hello-project"
35โ”‚         , source =
36โ”‚             argocd.SourceSpec.TypesUnion.Plugin
37โ”‚               argocd.PluginSourceSpec::{
38โ”‚               , repoURL =
39โ”‚                   "https://github.com/EarnestResearch/dhall-packages.git"
40โ”‚               , path = "kubernetes"
41โ”‚               , plugin = argocd.PluginSpec::{ name = "dhall-to-yaml" }
42โ”‚               }
43โ”‚         , destination =
44โ”‚             argocd.DestinationSpec::{
45โ”‚             , server = "kubernetes.svc.local"
46โ”‚             , namespace = "default"
47โ”‚             }
48โ”‚         }
49โ”‚     }

/Users/arnaud/Lab/monkeypatch/CS-Group/test.dhall:30:5
1โ”‚ ./test.dhall

(stdin):1:1

I'm not sure if my intuition is correct, but here I go:
I think there is an issue with the definition of types and defaults inside dhall-packages/kubernetes/k8s/.

These are the two reasons leading me to this assumption:

  1. Missing initializers

The first line of the error message { metadata : { - initializers : โ€ฆ suggests that initializers is missing.
However, if it is indeed specified in dhal-kubernetes 1.14 (line 10), it is no longer defined in dhal-kubernetes 1.17.

  1. dhall-packages/kubernetes/k8s/1.17.dhall points to dhall-kubernetes 1.14

As you can see in this file, the link points to 1.14 instead of 1.17.

I have a feeling that this is linked to PR #41 but am not sure.
I'm very unfamiliar with Dhall as I said, so the whole 1.14 thing at the beginning of files, such as this one confuses me.

Anyways, I hope this is useful. If I'm wrong or mistaken in any way, please let me know so that I can diagnose further what's going on with my experiment.

[Security] Workflow cache.yml is using vulnerable action actions/checkout

The workflow cache.yml is referencing action actions/checkout using references v1. However this reference is missing the commit a6747255bd19d7a757dbdda8c654a9f84db19839 which may contain fix to the some vulnerability.
The vulnerability fix that is missing by actions version could be related to:
(1) CVE fix
(2) upgrade of vulnerable dependency
(3) fix to secret leak and others.
Please consider to update the reference to the action.

nix-shell fails to start, dhall tests failing

Some tests fail, and dhall is not usable in the nix-shell.

It may be a good idea to provide instruction to use the dhall project binary cache to avoid so much compiling?

...
    discover
      ./dhall-lang/tests/import/failure/cycle.dhall:                                                                           OK
      ./dhall-lang/tests/import/failure/missing.dhall:                                                                         OK
      ./dhall-lang/tests/import/failure/unit/EnvUnset.dhall:                                                                   OK
      ./dhall-lang/tests/import/failure/unit/EnvUnsetAsText.dhall:                                                             OK
      ./dhall-lang/tests/import/failure/importBoundary.dhall:                                                                  OK
      ./dhall-lang/tests/import/failure/alternativeEnv.dhall:                                                                  OK
      ./dhall-lang/tests/import/failure/referentiallyInsane.dhall:                                                             FAIL
        Exception:
        Error: Remote host not found

        URL: https://raw.githubusercontent.com/dhall-lang/dhall-lang/master/tests/import/data/referentiallyOpaque.dhall
...
12 out of 1451 tests failed (8.63s)
Test suite tasty: FAIL
Test suite logged to: dist/test/dhall-1.31.1-tasty.log
0 of 2 test suites (0 of 2 test cases) passed.
builder for '/nix/store/fmvykvwxkw5cf0kd17fm2apikj6nbvbz-dhall-1.31.1.drv' failed with exit code 1
error: build of '/nix/store/fmvykvwxkw5cf0kd17fm2apikj6nbvbz-dhall-1.31.1.drv' on 'ssh://[email protected]' failed: builder for '/nix/store/fmvykvwxkw5cf0kd17fm2ap
ikj6nbvbz-dhall-1.31.1.drv' failed with exit code 1
builder for '/nix/store/fmvykvwxkw5cf0kd17fm2apikj6nbvbz-dhall-1.31.1.drv' failed with exit code 1
error: build of '/nix/store/fmvykvwxkw5cf0kd17fm2apikj6nbvbz-dhall-1.31.1.drv' failed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.