-
Notifications
You must be signed in to change notification settings - Fork 152
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
Add test for pipedv1's buildPlan method, and remove platform specific config from configv1's GenericApplicationConfig #5238
Conversation
Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
pkg/config/application.go
Outdated
func (s *GenericApplicationSpec) UnmarshalJSON(data []byte) error { | ||
type Alias GenericApplicationSpec | ||
var aux Alias | ||
|
||
if err := json.Unmarshal(data, &aux); err != nil { | ||
return err | ||
} | ||
|
||
if err := defaults.Set(&aux); err != nil { | ||
return err | ||
} | ||
|
||
*s = GenericApplicationSpec(aux) | ||
return 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.
Oops, these changes are mistakenly commited. I'll remove these changes.
→ Done
Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5238 +/- ##
==========================================
+ Coverage 23.94% 23.99% +0.04%
==========================================
Files 437 438 +1
Lines 46994 46883 -111
==========================================
- Hits 11255 11248 -7
+ Misses 34835 34744 -91
+ Partials 904 891 -13
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
cfg := new(config.GenericApplicationSpec) | ||
if err := json.NewDecoder(bytes.NewReader(targetDS.ApplicationConfig)).Decode(cfg); err != nil { | ||
p.logger.Error("unable to parse application config", zap.Error(err)) | ||
return nil, err | ||
} |
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.
It could be better to move this part to configv1 package, wdyt?
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.
OK. I'll move this to configv1, like LoadApplication.
pipecd/pkg/configv1/application.go
Line 778 in 077b7b6
func LoadApplication(repoPath, configRelPath string, appKind model.ApplicationKind) (*GenericApplicationSpec, error) { |
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.
Fixed on this commit
b9e9261
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.
I modified again based on face-to-face mtg
85c0a79
Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
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.
LGTM, great step done 💯
What this PR does / why we need it:
Which issue(s) this PR fixes:
Part of #4980
Does this PR introduce a user-facing change?: