Repository navigation
fix: re-enable storage in CI & fix setupNewChain test - #4608
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
|
The playground deployment is failing locally due to council election timing out, I have updated the timeout limits and I am testing |
This is was due to the |
|
I have also set shorter duration parameters for duration election and lead proposal |
|
Was able to do a deployment, and running a test now also through github action https://github.com/Joystream/joystream/actions/runs/4134320191 One useful addition I can think of is to perhaps give the council member member controller account a custom key, like we do for the working group workers to setup the storage infrastructure with pre-determined accounts. This will make it easy for testers of the playground to add these keys rather than needed to setup a new council with their own keys. As they will need to test specific proposals.. |
The ansible job timed out, so prepared a PR to increase the timeout dobertRowneySr#9 Successful deployment https://github.com/Joystream/joystream/actions/runs/4138130693/jobs/7154156247 |
mnaamani
left a comment
There was a problem hiding this comment.
Great job fixing this. Please update the timeout for ansible job by merging dobertRowneySr#9
If you can add the suggested deterministic account for council memebers it would be great finishing touch.
allow more time for playground to deploy before timeout
| targetStage: 'Announcing' | 'Voting' | 'Revealing' | 'Idle', | ||
| announcementPeriodNr: number | null = null, | ||
| blocksReserve = 4, | ||
| blocksReserve = 1, // TODO dynamically adjust this as it stuck the election process |
There was a problem hiding this comment.
What do you mean by "stuck the election process"?
I think there is a risk in having the reserve default to as low as 1, as this may not be enough time for the integration tests to issue all transactions intended for a given stage (like announcing all candidacies during announcing stage) and we may experience some issues w/ the integration tests occasionally failing.
There was a problem hiding this comment.
This is was due to the tests/network-tests/src/Api::untilCouncilStage final check for which the IdlePeriod (=1) >= reserve (=4) (in the playground config). So the playground election used to get stuck.
I have set reserve = 1 and then ran the local playground successfully
I will to set Idle period to 5 for the playground
Co-authored-by: Leszek Wiesner <leszek@jsgenesis.com>
Co-authored-by: Leszek Wiesner <leszek@jsgenesis.com>
mnaamani
left a comment
There was a problem hiding this comment.
Looks good, just left a couple of code cleanup points, and suggestion to increase the timeout of the ansible job slightly, otherwise its good to go.
| // Announcing stage | ||
| await this.api.untilCouncilStage('Announcing') | ||
| const x = await this.api.query.council.announcementPeriodNr() | ||
| this.debug(`announcement period ${x.toNumber()}`) |
There was a problem hiding this comment.
Perhaps your intention here is to debug/check that we are still in the announcing period expected. Maybe assert the condition instead of logging and continuing?
There was a problem hiding this comment.
I used it to display the announcement period, because the first election starts in Announcing stage while subsequent test elections starts in Idle, that way the announcing period between the first and the second election was the same and so the addresses for the candidates
There was a problem hiding this comment.
I have removed it now
| export default async function electCouncil({ api, query }: FlowProps): Promise<void> { | ||
| export default async function electCouncil(props: FlowProps): Promise<void> { | ||
| const debug = extendDebug('flow:elect-council') | ||
| const { api, query } = props |
There was a problem hiding this comment.
all changes in this file seem no longer necessary
| # Mini-secret or mnemonic used in SURI for deterministic key derivation | ||
| SURI_MINI_SECRET="" | ||
| # Single councilor account SURI used for testing | ||
| COUNCILLOR_SURI=//Councillor |
Co-authored-by: Mokhtar Naamani <mokhtar.naamani@gmail.com>
Co-authored-by: Mokhtar Naamani <mokhtar.naamani@gmail.com>
| if (stage.isAnnouncing) { | ||
| return announcementPeriodId.toNumber() | ||
| } else { | ||
| return announcementPeriodId.toNumber() + 1 | ||
| } |
There was a problem hiding this comment.
This will not always work, because:
- It doesn't take into account the "block reserve" (ie. whether the announcing period has less than
blockReserveblocks left) - There are a few more actions ran after this check, for example, the
BuyMembershipHappyCaseFixture. After those actions are finished, the stage may already be different (if the announcing period was close to an end).
One way to solve this would be to update the controller accounts of council members after they are already elected. I don't think you even need to include the election cycle number in this case.
There was a problem hiding this comment.
That might be best., that's how we do it for the working group workers ->
joystream/tests/network-tests/src/Api.ts
Line 846 in 997c5ae
There was a problem hiding this comment.
There's no way to change a controller account for a member or councilor once set
There was a problem hiding this comment.
You can do it via update_accounts extrinsic in the membership module
There was a problem hiding this comment.
😃 good catch I have added the suggested fix + assertion
Co-authored-by: Leszek Wiesner <leszek@jsgenesis.com>
| ) | ||
|
|
||
| // change accounts to known accounts | ||
| const oldCouncilMemberAccounts = await this.getCouncilMembersControllerAccounts() |
There was a problem hiding this comment.
Instead of having to fetch those accounts here, you can query for the member's rootAccount in updateMemberControllerAccount, I think that will be simpler. (update_accounts extrinsic should be called using member's rootAccount, not controllerAccount, although in the integration tests they are usually the same)
| const newCouncilMemberAccounts = await this.api.updateCouncillorsAccounts( | ||
| oldCouncilMemberAccounts, | ||
| this.councilMembersIds | ||
| ) |
There was a problem hiding this comment.
updateCouncillorsAccounts can query api.query.council.councilMembers, so that they don't need to be passed as an argument.
Co-authored-by: Leszek Wiesner <leszek@jsgenesis.com>
| const debug = extendDebug('api-factory') | ||
| debug(`assigning Well Known Councillors Account`) | ||
| const newAccounts = memberIds.map((id) => { | ||
| const uri = `//Councillor//` + id.toString() |
There was a problem hiding this comment.
I noticed there is a small issue here. Because the uri starts with // and isFinalPath = false, the final uri becomes:
`${miniSecret}//testing////Councillor//${memberId}`(notice 4 slashes before Councillor)
Fixes #4609
┆Issue is synchronized with this Asana task by Unito