TARGET_PACKAGE_SHA256=c7505d82aea544ac432136efcd701dd56fa131569a070fb82aeb038d2b955ec3 P29C_TARGET_SOURCE_SYNTAX=PASS Container wgaccess-backend Stopping Container wgaccess-backend Stopped Container wg-access-backend-run-2ec933c8a1e1 Creating Container wg-access-backend-run-2ec933c8a1e1 Created Collecting fastapi Downloading fastapi-0.141.1-py3-none-any.whl.metadata (27 kB) Collecting uvicorn Downloading uvicorn-0.53.0-py3-none-any.whl.metadata (6.6 kB) Collecting sqlalchemy Downloading sqlalchemy-2.0.54-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.metadata (9.7 kB) Collecting alembic Downloading alembic-1.20.0-py3-none-any.whl.metadata (7.3 kB) Collecting pydantic-settings Downloading pydantic_settings-2.15.0-py3-none-any.whl.metadata (3.9 kB) Collecting email-validator Downloading email_validator-2.3.0-py3-none-any.whl.metadata (26 kB) Collecting cryptography Downloading cryptography-50.0.1-cp311-abi3-manylinux_2_34_x86_64.whl.metadata (4.3 kB) Collecting qrcode Downloading qrcode-8.2-py3-none-any.whl.metadata (17 kB) Collecting psycopg[binary] Downloading psycopg-3.3.5-py3-none-any.whl.metadata (4.3 kB) Collecting starlette>=0.46.0 (from fastapi) Downloading starlette-1.6.0-py3-none-any.whl.metadata (6.4 kB) Collecting pydantic>=2.9.0 (from fastapi) Downloading pydantic-2.13.5-py3-none-any.whl.metadata (110 kB) Collecting typing-extensions>=4.8.0 (from fastapi) Downloading typing_extensions-4.16.0-py3-none-any.whl.metadata (3.3 kB) Collecting typing-inspection>=0.4.2 (from fastapi) Downloading typing_inspection-0.4.4-py3-none-any.whl.metadata (2.6 kB) Collecting annotated-doc>=0.0.2 (from fastapi) Downloading annotated_doc-0.0.5-py3-none-any.whl.metadata (6.5 kB) Collecting click>=7.0 (from uvicorn) Downloading click-8.5.0-py3-none-any.whl.metadata (2.6 kB) Collecting h11>=0.8 (from uvicorn) Downloading h11-0.16.0-py3-none-any.whl.metadata (8.3 kB) Collecting psycopg-binary==3.3.5 (from psycopg[binary]) Downloading psycopg_binary-3.3.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (2.7 kB) Collecting greenlet>=1 (from sqlalchemy) Downloading greenlet-3.5.6-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.metadata (3.8 kB) Collecting Mako (from alembic) Downloading mako-1.4.1-py3-none-any.whl.metadata (2.9 kB) Collecting python-dotenv>=0.21.0 (from pydantic-settings) Downloading python_dotenv-1.2.3-py3-none-any.whl.metadata (29 kB) Collecting dnspython>=2.0.0 (from email-validator) Downloading dnspython-2.8.0-py3-none-any.whl.metadata (5.7 kB) Collecting idna>=2.0.0 (from email-validator) Downloading idna-3.20-py3-none-any.whl.metadata (7.2 kB) Collecting cffi>=2.0.0 (from cryptography) Downloading cffi-2.1.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (2.5 kB) Collecting pycparser (from cffi>=2.0.0->cryptography) Downloading pycparser-3.0-py3-none-any.whl.metadata (8.2 kB) Collecting annotated-types>=0.6.0 (from pydantic>=2.9.0->fastapi) Downloading annotated_types-0.8.0-py3-none-any.whl.metadata (15 kB) Collecting pydantic-core==2.46.5 (from pydantic>=2.9.0->fastapi) Downloading pydantic_core-2.46.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.6 kB) Collecting anyio<5,>=3.6.2 (from starlette>=0.46.0->fastapi) Downloading anyio-4.15.1-py3-none-any.whl.metadata (4.7 kB) Collecting MarkupSafe>=2.0 (from Mako->alembic) Downloading markupsafe-3.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.metadata (2.7 kB) Downloading fastapi-0.141.1-py3-none-any.whl (131 kB) Downloading uvicorn-0.53.0-py3-none-any.whl (87 kB) Downloading psycopg_binary-3.3.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (5.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.2/5.2 MB 2.8 MB/s eta 0:00:00 Downloading sqlalchemy-2.0.54-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (3.5 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.5/3.5 MB 8.3 MB/s eta 0:00:00 Downloading alembic-1.20.0-py3-none-any.whl (268 kB) Downloading pydantic_settings-2.15.0-py3-none-any.whl (69 kB) Downloading email_validator-2.3.0-py3-none-any.whl (35 kB) Downloading cryptography-50.0.1-cp311-abi3-manylinux_2_34_x86_64.whl (4.7 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.7/4.7 MB 12.6 MB/s eta 0:00:00 Downloading qrcode-8.2-py3-none-any.whl (45 kB) Downloading annotated_doc-0.0.5-py3-none-any.whl (5.3 kB) Downloading cffi-2.1.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (221 kB) Downloading click-8.5.0-py3-none-any.whl (125 kB) Downloading dnspython-2.8.0-py3-none-any.whl (331 kB) Downloading greenlet-3.5.6-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (621 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 621.4/621.4 kB 15.8 MB/s eta 0:00:00 Downloading h11-0.16.0-py3-none-any.whl (37 kB) Downloading idna-3.20-py3-none-any.whl (69 kB) Downloading pydantic-2.13.5-py3-none-any.whl (472 kB) Downloading pydantic_core-2.46.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 14.4 MB/s eta 0:00:00 Downloading python_dotenv-1.2.3-py3-none-any.whl (22 kB) Downloading starlette-1.6.0-py3-none-any.whl (75 kB) Downloading typing_extensions-4.16.0-py3-none-any.whl (45 kB) Downloading typing_inspection-0.4.4-py3-none-any.whl (14 kB) Downloading mako-1.4.1-py3-none-any.whl (80 kB) Downloading psycopg-3.3.5-py3-none-any.whl (213 kB) Downloading annotated_types-0.8.0-py3-none-any.whl (13 kB) Downloading anyio-4.15.1-py3-none-any.whl (132 kB) Downloading markupsafe-3.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (22 kB) Downloading pycparser-3.0-py3-none-any.whl (48 kB) Installing collected packages: typing-extensions, qrcode, python-dotenv, pycparser, psycopg-binary, MarkupSafe, idna, h11, greenlet, dnspython, click, annotated-types, annotated-doc, uvicorn, typing-inspection, sqlalchemy, pydantic-core, psycopg, Mako, email-validator, cffi, anyio, starlette, pydantic, cryptography, alembic, pydantic-settings, fastapi Successfully installed Mako-1.4.1 MarkupSafe-3.0.3 alembic-1.20.0 annotated-doc-0.0.5 annotated-types-0.8.0 anyio-4.15.1 cffi-2.1.1 click-8.5.0 cryptography-50.0.1 dnspython-2.8.0 email-validator-2.3.0 fastapi-0.141.1 greenlet-3.5.6 h11-0.16.0 idna-3.20 psycopg-3.3.5 psycopg-binary-3.3.5 pycparser-3.0 pydantic-2.13.5 pydantic-core-2.46.5 pydantic-settings-2.15.0 python-dotenv-1.2.3 qrcode-8.2 sqlalchemy-2.0.54 starlette-1.6.0 typing-extensions-4.16.0 typing-inspection-0.4.4 uvicorn-0.53.0 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning. [notice] A new release of pip is available: 25.0.1 -> 26.2.1 [notice] To update, run: pip install --upgrade pip INFO [alembic.runtime.migration] Context impl PostgresqlImpl. INFO [alembic.runtime.migration] Will assume transactional DDL. INFO [alembic.runtime.migration] Running upgrade 0010_connection_slots -> 0011_commercial_trial_referrals, Commercial offer/account/payment foundation and referral-trial seed. Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1969, in _exec_single_context self.dialect.do_execute( File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 952, in do_execute cursor.execute(statement, parameters) File "/usr/local/lib/python3.12/site-packages/psycopg/cursor.py", line 117, in execute raise ex.with_traceback(None) psycopg.errors.InvalidForeignKey: there is no unique constraint matching given keys for referenced table "plans" The above exception was the direct cause of the following exception: Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/local/lib/python3.12/site-packages/alembic/__main__.py", line 4, in main(prog="alembic") File "/usr/local/lib/python3.12/site-packages/alembic/config.py", line 1039, in main CommandLine(prog=prog).main(argv=argv) File "/usr/local/lib/python3.12/site-packages/alembic/config.py", line 1029, in main self.run_cmd(cfg, options) File "/usr/local/lib/python3.12/site-packages/alembic/config.py", line 963, in run_cmd fn( File "/usr/local/lib/python3.12/site-packages/alembic/command.py", line 487, in upgrade script.run_env() File "/usr/local/lib/python3.12/site-packages/alembic/script/base.py", line 550, in run_env util.load_python_file(self.dir, "env.py") File "/usr/local/lib/python3.12/site-packages/alembic/util/pyfiles.py", line 114, in load_python_file module = load_module_py(module_id, path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/alembic/util/pyfiles.py", line 132, in load_module_py spec.loader.exec_module(module) # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 999, in exec_module File "", line 488, in _call_with_frames_removed File "/app/alembic/env.py", line 58, in run_migrations_online() File "/app/alembic/env.py", line 52, in run_migrations_online context.run_migrations() File "", line 8, in run_migrations File "/usr/local/lib/python3.12/site-packages/alembic/runtime/environment.py", line 970, in run_migrations self.get_context().run_migrations(**kw) File "/usr/local/lib/python3.12/site-packages/alembic/runtime/migration.py", line 616, in run_migrations step.migration_fn(**kw) File "/app/alembic/versions/0011_commercial_trial_referrals.py", line 28, in upgrade op.create_table( File "", line 8, in create_table File "", line 3, in create_table File "/usr/local/lib/python3.12/site-packages/alembic/operations/ops.py", line 1323, in create_table return operations.invoke(op) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/alembic/operations/base.py", line 448, in invoke return fn(self, operation) ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/alembic/operations/toimpl.py", line 139, in create_table operations.impl.create_table(table, **kw) File "/usr/local/lib/python3.12/site-packages/alembic/ddl/impl.py", line 434, in create_table self._exec(schema.CreateTable(table, **kw)) File "/usr/local/lib/python3.12/site-packages/alembic/ddl/impl.py", line 252, in _exec return conn.execute(construct, params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1421, in execute return meth( ^^^^^ File "/usr/local/lib/python3.12/site-packages/sqlalchemy/sql/ddl.py", line 188, in _execute_on_connection return connection._execute_ddl( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1532, in _execute_ddl ret = self._execute_context( ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1848, in _execute_context return self._exec_single_context( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1988, in _exec_single_context self._handle_dbapi_exception( File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 2365, in _handle_dbapi_exception raise sqlalchemy_exception.with_traceback(exc_info[2]) from e File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1969, in _exec_single_context self.dialect.do_execute( File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 952, in do_execute cursor.execute(statement, parameters) File "/usr/local/lib/python3.12/site-packages/psycopg/cursor.py", line 117, in execute raise ex.with_traceback(None) sqlalchemy.exc.ProgrammingError: (psycopg.errors.InvalidForeignKey) there is no unique constraint matching given keys for referenced table "plans" [SQL: CREATE TABLE public.billing_offers ( id UUID NOT NULL, code VARCHAR(64) NOT NULL, active BOOLEAN DEFAULT true NOT NULL, currency VARCHAR(3) DEFAULT 'RUB' NOT NULL, base_slot_quantity INTEGER DEFAULT 1 NOT NULL, base_monthly_kopeks INTEGER NOT NULL, extra_slot_monthly_kopeks INTEGER NOT NULL, trial_days INTEGER DEFAULT 7 NOT NULL, max_slot_quantity INTEGER DEFAULT 3 NOT NULL, active_referral_invite_limit INTEGER DEFAULT 3 NOT NULL, plan_id UUID NOT NULL, created_at TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL, PRIMARY KEY (id), CONSTRAINT billing_offers_currency_rub CHECK (currency = 'RUB'), CONSTRAINT billing_offers_base_slot_quantity_positive CHECK (base_slot_quantity >= 1), CONSTRAINT billing_offers_base_monthly_kopeks_nonnegative CHECK (base_monthly_kopeks >= 0), CONSTRAINT billing_offers_extra_slot_monthly_kopeks_nonnegative CHECK (extra_slot_monthly_kopeks >= 0), CONSTRAINT billing_offers_trial_days_positive CHECK (trial_days >= 1), CONSTRAINT billing_offers_max_slot_quantity_valid CHECK (max_slot_quantity >= base_slot_quantity), CONSTRAINT billing_offers_referral_limit_nonnegative CHECK (active_referral_invite_limit >= 0), CONSTRAINT uq_billing_offers_code UNIQUE (code), CONSTRAINT uq_billing_offers_plan_id UNIQUE (plan_id), FOREIGN KEY(plan_id) REFERENCES public.plans (id) ) ] (Background on this error at: https://sqlalche.me/e/20/f405)