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: add izanami as feature flipping provider #2507

Merged
merged 10 commits into from
Apr 4, 2018
Merged

Conversation

sguiheux
Copy link
Collaborator

@sguiheux sguiheux commented Apr 3, 2018

@ovh/cds

)

const (
FeatWorkflowAsCode = "cds:wasc"
Copy link
Member

Choose a reason for hiding this comment

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

why public? If public, need some doc

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Public because you will need it on code

sdk/project.go Outdated
@@ -31,6 +31,13 @@ type Project struct {
Keys []ProjectKey `json:"keys" yaml:"keys" db:"-" cli:"-"`
VCSServers []ProjectVCSServer `json:"vcs_servers" yaml:"vcs_servers" db:"-" cli:"-"`
Platforms []ProjectPlatform `json:"platforms" yaml:"platforms" db:"-" cli:"-"`
Features ProjectFeatures `json:"features" yaml:"platforms" db:"-" cli:"-"`
Copy link
Member

Choose a reason for hiding this comment

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

yml platforms --> features

ClientSecret string `toml:"client_secret"`
Token string `toml;"token" comment:"Token shared between Izanami and CDS to be able to send webhooks from izanami"`
}
}
Copy link
Member

Choose a reason for hiding this comment

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

missing doc for toml configuration, and toml key name for FeaturesFlipping and Izanami

ClientSecret string `toml:"client_secret"`
Token string `toml;"token" comment:"Token shared between Izanami and CDS to be able to send webhooks from izanami"`
}
}
Copy link
Member

Choose a reason for hiding this comment

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

i miss toml comments

@@ -352,6 +361,12 @@ func (a *API) Serve(ctx context.Context) error {
a.Config.SMTP.TLS,
a.Config.SMTP.Disable)

// Initialize feature package
log.Info("Initializing feature flipping")
Copy link
Member

Choose a reason for hiding this comment

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

add the URL in the log (kinda a debug the bug)

// Initialize feature package
log.Info("Initializing feature flipping")
if a.Config.FeaturesFlipping.Izanami.ApiURL != "" {
feature.Init(a.Config.FeaturesFlipping.Izanami.ApiURL, a.Config.FeaturesFlipping.Izanami.ClientID, a.Config.FeaturesFlipping.Izanami.ClientSecret)
Copy link
Member

Choose a reason for hiding this comment

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

check the error

"github.com/ovh/cds/engine/api/feature"
)

func (api *API) cleanFeatureHandler() Handler {
Copy link
Member

Choose a reason for hiding this comment

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

Please add a test (to cover the router)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it will be overkill no?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@yesnault
Copy link
Member

yesnault commented Apr 3, 2018

is it possible to add cdsctl admin feature list ? something to get info about feature without going on ui

@sguiheux
Copy link
Collaborator Author

sguiheux commented Apr 3, 2018

@yesnault you can create an issue, but do not block PR for this

@yesnault
Copy link
Member

yesnault commented Apr 3, 2018

@sguiheux #2508

ClientID string `toml:"client_id"`
ClientSecret string `toml:"client_secret"`
Token string `toml;"token" comment:"Token shared between Izanami and CDS to be able to send webhooks from izanami"`
}
Copy link
Member

Choose a reason for hiding this comment

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

missing `toml:"izanami" + comment about what is is, why use it, etc... or just 'enable alpha feature, use it with precaution'

Copy link
Member

Choose a reason for hiding this comment

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

and something under https://ovh.github.io/cds/hosting/ about izanami?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not for now, it's not mandatory. We also have to discuss about release ;)

@@ -134,7 +134,7 @@ type Configuration struct {
ClientID string `toml:"client_id"`
ClientSecret string `toml:"client_secret"`
Token string `toml;"token" comment:"Token shared between Izanami and CDS to be able to send webhooks from izanami"`
Copy link
Member

Choose a reason for hiding this comment

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

toml;"token" -> toml:"token"

@fsamin fsamin merged commit b672e8a into master Apr 4, 2018
@sguiheux sguiheux deleted the featureFlipping branch May 25, 2018 08:37
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.

None yet

4 participants