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

Bugfix: Service Manager loads wrong service Test-config #1907

Merged

Conversation

relativisticelectron
Copy link
Collaborator

@relativisticelectron relativisticelectron commented Oct 3, 2022

Since CypressTestConfig and TestConfig end both with TestConfig, the service manager had unreliable loading of the config. This wrong loading was visible here
image

Maybe the intention was to the the TestConfig also implicitly for cypress. However creating an explicit CypressTestConfig is better.

@netlify
Copy link

netlify bot commented Oct 3, 2022

Deploy Preview for specter-desktop-docs ready!

Name Link
🔨 Latest commit 6374aac
🔍 Latest deploy log https://app.netlify.com/sites/specter-desktop-docs/deploys/6350021076abd000092be392
😎 Deploy Preview https://deploy-preview-1907--specter-desktop-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@relativisticelectron relativisticelectron marked this pull request as ready for review October 3, 2022 13:24
@relativisticelectron relativisticelectron changed the title Bugfix: Service Manager loads wrong service config Bugfix: Service Manager loads wrong Test-service config Oct 4, 2022
@k9ert
Copy link
Collaborator

k9ert commented Oct 4, 2022

Good catch!
A couple of lines later, the Loading mechanism checks via inheritance, whether another config is better suited if no "exact match" (now exact match, but before "endswith-match") has been found. Can you modify that as well with exact match?
image

@relativisticelectron relativisticelectron changed the title Bugfix: Service Manager loads wrong Test-service config Bugfix: Service Manager loads wrong service Test-config Oct 4, 2022
@k9ert k9ert merged commit 392da54 into cryptoadvance:master Oct 20, 2022
k9ert added a commit that referenced this pull request Jan 31, 2023
* added websocket reconnect javascript

* timeout fix

* FIXED server timout issue

* working port config

* added websockets

* fixed cypress test

* graceful exit, but client is slow

* fast shutdown

* Switch to other port, if this one is blocked

* better error handling

* undid the port retrying

* trying CI with different port for websockets

* added getting port from ENV

* test CI with longer wait time for cypress

* reset wait time to 1000

* test fix

* doc

* Bugfix: Flash cannot be called without a context.

If a WebAPI (initiated from a different thread) fails, and flash is acalled as a backup the flash is without context.

Now I simply added a attribute that flash cannot be called from any thread.  It now skips it during the "Trying to rebroadcast"

* restore feature that the WebAPI permission is updated

* js formatting

* doc and reshuffling methods

* localhost fix for cypress

* fixed bug that i introduced recently.

* doc

* refactoring

* refactoring

* fix bug and refactoring

* removed use_reloader=false

* made the CreateNotification more robust

* better log

* bug fix

* pytest fix

* bug fix

* pytest works... but ugly

* do not start the websockets server in the tests

* Introducing SPECTER_WEBSOCKET_ACTIVE

* fix for incomplete SPECTER_WEBSOCKET_ACTIVE

* fix for incomplete SPECTER_WEBSOCKET_ACTIVE

* working websockets server shutdown when main thread dies

* doc

* camelCase  for js

also changed WebAPI --> webapi

* better naming

* ssl working for python client and server, but not javascript

* minimal working example for self-signed ssl

* working minimal echo server in specter

works with self signed cert

* working user recognition

* working websocket server.  The client shows an ssl error

* added ssl_context, but doesn't work yet

* no error... not tested yet

* working

* working, but not in js yet

* almost working!!!

* client is not working

* still cannot get a 1 server to many clients working

* minimal client example

* working minimal exaple to send to all connected clients

* working (at first, but then disconnecting)

* working. but cient needs some simplifications

* working great!!!

* fix closing connection handling

* also for non ssl working

* doc and requirements

* better config

* fix for multiple connections of 1 user

* imports

* doc

* better logging

* added endpoint to test

* cleanup

* added a possibility to quit websocket connections via a special command.

* fix error message

* doc

* refactoring

* remove old code

* undo

* Docs: Add mobile access question to the FAQ (#1829)

* starting pytest

pytest mocking doesn't work yet

working pytest

* better descriptions

* more notification arguments

* added pytest

* move notifications.js such that it is always available

* fix css issue

* A test-page in the devhelper extension

* defaults that shows a message without changing values

* doc and rename: clarifying point about the flask flash

* improved logging formatting

* js_message_box  reflects noy the notification_type

* doc

addressing #1766 (comment)

* doc

addressing #1766 (comment)

* fix pytest

* doc and use get instead of []

* redirect flash call

* feature now complete

* documentation

* rename callback

* Adding add_wallettab

* moving to server_endpoints

* proper removal

* refactor robust_json_dumps import

* forgot one reference of robust_json_dumps

* remove unintended changes

* import fixes and polishing

* docs revised

* working notifications

* working

almost completely moved

* not working yet.... somehow sending to the server doesn't work.

* working

* added TODO

* redirect flash

* fix for flash

* implemented callbacks

Can test with js code
a = await pythonCommand("app.specter.service_manager.execute_ext_callbacks(        'create_and_show_notification', 'title', target_uis='js_message_box', timeout=3000)")

* invisible in sidebar and enabled by default

* added logo

* adding wallet_alias and docs

* pictures for the docs

* added import

* forgotten change

* pytest fix

* forgotten part 2

* add HOST to config and fix pytest

* examples in settings and wallet menu

* app is not required in callback_after_serverpy_init_app

* better error logging

* fix: better error logging

* fix: include

* Removing Werkzeug Request logs for Cypress

* selectWallet twice to fix weird issues

* explicitly returing None if no user found

* better structuring in server function

* reset lots of flash changes

* add timeout for websocket server connections

* reset helpers.py

* added connection_report

- also changed the registering logic slightly,  to now have an easy overview of the open connections
- also added constants INTERNAL_NOTIFICATION_TITLES

* better default services in user.py

* tiny cleanup

* avoid slow_request_detection_stop

* move css

#1766 (comment)

* typo

#1766 (comment)

* callback_cleanup_on_exit

#1766 (comment)

* move also css colors to service

* upgrade simple_websocket got rid of ssl error on close connection

* fix tests

* better default loading of notifications

* fix bug

see #1766 (comment)

* better callback_cleanup_on_exit

* deleted files

* fix 1 pytest

* removed example code

#1766 (comment)

* cleaned up js logic for the initial connection

* moved  sendRequest

* doc

* doc

* increase ping/timeout interval, because the websocket connection closure works well now

* increase migration count

* renaming

* changed order of notifications cypress test

* disable the websockets during all pytest

* reenable websockets for cypress

* fix bug

* pytest debugging  ONLY. Have to rollback

* Revert "pytest debugging  ONLY. Have to rollback"

This reverts commit ccee38f.

* info output for pytest debugging

* pytest experiment...  Can be rolled back.

* Revert "info output for pytest debugging"

This reverts commit 07f3aaa.

* fix

see #1907 (comment)

* added view_functions comment

* trying to fix flaky cpyress

* fix for hardcoded url

* added auto-reconnection on request failiure

* remove user_secret_decrypted_required

* remove user_secret_decrypted_required

* Removed verbose logging unless logging level < 10

* remove verbose_debug from notification.id

* fix

* fix pytest

* fix non-working migration

* set devstatus_alpha and opt-in

* delete cypress test and remove migration from pytest

* len(classlist) seems to differ in CI and locally

* remove useless code

* done #1766 (comment)

- removed duplicate sendRequest

* moved service_manager_cleanup_on_exit

see #1766 (comment)

* added comment

see #1766 (comment)

* attempt to fix #1766 (comment)

* pytest works. Was a variation in requirements.txt

---------

Co-authored-by: Manolis Mandrapilias <[email protected]>
Co-authored-by: Kim Neunert <[email protected]>
Co-authored-by: moneymanolis <[email protected]>
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