Skip to content

Commit

Permalink
Port JIRA TODO comments to GitHub issue links. (#189)
Browse files Browse the repository at this point in the history
* Port JIRA TODO comments to GitHub issue links.

* Change PR template to include Cassie and Sunnie

* Commit Code Coverage Badge

* Commit Code Coverage Badge

---------

Co-authored-by: birschick-bq <[email protected]>
  • Loading branch information
Bruce Irschick and birschick-bq authored Feb 1, 2023
1 parent 3d4070b commit ffed142
Show file tree
Hide file tree
Showing 20 changed files with 51 additions and 57 deletions.
8 changes: 3 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@
<!--- Link to issue where this is tracked -->

### Additional Reviewers
@affonsoBQ
@CassieLyu
@sunnie629
@alexey-temnikov
@alinaliBQ
@andiem-bq
@affonsoBQ
@birschick-bq
@mitchell-elholm
@RoyZhang2022
<!-- Any additional reviewers -->
6 changes: 3 additions & 3 deletions .github/workflows/linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
sudo make install
# TODO enable clang-tidy-check
# https://bitquill.atlassian.net/browse/AD-726
# https://github.com/aws/amazon-documentdb-odbc-driver/issues/169

# generate compile_commands.json file for clang-tidy-check, requires mongocxx and boost dependencies
# - name: generate-compile-commands-file
Expand Down Expand Up @@ -276,7 +276,7 @@ jobs:
sudo make install
# TODO enable clang-tidy-check
# https://bitquill.atlassian.net/browse/AD-726
# https://github.com/aws/amazon-documentdb-odbc-driver/issues/169

# generate compile_commands.json file for clang-tidy-check, requires mongocxx and boost dependencies
# - name: generate-compile-commands-file
Expand Down Expand Up @@ -401,4 +401,4 @@ jobs:
# TODO Linux build enhacements
#https://bitquill.atlassian.net/browse/AD-688
# https://github.com/aws/amazon-documentdb-odbc-driver/issues/170
4 changes: 2 additions & 2 deletions .github/workflows/win-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
steps:
- uses: actions/checkout@v2
# TODO Reactivate cppcheck
# https://bitquill.atlassian.net/browse/AD-752
# https://github.com/aws/amazon-documentdb-odbc-driver/issues/171
# - name: setup-cppcheck
# id: setup_cppcheck
# run: |
Expand Down Expand Up @@ -300,7 +300,7 @@ jobs:
role-external-id: ${{ secrets.AWS_ROLE_EXTERNAL_ID }}
role-duration-seconds: 3600
# TODO Reactivate cppcheck
# https://bitquill.atlassian.net/browse/AD-752
# https://github.com/aws/amazon-documentdb-odbc-driver/issues/171
# - name: run-cppcheck
# id: setup_cppcheck
# run: |
Expand Down
4 changes: 2 additions & 2 deletions scripts/install_dependencies_mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ else
fi

# [Re-]Install mongodb server
# TODO [AD-833] make re-installing mongodb server optional
# https://bitquill.atlassian.net/browse/AD-833
# TODO: make re-installing mongodb server optional
# https://github.com/aws/amazon-documentdb-odbc-driver/issues/172
chmod +x $MAC_SCRIPT_DIR/reinstall_mongodb_mac.sh
$MAC_SCRIPT_DIR/reinstall_mongodb_mac.sh

Expand Down
2 changes: 1 addition & 1 deletion scripts/test_draft_linux.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# TODO: [AD-838](https://bitquill.atlassian.net/browse/AD-838)
# TODO: [Automate setting up environment variables when building driver on Linux](https://github.com/aws/amazon-documentdb-odbc-driver/issues/173)
# store current directory
CURRENT_DIR=$(pwd)

Expand Down
2 changes: 1 addition & 1 deletion src/markdown/setup/developer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Other Environment Variables
[`Optional`] Log configurations

Set these 2 variables only if you would like to set a custom log path or log level for connection tests; it is completely optional.
1. `DOC_DB_LOG_PATH`=`<path_to_log_file>`(e.g.:`"C:\\Users\\BitQuillUser\\Desktop\\DocumentDB ODBC Driver"`)
1. `DOC_DB_LOG_PATH`=`<path_to_log_file>`(e.g.:`"C:\\Users\\User\\Desktop\\DocumentDB ODBC Driver"`)

The user needs to ensure that the directory mentioned in the log file path does exist, or driver will ignore user's passed value and create the log file in the default log path. Do **not** include a slash at the end of the log path.

Expand Down
2 changes: 0 additions & 2 deletions src/odbc-test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ include_directories(include ../odbc/include)
if (WIN32)
include_directories(../odbc/os/win/include)
else ()
# TODO: Ensure MacOS is portable. https://bitquill.atlassian.net/browse/AD-525
include_directories(../odbc/os/linux/include)
endif()

Expand Down Expand Up @@ -187,7 +186,6 @@ if (WIN32)
../odbc/os/win/src/common/dynamic_load_os.cpp
)
else()
# TODO: Ensure MacOS is portable. https://bitquill.atlassian.net/browse/AD-525
list(APPEND SOURCES
../odbc/os/linux/src/common/concurrent_os.cpp
../odbc/os/linux/src/common/platform_utils.cpp
Expand Down
14 changes: 7 additions & 7 deletions src/odbc-test/src/api_robustness_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ BOOST_AUTO_TEST_CASE(TestSQLSetStmtAttrRowArraySize) {

#ifndef __APPLE__
// only enable for Windows and Linux as it crashes on Mac
// with iODBC, traced by AD-820
// https://bitquill.atlassian.net/browse/AD-820
// with iODBC, traced by [SPIKE] Two tests crashed on Mac with iODBC
// https://github.com/aws/amazon-documentdb-odbc-driver/issues/183
BOOST_AUTO_TEST_CASE(TestSQLDriverConnect) {
// There are no checks because we do not really care what is the result of
// these calls as long as they do not cause segmentation fault.
Expand Down Expand Up @@ -1146,7 +1146,7 @@ BOOST_AUTO_TEST_CASE(TestSQLSpecialColumns) {
SQLCloseCursor(stmt);
}

// TODO: Memory leak, traced by https://bitquill.atlassian.net/browse/AD-813
// TODO: Memory leak, traced by https://github.com/aws/amazon-documentdb-odbc-driver/issues/184
BOOST_AUTO_TEST_CASE(TestFetchScrollLast, *disabled()) {
CheckFetchScrollUnsupportedOrientation(SQL_FETCH_LAST);
}
Expand All @@ -1161,8 +1161,8 @@ BOOST_AUTO_TEST_CASE(TestFetchScrollFirst, *disabled()) {

#ifndef __APPLE__
// only enable for Windows and Linux as it crashes on Mac
// with iODBC, traced by AD-820
// https://bitquill.atlassian.net/browse/AD-820
// with iODBC, traced by [SPIKE] Two tests crashed on Mac with iODBC
// https://github.com/aws/amazon-documentdb-odbc-driver/issues/183
BOOST_AUTO_TEST_CASE(TestSQLError) {
// There are no checks because we do not really care what is the result of
// these calls as long as they do not cause segmentation fault.
Expand All @@ -1186,10 +1186,10 @@ BOOST_AUTO_TEST_CASE(TestSQLError) {
std::vector< SQLWCHAR > actualMessage;
actualMessage.insert(actualMessage.end(), &message[0],
&message[messageLen + 1]);
// variable actualMessage is to be used in AD-841
// variable actualMessage is to be used in https://github.com/aws/amazon-documentdb-odbc-driver/issues/185

#if 0
// TODO: [AD-841](https://bitquill.atlassian.net/browse/AD-841)
// TODO: https://github.com/aws/amazon-documentdb-odbc-driver/issues/185
// Check boundary condition with reduced buffer size.
ret = SQLGetTypeInfo(stmt, SQL_INTERVAL_MONTH);
BOOST_REQUIRE_EQUAL(ret, SQL_ERROR);
Expand Down
2 changes: 1 addition & 1 deletion src/odbc-test/src/attributes_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ BOOST_AUTO_TEST_CASE(ConnectionAttributeDefaultLoginTimeout) {
// TODO investigate why the setConnectAttr are not being called before
// establishing connection
// enable test after fix
// https://bitquill.atlassian.net/browse/AD-848
// https://github.com/aws/amazon-documentdb-odbc-driver/issues/186
#ifndef __APPLE__
BOOST_AUTO_TEST_CASE(ConnectionAttributeLoginTimeout) {
Prepare();
Expand Down
15 changes: 9 additions & 6 deletions src/odbc-test/src/meta_queries_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -641,8 +641,9 @@ BOOST_AUTO_TEST_CASE(TestColAttributeDataTypesAndColumnNames) {
SQLExecDirect(stmt, req.data(), SQL_NTS);

for (int i = 1; i <= numTests; i++) {
// TODO remove below if statement when bug from JDBC (AD-765) is fixed.
// https://bitquill.atlassian.net/browse/AD-766
// TODO remove below if statement when bug from JDBC is fixed.
// https://github.com/aws/amazon-documentdb-jdbc-driver/issues/498
// https://github.com/aws/amazon-documentdb-odbc-driver/issues/187
// the fieldNull pair is the 13th pair
if (i == 13)
continue;
Expand Down Expand Up @@ -734,8 +735,9 @@ BOOST_AUTO_TEST_CASE(TestColAttributeDescConciseType) {

callSQLColAttribute(stmt, req3, SQL_DESC_CONCISE_TYPE, SQL_VARBINARY);

// TODO re-enable this test when bug from JDBC (AD-765) is fixed.
// https://bitquill.atlassian.net/browse/AD-766
// TODO re-enable this test when bug from JDBC is fixed.
// https://github.com/aws/amazon-documentdb-jdbc-driver/issues/498
// https://github.com/aws/amazon-documentdb-odbc-driver/issues/187
// const SQLCHAR req4[] = "select fieldNull from meta_queries_test_001";
//
// callSQLColAttribute(stmt, req3, SQL_DESC_CONCISE_TYPE, SQL_TYPE_NULL);
Expand Down Expand Up @@ -1068,8 +1070,9 @@ BOOST_AUTO_TEST_CASE(TestColAttributeDescType) {

callSQLColAttribute(stmt, req3, SQL_DESC_TYPE, SQL_VARBINARY);

// TODO re-enable this test when bug from JDBC (AD-765) is fixed.
// https://bitquill.atlassian.net/browse/AD-766
// TODO re-enable this test when bug from JDBC is fixed.
// https://github.com/aws/amazon-documentdb-jdbc-driver/issues/498
// https://github.com/aws/amazon-documentdb-odbc-driver/issues/187
// const SQLCHAR req4[] = "select fieldNull from meta_queries_test_001";
//
// callSQLColAttribute(stmt, req4, SQL_DESC_TYPE, SQL_TYPE_NULL);
Expand Down
2 changes: 1 addition & 1 deletion src/odbc-test/src/queries_ssl_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ BOOST_AUTO_TEST_CASE(TestConnectionSslReject) {
}

// TODO fix bug on logintimeoutsec on JDBC and ODBC
// https://bitquill.atlassian.net/browse/AD-847
// https://github.com/aws/amazon-documentdb-odbc-driver/issues/188
BOOST_AUTO_TEST_CASE(TestLoginTimeout, *disabled()) {
Prepare();

Expand Down
10 changes: 5 additions & 5 deletions src/odbc-test/src/queries_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ BOOST_AUTO_TEST_CASE(TestTwoRowsString) {
BOOST_CHECK(ret == SQL_NO_DATA);
}

// TODO: Memory leak, traced by https://bitquill.atlassian.net/browse/AD-813
// TODO: Memory leak, traced by https://github.com/aws/amazon-documentdb-odbc-driver/issues/184
BOOST_AUTO_TEST_CASE(TestOneRowObject, *disabled()) {
connectToLocalServer("odbc-test");

Expand Down Expand Up @@ -1029,7 +1029,7 @@ BOOST_AUTO_TEST_CASE(TestExecuteAfterCursorClose) {
BOOST_CHECK_EQUAL(ret, SQL_NO_DATA);
}

// TODO: Memory leak, traced by https://bitquill.atlassian.net/browse/AD-813
// TODO: Memory leak, traced by https://github.com/aws/amazon-documentdb-odbc-driver/issues/184
BOOST_AUTO_TEST_CASE(TestCloseNonFullFetch, *disabled()) {
connectToLocalServer("odbc-test");

Expand Down Expand Up @@ -1092,7 +1092,7 @@ BOOST_AUTO_TEST_CASE(TestErrorMessage) {
}

// TODO fix bug on logintimeoutsec on JDBC and ODBC
// https://bitquill.atlassian.net/browse/AD-847
// https://github.com/aws/amazon-documentdb-odbc-driver/issues/188
BOOST_AUTO_TEST_CASE(TestLoginTimeout, *disabled()) {
Prepare();

Expand Down Expand Up @@ -1120,7 +1120,7 @@ BOOST_AUTO_TEST_CASE(TestLoginTimeout, *disabled()) {
}

// TODO fix bug on logintimeoutsec on JDBC and ODBC
// https://bitquill.atlassian.net/browse/AD-847
// https://github.com/aws/amazon-documentdb-odbc-driver/issues/188
BOOST_AUTO_TEST_CASE(TestConnectionTimeoutFail, *disabled()) {
Prepare();

Expand Down Expand Up @@ -1190,7 +1190,7 @@ BOOST_AUTO_TEST_CASE(TestManyCursors) {
}
}

// TODO: Memory leak, traced by https://bitquill.atlassian.net/browse/AD-813
// TODO: Memory leak, traced by https://github.com/aws/amazon-documentdb-odbc-driver/issues/184
BOOST_AUTO_TEST_CASE(TestManyCursors2, *disabled()) {
connectToLocalServer("odbc-test");

Expand Down
4 changes: 2 additions & 2 deletions src/odbc/include/documentdb/odbc/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ using documentdb::odbc::common::concurrent::CriticalSection;
}

// TODO replace and remove LOG_MSG
// https://bitquill.atlassian.net/browse/AD-703
// https://github.com/aws/amazon-documentdb-odbc-driver/issues/174
// @Deprecated
#define LOG_MSG(param) LOG_INFO_MSG(param)

Expand Down Expand Up @@ -184,7 +184,7 @@ class Logger {
static std::shared_ptr< Logger > GetLoggerInstance() {
// TODO add locks to prevent 2 or more instances being
// created at once
// [AD-716](https://bitquill.atlassian.net/browse/AD-716)
// [Add locks on getLoggerInstance](https://github.com/aws/amazon-documentdb-odbc-driver/issues/175)

if (!logger_)
logger_ = std::shared_ptr< Logger >(new Logger());
Expand Down
8 changes: 2 additions & 6 deletions src/odbc/src/config/configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ void Configuration::ToJdbcOptionsMap(ArgumentMap& res) const {
AddToMap(res, "refreshSchema", refreshSchema);
AddToMap(res, "defaultFetchSize", defaultFetchSize);
//TODO expose defaultAuthDB on the DSN config
//https://bitquill.atlassian.net/browse/AD-935
// https://github.com/aws/amazon-documentdb-odbc-driver/issues/176

}

Expand Down Expand Up @@ -592,7 +592,7 @@ std::string Configuration::ToMongoDbConnectionString(
mongoConnectionString << "@" << host;
mongoConnectionString << ":" << port;
//TODO expose defaultAuthDB on the DSN config
//https://bitquill.atlassian.net/browse/AD-935
// https://github.com/aws/amazon-documentdb-odbc-driver/issues/176
mongoConnectionString << "/admin";
mongoConnectionString << INIT_OPT << MONGO_URI_APPNAME << "="
<< EncodeURIComponent(GetApplicationName());
Expand Down Expand Up @@ -620,10 +620,6 @@ std::string Configuration::ToMongoDbConnectionString(
}
mongoConnectionString << options.str();

// tls configuration is handled using tls_options in connectionCPP
// TODO handle the other DSN configuration
// https://bitquill.atlassian.net/browse/AD-599

return mongoConnectionString.str();
}

Expand Down
2 changes: 1 addition & 1 deletion src/odbc/src/connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ bool Connection::ConnectCPPDocumentDB(int32_t localSSHTunnelPort,
mongocxx::options::tls tls_options;
if (config_.IsTls()) {
// TODO: Enable use of Amazon RDS CA certificate in driver
// [AD-941](https://bitquill.atlassian.net/browse/AD-941)
// [Enable use of Amazon RDS CA certificate in driver](https://github.com/aws/amazon-documentdb-odbc-driver/issues/177)
tls_options.allow_invalid_certificates(true);
client_options.tls_opts(tls_options);
}
Expand Down
6 changes: 3 additions & 3 deletions src/odbc/src/documentdb_column.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ ConversionResult::Type DocumentDbColumn::PutTime(
} break;
case bsoncxx::type::k_utf8:
// TODO: Determine if we could support reading data as string
// https://bitquill.atlassian.net/browse/AD-680
// https://github.com/aws/amazon-documentdb-odbc-driver/issues/178
convRes = ConversionResult::Type::AI_UNSUPPORTED_CONVERSION;
break;
default:
Expand Down Expand Up @@ -544,7 +544,7 @@ ConversionResult::Type DocumentDbColumn::PutDate(
} break;
case bsoncxx::type::k_utf8:
// TODO: Determine if we could support reading data as string
// https://bitquill.atlassian.net/browse/AD-680
// https://github.com/aws/amazon-documentdb-odbc-driver/issues/178
convRes = ConversionResult::Type::AI_UNSUPPORTED_CONVERSION;
break;
default:
Expand Down Expand Up @@ -576,7 +576,7 @@ ConversionResult::Type DocumentDbColumn::PutTimestamp(
} break;
case bsoncxx::type::k_utf8:
// TODO: Determine if we could support reading data as string
// https://bitquill.atlassian.net/browse/AD-680
// https://github.com/aws/amazon-documentdb-odbc-driver/issues/178
convRes = ConversionResult::Type::AI_UNSUPPORTED_CONVERSION;
break;
default:
Expand Down
4 changes: 2 additions & 2 deletions src/odbc/src/jni/java.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <vector>

// Todo: Refactor boost::optional to std::optional after code base is migrated
// to C++17 https://bitquill.atlassian.net/browse/AD-631
// to C++17 https://github.com/aws/amazon-documentdb-odbc-driver/issues/179

using namespace documentdb::odbc::common::concurrent;
using namespace documentdb::odbc::jni::java;
Expand Down Expand Up @@ -1099,7 +1099,7 @@ JniErrorCode JniContext::DriverManagerGetConnection(
}

// TODO enable string logging and hide the user password.
// https://bitquill.atlassian.net/browse/AD-702
// https://github.com/aws/amazon-documentdb-odbc-driver/issues/180
// LOG_INFO_MSG("Connection String: [" << connectionString << "]");

jstring jConnectionString = env->NewStringUTF(connectionString);
Expand Down
2 changes: 1 addition & 1 deletion src/odbc/src/odbc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ SQLRETURN SQLDriverConnect(SQLHDBC conn, SQLHWND windowHandle,
LOG_DEBUG_MSG("SQLDriverConnect called");

// TODO enable logging connection string
// https://bitquill.atlassian.net/browse/AD-702
// https://github.com/aws/amazon-documentdb-odbc-driver/issues/180

// if (inConnectionString)
// LOG_INFO_MSG("Connection String: [" << inConnectionString << "]");
Expand Down
6 changes: 3 additions & 3 deletions src/odbc/src/query/column_metadata_query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ SqlResult::Type ColumnMetadataQuery::GetColumn(
}

case ResultColumn::DECIMAL_DIGITS: {
// todo implement the function for getting the decimal digits:
// https://bitquill.atlassian.net/browse/AD-615
// TODO: implement the function for getting the decimal digits:
// https://github.com/aws/amazon-documentdb-odbc-driver/issues/181
boost::optional< int16_t > decDigits =
type_traits::BinaryTypeDecimalDigits(columnType);
if (!decDigits || *decDigits < 0)
Expand Down Expand Up @@ -318,7 +318,7 @@ SqlResult::Type ColumnMetadataQuery::GetColumn(
case ResultColumn::SQL_DATETIME_SUB: {
buffer.PutNull();
// todo implement the function for getting the datetime sub code:
// https://bitquill.atlassian.net/browse/AD-609
// https://github.com/aws/amazon-documentdb-odbc-driver/issues/182
break;
}

Expand Down
5 changes: 2 additions & 3 deletions src/odbc/src/utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,8 @@ size_t CopyUtf8StringToWcharString(const char* inBuffer, OutCharT* outBuffer,
// null-terminate target string, if room
pOutBuffer[lenConverted] = 0;

// TODO AD-843 Complete the following comment
// https://bitquill.atlassian.net/browse/AD-843
// Note:
// Note: This is to detect if resulting buffer is truncated.
// I.e., partial result or if we did not make it to the end of the input buffer.
isTruncated = (result == std::codecvt_base::partial
|| (inBufferEnd != pInBufferNext));
break;
Expand Down

0 comments on commit ffed142

Please sign in to comment.