Error on deploy (right after success message) - likely minor?

I performed a deploy using the latest Commcare Cloud and CommcareHQ. During the deploy, I received this message:

[] out: Found 256 FixtureDataType documents to migrate.
[] out:
[] out:
[] out: Detailed log output file: populate_lookuptables_2022-11-06T19-57-38.736206.log
[] out: Found 298 FixtureDataType docs and 42 LookupTable models
[] out: Processing Started at 2022-11-06 19:57:38
[] out: Processing [                                                  ] 0/298 0% -:--:-- remaining
[] out: Processing [.                                                 ] 3/298 1% 0:00:05 remaining
[] out: Processing [..................................................] 298/298 100% 0:00:00.062694 elapsed
[] out: Processing Finished at 2022-11-06 19:57:38
[] out: Processing Elapsed time: 0:00:00
[] out: Found 0 differences
[] out: Found 344365 FixtureDataItem documents to migrate.
[] out: Found 344365 items that need to be migrated.
[] out: Too many to migrate automatically.
[] out:
[] out: A migration must be performed before this environment can be upgraded to the latest version
[] out: of CommCareHQ. This migration is run using the management command populate_lookuptablerows.
[] out:
[] out:
[] out: Run the following commands to run the migration and get up to date:
[] out:
[] out:     commcare-cloud <env> fab setup_limited_release --set code_branch=f829719365bca901f399bce0c543aeaa827fd630
[] out:
[] out:     commcare-cloud <env> django-manage --release <release created by previous command> populate_lookuptablerows
[] out:
[] out:     commcare-cloud <env> deploy commcare

I then performed those steps and during the final step (deploy), received this right at the end:

[] Executing task 'record_successful_release'
[] sudo: echo '/home/cchq/www/monolith/releases/2022-11-06_20.22' >> "$(echo RELEASES.txt)"

Disconnecting from done.
>> Sending email: CommCare HQ deploy successful - monolith
Ubuntu 18.04.6 LTS
Connection to closed.
commcare-cloud monolith django-manage record_deploy_success --user ccc --environment monolith --url ' detected dubious ownership in repository at '"'"'/home/cchq/www/monolith/releases/2022-09-25_17.31'"'"'
To add an exception for this directory, call:

        git config --global --add /home/cchq/www/monolith/releases/2022-09-25_17.31...f55a9f0343bfb00d52f133b0b4a365793a78c5dc' --minutes 10 --commit f55a9f0343bfb00d52f133b0b4a365793a78c5dc
ssh ccc@ -t -o UserKnownHostsFile=/home/ccc/environments/monolith/known_hosts 'sudo -iu cchq bash -c '"'"'cd /home/cchq/www/monolith/current; python_env/bin/python record_deploy_success --user ccc --environment monolith --url '"'"'"'"'"'"'"'"' detected dubious ownership in repository at '"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'/home/cchq/www/monolith/releases/2022-09-25_17.31'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'
To add an exception for this directory, call:

        git config --global --add /home/cchq/www/monolith/releases/2022-09-25_17.31...f55a9f0343bfb00d52f133b0b4a365793a78c5dc'"'"'"'"'"'"'"'"' --minutes 10 --commit f55a9f0343bfb00d52f133b0b4a365793a78c5dc'"'"''
Ubuntu 18.04.6 LTS
Traceback (most recent call last):
  File "/home/cchq/www/monolith/releases/2022-11-06_20.22/python_env/lib/python3.9/site-packages/django/db/backends/", line 84, in _execute
    return self.cursor.execute(sql, params)
psycopg2.errors.StringDataRightTruncation: value too long for type character varying(255)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/cchq/www/monolith/releases/2022-11-06_20.22/", line 188, in <module>
  File "/home/cchq/www/monolith/releases/2022-11-06_20.22/", line 46, in main
  File "/home/cchq/www/monolith/releases/2022-11-06_20.22/python_env/lib/python3.9/site-packages/django/core/management/", line 419, in execute_from_command_line
  File "/home/cchq/www/monolith/releases/2022-11-06_20.22/python_env/lib/python3.9/site-packages/django/core/management/", line 413, in execute
  File "/home/cchq/www/monolith/releases/2022-11-06_20.22/python_env/lib/python3.9/site-packages/django/core/management/", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/cchq/www/monolith/releases/2022-11-06_20.22/python_env/lib/python3.9/site-packages/django/core/management/", line 398, in execute
    output = self.handle(*args, **options)
  File "/home/cchq/www/monolith/releases/2022-11-06_20.22/corehq/apps/hqadmin/management/commands/", line 64, in handle
  File "/home/cchq/www/monolith/releases/2022-11-06_20.22/python_env/lib/python3.9/site-packages/django/db/models/", line 739, in save
    self.save_base(using=using, force_insert=force_insert,
  File "/home/cchq/www/monolith/releases/2022-11-06_20.22/python_env/lib/python3.9/site-packages/django/db/models/", line 776, in save_base
    updated = self._save_table(
  File "/home/cchq/www/monolith/releases/2022-11-06_20.22/python_env/lib/python3.9/site-packages/django/db/models/", line 881, in _save_table
    results = self._do_insert(cls._base_manager, using, fields, returning_fields, raw)
  File "/home/cchq/www/monolith/releases/2022-11-06_20.22/python_env/lib/python3.9/site-packages/django/db/models/", line 919, in _do_insert
    return manager._insert(
  File "/home/cchq/www/monolith/releases/2022-11-06_20.22/python_env/lib/python3.9/site-packages/django/db/models/", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/home/cchq/www/monolith/releases/2022-11-06_20.22/python_env/lib/python3.9/site-packages/django/db/models/", line 1270, in _insert
    return query.get_compiler(using=using).execute_sql(returning_fields)
  File "/home/cchq/www/monolith/releases/2022-11-06_20.22/python_env/lib/python3.9/site-packages/django/db/models/sql/", line 1416, in execute_sql
    cursor.execute(sql, params)
  File "/home/cchq/www/monolith/releases/2022-11-06_20.22/python_env/lib/python3.9/site-packages/django/db/backends/", line 66, in execute
    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  File "/home/cchq/www/monolith/releases/2022-11-06_20.22/python_env/lib/python3.9/site-packages/django/db/backends/", line 75, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "/home/cchq/www/monolith/releases/2022-11-06_20.22/python_env/lib/python3.9/site-packages/django/db/backends/", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/home/cchq/www/monolith/releases/2022-11-06_20.22/python_env/lib/python3.9/site-packages/django/db/", line 90, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/home/cchq/www/monolith/releases/2022-11-06_20.22/python_env/lib/python3.9/site-packages/django/db/backends/", line 84, in _execute
    return self.cursor.execute(sql, params)
django.db.utils.DataError: value too long for type character varying(255)

Connection to closed.

I assume it was a benign error. The current release appears to have successfully deployed.


p.s. What's the difference between:
commcare-cloud <env> deploy commcare
commcare-cloud <env> deploy

Hey Ed,

I can confirm that that error looks benign. It seems that the code had trouble creating the URL to see the code diff (likely due to the ownership warning, but I am not very familiar with that warning), and it is trying to stick the error message in the deploy table instead, but that is longer than the column allows. You are correct to note this occurred after the deploy successfully finished, so unless you use the HQDeploy model to track these, I would not worry too much.

As far as those commands, they are exactly the same. commcare is an optional argument to specific what to deploy (commcare hq or formplayer), but it is the default value so not including it has the same effect.


1 Like

Thanks Cal, that's helpful