-
Notifications
You must be signed in to change notification settings - Fork 52
🐛 Add to E2E test a workaround to context bug #598
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -46,6 +46,12 @@ SRC_DIR="$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)" | |||||||||||||||
|
|
||||||||||||||||
| ${SRC_DIR}/cleanup.sh | ||||||||||||||||
| ${SRC_DIR}/setup-kubeflex.sh --release "${release}" | ||||||||||||||||
| cfgfile="${KUBECONFIG:-$HOME/.kube/config}" | ||||||||||||||||
| if [[ "$(yq -o=json .extensions "$cfgfile" )" =~ ^[[] ]]; then | ||||||||||||||||
| yq '.extensions |= [ .[] | select(.name != "kubeflex") ]' "$cfgfile" > $$ | ||||||||||||||||
| mv -f -- "$cfgfile" "${cfgfile}.bak" | ||||||||||||||||
| mv -- $$ "$cfgfile" | ||||||||||||||||
|
Comment on lines
+51
to
+53
|
||||||||||||||||
| yq '.extensions |= [ .[] | select(.name != "kubeflex") ]' "$cfgfile" > $$ | |
| mv -f -- "$cfgfile" "${cfgfile}.bak" | |
| mv -- $$ "$cfgfile" | |
| tmpfile="$(mktemp "${cfgfile}.XXXXXX")" | |
| yq '.extensions |= [ .[] | select(.name != "kubeflex") ]' "$cfgfile" > "$tmpfile" | |
| mv -f -- "$cfgfile" "${cfgfile}.bak" | |
| mv -- "$tmpfile" "$cfgfile" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are not multiple concurrent instaces. This is not a problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The regex pattern
^[[]is incorrect for checking if extensions is an array. The pattern has an unmatched opening bracket and will only match a literal '[' at the start. Use^\[instead to properly escape the bracket, or useyqto check the type directly with a command likeyq '.extensions | type' \"$cfgfile\".There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not seeing the alleged results from
type. I will stick with string matching.