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

[BugBash] SC2001: Remove sed as it's not required #3248

Merged
merged 9 commits into from
Jul 6, 2022
Merged

[BugBash] SC2001: Remove sed as it's not required #3248

merged 9 commits into from
Jul 6, 2022

Conversation

anuragpaliwal80
Copy link
Contributor

What problem does this PR solve?

What's changed and how it works?

Remove sed as it's not required

Related changes

  • Need to update chaos-mesh/website
  • Need to update Dashboard UI
  • Need to cheery-pick to release branches
    • release-2.1
    • release-2.0

Checklist

CHANGELOG

  • I have updated the CHANGELOG.md
  • I have labeled this PR with "no-need-update-changelog"

Tests

  • Unit test
  • E2E test
  • No code
  • Manual test (add steps below)

Side effects

  • Breaking backward compatibility

Release note

Please add a release note.

You can safely ignore this section if you don't think this PR needs a release note.

DCO

If you find the DCO check fails, please run commands like below (Depends on the actual situations. For example, if the failed commit isn't the most recent) to fix it:

git commit --amend --signoff
git push --force

@ti-chi-bot
Copy link
Member

ti-chi-bot commented May 7, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • Andrewmatilde
  • STRRL

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

install.sh Outdated
@@ -581,7 +581,7 @@ install_kind() {
err_msg=$(kind version 2>&1 1>/dev/null)
if [ "$err_msg" == "" ]; then
v=$(kind version | awk '{print $2}' | sed s/v//g)
target_version=$(echo "${kind_version}" | sed s/v//g)
target_version=$(echo "${kind_version//v/g}")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SC2116: Useless echo? Instead of 'cmd $(echo foo)', just use 'cmd foo'.

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

Signed-off-by: Anurag Paliwal <anuragpaliwal@gmail.com>
@STRRL STRRL added the bugbash label May 8, 2022
Signed-off-by: Anurag Paliwal <anuragpaliwal@gmail.com>
@anuragpaliwal80
Copy link
Contributor Author

Markdown check are failing as

ERROR: 1 dead links found!
[✖] https://www.microsoft.com/ → Status: 0

Signed-off-by: Anurag Paliwal <anuragpaliwal@gmail.com>
install.sh Outdated
@@ -318,7 +318,7 @@ install_kubectl() {
err_msg=$(kubectl version --client=true 2>&1 1>/dev/null)
if [ "$err_msg" == "" ]; then
v=$(kubectl version --client=true | sed 's/.*GitVersion:\"v\([0-9.]*\).*/\1/g')
target_version=$(echo "${kubectl_version}" | sed s/v//g)
target_version=${kind_version//v/g}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#!/usr/bin/env bash

kubectl_version="v0.11.1"
target_version=$(echo "${kubectl_version}" | sed s/v//g)
echo ${target_version}
target_version=${kubectl_version//v/g}
echo ${target_version}

I have write a test script , but it return:

0.11.1
g0.11.1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#!/usr/bin/env bash
kubectl_version="v0.11.1"
target_version=$(echo "${kubectl_version}" | sed s/v//g)
echo ${target_version}
target_version=${kubectl_version//v}
echo ${target_version}

Returns ->

0.11.1
0.11.1

Signed-off-by: Anurag Paliwal <anuragpaliwal@gmail.com>
Copy link
Member

@STRRL STRRL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Member

@Andrewmatilde Andrewmatilde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@STRRL
Copy link
Member

STRRL commented Jun 8, 2022

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 2bf6514

@ti-chi-bot
Copy link
Member

@anuragpaliwal80: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ti-chi-bot ti-chi-bot merged commit c5ab2fe into chaos-mesh:master Jul 6, 2022
STRRL pushed a commit to Garima-Negi/chaos-mesh that referenced this pull request Sep 13, 2022
* SC2001: Remove sed as it's not required

Signed-off-by: Anurag Paliwal <anuragpaliwal@gmail.com>

* Fix lift error

Signed-off-by: Anurag Paliwal <anuragpaliwal@gmail.com>

* Update CHANGELOG.md

Signed-off-by: Anurag Paliwal <anuragpaliwal@gmail.com>

* One more fix

Signed-off-by: Anurag Paliwal <anuragpaliwal@gmail.com>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Co-authored-by: Cwen Yin <cwenyin0@gmail.com>
Signed-off-by: STRRL <im@strrl.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants