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

fix: add option to reconnect if connack has an error code #1948

Merged

Conversation

mgabeler-lee-6rs
Copy link
Contributor

@mgabeler-lee-6rs mgabeler-lee-6rs commented Oct 16, 2024

fixes #1947

  • Not sure about the naming of the new option
  • New option defaulting disabled to avoid surprise in consumers, but there's an argument to defaulting it on
  • Needs tests
  • Add documentation

Copy link
Member

@robertsLando robertsLando left a comment

Choose a reason for hiding this comment

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

The option name looks good to me. Remember to add tests and also docs

@mgabeler-lee-6rs mgabeler-lee-6rs marked this pull request as ready for review October 16, 2024 15:31
@mgabeler-lee-6rs
Copy link
Contributor Author

mgabeler-lee-6rs commented Oct 16, 2024

@robertsLando ✔️

I noticed the first pass the CI tests failed for various reasons that ... don't seem related to any changes I made? Esp. the internal error within the codecov uploader.

Edit: new runs failed the same way

@robertsLando
Copy link
Member

@mgabeler-lee-6rs I still don't understand why ci fails, could you try removing the test and push? Just to see if that's the reason

@mgabeler-lee-6rs
Copy link
Contributor Author

Trying that, but somehow I suspect that the problem is more likely related to building/uploading from a fork?

test/abstract_client.ts Outdated Show resolved Hide resolved
@mgabeler-lee-6rs
Copy link
Contributor Author

mgabeler-lee-6rs commented Nov 21, 2024

Was going to suggest contacting codecov for help, but I noticed this is using the nodejs uploader, which is deprecated to the point that the repo is archived

Might be worth looking into the github action they provide for this now

@robertsLando
Copy link
Member

That's what I tried here: #1943

But no clue why when I add that action workflow remains in wait state for no reason

@mgabeler-lee-6rs
Copy link
Contributor Author

mgabeler-lee-6rs commented Nov 21, 2024

checks on that PR show:

Annotations
1 error
Error
codecov/codecov-action@v4 is not allowed to be used in mqttjs/MQTT.js. Actions in this workflow must be: within a repository owned by mqttjs, created by GitHub, or matching the following: mqttjs-test, npm-publish, release-it, semantic-pr, amannn/action-semantic-pull-request@*.

Probably some repo security setting?

@robertsLando
Copy link
Member

robertsLando commented Nov 22, 2024

Oh god thanks sooo much for that! I think I lost 4 hours trying to debug that and I totally forgot we have some restrictions on actions that can run.... Could you tell me where you got those errors? I wan't able to see them

test/abstract_client.ts Outdated Show resolved Hide resolved
Copy link

codecov bot commented Nov 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.21%. Comparing base (b5b0967) to head (7c331ad).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1948      +/-   ##
==========================================
+ Coverage   81.18%   81.21%   +0.02%     
==========================================
  Files          24       24              
  Lines        1467     1469       +2     
  Branches      348      349       +1     
==========================================
+ Hits         1191     1193       +2     
  Misses        192      192              
  Partials       84       84              
Flag Coverage Δ
unittests 81.21% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@robertsLando
Copy link
Member

Ok I fixed tests and did a minor refactor, could you please fix conflicts? I moved all tests under test/node folder for consistency

@mgabeler-lee-6rs
Copy link
Contributor Author

Could you tell me where you got those errors? I wan't able to see them

I clicked into the Checks tab on the PR, and from there (on one of the older commits that failed), into the MQTT.js Tests on the left bar, which had a 🗨️ icon, which takes me to a page like https://github.com/mqttjs/MQTT.js/actions/runs/11968792492 which has that error at the bottom under the Annotations header.

could you please fix conflicts?

On it!

@robertsLando robertsLando merged commit fa19586 into mqttjs:main Nov 26, 2024
5 checks passed
@mgabeler-lee-6rs mgabeler-lee-6rs deleted the issue-1947-reconnect-on-connack-fail branch November 26, 2024 17:19
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.

[Bug]: Does not start reconnect timer on connection error
2 participants