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

Repository update fails already if only one repository is offline #395

Closed
tobias-klein opened this issue Jul 22, 2021 · 3 comments · Fixed by #514
Closed

Repository update fails already if only one repository is offline #395

tobias-klein opened this issue Jul 22, 2021 · 3 comments · Fixed by #514
Assignees
Labels
bug 🐞 Something isn't working

Comments

@tobias-klein
Copy link
Member

There are eight repositories in CrossWire's master repository list. If any of them fail to update the complete update fails. The behavior should be changed:

  • Succeed if two or less repositories fail to update
  • Fail if at least two repositories fail to update
@tobias-klein tobias-klein added the bug 🐞 Something isn't working label Jul 22, 2021
@tobias-klein tobias-klein added this to To do in 1.2 / August 29th 2021 via automation Jul 22, 2021
@tobias-klein tobias-klein removed this from To do in 1.2 / August 29th 2021 Aug 15, 2021
zhuiks added a commit that referenced this issue Nov 1, 2021
@zhuiks
Copy link
Collaborator

zhuiks commented Nov 4, 2021

This give us some trouble running automated acceptance tests!

@tobias-klein from Node-Sword-Interface side can you provide more details as a result from updateRepositoryConfig()?

We can make decision then in front-end, based on the repository's online statuses

@tobias-klein
Copy link
Member Author

Yes, you're right @zhuiks
I was already thinking about this one when seeing the GitHub actions issues this week.

And yes, we could return a more detailed status from updateRepositoryConfig. It could be an Object with a status attribute for each repository that is queried.

@tobias-klein
Copy link
Member Author

tobias-klein commented Nov 4, 2021

@zhuiks
I have just published node-sword-interface 0.238.0 (not integrated here yet - feel free to take that up).

In the new version of node-sword-interface the function updateRepositoryConfig returns a Promise, which in turn returns an object like this:

{
  'result': false,
  'Bible.org': false,
  'CrossWire': true,
  'CrossWire Attic': true,
  'CrossWire Beta': true,
  'CrossWire Wycliffe': true,
  'Deutsche Bibelgesellschaft': true,
  'IBT': true,
  'Lockman Foundation': true,
  'Xiphos': true,
  'eBible.org': true
} 

The status value is simply a boolean. true means successful and false that the update failed for that particular repo. In the example above you see that the Bible.org repo is currently failing to update correctly. Note that with this change the Promise returned by updateRepositoryConfig always resolves (never rejects) and delivers that status object. Previously that Promise rejected in case of an overall unsuccessful repo update.

Note that integration of this node-sword-interface change requires touching both the backend (ipc_nsi_handler.js) as well as the frontend (ipc_nsi.js) and then of course handling it correspondingly in the UI.

@tobias-klein tobias-klein added this to To do in 1.4 / December 18th 2021 via automation Nov 5, 2021
@tobias-klein tobias-klein self-assigned this Nov 5, 2021
tobias-klein added a commit that referenced this issue Nov 5, 2021
1.4 / December 18th 2021 automation moved this from To do to Done Nov 5, 2021
tobias-klein added a commit that referenced this issue Nov 5, 2021
tobias-klein pushed a commit that referenced this issue Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants