earnestresearch / dhall-packages Goto Github PK
View Code? Open in Web Editor NEWCollection of dhall packages
License: MIT License
Collection of dhall packages
License: MIT License
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.
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
In the kustomize argocd-cm overlay, why is there the if
condition for $VALUES_FILE
? Where is values file filled? I could not find any documentation about it on argo-cd or google.
While dhall-kubernetes
don't use the --omit-empty
flag since dhall-lang/dhall-kubernetes#110, the README for argocd advices the use of this flag.
What is the best practice while using the current version of this repo ?
Thanks
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:
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.
dhall-packages/kubernetes/k8s/1.17.dhall
points to dhall-kubernetes 1.14As 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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.