Skip to content

Conversation

@menghanl
Copy link
Contributor

Changes

  • new struct for server config (URI, creds, v2/v3, node), and reused for top level and per-authority server
    • and fix all the usages
  • logging for unknown fields
  • node proto message is now for each server, to be consistent with TransportAPI version
  • config test to use cmp.Diff

RELEASE NOTES: N/A

@menghanl
Copy link
Contributor Author

This PR has the same changes from #4867, but also a commit to remove support for the new fields.

  • client_default_listener_resource_name_template
  • authorities

The new fields will be added when the other components are updated to use the new fields. Before that's ready, users specifying new fields will get logging about unknown fields.

…ration

Support new bootstrap fields
- client_default_listener_resource_name_template
- authorities

Changes
- new struct for server config (URI, creds, v2/v3, node), and reused for top level and per-authority server
  - and fix all the usages
- node proto message is now for each server, to be consistent with TransportAPI version
- config test to use cmp.Diff
…ers will see logging.

Will add back after xdsclient and others are updated to make use of this new fields.
@menghanl menghanl force-pushed the federation_bootstrap_refactor branch from 8a715fc to 3cf068b Compare October 28, 2021 23:54
@menghanl menghanl modified the milestones: 1.42 Release, 1.43 release Oct 29, 2021
return nil, fmt.Errorf("xds: json.Unmarshal(%v) for field %q failed during bootstrap: %v", string(v), k, err)
}
default:
logger.Infof("Bootstrap content has unknown field: %s", k)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be at warning level?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed. I think it's lower than warning.

return nil
}

// Authority represents an Authority for an xDS control plane server.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we have a comment which is more helpful than this :)

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 cannot think of useful comment for this struct. It's usage is explained in the Config struct where it's used.

I added a sentence.

@easwars easwars assigned menghanl and unassigned easwars Nov 1, 2021
@menghanl menghanl merged commit 29deb6b into grpc:master Nov 2, 2021
@menghanl menghanl deleted the federation_bootstrap_refactor branch November 2, 2021 17:26
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Type: Feature New features or improvements in behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants