-
Notifications
You must be signed in to change notification settings - Fork 0
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
Review fixes of #872 #7
Changes from 16 commits
af819fa
9f2c461
0e1219e
4a9c195
cecaaaa
47d4196
7c5d1a9
b752323
5add692
f6f0a2c
5e3ff1d
1ae8fe0
d93fa60
9cd26d5
2acc22c
2df6112
03e76ba
50637bd
842c34e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -568,13 +568,13 @@ func UpdateInstances(store InstanceStore, updatef func(instances *Instances) err | |
|
||
// MigrateV2Instances migrates instance record(s) from the V2 data model. | ||
// | ||
// - v2keyKnownJiraInstances ("known_jira_instances") was stored as a | ||
// map[string]string (InstanceID->Type), needs to be stored as Instances. | ||
// https://github.com/mattermost/mattermost-plugin-jira/blob/885efe8eb70c92bcea64d1ced6e67710eda77b6e/server/kv.go#L375 | ||
// - v2keyCurrentJIRAInstance ("current_jira_instance") stored an Instance; will | ||
// be used to set the default instance. | ||
// - The instances themselves should be forward-compatible, including | ||
// CurrentInstance. | ||
// - v2keyKnownJiraInstances ("known_jira_instances") was stored as a | ||
Kshitij-Katiyar marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can restore the changes in this file, there aren't any. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @javaguirre , I was getting an error : |
||
// map[string]string (InstanceID->Type), needs to be stored as Instances. | ||
// https://github.com/mattermost/mattermost-plugin-jira/blob/885efe8eb70c92bcea64d1ced6e67710eda77b6e/server/kv.go#L375 | ||
// - v2keyCurrentJIRAInstance ("current_jira_instance") stored an Instance; will | ||
// be used to set the default instance. | ||
// - The instances themselves should be forward-compatible, including | ||
// CurrentInstance. | ||
func MigrateV2Instances(p *Plugin) (*Instances, error) { | ||
// Check if V3 instances exist and return them if found | ||
instances, err := p.instanceStore.LoadInstances() | ||
|
@@ -646,7 +646,7 @@ func MigrateV2Instances(p *Plugin) (*Instances, error) { | |
return instances, nil | ||
} | ||
|
||
// MigrateV3ToV2 performs necessary migrations when reverting from V3 to V2 | ||
// MigrateV3ToV2 performs necessary migrations when reverting from V3 to V2 | ||
func MigrateV3ToV2(p *Plugin) string { | ||
// migrate V3 instances to v2 | ||
v2Instances, msg := MigrateV3InstancesToV2(p) | ||
|
@@ -675,10 +675,10 @@ func MigrateV3ToV2(p *Plugin) string { | |
|
||
// MigrateV3InstancesToV2 migrates instance record(s) from the V3 data model. | ||
// | ||
// - v3 instances need to be stored as v2keyKnownJiraInstances | ||
// (known_jira_instances) map[string]string (InstanceID->Type), | ||
// - v2keyCurrentJIRAInstance ("current_jira_instance") stored an Instance; will | ||
// be used to set the default instance. | ||
// - v3 instances need to be stored as v2keyKnownJiraInstances | ||
// (known_jira_instances) map[string]string (InstanceID->Type), | ||
// - v2keyCurrentJIRAInstance ("current_jira_instance") stored an Instance; will | ||
// be used to set the default instance. | ||
func MigrateV3InstancesToV2(p *Plugin) (JiraV2Instances, string) { | ||
v3instances, err := p.instanceStore.LoadInstances() | ||
if err != nil { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@javaguirre because this was one of your review comments