fix(interop): use standaloneTransports as string instead of param#219
Merged
fix(interop): use standaloneTransports as string instead of param#219
Conversation
When generating the test specification (docker-compose file) we enumerate all transport permutations. While some of our transports need to be upgraded (e.g. TCP and WS) some don't (e.g. QUIC or WebRTC). To differentiate the two we execute two SQL queries (`queryResults` and `standaloneTransportsQueryResults`), each with either a `AND _ NOT IN` or `AND _ IN`. The previous implementation would use `node-sqlite3` query parameters (see https://github.com/TryGhost/node-sqlite3/wiki/API#runsql--param---callback) to provide the list of transport protocols that don't need upgrading as an array. The problem is that `node-sqlite3` does not support arrays as query parameters, see TryGhost/node-sqlite3#762. This commit uses string interpolation instead to inject the list of standalone transports into the SQL queries.
Contributor
|
Should we have an output from the action, counting the number of run tests so we can assert it after? |
MarcoPolo
approved these changes
Jul 5, 2023
Contributor
MarcoPolo
left a comment
There was a problem hiding this comment.
Unfortunate that we have to use string interopolation here :(
Contributor
|
I'm going to merge this despite CI not being happy because the current state of master is wrong. CI is being flaky, but should be fixed by #224 |
codemaestro64
pushed a commit
to codemaestro64/test-plans
that referenced
this pull request
Oct 28, 2025
…bp2p#219) * fix(interop): use standaloneTransports as string instead of param When generating the test specification (docker-compose file) we enumerate all transport permutations. While some of our transports need to be upgraded (e.g. TCP and WS) some don't (e.g. QUIC or WebRTC). To differentiate the two we execute two SQL queries (`queryResults` and `standaloneTransportsQueryResults`), each with either a `AND _ NOT IN` or `AND _ IN`. The previous implementation would use `node-sqlite3` query parameters (see https://github.com/TryGhost/node-sqlite3/wiki/API#runsql--param---callback) to provide the list of transport protocols that don't need upgrading as an array. The problem is that `node-sqlite3` does not support arrays as query parameters, see TryGhost/node-sqlite3#762. This commit uses string interpolation instead to inject the list of standalone transports into the SQL queries. * Nit --------- Co-authored-by: Marco Munizaga <git@marcopolo.io> Co-authored-by: Marco Munizaga <marco@marcopolo.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When generating the test specification (docker-compose file) we enumerate all transport permutations. While some of our transports need to be upgraded (e.g. TCP and WS) some don't (e.g. QUIC or WebRTC). To differentiate the two we execute two SQL queries (
queryResultsandstandaloneTransportsQueryResults), each with either aAND _ NOT INorAND _ IN.The previous implementation would use
node-sqlite3query parameters (see https://github.com/TryGhost/node-sqlite3/wiki/API#runsql--param---callback) to provide the list of transport protocols that don't need upgrading as an array.The problem is that
node-sqlite3does not support arrays as query parameters, see TryGhost/node-sqlite3#762.This commit uses string interpolation instead to inject the list of standalone transports into the SQL queries.
Follow-up to #210.
Fixes #218
Unblocks #217