-
Notifications
You must be signed in to change notification settings - Fork 26
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
feat: get-resource returns {} if json key not found #68
Conversation
This commit changes the behavior of the get-resource util to return {} instead of the empty string if a jsonpath is passed and the key is not found. Signed-off-by: Johnny Bieren <jbieren@redhat.com>
Bump the image used in the collect-data task to get a bug fix in the merge-json script (konflux-ci/release-service-utils#67) and a change to get-resource util to return {} instead of the empty string if the json key doesn't exist (konflux-ci/release-service-utils#68). Also removes all references to extraData in the task and replaces it with data to align with recent API changes. Signed-off-by: Johnny Bieren <jbieren@redhat.com>
Bump the image used in the collect-data task to get a bug fix in the merge-json script (konflux-ci/release-service-utils#67) and a change to get-resource util to return {} instead of the empty string if the json key doesn't exist (konflux-ci/release-service-utils#68). Also removes all references to extraData in the task and replaces it with data to align with recent API changes. Signed-off-by: Johnny Bieren <jbieren@redhat.com>
Bump the image used in the collect-data task to get a bug fix in the merge-json script (konflux-ci/release-service-utils#67) and a change to get-resource util to return {} instead of the empty string if the json key doesn't exist (konflux-ci/release-service-utils#68). Also removes all references to extraData in the task and replaces it with data to align with recent API changes. Signed-off-by: Johnny Bieren <jbieren@redhat.com>
Bump the image used in the collect-data task to get a bug fix in the merge-json script (konflux-ci/release-service-utils#67) and a change to get-resource util to return {} instead of the empty string if the json key doesn't exist (konflux-ci/release-service-utils#68). Also removes all references to extraData in the task and replaces it with data to align with recent API changes. Signed-off-by: Johnny Bieren <jbieren@redhat.com>
Bump the image used in the collect-data task to get a bug fix in the merge-json script (konflux-ci/release-service-utils#67) and a change to get-resource util to return {} instead of the empty string if the json key doesn't exist (konflux-ci/release-service-utils#68). Also removes all references to extraData in the task and replaces it with data to align with recent API changes. Signed-off-by: Johnny Bieren <jbieren@redhat.com>
Sorry to be late here. I can imagine situations where this wouldn't make sense, e.g. if you're looking for a string field and it's not there - then being given What's not ideal is that it will now return Also, I would have liked to have this behavior documented in the description. |
Bump the image used in the collect-data task to get a bug fix in the merge-json script (konflux-ci/release-service-utils#67) and a change to get-resource util to return {} instead of the empty string if the json key doesn't exist (konflux-ci/release-service-utils#68). Also removes all references to extraData in the task and replaces it with data to align with recent API changes. Signed-off-by: Johnny Bieren <jbieren@redhat.com>
I can open another PR to improve the documentation. I do agree about the second point, I planned to bring it up on the PR updating collect-data |
Probably not necessary to open a separate PR for the documentation. But if you're gonna address the second point, you can change it then. Also, I can do it :) Let me know. |
I opened a thread on the other PR and we can talk about what we want to do there |
Bump the image used in the collect-data task to get a bug fix in the merge-json script (konflux-ci/release-service-utils#67) and a change to get-resource util to return {} instead of the empty string if the json key doesn't exist (konflux-ci/release-service-utils#68). Also removes all references to extraData in the task and replaces it with data to align with recent API changes. Signed-off-by: Johnny Bieren <jbieren@redhat.com>
Bump the image used in the collect-data task to get a bug fix in the merge-json script (konflux-ci/release-service-utils#67) and a change to get-resource util to return {} instead of the empty string if the json key doesn't exist (konflux-ci/release-service-utils#68). Also removes all references to extraData in the task and replaces it with data to align with recent API changes. Signed-off-by: Johnny Bieren <jbieren@redhat.com>
This commit changes the behavior of the get-resource util to return {} instead of the empty string if a jsonpath is passed and the key is not found.