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

Implemented RpmMetadata.Append #405

Merged

Conversation

olenagerasimova
Copy link
Member

Part of #388
Implemented RpmMetadata.Append and added test.

@olenagerasimova olenagerasimova requested review from a team and genryxy and removed request for a team May 20, 2021 09:23
@codecov
Copy link

codecov bot commented May 20, 2021

Codecov Report

Merging #405 (67c2f9e) into master (18718e8) will increase coverage by 0.10%.
The diff coverage is 71.42%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #405      +/-   ##
============================================
+ Coverage     85.90%   86.00%   +0.10%     
  Complexity      303      303              
============================================
  Files            55       55              
  Lines          1752     1772      +20     
  Branches         99      103       +4     
============================================
+ Hits           1505     1524      +19     
+ Misses          232      230       -2     
- Partials         15       18       +3     
Impacted Files Coverage Δ Complexity Δ
src/main/java/com/artipie/rpm/RpmMetadata.java 86.95% <71.42%> (+6.18%) 0.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 18718e8...67c2f9e. Read the comment docs.

@olenagerasimova olenagerasimova enabled auto-merge (squash) May 20, 2021 09:31
Comment on lines +44 to +46

@Test
void appendsRecords() throws IOException {
Copy link
Contributor

Choose a reason for hiding this comment

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

@olenagerasimova thanks. Is it possible to add packages when primary.xml.example and other.xml.example are empty or absent? If it is so, I'd suggest to add such test case

Copy link
Member Author

Choose a reason for hiding this comment

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

@genryxy now - it's not possible, there will be an invalid xml exception or smth like that. But that's a good question, I will discuss such scenario with our colleagues and make the changes accordingly.

Copy link
Contributor

@genryxy genryxy left a comment

Choose a reason for hiding this comment

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

@olenagerasimova olenagerasimova merged commit 0fe1fd8 into artipie:master May 20, 2021
@olenagerasimova
Copy link
Member Author

@rultor release, tag=1.5

@rultor
Copy link

rultor commented May 24, 2021

@rultor release, tag=1.5

@olenagerasimova OK, I will release it now. Please check the progress here

@rultor
Copy link

rultor commented May 24, 2021

@rultor release, tag=1.5

@olenagerasimova Oops, I failed. You can see the full log here (spent 9min)

    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.LifecycleStarter.execute (\u001b[1mLifecycleStarter.java:128\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.DefaultMaven.doExecute (\u001b[1mDefaultMaven.java:305\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.DefaultMaven.doExecute (\u001b[1mDefaultMaven.java:192\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.DefaultMaven.execute (\u001b[1mDefaultMaven.java:105\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.cli.MavenCli.execute (\u001b[1mMavenCli.java:956\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.cli.MavenCli.doMain (\u001b[1mMavenCli.java:288\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.cli.MavenCli.main (\u001b[1mMavenCli.java:192\u001b[m)
    \u001b[1mat\u001b[m sun.reflect.NativeMethodAccessorImpl.invoke0 (\u001b[1mNative Method\u001b[m)
    \u001b[1mat\u001b[m sun.reflect.NativeMethodAccessorImpl.invoke (\u001b[1mNativeMethodAccessorImpl.java:62\u001b[m)
    \u001b[1mat\u001b[m sun.reflect.DelegatingMethodAccessorImpl.invoke (\u001b[1mDelegatingMethodAccessorImpl.java:43\u001b[m)
    \u001b[1mat\u001b[m java.lang.reflect.Method.invoke (\u001b[1mMethod.java:498\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (\u001b[1mLauncher.java:282\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.classworlds.launcher.Launcher.launch (\u001b[1mLauncher.java:225\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (\u001b[1mLauncher.java:406\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.classworlds.launcher.Launcher.main (\u001b[1mLauncher.java:347\u001b[m)
\u001b[1mCaused by\u001b[m: com.sun.jersey.api.client.ClientHandlerException: \u001b[1;31mA message body reader for Java class com.sonatype.nexus.staging.api.dto.StagingProfileRepositoryDTO, and Java type class com.sonatype.nexus.staging.api.dto.StagingProfileRepositoryDTO, and MIME media type text/html was not found\u001b[m
    \u001b[1mat\u001b[m com.sun.jersey.api.client.ClientResponse.getEntity (\u001b[1mClientResponse.java:561\u001b[m)
    \u001b[1mat\u001b[m com.sun.jersey.api.client.ClientResponse.getEntity (\u001b[1mClientResponse.java:517\u001b[m)
    \u001b[1mat\u001b[m com.sonatype.nexus.staging.client.internal.StagingWorkflowV3ServiceImpl$1.perform (\u001b[1mStagingWorkflowV3ServiceImpl.java:80\u001b[m)
    \u001b[1mat\u001b[m com.sonatype.nexus.staging.client.internal.StagingWorkflowV3ServiceImpl$1.perform (\u001b[1mStagingWorkflowV3ServiceImpl.java:68\u001b[m)
    \u001b[1mat\u001b[m com.sonatype.nexus.staging.client.internal.ExceptionConverter.runAndReturn (\u001b[1mExceptionConverter.java:38\u001b[m)
    \u001b[1mat\u001b[m com.sonatype.nexus.staging.client.internal.StagingWorkflowV3ServiceImpl.findRepository (\u001b[1mStagingWorkflowV3ServiceImpl.java:67\u001b[m)
    \u001b[1mat\u001b[m com.sonatype.nexus.staging.client.internal.StagingWorkflowV3ServiceImpl.monitorRepositoryTransition (\u001b[1mStagingWorkflowV3ServiceImpl.java:213\u001b[m)
    \u001b[1mat\u001b[m com.sonatype.nexus.staging.client.internal.StagingWorkflowV2ServiceImpl.monitorRepositoryTransition (\u001b[1mStagingWorkflowV2ServiceImpl.java:407\u001b[m)
    \u001b[1mat\u001b[m com.sonatype.nexus.staging.client.internal.StagingWorkflowV2ServiceImpl$10.perform (\u001b[1mStagingWorkflowV2ServiceImpl.java:281\u001b[m)
    \u001b[1mat\u001b[m com.sonatype.nexus.staging.client.internal.StagingWorkflowV2ServiceImpl$10.perform (\u001b[1mStagingWorkflowV2ServiceImpl.java:276\u001b[m)
    \u001b[1mat\u001b[m com.sonatype.nexus.staging.client.internal.ExceptionConverter.runAndReturn (\u001b[1mExceptionConverter.java:38\u001b[m)
    \u001b[1mat\u001b[m com.sonatype.nexus.staging.client.internal.StagingWorkflowV2ServiceImpl.releaseStagingRepositories (\u001b[1mStagingWorkflowV2ServiceImpl.java:275\u001b[m)
    \u001b[1mat\u001b[m com.sonatype.nexus.staging.client.internal.StagingWorkflowV3ServiceImpl.releaseStagingRepositories (\u001b[1mStagingWorkflowV3ServiceImpl.java:91\u001b[m)
    \u001b[1mat\u001b[m org.sonatype.nexus.maven.staging.workflow.ReleaseStageRepositoryMojo.doExecute (\u001b[1mReleaseStageRepositoryMojo.java:55\u001b[m)
    \u001b[1mat\u001b[m org.sonatype.nexus.maven.staging.workflow.AbstractStagingActionMojo.execute (\u001b[1mAbstractStagingActionMojo.java:55\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (\u001b[1mDefaultBuildPluginManager.java:137\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.MojoExecutor.execute (\u001b[1mMojoExecutor.java:210\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.MojoExecutor.execute (\u001b[1mMojoExecutor.java:156\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.MojoExecutor.execute (\u001b[1mMojoExecutor.java:148\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (\u001b[1mLifecycleModuleBuilder.java:117\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (\u001b[1mLifecycleModuleBuilder.java:81\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (\u001b[1mSingleThreadedBuilder.java:56\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.LifecycleStarter.execute (\u001b[1mLifecycleStarter.java:128\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.DefaultMaven.doExecute (\u001b[1mDefaultMaven.java:305\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.DefaultMaven.doExecute (\u001b[1mDefaultMaven.java:192\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.DefaultMaven.execute (\u001b[1mDefaultMaven.java:105\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.cli.MavenCli.execute (\u001b[1mMavenCli.java:956\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.cli.MavenCli.doMain (\u001b[1mMavenCli.java:288\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.cli.MavenCli.main (\u001b[1mMavenCli.java:192\u001b[m)
    \u001b[1mat\u001b[m sun.reflect.NativeMethodAccessorImpl.invoke0 (\u001b[1mNative Method\u001b[m)
    \u001b[1mat\u001b[m sun.reflect.NativeMethodAccessorImpl.invoke (\u001b[1mNativeMethodAccessorImpl.java:62\u001b[m)
    \u001b[1mat\u001b[m sun.reflect.DelegatingMethodAccessorImpl.invoke (\u001b[1mDelegatingMethodAccessorImpl.java:43\u001b[m)
    \u001b[1mat\u001b[m java.lang.reflect.Method.invoke (\u001b[1mMethod.java:498\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (\u001b[1mLauncher.java:282\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.classworlds.launcher.Launcher.launch (\u001b[1mLauncher.java:225\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (\u001b[1mLauncher.java:406\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.classworlds.launcher.Launcher.main (\u001b[1mLauncher.java:347\u001b[m)
[\u001b[1;31mERROR\u001b[m] 
[\u001b[1;31mERROR\u001b[m] Re-run Maven using the \u001b[1m-X\u001b[m switch to enable full debug logging.
[\u001b[1;31mERROR\u001b[m] 
[\u001b[1;31mERROR\u001b[m] For more information about the errors and possible solutions, please read the following articles:
[\u001b[1;31mERROR\u001b[m] \u001b[1m[Help 1]\u001b[m http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
container a2f4210adbafb614bacb0404acf29037055c07d3d20a1782f381d0092d6f2327 is dead
Mon May 24 14:21:30 CEST 2021

@olenagerasimova
Copy link
Member Author

@rultor release, tag=1.5

@olenagerasimova olenagerasimova deleted the 388-xml-metadata-append branch May 24, 2021 12:26
@rultor
Copy link

rultor commented May 24, 2021

@rultor release, tag=1.5

@olenagerasimova OK, I will release it now. Please check the progress here

@rultor
Copy link

rultor commented May 24, 2021

@rultor release, tag=1.5

@olenagerasimova Oops, I failed. You can see the full log here (spent 10min)

    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.MojoExecutor.execute (\u001b[1mMojoExecutor.java:210\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.MojoExecutor.execute (\u001b[1mMojoExecutor.java:156\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.MojoExecutor.execute (\u001b[1mMojoExecutor.java:148\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (\u001b[1mLifecycleModuleBuilder.java:117\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (\u001b[1mLifecycleModuleBuilder.java:81\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (\u001b[1mSingleThreadedBuilder.java:56\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.LifecycleStarter.execute (\u001b[1mLifecycleStarter.java:128\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.DefaultMaven.doExecute (\u001b[1mDefaultMaven.java:305\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.DefaultMaven.doExecute (\u001b[1mDefaultMaven.java:192\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.DefaultMaven.execute (\u001b[1mDefaultMaven.java:105\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.cli.MavenCli.execute (\u001b[1mMavenCli.java:956\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.cli.MavenCli.doMain (\u001b[1mMavenCli.java:288\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.cli.MavenCli.main (\u001b[1mMavenCli.java:192\u001b[m)
    \u001b[1mat\u001b[m sun.reflect.NativeMethodAccessorImpl.invoke0 (\u001b[1mNative Method\u001b[m)
    \u001b[1mat\u001b[m sun.reflect.NativeMethodAccessorImpl.invoke (\u001b[1mNativeMethodAccessorImpl.java:62\u001b[m)
    \u001b[1mat\u001b[m sun.reflect.DelegatingMethodAccessorImpl.invoke (\u001b[1mDelegatingMethodAccessorImpl.java:43\u001b[m)
    \u001b[1mat\u001b[m java.lang.reflect.Method.invoke (\u001b[1mMethod.java:498\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (\u001b[1mLauncher.java:282\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.classworlds.launcher.Launcher.launch (\u001b[1mLauncher.java:225\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (\u001b[1mLauncher.java:406\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.classworlds.launcher.Launcher.main (\u001b[1mLauncher.java:347\u001b[m)
\u001b[1mCaused by\u001b[m: com.sonatype.nexus.staging.client.StagingRuleFailuresException: \u001b[1;31mStaging rules failure!\u001b[m
    \u001b[1mat\u001b[m com.sonatype.nexus.staging.client.internal.StagingWorkflowV3ServiceImpl.monitorRepositoryTransition (\u001b[1mStagingWorkflowV3ServiceImpl.java:272\u001b[m)
    \u001b[1mat\u001b[m com.sonatype.nexus.staging.client.internal.StagingWorkflowV2ServiceImpl.monitorRepositoryTransition (\u001b[1mStagingWorkflowV2ServiceImpl.java:407\u001b[m)
    \u001b[1mat\u001b[m com.sonatype.nexus.staging.client.internal.StagingWorkflowV2ServiceImpl$10.perform (\u001b[1mStagingWorkflowV2ServiceImpl.java:281\u001b[m)
    \u001b[1mat\u001b[m com.sonatype.nexus.staging.client.internal.StagingWorkflowV2ServiceImpl$10.perform (\u001b[1mStagingWorkflowV2ServiceImpl.java:276\u001b[m)
    \u001b[1mat\u001b[m com.sonatype.nexus.staging.client.internal.ExceptionConverter.runAndReturn (\u001b[1mExceptionConverter.java:38\u001b[m)
    \u001b[1mat\u001b[m com.sonatype.nexus.staging.client.internal.StagingWorkflowV2ServiceImpl.releaseStagingRepositories (\u001b[1mStagingWorkflowV2ServiceImpl.java:275\u001b[m)
    \u001b[1mat\u001b[m com.sonatype.nexus.staging.client.internal.StagingWorkflowV3ServiceImpl.releaseStagingRepositories (\u001b[1mStagingWorkflowV3ServiceImpl.java:91\u001b[m)
    \u001b[1mat\u001b[m org.sonatype.nexus.maven.staging.workflow.ReleaseStageRepositoryMojo.doExecute (\u001b[1mReleaseStageRepositoryMojo.java:55\u001b[m)
    \u001b[1mat\u001b[m org.sonatype.nexus.maven.staging.workflow.AbstractStagingActionMojo.execute (\u001b[1mAbstractStagingActionMojo.java:55\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (\u001b[1mDefaultBuildPluginManager.java:137\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.MojoExecutor.execute (\u001b[1mMojoExecutor.java:210\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.MojoExecutor.execute (\u001b[1mMojoExecutor.java:156\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.MojoExecutor.execute (\u001b[1mMojoExecutor.java:148\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (\u001b[1mLifecycleModuleBuilder.java:117\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (\u001b[1mLifecycleModuleBuilder.java:81\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (\u001b[1mSingleThreadedBuilder.java:56\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.LifecycleStarter.execute (\u001b[1mLifecycleStarter.java:128\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.DefaultMaven.doExecute (\u001b[1mDefaultMaven.java:305\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.DefaultMaven.doExecute (\u001b[1mDefaultMaven.java:192\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.DefaultMaven.execute (\u001b[1mDefaultMaven.java:105\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.cli.MavenCli.execute (\u001b[1mMavenCli.java:956\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.cli.MavenCli.doMain (\u001b[1mMavenCli.java:288\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.cli.MavenCli.main (\u001b[1mMavenCli.java:192\u001b[m)
    \u001b[1mat\u001b[m sun.reflect.NativeMethodAccessorImpl.invoke0 (\u001b[1mNative Method\u001b[m)
    \u001b[1mat\u001b[m sun.reflect.NativeMethodAccessorImpl.invoke (\u001b[1mNativeMethodAccessorImpl.java:62\u001b[m)
    \u001b[1mat\u001b[m sun.reflect.DelegatingMethodAccessorImpl.invoke (\u001b[1mDelegatingMethodAccessorImpl.java:43\u001b[m)
    \u001b[1mat\u001b[m java.lang.reflect.Method.invoke (\u001b[1mMethod.java:498\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (\u001b[1mLauncher.java:282\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.classworlds.launcher.Launcher.launch (\u001b[1mLauncher.java:225\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (\u001b[1mLauncher.java:406\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.classworlds.launcher.Launcher.main (\u001b[1mLauncher.java:347\u001b[m)
[\u001b[1;31mERROR\u001b[m] 
[\u001b[1;31mERROR\u001b[m] Re-run Maven using the \u001b[1m-X\u001b[m switch to enable full debug logging.
[\u001b[1;31mERROR\u001b[m] 
[\u001b[1;31mERROR\u001b[m] For more information about the errors and possible solutions, please read the following articles:
[\u001b[1;31mERROR\u001b[m] \u001b[1m[Help 1]\u001b[m http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
container 968518c4de100229dda6316339540ff76cdbae61e2ffe47a4028622dbef905c3 is dead
Mon May 24 14:37:42 CEST 2021

@olenagerasimova
Copy link
Member Author

olenagerasimova commented May 24, 2021

@rultor release, tag=1.6

@rultor
Copy link

rultor commented May 24, 2021

@rultor release, tag=1.6

@olenagerasimova OK, I will release it now. Please check the progress here

@rultor
Copy link

rultor commented May 24, 2021

@rultor release, tag=1.6

@olenagerasimova Done! FYI, the full log is here (took me 10min)

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

Successfully merging this pull request may close these issues.

None yet

3 participants