serverless-wsgi
serverless-wsgi copied to clipboard
Command fails, but shows as succeeded
During my pipeline runs, I have noticed that wsgi manage
commands will run, and if the command fails, it still returns that it worked.
This should definitely fail the pipeline so that we're aware that there are issues.
sls wsgi manage --command "migrate -v2" --stage dev
Running "serverless" from node_modules
Warning: Invalid configuration encountered
at root: unrecognized property 'constructs'
Learn more about configuration validation here: http://slss.io/configuration-validation
[
1,
Traceback (most recent call last):
File \/var/task/wsgi_handler.py\, line 85, in handler
management.call_command(*shlex.split(meta.get(\data\, \\)))
File \/tmp/sls-py-req/django/core/management/__init__.py\, line 194, in call_command
return command.execute(*args, **defaults)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File \/tmp/sls-py-req/django/core/management/base.py\, line 458, in execute
output = self.handle(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File \/tmp/sls-py-req/django/core/management/base.py\, line 106, in wrapper
res = handle_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File \/tmp/sls-py-req/django/core/management/commands/migrate.py\, line 356, in handle
post_migrate_state = executor.migrate(
^^^^^^^^^^^^^^^^^
File \/tmp/sls-py-req/django/db/migrations/executor.py\, line 135, in migrate
state = self._migrate_all_forwards(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File \/tmp/sls-py-req/django/db/migrations/executor.py\, line 167, in _migrate_all_forwards
state = self.apply_migration(
^^^^^^^^^^^^^^^^^^^^^
File \/tmp/sls-py-req/django/db/migrations/executor.py\, line 252, in apply_migration
state = migration.apply(state, schema_editor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File \/tmp/sls-py-req/django/db/migrations/migration.py\, line 127, in apply
operation.database_forwards(
File \/tmp/sls-py-req/django/db/migrations/operations/special.py\, line 193, in database_forwards
self.code(from_state.apps, schema_editor)
File \/var/task/api/migrations/0016_populate_asyncjob_inputs.py\, line 10, in update_inputs_for_response_and_prompt
dict(student_response=job.student_response, prompt_text=job.prompt_text)
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'AsyncJob' object has no attribute 'student_response'
]
3 deprecations found: run 'serverless doctor' for more details