)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"c8b1c5df912e2bcda848ca8950a96dfdfe0b6b27","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"df33271e_665e6846","updated":"2020-04-06 01:22:40.000000000","message":"I see that the related issue has been linked, but it would be nice to have a bit more description of what this commit is and why it\u0027s needed here in the commit message.","commit_id":"9da47a33349d213d2893f9d7a135a47c15772203"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"c8b1c5df912e2bcda848ca8950a96dfdfe0b6b27","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Rodolfo Pacheco \u003cjezogwza@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2020-04-05 16:12:48 -0400"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implements airshipctl config --import \u003cfrom kubeconfig\u003e"},{"line_number":8,"context_line":"Issue https://github.com/airshipit/airshipctl/issues/153"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"TODO : No testing is implemented yet."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"df33271e_e62f18a5","line":7,"range":{"start_line":7,"start_character":29,"end_line":7,"end_character":31},"updated":"2020-04-06 01:22:40.000000000","message":"delete these dashes","commit_id":"9da47a33349d213d2893f9d7a135a47c15772203"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"c8b1c5df912e2bcda848ca8950a96dfdfe0b6b27","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2020-04-05 16:12:48 -0400"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implements airshipctl config --import \u003cfrom kubeconfig\u003e"},{"line_number":8,"context_line":"Issue https://github.com/airshipit/airshipctl/issues/153"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"TODO : No testing is implemented yet."},{"line_number":11,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"df33271e_26458071","line":8,"range":{"start_line":8,"start_character":0,"end_line":8,"end_character":56},"updated":"2020-04-06 01:22:40.000000000","message":"Please move this to the bottom so that the bot can pick it up. It should look like:\n\n  Closes: #153","commit_id":"9da47a33349d213d2893f9d7a135a47c15772203"}],"cmd/config/import.go":[{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"c8b1c5df912e2bcda848ca8950a96dfdfe0b6b27","unresolved":false,"context_lines":[{"line_number":29,"context_line":"\tuseImportLong \u003d \"Import into airshipctl config file informtaion from an existing kube config file.\""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"\tuseImportExample \u003d `"},{"line_number":32,"context_line":"# Switch to a Import named \"e2e\""},{"line_number":33,"context_line":"airshipctl config import my-other-kube-config`"},{"line_number":34,"context_line":")"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-go","patch_set":1,"id":"df33271e_d13a9096","line":32,"range":{"start_line":32,"start_character":2,"end_line":32,"end_character":32},"updated":"2020-04-06 01:22:40.000000000","message":"This needs to be updated","commit_id":"9da47a33349d213d2893f9d7a135a47c15772203"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"c8b1c5df912e2bcda848ca8950a96dfdfe0b6b27","unresolved":false,"context_lines":[{"line_number":38,"context_line":"// provided file."},{"line_number":39,"context_line":"func NewCmdConfigImport(rootSettings *environment.AirshipCTLSettings) *cobra.Command {"},{"line_number":40,"context_line":"\tcmd :\u003d \u0026cobra.Command{"},{"line_number":41,"context_line":"\t\tUse:     \"import NAME\","},{"line_number":42,"context_line":"\t\tShort:   \"Import from a kubernetes config file , only the clusters, contexts and users.\","},{"line_number":43,"context_line":"\t\tLong:    useImportLong,"},{"line_number":44,"context_line":"\t\tExample: useImportExample,"}],"source_content_type":"text/x-go","patch_set":1,"id":"df33271e_f13514aa","line":41,"range":{"start_line":41,"start_character":19,"end_line":41,"end_character":23},"updated":"2020-04-06 01:22:40.000000000","message":"change this to `\u003ckubeConfig\u003e`","commit_id":"9da47a33349d213d2893f9d7a135a47c15772203"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"c8b1c5df912e2bcda848ca8950a96dfdfe0b6b27","unresolved":false,"context_lines":[{"line_number":44,"context_line":"\t\tExample: useImportExample,"},{"line_number":45,"context_line":"\t\tArgs:    cobra.ExactArgs(1),"},{"line_number":46,"context_line":"\t\tRunE: func(cmd *cobra.Command, args []string) error {"},{"line_number":47,"context_line":"\t\t\tImportName :\u003d args[0]"},{"line_number":48,"context_line":"\t\t\terr :\u003d config.RunImport(ImportName, rootSettings.Config())"},{"line_number":49,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":50,"context_line":"\t\t\t\treturn err"}],"source_content_type":"text/x-go","patch_set":1,"id":"df33271e_91bbe80c","line":47,"range":{"start_line":47,"start_character":3,"end_line":47,"end_character":13},"updated":"2020-04-06 01:22:40.000000000","message":"change this to `kubeConfigPath`","commit_id":"9da47a33349d213d2893f9d7a135a47c15772203"},{"author":{"_account_id":29624,"name":"Alexander Hughes","email":"Alexander.Hughes@pm.me","username":"alexanderhughes"},"change_message_id":"158e88c33e32bdfebcc5a4513e5747126aa6df72","unresolved":false,"context_lines":[{"line_number":1,"context_line":"/*"},{"line_number":2,"context_line":"Copyright 2016 The Kubernetes Authors."},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":5,"context_line":"you may not use this file except in compliance with the License."}],"source_content_type":"text/x-go","patch_set":7,"id":"1f493fa4_acb35497","line":2,"range":{"start_line":2,"start_character":0,"end_line":2,"end_character":38},"updated":"2020-05-01 20:41:51.000000000","message":"nit: not really the k8s authors","commit_id":"17a9288e6f08017186320477ee97b08fb3c9123b"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"c1e5334bebac0bc41be633fbceed7c4f6294c919","unresolved":false,"context_lines":[{"line_number":1,"context_line":"/*"},{"line_number":2,"context_line":"Copyright 2016 The Kubernetes Authors."},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":5,"context_line":"you may not use this file except in compliance with the License."}],"source_content_type":"text/x-go","patch_set":7,"id":"1f493fa4_c7703b43","line":2,"range":{"start_line":2,"start_character":0,"end_line":2,"end_character":38},"in_reply_to":"1f493fa4_acb35497","updated":"2020-05-01 21:05:36.000000000","message":"good catch","commit_id":"17a9288e6f08017186320477ee97b08fb3c9123b"},{"author":{"_account_id":29624,"name":"Alexander Hughes","email":"Alexander.Hughes@pm.me","username":"alexanderhughes"},"change_message_id":"158e88c33e32bdfebcc5a4513e5747126aa6df72","unresolved":false,"context_lines":[{"line_number":36,"context_line":")"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"// NewImportCommand creates a command for the merging clusters, contexts, and"},{"line_number":39,"context_line":"// users from a kubeConfig file into the airshipctl config file."},{"line_number":40,"context_line":"func NewImportCommand(rootSettings *environment.AirshipCTLSettings) *cobra.Command {"},{"line_number":41,"context_line":"\tcmd :\u003d \u0026cobra.Command{"},{"line_number":42,"context_line":"\t\tUse:     \"import \u003ckubeConfig\u003e\","}],"source_content_type":"text/x-go","patch_set":7,"id":"1f493fa4_cc522035","line":39,"range":{"start_line":39,"start_character":9,"end_line":39,"end_character":31},"updated":"2020-05-01 20:41:51.000000000","message":"more validation is needed for this command to prevent someone from specifying a directory as an arg rather than a file.\n\nif we don\u0027t fail early then L775 of pkg/config/config.go will pass some calls around until ultimately hitting io/ioutil/ioutil.go\u0027s ReadFile method and tries to open the path and fails.\n\npossible unit test addition to ensure directory arg fails if we only expect a single file.","commit_id":"17a9288e6f08017186320477ee97b08fb3c9123b"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"c1e5334bebac0bc41be633fbceed7c4f6294c919","unresolved":false,"context_lines":[{"line_number":36,"context_line":")"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"// NewImportCommand creates a command for the merging clusters, contexts, and"},{"line_number":39,"context_line":"// users from a kubeConfig file into the airshipctl config file."},{"line_number":40,"context_line":"func NewImportCommand(rootSettings *environment.AirshipCTLSettings) *cobra.Command {"},{"line_number":41,"context_line":"\tcmd :\u003d \u0026cobra.Command{"},{"line_number":42,"context_line":"\t\tUse:     \"import \u003ckubeConfig\u003e\","}],"source_content_type":"text/x-go","patch_set":7,"id":"1f493fa4_8770f373","line":39,"range":{"start_line":39,"start_character":9,"end_line":39,"end_character":31},"in_reply_to":"1f493fa4_cc522035","updated":"2020-05-01 21:05:36.000000000","message":"I\u0027m not sure why more validation is needed here - if the path points at a directory, ReadFile will fail and return an an error, as expected. The error message even explains that the path is a directory:\n\n  read kubeConfigPath: is a directory","commit_id":"17a9288e6f08017186320477ee97b08fb3c9123b"},{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"c39cf3ca0c356fcf739f49867f1b86db5b6570f4","unresolved":false,"context_lines":[{"line_number":33,"context_line":"`"},{"line_number":34,"context_line":")"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"// NewImportCommand creates a command for the merging clusters, contexts, and"},{"line_number":37,"context_line":"// users from a kubeConfig file into the airshipctl config file."},{"line_number":38,"context_line":"func NewImportCommand(rootSettings *environment.AirshipCTLSettings) *cobra.Command {"},{"line_number":39,"context_line":"\tcmd :\u003d \u0026cobra.Command{"}],"source_content_type":"text/x-go","patch_set":10,"id":"1f493fa4_dbcf5427","line":36,"range":{"start_line":36,"start_character":38,"end_line":36,"end_character":53},"updated":"2020-05-04 21:38:51.000000000","message":"One of: that merges, to merge, for the merging of","commit_id":"6449d47f88060d9eceb8db3d487f3417fc4d383b"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"d3f69b939bdb3daaa50da578168fe5f49884194f","unresolved":false,"context_lines":[{"line_number":33,"context_line":"`"},{"line_number":34,"context_line":")"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"// NewImportCommand creates a command for the merging clusters, contexts, and"},{"line_number":37,"context_line":"// users from a kubeConfig file into the airshipctl config file."},{"line_number":38,"context_line":"func NewImportCommand(rootSettings *environment.AirshipCTLSettings) *cobra.Command {"},{"line_number":39,"context_line":"\tcmd :\u003d \u0026cobra.Command{"}],"source_content_type":"text/x-go","patch_set":10,"id":"1f493fa4_727c55b5","line":36,"range":{"start_line":36,"start_character":38,"end_line":36,"end_character":53},"in_reply_to":"1f493fa4_dbcf5427","updated":"2020-05-05 13:02:29.000000000","message":"Done","commit_id":"6449d47f88060d9eceb8db3d487f3417fc4d383b"}],"cmd/config/import_test.go":[{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"c39cf3ca0c356fcf739f49867f1b86db5b6570f4","unresolved":false,"context_lines":[{"line_number":1,"context_line":"/*"},{"line_number":2,"context_line":"Copyright 2017 The Kubernetes Authors."},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":5,"context_line":"you may not use this file except in compliance with the License."}],"source_content_type":"text/x-go","patch_set":10,"id":"1f493fa4_3b7c78b4","line":2,"range":{"start_line":2,"start_character":0,"end_line":2,"end_character":38},"updated":"2020-05-04 21:38:51.000000000","message":"Was this actually copied from K8s source?","commit_id":"6449d47f88060d9eceb8db3d487f3417fc4d383b"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"d3f69b939bdb3daaa50da578168fe5f49884194f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"/*"},{"line_number":2,"context_line":"Copyright 2017 The Kubernetes Authors."},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":5,"context_line":"you may not use this file except in compliance with the License."}],"source_content_type":"text/x-go","patch_set":10,"id":"1f493fa4_12451171","line":2,"range":{"start_line":2,"start_character":0,"end_line":2,"end_character":38},"in_reply_to":"1f493fa4_3b7c78b4","updated":"2020-05-05 13:02:29.000000000","message":"Done","commit_id":"6449d47f88060d9eceb8db3d487f3417fc4d383b"}],"pkg/config/cmds.go":[{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"c8b1c5df912e2bcda848ca8950a96dfdfe0b6b27","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"df33271e_4609a42f","updated":"2020-04-06 01:22:40.000000000","message":"It\u0027s nice to see documentation being added to these functions, but could we rearrange them to be complete sentences, as described by the style guide [0]?\n\nIn general, the name of the function should be the first word of the sentence. For example:\n\n  // getAuthInfo prints the credential described by `options` to `out`\n\nwhere `options` and `out` are arguments.\n\n[0] https://github.com/golang/go/wiki/CodeReviewComments#comment-sentences","commit_id":"9da47a33349d213d2893f9d7a135a47c15772203"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"c8b1c5df912e2bcda848ca8950a96dfdfe0b6b27","unresolved":false,"context_lines":[{"line_number":31,"context_line":"\treturn getAuthInfo(o, out, airconfig)"},{"line_number":32,"context_line":"}"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"//  getAuthInfo Execute the config get-ccredentials subcommand. Return the named credentials."},{"line_number":35,"context_line":"func getAuthInfo(o *AuthInfoOptions, out io.Writer, airconfig *Config) error {"},{"line_number":36,"context_line":"\tauthinfo, err :\u003d airconfig.GetAuthInfo(o.Name)"},{"line_number":37,"context_line":"\tif err !\u003d nil {"}],"source_content_type":"text/x-go","patch_set":1,"id":"df33271e_862a8c8d","line":34,"range":{"start_line":34,"start_character":3,"end_line":34,"end_character":4},"updated":"2020-04-06 01:22:40.000000000","message":"delete this extra space","commit_id":"9da47a33349d213d2893f9d7a135a47c15772203"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"c8b1c5df912e2bcda848ca8950a96dfdfe0b6b27","unresolved":false,"context_lines":[{"line_number":31,"context_line":"\treturn getAuthInfo(o, out, airconfig)"},{"line_number":32,"context_line":"}"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"//  getAuthInfo Execute the config get-ccredentials subcommand. Return the named credentials."},{"line_number":35,"context_line":"func getAuthInfo(o *AuthInfoOptions, out io.Writer, airconfig *Config) error {"},{"line_number":36,"context_line":"\tauthinfo, err :\u003d airconfig.GetAuthInfo(o.Name)"},{"line_number":37,"context_line":"\tif err !\u003d nil {"}],"source_content_type":"text/x-go","patch_set":1,"id":"df33271e_a606b01f","line":34,"range":{"start_line":34,"start_character":39,"end_line":34,"end_character":41},"updated":"2020-04-06 01:22:40.000000000","message":"extra c","commit_id":"9da47a33349d213d2893f9d7a135a47c15772203"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"c8b1c5df912e2bcda848ca8950a96dfdfe0b6b27","unresolved":false,"context_lines":[{"line_number":41,"context_line":"\treturn nil"},{"line_number":42,"context_line":"}"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"//  getAuthInfos Execute the config get-ccredentials subcommand. Return all credentials."},{"line_number":45,"context_line":"func getAuthInfos(out io.Writer, airconfig *Config) {"},{"line_number":46,"context_line":"\tauthinfos :\u003d airconfig.GetAuthInfos()"},{"line_number":47,"context_line":"\tif len(authinfos) \u003d\u003d 0 {"}],"source_content_type":"text/x-go","patch_set":1,"id":"df33271e_e618b885","line":44,"updated":"2020-04-06 01:22:40.000000000","message":"ditto: extra space","commit_id":"9da47a33349d213d2893f9d7a135a47c15772203"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"c8b1c5df912e2bcda848ca8950a96dfdfe0b6b27","unresolved":false,"context_lines":[{"line_number":41,"context_line":"\treturn nil"},{"line_number":42,"context_line":"}"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"//  getAuthInfos Execute the config get-ccredentials subcommand. Return all credentials."},{"line_number":45,"context_line":"func getAuthInfos(out io.Writer, airconfig *Config) {"},{"line_number":46,"context_line":"\tauthinfos :\u003d airconfig.GetAuthInfos()"},{"line_number":47,"context_line":"\tif len(authinfos) \u003d\u003d 0 {"}],"source_content_type":"text/x-go","patch_set":1,"id":"df33271e_8603ac0f","line":44,"range":{"start_line":44,"start_character":39,"end_line":44,"end_character":42},"updated":"2020-04-06 01:22:40.000000000","message":"extra c","commit_id":"9da47a33349d213d2893f9d7a135a47c15772203"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"c8b1c5df912e2bcda848ca8950a96dfdfe0b6b27","unresolved":false,"context_lines":[{"line_number":61,"context_line":"\treturn getCluster(o.Name, o.ClusterType, out, airconfig)"},{"line_number":62,"context_line":"}"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"//  getCluster Execute the config get-cluster subcommand. Return the named cluster."},{"line_number":65,"context_line":"func getCluster(cName, cType string, out io.Writer, airconfig *Config) error {"},{"line_number":66,"context_line":"\tcluster, err :\u003d airconfig.GetCluster(cName, cType)"},{"line_number":67,"context_line":"\tif err !\u003d nil {"}],"source_content_type":"text/x-go","patch_set":1,"id":"df33271e_c61db474","line":64,"range":{"start_line":64,"start_character":3,"end_line":64,"end_character":4},"updated":"2020-04-06 01:22:40.000000000","message":"ditto: extra space","commit_id":"9da47a33349d213d2893f9d7a135a47c15772203"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"c8b1c5df912e2bcda848ca8950a96dfdfe0b6b27","unresolved":false,"context_lines":[{"line_number":262,"context_line":"\treturn nil"},{"line_number":263,"context_line":"}"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"// RunImport imports clusters, contexts and user from a KubeConfig file"},{"line_number":266,"context_line":"// into the one been used by airship config."},{"line_number":267,"context_line":"func RunImport(importFromFile string, airconfig *Config) error {"},{"line_number":268,"context_line":"\t// This is useful for i.e. when a cluster api creates the target cluster"},{"line_number":269,"context_line":"\t// It stores the admin kubeconfig information as a secret in kubernetes"},{"line_number":270,"context_line":"\t// Pulling this secret from t he ephemeral cluster and"},{"line_number":271,"context_line":"\t// importing it will be the role of this functions."},{"line_number":272,"context_line":"\treturn airconfig.ImportFromKubeconfig(importFromFile)"},{"line_number":273,"context_line":"}"}],"source_content_type":"text/x-go","patch_set":1,"id":"df33271e_91180876","line":273,"range":{"start_line":265,"start_character":0,"end_line":273,"end_character":1},"updated":"2020-04-06 01:22:40.000000000","message":"Why is this function needed? Couldn\u0027t a user of this package just call\n\n  airconfig.ImportFromKubeConfig(importFromFile)","commit_id":"9da47a33349d213d2893f9d7a135a47c15772203"}],"pkg/config/config.go":[{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"c8b1c5df912e2bcda848ca8950a96dfdfe0b6b27","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"df33271e_51468023","updated":"2020-04-06 01:22:40.000000000","message":"to check for existence in a map, use the following idiom:\n\n  if _, ok :\u003d myMap[myKey]; !ok {\n    // myKey was not in myMap\n  }\n\nThis is important because `nil` is a valid value in a map","commit_id":"9da47a33349d213d2893f9d7a135a47c15772203"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"c8b1c5df912e2bcda848ca8950a96dfdfe0b6b27","unresolved":false,"context_lines":[{"line_number":732,"context_line":"\treturn os.Remove(c.loadedConfigPath)"},{"line_number":733,"context_line":"}"},{"line_number":734,"context_line":""},{"line_number":735,"context_line":"// Import into Airship config clusters, contexts and"},{"line_number":736,"context_line":"// credenrtials from a kube config file."},{"line_number":737,"context_line":"func (c *Config) ImportFromKubeconfig(importFromFile string) error {"},{"line_number":738,"context_line":"\tvar err error"}],"source_content_type":"text/x-go","patch_set":1,"id":"df33271e_d12bb07f","line":735,"updated":"2020-04-06 01:22:40.000000000","message":"ditto: documentation https://github.com/golang/go/wiki/CodeReviewComments#comment-sentences","commit_id":"9da47a33349d213d2893f9d7a135a47c15772203"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"c8b1c5df912e2bcda848ca8950a96dfdfe0b6b27","unresolved":false,"context_lines":[{"line_number":734,"context_line":""},{"line_number":735,"context_line":"// Import into Airship config clusters, contexts and"},{"line_number":736,"context_line":"// credenrtials from a kube config file."},{"line_number":737,"context_line":"func (c *Config) ImportFromKubeconfig(importFromFile string) error {"},{"line_number":738,"context_line":"\tvar err error"},{"line_number":739,"context_line":"\t_, err \u003d os.Stat(importFromFile)"},{"line_number":740,"context_line":"\tif err !\u003d nil {"}],"source_content_type":"text/x-go","patch_set":1,"id":"df33271e_713aa4cd","line":737,"range":{"start_line":737,"start_character":38,"end_line":737,"end_character":52},"updated":"2020-04-06 01:22:40.000000000","message":"I think kubeConfigPath better describes this argument","commit_id":"9da47a33349d213d2893f9d7a135a47c15772203"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"c8b1c5df912e2bcda848ca8950a96dfdfe0b6b27","unresolved":false,"context_lines":[{"line_number":734,"context_line":""},{"line_number":735,"context_line":"// Import into Airship config clusters, contexts and"},{"line_number":736,"context_line":"// credenrtials from a kube config file."},{"line_number":737,"context_line":"func (c *Config) ImportFromKubeconfig(importFromFile string) error {"},{"line_number":738,"context_line":"\tvar err error"},{"line_number":739,"context_line":"\t_, err \u003d os.Stat(importFromFile)"},{"line_number":740,"context_line":"\tif err !\u003d nil {"}],"source_content_type":"text/x-go","patch_set":1,"id":"df33271e_b1342ce0","line":737,"range":{"start_line":737,"start_character":31,"end_line":737,"end_character":32},"updated":"2020-04-06 01:22:40.000000000","message":"should be capitalized to match the rest of the codebase","commit_id":"9da47a33349d213d2893f9d7a135a47c15772203"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"c8b1c5df912e2bcda848ca8950a96dfdfe0b6b27","unresolved":false,"context_lines":[{"line_number":741,"context_line":"\t\treturn err"},{"line_number":742,"context_line":"\t}"},{"line_number":743,"context_line":""},{"line_number":744,"context_line":"\tkConfigImported, err :\u003d clientcmd.LoadFromFile(importFromFile)"},{"line_number":745,"context_line":"\tif err !\u003d nil {"},{"line_number":746,"context_line":"\t\treturn err"},{"line_number":747,"context_line":"\t}"}],"source_content_type":"text/x-go","patch_set":1,"id":"df33271e_513cc0be","line":744,"range":{"start_line":744,"start_character":1,"end_line":744,"end_character":16},"updated":"2020-04-06 01:22:40.000000000","message":"change this to kubeConfig","commit_id":"9da47a33349d213d2893f9d7a135a47c15772203"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"c8b1c5df912e2bcda848ca8950a96dfdfe0b6b27","unresolved":false,"context_lines":[{"line_number":748,"context_line":"\tc.importClusters(kConfigImported)"},{"line_number":749,"context_line":"\tc.importContexts(kConfigImported)"},{"line_number":750,"context_line":"\tc.importAuthInfos(kConfigImported)"},{"line_number":751,"context_line":"\t// Assume I  actually imported something"},{"line_number":752,"context_line":"\t// Lets reflect them in the config files"},{"line_number":753,"context_line":"\treturn c.PersistConfig()"},{"line_number":754,"context_line":"}"},{"line_number":755,"context_line":""}],"source_content_type":"text/x-go","patch_set":1,"id":"df33271e_7168e4b9","line":752,"range":{"start_line":751,"start_character":0,"end_line":752,"end_character":41},"updated":"2020-04-06 01:22:40.000000000","message":"I think it\u0027s safe to remove these comments","commit_id":"9da47a33349d213d2893f9d7a135a47c15772203"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"c8b1c5df912e2bcda848ca8950a96dfdfe0b6b27","unresolved":false,"context_lines":[{"line_number":754,"context_line":"}"},{"line_number":755,"context_line":""},{"line_number":756,"context_line":"func (c *Config) importClusters(importKubeConfig *clientcmdapi.Config) {"},{"line_number":757,"context_line":"\tfor clusterName, cluster :\u003d range importKubeConfig.Clusters {"},{"line_number":758,"context_line":"\t\tclusterComplexName :\u003d NewClusterComplexNameFromKubeClusterName(clusterName)"},{"line_number":759,"context_line":""},{"line_number":760,"context_line":"\t\t// Does this Cluster already exist"}],"source_content_type":"text/x-go","patch_set":1,"id":"df33271e_71dbc47c","line":757,"range":{"start_line":757,"start_character":18,"end_line":757,"end_character":25},"updated":"2020-04-06 01:22:40.000000000","message":"rename this to `kubeCluster` to differentiate it from `airshipCluster` below","commit_id":"9da47a33349d213d2893f9d7a135a47c15772203"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"c8b1c5df912e2bcda848ca8950a96dfdfe0b6b27","unresolved":false,"context_lines":[{"line_number":760,"context_line":"\t\t// Does this Cluster already exist"},{"line_number":761,"context_line":"\t\tif c.Clusters[clusterComplexName.Name] !\u003d nil \u0026\u0026"},{"line_number":762,"context_line":"\t\t\tc.Clusters[clusterComplexName.Name].ClusterTypes[clusterComplexName.Type] !\u003d nil {"},{"line_number":763,"context_line":"\t\t\t// For duplicates , Airship config"},{"line_number":764,"context_line":"\t\t\t// existing cluster takes precedence"},{"line_number":765,"context_line":"\t\t\tcontinue"},{"line_number":766,"context_line":"\t\t}"}],"source_content_type":"text/x-go","patch_set":1,"id":"df33271e_b1b70c3b","line":763,"range":{"start_line":763,"start_character":0,"end_line":763,"end_character":37},"updated":"2020-04-06 01:22:40.000000000","message":"delete this","commit_id":"9da47a33349d213d2893f9d7a135a47c15772203"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"c8b1c5df912e2bcda848ca8950a96dfdfe0b6b27","unresolved":false,"context_lines":[{"line_number":771,"context_line":"\t\tif c.Clusters[clusterComplexName.Name].ClusterTypes[clusterComplexName.Type] \u003d\u003d nil {"},{"line_number":772,"context_line":"\t\t\tc.Clusters[clusterComplexName.Name].ClusterTypes[clusterComplexName.Type] \u003d NewCluster()"},{"line_number":773,"context_line":"\t\t}"},{"line_number":774,"context_line":"\t\tconfigCluster :\u003d c.Clusters[clusterComplexName.Name].ClusterTypes[clusterComplexName.Type]"},{"line_number":775,"context_line":"\t\tconfigCluster.NameInKubeconf \u003d clusterComplexName.String()"},{"line_number":776,"context_line":"\t\t// Store the reference to the KubeConfig Cluster in the Airship Config"},{"line_number":777,"context_line":"\t\tconfigCluster.SetKubeCluster(cluster)"}],"source_content_type":"text/x-go","patch_set":1,"id":"df33271e_11f7d8f7","line":774,"range":{"start_line":774,"start_character":2,"end_line":774,"end_character":15},"updated":"2020-04-06 01:22:40.000000000","message":"rename this to airshipCluster to differentiate it from kubeCluster","commit_id":"9da47a33349d213d2893f9d7a135a47c15772203"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"c8b1c5df912e2bcda848ca8950a96dfdfe0b6b27","unresolved":false,"context_lines":[{"line_number":785,"context_line":"\tfor key, context :\u003d range importKubeConfig.Contexts {"},{"line_number":786,"context_line":"\t\t// Does this context already exist?"},{"line_number":787,"context_line":"\t\tif c.kubeConfig.Contexts[key] !\u003d nil {"},{"line_number":788,"context_line":"\t\t\t// For duplicates , Airship config"},{"line_number":789,"context_line":"\t\t\t// existing context takes precedence"},{"line_number":790,"context_line":"\t\t\tcontinue"},{"line_number":791,"context_line":"\t\t}"}],"source_content_type":"text/x-go","patch_set":1,"id":"df33271e_f1823452","line":788,"range":{"start_line":788,"start_character":0,"end_line":788,"end_character":37},"updated":"2020-04-06 01:22:40.000000000","message":"delete this","commit_id":"9da47a33349d213d2893f9d7a135a47c15772203"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"c8b1c5df912e2bcda848ca8950a96dfdfe0b6b27","unresolved":false,"context_lines":[{"line_number":826,"context_line":"}"},{"line_number":827,"context_line":""},{"line_number":828,"context_line":"func (c *Config) importAuthInfos(importKubeConfig *clientcmdapi.Config) {"},{"line_number":829,"context_line":"\tfor key, authinfo :\u003d range importKubeConfig.AuthInfos {"},{"line_number":830,"context_line":"\t\tif c.AuthInfos[key] !\u003d nil {"},{"line_number":831,"context_line":"\t\t\t// Existing credentials take  precedence"},{"line_number":832,"context_line":"\t\t\tcontinue"},{"line_number":833,"context_line":"\t\t}"},{"line_number":834,"context_line":"\t\t// Simple check if the AuthInfo name is referenced in airship config"},{"line_number":835,"context_line":"\t\tif c.AuthInfos[key] \u003d\u003d nil \u0026\u0026 authinfo !\u003d nil {"},{"line_number":836,"context_line":"\t\t\tc.AuthInfos[key] \u003d NewAuthInfo()"},{"line_number":837,"context_line":"\t\t}"},{"line_number":838,"context_line":"\t\tc.AuthInfos[key].SetKubeAuthInfo(authinfo)"},{"line_number":839,"context_line":"\t\tc.kubeConfig.AuthInfos[key] \u003d authinfo"},{"line_number":840,"context_line":"\t}"},{"line_number":841,"context_line":"}"},{"line_number":842,"context_line":""},{"line_number":843,"context_line":"func (c *Cluster) String() string {"}],"source_content_type":"text/x-go","patch_set":1,"id":"df33271e_f1e7d445","line":840,"range":{"start_line":829,"start_character":0,"end_line":840,"end_character":2},"updated":"2020-04-06 01:22:40.000000000","message":"simplify this:\n\n\tfor key, authInfo :\u003d range importKubeConfig.AuthInfos {\n\t\t// Existing credentials should take precedence - We should only\n\t\t// add new credentials\n\t\tif _, ok :\u003d c.AuthInfos[key]; !ok {\n\t\t\tc.AuthInfos[key] \u003d \u0026AuthInfo{authInfo: authInfo}\n\t\t\tc.kubeConfig.AuthInfos[key] \u003d authInfo\n\t\t}\n\t}","commit_id":"9da47a33349d213d2893f9d7a135a47c15772203"},{"author":{"_account_id":7185,"name":"Dmitry Ukov","email":"dukov@mirantis.com","username":"dukov"},"change_message_id":"4a9bfa7cee283d459da37fb52adbb8793f95bfd8","unresolved":false,"context_lines":[{"line_number":809,"context_line":"\t\t\t\t// Is the best course of action is to ignore  the context"},{"line_number":810,"context_line":"\t\t\t\t// therefore it will not be imported."},{"line_number":811,"context_line":"\t\t\t\t// TODO Revise this behavior."},{"line_number":812,"context_line":"\t\t\t\tdelete(c.kubeConfig.Contexts, key)"},{"line_number":813,"context_line":""},{"line_number":814,"context_line":"\t\t\t\t// Or instead throw an error , at least the user"},{"line_number":815,"context_line":"\t\t\t\t// will be aware . However this stops the import."}],"source_content_type":"text/x-go","patch_set":3,"id":"df33271e_622b70ea","line":812,"range":{"start_line":812,"start_character":4,"end_line":812,"end_character":38},"updated":"2020-04-10 14:21:23.000000000","message":"this is weird since we are not touching kubeConfig during regular reconciliation since it\u0027s considered the source of truth","commit_id":"7757b0e5e46a1f439f66c1afe29c5d230e007508"}],"pkg/config/config_test.go":[{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"c39cf3ca0c356fcf739f49867f1b86db5b6570f4","unresolved":false,"context_lines":[{"line_number":605,"context_line":"\t}"},{"line_number":606,"context_line":"}"},{"line_number":607,"context_line":""},{"line_number":608,"context_line":"func TestImport(t *testing.T) {"},{"line_number":609,"context_line":"\tconf, cleanupConfig :\u003d testutil.InitConfig(t)"},{"line_number":610,"context_line":"\tdefer cleanupConfig(t)"},{"line_number":611,"context_line":""}],"source_content_type":"text/x-go","patch_set":10,"id":"1f493fa4_bb17e851","line":608,"range":{"start_line":608,"start_character":0,"end_line":608,"end_character":31},"updated":"2020-05-04 21:38:51.000000000","message":"These are good test cases, but it doesn\u0027t look like there are any cases here that cover potential errors, e.g. bad kubeconfig path.\n\nAlso, I didn\u0027t catch a test that would cover changing a standard cluster name to a complex cluster name. I might be referencing a different airshipctl then this test is using.","commit_id":"6449d47f88060d9eceb8db3d487f3417fc4d383b"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"d3f69b939bdb3daaa50da578168fe5f49884194f","unresolved":false,"context_lines":[{"line_number":605,"context_line":"\t}"},{"line_number":606,"context_line":"}"},{"line_number":607,"context_line":""},{"line_number":608,"context_line":"func TestImport(t *testing.T) {"},{"line_number":609,"context_line":"\tconf, cleanupConfig :\u003d testutil.InitConfig(t)"},{"line_number":610,"context_line":"\tdefer cleanupConfig(t)"},{"line_number":611,"context_line":""}],"source_content_type":"text/x-go","patch_set":10,"id":"1f493fa4_b2341dfd","line":608,"range":{"start_line":608,"start_character":0,"end_line":608,"end_character":31},"in_reply_to":"1f493fa4_bb17e851","updated":"2020-05-05 13:02:29.000000000","message":"I\u0027ll work on some more cases in the next PS","commit_id":"6449d47f88060d9eceb8db3d487f3417fc4d383b"}]}
