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

Bitbucket use 9.0.0 eap03 #373

Merged
merged 8 commits into from
Jun 5, 2024
Merged
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
5 changes: 2 additions & 3 deletions .github/workflows/all-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ jobs:
jira-it-matrix: ${{ steps.set-matrix.outputs.jira-it-matrix }}
confluence-it-matrix: ${{ steps.set-matrix.outputs.confluence-it-matrix }}
bitbucket-it-matrix: ${{ steps.set-matrix.outputs.bitbucket-it-matrix }}
# TODO: Remove these flags when new major jira (10.x) and bitbucket (9.x) are released
# TODO: Remove these flags when new major jira (10.x) is released
skip-jira-its: ${{ steps.set-matrix.outputs.skip-jira-its }}
skip-bitbucket-its: ${{ steps.set-matrix.outputs.skip-bitbucket-its }}
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -148,7 +147,7 @@ jobs:
name: Bitbucket
runs-on: ubuntu-20.04
timeout-minutes: 30
if: (github.event.inputs.jobs == '' || contains(github.event.inputs.jobs, 'integration-tests-bitbucket')) && !needs.prepare.outputs.skip-bitbucket-its
if: github.event.inputs.jobs == '' || contains(github.event.inputs.jobs, 'integration-tests-bitbucket')
needs: [prepare, unit-tests]
strategy:
matrix: ${{ fromJSON(needs.prepare.outputs.bitbucket-it-matrix) }}
Expand Down
2 changes: 1 addition & 1 deletion bin/build/java-product-matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"bitbucket-it": {
"java-version": ["17"],
"bitbucket-version": ["9.0.0"]
"bitbucket-version": ["9.0.0-eap03"]
}
},
"old": {
Expand Down
3 changes: 1 addition & 2 deletions bin/build/prepare-matrices.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ matrix_file='bin/build/java-product-matrix.json'
pl_common_version=$(. bin/build/get-plugin-major-version.sh common)
if [ $pl_common_version -gt 1 ]; then
matrix_key='current'
# TODO: Remove these flags when new major jira (10.x) and bitbucket (9.x) are released
# TODO: Remove these flags when new major jira (10.x) is released
echo "skip-jira-its=true" >> $GITHUB_OUTPUT
echo "skip-bitbucket-its=true" >> $GITHUB_OUTPUT
else
matrix_key='old'
fi
Expand Down
21 changes: 13 additions & 8 deletions bitbucket-slack-server-integration-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@

<!-- product properties -->
<plugin.key>${project.groupId}.${project.artifactId}</plugin.key>
<bitbucket.api.version>9.0.0-plat-7-m20</bitbucket.api.version>
<bitbucket.version>9.0.0-plat-7-m20</bitbucket.version>
<bitbucket.api.version>9.0.0-eap03</bitbucket.api.version>
<bitbucket.version>9.0.0-eap03</bitbucket.version>
<bitbucket.data.version>${bitbucket.version}</bitbucket.data.version>
<bitbucket.amps.version>8.2.2</bitbucket.amps.version>
<platform.version>7.0.0</platform.version>
<bitbucket.amps.version>8.16.1</bitbucket.amps.version>
<platform.version>7.0.5</platform.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -174,9 +174,8 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
<groupId>jakarta.inject</groupId>
<artifactId>jakarta.inject-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -223,7 +222,7 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.util.concurrent</groupId>
<groupId>io.atlassian.util.concurrent</groupId>
<artifactId>atlassian-util-concurrent</artifactId>
<scope>provided</scope>
</dependency>
Expand Down Expand Up @@ -482,6 +481,12 @@
<jvmArgs>${jvm17.opens} -Djdbc.url=jdbc:h2:${project.build.directory}/bitbucket/home/shared/data/db;DB_CLOSE_DELAY=-1;AUTO_SERVER=TRUE</jvmArgs>
<jvmDebugPort>5007</jvmDebugPort>

<banningExcludes>
<exclude>com.atlassian.security:atlassian-secure-random</exclude>
<exclude>com.atlassian.fugue:fugue</exclude>
<exclude>com.google.code.gson:gson</exclude>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

</banningExcludes>

<systemPropertyVariables>
<plugin.resource.directories>
${project.basedir}/../slack-server-integration-common/src/main/resources,
Expand Down
4 changes: 2 additions & 2 deletions bitbucket.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ Examples:
./bitbucket.sh clean run -> cleans all compiled files but the Bitbucket home directory, compiles everything, and runs Bitbucket in development mode
"

# check java 8
# check java 17
javaVersion=`java -version 2>&1 | head -n 1 | cut -d\" -f 2`
javaCompilerVersion=`javac -version 2>&1 | head -n 1 | cut -d\" -f 2`
[[ "$javaVersion" != "1.8."* && "$javaVersion" != "11."* || "$javaCompilerVersion" != *"1.8."* && "$javaCompilerVersion" != *"11."* ]] && echo "Java 8 expected" && exit 1
[[ "$javaVersion" != "17."* || "$javaCompilerVersion" != *"17."* ]] && echo "Java 17 expected" && exit 1

# compute parameters
purge=$([[ "$*" == *"purge"* ]] && echo "yes" || echo "no")
Expand Down
2 changes: 1 addition & 1 deletion slack-server-integration-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.util.concurrent</groupId>
<groupId>io.atlassian.util.concurrent</groupId>
<artifactId>atlassian-util-concurrent</artifactId>
<scope>provided</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
import com.atlassian.plugins.slack.link.SlackLinkManager;
import com.atlassian.plugins.slack.user.SlackUserManager;
import com.atlassian.sal.api.user.UserManager;
import com.atlassian.util.concurrent.LazyReference;
import com.github.seratch.jslack.Slack;
import com.github.seratch.jslack.common.http.SlackHttpClient;
import io.atlassian.fugue.Either;
import io.atlassian.util.concurrent.LazyReference;
import lombok.extern.slf4j.Slf4j;
import okhttp3.Authenticator;
import okhttp3.Challenge;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.atlassian.plugins.slack.api.client;

import com.atlassian.util.concurrent.ThreadFactories;
import io.atlassian.util.concurrent.ThreadFactories;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
Expand All @@ -10,7 +10,7 @@
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

import static com.atlassian.util.concurrent.ThreadFactories.Type.DAEMON;
import static io.atlassian.util.concurrent.ThreadFactories.Type.DAEMON;

@Component
public class ExecutorServiceHelper {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import com.atlassian.plugin.module.Element;
import com.atlassian.plugin.module.ModuleFactory;
import com.atlassian.plugins.slack.api.notification.SlackNotificationContext;
import com.atlassian.util.concurrent.ResettableLazyReference;
import io.atlassian.util.concurrent.ResettableLazyReference;

public class SlackNotificationContextDescriptor extends AbstractModuleDescriptor<SlackNotificationContext> {
private String value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import com.atlassian.plugin.module.Element;
import com.atlassian.plugin.module.ModuleFactory;
import com.atlassian.plugins.slack.api.notification.SlackNotification;
import com.atlassian.util.concurrent.ResettableLazyReference;
import io.atlassian.util.concurrent.ResettableLazyReference;

public class SlackNotificationDescriptor extends AbstractModuleDescriptor<SlackNotification<Object>> {
private String value;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import com.atlassian.soy.renderer.SoyServerFunction;

import javax.ws.rs.core.UriBuilder;
import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
import java.util.Collections;
import java.util.Set;

Expand All @@ -22,7 +24,8 @@ public Set<Integer> validArgSizes() {

@Override
public String apply(final Object... args) {
return UriBuilder.fromUri(args[0].toString())
String decodedUri = URLDecoder.decode(args[0].toString(), StandardCharsets.UTF_8);
return UriBuilder.fromUri(decodedUri)
.replaceQueryParam(args[1].toString(), args[2].toString())
.build()
.toString();
Expand Down
Loading