Skip to content

fix to refresh sts token at 80% of TTL for issue #2031#2035

Draft
chenxg283 wants to merge 3 commits intocelery:mainfrom
chenxg283:handle_sts_session_fix
Draft

fix to refresh sts token at 80% of TTL for issue #2031#2035
chenxg283 wants to merge 3 commits intocelery:mainfrom
chenxg283:handle_sts_session_fix

Conversation

@chenxg283
Copy link
Copy Markdown

Fix for issue #2031

  1. merge the common code to refresh the sts token in one if-block, i.e. either when sts token not present or when the token is going to expire soon;
  2. replanced the datetime.utcnow() as it is deprecated;
  3. refresh the sts token at 80% of its TTL.

@auvipy auvipy self-requested a review June 25, 2024 06:46
Copy link
Copy Markdown
Member

@auvipy auvipy left a comment

Choose a reason for hiding this comment

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

we will need extensive test coverage to very this changes

@Nusnus Nusnus marked this pull request as draft June 25, 2024 12:57
@Nusnus
Copy link
Copy Markdown
Member

Nusnus commented Jun 25, 2024

we will need extensive test coverage to very this changes

I am 100% with @auvipy here. I’ve converted the PR to draft until tests can be added.

Thank you and I hope you understand @chenxg283 🙏

@chenxg283
Copy link
Copy Markdown
Author

Sorry, i am new to this. Am I supposed to write the code for the test coverage?

@Nusnus
Copy link
Copy Markdown
Member

Nusnus commented Jun 30, 2024

Sorry, i am new to this.

It’s fine :)

Am I supposed to write the code for the test coverage?

Yes, you need to add automatic tests (that the CI will run automatically, but you can also run locally using tox).
These tests need to validate that the changes the PR introduces are indeed working as expected. They also need to ensure that there are no bugs, to the best reasonable effort possible.

You can see the existing test suites to check how other tests are implemented.

Copy link
Copy Markdown
Member

@auvipy auvipy left a comment

Choose a reason for hiding this comment

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

maybe this can be done with #2216?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants