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

Unable to import offline runs #2242

Closed
lampajr opened this issue Jan 16, 2025 · 0 comments · Fixed by #2243
Closed

Unable to import offline runs #2242

lampajr opened this issue Jan 16, 2025 · 0 comments · Fixed by #2243
Assignees
Labels
area/backend branch/master The master branch priority/high High priority type/bug Something isn't working

Comments

@lampajr
Copy link
Member

lampajr commented Jan 16, 2025

Describe the bug

Using external datastores to import runs, e.g., using elasticsearch, if the query on the datastores returns more than 10 runs Horreum will fallback to an offline run processing using the upload-run queue.

Unfortunately, uploading those run asynchronously is failing with:

: org.hibernate.exception.SQLGrammarException: could not execute statement [ERROR: new row violates row-level security policy for table "run"] [insert into run (access,data,description,metadata,owner,start,stop,testid,trashed,id) values (?,?,?,?,?,?,?,?,?,?)]
	at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:91)
	at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:58)
	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:108)
	at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:197)
	at org.hibernate.engine.jdbc.mutation.internal.AbstractMutationExecutor.performNonBatchedMutation(AbstractMutationExecutor.java:134)
	at org.hibernate.engine.jdbc.mutation.internal.MutationExecutorSingleNonBatched.performNonBatchedOperations(MutationExecutorSingleNonBatched.java:55)
	at org.hibernate.engine.jdbc.mutation.internal.AbstractMutationExecutor.execute(AbstractMutationExecutor.java:55)
	at org.hibernate.persister.entity.mutation.InsertCoordinatorStandard.doStaticInserts(InsertCoordinatorStandard.java:194)
	at org.hibernate.persister.entity.mutation.InsertCoordinatorStandard.coordinateInsert(InsertCoordinatorStandard.java:132)
	at org.hibernate.persister.entity.mutation.InsertCoordinatorStandard.insert(InsertCoordinatorStandard.java:104)
	at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:110)
	at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:644)
	at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:511)
	at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:414)
	at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:41)
	at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:127)
	at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1429)
	at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1415)
	at io.quarkus.hibernate.orm.runtime.session.TransactionScopedSession.flush(TransactionScopedSession.java:235)
	at org.hibernate.engine.spi.SessionLazyDelegator.flush(SessionLazyDelegator.java:83)
	at org.hibernate.Session_OpdLahisOZ9nWRPXMsEFQmQU03A_Synthetic_ClientProxy.flush(Unknown Source)
	at io.hyperfoil.tools.horreum.svc.RunServiceImpl.addAuthenticated(RunServiceImpl.java:666)

To Reproduce

  1. Configure an external datastore like elasticsearch
  2. Create a test using that datastore
  3. Import run using a query that returns more than 10 records/hits
  4. You will see the above error in the logs

Version

What is the version of Horreum ?

If you are using a development branch; what is the commit id ?

master / 0.17

Additional context

Stream 0.16.x is not affected, the offline upload is working as expected.

@lampajr lampajr added type/bug Something isn't working branch/master The master branch area/backend priority/high High priority labels Jan 16, 2025
@lampajr lampajr self-assigned this Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/backend branch/master The master branch priority/high High priority type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant