Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 541BA200C22 for ; Tue, 7 Feb 2017 01:24:20 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 50F2E160B62; Tue, 7 Feb 2017 00:24:20 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 99403160B56 for ; Tue, 7 Feb 2017 01:24:19 +0100 (CET) Received: (qmail 65874 invoked by uid 500); 7 Feb 2017 00:24:18 -0000 Mailing-List: contact dev-help@airflow.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airflow.incubator.apache.org Delivered-To: mailing list dev@airflow.incubator.apache.org Received: (qmail 65863 invoked by uid 99); 7 Feb 2017 00:24:18 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2017 00:24:18 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 4A14D1A041E for ; Tue, 7 Feb 2017 00:24:18 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.518 X-Spam-Level: X-Spam-Status: No, score=-4.518 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, RP_MATCHES_RCVD=-2.999, WEIRD_PORT=0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id iHQcWmtc4QQc for ; Tue, 7 Feb 2017 00:24:16 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with SMTP id E5D665F5C7 for ; Tue, 7 Feb 2017 00:24:15 +0000 (UTC) Received: (qmail 65836 invoked by uid 99); 7 Feb 2017 00:24:15 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2017 00:24:15 +0000 Received: from mail-qk0-f180.google.com (mail-qk0-f180.google.com [209.85.220.180]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 2AD3A1A002B for ; Tue, 7 Feb 2017 00:24:15 +0000 (UTC) Received: by mail-qk0-f180.google.com with SMTP id s186so72886019qkb.1 for ; Mon, 06 Feb 2017 16:24:15 -0800 (PST) X-Gm-Message-State: AMke39mqmLPHV+CY/B+3fnYqRIasfctnDivmYFoGh+aMuVs8BBQbwulf6Wy7tr3GlvHV0ICf9JXxuoYOTCBP/A== X-Received: by 10.55.38.4 with SMTP id y4mr11109472qkg.14.1486427054337; Mon, 06 Feb 2017 16:24:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.237.47.225 with HTTP; Mon, 6 Feb 2017 16:24:13 -0800 (PST) In-Reply-To: References: <1BA62FD0-851A-43BB-965E-87B680E247B6@gmail.com> From: siddharth anand Date: Mon, 6 Feb 2017 16:24:13 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Airflow 1.8.0 Release Candidate 1 To: dev@airflow.incubator.apache.org Content-Type: multipart/alternative; boundary=001a114494948efcf90547e5c455 archived-at: Tue, 07 Feb 2017 00:24:20 -0000 --001a114494948efcf90547e5c455 Content-Type: text/plain; charset=UTF-8 Actually, I see the error is further down.. File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 469, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.IntegrityError: (psycopg2.IntegrityError) null value in column "dag_id" violates not-null constraint DETAIL: Failing row contains (null, running, 1, f). [SQL: 'INSERT INTO dag_stats (state, count, dirty) VALUES (%(state)s, %(count)s, %(dirty)s)'] [parameters: {'count': 1L, 'state': u'running', 'dirty': False}] It looks like an autoincrement is missing for this table. I'm running `SQLAlchemy==1.1.4` - I see our setup.py specifies any version greater than 0.9.8 -s On Mon, Feb 6, 2017 at 4:11 PM, siddharth anand wrote: > I tried upgrading to 1.8.0rc1 from 1.7.1.3 via pip install > https://dist.apache.org/repos/dist/dev/incubator/airflow/ > airflow-1.8.0rc1+apache.incubating.tar.gz and then running airflow > upgradedb didn't quite work. First, I thought it completed successfully, > then saw errors some tables were indeed missing. I ran it again and > encountered the following exception : > > DB: postgresql://app_cousteau@db-cousteau.ep.stage.agari.com:5432/airflow > > [2017-02-07 00:03:20,309] {db.py:284} INFO - Creating tables > > INFO [alembic.runtime.migration] Context impl PostgresqlImpl. > > INFO [alembic.runtime.migration] Will assume transactional DDL. > > INFO [alembic.runtime.migration] Running upgrade 2e82aab8ef20 -> > 211e584da130, add TI state index > > INFO [alembic.runtime.migration] Running upgrade 211e584da130 -> > 64de9cddf6c9, add task fails journal table > > INFO [alembic.runtime.migration] Running upgrade 64de9cddf6c9 -> > f2ca10b85618, add dag_stats table > > INFO [alembic.runtime.migration] Running upgrade f2ca10b85618 -> > 4addfa1236f1, Add fractional seconds to mysql tables > > INFO [alembic.runtime.migration] Running upgrade 4addfa1236f1 -> > 8504051e801b, xcom dag task indices > > INFO [alembic.runtime.migration] Running upgrade 8504051e801b -> > 5e7d17757c7a, add pid field to TaskInstance > > INFO [alembic.runtime.migration] Running upgrade 5e7d17757c7a -> > 127d2bf2dfa7, Add dag_id/state index on dag_run table > > /usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/crud.py:692: > SAWarning: Column 'dag_stats.dag_id' is marked as a member of the primary > key for table 'dag_stats', but has no Python-side or server-side default > generator indicated, nor does it indicate 'autoincrement=True' or > 'nullable=True', and no explicit value is passed. Primary key columns > typically may not store NULL. Note that as of SQLAlchemy 1.1, > 'autoincrement=True' must be indicated explicitly for composite (e.g. > multicolumn) primary keys if AUTO_INCREMENT/SERIAL/IDENTITY behavior is > expected for one of the columns in the primary key. CREATE TABLE statements > are impacted by this change as well on most backends. > --001a114494948efcf90547e5c455--