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

Added ShellCheck check #55

Merged
merged 14 commits into from
Mar 9, 2022
Merged

Added ShellCheck check #55

merged 14 commits into from
Mar 9, 2022

Conversation

tovbinm
Copy link
Contributor

@tovbinm tovbinm commented Mar 9, 2022

About

Added ShellCheck check eliminate bugs in the shell script

Screenshots

Screen Shot 2022-03-09 at 08 51 44

Extras

  1. https://www.shellcheck.net/
  2. https://github.com/marketplace/actions/shellcheck?version=1.1.0

Copy link
Collaborator

@willmarks willmarks left a comment

Choose a reason for hiding this comment

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

Nice!

@willmarks
Copy link
Collaborator

It really doesn't like the way we use colors with printf

}' <<< "$request_body"
)
fi
if ! [ -z "$run_name" ]; then
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think passing run_name was missing - so I added it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

how do I test for it?

Copy link
Contributor

Choose a reason for hiding this comment

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

We need to find all the mutations where this needs to be added as a parameter and add it to their request body. Also, unfortunately the rest endpoint mutations need to be changed first, otherwise they'll fail on unexpected param (see https://github.com/hasura/graphql-engine/blob/master/rfcs/rest-endpoints.md#response-codes)

Maybe we can make these changes in a separate PR(s).

Copy link
Contributor

Choose a reason for hiding this comment

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

how do I test for it?

The tests just compare the expected and actual payload to hasura rest endpoints.

)
fi
}

function sendEventToFaros() {
log "Sending event to Faros..."

http_response=$(curl --retry 5 --retry-delay 5 \
--silent --write-out "HTTPSTATUS:%{http_code}" -X POST \
http_response=$(curl -s -S --retry 5 --retry-delay 5 \
Copy link
Contributor Author

Choose a reason for hiding this comment

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

-S was added to print connection errors out as well

faros_event.sh Show resolved Hide resolved
faros_event.sh Show resolved Hide resolved
faros_event.sh Show resolved Hide resolved
@ypc-faros ypc-faros merged commit b64cdb5 into main Mar 9, 2022
@ypc-faros ypc-faros deleted the tovbinm-patch-2 branch March 9, 2022 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants