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

Fix configuration timeout defaulting #15617

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

skonto
Copy link
Contributor

@skonto skonto commented Nov 15, 2024

Fixes #15616

Proposed Changes

  • As per title. We inject the right context for revision config to be properly updated with the latest values.
  • This affects revision-response-start-timeout-seconds, revision-idle-timeout-seconds, so that when they are equal to the revision-timeout-seconds in the defaults cm, they will not be set to 300 (default) at a revision that has no overrides of those values. Instead they are set to nil at the revision (0 at the QP side). Semantically this is correct, since when the timeouts are equal we don't need both anyway.

Release Note

NONE

@knative-prow knative-prow bot requested review from izabelacg and ReToCode November 15, 2024 11:03
@knative-prow knative-prow bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 15, 2024
@skonto skonto requested review from dprotaso and removed request for izabelacg November 15, 2024 11:03
Copy link

codecov bot commented Nov 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.79%. Comparing base (243e1ea) to head (308d56c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15617      +/-   ##
==========================================
- Coverage   80.80%   80.79%   -0.01%     
==========================================
  Files         222      222              
  Lines       18034    18044      +10     
==========================================
+ Hits        14572    14579       +7     
- Misses       3090     3093       +3     
  Partials      372      372              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@skonto skonto added this to the v1.17.0 milestone Nov 20, 2024
@skonto
Copy link
Contributor Author

skonto commented Dec 16, 2024

@dprotaso gentle ping.

Name: config.DefaultsConfigName,
},
Data: map[string]string{
"revision-timeout-seconds": "423",
Copy link
Contributor

Choose a reason for hiding this comment

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

Why was 423 chosen as the timeout value? Consider using a named constant or variable to make the
intent clear and maintain consistency across test files.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just picked a number. I will update with a constant.

},
},
},
ctx: func() context.Context {
Copy link
Contributor

Choose a reason for hiding this comment

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

The context setup logic is duplicated between configuration_defaults_test.go and
revision_defaults_test.go. Consider extracting this into a test helper function to improve
maintainability.

Copy link
Contributor Author

@skonto skonto Jan 14, 2025

Choose a reason for hiding this comment

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

Actually they are using a different config store although the func seems similar, which makes things harder because configs are of different types and don't inherit similar methods. I will give it a shot.

Copy link

knative-prow bot commented Jan 14, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: skonto
Once this PR has been reviewed and has the lgtm label, please ask for approval from dprotaso. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@skonto skonto force-pushed the response_time_fix branch from 610bdc8 to 308d56c Compare January 14, 2025 10:02
@skonto
Copy link
Contributor Author

skonto commented Jan 14, 2025

cc @dprotaso

@skonto
Copy link
Contributor Author

skonto commented Jan 14, 2025

/retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

revision-response-start-timeout-seconds is set wrongly
4 participants