-
Notifications
You must be signed in to change notification settings - Fork 138
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
Refactoring executor, db, and util packages #250
Refactoring executor, db, and util packages #250
Conversation
e8c0acf
to
4ce3c65
Compare
Can you have a look at this to see if it triggers some thoughts? https://medium.com/@benbjohnson/standard-package-layout-7cdbc8391fc1 it is imho the best article about structuring projects in Go. I have to think about pkg, I tend to avoid them as much as I can |
@gianarb The intention here is to use |
Validation has to be server-side to avoid man in the middle, manipulation that can corrupt the request when it left the CLI. And because we have to provide a consistent experience across SDKs, cli, and so on. So validation has to stay server side. if you think some validation can be moved in the CLI I am happy to duplicate validation. Think about this problem in this way: "there is a team writing CLI, there is a team writing the server". Both have to write code in a way that is solid. Server-side we have to be sure that that we get is valid, no matter who sends it. In the CLI we have to offer the best experience ever. |
Thanks @gianarb . That absolutely makes sense.
|
4ce3c65
to
139a77b
Compare
Codecov Report
@@ Coverage Diff @@
## master #250 +/- ##
==========================================
+ Coverage 12.98% 15.34% +2.36%
==========================================
Files 7 9 +2
Lines 1186 1264 +78
==========================================
+ Hits 154 194 +40
- Misses 1021 1059 +38
Partials 11 11
Continue to review full report at Codecov.
|
139a77b
to
9023a5c
Compare
Signed-off-by: Gaurav Gahlot <[email protected]>
Signed-off-by: Gaurav Gahlot <[email protected]>
Signed-off-by: Gaurav Gahlot <[email protected]>
Signed-off-by: Gaurav Gahlot <[email protected]>
9023a5c
to
df8d388
Compare
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.
Let's move it forward as it is. I think we should try to remove pkg as well but we can do it later
Description
The changes include:
util
package topkg
types
fromexecutor
package topkg
executor
packagedb/workflow.go
topkg
db/workflow.go
to usepkg
Why is this needed?
How Has This Been Tested?
How are existing users impacted? What migration steps/scripts do we need?
Checklist:
I have:
Coverage