Giter Club home page Giter Club logo

ion-starter's People

Contributors

dchelimsky avatar glassonion avatar jaretbinford avatar magemasher avatar redinger avatar stuarthalloway 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  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ion-starter's Issues

Unit tests

It would be nice to start with a quick example for structured tests with code that interacts with Datomic Cloud.

  • Codes that does not have side effects e.g. datomic/q, datomic/pull
  • Codes that have side effects e.g. datomic/transact

Related discussion: https://forum.datomic.com/t/unit-testing/879

CodeDeploy fails

Image 2019-08-13 at 11 37 10 PM

Status:

clojure -A:dev -m datomic.ion.dev '{:op :deploy-status :execution-arn arn:aws:states:us-east-2:101416954809:execution:datomic-dev-Compute-784GREJAJTLX:dev-Compute-784GREJAJTLX-bd6deb15afeee59dd2dd16943cf3c0313f534c34-1565755664290}'

{:deploy-status "FAILED", :code-deploy-status "FAILED"}

Logs:

START RequestId: a012efad-3c01-4a75-8b08-615978c5f177 Version: $LATEST
2019-08-14T04:11:53.124Z    a012efad-3c01-4a75-8b08-615978c5f177    { event: 
{ codeDeploy: { deployment: [Object] },
lambda: { cI: 4, c: [Array], uI: -1, u: [], dI: -1, d: [], common: [Object] } } }
END RequestId: a012efad-3c01-4a75-8b08-615978c5f177

Error Message:

{...
      "status": "Failed",
      "errorInformation": {
        "code": "HEALTH_CONSTRAINTS",
        "message": "The overall deployment failed because too many individual instances failed deployment, too few healthy instances are available for deployment, or some instances in your deployment group are experiencing problems."
      }
}

How should I troubleshoot this?

Ion and Jackson

Sorry! I know this repo doesn't represent Ion itself, but I couldn't find any other issue tracker.

I have a Datomic Ion project that depends on Cheshire (and therefore Jackson). When I deploy my Ions and try to run them, I get the following exception:

{
    "Msg": "Uncaught Exception: java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/async/ByteArrayFeeder, compiling:(cheshire/factory.clj:53:11)",
    "Ex": {
        "Cause": "com.fasterxml.jackson.core.async.ByteArrayFeeder",
        "Via": [
            {
                "Type": "clojure.lang.Compiler$CompilerException",
                "Message": "java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/async/ByteArrayFeeder, compiling:(cheshire/factory.clj:53:11)",
                "At": [
                    "clojure.lang.Compiler",
                    "analyzeSeq",
                    "Compiler.java",
                    7010
                ]
            },
            {
                "Type": "java.lang.NoClassDefFoundError",
                "Message": "com/fasterxml/jackson/core/async/ByteArrayFeeder",
                "At": [
                    "java.lang.ClassLoader",
                    "defineClass1",
                    "ClassLoader.java",
                    -2
                ]
            },
            {
                "Type": "java.lang.ClassNotFoundException",
                "Message": "com.fasterxml.jackson.core.async.ByteArrayFeeder",
                "At": [
                    "java.net.URLClassLoader",
                    "findClass",
                    "URLClassLoader.java",
                    381
                ]
            }
        ],
        "Trace": [
            [
                "java.net.URLClassLoader",
                "findClass",
                "URLClassLoader.java",
                381
            ],
            [...]
        ]
    },
    "Type": "Alert",
    "Tid": 53,
    "Timestamp": 1530657546639
}

To reproduce this error, I forked ion-starter and switched out the org.clojure/data.json dependency for cheshire. You can find it here. After deploying, running the following invoke command from the tutorial will yield an exception complaining that the "cheshire.factory" namespace wasn't found.

aws lambda invoke --function-name $(GROUP)-add-item --payload '["SKU-12345", "small", "red", "hat"]' /dev/stdout

If you dig into the logs, you'll find my earlier exception occurs first.

com.fasterxml.jackson.core.async.ByteArrayFeeder was introduced in Jackson 2.9 which leads me to believe that the Datomic Cloud node has already loaded an older version on jackson-core.

My current work-around is to pin the versions of com.fasterxml.jackson.core/jackson-core, com.fasterxml.jackson.dataformat/jackson-dataformat-smile, and com.fasterxml.jackson.dataformat/jackson-dataformat-cbor to "2.8.11". I'd prefer not to downgrade transitive dependencies, but it seems to work for now.

Allowing users to change the versions of dependencies that the Datomic Node uses is probably off the table. However, I would at least like to have a list of the Datomic Node's dependencies documented somewhere in order to avoid running into this issue in the future.

Again, sorry for the noise in this repository; let me know if there's somewhere else I should post this!

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.