-
Notifications
You must be signed in to change notification settings - Fork 90
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
fix: PrepareForValidation Context fixes [#589] #859
base: v1.15.x
Are you sure you want to change the base?
Conversation
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore: [goravel#539] Remove the SQL migrator module * remove * update mod
β¦6b319 (goravel#815) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* feat: migrator support to change table column * fix lint issue * improve unit test * add compile default for sql server and improve unit test * add more test case
β¦#817) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
β¦ied method receivers (goravel#821)
β¦avel#810) * feat: [goravel#540] Move Postgres, Mysql, etc. DB drivers to single packages * chore: update mocks * optimize * chore: update mocks * add comment * test * test: submodule (goravel#816) * optimize * test * test: submodule * test * optimize test * test: submodule (goravel#816) * optimize * test * test: submodule (goravel#816) * move test cases to tests * remove mocks * go mod * add tests * chore: update mocks * move test * remove * update codecov * add test cases * add test * chore: update mocks * fix test * fix lint --------- Co-authored-by: hwbrzzl <hwbrzzl@users.noreply.github.com> Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>
β¦vel#823) * update tests mod * feat: [goravel#540] Remove config.go::Driver * add test * rename * rename * fix test * remove files * chore: update mocks * fix test * fix test * remove hint * fix test --------- Co-authored-by: hwbrzzl <24771476+hwbrzzl@users.noreply.github.com>
* feat: [goravel#540] Remove SQL in show_command.go * fix test * fix lint * fix sort
β¦#824) * chore: add GetContent and PutContent methods to support/file * improve unit test * fix unit test failed on Windows
β¦#832) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* feat: [goravel#540] Remove DriverSchema * add test * Optimize test * optimize * optimize * optimize
* chore(deps): Update module github.com/samber/lo to v1.48.0 * fix * fix action --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Bowen <hwbrzzl@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
β¦ebc8a (goravel#840) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
β¦oravel#841) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
β¦ver names (goravel#853) Co-authored-by: Wenbo Han <hwbrzzl@gmail.com>
* refactor: queue pr 1 * chore: update mocks * feat: add job test * feat: fix some test * chore: update mocks * feat: fix some test * feat: fix some test * feat: fix some test * feat: fix some test * feat: fix some test * feat: fix some test * chore: update mocks * feat: fix some test * feat: fix some test * feat: fix some test * feat: fix some test * feat: update * chore: update mocks * feat: update tests * fix: lint * feat: optimize worker * feat: optimize * feat: optimize tests * feat: optimize tests * chore: update mocks * feat: optimize tests * feat: optimize tests * feat: optimize * feat: finish machinery * feat: finish machinery tests * feat: finish machinery tests * chore: merge master * update test cases * feat: optimize code * chore: update mocks * feat: temporary fix test * feat: temporary fix test * optimize test * feat: remove machinery * chore: update mocks * feat: merge master --------- Co-authored-by: devhaozi <devhaozi@users.noreply.github.com> Co-authored-by: Bowen <hwbrzzl@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Wenbo Han <hwbrzzl@gmail.com>
Important Review skippedAuto reviews are limited to specific labels. π·οΈ Labels to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? πͺ§ TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests β
Additional details and impacted files@@ Coverage Diff @@
## v1.15.x #859 +/- ##
==========================================
Coverage ? 69.79%
==========================================
Files ? 218
Lines ? 18890
Branches ? 0
==========================================
Hits ? 13184
Misses ? 4991
Partials ? 715 β View full report in Codecov by Sentry. |
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
# Conflicts: # database/schema/blueprint.go # database/schema/grammars/mysql.go # database/schema/grammars/mysql_test.go # database/schema/grammars/postgres.go # database/schema/grammars/postgres_test.go # database/schema/grammars/sqlite.go # database/schema/grammars/sqlite_test.go # database/schema/grammars/sqlserver.go # database/schema/grammars/sqlserver_test.go # database/schema/grammars/utils.go # database/schema/grammars/utils_test.go # go.mod # go.sum # grpc/application.go # tests/schema_test.go
Hey @ahmed3mar Is this PR ready for review, please? We can release it in v1.15.4 |
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.
Great PR π
func(o map[string]any) { | ||
o["ctx"] = goravelhttp.NewContext() | ||
}, |
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.
We can create a new Context
method like Filters
, and set a value to the ctx
, then test whether the value can be obtained as expected.
@@ -54,7 +54,7 @@ func (r *Validation) Make(data any, rules map[string]string, options ...validate | |||
options = append(options, Rules(rules), CustomRules(r.rules), CustomFilters(r.filters)) | |||
generateOptions := GenerateOptions(options) | |||
if generateOptions["prepareForValidation"] != nil { | |||
if err := generateOptions["prepareForValidation"].(func(ctx http.Context, data validatecontract.Data) error)(nil, NewData(dataFace)); err != nil { | |||
if err := generateOptions["prepareForValidation"].(func(ctx http.Context, data validatecontract.Data) error)(generateOptions["ctx"].(http.Context), NewData(dataFace)); 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.
Need check if existing: ctx, ok := generateOptions["ctx"].(http.Context)
π Description
Closes goravel/goravel#589
@coderabbitai summary
β Checks