Skip to content

fix(dashmate): failed to read docker data on update - #1903

Merged
pshenmic merged 2 commits into
v1.0-devfrom
fix/dashmate-update
Jun 24, 2024
Merged

fix(dashmate): failed to read docker data on update#1903
pshenmic merged 2 commits into
v1.0-devfrom
fix/dashmate-update

Conversation

@pshenmic

@pshenmic pshenmic commented Jun 23, 2024

Copy link
Copy Markdown
Collaborator

Issue being fixed or feature implemented

Update command seems broken, might be after #1685 or docker might have updated their format again.

If you issue dashmate update command, we can see that all services marked as error:

╔═════════════════╤══════════════════════════════════════╤═════════╗
║ Service         │ Image                                │ Updated ║
╟─────────────────┼──────────────────────────────────────┼─────────╢
║ Dashmate Helper │ dashpay/dashmate-helper:1.0.0-dev.15 │ error   ║
║ Core            │ dashpay/dashd:20                     │ error   ║
╚═════════════════╧══════════════════════════════════════╧═════════╝

And if we add DEBUG=1 to the environment, there is a continuous repeat of the Failed to read docker json data, status not found error message.

The reason is that latest check on status in the updateNodeFactory is excessive, when no message starting with Status:
is found in the stream data event. Because the status are sent in chunks, it is expected that status may be null.

What was done?

Removed check when status not found from stream data event.

How Has This Been Tested?

Locally. Now error is gone, and everything updates correctly:

╔═════════════════╤══════════════════════════════════════╤════════════╗
║ Service         │ Image                                │ Updated    ║
╟─────────────────┼──────────────────────────────────────┼────────────╢
║ Dashmate Helper │ dashpay/dashmate-helper:1.0.0-dev.15 │ up to date ║
║ Core            │ dashpay/dashd:20                     │ up to date ║
╚═════════════════╧══════════════════════════════════════╧════════════╝

If you intentionally set invalid dashd version in the config, then it shows error as expected:

pshenmic@Mikhails-MacBook-Pro dashmate % DEBUG=1 yarn dashmate update --verbose
Failed to update core service, image dashpay/dassshd:20, error: Error: (HTTP code 404) unexpected - pull access denied for dashpay/dassshd, repository does not exist or may require 'docker login': denied: requested access to the resource is denied 
╔═════════════════╤══════════════════════════════════════╤════════════╗
║ Service         │ Image                                │ Updated    ║
╟─────────────────┼──────────────────────────────────────┼────────────╢
║ Dashmate Helper │ dashpay/dashmate-helper:1.0.0-dev.15 │ up to date ║
║ Core            │ dashpay/dassshd:20                   │ error      ║
╚═════════════════╧══════════════════════════════════════╧════════════╝

Breaking Changes

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@pshenmic pshenmic changed the title fix(dashmate): fix update command (failed to read docker data) fix(dashmate): update command fix (failed to read docker data) Jun 23, 2024
@pshenmic pshenmic added this to the v1.0.0 milestone Jun 23, 2024
@pshenmic pshenmic self-assigned this Jun 23, 2024
@shumkov shumkov changed the title fix(dashmate): update command fix (failed to read docker data) fix(dashmate): failed to read docker data on update Jun 23, 2024
@pshenmic
pshenmic merged commit 8ebdd67 into v1.0-dev Jun 24, 2024
@pshenmic
pshenmic deleted the fix/dashmate-update branch June 24, 2024 08:29
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