Fix Tracy Connection in the Devcontainer #466
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
Resolves Issue #465
When we try to connect to Tracy in our application we get a connection error:
pyodbc.OperationalError: ('08S01', '[08S01] [FreeTDS][SQL Server]Unable to connect: Adaptive Server is unavailable or does not exist (20009) (SQLDriverConnect)')
Solution
Some simple code refactoring for clarity (not integral to the solution) as well as connecting your laptop to ethernet before attempting to connect to Tracy from within a devcontainer. In testing, our Tracy connection fails whenever we're connected to either BCSecure or BereaBYOD but when we plug our laptops into ethernet, the connection works with no issues:
Tests passed! The file executes as intended without error.
To Test
Swap to our branch
devcontainer_tracy_connection
, open VS Code in the LSF devcontainer, connect to Ethernet, put the Tracy password in the secret_config.yaml file and then runpython db_test.py
and ensure that it exits with no errors.