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

Suppress warning in the one test where we call to_time #2642

Merged
merged 3 commits into from
Jan 8, 2025

Conversation

mo-nathan
Copy link
Member

Let's see if CI passes and if the code passes for all the other devs. If so, we should just merge this.

@mo-nathan mo-nathan requested review from JoeCohen and nimmolo January 6, 2025 21:58
@mo-nathan mo-nathan mentioned this pull request Jan 6, 2025
@coveralls
Copy link
Collaborator

coveralls commented Jan 6, 2025

Coverage Status

coverage: 93.509%. remained the same
when pulling 193b8ca on njw-to_time-warning-suppression
into 20b1bac on main.

@JoeCohen
Copy link
Member

JoeCohen commented Jan 6, 2025

@mo-nathan:
I suggest commenting out the failing assertion in test/jobs/inat_import_job_test.rb:209.
It fails because the test stubbing is screwed up.
I'm working on it at the moment, but don't know if I will finish today.
I don't think we should let it hold up other PRs. It's "just" a test thing.

@nimmolo
Copy link
Contributor

nimmolo commented Jan 6, 2025

@mo-nathan @JoeCohen
The question here is the global config, though, isn't it?
Rails 7.2 wants us to consider opting in to this config in application.rb.

Copy link
Member

@JoeCohen JoeCohen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It passes for me locally.
(with ActiveSupport.to_time_preserves_timezone = true in test_blocked_ips).

@mo-nathan
Copy link
Member Author

I think they are only suggesting setting it if you're using it. It makes no difference for us outside of exactly that one test since we don't use it production code. I see no reason to not just ride with whatever the Rails maintainers think is the default since we really don't care.

@nimmolo
Copy link
Contributor

nimmolo commented Jan 6, 2025

Still sounds like it should probably be in config/application.rb to prevent a deprecation warning in case we use to_time in some other test in the future.

@mo-nathan mo-nathan marked this pull request as ready for review January 7, 2025 11:58
@mo-nathan
Copy link
Member Author

I think Nimmo and I are aligned on this approach. Haven't heard from @JoeCohen. I'll wait until this evening or tomorrow morning for more feedback. I'll go ahead and merge if I don't hear anything.

@JoeCohen
Copy link
Member

JoeCohen commented Jan 7, 2025

Makes sense to me. (Sorry. I thought I had responded earlier.)

@mo-nathan mo-nathan merged commit 372af50 into main Jan 8, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants