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

feat(cf): support load cf config v4 or later #219

Merged
merged 3 commits into from
Sep 17, 2020
Merged

feat(cf): support load cf config v4 or later #219

merged 3 commits into from
Sep 17, 2020

Conversation

archerzz
Copy link
Contributor

  • sync latest config data from upstream cf cli project
    • remove LoggregatorEndpoint property and corresponding codes
    • add UAAGrantType property, but not setter/getter
  • remove compatibility check and purge logic, we should delegate it
    to CF CLI
  • set default config version to 4 if not set
  • add unit test

resolve #218

* sync latest config data from upstream cf cli project
  * remove `LoggregatorEndpoint` property and corresponding codes
  * add `UAAGrantType` property, but not setter/getter
* remove compatibility check and purge logic, we should delegate it
  to CF CLI
* set default config version to `4` if not set
* add unit test

resolve #218
per discussion, we should clear out the config like cf cli, but only
when the config version is not 3 or 4
1. add the applied change
2. fix and add unit test
@@ -49,7 +50,9 @@ func NewCFConfigData() *CFConfigData {
}

func (data *CFConfigData) Marshal() ([]byte, error) {
data.ConfigVersion = 3
if data.ConfigVersion == 0 {
data.ConfigVersion = 4
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe change to

if data.ConfigVersion != 3{
    data.ConfigVersion = 4
}

@archerzz archerzz merged commit 4b7f6ed into dev Sep 17, 2020
@archerzz archerzz deleted the cf-v4 branch September 17, 2020 07:31
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