Skip to content

Commit 0408b70

Browse files
paulparkinsonRichardExleyrenagranat
authored
v8o and polyglot mods (#41)
* first-round * second-set * third-push * push4 * push5 * push6 * push * push * push * push * fixes * fixes * fixes * fixes * fixes * fixes * fixes * terra optimizations * terra fixes * env.sh and fixes * docker login fix * take out vaults for now * fixes * fixes * fixes * fixes * fixes * fixes * fixes * Deploy fixes and new terraform * terraform reorg and fixes * oci_core_services fix * Update core.tf * Update core.tf * Update main-destroy.sh * fixes * Update core.tf * fixes * Update oke-setup.sh * fixes * Boost Node CPU and Memory * Rename states for clarity * Update containerengine.tf * Update main-setup.sh * Build perf and main-setup.sh restart * fix * compute shape and docker login enhancements * Update main-setup.sh * build perf tuning * build fixes * Update build-all.sh * Update oci-cli-cs-key-auth.sh * terraform 3 AD * Update oci-cli-cs-key-auth.sh * Update core.tf * fixes * Update core.tf * fixes Uncomment Internet Gateway Comment DHCP settings Move SSL creation to earlier Add wait for OKE to warm up * fixes PropSetup Back to single domain Wait for OKE nodes msdataworkshop alias cwallet.sso name change remove terraform-orig * fixes wallet.zip VM.Standard.B1.1 image Prune terraform status to 60 characters * fixes add cwallet.sso link rm wallet folder (for security) * fixes Destroy new object atp secrets wait for OKE improved logging and setup handling * minor fixes * Fixes Remove RUN_TYPE for now Execute JAVA_BUILD and NON_JAVA_BUILD from main-setup * Fixes No Key Generated messages Improve end of setup * Update containerengine.tf Change image shape * Fixes Hardening oke-setup Different Shape * Update oke-setup.sh Hardening * Parallel Destroy Make destroy run in parallel * chmod * Update main-setup.sh More hardening * Update main-setup.sh * Update oke-setup.sh More defensive code * Typo * SODA build + cleanup Replace SODA jar with maven dependency Remove old scripts Fix global deploy/undeploy scripts * Reorg Jaeger * Jaeger Fixes * DB Prep in Setup and DB Name Changes Moved DB Setup from Java to Shell Change DB Name to o and i * Fixes and Start of GB Integration * DB Name Changes * Update db-setup.sh Fixes * dotnet inventorylocation query * Update main-setup.sh * dotnet inventorylocation query * Update db-setup.sh * GB Integration and Prop Fixes * fixes * Update oci-cli-cs-key-auth.sh * Removed DB Setup from UI * Update oci-cli-cs-key-auth.sh * Dot Net and Go * Fixes * Update main-setup.sh * Manage Non-Java Builds Better * inventory-go work * Update main-destroy.sh * inventory-go work * inventory-go aq dequeue added * Build Reorg * Update main-setup.sh Reorg password collection * Update main-setup.sh Minor fixes * Minor Fixes * Binding Changes * Fixes * Remove Legacy Code Removed admin-helidon, atp-setup, Removed initContainers from deployment yamls * inventory-go working with pl/sql * Fixed inventory-helidon-se * Minor fixes * Update main-setup.sh * Update main-setup.sh * Update main-setup.sh * Update db-setup.sh * Update main-setup.sh * Update main-setup.sh * Update db-setup.sh * Update main-setup.sh * Update main-setup.sh * Update main-setup.sh * Update db-setup.sh * Fixes go build.sh fix * Update java-builds.sh * Update non-java-builds.sh * Update oke-setup.sh * Update oke-setup.sh * Update db-setup.sh * Update non-java-builds.sh * Update java-builds.sh * Update non-java-builds.sh * Update java-builds.sh * Update db-setup.sh * Update oke-setup.sh * Update java-builds.sh * Update non-java-builds.sh * Update java-builds.sh * Update non-java-builds.sh * Update oke-setup.sh * Simpler Approach * Update main-setup.sh * Update main-setup.sh * Update main-setup.sh * Update main-setup.sh * Update main-setup.sh * Update main-setup.sh * Update main-setup.sh Remove API Key based authentication as bug is fixed * Update main-destroy.sh Complete API Key removal * Update destroy.sh * Fix Inventory DotNet and Go * Update logback.xml Fixed inventory-helidon-se * Update db-setup.sh Protect password in it contains case special characters * dotnet and go services: switch to polling for msgs * verrazzano/multi-cloud work * verrazzano comp files * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * polyglot inventory service mods * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work Co-authored-by: RichardExley <Richard.exley@oracle.com> Co-authored-by: irina granat <irina.granat@oracle.com>
1 parent df15e5e commit 0408b70

File tree

6 files changed

+27
-66
lines changed

6 files changed

+27
-66
lines changed

grabdish/inventory-dotnet/dequeueenqueue.sql

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ IS
1212
pragma exception_init(no_messages, -25228);
1313

1414
BEGIN
15-
-- dequeue_options.wait := dbms_aq.NO_WAIT;
16-
-- dequeue_options.wait := dbms_aq.FOREVER;
15+
dequeue_options.wait := dbms_aq.NO_WAIT;
16+
-- dequeue_options.wait := dbms_aq.FOREVER;
1717
-- dequeue_options.navigation := dbms_aq.FIRST_MESSAGE;
1818
-- dequeue_options.dequeue_mode := dbms_aq.LOCKED;
1919

@@ -23,9 +23,10 @@ BEGIN
2323
message_properties => message_properties,
2424
payload => message,
2525
msgid => message_handle);
26-
26+
-- COMMIT;
27+
2728
-- p_action := message.get_string_property('action');
28-
-- p_orderid := message.get_int_property('orderid');
29+
-- p_orderid := message.get_int_property('orderid');
2930
p_orderInfo := message.text_vc;
3031
-- message.get_text(p_orderInfo);
3132

@@ -80,32 +81,4 @@ BEGIN
8081

8182
END;
8283
/
83-
show errors
84-
85-
select t1.sid, t1.serial#, t2.sql_fulltext
86-
from gv$session t1, gv$sql t2
87-
where t1.sql_id = t2.sql_id
88-
89-
DECLARE
90-
p_orderInfo varchar2(30);
91-
BEGIN
92-
dequeueOrderMessage(p_orderInfo);
93-
EXCEPTION
94-
when others then
95-
dbms_output.put_line(SQLERRM);
96-
END;
97-
/
98-
99-
DECLARE
100-
BEGIN
101-
enqueueInventoryMessage('asdf');
102-
EXCEPTION
103-
when others then
104-
dbms_output.put_line(SQLERRM);
105-
END;
106-
/
107-
commit;
108-
109-
select QUEUE_NAME, ENQUEUED_MSGS, DEQUEUED_MSGS from v$persistent_queues
110-
select SES_ADDR from v$transaction
111-
xterm to atp to get pstack
84+
show errors

grabdish/inventory-dotnet/inventory-dotnet-comp.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
apiVersion: core.oam.dev/v1alpha2
44
kind: Component
55
metadata:
6-
name: inventory-helidon-component
6+
name: inventory-dotnet-component
77
namespace: msdataworkshop
88
spec:
99
workload:
1010
apiVersion: oam.verrazzano.io/v1alpha1
1111
kind: VerrazzanoHelidonWorkload
1212
metadata:
13-
name: inventory-helidon-workload
13+
name: inventory-dotnet-workload
1414
labels:
15-
app: inventory-helidon
15+
app: inventory-dotnet
1616
spec:
1717
deploymentTemplate:
1818
metadata:
19-
name: inventory-helidon-deployment
19+
name: inventory-dotnet-deployment
2020
podSpec:
2121
containers:
2222
- name: inventory

grabdish/inventory-go/inventory-go-comp.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
apiVersion: core.oam.dev/v1alpha2
44
kind: Component
55
metadata:
6-
name: inventory-helidon-component
6+
name: inventory-go-component
77
namespace: msdataworkshop
88
spec:
99
workload:
1010
apiVersion: oam.verrazzano.io/v1alpha1
1111
kind: VerrazzanoHelidonWorkload
1212
metadata:
13-
name: inventory-helidon-workload
13+
name: inventory-go-workload
1414
labels:
15-
app: inventory-helidon
15+
app: inventory-go
1616
spec:
1717
deploymentTemplate:
1818
metadata:
19-
name: inventory-helidon-deployment
19+
name: inventory-go-deployment
2020
podSpec:
2121
containers:
2222
- name: inventory

grabdish/inventory-helidon-se/inventory-helidon-se-comp.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
apiVersion: core.oam.dev/v1alpha2
44
kind: Component
55
metadata:
6-
name: inventory-helidon-component
6+
name: inventory-helidon-se-component
77
namespace: msdataworkshop
88
spec:
99
workload:
1010
apiVersion: oam.verrazzano.io/v1alpha1
1111
kind: VerrazzanoHelidonWorkload
1212
metadata:
13-
name: inventory-helidon-workload
13+
name: inventory-helidon-se-workload
1414
labels:
15-
app: inventory-helidon
15+
app: inventory-helidon-se
1616
spec:
1717
deploymentTemplate:
1818
metadata:
19-
name: inventory-helidon-deployment
19+
name: inventory-helidon-se-deployment
2020
podSpec:
2121
containers:
2222
- name: inventory

grabdish/inventory-nodejs/inventory-nodejs-comp.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
apiVersion: core.oam.dev/v1alpha2
44
kind: Component
55
metadata:
6-
name: inventory-helidon-component
6+
name: inventory-nodejs-component
77
namespace: msdataworkshop
88
spec:
99
workload:
1010
apiVersion: oam.verrazzano.io/v1alpha1
1111
kind: VerrazzanoHelidonWorkload
1212
metadata:
13-
name: inventory-helidon-workload
13+
name: inventory-nodejs-workload
1414
labels:
15-
app: inventory-helidon
15+
app: inventory-nodejs
1616
spec:
1717
deploymentTemplate:
1818
metadata:
19-
name: inventory-helidon-deployment
19+
name: inventory-nodejs-deployment
2020
podSpec:
2121
containers:
2222
- name: inventory
@@ -70,4 +70,4 @@ spec:
7070
volumes:
7171
- name: creds
7272
secret:
73-
secretName: db-wallet-secret-secret
73+
secretName: db-wallet-secret

grabdish/inventory-nodejs/inventory/app.js

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -165,23 +165,14 @@ async function processOrder() {
165165
let opStart = process.hrtime.bigint();
166166

167167
try {
168+
oracledb.autoCommit = false;
168169
connection = await oracledb.getConnection();
169170
const orderQueue = await connection.getQueue(queueConfig.orderQueue, queueOptions);
170-
logStats(opName, opStart, process.hrtime.bigint());
171-
171+
logStats(opName, opStart, process.hrtime.bigint());
172172
const orderMsg = await orderQueue.deqOne();
173173
opName = 'Inventory:ordQConsumer';
174-
opStart = process.hrtime.bigint();
175-
// TODO - Validate message
174+
opStart = process.hrtime.bigint();
176175
const orderMsgContent = JSON.parse(orderMsg.payload.TEXT_VC);
177-
178-
//console.log(`orderMsgContent = ${JSON.stringify(orderMsgContent)}`);
179-
180-
// TODO - Update logic to handle multiple records with the same inventory count
181-
// May have to check the locations that have at least one row of inventory and then
182-
// try to decrement whichever one we can (may have to loop or perform some other
183-
// process)
184-
185176
const updateSQL =
186177
`update inventory
187178
set inventorycount = inventorycount - 1
@@ -224,12 +215,9 @@ async function processOrder() {
224215
TEXT_VC: inventoryMsgText,
225216
TEXT_LEN: inventoryMsgText.length
226217
});
227-
228-
//console.log(`Enqueuing message ${JSON.stringify(inventoryMsgContent)} into inventoryQueue ${queueConfig.inventoryQueue}`);
229218

219+
//console.log(`Enqueuing message ${JSON.stringify(inventoryMsgContent)} into inventoryQueue ${queueConfig.inventoryQueue}`);
230220
const inventoryMsg = await inventoryQueue.enqOne({payload: inventoryMsgContent, priority: 2});
231-
232-
// TODO - See if there is a way to commit on the enqueue without having to use an additional roundtrip
233221
await connection.commit();
234222

235223
logStats(opName, opStart, process.hrtime.bigint());

0 commit comments

Comments
 (0)