Now Available: Integrated Version Control for Rasa X

@tiziano Did you set a password for the private key? If so, please try generating new keys without a password.

It worked!! Thank you so much :pray:

Awesome! What did you do in the end to make it work?

Exactly what you told me, I just didn’t set any password.

By the way, now that I could set it all, nothing is working :sweat_smile:

I connected to GitHub and I have all my conversational data, but if I press Train nothing happens (it says it starts training but it never creates the new model); I can’t talk with my bot, every time I text something it appears the icon of texting looping over and over.

Maybe I miss some steps? Do I need to run rasa from my server somehow? Or the custom action server? Thank you

By the way, now that I could set it all, nothing is working :sweat_smile:

This is weird :smiley: Can you share some logs of rasa-x instance and the rasa-worker? How did you install Rasa X - ansible script, manual or Helm chart?

Where can I get the logs? That could be pretty useful :thinking:

I installed Rasa X with docker-compose following this guide. p.s. I raised another issue for that here.

Thank you!

Ok I found the error, I missed the intent “out_of_scope” which is necessary with the TwoStageFallback policy. I had to check the Network tab of my browser inspector in order to realize it. It could be nice to have a better way to notice this kind of errors.

Now I can train the model and talk with my bot, but the custom actions are not working. Can you please tell me how to enable them? How do I run the action server? @Tobias_Wochinger

Thank you

Awesome! Check step 3 of this guide Docker-Compose Quick Install for the action server :slight_smile:

I did, but still not working :confused:

I’m still trying to figure out why the git controls are not showing for me. I’ve enabled -vv in the init script and now I can see the output when I add a git repo with curl:

git.repo.base  - Cmd(['git', 'clone', '-v', 'git@github.com:XXXXXXXX/XXXXXXXX-model.git', '/tmp/tmp3ivd2rf4'])'s unused stdout: 
git.cmd  - Popen(['git', 'cat-file', '--batch-check'], cwd=/tmp/tmp3ivd2rf4, universal_newlines=False, shell=None, istream=<valid stream>)
git.cmd  - Popen(['git', 'fetch', '-v', 'origin'], cwd=/tmp/tmp3ivd2rf4, universal_newlines=True, shell=None, istream=None)
git.cmd  - Popen(['git', 'diff', '--cached', '--abbrev=40', '--full-index', '--raw'], cwd=/tmp/tmp3ivd2rf4, universal_newlines=False, shell=None, istream=None)
git.cmd  - Popen(['git', 'diff', '--abbrev=40', '--full-index', '--raw'], cwd=/tmp/tmp3ivd2rf4, universal_newlines=False, shell=None, istream=None)
git.cmd  - Popen(['git', 'status', '--porcelain', '--untracked-files'], cwd=/tmp/tmp3ivd2rf4, universal_newlines=False, shell=None, istream=None)
git.cmd  - Popen(['git', 'checkout', 'Rasa-test-branch-c75845f1-4e09-46be-8a29-f0cfd091ef6c'], cwd=/tmp/tmp3ivd2rf4, universal_newlines=False, shell=None, istream=None)
rasax.community.services.git_service  - Checked out branch 'Rasa-test-branch-c75845f1-4e09-46be-8a29-f0cfd091ef6c'.
git.cmd  - Popen(['git', 'add', '-A'], cwd=/tmp/tmp3ivd2rf4, universal_newlines=False, shell=None, istream=None)
git.cmd  - Popen(['git', 'cat-file', '--batch'], cwd=/tmp/tmp3ivd2rf4, universal_newlines=False, shell=None, istream=<valid stream>)
git.cmd  - Popen(['git', 'push', '--porcelain', 'origin', 'Rasa-test-branch-c75845f1-4e09-46be-8a29-f0cfd091ef6c'], cwd=/tmp/tmp3ivd2rf4, universal_newlines=True, shell=None, istream=None)
git.cmd  - Popen(['git', 'push', '--porcelain', 'origin', ':Rasa-test-branch-c75845f1-4e09-46be-8a29-f0cfd091ef6c'], cwd=/tmp/tmp3ivd2rf4, universal_newlines=True, shell=None, istream=None)

No errors (and no git output showing either, unfortunately).

I’ve also logged into the Docker container and tried to see if I could find any clues but this /tmp/tmp3ivd2rf4 folder is not there anymore right after the operation. There is no /tmp folder with a .git subfolder in it.

With -vv on I see errors coming every 2 seconds:

rasa.core.agent  - Requesting model from server http://localhost:5002/api/projects/default/models/tags/production...
sanic.root  - CORS: Request to '/api/projects/default/models/tags/production' matches CORS resource '/*'. Using options: {'origins': ['.*'], 'methods': 'DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT', 'allow_headers': ['.*'], 'expose_headers': 'X-Total-Count', 'supports_credentials': False, 'max_age': 1800, 'send_wildcard': False, 'automatic_options': True, 'vary_header': True, 'resources': '/*', 'intercept_exceptions': True, 'always_send': True}
rasa.core.agent  - Model server returned 204 status code, indicating that no new model is available. Current fingerprint: f5412ed063fa57edc67c62f909e61707
rasa.core.agent  - No new model found at URL http://localhost:5002/api/projects/default/models/tags/production

Note: I’m able to chat with the bot in the Rasa-X interface.

Any help would be much appreciated. Thanks!

Any error logs in rasa-production, or the app container?

why the git controls are not showing for me.

Did you enable the experimental feature through the UI (step 1 here Integrated Version Control)

How do I check for error logs?

Hi @tiziano,

you can do docker-compose logs or to get specific logs for a service docker-compose logs <name of the service> (e.g. rasa-x, rasa-production)

1 Like

Hello, we are trying to setup Integrated Version Control on Kubernetes. Repository has proper public key, repository.json contains proper entry, but when sending request to use Github repository in format curl --request POST --url https://XXX/api/projects/default/git_repositories?api_token=XXX --header 'content-type: application/json' --data-binary @repository.json

we see in the logs of RASA-X:

[2020-01-23 10:28:24 +0000] [27] [ERROR] Exception occurred while handling uri: 'http://XXX/api/projects/default/git_repositories?api_token=XXX' Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/sanic/app.py", line 942, in handle_request response = await response File "/usr/local/lib/python3.6/site-packages/rasax/community/api/decorators.py", line 177, in decorated_function return await await_and_return_response(args, kwargs, request) File "/usr/local/lib/python3.6/site-packages/rasax/community/api/decorators.py", line 107, in await_and_return_response response = await response File "/usr/local/lib/python3.6/site-packages/rasax/community/api/decorators.py", line 197, in decorated_function return await f(request, *args, **kwargs) File "/usr/local/lib/python3.6/site-packages/rasax/community/api/blueprints/git.py", line 50, in add_repository saved = git_service.save_repository(request.json) File "/usr/local/lib/python3.6/site-packages/rasax/community/services/git_service.py", line 186, in save_repository repository_credentials.ssh_key, repository_credentials.id File "/usr/local/lib/python3.6/site-packages/rasax/community/services/git_service.py", line 200, in _add_ssh_credentials io_utils.create_directory(base_path) File "/usr/local/lib/python3.6/site-packages/rasa/utils/io.py", line 380, in create_directory os.makedirs(directory_path) File "/usr/local/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) PermissionError: [Errno 13] Permission denied: '/app/git/ssh_files'

we checked file permission inside rasa-x container and all files are owned by root while container user is rasa (rasa-x version: 0.24.1, latest Helm chart). Where can we see rasa-x Dockerfile? Any help would be appreciated. Thank you!

2 Likes

Welcome to the community @filiphaftek!

Did you set the fsGroup to 0? It’s also described here Deploy in a Cluster Environment

Thank you very much @Tobias_Wochinger! This change helped :+1: So I can confirm that this feature is working on EKS with Github :slight_smile: Thanks for quick response.

Awesome!

Hi all, I’m using bitbucket, not github, and im receiving the following write permission error

After I enabled from the rasa-x ui the Integrated Version Control

I created a repository named rasa-repo-test and tried to sync my rasa server with that repo by sending the request from my local machine (also tried from the server it self)

the request:

curl --request POST --url http://<ip>/api/projects/default/git_repositories?api_token=75xxx499 --header 'content-type: application/json' --data-binary @repository.json

with the repository.json ( file which was visible from the path i sent the curl command)

{
  "repository_url": "git@bitbucket.org:ben/rasa-repo-test.git",
  "target_branch": "master",
  "ssh_key": "-----BEGIN RSA PRIVATE KEY-----\\...==\\n-----END RSA PRIVATE KEY-----"
}

the response:

{
"version": "0.24.7",
"status": "failure",
"message": "Insufficient permissions for remote repository.",
"reason": "RepositoryCreationFailed",
"details": {
    "args": [
        "Given repository credentials don't provide write permissions to the repository. Please make sure the ssh key is correct and the administrator of the remote repository gave you the required permissions."
    ]
},
"help": null,
"code": 422
}

I have used the git-deploy-key-oneliner thanks to functools verified that my private key is valid in a string value format within the repository.json Also of course added the public key into my bitbucket account keys I’m suspecting that bitbucket isn’t providing write keys via ssh keys I am using bitbucket cloud

Or which I hope , there’s something wrong with something I’m doing

Thanks for this. I found myself thinking the docs couldn’t be right b/c it wasn’t valid JSON having new lines in the private key. Kept getting RepositoryCreationFailed and was googling. Should have just tried this.

Heads up, a quicker way to make this conversion

cat private-key | awk '{printf "%s\\n", $0}'
2 Likes

@Ben-Mark Can you please try putting the ssh key just as it is in the repository.json instead of inserting the \ns?