EclipseFdn / open-vsx.org

Source of open-vsx.org
https://open-vsx.org/
Eclipse Public License 2.0
142 stars 41 forks source link

Error Loading Extension Page because of removed versions #816

Closed brianking closed 2 years ago

brianking commented 2 years ago

In #814 I removed a few versions of matklad.rust-analyzer, including the latest. When removing I received an "Internal server error". However it seems to have impacted the listing because when I load the extension page now at https://open-vsx.org/extension/matklad/rust-analyzer I get the following error.

Screenshot 2022-01-07 at 12 43 56
brianking commented 2 years ago

Yes 0.2.880 was one of the ones removed. Interestingly not the latest, 0.2.890 was the latest and removed.

amvanbaren commented 2 years ago

@mbarbero Are there any errors or exceptions in the logs relating to the extension removal?

mbarbero commented 2 years ago

@mbarbero Are there any errors or exceptions in the logs relating to the extension removal?

when has it been done?

amvanbaren commented 2 years ago

@mbarbero around 13:30 today. @brianking correct me if I'm wrong.

amvanbaren commented 2 years ago

It looks like version 0.2.880 failed to remove. It is still accessible through the API, but the files are no longer in Azure Blob Storage. Versions 0.2.890 and 0.2.867 were successfully removed.

mbarbero commented 2 years ago

I see (datetime are in UTC)

2022-01-07 12:38:50.820  WARN 1 --- [.0-8080-exec-76] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 0, SQLState: 23503
2022-01-07 12:38:50.820 ERROR 1 --- [.0-8080-exec-76] o.h.engine.jdbc.spi.SqlExceptionHelper   : ERROR: insert or update on table "extension" violates foreign key constraint "extension_preview_fkey"
  Detail: Key (preview_id)=(1980011) is not present in table "extension_version".
2022-01-07 12:38:50.862 ERROR 1 --- [.0-8080-exec-76] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nes
ted exception is org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [extension_preview_fkey]; nested exception is org.hibernate.exception.ConstraintViolationExce
ption: could not execute statement] with root cause

org.postgresql.util.PSQLException: ERROR: insert or update on table "extension" violates foreign key constraint "extension_preview_fkey"
  Detail: Key (preview_id)=(1980011) is not present in table "extension_version".
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2553) ~[postgresql-42.2.18.jar:42.2.18]
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2285) ~[postgresql-42.2.18.jar:42.2.18]
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:323) ~[postgresql-42.2.18.jar:42.2.18]
        at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:473) ~[postgresql-42.2.18.jar:42.2.18]
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:393) ~[postgresql-42.2.18.jar:42.2.18]
        at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:164) ~[postgresql-42.2.18.jar:42.2.18]
        at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:130) ~[postgresql-42.2.18.jar:42.2.18]
        at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61) ~[HikariCP-3.4.5.jar:na]
        at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java) ~[HikariCP-3.4.5.jar:na]
        at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:197) ~[hibernate-core-5.4.23.Final.jar:5.4.23.Final]
        at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3449) ~[hibernate-core-5.4.23.Final.jar:5.4.23.Final]
        at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:3311) ~[hibernate-core-5.4.23.Final.jar:5.4.23.Final]
        at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3725) ~[hibernate-core-5.4.23.Final.jar:5.4.23.Final]
        at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:201) ~[hibernate-core-5.4.23.Final.jar:5.4.23.Final]
        at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:604) ~[hibernate-core-5.4.23.Final.jar:5.4.23.Final]
        at org.hibernate.engine.spi.ActionQueue.lambda$executeActions$1(ActionQueue.java:478) ~[hibernate-core-5.4.23.Final.jar:5.4.23.Final]
        at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:684) ~[na:na]
        at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:475) ~[hibernate-core-5.4.23.Final.jar:5.4.23.Final]
        at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:348) ~[hibernate-core-5.4.23.Final.jar:5.4.23.Final]
        at org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:57) ~[hibernate-core-5.4.23.Final.jar:5.4.23.Final]
        at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:102) ~[hibernate-core-5.4.23.Final.jar:5.4.23.Final]
        at org.hibernate.internal.SessionImpl.autoFlushIfRequired(SessionImpl.java:1327) ~[hibernate-core-5.4.23.Final.jar:5.4.23.Final]
        at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1407) ~[hibernate-core-5.4.23.Final.jar:5.4.23.Final]
        at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1565) ~[hibernate-core-5.4.23.Final.jar:5.4.23.Final]
        at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1533) ~[hibernate-core-5.4.23.Final.jar:5.4.23.Final]
        at org.hibernate.query.internal.AbstractProducedQuery.getSingleResult(AbstractProducedQuery.java:1581) ~[hibernate-core-5.4.23.Final.jar:5.4.23.Final]
        at org.springframework.data.jpa.repository.query.JpaQueryExecution$SingleEntityExecution.doExecute(JpaQueryExecution.java:196) ~[spring-data-jpa-2.4.1.jar:2.4.1]
        at org.springframework.data.jpa.repository.query.JpaQueryExecution.execute(JpaQueryExecution.java:88) ~[spring-data-jpa-2.4.1.jar:2.4.1]
        at org.springframework.data.jpa.repository.query.AbstractJpaQuery.doExecute(AbstractJpaQuery.java:155) ~[spring-data-jpa-2.4.1.jar:2.4.1]
        at org.springframework.data.jpa.repository.query.AbstractJpaQuery.execute(AbstractJpaQuery.java:143) ~[spring-data-jpa-2.4.1.jar:2.4.1]
        at org.springframework.data.repository.core.support.RepositoryMethodInvoker.doInvoke(RepositoryMethodInvoker.java:137) ~[spring-data-commons-2.4.1.jar:2.4.1]
        at org.springframework.data.repository.core.support.RepositoryMethodInvoker.invoke(RepositoryMethodInvoker.java:121) ~[spring-data-commons-2.4.1.jar:2.4.1]
        at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.doInvoke(QueryExecutorMethodInterceptor.java:152) ~[spring-data-commons-2.4.1.jar:2.4.1]
        at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.invoke(QueryExecutorMethodInterceptor.java:131) ~[spring-data-commons-2.4.1.jar:2.4.1]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.1.jar:5.3.1]
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:371) ~[spring-tx-5.3.1.jar:5.3.1]
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:134) ~[spring-tx-5.3.1.jar:5.3.1]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.1.jar:5.3.1]
        at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:137) ~[spring-tx-5.3.1.jar:5.3.1]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.1.jar:5.3.1]
        at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:145) ~[spring-data-jpa-2.4.1.jar:2.4.
1]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.1.jar:5.3.1]
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) ~[spring-aop-5.3.1.jar:5.3.1]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.1.jar:5.3.1]
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215) ~[spring-aop-5.3.1.jar:5.3.1]
        at com.sun.proxy.$Proxy209.getMaxDownloadCount(Unknown Source) ~[na:na]
        at jdk.internal.reflect.GeneratedMethodAccessor182.invoke(Unknown Source) ~[na:na]
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
        at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) ~[spring-aop-5.3.1.jar:5.3.1]
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) ~[spring-aop-5.3.1.jar:5.3.1]
        at com.sun.proxy.$Proxy124.getMaxDownloadCount(Unknown Source) ~[na:na]
        at org.eclipse.openvsx.repositories.RepositoryService.getMaxExtensionDownloadCount(RepositoryService.java:101) ~[classes/:na]
        at org.eclipse.openvsx.search.RelevanceService$SearchStats.<init>(RelevanceService.java:142) ~[classes/:na]
        at org.eclipse.openvsx.search.ElasticSearchService.updateSearchEntry(ElasticSearchService.java:170) ~[classes/:na]
        at org.eclipse.openvsx.search.ElasticSearchService$$FastClassBySpringCGLIB$$305155f0.invoke(<generated>) ~[classes/:na]
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) ~[spring-core-5.3.1.jar:5.3.1]
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:687) ~[spring-aop-5.3.1.jar:5.3.1]
        at org.eclipse.openvsx.search.ElasticSearchService$$EnhancerBySpringCGLIB$$aa04fcb8.updateSearchEntry(<generated>) ~[classes/:na]
        at org.eclipse.openvsx.search.SearchUtilService.updateSearchEntry(SearchUtilService.java:66) ~[classes/:na]
        at org.eclipse.openvsx.ExtensionService.updateExtension(ExtensionService.java:254) ~[classes/:na]
        at org.eclipse.openvsx.ExtensionService$$FastClassBySpringCGLIB$$92cc76a4.invoke(<generated>) ~[classes/:na]
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) ~[spring-core-5.3.1.jar:5.3.1]
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:771) ~[spring-aop-5.3.1.jar:5.3.1]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.3.1.jar:5.3.1]
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749) ~[spring-aop-5.3.1.jar:5.3.1]
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:371) ~[spring-tx-5.3.1.jar:5.3.1]
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:134) ~[spring-tx-5.3.1.jar:5.3.1]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.1.jar:5.3.1]
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749) ~[spring-aop-5.3.1.jar:5.3.1]
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691) ~[spring-aop-5.3.1.jar:5.3.1]
        at org.eclipse.openvsx.ExtensionService$$EnhancerBySpringCGLIB$$f0c66f54.updateExtension(<generated>) ~[classes/:na]
        at org.eclipse.openvsx.AdminService.deleteExtension(AdminService.java:131) ~[classes/:na]
        at org.eclipse.openvsx.AdminService.deleteExtension(AdminService.java:85) ~[classes/:na]
        at org.eclipse.openvsx.AdminService$$FastClassBySpringCGLIB$$45844494.invoke(<generated>) ~[classes/:na]
brianking commented 2 years ago

@amvanbaren Is this resolved?

amvanbaren commented 2 years ago

The fix introduced by PR #396 didn't work on staging. PR #407 does fix the issue (it has been tested on staging).

407 hasn't been approved, but it's safe to merge into master.

brianking commented 2 years ago

The fix introduced by PR #396 didn't work on staging. PR #407 does fix the issue (it has been tested on staging). #407 hasn't been approved, but it's safe to merge into master.

https://github.com/eclipse/openvsx/pull/396 and https://github.com/eclipse/openvsx/pull/407 for the record.