Reputation: 1147
i am thinking of using AWS Glue's schema registry to host all of my protobuf models. I am currently following this example. In their Employee.proto
i see that they are importing packages from google
and gsr
like this:
package gsr.proto.post;
import "google/protobuf/wrappers.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "google/type/money.proto";
I was able to add the sample Employee.proto
to my schema registry just fine. However, I am running into import errors when I try to import my own protobuf package. Here is my sample .proto
file:
syntax = "proto3";
package com.my_repo.message.event;
import "com/my_repo/message/event/enums/Type.proto";
message Message {
message Alert {
string id = 1;
uint64 account_id = 2;
com.my_repo.message.event.enums.Type type = 3;
}
}
but i get the following error messages in my AWS console:
One schema failed to create
The following schema failed to create: "Message"
Here is the most recent error message: Schema definition of PROTOBUF data format is invalid: unable to find com/my_repo/message/event/enums/Type.proto
Granted, I have not yet added Type.proto
schema to the registry yet but i think the issue is that i need to add my package first. But i cannot seem to find a way to do that. Am I missing something here?
Thanks in advance
Upvotes: 2
Views: 454
Reputation: 11
To close this out, spoke to AWS Support and as of Feb 2024 this is not supported by Glue Schema Registry but is on the roadmap.
If you want to do imports, you will have to use a different schema registry otherwise you have to bake in everything you want to import.
Upvotes: 1