Skip to content

Conversation

@rawwar
Copy link
Contributor

@rawwar rawwar commented Oct 23, 2025

Failure happened while downgrading. This PR fixes it:

self.get_context().run_migrations(**kw)
  File "/usr/local/lib/python3.12/site-packages/alembic/runtime/migration.py", line 623, in run_migrations
    step.migration_fn(**kw)
  File "/usr/local/lib/python3.12/site-packages/airflow/migrations/versions/0135_2_9_0_add_run_id_to_audit_log_table_and_change_event_name_length.py", line 65, in downgrade
    with op.batch_alter_table("log") as batch_op:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/contextlib.py", line 144, in __exit__
    next(self.gen)
  File "/usr/local/lib/python3.12/site-packages/alembic/operations/base.py", line 397, in batch_alter_table
    impl.flush()
  File "/usr/local/lib/python3.12/site-packages/alembic/operations/batch.py", line 115, in flush
    fn(*arg, **kw)
  File "/usr/local/lib/python3.12/site-packages/alembic/ddl/postgresql.py", line 188, in alter_column
    super().alter_column(
  File "/usr/local/lib/python3.12/site-packages/alembic/ddl/impl.py", line 280, in alter_column
    self._exec(
  File "/usr/local/lib/python3.12/site-packages/alembic/ddl/impl.py", line 246, in _exec
    return conn.execute(construct, params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/future/engine.py", line 286, in execute
    return self._execute_20(
           ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1710, in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/sql/ddl.py", line 80, in _execute_on_connection
    return connection._execute_ddl(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1477, in _execute_ddl
    ret = self._execute_context(
          ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1953, in _execute_context
    self._handle_dbapi_exception(
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 2134, in _handle_dbapi_exception
    util.raise_(
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
    raise exception
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1910, in _execute_context
    self.dialect.do_execute(
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.IntegrityError: (psycopg2.errors.NotNullViolation) column "event" of relation "log" contains null values

@rawwar rawwar requested a review from potiuk as a code owner October 23, 2025 05:32
Copy link
Contributor

@amoghrajesh amoghrajesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Copy link
Contributor

@vatsrahul1001 vatsrahul1001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do something like this

@rawwar rawwar requested a review from vatsrahul1001 October 23, 2025 08:23
@rawwar
Copy link
Contributor Author

rawwar commented Oct 26, 2025

Failing breeze docs check will be fixed by #51681 .

@rawwar
Copy link
Contributor Author

rawwar commented Oct 28, 2025

merging as failure is unrelated

@rawwar rawwar merged commit 880f298 into apache:v2-11-test Oct 28, 2025
106 of 109 checks passed
@rawwar rawwar deleted the kalyan/migration/fix_d75389605139 branch October 28, 2025 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants