Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] TDVT action add_ds corrupts connection element of tds files #1218

Closed
hab6 opened this issue Feb 2, 2024 · 5 comments · Fixed by #1223
Closed

[BUG] TDVT action add_ds corrupts connection element of tds files #1218

hab6 opened this issue Feb 2, 2024 · 5 comments · Fixed by #1223

Comments

@hab6
Copy link

hab6 commented Feb 2, 2024

Describe the bug
When executing tdvt action --add_ds, the attributes of the connection element in the tds files are getting corrupted. In our case, the connection attribute class='actian_odbc' is being removed from the connection element as the attribute tdvtconnection=dsn123 is added. The tdvtconnection value (shown here as dsn123) doesn't seem to matter.

Research
To isolate the problem, I extracted the functions mangle_tds and updated_tds_as_str from setup_env.py into a simple test program parse2.py.txt. There were changes to this area of code in PR 1208.

Console Output of Test Program

C:\test> copy test.tds.orig test.tds

C:\test> python parse2.py
Modifying ./test.tds

C:\test> diff test.tds.orig test.tds
1c1
< <connection class='actian_odbc' dbname='testv1' one-time-sql='' port='21064' schema='abcschema' server='localhost' username='abctest' />
---
> <connection tdvtconnection='dsn123' dbname='testv1' one-time-sql='' port='21064' schema='abcschema' server='localhost' username='abctest' />

Desktop

  • OS: Windows 10
  • Tableau Desktop Versions: 2023.2.4 (20232.23.21215.0350) and 2023.3.1 (20233.23.1227.1336) both tested

Python & package versions

C:\test> python -V
Python 3.10.7

C:\test> pip list
Package    Version
---------- -------
defusedxml 0.7.1
pip        23.3.2
setuptools 63.2.0
tdvt       2.13.4

About you:
Name: Michael Habiger
Company: Actian Corporation

Copy link
Member

Thanks, I'll take a look.

Internal tracking: W-14959403

@hab6
Copy link
Author

hab6 commented Feb 20, 2024

@lukewrites I'm curious if you were able to reproduce the problem with the given test case.

@lukewrites
Copy link
Member

Hi @hab6 sorry for the delay I was out of office, planning to push a change to master today for this

@lukewrites
Copy link
Member

Hi @hab6 will have a PR out in a bit with our quarterly release that fixes this, but I put the code change from the release that should make it work on this branch: https://github.com/tableau/connector-plugin-sdk/tree/tds-regex

@hab6
Copy link
Author

hab6 commented Mar 12, 2024

We appreciate the updates @lukewrites

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants