I performed a deploy using the latest Commcare Cloud and CommcareHQ. During the deploy, I received this message:
[10.1.0.4] out: Found 256 FixtureDataType documents to migrate.
[10.1.0.4] out:
[10.1.0.4] out:
[10.1.0.4] out: Detailed log output file: populate_lookuptables_2022-11-06T19-57-38.736206.log
[10.1.0.4] out: Found 298 FixtureDataType docs and 42 LookupTable models
[10.1.0.4] out: Processing Started at 2022-11-06 19:57:38
[10.1.0.4] out: Processing [ ] 0/298 0% -:--:-- remaining
[10.1.0.4] out: Processing [. ] 3/298 1% 0:00:05 remaining
[10.1.0.4] out: Processing [..................................................] 298/298 100% 0:00:00.062694 elapsed
[10.1.0.4] out: Processing Finished at 2022-11-06 19:57:38
[10.1.0.4] out: Processing Elapsed time: 0:00:00
[10.1.0.4] out: Found 0 differences
[10.1.0.4] out: Found 344365 FixtureDataItem documents to migrate.
[10.1.0.4] out: Found 344365 items that need to be migrated.
[10.1.0.4] out: Too many to migrate automatically.
[10.1.0.4] out:
[10.1.0.4] out: A migration must be performed before this environment can be upgraded to the latest version
[10.1.0.4] out: of CommCareHQ. This migration is run using the management command populate_lookuptablerows.
[10.1.0.4] out:
[10.1.0.4] out:
[10.1.0.4] out: Run the following commands to run the migration and get up to date:
[10.1.0.4] out:
[10.1.0.4] out: commcare-cloud <env> fab setup_limited_release --set code_branch=f829719365bca901f399bce0c543aeaa827fd630
[10.1.0.4] out:
[10.1.0.4] out: commcare-cloud <env> django-manage --release <release created by previous command> populate_lookuptablerows
[10.1.0.4] out:
[10.1.0.4] out: commcare-cloud <env> deploy commcare
I then performed those steps and during the final step (deploy), received this right at the end:
[10.1.0.4] Executing task 'record_successful_release'
[10.1.0.4] sudo: echo '/home/cchq/www/monolith/releases/2022-11-06_20.22' >> "$(echo RELEASES.txt)"
Done.
Disconnecting from 10.1.0.4... done.
>> Sending email: CommCare HQ deploy successful - monolith
Ubuntu 18.04.6 LTS
Connection to 10.1.0.4 closed.
commcare-cloud monolith django-manage record_deploy_success --user ccc --environment monolith --url 'https://github.com/dimagi/commcare-hq/compare/fatal: 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 safe.directory /home/cchq/www/monolith/releases/2022-09-25_17.31...f55a9f0343bfb00d52f133b0b4a365793a78c5dc' --minutes 10 --commit f55a9f0343bfb00d52f133b0b4a365793a78c5dc
ssh ccc@10.1.0.4 -t -o UserKnownHostsFile=/home/ccc/environments/monolith/known_hosts 'sudo -iu cchq bash -c '"'"'cd /home/cchq/www/monolith/current; python_env/bin/python manage.py record_deploy_success --user ccc --environment monolith --url '"'"'"'"'"'"'"'"'https://github.com/dimagi/commcare-hq/compare/fatal: 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 safe.directory /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/utils.py", 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/manage.py", line 188, in <module>
main()
File "/home/cchq/www/monolith/releases/2022-11-06_20.22/manage.py", line 46, in main
execute_from_command_line(sys.argv)
File "/home/cchq/www/monolith/releases/2022-11-06_20.22/python_env/lib/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/home/cchq/www/monolith/releases/2022-11-06_20.22/python_env/lib/python3.9/site-packages/django/core/management/__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/cchq/www/monolith/releases/2022-11-06_20.22/python_env/lib/python3.9/site-packages/django/core/management/base.py", 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/base.py", 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/record_deploy_success.py", line 64, in handle
deploy.save()
File "/home/cchq/www/monolith/releases/2022-11-06_20.22/python_env/lib/python3.9/site-packages/django/db/models/base.py", 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/base.py", 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/base.py", 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/base.py", 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/manager.py", 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/query.py", 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/compiler.py", 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/utils.py", 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/utils.py", 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/utils.py", 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/utils.py", 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/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
django.db.utils.DataError: value too long for type character varying(255)
Connection to 10.1.0.4 closed.
I assume it was a benign error. The current release appears to have successfully deployed.
Thanks
p.s. What's the difference between:
commcare-cloud <env> deploy commcare
and
commcare-cloud <env> deploy
?