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

[Merged by Bors] - Use updated Initializer API from PoST #3715

Closed
wants to merge 11 commits into from

Conversation

fasmat
Copy link
Member

@fasmat fasmat commented Nov 7, 2022

Motivation

Integrates changes of spacemeshos/post#78 into go-spacemesh, only merge after the former has been merged.

Changes

The asynchronous Initializer::SessionNumLabelsWrittenChan() is removed in favor of the synchronous Initializer::SessionNumLabelsWritten() with the changes in spacemeshos/post#84

This updates go-spacemesh to not use the removed method any more.

The GRPC server now sends PoST status updates to a client in 1 second intervals instead of relying on PoST to report its status in (possibly) irregular intervals. This also means that a client now has to cancel a request or it will receive status updates about PoST indefinitely.

Test Plan

TODO

  • Explain motivation or link existing issue(s)
  • Test changes and document test plan
  • Update documentation as needed

DevOps Notes

  • This PR does not require configuration changes (e.g., environment variables, GitHub secrets, VM resources)
  • This PR does not affect public APIs
  • This PR does not rely on a new version of external services (PoET, elasticsearch, etc.)
  • This PR does not make changes to log messages (which monitoring infrastructure may rely on)

@fasmat fasmat self-assigned this Nov 7, 2022
@fasmat fasmat force-pushed the refactor-post-initializer branch from 9cddfb5 to 33ae1de Compare November 7, 2022 21:33
@fasmat fasmat changed the title Replace asynchronous API with synchronous WIP Use updated Initializer API from PoST Nov 7, 2022
@fasmat fasmat changed the title WIP Use updated Initializer API from PoST Use updated Initializer API from PoST Nov 8, 2022
@fasmat fasmat marked this pull request as ready for review November 8, 2022 11:31
Copy link
Contributor

@poszu poszu left a comment

Choose a reason for hiding this comment

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

Great! All comments are nits, except for the comment about deadlock - IMO a bug issue should be created about it.

activation/post.go Outdated Show resolved Hide resolved
activation/post.go Outdated Show resolved Hide resolved
activation/post.go Outdated Show resolved Hide resolved
activation/post.go Show resolved Hide resolved
activation/post_test.go Outdated Show resolved Hide resolved
api/grpcserver/smesher_service.go Outdated Show resolved Hide resolved
api/grpcserver/grpcserver_test.go Show resolved Hide resolved
@fasmat fasmat requested a review from poszu November 9, 2022 00:37
@fasmat
Copy link
Member Author

fasmat commented Nov 9, 2022

bors merge

bors bot pushed a commit that referenced this pull request Nov 9, 2022
## Motivation
Integrates changes of spacemeshos/post#78 into go-spacemesh, only merge after the former has been merged.

## Changes
The asynchronous `Initializer::SessionNumLabelsWrittenChan()` is removed in favor of the synchronous `Initializer::SessionNumLabelsWritten()` with the changes in spacemeshos/post#84

This updates go-spacemesh to not use the removed method any more.

The GRPC server now sends PoST status updates to a client in 1 second intervals instead of relying on PoST to report its status in (possibly) irregular intervals. This also means that a client now has to cancel a request or it will receive status updates about PoST indefinitely.

## Test Plan
<!-- Please specify how these changes were tested 
(e.g. unit tests, manual testing, etc.) -->

## TODO
<!-- This section should be removed when all items are complete -->
- [x] Explain motivation or link existing issue(s)
- [x] Test changes and document test plan
- [x] Update documentation as needed

## DevOps Notes
<!-- Please uncheck these items as applicable to make DevOps aware of changes that may affect releases -->
- [x] This PR does not require configuration changes (e.g., environment variables, GitHub secrets, VM resources)
- [x] This PR does not affect public APIs
- [x] This PR does not rely on a new version of external services (PoET, elasticsearch, etc.)
- [x] This PR does not make changes to log messages (which monitoring infrastructure may rely on)
@bors
Copy link

bors bot commented Nov 9, 2022

Build failed (retrying...):

@fasmat
Copy link
Member Author

fasmat commented Nov 9, 2022

bors merge

@bors
Copy link

bors bot commented Nov 9, 2022

Already running a review

bors bot pushed a commit that referenced this pull request Nov 9, 2022
## Motivation
Integrates changes of spacemeshos/post#78 into go-spacemesh, only merge after the former has been merged.

## Changes
The asynchronous `Initializer::SessionNumLabelsWrittenChan()` is removed in favor of the synchronous `Initializer::SessionNumLabelsWritten()` with the changes in spacemeshos/post#84

This updates go-spacemesh to not use the removed method any more.

The GRPC server now sends PoST status updates to a client in 1 second intervals instead of relying on PoST to report its status in (possibly) irregular intervals. This also means that a client now has to cancel a request or it will receive status updates about PoST indefinitely.

## Test Plan
<!-- Please specify how these changes were tested 
(e.g. unit tests, manual testing, etc.) -->

## TODO
<!-- This section should be removed when all items are complete -->
- [x] Explain motivation or link existing issue(s)
- [x] Test changes and document test plan
- [x] Update documentation as needed

## DevOps Notes
<!-- Please uncheck these items as applicable to make DevOps aware of changes that may affect releases -->
- [x] This PR does not require configuration changes (e.g., environment variables, GitHub secrets, VM resources)
- [x] This PR does not affect public APIs
- [x] This PR does not rely on a new version of external services (PoET, elasticsearch, etc.)
- [x] This PR does not make changes to log messages (which monitoring infrastructure may rely on)
@bors
Copy link

bors bot commented Nov 9, 2022

Build failed:

  • ci-stage2

@poszu
Copy link
Contributor

poszu commented Nov 9, 2022

bors merge

bors bot pushed a commit that referenced this pull request Nov 9, 2022
## Motivation
Integrates changes of spacemeshos/post#78 into go-spacemesh, only merge after the former has been merged.

## Changes
The asynchronous `Initializer::SessionNumLabelsWrittenChan()` is removed in favor of the synchronous `Initializer::SessionNumLabelsWritten()` with the changes in spacemeshos/post#84

This updates go-spacemesh to not use the removed method any more.

The GRPC server now sends PoST status updates to a client in 1 second intervals instead of relying on PoST to report its status in (possibly) irregular intervals. This also means that a client now has to cancel a request or it will receive status updates about PoST indefinitely.

## Test Plan
<!-- Please specify how these changes were tested 
(e.g. unit tests, manual testing, etc.) -->

## TODO
<!-- This section should be removed when all items are complete -->
- [x] Explain motivation or link existing issue(s)
- [x] Test changes and document test plan
- [x] Update documentation as needed

## DevOps Notes
<!-- Please uncheck these items as applicable to make DevOps aware of changes that may affect releases -->
- [x] This PR does not require configuration changes (e.g., environment variables, GitHub secrets, VM resources)
- [x] This PR does not affect public APIs
- [x] This PR does not rely on a new version of external services (PoET, elasticsearch, etc.)
- [x] This PR does not make changes to log messages (which monitoring infrastructure may rely on)
@bors
Copy link

bors bot commented Nov 9, 2022

Pull request successfully merged into develop.

Build succeeded:

@bors bors bot changed the title Use updated Initializer API from PoST [Merged by Bors] - Use updated Initializer API from PoST Nov 9, 2022
@bors bors bot closed this Nov 9, 2022
@bors bors bot deleted the refactor-post-initializer branch November 9, 2022 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants