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

Preserve user parameters even when matching the default value #633

Closed
lordrip opened this issue Jan 14, 2024 · 0 comments · Fixed by #634
Closed

Preserve user parameters even when matching the default value #633

lordrip opened this issue Jan 14, 2024 · 0 comments · Fixed by #634
Assignees
Labels
bug Something isn't working canvas/config-form Configuration form related issues
Milestone

Comments

@lordrip
Copy link
Member

lordrip commented Jan 14, 2024

Please describe the task that needs to be done

Context

Currently, we're removing parameters set by the user that match the default value intending to have less verbose routes.

Although this is beneficial, there's an issue with the file component, detailed as follows:

from: file:someFile.txt
parameters:
  noop: true

In the previous route, noop=true implicitly set idempotent=true IF THE VALUE HAS NOT BEEN SET TO EITHER TRUE OR FALSE, usually this is OK and doesn't represent a problem.

In case the user wants to set noop=true and idempotent=false to force the file component to re-read the files when the scheduler kicks in, like the following:

from: file:someFile.txt
parameters:
  noop: true
  idempotent: false

Then we will remove the idempotent=false as it is the default value for the idempotent parameter, effectively blocking the user from setting a different behavior for the file component.

Changes

Preserve the user parameters even in case of matching the default value.

Notes

There's a working route that serves as example here

@lordrip lordrip added bug Something isn't working canvas/config-form Configuration form related issues labels Jan 14, 2024
@lordrip lordrip moved this from New to In Review in Kanban Board Jan 14, 2024
@lordrip lordrip added this to the 2.0.0 TP milestone Jan 14, 2024
@lordrip lordrip self-assigned this Jan 14, 2024
lordrip added a commit to lordrip/kaoto that referenced this issue Jan 14, 2024
…efault value intending to have less verbose routes.

There's an issue with the `file` component, detailed as follows:
```
from: file:someFile.txt
parameters:
  noop: true
```

In the previous route, `noop=true` implicitly set `idempotent=true` **IF THE VALUE HAS NOT BEEN SET TO EITHER TRUE OR FALSE**, usually this is OK and doesn't represent a problem.

In case the user wants to set `noop=true` and `idempotent=false` to force the `file` component to re-read the files when the scheduler kicks in, like the following:

```
from: file:someFile.txt
parameters:
  noop: true
  idempotent: false
```

Then we will remove the `idempotent=false` as it is the default value for the `idempotent` parameter, effectively blocking the user from setting a different behavior for the `file` component.

This commit aims to keep values set by the user, even in case they are the default ones.

fixes: KaotoIO#633
lordrip added a commit to lordrip/kaoto that referenced this issue Jan 15, 2024
…efault value intending to have less verbose routes.

There's an issue with the `file` component, detailed as follows:
```
from: file:someFile.txt
parameters:
  noop: true
```

In the previous route, `noop=true` implicitly set `idempotent=true` **IF THE VALUE HAS NOT BEEN SET TO EITHER TRUE OR FALSE**, usually this is OK and doesn't represent a problem.

In case the user wants to set `noop=true` and `idempotent=false` to force the `file` component to re-read the files when the scheduler kicks in, like the following:

```
from: file:someFile.txt
parameters:
  noop: true
  idempotent: false
```

Then we will remove the `idempotent=false` as it is the default value for the `idempotent` parameter, effectively blocking the user from setting a different behavior for the `file` component.

This commit aims to keep values set by the user, even in case they are the default ones.

fixes: KaotoIO#633
lordrip added a commit that referenced this issue Jan 16, 2024
…efault value intending to have less verbose routes.

There's an issue with the `file` component, detailed as follows:
```
from: file:someFile.txt
parameters:
  noop: true
```

In the previous route, `noop=true` implicitly set `idempotent=true` **IF THE VALUE HAS NOT BEEN SET TO EITHER TRUE OR FALSE**, usually this is OK and doesn't represent a problem.

In case the user wants to set `noop=true` and `idempotent=false` to force the `file` component to re-read the files when the scheduler kicks in, like the following:

```
from: file:someFile.txt
parameters:
  noop: true
  idempotent: false
```

Then we will remove the `idempotent=false` as it is the default value for the `idempotent` parameter, effectively blocking the user from setting a different behavior for the `file` component.

This commit aims to keep values set by the user, even in case they are the default ones.

fixes: #633
@github-project-automation github-project-automation bot moved this from In Review to Done in Kanban Board Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working canvas/config-form Configuration form related issues
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant