jovotech / jovo-cli

🛠 Command Line Interface for the Jovo Framework: Makes voice experience deployment a breeze, including features like local development and staging.
https://www.jovo.tech/marketplace/jovo-cli
Apache License 2.0
57 stars 31 forks source link

Stage-level manifest not over-riding publishingInformation #69

Closed daviddlow closed 5 years ago

daviddlow commented 5 years ago

I'm submitting a...

Expected Behavior

Adding manifest information for "publishingInformation" within stage-level settings, should over-ride any defaults when deploying to ASK using a particular stage.

For example jovo deploy --stage dev and jovo deploy --stage prod, where each has slightly different publishing information (to make each skill clear, separate invocations, etc). I'm aware profiles could be used to keep these skills in different accounts, but would rather they stayed in one place.

Current Behavior

Always seems to use the default manifest in app.json and ignores any stage-level information, even if specifying the skill ID in the stage-level manifest too.

Error log

No log

Your Environment

janober commented 5 years ago

Hello, I just tested this and for me, it worked fine. Be aware that the data in the skill.json (in "platforms/alexaSkill") gets only updated when you run the jovo build command first as this builds everything and changes the files in the platforms folder. The jovo deploy command really just deploys what you have currently in the platforms folder nothing more. So if you make changes in the app.json (v1) or project.js (v2) and then run only "deploy" without a "build" first the old data will be deployed.

It is possible to do both at the same time. This for example builds first and then does directly a deploy with the stagging information from "dev":

jovo build --stage dev --deploy

If that does not solve your problem please check again with v2 of the CLI as this has already a lot of bug fixes. If even that does not work please write here again. Thanks!

janober commented 5 years ago

As we did not hear back I assume that it works now. So close the issue. If it does not, please comment here again.

dustincoates commented 4 years ago

@janober I have the same problem as @daviddlow. I've tried every kind of configuration in the stages (and build each time), and it is never overwritten. Everything else works just fine.

Here's where I am now:

      endpoint: "${JOVO_WEBHOOK_URL}",
      alexaSkill: {
        skillId: "amzn1.ask.skill.XXXXXXXX",
        languageModel: {
          "en-GB": {
            invocation: "foo local"
          }
        },
        publishingInformation: {
          locales: {
            "en-GB": {
              name: "Foo (local)"
            }
          }
        }
      }
    },

but I've tried publishingInformation without locales as well.

aswetlow commented 4 years ago

Hey @dustincoates

Looks like manifest is missing here. Try this:

     endpoint: "${JOVO_WEBHOOK_URL}",
      alexaSkill: {
        skillId: "amzn1.ask.skill.XXXXXXXX",
        languageModel: {
          "en-GB": {
            invocation: "foo local"
          }
        },
        manifest: {
           publishingInformation: {
          locales: {
            "en-GB": {
              name: "Foo (local)"
            }
          }
        }
        }  
      }
    },

I haven't tested it.

dustincoates commented 4 years ago

Thanks @aswetlow

Still not working just yet, but it's a lead!

aswetlow commented 4 years ago

Did you run jovo build --stage <stage> before you ran jovo deploy --stage <stage> ?

I created a project with the following setup:

project.js

module.exports = {
    alexaSkill: {
       nlu: 'alexa',
       languageModel: {
         "en-GB": {
           invocation: "foo local"
         }
       },
       manifest: {
          publishingInformation: {
            locales: {
            "en-GB": {
               name: "Foo (local)"
            }
            }
         }
      },
   },
    endpoint: '${JOVO_WEBHOOK_URL}',

    stages: {
       dev: {
         alexaSkill: {

            languageModel: {
              "en-GB": {
                invocation: "foo dev"
              }
            },
            manifest: {
               publishingInformation: {
                 locales: {
                 "en-GB": {
                    name: "Foo (dev)"
                 }
                 }
              }
           },
        },
       }
    }
};

After jovo build:

platforms/alexa/models/en-GB.json

"interactionModel": {
        "languageModel": {
            "invocationName": "foo local",
...

platforms/alexa/skill.json

{
    "manifest": {
        "publishingInformation": {
            "locales": {
                "en-GB": {
                    "name": "Foo (local)",
...

After I ran jovo build --stage dev I get the following results.

platforms/alexa/models/en-GB.json

"interactionModel": {
        "languageModel": {
            "invocationName": "foo dev",
...

platforms/alexa/skill.json

{
    "manifest": {
        "publishingInformation": {
            "locales": {
                "en-GB": {
                    "name": "Foo (dev)",
...

Am I missing or misunderstanding something?