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

metrics: update produce_summaries to process specific date #3780

Closed
trivikr opened this issue Jun 26, 2024 · 2 comments · Fixed by #3791
Closed

metrics: update produce_summaries to process specific date #3780

trivikr opened this issue Jun 26, 2024 · 2 comments · Fixed by #3791

Comments

@trivikr
Copy link
Member

trivikr commented Jun 26, 2024

Is your feature request related to a problem? Please describe.

The produce_summaries Cloud Run only produces summaries for the previous day

let date = moment(new Date())
date = moment(date, 'YYYYMMDD').subtract(1, 'days').format('YYYYMMDD')

The summaries aren't being produced since 20240502, originally reported in #3697, and an investigation is happening in #3771 to increase request time.

Even if the issue with produce_summaries is fixed, we have to backfill summaries for dates which were missed.

Describe the solution you'd like

Process date parameter in from request params, as pass it to subsequent functions

app.post('/', async (req, res) => {
  await produceSummaries(req.params.date)
  res.status(200).send()
})

This will allow maintainer to request producing summaries for specific dates, like

curl -X POST "https://produce-summaries-kdtacnjogq-uc.a.run.app/?date=20240502" -H "Authorization: Bearer $(gcloud auth print-identity-token)"
@trivikr
Copy link
Member Author

trivikr commented Jul 2, 2024

Looks like there's an issue with how we processed the GET parameter in express

Source code

curl -X POST "https://produce-summaries-kdtacnjogq-uc.a.run.app/?date=20240401" -H "Authorization: Bearer $(gcloud auth print-identity-token)"

Output

2024-07-02 05:22:40.568 PDT POST 200 116 B 597.6 s curl/8.1.2 https://produce-summaries-kdtacnjogq-uc.a.run.app/?date=20240401 
2024-07-02 05:22:40.606 PDT 20240701/
2024-07-02 05:32:38.270 PDT Upload complete: nodejs.org-access.log.20240701.json

@trivikr
Copy link
Member Author

trivikr commented Jul 2, 2024

I cannot reopen this closed issue, so created a bug report at #3799

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant