Skip to content

Mainnet liberated integration test fix#4542

Merged
mnaamani merged 19 commits intoJoystream:mainnet-liberatedfrom
dobertRowneySr:mainnet-liberated-integration-test-fix
Feb 2, 2023
Merged

Mainnet liberated integration test fix#4542
mnaamani merged 19 commits intoJoystream:mainnet-liberatedfrom
dobertRowneySr:mainnet-liberated-integration-test-fix

Conversation

@dobertRowneySr
Copy link
Copy Markdown
Collaborator

@dobertRowneySr dobertRowneySr commented Jan 18, 2023

Intro & Scope

Fixes integration tests after the removal of the sudo pallet as prescribed in #4401

Details

  • replace sudo jobs with proposals
  • merged into mainnet-liberated
  • generated types and metadata

Tech debt

I think a refactoring is needed in order to encapsulate Proposal Creation + Proposal Execution in one subclass of BaseQueryNodeFixture. If you think it's urgent I'll do it as part of this PR review iteration, otherwise I'll create a issue for the future

Next steps

Merging the resulting PR into Ephesus: #4556

┆Issue is synchronized with this Asana task by Unito

@vercel
Copy link
Copy Markdown

vercel bot commented Jan 18, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated
pioneer-testnet ⬜️ Ignored (Inspect) Feb 1, 2023 at 4:31PM (UTC)

@dobertRowneySr dobertRowneySr force-pushed the mainnet-liberated-integration-test-fix branch from 1489e1c to 207e42b Compare January 19, 2023 09:16
@dobertRowneySr dobertRowneySr changed the base branch from ephesus to mainnet-liberated January 19, 2023 09:17
@dobertRowneySr dobertRowneySr marked this pull request as ready for review January 19, 2023 09:17
Copy link
Copy Markdown
Member

@mnaamani mnaamani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks great, well done. I left my concern about assumption being made about result of proposals query from chain state and query node which will not always hold. So it would be better to address now, otherwise it might be hard to debug failing proposals test in future.

Although running the integration tests locally didn't cause a problem.

)
const executionBlocks = await Promise.all(
this.proposals.map(async (proposal, i) => {
const qProposal = qProposals[i]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a potential problem with this assignment since qProposals will contain all proposals every created, and this.proposals is only the proposals that are currently active in chain state. It would be more correct to pick from qProposals the proposal with the matching proposalId.


async runQueryNodeChecks(): Promise<void> {
await super.runQueryNodeChecks()
// Query the events
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

best to remove commented out code

// Before any other jobs hire then terminate all WG leads
const terminateLeadsJob = job('terminate working-group leads', terminateLeads).after(
job('sudo lead opening', leadOpening(process.env.IGNORE_HIRED_LEADS === 'true')).after(proposalsJob)
const sudoHireLead = job('sudo lead opening', leadOpening(process.env.IGNORE_HIRED_LEADS === 'true')).after(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the "sudo" in the name of this job doesn't make sense anymore

@mnaamani
Copy link
Copy Markdown
Member

mnaamani commented Feb 1, 2023

Additional points:
we should add back the setupNewChain, and setupNewChainMultiStorage scenarios to run_test_scenarios job in github workflow run-network-tests.

Also update some of the bash scripts in tests/network-tests/ that still have some reference to sudo arguments and env variables which are not required anymore, and dropping the SUDO_ACCOUNT_URI from .env file

@bedeho bedeho removed the request for review from zeeshanakram3 February 1, 2023 10:16
@dobertRowneySr
Copy link
Copy Markdown
Collaborator Author

I have addressed all the required comments.
There where still some outdated sudo references, mostly in the form of asSudo boolean for WG tests.
They are removed now

await new FixtureRunner(buyMembershipHappyCaseFixture).run()
const [inviterMemberId] = buyMembershipHappyCaseFixture.getCreatedMembers()

// Membership WG balance required
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this flow could be used in other scenarios where perhaps a council was not elected, maybe it should fail early.

const decideOnUpdateWgBudgetProposalStatusFixture = new DecideOnProposalStatusFixture(api, query, [
{ proposalId: updateWgBudgetProposalId, status: 'Approved', expectExecutionFailure: false },
])
await new FixtureRunner(decideOnUpdateWgBudgetProposalStatusFixture).run()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will the fixture fail if there is no council to actually vote on the proposal?

@mnaamani mnaamani merged commit 0180c88 into Joystream:mainnet-liberated Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

network-integration-test End-to-end full network integration test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants