-
Notifications
You must be signed in to change notification settings - Fork 121
fix: upgrade stacks node versions to 2.05.0.3.0 #1328
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,11 @@ | ||
| import { loadDotEnv } from '../helpers'; | ||
| import { StacksCoreRpcClient } from '../core-rpc/client'; | ||
|
|
||
| // ts-unused-exports:disable-next-line | ||
| export default async (): Promise<void> => { | ||
| export default (): void => { | ||
| console.log('Jest - setup..'); | ||
| if (!process.env.NODE_ENV) { | ||
| process.env.NODE_ENV = 'test'; | ||
| } | ||
| loadDotEnv(); | ||
| console.log('Waiting for RPC connection to core node..'); | ||
| await new StacksCoreRpcClient().waitForConnection(60000); | ||
| console.log('Jest - setup done'); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,11 @@ | ||
| import { loadDotEnv } from '../helpers'; | ||
| import { StacksCoreRpcClient } from '../core-rpc/client'; | ||
| import { PgWriteStore } from '../datastore/pg-write-store'; | ||
|
|
||
| export interface GlobalServices { | ||
| db: PgWriteStore; | ||
| } | ||
| // ts-unused-exports:disable-next-line | ||
| export default async (): Promise<void> => { | ||
| export default (): void => { | ||
| console.log('Jest - setup..'); | ||
| if (!process.env.NODE_ENV) { | ||
| process.env.NODE_ENV = 'test'; | ||
| } | ||
| loadDotEnv(); | ||
| const db = await PgWriteStore.connect({ skipMigrations: true, usageName: 'tests' }); | ||
| console.log('Waiting for RPC connection to core node..'); | ||
| await new StacksCoreRpcClient().waitForConnection(60000); | ||
| const globalServices: GlobalServices = { | ||
| db: db, | ||
| }; | ||
| Object.assign(global, globalServices); | ||
| console.log('Jest - setup done'); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,5 @@ | ||
| import type { GlobalServices } from './setup'; | ||
| // ts-unused-exports:disable-next-line | ||
| export default async (): Promise<void> => { | ||
| export default (): void => { | ||
| console.log('Jest - teardown..'); | ||
| const globalServices = (global as unknown) as GlobalServices; | ||
| await globalServices.db.close(); | ||
| console.log('Jest - teardown done'); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,11 @@ | ||
| import { loadDotEnv } from '../helpers'; | ||
| import { StacksCoreRpcClient } from '../core-rpc/client'; | ||
| import { PgWriteStore } from '../datastore/pg-write-store'; | ||
|
|
||
| export interface GlobalServices { | ||
| db: PgWriteStore; | ||
| } | ||
| // ts-unused-exports:disable-next-line | ||
| export default async (): Promise<void> => { | ||
| export default (): void => { | ||
| console.log('Jest - setup..'); | ||
| if (!process.env.NODE_ENV) { | ||
| process.env.NODE_ENV = 'test'; | ||
| } | ||
| loadDotEnv(); | ||
| const db = await PgWriteStore.connect({ skipMigrations: true, usageName: 'tests' }); | ||
| console.log('Waiting for RPC connection to core node..'); | ||
| await new StacksCoreRpcClient().waitForConnection(60000); | ||
| const globalServices: GlobalServices = { | ||
| db: db, | ||
| }; | ||
| Object.assign(global, globalServices); | ||
| console.log('Jest - setup done'); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,5 @@ | ||
| import type { GlobalServices } from './setup'; | ||
| // ts-unused-exports:disable-next-line | ||
| export default async (): Promise<void> => { | ||
| export default (): void => { | ||
| console.log('Jest - teardown..'); | ||
| const globalServices = (global as unknown) as GlobalServices; | ||
| await globalServices.db.close(); | ||
| console.log('Jest - teardown done'); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,11 @@ | ||
| import { loadDotEnv } from '../helpers'; | ||
| import { StacksCoreRpcClient } from '../core-rpc/client'; | ||
|
|
||
| // ts-unused-exports:disable-next-line | ||
| export default async (): Promise<void> => { | ||
| export default (): void => { | ||
| console.log('Jest - setup..'); | ||
| if (!process.env.NODE_ENV) { | ||
| process.env.NODE_ENV = 'test'; | ||
| } | ||
| loadDotEnv(); | ||
| console.log('Waiting for RPC connection to core node..'); | ||
| await new StacksCoreRpcClient().waitForConnection(60000); | ||
| console.log('Jest - setup done'); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,12 @@ | ||
| import { loadDotEnv } from '../helpers'; | ||
| import { StacksCoreRpcClient } from '../core-rpc/client'; | ||
|
|
||
| // ts-unused-exports:disable-next-line | ||
| export default async (): Promise<void> => { | ||
| export default (): void => { | ||
| console.log('Jest - setup..'); | ||
| if (!process.env.NODE_ENV) { | ||
| process.env.NODE_ENV = 'test'; | ||
| } | ||
| loadDotEnv(); | ||
| process.env.PG_DATABASE = 'postgres'; | ||
| console.log('Waiting for RPC connection to core node..'); | ||
| await new StacksCoreRpcClient().waitForConnection(60000); | ||
| console.log('Jest - setup done'); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This and a few other test fixes look familiar -- similar changes were required in the
stacks-2.1branch:It looks like some of the issues were caused by the bump from only
stacks-blockchain:2.05.0.0.0(as opposed tostacks-blockchain:next / 2.1).In the API's
stacks-2.1branch, a larger refactor was done to fix these. Stubbing out these responses could potentially hide bugs if the stacks-node behavior diverges from these stubbed behaviors. However, we can probably address that later once we have to merge thestacks-2.1branch. In the meantime, seems okay to merge.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.
Thanks for the note, I'll keep that in mind.
I did this mock only to skip the stacks node dependency on this test. Integration tests were already done in
construction.tsso and adding a new event server here created problems given that the stacks node block height did not restart at 1 (it stayed at the previous height created by other tests).