-
Notifications
You must be signed in to change notification settings - Fork 267
Conversation
…d the chain header entries to the authoring list
While running the tests it prints out errors around the author list saying:
Despite this the tests still pass. @lucksus @struktured is this expected or does this suggest the tests are not correctly picking up a failure? |
…lochain/holochain-rust into feature-add-header-publishing
core/src/network/handler/lists.rs
Outdated
); | ||
}, | ||
Err(_err) => log_debug!(context, | ||
"handler/get_authoring_list: Error getting entry aspects of authoring list for entry with address: {}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this to log the error properly rather than panic the thread
use std::{thread, time}; | ||
|
||
#[test] | ||
fn test_can_get_chain_header_list() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lucksus These two tests show the loading of the header entries and their aspects working fine. I am wondering if the issue is happening only at startup when the Dna and Agent headers are in the chain but the header entries are not committed yet.
|
||
use holochain_core_types::error::HcResult; | ||
use holochain_persistence_api::cas::content::Address; | ||
|
||
#[derive(Clone, Debug)] | ||
pub enum ActionResponse { | ||
Publish(HcResult<Address>), | ||
PublishHeaderEntry(HcResult<Address>), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use the same publish for this? They seem to share the same type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good but I think we could cut out some code if we merge the publish/publish_entry, maybe where the subtle differences show themselves we could use the enum? Seeing a few parallels with the PublishEntry
@willemolding do you know why the two tests are failing? Are they part of the flakeyness? |
This was previously implemented using the same action as PublishEntry. This PR is a rewrite adding its own action to intentionally keep them seperate. The problems were with the waiter (which waits for a corresponding Hold action for a publish) not doing so correctly for header entries. This way the two do not interfere (although the waiter won't wait for headers at this stage) That said I think it could probably be DRYed up a bit. I'll take another look |
Yeah I was thinking of having then Publish(PublishType) that way even though they similar they can still use the same futures e.t.c Would it still cause problems for the waiter? If still just discard my comment. Will still approve :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While running the tests it prints out errors around the author list saying:
thread 'handle_authoring_list/puid-26e-0' panicked at 'Error getting entry aspects of authoring list for chain headers: EntryNotFoundLocally'
Despite this the tests still pass. @lucksus @struktured is this expected or does this suggest the tests are not correctly picking up a failure?
Hm, that actually looks like a problem that our tests are not picking up yet.
Also, as @zippy mentioned, there are two tests failing in app-spec showing that some sources are missing. I don't think that this has to do with the n3h flakyness..
Hm, actually, I think the problem is that we try get the meta aspects for all the things we author. You applied the same (I think mistaken) thing I did earlier for all chain entries: just calling I think the fix is to only add the |
|
Have get_content_aspect() try the source chain first. Construct content aspects for headers on the fly.
So I've change Also, I've change it to not use that function for header content aspects as these need to be created on the fly. The old version of There isn't really a good way to tests this currently as those lists are only queried (and needed) when we restart a conductor. So this is another reason for having the conductor start/stop feature in try-o-rama soon, @maackle. |
Hm, I've run app-spec on this several times now locally and I have seen various different tests fail. Definitely flaky. I'm running develop right now to compare against the overall n3h flakyness which seemed to be very low recently. Mainly CRUD tests were failing and I could tell from the logs that there were inconsistencies about the entries being held by the three test agents. I'm suspecting the following:
Is that plausible, @maackle, @willemolding? |
I'm not sure if this is quite right. The commit workflow will result in a Publish and PublishHeaderEntry action. This will result in two Hold actions but these will have contain different entries (the actual entry and the headerEntry) and so shouldn't confuse the waiter any more than other unrelated entries do right? The last part I guess really depends on how the waiter is working and I think I need to dig a bit deeper here. |
@lucksus and I were talking, and it seems that the reason agent ID was removed from publish initially is because that should now be handled by the lib3h GetAuthoringEntryList event that happens. That's how that entry should get initially disseminated |
…in-rust into feature-add-header-publishing
…ature-add-header-publishing
Re-opened header publishing PR
There is now a specific action (and corresponding reducer) for publishing a header (
PublishHeaderEntry
). Headers are no longer published by thePublish
action andpublish_header
must be called in the top level workflow.Dna and AgentId entries are only published when the chain is initialized for the first time rather than at every startup
Headers are returned as part of the author list so they are gossiped to new joining agents
changelog
Please check one of the following, relating to the CHANGELOG-UNRELEASED.md
- summary of change [PR#1234](https://github.com/holochain/holochain-rust/pull/1234)