nexus-repository-composer
nexus-repository-composer copied to clipboard
Composer packages is't visible via Nexus API
Hi folks,
I've just tried to upgrade Nexus up to 3.38.1 version and faced with some issues during ours acceptance testing. All of our composer packages stop being visible using Nexus API:
curl --fail -X GET --user "composer:password" "https://my.nexus.upgrade/service/rest/v1/search/assets"
Response: { "items" : [ ], "continuationToken" : null }
This user has enough permissions to be able to grab information about packages as well as push packages:
This is related to composer packages only. Other stuff such as python and npm packages are appears as expected.
If you require some more information please ping me here.
Thank you and looking forward for your reply.
I guess https://github.com/sonatype-nexus-community/nexus-repository-composer/commit/8bb9662b36afc79a36972883f25defb85b540fde was incomplete.
Do you also get this error if you try to rebuild the index?
2022-06-24 10:10:32,220+0200 ERROR [quartz-13-thread-14] *SYSTEM org.sonatype.nexus.repository.content.search.SearchFacetImpl - Unable to rebuild search index for repository composer-internal
org.sonatype.nexus.repository.MissingFacetException: No facet of type ContentFacet attached to repository composer-internal
at org.sonatype.nexus.repository.manager.internal.RepositoryImpl.facet(RepositoryImpl.java:322)
at org.sonatype.nexus.repository.content.search.SearchFacetImpl.rebuildComponentIndex(SearchFacetImpl.java:154)
at org.sonatype.nexus.repository.content.search.SearchFacetImpl.rebuildIndex(SearchFacetImpl.java:145)
at org.sonatype.nexus.repository.content.search.SearchFacetImpl$$EnhancerByGuice$$422304341.GUICE$TRAMPOLINE(<generated>)
at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:74)
at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:272)
at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:54)
at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:75)
at com.google.inject.internal.InterceptorStackCallback.invoke(InterceptorStackCallback.java:55)
at org.sonatype.nexus.repository.content.search.SearchFacetImpl$$EnhancerByGuice$$422304341.rebuildIndex(<generated>)
at org.sonatype.nexus.repository.search.index.RebuildIndexTask.execute(RebuildIndexTask.java:33)
at org.sonatype.nexus.repository.RepositoryTaskSupport.execute(RepositoryTaskSupport.java:79)
at org.sonatype.nexus.scheduling.TaskSupport.call(TaskSupport.java:100)
at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.doExecute(QuartzTaskJob.java:143)
at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.execute(QuartzTaskJob.java:106)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.sonatype.nexus.quartz.internal.QuartzThreadPool.lambda$0(QuartzThreadPool.java:145)
at org.sonatype.nexus.thread.internal.MDCAwareRunnable.run(MDCAwareRunnable.java:40)
at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120)
at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2022-06-24 10:10:32,229+0200 INFO [quartz-13-thread-14] *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskInfo - Task 'Repair - Rebuild repository search' [repository.rebuild-index] state change RUNNING -> OK
In our case, we run the following versions:
nexus::version: 3.38.0-01
nexus::plugin_composer_version: '0.0.22'