mohamedawnallah commented on PR #34398: URL: https://github.com/apache/beam/pull/34398#issuecomment-3051520645
It is weird that the password is still `None` for `ALLOYDB_PASSWORD` while testing CloudSQL PG DB given though this PR merged #35534 ``` self = <pg8000.dbapi.Connection object at 0x7b1b1fc4a640> data = b'\x00\x00\x00\nSCRAM-SHA-256\x00\x00' context = <pg8000.core.Context object at 0x7b1b1fb11310> def handle_AUTHENTICATION_REQUEST(self, data, context): """https://www.postgresql.org/docs/current/protocol-message-formats.html""" auth_code = i_unpack(data)[0] if auth_code == 0: pass elif auth_code == 3: if self.password is None: raise InterfaceError( "server requesting password authentication, but no password was " "provided" ) self._send_message(PASSWORD, self.password + NULL_BYTE) _flush(self._sock) elif auth_code == 5: salt = b"".join(cccc_unpack(data, 4)) if self.password is None: raise InterfaceError( "server requesting MD5 password authentication, but no password " "was provided" ) pwd = b"md5" + md5( md5(self.password + self.user).hexdigest().encode("ascii") + salt ).hexdigest().encode("ascii") self._send_message(PASSWORD, pwd + NULL_BYTE) _flush(self._sock) elif auth_code == 10: # AuthenticationSASL mechanisms = [m.decode("ascii") for m in data[4:-2].split(NULL_BYTE)] self.auth = scramp.ScramClient( mechanisms, self.user.decode("utf8"), > self.password.decode("utf8"), channel_binding=self.channel_binding, ) E AttributeError: 'NoneType' object has no attribute 'decode' target/.tox-py39-cloud/py39-cloud/lib/python3.9/site-packages/pg8000/core.py:594: AttributeError _ ERROR at setup of TestCloudSQLPostgresEnrichment.test_sql_enrichment_batched _ [gw2] linux -- Python 3.9.22 /runner/_work/beam/beam/sdks/python/test-suites/tox/py39/build/srcs/sdks/python/target/.tox-py39-cloud/py39-cloud/bin/python cls = <class 'apache_beam.transforms.enrichment_handlers.cloudsql_it_test.TestCloudSQLPostgresEnrichment'> @classmethod def setUpClass(cls): if not hasattr(cls, '_db_adapter'): # Skip setup for the base class. raise unittest.SkipTest("Base class - no db_adapter defined") # Type hint data from subclasses. cls._db_adapter: DatabaseTypeAdapter cls._instance_connection_uri: str cls._user: str cls._password: str cls._db_id: str cls._connection_config = CloudSQLConnectionConfig( db_adapter=cls._db_adapter, instance_connection_uri=cls._instance_connection_uri, user=cls._user, *** db_id=cls._db_id) > super().setUpClass() ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org