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

[WIP] Add TTL of cached documents in response headers #1798

Closed

Conversation

mayaCostantini
Copy link
Contributor

@mayaCostantini mayaCostantini commented Aug 23, 2022

Related Issues and Dependencies

Related to #1614

This introduces a breaking change

  • Yes

This should yield a new module release

  • Yes

This Pull Request implements

Add TTL for cached documents in HTTP response headers for the following endpoints:

  • /advise/python
  • /analyze
  • /build-analysis
  • /provenance/python

Description

This PR is a work in progress:

@sesheta sesheta added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 23, 2022
@sesheta sesheta added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 23, 2022
@@ -573,6 +578,7 @@ def post_advise_python(
"parameters": parameters,
},
202,
{"x-thoth-cached-document-ttl": cache_ttl},
Copy link
Member

Choose a reason for hiding this comment

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

Does the third element in the tuple map to headers?

Copy link
Member

@harshad16 harshad16 left a comment

Choose a reason for hiding this comment

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

lgtm
however one of headers is missing.

@@ -1062,6 +1069,7 @@ def post_build(
"buildlog_document_id": buildlog_document_id,
},
202,
{"x-thoth-cached-document-ttl": cache_ttl},
Copy link
Member

Choose a reason for hiding this comment

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

This is missing from the schema

headers:

@sesheta
Copy link
Member

sesheta commented Sep 14, 2022

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from mayacostantini by writing /assign @mayacostantini in a comment. For more information see:The Kubernetes 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants