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

add debug for investigating stack trace in logs #1606

Merged
merged 3 commits into from
Jul 22, 2024
Merged

Conversation

terrazoon
Copy link
Contributor

@terrazoon terrazoon commented Jun 10, 2024

Description

There is a stack trace happening, mostly down in the middleware, where an 'invalid IPv6 url' occurs, gets converted to a 500 error, but at the same time causes an exception down in werkzeug when it tries to log, because the RequestContext apparently doesn't have a 'service' attribute.

Wrap our method where the exception seems to occur in a try/except. This may be sufficient and all we can do for this issue (get the stack trace out of the log), but add some debug statements so we can have a better idea of what is actually going on. Like ... what is the original url we are trying to convert? Is it a IPv6 url? Who is using that and why, etc?

Security Considerations

N/A

@terrazoon terrazoon self-assigned this Jun 10, 2024
@terrazoon terrazoon linked an issue Jun 10, 2024 that may be closed by this pull request
3 tasks
@terrazoon terrazoon requested a review from a team June 10, 2024 20:24
@ccostino
Copy link
Contributor

Thanks, @terrazoon! This just needs a quick update against main whenever you have a moment.

Copy link

Terraform Format and Style: success
Terraform Initialization: success
Terraform Validation: success
Terraform Plan: success

Show Plan

module.api_network_route.data.cloudfoundry_space.space: Reading...
module.redis.data.cloudfoundry_space.space: Reading...
module.redis.data.cloudfoundry_service.redis: Reading...
module.logo_upload_bucket.data.cloudfoundry_service.s3: Reading...
module.logo_upload_bucket.data.cloudfoundry_space.space: Reading...
module.logo_upload_bucket.data.cloudfoundry_service.s3: Read complete after 0s [id=440ce9d9-b108-4bbe-80b4-08338f3cc25b]
module.redis.data.cloudfoundry_service.redis: Read complete after 0s [id=045871d3-d9a8-4a9b-a844-00a067fab054]
module.redis.data.cloudfoundry_space.space: Read complete after 1s [id=9745decb-4988-4bab-88a4-e3f07b36241c]
module.redis.cloudfoundry_service_instance.redis: Refreshing state... [id=a6e88a48-bae7-4cf4-84d5-3a86463e8814]
module.api_network_route.data.cloudfoundry_space.space: Read complete after 1s [id=9745decb-4988-4bab-88a4-e3f07b36241c]
module.api_network_route.data.cloudfoundry_app.destination_app: Reading...
module.api_network_route.data.cloudfoundry_app.source_app: Reading...
module.logo_upload_bucket.data.cloudfoundry_space.space: Read complete after 1s [id=9745decb-4988-4bab-88a4-e3f07b36241c]
module.logo_upload_bucket.cloudfoundry_service_instance.bucket: Refreshing state... [id=d67c8c05-f22b-4fca-ba0b-312af08a61eb]
module.api_network_route.data.cloudfoundry_app.source_app: Read complete after 0s [id=5d983d08-5079-4159-8721-67edf948d345]
module.api_network_route.data.cloudfoundry_app.destination_app: Read complete after 1s [id=89c9b6a9-f030-4752-b30f-6b3193a25148]
module.api_network_route.cloudfoundry_network_policy.internal_route: Refreshing state... [id=45c461a7-cc6c-c60d-cea7-1f5480589b64]

No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration
and found no differences, so no changes are needed.

Warning: Argument is deprecated

  with module.logo_upload_bucket.cloudfoundry_service_instance.bucket,
  on .terraform/modules/logo_upload_bucket/s3/main.tf line 14, in resource "cloudfoundry_service_instance" "bucket":
  14:   recursive_delete = var.recursive_delete

Since CF API v3, recursive delete is always done on the cloudcontroller side.
This will be removed in future releases

(and one more similar warning elsewhere)

Pusher: @terrazoon, Action: pull_request

Copy link
Contributor

@xlorepdarkhelm xlorepdarkhelm left a comment

Choose a reason for hiding this comment

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

LGTM

@ccostino
Copy link
Contributor

ccostino commented Jul 3, 2024

@terrazoon this just needs a quick sync with main; thanks!

Copy link
Contributor

@ccostino ccostino left a comment

Choose a reason for hiding this comment

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

Thanks, @terrazoon!

@ccostino ccostino merged commit 0b42fe7 into main Jul 22, 2024
11 checks passed
@ccostino ccostino deleted the notify-admin-1395 branch July 22, 2024 21:21
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 this pull request may close these issues.

Exception Investigation: builtins:ValueError
3 participants