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

URLs in logs include trailing parentheses #15239

Closed
EmilRex opened this issue Sep 5, 2024 · 0 comments · Fixed by PrefectHQ/prefect-ui-library#2708
Closed

URLs in logs include trailing parentheses #15239

EmilRex opened this issue Sep 5, 2024 · 0 comments · Fixed by PrefectHQ/prefect-ui-library#2708
Labels
bug Something isn't working ui Related to the Prefect web interface

Comments

@EmilRex
Copy link
Contributor

EmilRex commented Sep 5, 2024

Bug summary

URLs in logs that end with trailing parentheses (e.g. https://example.com)) include the parentheses in the actual link. This is particularly problematic when logging markdown which follows the [text](url) pattern. Ideally, trailing parentheses should not be included in any hyperlinks.

from prefect import flow, get_run_logger

@flow
def hello():
    logger = get_run_logger()
    logger.info("Hello, https://example.com")
    logger.info("Hello, https://example.com(")
    logger.info("Hello, https://example.com)")
    logger.info("Hello, [Example](https://example.com)")

if __name__ == "__main__":
    hello()
Screenshot 2024-09-05 at 10 38 22 AM

Version info (prefect version output)

Version:             2.20.4
API version:         0.8.4
Python version:      3.12.5
Git commit:          3b951c35
Built:               Wed, Aug 28, 2024 9:09 PM
OS/Arch:             darwin/arm64
Profile:             local
Server type:         server

Additional context

URL resolution in logs seems to have been added in this PR and the relevant regex lives here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ui Related to the Prefect web interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants