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

Fixed download of NATS Server for latest/main #711

Merged
merged 2 commits into from
Jan 16, 2024
Merged

Fixed download of NATS Server for latest/main #711

merged 2 commits into from
Jan 16, 2024

Conversation

kozlovic
Copy link
Member

The "latest" was not working and would always use the one from nats.c.deps.
As for "main", I noticed lately that sometimes, we would get a binary of size 0, which would make all tests using the nats-server to fail. So make sure that we can run the server and get a valid version string. If not, repeat the test up to 5 times, otherwise fail the run.

Signed-off-by: Ivan Kozlovic [email protected]

The "latest" was not working and would always use the one from
nats.c.deps.
As for "main", I noticed lately that sometimes, we would get
a binary of size 0, which would make all tests using the nats-server
to fail. So make sure that we can run the server and get a valid
version string. If not, repeat the test up to 5 times, otherwise
fail the run.

Signed-off-by: Ivan Kozlovic <[email protected]>
@kozlovic kozlovic requested a review from levb January 16, 2024 00:47
@kozlovic
Copy link
Member Author

@levb If you get a chance tomorrow (01/16/2024), could you review this one? Without this, the run that uses main will fail more often than not because the download of the binary fails, so I added few tries.

@@ -11,6 +11,7 @@ echo "build opts = " $3
echo "test opts = " $4

if [ "$NATS_TEST_SERVER_VERSION" != "" ]; then
rm -fr $HOME/nats-server*
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@@ -19,14 +20,33 @@ if [ "$NATS_TEST_SERVER_VERSION" != "" ]; then

if [ "$rel" != "${rel#v}" ] && wget https://github.com/nats-io/nats-server/releases/download/$rel/nats-server-$rel-linux-amd64.tar.gz; then
tar -xzf nats-server-$rel-linux-amd64.tar.gz
mv nats-server-$rel-linux-amd64 $HOME/nats-server-$rel
mv nats-server-$rel-linux-amd64 nats-server
Copy link
Collaborator

Choose a reason for hiding this comment

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

@wallyqs should the retry logic be added to your script?

@levb levb merged commit 69f8c26 into main Jan 16, 2024
2 checks passed
@levb levb deleted the fix_srv_downloads branch January 16, 2024 14: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.

2 participants