Skip to content

fix: Don't send I-D expiration warning if it will happen within 12 hours.#4700

Merged
rjsparks merged 4 commits into
ietf-tools:mainfrom
russhousley:fix4635
Nov 8, 2022
Merged

fix: Don't send I-D expiration warning if it will happen within 12 hours.#4700
rjsparks merged 4 commits into
ietf-tools:mainfrom
russhousley:fix4635

Conversation

@russhousley

Copy link
Copy Markdown
Collaborator

Don't send I-D expiration warning if it will happen within 12 hours.

@jennifer-richards jennifer-richards changed the title fix: 4635 fix: Don't send I-D expiration warning if it will happen within 12 hours. Nov 5, 2022
@jennifer-richards jennifer-richards linked an issue Nov 5, 2022 that may be closed by this pull request

@jennifer-richards jennifer-richards left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is targeting main - would be nice to aim it at feat/tzaware instead. For either branch, replacing datetime.datetime.now() with timezone.now() as noted inline is preferable.

Comment thread ietf/doc/expire.py Outdated
return # don't warn about dead or inactive documents

expiration = doc.expires.date()
now_plus_12hours = datetime.datetime.now() + datetime.timedelta(hours=12)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should be timezone.now() instead of datetime.datetime.now()

@codecov

codecov Bot commented Nov 5, 2022

Copy link
Copy Markdown

Codecov Report

Merging #4700 (5180d38) into main (5b65f25) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #4700      +/-   ##
==========================================
+ Coverage   88.51%   88.52%   +0.01%     
==========================================
  Files         296      296              
  Lines       39840    39844       +4     
==========================================
+ Hits        35263    35272       +9     
+ Misses       4577     4572       -5     
Impacted Files Coverage Δ
ietf/doc/expire.py 95.31% <100.00%> (+0.15%) ⬆️
ietf/nomcom/utils.py 91.30% <0.00%> (-0.25%) ⬇️
ietf/utils/mail.py 79.62% <0.00%> (-0.24%) ⬇️
ietf/doc/views_search.py 89.44% <0.00%> (+0.20%) ⬆️
ietf/utils/draft.py 71.94% <0.00%> (+0.31%) ⬆️
ietf/utils/text.py 87.19% <0.00%> (+1.21%) ⬆️
ietf/utils/pipe.py 86.95% <0.00%> (+4.34%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@rjsparks

rjsparks commented Nov 6, 2022

Copy link
Copy Markdown
Member

I'll retarget this and make the changes to use timezone.

@rjsparks
rjsparks marked this pull request as draft November 6, 2022 12:29
@rjsparks
rjsparks marked this pull request as ready for review November 8, 2022 12:59
@rjsparks
rjsparks merged commit 612f33e into ietf-tools:main Nov 8, 2022
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 13, 2022
@russhousley
russhousley deleted the fix4635 branch March 24, 2023 21:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

draft expiration warning with zero time left is not useful.

3 participants