Skip to content

Commit 846dc82

Browse files
committed
Added internal code changes to validate the updated OCI centralized configuration provider URL syntax
1 parent 7f37f4d commit 846dc82

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

doc/src/release_notes.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ node-oracledb `v6.7.0 <https://github.com/oracle/node-oracledb/compare/v6.6.0...
1313
Common Changes
1414
++++++++++++++
1515

16+
#) Added internal code changes to validate the updated OCI centralized
17+
configuration provider URL syntax.
18+
1619
#) Added support to enable tracing with the OpenTelemetry
1720
module for Oracle Database being created in the OpenTelemetry project.
1821

lib/configProviders/ociobject.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const errors = require("../errors.js");
2929
const { base } = require("./base.js");
3030
const fs = require('fs');
3131

32-
const cloud_net_naming_pattern_oci = new RegExp("(?<objservername>[A-Za-z0-9._-]+)/n/" + "(?<namespace>[A-Za-z0-9._-]+)/b/" + "(?<bucketname>[A-Za-z0-9._-]+)/o/" + "(?<filename>[A-Za-z0-9._-]+)" + "(/c/(?<alias>.+))?$");
32+
const cloud_net_naming_pattern_oci = new RegExp("(?<objservername>[A-Za-z0-9._-]+)/n/" + "(?<namespace>[A-Za-z0-9._-]+)/b/" + "(?<bucketname>[A-Za-z0-9._-]+)/o/" + "(?<filename>[A-Za-z0-9._-]+)$");
3333
// object to store module references that will be populated by init()
3434
const oci = {};
3535
class OCIProvider extends base {
@@ -41,8 +41,6 @@ class OCIProvider extends base {
4141
this._addParam("namespace", match.groups.namespace);
4242
this._addParam("bucketname", match.groups.bucketname);
4343
this._addParam("filename", match.groups.filename);
44-
if (match.groups.alias)
45-
this._addParam("alias", match.groups.alias);
4644
}
4745
}
4846

@@ -140,7 +138,7 @@ class OCIProvider extends base {
140138
const resp = await this._streamToString(getObjectResponse.value);
141139
// Entire object we get from OCI Object Storage
142140
this.obj = JSON.parse(resp);
143-
const userAlias = this.paramMap.get('alias');
141+
const userAlias = this.paramMap.get('key'); // alias
144142
if (userAlias) {
145143
this.obj = this.obj[userAlias];
146144
}

0 commit comments

Comments
 (0)