From 46999dd18f6624e57efe01750a1bb7d66ab39e83 Mon Sep 17 00:00:00 2001 From: Andrei Piankouski Date: Fri, 17 Nov 2023 15:28:28 +0300 Subject: [PATCH 1/2] EPMRPP-87591 || Page crashes when logging into RP --- build.gradle | 2 +- .../com/epam/ta/reportportal/job/FlushingDataJob.java | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index 0feb940c20..7bbb1d40a7 100644 --- a/build.gradle +++ b/build.gradle @@ -84,7 +84,7 @@ dependencies { compile 'com.epam.reportportal:plugin-api' } else { compile 'com.github.reportportal:commons-events:e337f8b7be' - compile 'com.github.reportportal:commons-dao:6f11ff3' + compile 'com.github.reportportal:commons-dao:cdf3901' compile 'com.github.reportportal:commons-rules:29c30a1' compile 'com.github.reportportal:commons-model:83f012f' compile 'com.github.reportportal:commons:ce2166b' diff --git a/src/main/java/com/epam/ta/reportportal/job/FlushingDataJob.java b/src/main/java/com/epam/ta/reportportal/job/FlushingDataJob.java index 44ca9da5cb..7ab883321b 100644 --- a/src/main/java/com/epam/ta/reportportal/job/FlushingDataJob.java +++ b/src/main/java/com/epam/ta/reportportal/job/FlushingDataJob.java @@ -130,11 +130,7 @@ public void execute(JobExecutionContext context) { * Get exclusive lock. Kill all running transactions. Truncate tables */ private void truncateTables() { - jdbcTemplate.execute("BEGIN; " + "SELECT PG_ADVISORY_XACT_LOCK(1);" - + "SELECT PG_TERMINATE_BACKEND(pid) FROM pg_stat_activity WHERE datname = 'reportportal'\n" - + "AND pid <> PG_BACKEND_PID()\n" - + "AND state IN " - + "('idle', 'idle in transaction', 'idle in transaction (aborted)', 'disabled'); " + jdbcTemplate.execute("BEGIN; " + "TRUNCATE TABLE launch RESTART IDENTITY CASCADE;" + "TRUNCATE TABLE activity RESTART IDENTITY CASCADE;" + "TRUNCATE TABLE owned_entity RESTART IDENTITY CASCADE;" @@ -171,9 +167,14 @@ private void deleteUser(User user) { } private void deleteProject(Project project) { + Set defaultIssueTypeIds = issueTypeRepository.getDefaultIssueTypes() + .stream() + .map(IssueType::getId) + .collect(Collectors.toSet()); Set issueTypesToRemove = project.getProjectIssueTypes() .stream() .map(ProjectIssueType::getIssueType) + .filter(issueType -> !defaultIssueTypeIds.contains(issueType.getId())) .collect(Collectors.toSet()); projectRepository.delete(project); analyzerServiceClient.removeSuggest(project.getId()); From 186a2af0d82baf393c748ccda97e0fa112a918d3 Mon Sep 17 00:00:00 2001 From: Ivan Kustau <86599591+IvanKustau@users.noreply.github.com> Date: Mon, 20 Nov 2023 18:10:58 +0300 Subject: [PATCH 2/2] EPMRPP-86835 || Update releaseMode to use Maven instead of Github (#1870) * EPMRPP-86835 || Update releaseMode to use Maven instead of Github * EPMRPP-86835 || Update libs version --- Dockerfile | 4 ---- build.gradle | 22 +++++++--------------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index c8e7e36a81..5336f536ca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,11 @@ FROM --platform=$BUILDPLATFORM gradle:6.8.3-jdk11 AS build ARG RELEASE_MODE ARG APP_VERSION -ARG GITHUB_USER -ARG GITHUB_TOKEN WORKDIR /usr/app COPY . /usr/app RUN if [ "${RELEASE_MODE}" = true ]; then \ gradle build --exclude-task test \ -PreleaseMode=true \ - -PgithubUserName=${GITHUB_USER} \ - -PgithubToken=${GITHUB_TOKEN} \ -Dorg.gradle.project.version=${APP_VERSION}; \ else gradle build --exclude-task test -Dorg.gradle.project.version=${APP_VERSION}; fi diff --git a/build.gradle b/build.gradle index 7bbb1d40a7..5699588bfe 100644 --- a/build.gradle +++ b/build.gradle @@ -37,19 +37,11 @@ project.hasProperty('sealightsSession') && sealightsSession?.trim() ? apply(from repositories { mavenCentral { url "https://repo1.maven.org/maven2" } - if (releaseMode) { - dependencyRepos.forEach { path -> - maven { - setUrl("https://maven.pkg.github.com/reportportal/${path}") - credentials { - username = findProperty("githubUserName") - password = findProperty("githubToken") - } - } - } - } else { + + if (!releaseMode) { maven { url 'https://jitpack.io' } } + // maven { url "http://jasperreports.sourceforge.net/maven2" } // maven { url "http://jaspersoft.artifactoryonline.com/jaspersoft/third-party-ce-artifacts" } maven { url "https://jaspersoft.jfrog.io/artifactory/third-party-ce-artifacts" } @@ -84,12 +76,12 @@ dependencies { compile 'com.epam.reportportal:plugin-api' } else { compile 'com.github.reportportal:commons-events:e337f8b7be' - compile 'com.github.reportportal:commons-dao:cdf3901' - compile 'com.github.reportportal:commons-rules:29c30a1' + compile 'com.github.reportportal:commons-dao:dafe9b4d' + compile 'com.github.reportportal:commons-rules:01ec4d17' compile 'com.github.reportportal:commons-model:83f012f' - compile 'com.github.reportportal:commons:ce2166b' + compile 'com.github.reportportal:commons:07566b8e' compile 'com.github.reportportal:commons-fonts:d6e62dd' - compile 'com.github.reportportal:plugin-api:3876fab' + compile 'com.github.reportportal:plugin-api:55bf2f26' } compile 'org.springframework.boot:spring-boot-starter-aop'