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

BGDIDIC-124: update table field names #4404

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

faselm
Copy link
Contributor

@faselm faselm commented Jun 27, 2024

No description provided.

@github-actions github-actions bot added this to the 2024-07-03 milestone Jun 27, 2024
@faselm faselm requested review from marionb, rebert and ltclm June 27, 2024 06:22
Copy link
Contributor

@ltclm ltclm left a comment

Choose a reason for hiding this comment

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

thank you!
you could create a unique index in the matviews for the column bfs_nummer

CREATE UNIQUE INDEX fn_112_tooltip_bfs_nummer
    ON bakom.fn_112_tooltip USING btree
    (bfs_nummer COLLATE pg_catalog."default")
    TABLESPACE pg_default;

@faselm faselm merged commit ec7d5fc into develop-2024-07-03 Jun 27, 2024
9 checks passed
@faselm faselm deleted the feat-BGDIDIC-124-notruf branch June 27, 2024 06:55
@faselm
Copy link
Contributor Author

faselm commented Jun 27, 2024

It seems this merge make the test fail on chsdi although the tests were OK here in the pr

@ltclm
Copy link
Contributor

ltclm commented Jun 27, 2024

probably a temporary issue, maybe related to a database or table deploy:

GET,HEAD,OPTIONS'
chsdi: DEBUG: debug_authorization of url http://localhost/rest/services/api/MapServer/ch.bav.sachplan-infrastruktur-schiene_kraft (view name '' against context <pyramid.traversal.DefaultRootFactory object at 0x7fec3b5c19a0>): Allowed (no security policy in use)
exc_logger: ERROR: 'http://localhost/rest/services/api/MapServer/ch.bav.sachplan-infrastruktur-schiene_kraft'
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/mf-chsdi3-aGRaTEVa/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1905, in _execute_context
    self.dialect.do_execute(
  File "/root/.local/share/virtualenvs/mf-chsdi3-aGRaTEVa/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
    cursor.execute(statement, parameters)
psycopg2.OperationalError: SSL connection has been closed unexpectedly


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

Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/mf-chsdi3-aGRaTEVa/lib/python3.9/site-packages/pyramid_exclog/__init__.py", line 157, in exclog_tween
    response = handler(request)
  File "/root/.local/share/virtualenvs/mf-chsdi3-aGRaTEVa/lib/python3.9/site-packages/pyramid/tweens.py", line 43, in excview_tween
    response = _error_handler(request, exc)
  File "/root/.local/share/virtualenvs/mf-chsdi3-aGRaTEVa/lib/python3.9/site-packages/pyramid/tweens.py", line 17, in _error_handler
    reraise(*exc_info)
  File "/root/.local/share/virtualenvs/mf-chsdi3-aGRaTEVa/lib/python3.9/site-packages/pyramid/util.py", line 733, in reraise
    raise value
  File "/root/.local/share/virtualenvs/mf-chsdi3-aGRaTEVa/lib/python3.9/site-packages/pyramid/tweens.py", line 41, in excview_tween
    response = handler(request)
  File "/root/.local/share/virtualenvs/mf-chsdi3-aGRaTEVa/lib/python3.9/site-packages/pyramid/router.py", line 143, in handle_request
    response = _call_view(
  File "/root/.local/share/virtualenvs/mf-chsdi3-aGRaTEVa/lib/python3.9/site-packages/pyramid/view.py", line 674, in _call_view
    response = view_callable(context, request)
  File "/root/.local/share/virtualenvs/mf-chsdi3-aGRaTEVa/lib/python3.9/site-packages/pyramid/viewderivers.py", line 375, in authdebug_view
    return view(context, request)
  File "/codebuild/output/src4157/src/github.com/geoadmin/mf-chsdi3/chsdi/__init__.py", line 62, in wrapper_view
    return view(context, request)
  File "/root/.local/share/virtualenvs/mf-chsdi3-aGRaTEVa/lib/python3.9/site-packages/pyramid/viewderivers.py", line 427, in rendered_view
    result = view(context, request)
  File "/root/.local/share/virtualenvs/mf-chsdi3-aGRaTEVa/lib/python3.9/site-packages/pyramid/viewderivers.py", line 141, in _requestonly_view
    response = view(request)
  File "/codebuild/output/src4157/src/github.com/geoadmin/mf-chsdi3/chsdi/views/layers.py", line 128, in feature_attributes
    for rowIndex, row in enumerate(query):
  File "/root/.local/share/virtualenvs/mf-chsdi3-aGRaTEVa/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 2901, in __iter__
    result = self._iter()
  File "/root/.local/share/virtualenvs/mf-chsdi3-aGRaTEVa/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 2916, in _iter
    result = self.session.execute(
  File "/root/.local/share/virtualenvs/mf-chsdi3-aGRaTEVa/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1717, in execute
    result = conn._execute_20(statement, params or {}, execution_options)
  File "/root/.local/share/virtualenvs/mf-chsdi3-aGRaTEVa/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1710, in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
  File "/root/.local/share/virtualenvs/mf-chsdi3-aGRaTEVa/lib/python3.9/site-packages/sqlalchemy/sql/elements.py", line 334, in _execute_on_connection
    return connection._execute_clauseelement(
  File "/root/.local/share/virtualenvs/mf-chsdi3-aGRaTEVa/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1577, in _execute_clauseelement
    ret = self._execute_context(
  File "/root/.local/share/virtualenvs/mf-chsdi3-aGRaTEVa/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1948, in _execute_context
    self._handle_dbapi_exception(
  File "/root/.local/share/virtualenvs/mf-chsdi3-aGRaTEVa/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 2129, in _handle_dbapi_exception
    util.raise_(
  File "/root/.local/share/virtualenvs/mf-chsdi3-aGRaTEVa/lib/python3.9/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
    raise exception
  File "/root/.local/share/virtualenvs/mf-chsdi3-aGRaTEVa/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1905, in _execute_context
    self.dialect.do_execute(
  File "/root/.local/share/virtualenvs/mf-chsdi3-aGRaTEVa/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) SSL connection has been closed unexpectedly

im running the tests again

@faselm
Copy link
Contributor Author

faselm commented Jun 27, 2024

It works, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants