In order to fulfill internal compliance requirements, the GitHub Actions pipeline needs to be updated to utilize self-hosted runners, not GitHub default runners.
By using compliant self-hosted runners, we can now run tests that have full connectivity to our test servers: SQL Server 2019 and SQL Server 2022.
What is this change?
.github/workflows/ci.yaml
To utlize compliant self-hosted runners, the key runs-on was updated to [self-hosted, 1ES.Pool=sqlmlutils_GH_RunnerPool].
The key matrix was updated to accommodate various versions of R and Python running on SQL Server 2019 and SQL Server 2022.
Based on the matrix combination, conditional job steps set the SERVER environment variable with the connection string of the target database using the syntax noted in GitHub Action Workflow Syntax.
Note: Take care not to leave any spaces between the last } and the >> because extra white space will result in incorrect connection string generation in the connectivity validation steps.
A new key/value pair cran::xml2 was added to the r-lib/actions/setup-r@v2 step which pulls the latest CRAN version of the R package. The addition of this key/value pair mitigates the error: Error: Error: <callr_remote_error: cannot open the connection> surfaced when running tests on R 3.5.3. The source link resolved for xml2 version 1.3.2 was a dead link, thus failing dependency resolution.
The r-version number was updated to explicitly use R 4.2.0. When the value is just 4.2, the latest point release will be chosen, which would now by 4.2.1. This surfaced an R error explained later.
Python/tests/package_management_pypi_test.py
Removal of legacy conditional pytest markers which skipped tests when running on the previous Travis CI test runners on Linux.
Addition of conditional to skip Python test test_already_installed_popular_ml_packages() which is extremely slow on CI, possibly due to package dependency resolution.
R/R/sqlPackage.R
An additional instance of the error length > 1 in coercion to 'logical(1)' surfaced when testing this change on R 4.2.1 as noted above. R 4.2.0 does not fail by design, but this fix cleans up code usage to adhere to requirements of the newest versions of R.
Why this change?
In order to fulfill internal compliance requirements, the GitHub Actions pipeline needs to be updated to utilize self-hosted runners, not GitHub default runners.
By using compliant self-hosted runners, we can now run tests that have full connectivity to our test servers: SQL Server 2019 and SQL Server 2022.
What is this change?
.github/workflows/ci.yaml
To utlize compliant self-hosted runners, the key
runs-on
was updated to[self-hosted, 1ES.Pool=sqlmlutils_GH_RunnerPool]
.The key
matrix
was updated to accommodate various versions of R and Python running on SQL Server 2019 and SQL Server 2022.Based on the matrix combination, conditional job steps set the
SERVER
environment variable with the connection string of the target database using the syntax noted in GitHub Action Workflow Syntax.Note: Take care not to leave any spaces between the last
}
and the>>
because extra white space will result in incorrect connection string generation in the connectivity validation steps.A new key/value pair
cran::xml2
was added to ther-lib/actions/setup-r@v2
step which pulls the latest CRAN version of the R package. The addition of this key/value pair mitigates the error:Error: Error: <callr_remote_error: cannot open the connection>
surfaced when running tests on R 3.5.3. The source link resolved forxml2
version 1.3.2 was a dead link, thus failing dependency resolution.The
r-version
number was updated to explicitly use R 4.2.0. When the value is just 4.2, the latest point release will be chosen, which would now by 4.2.1. This surfaced an R error explained later.Python/tests/package_management_pypi_test.py
Removal of legacy conditional pytest markers which skipped tests when running on the previous Travis CI test runners on Linux.
Addition of conditional to skip Python test
test_already_installed_popular_ml_packages()
which is extremely slow on CI, possibly due to package dependency resolution.R/R/sqlPackage.R
An additional instance of the error
length > 1 in coercion to 'logical(1)'
surfaced when testing this change on R 4.2.1 as noted above. R 4.2.0 does not fail by design, but this fix cleans up code usage to adhere to requirements of the newest versions of R.Per the latest R Release Notes:
How was this tested?