xbp 10.7.0

XBP is a zero-config build pack that can also interact with proxies, kafka, sockets, synthetic monitors.
Documentation
�

!8�h���t�%SSKJrJr SSKJrJrJr SSKrSSKJ	r	J
r
 \RRS5r
\\S'\RRS5r\\S'\
(a\(d\"S	5 \"S
5e\"S\
35 \"S\SS
S35 \	"\
\5r\
\S'\"S5 "SS\5rg)�)�	BaseModel�ValidationError)�Optional�Dict�AnyN)�
create_client�Client�XLX_SUPABASE_URL�supabase_url�XLX_SUPABASE_ANON_KEY�supabase_keyz?Debug: Supabase URL or Key is missing in environment variables.z8Supabase URL or Key is missing in environment variables.zDebug: Supabase URL - zDebug: Supabase Key - �z... (truncated for security)�supabasez0Debug: Supabase client initialized successfully.c�n�\rSrSr%\\S'\\S'\\S'Sr\\\S'Sr	\\\S'Sr
\\\S'Sr\\\S	'Sr\\\S
'Sr
\\\S'Sr\\\S'Sr\\\S
'Sr\\\S'Sr\\\S'Sr\\\S'Sr\\\S'Sr\\\S'Sr\\\S'SrS\S\\\44SjrSrg)�PmDeployment��
project_id�
deployment_id�statusN�pm_id�pid�	commit_id�repository_url�commit_comment�time�commit_author_username�xbp_command�github_username�sha�repository_name�	sha_short�organization_name�project_namec���[S5 URSS9n[SU35 [RS5R	U5R5n[SU35 UR(a
[S5 U$[SUR35 U$![an[S	U35 eS
nAf[an[S[U535 eS
nAff=f)zr
Creates a new deployment entry in the Supabase database.

Returns:
    dict: The response from the Supabase API.
z)Debug: Starting create_deployment method.T)�
exclude_unsetz#Debug: Deployment data to insert - �pm_deployments�Debug: Supabase response - z3Debug: Deployment successfully created in Supabase.z$Debug: Failed to create deployment: �"Debug: Validation error occurred: Nz8Debug: An error occurred while creating the deployment: )
�print�dictr�table�insert�execute�datar�	Exception�str)�self�deployment_data�response�ve�es     �3C:\Users\floris\Documents\GitHub\xbp\deployments.py�create_deployment�PmDeployment.create_deployment's���	��=�>�"�i�i�d�i�;�O��7��7H�I�J� �~�~�&6�7�>�>��!�!(���
��/��z�:�;��}�}��K�L��O��<�X�]�]�O�L�M��O���	��6�r�d�;�<����	��J�3�q�6�(�S�
�
��		�s*�BB"�B"�"
C%�,B;�;
C%�C � C%�update_datac���[S5 [SU35 [SU35 [RS5RU5R	SU5R5n[SU35 UR(a
[S5 U$[SUR35 U$![an[S	U35 eS
nAf[an[S[U535 eS
nAff=f)a
Updates an existing deployment entry in the Supabase database.

Args:
    deployment_id (str): The ID of the deployment to update.
    update_data (dict): A dictionary containing the fields to update.

Returns:
    dict: The response from the Supabase API.
z)Debug: Starting update_deployment method.zDebug: Deployment ID - zDebug: Update data - r&rr'z3Debug: Deployment successfully updated in Supabase.z$Debug: Failed to update deployment: r(Nz8Debug: An error occurred while updating the deployment: )
r)rr+�update�eqr-r.rr/r0)r1rr9r3r4r5s      r6�update_deployment�PmDeployment.update_deploymentHs���	��=�>��+�M�?�;�<��)�+��7�8� �~�~�&6�7�>�>�{�K�N�N���0�07��	�
��/��z�:�;��}�}��K�L��O��<�X�]�]�O�L�M��O���	��6�r�d�;�<����	��J�3�q�6�(�S�
�
��		�s*�BB1�B1�1
C4�;C
�

C4�C/�/C4�)�__name__�
__module__�__qualname__�__firstlineno__r0�__annotations__rr�intrrrrrrrrrr r!r"r#r7rrr=�__static_attributes__r?�r6rrs���O����K��E�8�C�=���C��#���#�I�x��}�#�$(�N�H�S�M�(�$(�N�H�S�M�(��D�(�3�-��,0��H�S�M�0�!%�K��#��%�%)�O�X�c�]�)��C��#���%)�O�X�c�]�)�#�I�x��}�#�'+��x��}�+�"&�L�(�3�-�&��B#�s�#��c�FI�GJ�BK�#rGr)�pydanticrr�typingrrr�osrrr	�environ�getrr0rDr
r)�
ValueErrorrr?rGr6�<module>rNs���/�/�&�&�	�*��J�J�N�N�#5�6��c�6��J�J�N�N�#:�;��c�;��<�	�
K�L�
�B�D�D���|�n�-�.���|�B�Q�/�0�0L�M�N� ��|�<��&�<��8�9�W�9�WrG