Skip to content
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

Support DateTime::Format::Natural >= 0.13_01 #352

Closed

Conversation

puck
Copy link
Contributor

@puck puck commented Feb 3, 2023

Version 0.13_01 switched from using DateTime to DateTime::HiRes for setting the initial time. This means we in turn need to use Test::MockTime::HiRes. This patch works okay if DateTime::Format::Natural v0.13 is used.

Error I was getting in Debian with libdatetime-format-natural-perl v0.14 and v0.15:

t/api/date.t .. 4/?

Failed test 'April in the past'

at t/api/date.t line 650.

got: '2023-03-31 16:00:00'

expected: '2015-03-31 16:00:00'

Failed test 'Monday in the past'

at t/api/date.t line 655.

got: '2023-01-29 16:00:00'

expected: '2015-11-22 16:00:00'

Failed test 'April in the future'

at t/api/date.t line 661.

got: '2023-03-31 16:00:00'

expected: '2016-03-31 16:00:00'

Some tests failed or we bailed out, tmp directory '/home/puck/personal/RT/debian/rt/request-tracker5/t/tmp/api-date.t-qhyuAiqU' is not cleaned

Looks like you failed 3 tests of 231.

Version 0.13_01 switched from using DateTime to DateTime::HiRes for setting
the initial time. This means we in turn need to use Test::MockTime::HiRes.

Error I was getting in Debian with libdatetime-format-natural-perl v0.14 and
v0.15:

  t/api/date.t .. 4/?
  #   Failed test 'April in the past'
  #   at t/api/date.t line 650.
  #          got: '2023-03-31 16:00:00'
  #     expected: '2015-03-31 16:00:00'

  #   Failed test 'Monday in the past'
  #   at t/api/date.t line 655.
  #          got: '2023-01-29 16:00:00'
  #     expected: '2015-11-22 16:00:00'

  #   Failed test 'April in the future'
  #   at t/api/date.t line 661.
  #          got: '2023-03-31 16:00:00'
  #     expected: '2016-03-31 16:00:00'
  # Some tests failed or we bailed out, tmp directory '/home/puck/personal/RT/debian/rt/request-tracker5/t/tmp/api-date.t-qhyuAiqU' is not cleaned
  # Looks like you failed 3 tests of 231.
@puck
Copy link
Contributor Author

puck commented Feb 3, 2023

Oooookay, I wasn't expected the formatting to get screwed up for the PR message. Please get the actual commit for the plain text version.

@puck
Copy link
Contributor Author

puck commented Feb 3, 2023

The test docker image needs to be updated to have libtest-mocktime-hires-perl installed in it, which I can't do. So the workflows on my branch all failed.

Perhaps the package installs could be in .github/workflows/github-action.yml?

@cbrandtbuffalo
Copy link
Member

We have some updates moving through the system that should get things passing again. This is merged to 4.4-trunk (maint): 8a2430f And this branch points to a new base image: https://github.com/bestpractical/rt/tree/4.4/update-docker-gdgraph

We needed updates for the hires change you found and also GD::Graph. It took a bit to get new versions of GD::Graph and Date::Extract pushed out to CPAN, but now that those are published we can get the pipeline all working again.

We should get the branch above merged soon, then we'll merge up to 5.0-trunk (stable) shortly after that.

Thanks for the PR and the notes. I'll keep this open until everything is merged and you confirm it's working for you.

@sunnavy
Copy link
Member

sunnavy commented Feb 3, 2023

I've merged 4.4/update-docker-gdgraph and also merged changes up to 5.0-trunk. Tests should pass now.

-sunnavy

@sunnavy sunnavy closed this Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants