Skip to content

Commit

Permalink
SNOW-947731 Remove deprecated avro-python3 package (snowflakedb#889)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-mbobowski committed Jul 30, 2024
1 parent eab4c9c commit 47624f5
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 17 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/End2EndTestApache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ jobs:
run: |
pip3 install --upgrade setuptools
sudo apt-get install librdkafka-dev
pip3 install requests certifi "confluent-kafka[avro,json,protobuf]==1.7.0"
pip3 install avro-python3 kafka-python
pip3 install --upgrade protobuf==3.20.0
pip3 install requests certifi "confluent-kafka[avro,json,protobuf]==1.9.2"
pip3 install avro kafka-python
pip3 install --upgrade protobuf==3.20.3
pip3 install --upgrade snowflake-connector-python==2.7.4
curl https://github.com/raw/helm/helm/master/scripts/get-helm-3 | bash
sudo apt-get -y install jq vim
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/End2EndTestConfluent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ jobs:
run: |
pip3 install --upgrade setuptools
sudo apt-get install librdkafka-dev
pip3 install requests certifi "confluent-kafka[avro,json,protobuf]==1.7.0"
pip3 install avro-python3 kafka-python
pip3 install --upgrade protobuf==3.20.0
pip3 install requests certifi "confluent-kafka[avro,json,protobuf]==1.9.2"
pip3 install avro kafka-python
pip3 install --upgrade protobuf==3.20.3
pip3 install --upgrade snowflake-connector-python==2.7.4
curl https://github.com/raw/helm/helm/master/scripts/get-helm-3 | bash
sudo apt-get -y install jq vim
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/IntegrationTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ jobs:
- name: Install Dependency
run: |
pip3 install --upgrade setuptools
pip3 install requests certifi "confluent-kafka[avro,json,protobuf]==1.7.0"
pip3 install avro-python3 kafka-python
pip3 install requests certifi "confluent-kafka[avro,json,protobuf]==1.9.2"
pip3 install avro kafka-python
pip3 install protobuf
pip3 install --upgrade snowflake-connector-python==2.7.4
curl https://github.com/raw/helm/helm/master/scripts/get-helm-3 | bash
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/StressTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ jobs:
run: |
pip3 install --upgrade setuptools
sudo apt-get install librdkafka-dev
pip3 install requests certifi "confluent-kafka[avro,json,protobuf]==1.7.0"
pip3 install avro-python3 kafka-python
pip3 install --upgrade protobuf==3.20.0
pip3 install requests certifi "confluent-kafka[avro,json,protobuf]==1.9.2"
pip3 install avro kafka-python
pip3 install --upgrade protobuf==3.20.3
pip3 install --upgrade snowflake-connector-python==2.7.4
curl https://github.com/raw/helm/helm/master/scripts/get-helm-3 | bash
sudo apt-get -y install jq
Expand Down
8 changes: 3 additions & 5 deletions test/test_suit/test_confluent_protobuf_protobuf.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@ def __init__(self, driver, nameSalt):
self.sensor.uint64_val = (1 << 64) - 1

self.schema_registry_client = SchemaRegistryClient({'url': driver.schemaRegistryAddress})
#uncomment for local tests
#self.keyProtobufSerializer = ProtobufSerializer(sensor_pb2.SensorReading, self.schema_registry_client, {'use.deprecated.format': True})
#self.valueProtobufSerializer = ProtobufSerializer(sensor_pb2.SensorReading, self.schema_registry_client, {'use.deprecated.format': True})
self.keyProtobufSerializer = ProtobufSerializer(sensor_pb2.SensorReading, self.schema_registry_client)
self.valueProtobufSerializer = ProtobufSerializer(sensor_pb2.SensorReading, self.schema_registry_client)
self.keyProtobufSerializer = ProtobufSerializer(sensor_pb2.SensorReading, self.schema_registry_client, {'use.deprecated.format': True})
self.valueProtobufSerializer = ProtobufSerializer(sensor_pb2.SensorReading, self.schema_registry_client, {'use.deprecated.format': True})

producer_conf = {
'bootstrap.servers': driver.kafkaAddress,
'key.serializer': self.keyProtobufSerializer,
Expand Down
1 change: 0 additions & 1 deletion test/test_suites.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ def create_end_to_end_test_suites(driver, nameSalt, schemaRegistryAddress, testS
test_instance=TestSchemaEvolutionAvroSR(driver, nameSalt), clean=True, run_in_confluent=True,
run_in_apache=False
)),
# SNOW-947731: Re-enable after avro-python3 package is updated in merge gate
("TestSchemaEvolutionAvroSRLogicalTypes", EndToEndTestSuite(
test_instance=TestSchemaEvolutionAvroSRLogicalTypes(driver, nameSalt), clean=True, run_in_confluent=False,
run_in_apache=False
Expand Down

0 comments on commit 47624f5

Please sign in to comment.