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

When there are preset values in the matching rule, the field is still marked as required #2060

Closed
Finenyaco opened this issue Jan 29, 2024 · 5 comments
Assignees
Labels
bug Something isn't working in a real release
Milestone

Comments

@Finenyaco
Copy link

Describe the bug

Steps to reproduce

  1. New a resource definition.
  2. Add two matching rule using template bulitin/aws-rds-mysql.
  3. Fill in different “Vpc Id” in the two rules and save.
  4. Check the resource definition UI Schema.

Result

  1. 'VPC ID' is marked as required.
image image

Expected behavior

When there are preset values in the matching rule, it should remove the field from the required list in the schema automatically.

Environment

  • Walrus version: v0.5.0

Additional context
Add any other context about the problem here.

@Finenyaco Finenyaco added the bug Something isn't working in a real release label Jan 29, 2024
@thxCode thxCode self-assigned this Jan 30, 2024
@thxCode thxCode added this to the v0.5.1 milestone Jan 30, 2024
@Finenyaco
Copy link
Author

Finenyaco commented Feb 1, 2024

Environment

  • Walrus version: main 57e7bb8
  • UI version: dev-a712ac5

Test Result:

  1. Create a resource definition using a template that includes a required list-type variable.
  2. Add two matching rules with different values.
  3. Check the definition UI schema. The variable is still required.
image

Another enhancement: #2097

@Finenyaco
Copy link
Author

Environment

  • Walrus version: main 5d939cc
  • UI version: dev-a712ac5

Test Result:

This issue still can be reproduced in variables of type list(map(string)).

@Finenyaco
Copy link
Author

Finenyaco commented Feb 2, 2024

Environment

  • Walrus version: main bd8b2f4
  • UI version: v0.5.1-rc1

Test Result:

Multiple required properties under a required object-type attribute, some of which have values set in the matching rules, while others do not, result in all properties becoming optional in the merged schema.

  • Check the matching rule:
image
  • Check the definition UI schema:
image

@Finenyaco
Copy link
Author

Environment

  • Walrus version: main ddec5a8
  • UI version: dev-be9a1a4

Test Result:

It can be reproduced using the following variable definitions:

  • template:
image
  • resource definition UI schema:
image

@Finenyaco
Copy link
Author

Environment

  • Walrus version: main b926a09
  • UI version: dev-5eecc2b

Test Result: pass

  • One required property.
image
  • No required property.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in a real release
Projects
None yet
Development

No branches or pull requests

2 participants