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

Unrecognized field "exclusions" #154

Closed
mantsurovr opened this issue Apr 8, 2024 · 1 comment
Closed

Unrecognized field "exclusions" #154

mantsurovr opened this issue Apr 8, 2024 · 1 comment

Comments

@mantsurovr
Copy link

We got:

  • TeamCity 2024.03 (build 156166)
  • Artifactory 7.71.5 rev 77105900
  • Artifactory plugin on TC ver 2.10.2

Problem listing below occurd after we update TeamCity to latest version.
Sometimes after builds done and it's try to upload artifacts error occurs:

Could not collect artifacts details from the spec: Unrecognized field "exclusions" (class org.jfrog.build.extractor.clientConfiguration.util.spec.FileSpec), not marked as ignorable (10 known properties: "pattern", "target", "recursive", "flat", "aql", "excludePatterns", "build", "props", "regexp", "explode"])
 at [Source: (String)"{
  "files": [
    {
      "pattern": "trial_license/license_iw",
      "target": "iwtm/installer/feature-krt-41263/redos-7.3/"
    },
    {
      "pattern": "@BUILD-redos-7.3-release/install/installbuilder/iwtm-installer-*",
            "exclusions": [
                "@BUILD-redos-7.3-release/install/installbuilder/*.md5", 
                "@BUILD-redos-7.3-release/install/installbuilder/*.sha256"
                ],
      "target": "iwtm/installer/feature-krt-41263/redos-7.3/"
    }
  ]
}"; line: 9, column: 28] (through reference chain: org.jfrog.build.extractor.clientConfiguration.util.spec.Spec["files"]->java.lang.Object[][1]->org.jfrog.build.extractor.clientConfiguration.util.spec.FileSpec["exclusions"])
[16:12:44]
[Step 4/5] Could not collect artifacts details from the spec: Unrecognized field "exclusions" (class org.jfrog.build.extractor.clientConfiguration.util.spec.FileSpec), not marked as ignorable (10 known properties: "pattern", "target", "recursive", "flat", "aql", "excludePatterns", "build", "props", "regexp", "explode"])
 at [Source: (String)"{
  "files": [
    {
      "pattern": "trial_license/license_iw",
      "target": "iwtm/installer/feature-krt-41263/redos-7.3/"
    },
    {
      "pattern": "@BUILD-redos-7.3-release/install/installbuilder/iwtm-installer-*",
            "exclusions": [
                "@BUILD-redos-7.3-release/install/installbuilder/*.md5", 
                "@BUILD-redos-7.3-release/install/installbuilder/*.sha256"
                ],
      "target": "iwtm/installer/feature-krt-41263/redos-7.3/"
    }
  ]
}"; line: 9, column: 28] (through reference chain: org.jfrog.build.extractor.clientConfiguration.util.spec.Spec["files"]->java.lang.Object[][1]->org.jfrog.build.extractor.clientConfiguration.util.spec.FileSpec["exclusions"])
[16:12:44]
[Step 4/5] java.lang.Exception: Could not collect artifacts details from the spec: Unrecognized field "exclusions" (class org.jfrog.build.extractor.clientConfiguration.util.spec.FileSpec), not marked as ignorable (10 known properties: "pattern", "target", "recursive", "flat", "aql", "excludePatterns", "build", "props", "regexp", "explode"])
 at [Source: (String)"{
  "files": [
    {
      "pattern": "trial_license/license_iw",
      "target": "iwtm/installer/feature-krt-41263/redos-7.3/"
    },
    {
      "pattern": "@BUILD-redos-7.3-release/install/installbuilder/iwtm-installer-*",
            "exclusions": [
                "@BUILD-redos-7.3-release/install/installbuilder/*.md5", 
                "@BUILD-redos-7.3-release/install/installbuilder/*.sha256"
                ],
      "target": "iwtm/installer/feature-krt-41263/redos-7.3/"
    }
  ]
}"; line: 9, column: 28] (through reference chain: org.jfrog.build.extractor.clientConfiguration.util.spec.Spec["files"]->java.lang.Object[][1]->org.jfrog.build.extractor.clientConfiguration.util.spec.FileSpec["exclusions"])
	at org.jfrog.teamcity.agent.GenericBuildInfoExtractor.appendRunnerSpecificDetails(GenericBuildInfoExtractor.java:71)
	at org.jfrog.teamcity.agent.BaseBuildInfoExtractor.extract(BaseBuildInfoExtractor.java:87)
	at org.jfrog.teamcity.agent.listener.AgentListenerBuildInfoHelper.extractBuildInfo(AgentListenerBuildInfoHelper.java:224)
	at org.jfrog.teamcity.agent.listener.AgentListenerBuildInfoHelper.runnerFinished(AgentListenerBuildInfoHelper.java:154)
	at org.jfrog.teamcity.agent.ArtifactoryAgentListener.runnerFinished(ArtifactoryAgentListener.java:116)
	at jdk.internal.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at jetbrains.buildServer.util.EventDispatcher.invokeListeners(EventDispatcher.java:157)
	at jetbrains.buildServer.util.EventDispatcher.lambda$dispatch$0(EventDispatcher.java:134)
	at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:76)
	at jetbrains.buildServer.util.EventDispatcher.dispatch(EventDispatcher.java:134)
	at jetbrains.buildServer.util.EventDispatcher$2.invoke(EventDispatcher.java:82)
	at com.sun.proxy.$Proxy24.runnerFinished(Unknown Source)
	at jetbrains.buildServer.agent.impl.buildStages.runnerStages.finish.FireRunnerFinishedFStage.doFinishStage(FireRunnerFinishedFStage.java:31)
	at jetbrains.buildServer.agent.impl.buildStages.RunnerFinishStagesExecutor.runFinishStage(RunnerFinishStagesExecutor.java:32)
	at jetbrains.buildServer.agent.impl.buildStages.RunnerFinishStagesExecutor.doBuildFinishStages(RunnerFinishStagesExecutor.java:23)
	at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.RunnerContextExecutor.safeCallFinishStages(RunnerContextExecutor.java:67)
	at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.RunnerContextExecutor.executeBuildStepStages(RunnerContextExecutor.java:58)
	at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.RunAllBuildStepsStage.runBuildStep(RunAllBuildStepsStage.java:190)
	at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.RunAllBuildStepsStage.runStep(RunAllBuildStepsStage.java:176)
	at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.RunAllBuildStepsStage.executeBuildRunners(RunAllBuildStepsStage.java:126)
	at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.RunAllBuildStepsStage.doBuildStage(RunAllBuildStepsStage.java:58)
	at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:33)
	at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:24)
	at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(StagesExecutor.java:76)
	at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:35)
	at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor.doStages(BuildStagesExecutor.java:24)
	at jetbrains.buildServer.agent.impl.BuildRunActionImpl.doStages(BuildRunActionImpl.java:97)
	at jetbrains.buildServer.agent.AgentOperationModeEx.executeRunnerStages(AgentOperationModeEx.java:36)
	at jetbrains.buildServer.agent.impl.BuildRunActionImpl.runBuild(BuildRunActionImpl.java:68)
	at jetbrains.buildServer.agent.impl.BuildAgentImpl.doActualBuild(BuildAgentImpl.java:346)
	at jetbrains.buildServer.agent.impl.BuildAgentImpl.access$100(BuildAgentImpl.java:62)
	at jetbrains.buildServer.agent.impl.BuildAgentImpl$1.run(BuildAgentImpl.java:295)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "exclusions" (class org.jfrog.build.extractor.clientConfiguration.util.spec.FileSpec), not marked as ignorable (10 known properties: "pattern", "target", "recursive", "flat", "aql", "excludePatterns", "build", "props", "regexp", "explode"])
 at [Source: (String)"{
  "files": [
    {
      "pattern": "trial_license/license_iw",
      "target": "iwtm/installer/feature-krt-41263/redos-7.3/"
    },
    {
      "pattern": "@BUILD-redos-7.3-release/install/installbuilder/iwtm-installer-*",
            "exclusions": [
                "@BUILD-redos-7.3-release/install/installbuilder/*.md5", 
                "@BUILD-redos-7.3-release/install/installbuilder/*.sha256"
                ],
      "target": "iwtm/installer/feature-krt-41263/redos-7.3/"
    }
  ]
}"; line: 9, column: 28] (through reference chain: org.jfrog.build.extractor.clientConfiguration.util.spec.Spec["files"]->java.lang.Object[][1]->org.jfrog.build.extractor.clientConfiguration.util.spec.FileSpec["exclusions"])
	at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
	at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:822)
	at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:1152)
	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1582)
	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1560)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:294)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)
	at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:195)
	at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:21)
	at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:127)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)
	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4001)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2992)
	at org.jfrog.build.extractor.clientConfiguration.util.spec.SpecsHelper.getDownloadUploadSpec(SpecsHelper.java:134)
	at org.jfrog.build.extractor.clientConfiguration.util.spec.SpecsHelper.uploadArtifactsBySpec(SpecsHelper.java:59)
	at org.jfrog.build.extractor.clientConfiguration.util.spec.SpecsHelper.uploadArtifactsBySpec(SpecsHelper.java:85)
	at org.jfrog.teamcity.agent.GenericBuildInfoExtractor.appendRunnerSpecificDetails(GenericBuildInfoExtractor.java:68)
	... 34 more

How we can fix this? May be there is a workaround?

@mantsurovr
Copy link
Author

To fix this problem I use artifactory plugin version 2.10.0, it is works well.
If do not use "exclusions" property in 2.10.2 also I got problem with publishing building info like described in jfrog/jfrog-cli#2129

On TC(TeamCity) I got 3 version of artifactory plugin (strange situation):

  • 2.8.0 -- too old
  • 2.10.0 -- works well
  • 2.10.2 -- got problem with exclusion property and publishing build info on artifactory.
    To fix this I reinstalled artifactory plugin on TC with cleared out artifactory plugin files on TC server, it is necessary to restart TC server to apply new settings. After that TC agents updated artifactory plugin to 2.10.0 version.

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

No branches or pull requests

1 participant