Skip to content

make status checks configurable from env vars + use shorter replication interval for testing #10368

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

Merged
merged 4 commits into from
Feb 16, 2022

Conversation

jrhizor
Copy link
Contributor

@jrhizor jrhizor commented Feb 16, 2022

We spend quite a lot of time in Kubernetes integration testing just waiting for status checks. Here I'm allowing the values to be configurable in the environment and then using those for both of the Kuberentes acceptance tests, hopefully increasing the speed of the tests.

I split this into two commits so it'd be easier to review but also so we can get a sense of the speed up. I think this will help on local and CI iteration when running the acceptance tests. (EDIT: I forgot to push them individually, so I added two reverts so we can actually compare)

@pmossman I don't really have a use case for configuring the other values outside of replication, but I just figured it would make sense to have these easily configurable.

@jrhizor jrhizor requested review from pmossman and lmossman February 16, 2022 00:18
@github-actions github-actions bot added area/platform issues related to the platform area/worker Related to worker kubernetes labels Feb 16, 2022
@jrhizor jrhizor temporarily deployed to more-secrets February 16, 2022 00:20 Inactive
@jrhizor jrhizor temporarily deployed to more-secrets February 16, 2022 00:21 Inactive
@pmossman
Copy link
Contributor

Haha so we had some discussion around whether or not these status check intervals should be configurable via env-vars, thread here: https://docs.google.com/document/d/1w9UBa1xTQcpJYLjmWi8zMLYN3vZ6DhDVyTxFIM5hgxk/edit?disco=AAAAVLvHHqI

We didn't consider acceptance testing as a use case for wanting to configure shorter intervals, so I think this makes sense. @cgardens @davinchia FYI in case you have a stronger opinion than I do

Copy link
Contributor

@pmossman pmossman left a comment

Choose a reason for hiding this comment

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

See my comment about the hardcoding discussion, I don't think the opinions expressed were strong so I'm comfortable moving forward with this to speed up our tests. I kind of doubt we'll see much/any usage from the configuration of non-replication-worker intervals but it doesn't hurt for the sake of consistency

*
* In seconds if specified by environment variable.
*/
Duration getDefaultWorkerStatusCheckInterval();
Copy link
Contributor

Choose a reason for hiding this comment

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

can you go through the class doc string and follow that accordingly?

I'm guessing these should be marked as internal-use only since we don't want to expose them to OSS users.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops missed this.

Added in #10390

Copy link
Contributor

@davinchia davinchia left a comment

Choose a reason for hiding this comment

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

haha yes, not strong opinions. this is good!

@jrhizor
Copy link
Contributor Author

jrhizor commented Feb 16, 2022

Looks like this shaves off almost 5 min!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/platform issues related to the platform area/worker Related to worker kubernetes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants