Rasa X version control with github error on discard changes

Hey there, I am using a server with Rasa X (V. 0.35.0) on it and I connected to my git repo. It loaded everything necessary and I am able to push my changes to git. But if I click on discard changes, I get a 404 Error and the status stays yellow. Furthermore if I chance the nlu.yml in my IDE and push it to my git repo, Rasa X does not see the changes - it stays green.

I already tried to restart the pods and disconnected and reconnected to the git repo.

This is my error-message

rasa-x_1           | Job "run_background_synchronization (trigger: cron[minute='*'], next run at: 2021-01-25 17:14:
00 UTC)" raised an exception
rasa-x_1           | Traceback (most recent call last):
rasa-x_1           |   File "/usr/local/lib/python3.8/dist-packages/apscheduler/executors/base.py", line 125, in run_job
rasa-x_1           |     retval = job.func(*job.args, **job.kwargs)
rasa-x_1           |   File "/usr/local/lib/python3.8/dist-packages/rasax/community/services/integrated_version_con
trol/git_service.py", line 131, in run_background_synchronization
rasa-x_1           |     loop.run_until_complete(git_service.synchronize_project(force_data_injection))
rasa-x_1           |   File "uvloop/loop.pyx", line 1456, in uvloop.loop.Loop.run_until_complete
rasa-x_1           |   File "/usr/local/lib/python3.8/dist-packages/rasax/community/services/integrated_version_con
trol/git_service.py", line 1114, in synchronize_project
rasa-x_1           |     return await self._force_inject_latest_remote_changes()
rasa-x_1           |   File "/usr/local/lib/python3.8/dist-packages/rasax/community/services/integrated_version_con
trol/git_service.py", line 1174, in _force_inject_latest_remote_changes
rasa-x_1           |     await self._inject_data()
rasa-x_1           |   File "/usr/local/lib/python3.8/dist-packages/rasax/community/services/integrated_version_con
trol/git_service.py", line 1146, in _inject_data
rasa-x_1           |     await rasax.community.initialise.inject_files_from_disk(
rasa-x_1           |   File "/usr/local/lib/python3.8/dist-packages/rasax/community/initialise.py", line 350, in in
ject_files_from_disk    
rasa-x_1           |     inject_domain(
    rasa-x_1           |   File "/usr/local/lib/python3.8/dist-packages/rasax/community/initialise.py", line 185, in in
    ject_domain
    rasa-x_1           |     if not rasa.shared.core.domain.Domain.is_domain_file(
    rasa-x_1           |   File "/usr/local/lib/python3.8/dist-packages/rasa/shared/core/domain.py", line 1582, in is_d
    omain_file
    rasa-x_1           |     content = rasa.shared.utils.io.read_yaml_file(filename)
    rasa-x_1           |   File "/usr/local/lib/python3.8/dist-packages/rasa/shared/utils/io.py", line 368, in read_yam
    l_file
    rasa-x_1           |     return read_yaml(read_file(filename, DEFAULT_ENCODING))
    rasa-x_1           |   File "/usr/local/lib/python3.8/dist-packages/rasa/shared/utils/io.py", line 349, in read_yam
    l
    rasa-x_1           |     return yaml_parser.load(content) or {}
    rasa-x_1           |   File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/main.py", line 343, in load
    rasa-x_1           |     return constructor.get_single_data()
    rasa-x_1           |   File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/constructor.py", line 113, in get_s
    ingle_data
    rasa-x_1           |     return self.construct_document(node)
    rasa-x_1           |   File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/constructor.py", line 123, in const
    ruct_document
    rasa-x_1           |     for _dummy in generator:
    rasa-x_1           |   File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/constructor.py", line 723, in const
    ruct_yaml_map
    rasa-x_1           |     value = self.construct_mapping(node)
    rasa-x_1           |   File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/constructor.py", line 440, in const
    ruct_mapping
    rasa-x_1           |     return BaseConstructor.construct_mapping(self, node, deep=deep)
    rasa-x_1           |   File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/constructor.py", line 255, in const
    ruct_mapping
    rasa-x_1           |     value = self.construct_object(value_node, deep=deep)
    rasa-x_1           |   File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/constructor.py", line 146, in const
    ruct_object
    rasa-x_1           |     data = self.construct_non_recursive_object(node)
    rasa-x_1           |   File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/constructor.py", line 181, in const
    ruct_non_recursive_object
    rasa-x_1           |     data = constructor(self, node)
    rasa-x_1           |   File "/usr/local/lib/python3.8/dist-packages/rasa/shared/utils/io.py", line 311, in env_var_
    constructor
    rasa-x_1           |     raise ValueError(
    rasa-x_1           | ValueError: Error when trying to expand the environment variables in '${{ github.event_name ==
     'push' }}'. Please make sure to also set these environment variables: '['${{']'.

Hi Jessica!

Thank you for your question. Is it possible for you to share your domain.yml file?

Hey Dominique, sure I can!

Here it is:

domain.yml
version: '2.0'
config:
  store_entities_as_slots: true
session_config:
  session_expiration_time: 60
  carry_over_slots_to_new_session: false
intents:
- thanks:
    use_entities: true
- greet:
    use_entities: true
- goodbye:
    use_entities: true
- affirm:
    use_entities: true
- deny:
    use_entities: true
- mood_great:
    use_entities: true
- mood_unhappy:
    use_entities: true
- bot_challenge:
    use_entities: true
- slow:
    use_entities: true
- symptom_light:
    use_entities: true
- feel_bad:
    use_entities: true
- feel_listless:
    use_entities: true
- breathing_heavy:
    use_entities: true
- breathing_normal:
    use_entities: true
- stop:
    use_entities: true
entities: []
slots:
  body_aches:
    type: rasa.shared.core.slots.AnySlot
    initial_value: null
    auto_fill: true
    influence_conversation: false
  breathing:
    type: rasa.shared.core.slots.AnySlot
    initial_value: null
    auto_fill: true
    influence_conversation: false
  contact_with_covid:
    type: rasa.shared.core.slots.AnySlot
    initial_value: null
    auto_fill: true
    influence_conversation: false
  cough:
    type: rasa.shared.core.slots.AnySlot
    initial_value: null
    auto_fill: true
    influence_conversation: false
  discomfort_beginning:
    type: rasa.shared.core.slots.AnySlot
    initial_value: null
    auto_fill: true
    influence_conversation: false
  discomfort_development:
    type: rasa.shared.core.slots.AnySlot
    initial_value: null
    auto_fill: true
    influence_conversation: false
  physical_condition:
    type: rasa.shared.core.slots.AnySlot
    initial_value: null
    auto_fill: true
    influence_conversation: false
  requested_slot:
    type: rasa.shared.core.slots.TextSlot
    initial_value: null
    auto_fill: true
    influence_conversation: false
  runny_nose:
    type: rasa.shared.core.slots.AnySlot
    initial_value: null
    auto_fill: true
    influence_conversation: false
  taste:
    type: rasa.shared.core.slots.AnySlot
    initial_value: null
    auto_fill: true
    influence_conversation: false
  temperature:
    type: rasa.shared.core.slots.AnySlot
    initial_value: null
    auto_fill: true
    influence_conversation: false
responses:
  utter_greet:
  - text: Hallo! Wie geht es dir?
  - text: Hi! Wie geht es dir?
  utter_cheer_up:
  - image: https://i.imgur.com/nGF1K8f.jpg
    text: 'Hier ist etwas um dich aufzumuntern:'
  utter_did_that_help:
  - text: Hat es funktioniert?
  - text: Geht es dir jetzt besser?
  utter_happy:
  - text: Super! Viel Spaß weiterhin.
  - text: Das freut mich sehr.
  - text: Das klingt super!
  utter_goodbye:
  - text: Bis bald!
  - text: Auf Wiedersehen!
  - text: TschĂŒss!
  - text: Bis dann.
  utter_iamabot:
  - text: Mein Name ist Mira. Ich bin ein Chatbot.
  utter_start_symptom_quiz:
  - text: Das tut mir leid! Möchtest du das Quiz "Grippe oder ErkÀltung" starten?
  utter_ask_discomfort_beginning:
  - text: Haben deine Beschwerden schleichend begonnen oder ging es dir sehr schnell sehr schlecht?
  utter_ask_discomfort_development:
  - text: Hattest du zu Beginn nur leichte Symptome wie Halsschmerzen und Heiserkeit oder direkt Fieber und schnell weitere Symptome?
  utter_ask_temperature:
  - text: BetrÀgt deine Körpertemperatur mehr als 38,5 Grad?
  utter_ask_body_aches:
  - text: Leidest du unter Gliederschmerzen?
  utter_ask_physical_condition:
  - text: FĂŒhlst du dich nur schlapp und angeschlagen oder sehr krank?
  utter_noworries:
  - text: Kein Problem! Gib mir Bescheid, wenn du deine Meinung Ànderst.
  utter_get_well_soon:
  - text: Bitte denken daran, dass dieser Test keine Ă€rztliche Untersuchung ersetzt. Er stellt lediglich eine Hilfe zur SelbsteinschĂ€tzung dar. Kurier dich gut aus. Ich wĂŒnsche dir gute Besserung!
  utter_default:
  - text: Das habe ich leider nicht richtig verstanden. Könntest du es fĂŒr mich bitte anders formulieren?
  utter_ask_check_corona_symptoms:
  - text: Aufgrund der aktuellen Pandemie möchte ich dich noch auf etwas aufmerksam machen. Derzeit leiden viele Menschen an einer COVID-19-Erkrankung. Möchtest du erfahren, ob deine Symptome insgesamt auf diese Erkrankung hinweisen könnten?
  utter_ask_cough:
  - text: Leidest du unter Husten?
  utter_ask_runny_nose:
  - text: Hast du Schnupfen?
  utter_ask_taste:
  - text: Ist dein Geruchs- oder Geschmackssinn beeintrÀchtigt?
  utter_ask_contact_with_covid:
  - text: Hattest du vor dem Eintreten deiner Symptome Kontakt mit einem bestÀtigten COVID-19-Fall?
  utter_ask_breathing:
  - text: Kannst du (bis auf eine möglicherweise laufenden Nase) gut atmen, oder fÀllt es dir deutlich schwerer?
  utter_ask_abort:
  - text: Bist du dir sicher, dass du das Quiz abbrechen möchtest?
  utter_thanks:
  - text: Sehr gerne!
  - text: Gern geschehen.
actions:
- validate_symptom_quiz_form
- validate_corona_quiz_form
- submit_symptom_quiz_result
- submit_corona_quiz_result
forms:
  symptom_quiz_form:
    body_aches:
    - intent: affirm
      type: from_intent
      value: true
    - intent: deny
      type: from_intent
      value: false
    discomfort_beginning:
    - intent: feel_bad
      type: from_intent
      value: discomfort_fast
    - intent: slow
      type: from_intent
      value: discomfort_slow
    discomfort_development:
    - intent: feel_bad
      type: from_intent
      value: symptom_heavy
    - intent: symptom_light
      type: from_intent
      value: symptom_light
    physical_condition:
    - intent: feel_bad
      type: from_intent
      value: feel_bad
    - intent: feel_listless
      type: from_intent
      value: feel_listless
    temperature:
    - intent: affirm
      type: from_intent
      value: true
    - intent: deny
      type: from_intent
      value: false
  corona_quiz_form:
    breathing:
    - intent: breathing_heavy
      type: from_intent
      value: breathing_heavy
    - intent: breathing_normal
      type: from_intent
      value: breathing_normal
    contact_with_covid:
    - intent: affirm
      type: from_intent
      value: true
    - intent: deny
      type: from_intent
      value: false
    cough:
    - intent: affirm
      type: from_intent
      value: true
    - intent: deny
      type: from_intent
      value: false
    runny_nose:
    - intent: affirm
      type: from_intent
      value: true
    - intent: deny
      type: from_intent
      value: false
    taste:
    - intent: affirm
      type: from_intent
      value: true
    - intent: deny
      type: from_intent
      value: false
e2e_actions: []

I hope it helps.

Can you also run a rasa data validate in your IDE and make sure you don’t see any errors.

One of the error messages indicates that your training data may have the following somewhere:

My data seems to be ok. What can I do?

(venv) **➜** **rasaproject** **git:(****master****)** rasa data validate

2021-01-30 16:59:26 **INFO** rasa.validator - Validating intents...

2021-01-30 16:59:26 **INFO** rasa.validator - Validating uniqueness of intents and stories...

2021-01-30 16:59:26 **INFO** rasa.validator - Validating utterances...

2021-01-30 16:59:26 **INFO** rasa.validator - Story structure validation...

Processed story blocks: 100%|███| 12/12 [00:00<00:00, 2053.68it/s, # trackers=1]

2021-01-30 16:59:26 **INFO** rasa.core.training.story_conflict - Considering all preceding turns for conflict analysis.

2021-01-30 16:59:26 **INFO** gensim.models.utils_any2vec - loading projection weights from cache/de/de.wiki.bpe.vs50000.d100.w2v.bin

2021-01-30 16:59:26 **INFO** gensim.models.utils_any2vec - loaded (50000, 100) matrix from cache/de/de.wiki.bpe.vs50000.d100.w2v.bin

2021-01-30 16:59:26 **INFO** rasa.validator - No story structure conflicts found.

It looks like the project in your IDE is not in sync with what is in Rasa X. Not surprising since Rasa X is showing errors not in the iDE version.

I’m not sure what’s going on with the training data in Rasa X. I would disconnect and re-connect Rasa X from the repo.

My IDE has the same data as Rasa X has. I already reconnected it before, there has to be a different problem.

I have a problem with my Github-Actions. As long as i keep the .gitignore/workflows/cicd.yml in my branch, I can not discard the changes and Rasa X is not pulling new pushes. When I delete this file from the branch that is connected with Rasa X, git works like it should.

When I start the actions with a push from my IDE or manually, the deployment goes green and everything works. I don’t know how to fix that

Git workflows are typically under .github/workflows not .gitignore/workflows but Rasa X should not care what’s in either of those directories. Can you share your repo?

Yes indeed. It is under .github/workflows I just did not check what I was writing here. I can not make my repo public, because this is my bachelor thesis, that I am currently working on.

But I can send you an invite, if you share your github name with me.

I just learned that this is a known bug in Rasa X 0.35.0. A fix is being worked on.

2 Likes

Thank you a lot for your effort! Looking forward to that fix.

Rasa X 0.35.1 will be released later today or tomorrow along with Rasa OSS 2.2.10.

1 Like

Happy to hear this patch is coming out. I’ve got two separate threads for ultimately the same error:

and