Skip to content

Commit

Permalink
Fix proto imports
Browse files Browse the repository at this point in the history
  • Loading branch information
martinboulais committed Oct 10, 2024
1 parent c38647a commit 3b68353
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/proto-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
cp aliecs/common/protos/events.proto Control/protobuf/protos
cp aliecs/common/protos/common.proto Control/protobuf/protos/protos
cp aliecs/common/protos/events.proto Framework/Backend/protos
cp aliecs/common/protos/common.proto Framework/Backend/protos/protos
cp aliecs/common/protos/common.proto Framework/Backend/protos
cp aliecs/apricot/protos/apricot.proto Control/protobuf/o2apricot.proto
rm -rf aliecs
- name: Check if there are any differences and create PR
Expand Down
10 changes: 9 additions & 1 deletion Framework/Backend/kafka/AliEcsEventMessagesConsumer.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,16 @@
const protobuf = require('protobufjs');
const path = require('node:path');
const { KafkaMessagesConsumer } = require('./KafkaMessagesConsumer.js');
const {getWebUiProtoIncludeDir} = require('../protobuf/getWebUiProtoIncludeDir.js');

const root = protobuf.loadSync(path.resolve(__dirname, '../protobuf/protos/events.proto');

Check notice

Code scanning / CodeQL

Syntax error Note

Error: Unexpected token
root.resolvePath = (origin, target) => {
if (path.isAbsolute(target)) {
return target;
}
return path.join(getWebUiProtoIncludeDir(), target);
}

const root = protobuf.loadSync(path.resolve(__dirname, '../protobuf/protos/events.proto'));
const EventMessage = root.lookupType('events.Event');

/**
Expand Down

0 comments on commit 3b68353

Please sign in to comment.