Skip to content

Update migrations scripts #123

@Angeluz-07

Description

@Angeluz-07

Run migrations stage in our CD flow is failing after merge changes from #119 . Apparently migrations scripts were not updated to work with changes from the mentioned PR.

2020-04-30T20:44:26.4930818Z Running migrations
2020-04-30T20:44:26.5384134Z 2020-04-30 20:44:26,537 (4343) [    INFO]: Loading migrations from migrations
2020-04-30T20:44:27.2722953Z 2020-04-30 20:44:27,271 (4343) [    INFO]: Add ProxyFix to serve swagger.json over https.
2020-04-30T20:44:27.2737467Z 2020-04-30 20:44:27,273 (4343) [    INFO]: Set CORS access to [*]
2020-04-30T20:44:27.4745288Z 2020-04-30 20:44:27,473 (4343) [    INFO]:  - migrations.01-initialize-db
2020-04-30T20:44:27.4757439Z 2020-04-30 20:44:27,475 (4343) [    INFO]:  - migrations.02-add-events
2020-04-30T20:44:27.4768132Z Traceback (most recent call last):
2020-04-30T20:44:27.4769136Z   File "/opt/hostedtoolcache/Python/3.8.2/x64/bin/migrate-anything", line 8, in <module>
2020-04-30T20:44:27.4769537Z     sys.exit(main())
2020-04-30T20:44:27.4770305Z   File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/site-packages/migrate_anything/main.py", line 18, in main
2020-04-30T20:44:27.4772299Z     run(options.package)
2020-04-30T20:44:27.4773597Z   File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/site-packages/migrate_anything/migrator.py", line 161, in run
2020-04-30T20:44:27.4774184Z     applied = OrderedDict(_CONFIG.storage.list_migrations())
2020-04-30T20:44:27.4774686Z   File "/home/vsts/work/r1/a/Drop/sources/migrations/__init__.py", line 68, in list_migrations
2020-04-30T20:44:27.4775162Z     migrations = self.repository.find_all(self.app_id)
2020-04-30T20:44:27.4775676Z   File "/home/vsts/work/r1/a/Drop/sources/commons/data_access_layer/cosmos_db.py", line 171, in find_all
2020-04-30T20:44:27.4776214Z     partition_key_value = self.find_partition_key_value(event_context)
2020-04-30T20:44:27.4777036Z   File "/home/vsts/work/r1/a/Drop/sources/commons/data_access_layer/cosmos_db.py", line 217, in find_partition_key_value
2020-04-30T20:44:27.4777598Z     return getattr(event_context, self.partition_key_attribute)
2020-04-30T20:44:27.4778289Z AttributeError: 'str' object has no attribute 'app_id'

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions