mirror of
				https://github.com/open-metadata/OpenMetadata.git
				synced 2025-10-31 02:29:03 +00:00 
			
		
		
		
	Minor: Remove trailing slash from FivetranClient base URL (#17528)
* fix: Remove trailing slash from FivetranClient base URL * chore: use a method created for removing trailing slash
This commit is contained in:
		
							parent
							
								
									c08b83f41d
								
							
						
					
					
						commit
						7ada44a315
					
				| @ -33,6 +33,7 @@ from metadata.ingestion.source.dashboard.metabase.models import ( | ||||
|     MetabaseUser, | ||||
| ) | ||||
| from metadata.utils.constants import AUTHORIZATION_HEADER, NO_ACCESS_TOKEN | ||||
| from metadata.utils.helpers import clean_uri | ||||
| from metadata.utils.logger import ingestion_logger | ||||
| 
 | ||||
| logger = ingestion_logger() | ||||
| @ -78,7 +79,7 @@ class MetabaseClient: | ||||
|         self.config = config | ||||
|         session_token = self._get_metabase_session() | ||||
|         client_config: ClientConfig = ClientConfig( | ||||
|             base_url=str(self.config.hostPort)[:-1],  # remove trailing slash | ||||
|             base_url=clean_uri(str(self.config.hostPort)), | ||||
|             api_version=API_VERSION, | ||||
|             auth_header=AUTHORIZATION_HEADER, | ||||
|             auth_token=lambda: (NO_ACCESS_TOKEN, 0), | ||||
|  | ||||
| @ -20,6 +20,7 @@ from metadata.generated.schema.entity.services.connections.pipeline.fivetranConn | ||||
|     FivetranConnection, | ||||
| ) | ||||
| from metadata.ingestion.ometa.client import REST, ClientConfig | ||||
| from metadata.utils.helpers import clean_uri | ||||
| 
 | ||||
| 
 | ||||
| class FivetranClient: | ||||
| @ -36,7 +37,7 @@ class FivetranClient: | ||||
|         ) | ||||
| 
 | ||||
|         client_config: ClientConfig = ClientConfig( | ||||
|             base_url=str(self.config.hostPort), | ||||
|             base_url=clean_uri(str(self.config.hostPort)), | ||||
|             api_version="v1", | ||||
|             auth_header="Authorization", | ||||
|             auth_token=lambda: (api_token[2:-1], 0), | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Ayush Shah
						Ayush Shah