-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run integration tests against many versions; remove warnings unless outside of that range #244
Conversation
Current failures across the matrix of Connect versions. Looks like there are a very small number of (tested) API changes we need to either adapt the package code to handle (or block the actions on too old versions), or skip tests conditionally. Older versions1.8.8.2
2021.09.0Basically the same:
2022.03.2
Current version: 2022.09.0This is surprising because the only difference seems to be the change in base image from bionic to jammy. We may want to switch some of these versions to use the bionic tag since the issue seems to go away by 2023.09.
Newer versions2023.03.0
2023.09.0
2024.03.0
|
I've fixed 2 of the jobs now. The remaining issues all have to do with strict type checking of a couple of API responses that appear to have gained attributes over time. I'll see if I can easily adapt the code to handle this, but if it's a more invasive change than I want to get into here, I may just conditionally skip the tests and create followup issues. It's a more general need to make the package more resilient to evolution in the Connect API, and that probably exceeds the scope of this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this. Both suggestions are very minor
version_to_docker_tag <- function(version) { | ||
# Prior to 2022.09.0, the plain version number was the tag | ||
# After, it's "<ubuntu-codename>-<version>" | ||
# If you want a specific image tag, just pass it in and it will go through unchanged | ||
try( | ||
{ | ||
numver <- numeric_version(version) | ||
if (numver > "2023.06") { | ||
version <- paste0("jammy-", version) | ||
} else if (numver >= "2022.09") { | ||
# There's both jammy and bionic for these, but the bionic ones | ||
# seem more reliable in CI | ||
version <- paste0("bionic-", version) | ||
} | ||
}, | ||
silent = TRUE | ||
) | ||
version | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At first I thought this might be over-complicated, but it's good, and we will soon have noble-
to deal with too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really just sugar; if you know the image tag you can just specify it (now, that is, bionic was hard-coded before). This just prevents us from having to remember whether it's bionic
or jammy
or whatever else.
tests/integrated/test-deploy.R
Outdated
|
||
# we just did this, so it should be less than 1 minute ago... | ||
# (really protecting against being off by hours b/c of timezone differences) | ||
expect_true(any((Sys.time() - allusg$time) < lubridate::make_difftime(60, "seconds"))) | ||
expect_lt(Sys.time() - allusg$time, lubridate::make_difftime(60, "seconds")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expect_lt(Sys.time() - allusg$time, lubridate::make_difftime(60, "seconds")) | |
expect_lt(Sys.time() - allusg$time, lubridate::make_difftime(60, "seconds"), label = "something is wrong with timezones since: object") |
This is very hacky, but would at least get that this is actually a timezone check a little bit clearer? Or maybe there's a better timezone check we should do more directly with the output?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eh, I think this will be better enough
…ure is clearer if it happens
…unless older than the oldest we now test
f3e6ebf
to
cde9e21
Compare
Edits integration-tests.yaml and supporting machinery to run against a matrix of versions. I went back to the oldest tagged version of our docker images, 1.8.8.2 from May 2021, and otherwise went every 6 months, from 2021.09.0 to 2024.03.0, the latest. Only very minor changes to some tests were required to be flexible for a few places where we've added fields to the API responses over the years.
Since it appears that the package generally works fine across this matrix of versions, I removed some of the scary language and warnings about Connect-
connectapi
version mismatch, and instead only warn if your Connect server is older than 1.8.8.2.Some light refactoring in a few places I had to touch along the way too.
Fixes #230, #105