microsoft / sqlmlutils

Utility functions for easier usage of SQL Server Machine Learning Services
Other
32 stars 33 forks source link

Migrate Pipeline to Self-Hosted Runners and Remediate Tests #104

Closed seantleonard closed 2 years ago

seantleonard commented 2 years ago

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.

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:

Calling && or || with LHS or (if evaluated) RHS of length greater than one is now always an error, with a report of the form

'length = 4' in coercion to 'logical(1)'

How was this tested?