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

POC: New beresp.error VCL variable #4097

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Commits on Apr 29, 2024

  1. vcc_expr: Remove vcc_expr_tostring() fmt argument

    All call sites pass the STRINGS type, so we can inline it directly.
    dridi committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    a3c515b View commit details
    Browse the repository at this point in the history
  2. vcc_expr: Allow STRING <cmp> STRANDS comparison

    This otherwise fails on a technicality that suggests the original intent
    was to allow such a comparison:
    
        Comparison of different types: STRING '==' STRING
    
    The STRANDS <cmp> STRING comparison is denied with a different error
    message.
    dridi committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    b4c5cb1 View commit details
    Browse the repository at this point in the history
  3. POC: vcc: Introduce an error type

    For now it is a mere string, but having a dedicated ERROR type leaves
    the door open to properties (eg. error.foo.errno) in the future.
    
    Error symbols are constants, not variables, but reuse the vcl-var.7
    codegen infrastructure.
    dridi committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    d3a7348 View commit details
    Browse the repository at this point in the history
  4. POC: vrt: Expose a new beresp.error variable

    The same should probably be done for resp in vcl_synth. The error field
    can be null, meaning there was either no error, or none was reported.
    There could be a catch-all "Unknown error" in the FSM and a respective
    error.unknown constant in VCL.
    
    Considerations like return(retry) not addressed.
    dridi committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    20bc748 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9f1b8c1 View commit details
    Browse the repository at this point in the history