Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

committing materialized view to a fresh branch off of dev. #2143

Merged
merged 3 commits into from
Jan 24, 2023

Conversation

sgoggins
Copy link
Member

@sgoggins sgoggins commented Jan 24, 2023

Refreshing materialized views, ensuring all needed are present and correct.

Traceback (most recent call last):
  File "/home/sean/github/virtualenv/ag3/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
    self.dialect.do_execute(
  File "/home/sean/github/virtualenv/ag3/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
    cursor.execute(statement, parameters)
psycopg2.errors.UndefinedTable: relation "augur_data.explorer_commits_and_committers_daily_count" does not exist

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/sean/github/virtualenv/ag3/lib/python3.8/site-packages/celery/app/trace.py", line 451, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/home/sean/github/virtualenv/ag3/lib/python3.8/site-packages/celery/app/trace.py", line 734, in __protected_call__
    return self.run(*args, **kwargs)
  File "/home/sean/github/ag3/augur/tasks/db/refresh_materialized_views.py", line 30, in refresh_materialized_views
    session.execute_sql(refresh_view_query)
  File "/home/sean/github/ag3/augur/application/db/session.py", line 87, in execute_sql
    return_data = connection.execute(sql_text)
  File "/home/sean/github/virtualenv/ag3/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1011, in execute
    return meth(self, multiparams, params)
  File "/home/sean/github/virtualenv/ag3/lib/python3.8/site-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/home/sean/github/virtualenv/ag3/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1124, in _execute_clauseelement
    ret = self._execute_context(
  File "/home/sean/github/virtualenv/ag3/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1316, in _execute_context
    self._handle_dbapi_exception(
  File "/home/sean/github/virtualenv/ag3/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1510, in _handle_dbapi_exception
    util.raise_(
  File "/home/sean/github/virtualenv/ag3/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
    raise exception
  File "/home/sean/github/virtualenv/ag3/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
    self.dialect.do_execute(
  File "/home/sean/github/virtualenv/ag3/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation "augur_data.explorer_commits_and_committers_daily_count" does not exist

[SQL:
                REFRESH MATERIALIZED VIEW augur_data.api_get_all_repos_issues with data;
                REFRESH MATERIALIZED VIEW augur_data.explorer_commits_and_committers_daily_count with data;
                REFRESH MATERIALIZED VIEW augur_data.api_get_all_repos_commits with data;
                REFRESH MATERIALIZED VIEW augur_data.augur_new_contributors with data;
                REFRESH MATERIALIZED VIEW augur_data.explorer_contributor_actions with data;
                REFRESH MATERIALIZED VIEW augur_data.explorer_libyear_all with data;
                REFRESH MATERIALIZED VIEW augur_data.explorer_libyear_detail with data;
                REFRESH MATERIALIZED VIEW augur_data.explorer_new_contributors with data;
                REFRESH MATERIALIZED VIEW augur_data.explorer_libyear_summary with data;
    ]

@sgoggins
Copy link
Member Author

Fixing this error:

Traceback (most recent call last):
  File "/home/sean/github/virtualenv/ag3/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
    self.dialect.do_execute(
  File "/home/sean/github/virtualenv/ag3/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
    cursor.execute(statement, parameters)
psycopg2.errors.UndefinedTable: relation "augur_data.explorer_commits_and_committers_daily_count" does not exist

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/sean/github/virtualenv/ag3/lib/python3.8/site-packages/celery/app/trace.py", line 451, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/home/sean/github/virtualenv/ag3/lib/python3.8/site-packages/celery/app/trace.py", line 734, in __protected_call__
    return self.run(*args, **kwargs)
  File "/home/sean/github/ag3/augur/tasks/db/refresh_materialized_views.py", line 30, in refresh_materialized_views
    session.execute_sql(refresh_view_query)
  File "/home/sean/github/ag3/augur/application/db/session.py", line 87, in execute_sql
    return_data = connection.execute(sql_text)
  File "/home/sean/github/virtualenv/ag3/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1011, in execute
    return meth(self, multiparams, params)
  File "/home/sean/github/virtualenv/ag3/lib/python3.8/site-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/home/sean/github/virtualenv/ag3/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1124, in _execute_clauseelement
    ret = self._execute_context(
  File "/home/sean/github/virtualenv/ag3/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1316, in _execute_context
    self._handle_dbapi_exception(
  File "/home/sean/github/virtualenv/ag3/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1510, in _handle_dbapi_exception
    util.raise_(
  File "/home/sean/github/virtualenv/ag3/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
    raise exception
  File "/home/sean/github/virtualenv/ag3/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
    self.dialect.do_execute(
  File "/home/sean/github/virtualenv/ag3/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation "augur_data.explorer_commits_and_committers_daily_count" does not exist

[SQL:
                REFRESH MATERIALIZED VIEW augur_data.api_get_all_repos_issues with data;
                REFRESH MATERIALIZED VIEW augur_data.explorer_commits_and_committers_daily_count with data;
                REFRESH MATERIALIZED VIEW augur_data.api_get_all_repos_commits with data;
                REFRESH MATERIALIZED VIEW augur_data.augur_new_contributors with data;
                REFRESH MATERIALIZED VIEW augur_data.explorer_contributor_actions with data;
                REFRESH MATERIALIZED VIEW augur_data.explorer_libyear_all with data;
                REFRESH MATERIALIZED VIEW augur_data.explorer_libyear_detail with data;
                REFRESH MATERIALIZED VIEW augur_data.explorer_new_contributors with data;
                REFRESH MATERIALIZED VIEW augur_data.explorer_libyear_summary with data;
    ]

@sgoggins sgoggins requested review from ABrain7710 and removed request for IsaacMilarky January 24, 2023 16:16
@sgoggins sgoggins added database Related to Augur's unifed data model release Related to releasing a new version of Augur bug-fix Fixes a bug labels Jan 24, 2023
@sgoggins sgoggins merged commit 6058080 into dev Jan 24, 2023
@sgoggins sgoggins deleted the augur-new-schema-mat-view-patch4 branch March 13, 2023 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix Fixes a bug database Related to Augur's unifed data model release Related to releasing a new version of Augur
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants