Skip to content

Simplify the query language to search about properties #124

@cmoulliard

Description

@cmoulliard

TODO

Currently, konveyor uses such a syntax to perform a search against some files where the user can define the pateern to search about files like the content to search about

  when:
    builtin.filecontent:
      filePattern: application.*\.(properties|yml|yaml)
      pattern: server\.port|spring\.datasource|spring\.jpa

As we know thatwe would like to search about a properties file, then the syntax could be simplified like this

file.properties contains 'spring.datasource.url' => zero or 1 match
file.properties contains 'spring.*' => zero or n matches => this is a spring properties file
file.properties contains 'spring.jpa' => zero or n matches => this is a spring properties file with jpa. this is the equivalent of 'spring.jpa.*'

and

file.properties.dev contains 'spring.datasource.url'
file.properties.test contains 'spring.datasource.url'
file.properties.prod contains 'spring.datasource.url'
file.properties.* contains 'spring.datasource.url'
...

We could maybe allow also to search about a property=value

file.properties contains 'spring.datasource.url=jdbc:mysql://127.0.0.1:3306/todo'
file.properties contains 'spring.datasource.url=jdbc:://IP|HOSTNAME:/*' where IP, HOSTNAME, etc are reserved words to tell us that we should match a hostname: localhost, host.dns.name, OR IP address


WDYT ? @aureamunoz 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions