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

deployment: JD improvements #15239

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open

deployment: JD improvements #15239

wants to merge 5 commits into from

Conversation

archseer
Copy link
Contributor

No description provided.

@archseer archseer requested review from a team, eutopian and yevshev as code owners November 14, 2024 06:52
Copy link
Contributor

I see you updated files related to core. Please run pnpm changeset in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

🎖️ No JIRA issue number found in: PR title, commit message, or branch name. Please include the issue ID in one of these.

Copy link
Contributor

github-actions bot commented Nov 14, 2024

AER Report: CI Core ran successfully ✅

aer_workflow , commit

AER Report: Operator UI CI ran successfully ✅

aer_workflow , commit

@@ -367,7 +367,8 @@ func (n *Node) CreateJobDistributor(ctx context.Context, jd JobDistributor) (str
func (n *Node) SetUpAndLinkJobDistributor(ctx context.Context, jd JobDistributor) error {
// register the node in the job distributor
err := n.RegisterNodeToJobDistributor(ctx, jd)
if err != nil {
// TODO: check for rpc code = "AlreadyExists" instead
if err != nil && !strings.Contains(err.Error(), "AlreadyExists") {
Copy link
Collaborator

Choose a reason for hiding this comment

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

so if the node is already registered in JD, we still want to continue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah I'm planning to change it so it's create or update, that way it's idempotent and can be re-ran (it's a total pain to wipe the config on all the nodes if you need to retry)

core/services/feeds/service.go Show resolved Hide resolved
krehermann
krehermann previously approved these changes Nov 14, 2024
msg := err.GetMessage()
return "", fmt.Errorf("failed to create feeds manager: %v", msg)
}
return "", fmt.Errorf("failed to create feeds manager: %v", response.GetCreateFeedsManager().GetTypename())
Copy link
Contributor

Choose a reason for hiding this comment

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

can the response be nil at any point here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I found a better way of handling all these: converting to status.Status then handling the Code/Message values: https://github.com/grpc/grpc-go/blob/master/Documentation/rpc-errors.md

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actually that won't work, the error responses aren't returned as actual errors... we'll just have to write custom cases

Copy link
Contributor

Choose a reason for hiding this comment

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

We have custom errors for loops that know how to translate to grpc and still match via errors.Is

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.

5 participants