Skip to content
Merged
Show file tree
Hide file tree
Changes from 166 commits
Commits
Show all changes
174 commits
Select commit Hold shift + click to select a range
04590d1
initial commit; adding base for apiml service
Mar 21, 2025
1c240d2
Merge branch 'v3.x.x' into reboot/modulith
Mar 24, 2025
3a6bdcc
adding modulith dependency and ModulithConfig
Mar 24, 2025
f259051
cherry pick from poc and packaging / test initial changes
Mar 24, 2025
f2496f3
fix name of project
Mar 24, 2025
4041fd9
builds, without test and license check
Mar 24, 2025
ae6e71a
fix some tests, add tasks to package.json
Mar 24, 2025
06076a4
cherry pick from poc, builds w/o test & licensecheck
Mar 24, 2025
1c3c7e0
fixes eureka bootstrap
Mar 24, 2025
f9365d9
initial metadata fix (not working)
Mar 24, 2025
051df47
add gateway metadata class (to remove?)
Mar 24, 2025
72add10
add filters to support internal discovery port
Mar 25, 2025
f2af62f
gateway metadata, forward to eureka homepage
Mar 25, 2025
0668ad5
adding zowe license header
Mar 25, 2025
5014f25
merge discovery / gw config, fix route refresh (wip)
Mar 25, 2025
2a266ef
Merge branch 'reboot/modulith' of https://github.com/zowe/api-layer i…
Mar 25, 2025
7ee799b
fix catalog page redirection with correct discovery client
Mar 25, 2025
7c9d10f
fix checkstyle and some unit tests
Mar 26, 2025
5297bc2
fix more tests in discovery service
Mar 26, 2025
8555613
add missing scripts
Mar 26, 2025
ab58b9d
update gitignore
Mar 26, 2025
8207ee0
fix MetadataDefaultsServiceTest
Mar 26, 2025
2f7fdcb
fix
Mar 26, 2025
2873586
wip - add securityconfig in webflux
taban03 Mar 26, 2025
bab1d3b
wip start.sh
Mar 26, 2025
a2eeb69
Merge branch 'reboot/modulith' into reboot/modulith_security_config
Mar 26, 2025
eff14c8
wip z/OS packaging
Mar 26, 2025
79f6a31
wip
taban03 Mar 26, 2025
9e3dce5
Merge branch 'reboot/modulith_security_config' of https://github.com/…
Mar 26, 2025
f576e4e
discovery security config wip
Mar 26, 2025
894d948
wip eureka/** endpoints protected
Mar 26, 2025
5bab4c9
fix client cert auth in discovery
Mar 26, 2025
ce2299b
open resources are open
Mar 26, 2025
5bbe16b
refactor
Mar 26, 2025
dad36d0
Merge branch 'reboot/modulith' into reboot/modulith_security_config
Mar 26, 2025
1a064ed
fixes in start.sh
Mar 26, 2025
91e3e34
update logs
Mar 26, 2025
1b2c0d7
wip
taban03 Mar 26, 2025
71df04e
remove unused lines
Mar 26, 2025
0a98354
remove noop password encoder
Mar 26, 2025
84e9edf
Merge branch 'reboot/modulith_security_config' into reboot/modulith
Mar 26, 2025
2789131
enhance filter to check for wrong-formatted authentication header and…
taban03 Mar 26, 2025
558dbe2
remove unnecessary bean
taban03 Mar 26, 2025
03ee523
remove unnecessary cookie filter as already handled by tokenfilter
taban03 Mar 26, 2025
e7a01e2
Merge branch 'reboot/modulith_security_config' into reboot/modulith
Mar 27, 2025
f7d1e19
add dockerfiles, wip start.sh
Mar 27, 2025
7bb5a08
merge java properties in apiml from gw and ds
Mar 27, 2025
76953fc
try fix static refresh and GH actions
Mar 27, 2025
3e795d0
wip fix github actions
Mar 27, 2025
891f02a
wip github actions
Mar 27, 2025
3b9ba8c
enhance error handling for the refresh static APIs action
taban03 Mar 27, 2025
0b81d41
fromcallable for blocking code in DS
Mar 27, 2025
f22db1f
jib expose default port range
Mar 27, 2025
1ad406d
try fix github actions
Mar 27, 2025
0250c63
update keystore for docker
Mar 27, 2025
02d44b1
adding idea run configurations for apiml component
Mar 27, 2025
9f45f52
adding zowe license
Mar 27, 2025
79c8eb3
fix cert failing after new certs
Mar 27, 2025
d25e895
add dependency on CITestsModulith for PublishResults
Mar 27, 2025
6748685
default empty test
Mar 27, 2025
08fc4f7
fixes for github actions wip
Mar 27, 2025
3063d76
try install deps
Mar 27, 2025
5b08099
add handling for invalid token
taban03 Mar 27, 2025
6584acd
sudo
Mar 27, 2025
b753ebf
Merge branch 'reboot/modulith' of https://github.com/zowe/api-layer i…
Mar 27, 2025
d42992a
no container
Mar 27, 2025
87c72e0
remove install
Mar 27, 2025
5759cc4
wip github actions
Mar 28, 2025
cdb4fe1
Revert "add handling for invalid token"
Mar 28, 2025
70284d9
fix static refresh controller
Mar 28, 2025
23cfcc3
use discoverable client in ServicesInfoService
Mar 28, 2025
4083f7a
try simple wait
Mar 28, 2025
87d341b
make the response message consistent
taban03 Mar 28, 2025
283fcb0
wip fix port range and try fix github
Mar 28, 2025
5828f04
removing testing logging
Mar 28, 2025
efccb57
try using startup checker
Mar 31, 2025
952d562
use environment config in startup check
Mar 31, 2025
b1370af
try get exception details
Mar 31, 2025
7ecbb0c
try fix configreader
Mar 31, 2025
36277b6
try fix typo
Mar 31, 2025
ea4e86c
fixing test with custom http header for jwtScheme
Mar 31, 2025
1b7e3ff
local config values
Mar 31, 2025
8251226
Merge branch 'reboot/modulith' of https://github.com/zowe/api-layer i…
Mar 31, 2025
4e2382d
debug message
Mar 31, 2025
5ba0a59
fix ITs
taban03 Mar 31, 2025
3a4cf9e
fix unit tests
taban03 Mar 31, 2025
800fa17
try fix catalog test
Mar 31, 2025
0768879
fix test
taban03 Mar 31, 2025
07f8af1
remove standalone catalog from modulith tests
Apr 1, 2025
d01eaf6
add logs to ITs results
Apr 1, 2025
75a537a
update setting in modulith ITs
Apr 1, 2025
a62737a
update jib definitions
Apr 1, 2025
57a647e
archive startup check results
Apr 1, 2025
4aa4cd2
health default protection
Apr 1, 2025
402938c
try log more
Apr 1, 2025
be4484e
remove redundant
Apr 1, 2025
709db01
fix requirement of ending slash in eureka endpoint catalog
Apr 2, 2025
5d46d32
fix /eureka handling
Apr 2, 2025
20f99dd
fix blocking in eurekarestcontroller
Apr 2, 2025
050fd38
Merge branch 'v3.x.x' into reboot/modulith
pablocarle Apr 2, 2025
d426e68
pr review, remove comments and debug logs
Apr 2, 2025
aef9e54
Merge branch 'reboot/modulith' of https://github.com/zowe/api-layer i…
Apr 2, 2025
135d0a0
Update gateway-service/src/main/java/org/zowe/apiml/gateway/service/G…
pablocarle Apr 2, 2025
30ba865
try remove check
Apr 2, 2025
ae1f576
add basic test, try fix publishresults stage
Apr 2, 2025
7c450a6
archive sonar
Apr 2, 2025
a6522f1
wip sync build.gradle
Apr 2, 2025
83f5f8f
try get more details in sonar
Apr 3, 2025
7275f6e
add apiml project to coverage
Apr 3, 2025
fe6a1ad
add tests
Apr 3, 2025
9975f7b
add tests, pr review
Apr 4, 2025
bd9b8cc
Merge branch 'v3.x.x' into reboot/modulith
pablocarle Apr 4, 2025
c1f9bcc
add tests, update start.sh
Apr 4, 2025
9b3137b
eurekadashboard controller test
Apr 4, 2025
b466159
fix compile issue
Apr 4, 2025
8dd7691
fix eureka dashboard dependencies
Apr 7, 2025
a03e169
add debug logs
Apr 7, 2025
0105437
add exception handler unit test
Apr 7, 2025
e889120
Merge remote-tracking branch 'origin/v3.x.x' into reboot/modulith
Apr 7, 2025
dcf3161
add basic acceptance test
Apr 8, 2025
afbb0e1
fix unit test
Apr 8, 2025
f1a0943
increase test coverage
Apr 8, 2025
6d26d27
add more unit tests
Apr 8, 2025
9e0b6bb
Merge branch 'v3.x.x' into reboot/modulith
pablocarle Apr 9, 2025
85fb56e
add debugging for github actions
Apr 9, 2025
560871d
Merge branch 'reboot/modulith' of https://github.com/zowe/api-layer i…
Apr 9, 2025
16f2e4b
wip gh action
Apr 9, 2025
d3d00a2
add schema, fix apiml package
Apr 9, 2025
f95d5f5
add tests
taban03 Apr 9, 2025
08007e9
add package json
taban03 Apr 9, 2025
ce0514b
add package json lock
taban03 Apr 9, 2025
1ee66df
fix start.sh syntax
Apr 9, 2025
58e1ffd
Merge branch 'reboot/modulith' of https://github.com/zowe/api-layer i…
Apr 9, 2025
0d5f981
Merge branch 'v3.x.x' into reboot/modulith
pablocarle Apr 9, 2025
401a549
update IT setting for rate limiter
Apr 9, 2025
d693170
add startup check to CITestsZaas
Apr 9, 2025
b89864a
try in one gradle execution
Apr 9, 2025
f1efbb8
try more runStartupChecker
Apr 9, 2025
41020d7
Merge branch 'v3.x.x' into reboot/modulith
pablocarle Apr 10, 2025
ccd7a1a
try fix startup check
Apr 10, 2025
36cb9e6
fix NPE in checker
Apr 10, 2025
91a3a3b
startup check in GatewayCentralRegistry tests
Apr 10, 2025
1af6075
lax checker
Apr 10, 2025
30a0bfd
try ubuntu 22
Apr 10, 2025
7c55ee5
ubuntu:latest
Apr 10, 2025
e6eff8d
add required dependency to publishResults
Apr 10, 2025
fbd7533
remove internal port inexistant references
Apr 10, 2025
f2d0ec6
improve startup checker
Apr 10, 2025
28bed10
info level
Apr 10, 2025
5bdf4bf
expect two gateway instances for central registry tests
Apr 10, 2025
2ccd8b2
add unit tests
Apr 10, 2025
bebd634
try different jib image
Apr 10, 2025
0a55e92
fix image
Apr 10, 2025
f587617
change when static services are registered in modulith
Apr 10, 2025
5d27656
jacoco fix for dump of discoverable client
Apr 10, 2025
4cc5ad9
use gateway test fixtures - add eureka homepage test
Apr 11, 2025
5a7742d
add unit tests for coverage
Apr 11, 2025
6b18176
use spring cloud discovery client
Apr 11, 2025
0f5ae19
Merge remote-tracking branch 'origin/v3.x.x' into reboot/modulith
Apr 11, 2025
8c02f41
remove outdated TODO comment
Apr 11, 2025
61340ca
try ignore sonar in EurekaConfiguration class copied
Apr 11, 2025
c13c6a0
Merge branch 'v3.x.x' into reboot/modulith
pablocarle Apr 13, 2025
0e6988b
add static definition processing to apiml component
Apr 15, 2025
c39aef4
Merge branch 'v3.x.x' into reboot/modulith
pablocarle Apr 15, 2025
fa252e0
Merge branch 'v3.x.x' into reboot/modulith
pablocarle Apr 16, 2025
243cc16
Merge branch 'v3.x.x' into reboot/modulith
pablocarle Apr 16, 2025
dcd3745
suprerss warnings for generic type wildcard
Apr 16, 2025
cde2278
Merge branch 'reboot/modulith' of https://github.com/zowe/api-layer i…
Apr 16, 2025
78f5ade
fix sonar issues
Apr 16, 2025
c4b2d69
fix low sonar issues
Apr 16, 2025
3f34725
Merge branch 'v3.x.x' into reboot/modulith
pablocarle Apr 25, 2025
baaf370
Merge branch 'v3.x.x' into reboot/modulith
achmelo Apr 29, 2025
310be8e
Merge branch 'v3.x.x' into reboot/modulith
balhar-jakub May 12, 2025
f233799
Merge branch 'v3.x.x' into reboot/modulith
balhar-jakub May 12, 2025
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
1 change: 1 addition & 0 deletions .github/actions/dump-jacoco/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ runs:
java -jar ./scripts/jacococli.jar dump --retry 1 --address caching-service --port 6306 --destfile ./results/caching-service.exec || echo "Caching service is not available to obtain JaCoCo report at the moment"
java -jar ./scripts/jacococli.jar dump --retry 1 --address discovery-service --port 6302 --destfile ./results/discovery-service.exec || echo "Discovery service is not available to obtain JaCoCo report at the moment"
java -jar ./scripts/jacococli.jar dump --retry 1 --address api-catalog-services --port 6304 --destfile ./results/api-catalog-services.exec || echo "API Catalog is not available to obtain JaCoCo report at the moment"
java -jar ./scripts/jacococli.jar dump --retry 1 --address apiml --port 6310 --destfile ./results/apiml.exec || echo "API ML (Modulith) is not available to obtain JaCoCo report at the moment"
12 changes: 10 additions & 2 deletions .github/actions/validate-apiml-healthy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ name: "Validate APIML Healthy"
description: "Validates APIML health using Gateway, Caching Service and Authentication Service health status"

inputs:
gateway-host:
description: "Gateway hostname"
required: false
default: "localhost"
zaas-host:
description: "ZAAS hostname"
required: false
default: "localhost"
caching-service:
description: "Check Caching Service health"
required: false
Expand Down Expand Up @@ -29,8 +37,8 @@ runs:
valid="false"
until [ $attemptCounter -gt $maxAttempts ]; do
sleep 10
gwHealth=$(curl -k -s https://localhost:10010/application/health)
zaasHealth=$(curl -k -s https://localhost:10023/application/health)
gwHealth=$(curl -k -s https://${{ inputs.gateway-host }}:10010/application/health)
Comment thread
achmelo marked this conversation as resolved.
zaasHealth=$(curl -k -s https://${{ inputs.zaas-host }}:10023/application/health)
echo "Polling for GW health: $attemptCounter"
echo $gwHealth

Expand Down
80 changes: 78 additions & 2 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,78 @@ jobs:

- uses: ./.github/actions/teardown

CITestsModulith:
needs: PublishJibContainers
runs-on: ubuntu-latest
container: ubuntu:latest
timeout-minutes: 15

services:
apiml:
image: ghcr.io/balhar-jakub/apiml:${{ github.run_id }}-${{ github.run_number }}
env:
APIML_SECURITY_AUTH_JWT_CUSTOMAUTHHEADER: customJwtHeader
APIML_SECURITY_AUTH_PASSTICKET_CUSTOMUSERHEADER: customUserHeader
APIML_SECURITY_AUTH_PASSTICKET_CUSTOMAUTHHEADER: customPassticketHeader
ZWE_CONFIGS_APIML_SERVICE_ADDITIONALREGISTRATION_0_DISCOVERYSERVICEURLS: https://discovery-service-2:10011/eureka
SERVER_MAX_HTTP_REQUEST_HEADER_SIZE: 16348
SERVER_WEBSOCKET_REQUESTBUFFERSIZE: 16348
APIML_GATEWAY_SERVICESTOLIMITREQUESTRATE: discoverableclient
APIML_GATEWAY_COOKIENAMEFORRATELIMIT: apimlAuthenticationToken
api-catalog-services:
image: ghcr.io/balhar-jakub/api-catalog-services:${{ github.run_id }}-${{ github.run_number }}
volumes:
- /api-defs:/api-defs
env:
APIML_SERVICE_HOSTNAME: api-catalog-services
APIML_SERVICE_DISCOVERYSERVICEURLS: https://apiml:10011/eureka
APIML_SERVICE_GATEWAYHOSTNAME: https://apiml:10010
caching-service:
image: ghcr.io/balhar-jakub/caching-service:${{ github.run_id }}-${{ github.run_number }}
env:
APIML_SERVICE_DISCOVERYSERVICEURLS: https://apiml:10011/eureka
discoverable-client:
image: ghcr.io/balhar-jakub/discoverable-client:${{ github.run_id }}-${{ github.run_number }}
env:
APIML_SERVICE_DISCOVERYSERVICEURLS: https://apiml:10011/eureka
zaas-service:
image: ghcr.io/balhar-jakub/zaas-service:${{ github.run_id }}-${{ github.run_number }}
env:
APIML_SECURITY_X509_ENABLED: true
APIML_SECURITY_X509_ACCEPTFORWARDEDCERT: true
APIML_SECURITY_X509_CERTIFICATESURL: https://apiml:10010/gateway/certificates
APIML_SERVICE_DISCOVERYSERVICEURLS: https://apiml:10011/eureka
mock-services:
image: ghcr.io/balhar-jakub/mock-services:${{ github.run_id }}-${{ github.run_number }}
env:
APIML_SERVICE_DISCOVERYSERVICEURLS: https://apiml:10011/eureka
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- uses: ./.github/actions/setup

- name: Run CI Tests
run: >
ENV_CONFIG=docker-modulith ./gradlew runStartUpCheck :integration-tests:runContainerModulithTests --info
-Ddiscoverableclient.instances=1 -Denvironment.config=-docker-modulith
-Partifactory_user=${{ secrets.ARTIFACTORY_USERNAME }} -Partifactory_password=${{ secrets.ARTIFACTORY_PASSWORD }}
- uses: ./.github/actions/dump-jacoco
if: always()
- name: Store results
uses: actions/upload-artifact@v4
if: always()
with:
name: ContainerCITestsModulith-${{ env.JOB_ID }}
path: |
integration-tests/build/reports/**
results/**
integration-tests/build/test-results/runContainerModulithTests/binary/**
integration-tests/build/test-results/runStartUpCheck/binary/**

- uses: ./.github/actions/teardown

CITests:
needs: PublishJibContainers
runs-on: ubuntu-latest
Expand Down Expand Up @@ -1519,7 +1591,7 @@ jobs:
- uses: ./.github/actions/teardown

PublishResults:
needs: [ CITests,CITestsWithInfinispan,CITestsZaas,GatewayProxy,GatewayServiceRouting,CITestsWebSocketChaoticHA ]
needs: [ CITests,CITestsModulith,CITestsWithInfinispan,CITestsZaas,GatewayProxy,GatewayServiceRouting,CITestsWebSocketChaoticHA ]
runs-on: ubuntu-latest
timeout-minutes: 20

Expand All @@ -1535,6 +1607,10 @@ jobs:
with:
name: ContainerCITests-${{ env.JOB_ID }}
path: containercitests
- uses: actions/download-artifact@v4
with:
name: ContainerCITestsModulith-${{ env.JOB_ID }}
path: containercitestsmodulith
- uses: actions/download-artifact@v4
with:
name: CITestsWithInfinispan-${{ env.JOB_ID }}
Expand All @@ -1558,7 +1634,7 @@ jobs:

- name: Code coverage and publish results
run: >
./gradlew --scan coverage sonar -Dresults="containercitests/results,citestswithinfinispan/results,GatewayProxy/results,citestswebsocketchaoticha/results,GatewayServiceRouting/results,ContainerCITestsZaas/results"
./gradlew --scan coverage sonar -Dresults="containercitests/results,containercitestsmodulith/results,citestswithinfinispan/results,GatewayProxy/results,citestswebsocketchaoticha/results,GatewayServiceRouting/results,ContainerCITestsZaas/results"
-Psonar.host.url=$SONAR_HOST_URL -Dsonar.token=$SONAR_TOKEN -Partifactory_user=$ARTIFACTORY_USERNAME -Partifactory_password=$ARTIFACTORY_PASSWORD
env:
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ bin
!api-catalog-package/src/main/resources/bin
!discovery-package/src/main/resources/bin
!caching-service-package/src/main/resources/bin
!zaas-service-package/src/main/resources/bin
!apiml-package/src/main/resources/bin
var
sdist
develop-eggs
Expand Down
30 changes: 30 additions & 0 deletions .run/ApimlApplication.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!--
~ /*
~ * This program and the accompanying materials are made available under the terms of the
~ * Eclipse Public License v2.0 which accompanies this distribution, and is available at
~ * https://www.eclipse.org/legal/epl-v20.html
~ *
~ * SPDX-License-Identifier: EPL-2.0
~ *
~ * Copyright Contributors to the Zowe Project.
~ */
-->

<component name="ProjectRunConfigurationManager">
<configuration default="false" name="ApimlApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<additionalParameters>
<param>
<option name="enabled" value="true" />
<option name="name" value="spring.config.additional-location" />
<option name="value" value="file:./config/local/apiml-service.yml" />
</param>
</additionalParameters>
<module name="api-layer.apiml.main" />
<option name="SHORTEN_COMMAND_LINE" value="ARGS_FILE" />
<option name="SPRING_BOOT_MAIN_CLASS" value="org.zowe.apiml.ApimlApplication" />
<option name="VM_PARAMETERS" value="--add-opens=java.base/java.nio.channels.spi=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/javax.net.ssl=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
6 changes: 3 additions & 3 deletions api-catalog-package/src/main/resources/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ LIBPATH="$LIBPATH":"/usr/lib"
LIBPATH="$LIBPATH":"${JAVA_HOME}"/bin
LIBPATH="$LIBPATH":"${JAVA_HOME}"/bin/classic
LIBPATH="$LIBPATH":"${JAVA_HOME}"/bin/j9vm
LIBPATH="$LIBPATH":"${JAVA_HOME}"/lib/s390/classic
LIBPATH="$LIBPATH":"${JAVA_HOME}"/lib/s390/default
LIBPATH="$LIBPATH":"${JAVA_HOME}"/lib/s390/j9vm
LIBPATH="$LIBPATH":"${JAVA_HOME}"/lib/s390x/classic
LIBPATH="$LIBPATH":"${JAVA_HOME}"/lib/s390x/default
LIBPATH="$LIBPATH":"${JAVA_HOME}"/lib/s390x/j9vm
LIBPATH="$LIBPATH":"${LIBRARY_PATH}"

ADD_OPENS="--add-opens=java.base/java.lang=ALL-UNNAMED
Expand Down
19 changes: 16 additions & 3 deletions api-catalog-services/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ apply from: "$projectDir/gradle/lite.gradle"
apply plugin: 'com.google.cloud.tools.jib'
apply from: "../gradle/jib.gradle"

def javaAgentPort = 6304
def debugPort = 5124
def applicationPort = '10014'
def javaAgentPort = '6304'
def debugPort = '5124'
def componentName = "api-catalog-services"
if (project.hasProperty('zowe.jib.image.suffix')) { // Prefix for the component name (for the standalone catalog container)
componentName += '-' + project.getProperty('zowe.jib.image.suffix')
Expand All @@ -36,7 +37,7 @@ if (project.hasProperty('zowe.jib.image.debugPort')) {
debugPort = project.getProperty('zowe.jib.image.debugPort')
}

setJib(componentName, javaAgentPort, debugPort)
setJib(componentName, javaAgentPort, debugPort, applicationPort)

springBoot {
// This statement tells the Gradle Spring Boot plugin to generate a file
Expand Down Expand Up @@ -132,6 +133,18 @@ bootRun {
args project.args.split(',')
}

jvmArgs([
'--add-opens=java.base/java.nio.channels.spi=ALL-UNNAMED',
'--add-opens=java.base/sun.nio.ch=ALL-UNNAMED',
'--add-opens=java.base/java.io=ALL-UNNAMED',
'--add-opens=java.base/java.util=ALL-UNNAMED',
'--add-opens=java.base/java.util.concurrent=ALL-UNNAMED',
'--add-opens=java.base/java.lang.invoke=ALL-UNNAMED',
'--add-opens=java.base/java.lang.reflect=ALL-UNNAMED',
'--add-opens=java.base/javax.net.ssl=ALL-UNNAMED',
'--add-opens=java.base/java.net=ALL-UNNAMED'
])

debugOptions {
port = 5014
suspend = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ private List<EurekaServiceInstanceRequest> constructServiceInfoQueryRequest(Stri
String[] discoveryServiceUrls = discoveryConfigProperties.getLocations();
List<EurekaServiceInstanceRequest> eurekaServiceInstanceRequests = new ArrayList<>(discoveryServiceUrls.length);
for (String discoveryUrl : discoveryServiceUrls) {
String discoveryServiceLocatorUrl = discoveryUrl + APPS_ENDPOINT;
String discoveryServiceLocatorUrl = discoveryUrl.endsWith("/") ? discoveryUrl + APPS_ENDPOINT : discoveryUrl + "/" + APPS_ENDPOINT;
if (getDelta) {
discoveryServiceLocatorUrl += DELTA_ENDPOINT;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,17 @@
import org.apache.hc.client5.http.classic.methods.HttpPost;
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
import org.apache.hc.core5.http.HttpEntity;
import org.apache.hc.core5.http.io.entity.EntityUtils;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;
import org.zowe.apiml.apicatalog.discovery.DiscoveryConfigProperties;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Base64;
import java.util.List;
import java.util.stream.Collectors;

@Service
@RequiredArgsConstructor
Expand Down Expand Up @@ -62,7 +60,7 @@ public StaticAPIResponse refresh() {
final HttpEntity responseEntity = response.getEntity();
String responseBody = "";
if (responseEntity != null) {
responseBody = new BufferedReader(new InputStreamReader(responseEntity.getContent())).lines().collect(Collectors.joining("\n"));
responseBody = EntityUtils.toString(responseEntity);
}
return new StaticAPIResponse(response.getCode(), responseBody);
});
Expand Down Expand Up @@ -99,7 +97,9 @@ private List<String> getDiscoveryServiceUrls() {

List<String> discoveryServiceUrls = new ArrayList<>();
for (String location : discoveryServiceLocations) {
discoveryServiceUrls.add(location.replace("/eureka", "") + REFRESH_ENDPOINT);
location = location.replace("/eureka", "");
location = location.endsWith("/") ? location : location + "/";
discoveryServiceUrls.add(location + REFRESH_ENDPOINT);
}
return discoveryServiceUrls;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import org.springframework.security.config.annotation.web.WebSecurityConfigurer;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.web.client.RestClientException;
import org.zowe.apiml.apicatalog.services.status.model.ServiceNotFoundException;
Expand All @@ -32,7 +30,6 @@
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

@ExtendWith(SpringExtension.class)
@WebMvcTest(controllers = {StaticAPIRefreshController.class},
excludeFilters = { @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, value = WebSecurityConfigurer.class) },
excludeAutoConfiguration = { SecurityAutoConfiguration.class}
Expand Down
Loading