Skip to content

Commit fc9df98

Browse files
authored
Fix cloud authentication for OKEWorkload, refactor Region class to be dynamic
Add support for using the OCI_REGION_METADATA environment variable when creating an OkeWorkloadIdentityProvider to handle situations where an Instance Metadata Service (IMDS) is not available Refactor how regions are defined and added so that they can be added dynamically as needed Misc: fixed some compiler warnings
1 parent d15af3a commit fc9df98

23 files changed

+758
-1068
lines changed

CHANGELOG.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,28 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
55
## [Unreleased]
66

77
### Fixed
8-
- Fixed an issue when stats collection is enabled debug logs were not
8+
- Fixed an issue when stats collection is enabled debug logs were not
99
logging.
10+
- Cloud only: fixed OkeWorkloadIdentity so that it will honor region information
11+
provided by the environment variable, OCI_REGION_METADATA, which is necessary
12+
for services that do not have access to an Instance Metadata Service to
13+
provide local region information.
14+
- Cloud only: fixed a compatibility issue introduced in 5.4.15 regarding use of
15+
the Bouncy Castle artifacts. This would turn up when using Instance Principal
16+
authentication
1017

1118
### Changed
12-
- Put and Put if-present can return the existing row when setReturnRow is
19+
- Put and Put if-present can return the existing row when setReturnRow is
1320
set to true and row already exists.
1421
- Delete can return the deleted row when setReturnRow is set to true.
22+
- Cloud only: refactored how the Region class operations to allow applications
23+
to add regions dynamically via a configuration file
24+
(~/.oci/regions-config.jsonc) or environment variable (OCI_REGION_METADATA)
1525

1626
### Added
1727
- Cloud only: added new OCI regions (RKT, SHJ, RUH, EBB, EBL)
28+
- Cloud only: refactored how the Region class is managed, allowing dynamic
29+
addition of regions not yet known to the system
1830

1931
## [5.4.15] 2024-06-05
2032

driver/pom.xml

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
<groupId>com.oracle.nosql.sdk</groupId>
3131
<artifactId>nosqldriver</artifactId>
32-
<version>5.4.15</version>
32+
<version>5.4.16</version>
3333
<packaging>jar</packaging>
3434

3535
<organization>
@@ -155,6 +155,68 @@
155155
<maven.javadoc.skip>true</maven.javadoc.skip>
156156
</properties>
157157
</profile>
158+
159+
<!-- The profile to run eclipse compiler check -->
160+
<!--
161+
It sets the compiler output directory to target/ecj-target, making sure that
162+
we don't accidentally use ecj compiled classes in release package.
163+
It also triggers `clean` phase automatically.
164+
-->
165+
<profile>
166+
<id>warnings</id>
167+
<build>
168+
<directory>${project.basedir}/target/ecj-target</directory>
169+
<pluginManagement>
170+
<plugins>
171+
<plugin>
172+
<artifactId>maven-compiler-plugin</artifactId>
173+
<version>3.11.0</version>
174+
<configuration>
175+
<compilerId>eclipse</compilerId>
176+
<fork>true</fork>
177+
<debug>false</debug>
178+
<failOnWarning>false</failOnWarning>
179+
<compilerArgs>
180+
<arg>-properties</arg>
181+
<arg>${maven.multiModuleProjectDirectory}/.settings/org.eclipse.jdt.core.prefs</arg>
182+
<arg>-enableJavadoc</arg>
183+
<arg>-Xemacs</arg>
184+
</compilerArgs>
185+
</configuration>
186+
187+
<dependencies>
188+
<dependency>
189+
<groupId>org.codehaus.plexus</groupId>
190+
<artifactId>plexus-compiler-eclipse</artifactId>
191+
<version>2.13.0</version>
192+
</dependency>
193+
194+
<dependency>
195+
<groupId>org.eclipse.jdt</groupId>
196+
<artifactId>ecj</artifactId>
197+
<version>3.34.0</version>
198+
</dependency>
199+
</dependencies>
200+
</plugin>
201+
</plugins>
202+
</pluginManagement>
203+
<plugins>
204+
<plugin>
205+
<artifactId>maven-clean-plugin</artifactId>
206+
<executions>
207+
<execution>
208+
<id>auto-clean</id>
209+
<phase>initialize</phase>
210+
<goals>
211+
<goal>clean</goal>
212+
</goals>
213+
</execution>
214+
</executions>
215+
</plugin>
216+
</plugins>
217+
</build>
218+
</profile>
219+
158220
</profiles>
159221
<dependencies>
160222

@@ -349,7 +411,6 @@
349411
<![CDATA[<b>Oracle NoSQL Database</b><br><font size=\"-1\"> Version ${project.version} ${maven.build.timestamp}</font>]]>
350412
</header>
351413
<bottom><![CDATA[<font size=1>${copyright}</font>]]> </bottom>
352-
<link>${java.apidoc}</link>
353414
<additionalOptions>
354415
<additionalOption>-author</additionalOption>
355416
</additionalOptions>

driver/src/main/java/oracle/nosql/driver/NoSQLHandleConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,7 +1420,7 @@ public SslContext getSslContext() {
14201420
*
14211421
* @since 5.2.30
14221422
*/
1423-
public NoSQLHandleConfig setStatsInterval(int statsInterval) {
1423+
public final NoSQLHandleConfig setStatsInterval(int statsInterval) {
14241424
if (statsInterval < 1) {
14251425
throw new IllegalArgumentException("Stats interval can not be " +
14261426
"less than 1 second.");
@@ -1450,7 +1450,7 @@ public int getStatsInterval() {
14501450
*
14511451
* @since 5.2.30
14521452
*/
1453-
public NoSQLHandleConfig setStatsProfile(StatsControl.Profile statsProfile)
1453+
public final NoSQLHandleConfig setStatsProfile(StatsControl.Profile statsProfile)
14541454
{
14551455
this.statsProfile = statsProfile;
14561456
return this;

0 commit comments

Comments
 (0)