thoughtspot / cs_tools

Scale your ThoughtSpot adoption with tools created by the ThoughtSpot Solutions Consulting organization.
https://thoughtspot.github.io/cs_tools/
Other
10 stars 6 forks source link

AttributeError: 'formatConfigDetails' is set to 'currencyFormatConfig', not 'numberFormatConfig' #170

Closed jmmizerany closed 2 months ago

jmmizerany commented 2 months ago

First Stop

Platform Configuration

cs-tools-info-2024-09-12

Description

When performing a cs_tools tools scriptability export on our cluster, when it gets to exporting liveboards this is where issues arise. I was able to modify the source code and grab the outputs where it's failing


FormatConfig(category='CURRENCY', numberFormatConfig=None, percentageFormatConfig=None, currencyFormatConfig={'locale': 'USD', 'unit': 'AUTO', 'decimals': 2.0, 
'toSeparateThousands': True}, customFormatConfig=None, isCategoryEditable=True) category
FormatConfig(category='CURRENCY', numberFormatConfig=None, percentageFormatConfig=None, currencyFormatConfig={'locale': 'USD', 'unit': 'AUTO', 'decimals': 2.0, 
'toSeparateThousands': True}, customFormatConfig=None, isCategoryEditable=True) numberFormatConfig

Need to upload log files securely?

No response

boonhapus commented 2 months ago

@jmmizerany This looks like it could be related to thoughtspot_tml#24 , I'll restrict cs_tools to betterproto[compile] < 2.0.0b7 and deploy over the the weekend.

On Monday, please update to 1.5.10 and try your scriptability export again.

curl \
    --silent --show-error --location-trusted \
    https://raw.githubusercontent.com/thoughtspot/cs_tools/master/cs_tools/updater/_bootstrapper.py \
    | python3 - --install
jmmizerany commented 2 months ago

@jmmizerany This looks like it could be related to thoughtspot_tml#24 , I'll restrict cs_tools to betterproto[compile] < 2.0.0b7 and deploy over the the weekend.

On Monday, please update to 1.5.10 and try your scriptability export again.

curl \
    --silent --show-error --location-trusted \
    https://raw.githubusercontent.com/thoughtspot/cs_tools/master/cs_tools/updater/_bootstrapper.py \
    | python3 - --install

Great thank you! Also, is this project available for the community to contribute to? If so I don't mind opening a PR to fix this too

boonhapus commented 2 months ago

@jmmizerany it totally is open to the community.. but I also recognize that it's a medium large code base and a 5yr project with plenty of tech debt 😅

This change should be trivial, it's just adding the restriction to pyproject.toml (right now betterproto is transitive via thoughtspot_tml... and will likely go back to transitive once I get some time to fix thoughtspot_tml#24).

boonhapus commented 2 months ago

pip's a little bit too eager to skip recent betas apparently. We got there with something more explicit though betterproto[compiler] >= 2.0.0b5 , < 2.0.0b7

Try updating to the latest CS Tools and LMK if that resolves your error @jmmizerany

jmmizerany commented 2 months ago

pip's a little bit too eager to skip recent betas apparently. We got there with something more explicit though betterproto[compiler] >= 2.0.0b5 , < 2.0.0b7

Try updating to the latest CS Tools and LMK if that resolves your error @jmmizerany

Just verified this works! Thank you! 🚀