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

CI passes, but with SQL exceptions logged during verify phase #622

Closed
johnaohara opened this issue Aug 15, 2023 · 3 comments
Closed

CI passes, but with SQL exceptions logged during verify phase #622

johnaohara opened this issue Aug 15, 2023 · 3 comments
Labels
branch/master The master branch type/bug Something isn't working

Comments

@johnaohara
Copy link
Member

CI is green, however there are SQL exceptions logged during the Integration tests;

Caused by: org.postgresql.util.PSQLException: ERROR: cannot extract elements from a scalar
  Where: SQL statement "WITH rs AS (
                    SELECT 0 AS type, NULL AS key, NEW.data->>'$schema' AS uri, 0 AS source
                    UNION SELECT 1 AS type, values.key, values.value->>'$schema' AS uri, 0 AS source FROM jsonb_each(NEW.data) as values WHERE jsonb_typeof(NEW.data) = 'object'
                    UNION SELECT 2 AS type, (row_number() OVER () - 1)::text AS key, value->>'$schema' as uri, 0 AS source FROM jsonb_array_elements(NEW.data) WHERE jsonb_typeof(NEW.data) = 'array'
                    UNION SELECT 2 AS type, (row_number() OVER () - 1)::text AS key, value->>'$schema' as uri, 1 AS source FROM jsonb_array_elements(NEW.metadata) WHERE NEW.metadata IS NOT NULL
                ) INSERT INTO run_schemas(runid, testid, source, type, key, uri, schemaid)
                    SELECT NEW.id, NEW.testid, rs.source, rs.type, rs.key, rs.uri, schema.id FROM rs
                    JOIN schema ON schema.uri = rs.uri"
PL/pgSQL function rs_after_run_update() line 3 at SQL statement
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2676)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2366)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:356)
	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:496)
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:413)
	at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:190)
	at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:152)
	at io.agroal.pool.wrapper.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:88)
	at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:197)
	... 64 more
@johnaohara johnaohara added type/bug Something isn't working branch/master The master branch labels Aug 15, 2023
@johnaohara
Copy link
Member Author

@stalep
Copy link
Member

stalep commented Sep 28, 2023

Can not see these exceptions any longer in master, @johnaohara?

@johnaohara
Copy link
Member Author

No, I do not see these errors in the logs any longer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch/master The master branch type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants