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

EPMRPP-96337 || Add missed launch uuids #6

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=plugin-import-robot
version=24.2-SNAPSHOT
version=24.3-SNAPSHOT
description=Reinforce your ReportPortal instance with RobotFramework Import functionality and easily upload your log files right to ReportPortal.
pluginId=RobotFramework
lombokVersion=1.18.30
Binary file added jars/plugin-import-robot-24.3-SNAPSHOT-all.jar
Binary file not shown.
11 changes: 6 additions & 5 deletions plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ plugins {
id "io.spring.dependency-management" version "1.0.9.RELEASE"
id 'java'
id 'jacoco'
id 'com.github.johnrengelman.shadow' version '5.2.0'
id "com.moowork.node" version "1.3.1"
}

Expand All @@ -23,6 +22,8 @@ npm_run_build {
}

apply from: 'project-properties.gradle'
apply from: scriptsUrl + '/release-fat.gradle'
apply from: scriptsUrl + '/signing.gradle'

repositories {
mavenLocal()
Expand All @@ -38,10 +39,10 @@ dependencies {
implementation 'com.epam.reportportal:plugin-api'
annotationProcessor 'com.epam.reportportal:plugin-api'
} else {
implementation 'com.github.reportportal:commons-dao:28d0461'
implementation 'com.github.reportportal:commons:a30c7bb'
implementation 'com.github.reportportal:plugin-api:a9a8b73'
annotationProcessor 'com.github.reportportal:plugin-api:a9a8b73'
implementation 'com.github.reportportal:commons-dao:develop-SNAPSHOT'
implementation 'com.github.reportportal:commons:develop-SNAPSHOT'
implementation 'com.github.reportportal:plugin-api:develop-SNAPSHOT'
annotationProcessor 'com.github.reportportal:plugin-api:develop-SNAPSHOT'
}
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.12.7'
implementation 'org.hibernate:hibernate-core:5.4.18.Final'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ private void handleMsgElement(Element element) {
LogLevel level = RobotMapper.mapLogLevel(element.getAttribute(ATTR_LEVEL.val()));

SaveLogRQ saveLogRQ = new SaveLogRQ();
saveLogRQ.setLaunchUuid(launchUuid);
saveLogRQ.setLevel(level.name());
saveLogRQ.setLogTime(logTime);
saveLogRQ.setMessage(msg.trim());
Expand Down Expand Up @@ -288,6 +289,7 @@ private void finishTestItem() {
if (itemInfo != null) {
final FinishTestItemRQ rq = new FinishTestItemRQ();
markAsNotIssue(rq, itemInfo.getStatus());
rq.setLaunchUuid(launchUuid);
rq.setStatus(itemInfo.getStatus().name());
rq.setEndTime(itemInfo.getEndTime());
eventPublisher.publishEvent(new FinishItemRqEvent(this, projectName, itemInfo.getUuid(), rq));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,16 @@
import java.util.function.Predicate;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;

import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.FilenameUtils;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.web.multipart.MultipartFile;

/**
* @author <a href="mailto:[email protected]">Ivan Budayeu</a>
*/
@Slf4j
public class ZipImportStrategy extends AbstractImportStrategy {

private static final Predicate<ZipEntry> isFile = zipEntry -> !zipEntry.isDirectory();
Expand Down Expand Up @@ -64,14 +67,15 @@ public String importLaunch(MultipartFile file, String projectName, LaunchImportR
updateStartTime(launchUuid, robotXmlParser.getLowestTime());
return launchUuid;
} catch (Exception e) {
e.printStackTrace();
log.error(cleanMessage(e));
log.info("Exception during launch import for launch '{}'", launchUuid);
updateBrokenLaunch(launchUuid);
throw new ReportPortalException(ErrorType.IMPORT_FILE_ERROR, cleanMessage(e));
} finally {
try {
Files.deleteIfExists(zip.getAbsoluteFile().toPath());
} catch (IOException e) {
e.printStackTrace();
log.error(cleanMessage(e));
}
}
}
Expand Down