Skip to content
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

feat: #1042 Allow configure db ConnMaxLifetime & ConnMaxIdleTime #1198

Closed
wants to merge 14 commits into from

Conversation

jeswinsimon
Copy link

@jeswinsimon jeswinsimon commented Mar 16, 2024

Purpose or design rationale of this PR

Allow connMaxLifetime and connMaxIdleTime to be configured for database connections

feat: #1042 Allow configure db ConnMaxLifetime & ConnMaxIdleTime

Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:

  • build: Changes that affect the build system or external dependencies (example scopes: yarn, eslint, typescript)
  • ci: Changes to our CI configuration files and scripts (example scopes: vercel, github, cypress)
  • docs: Documentation-only changes
  • feat: A new feature
  • fix: A bug fix
  • perf: A code change that improves performance
  • refactor: A code change that doesn't fix a bug, or add a feature, or improves performance
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • test: Adding missing tests or correcting existing tests

Deployment tag versioning

Has tag in common/version.go been updated or have you added bump-version label to this PR?

  • No, this PR doesn't involve a new deployment, git tag, docker image tag
  • Yes

Breaking change label

Does this PR have the breaking-change label?

  • No, this PR is not a breaking change
  • Yes

@jeswinsimon jeswinsimon changed the title feat:#1042 Allow configure db ConnMaxLifetime & ConnMaxIdleTime feat: #1042 Allow configure db ConnMaxLifetime & ConnMaxIdleTime Mar 18, 2024
@0xmountaintop
Copy link
Member

looks great.

do you think we can

  1. make these fields optional (omitempty); and
  2. have default config value
    so that the marshalling & unmarshalling are compatible with previous codes?

@jeswinsimon
Copy link
Author

looks great.

do you think we can

  1. make these fields optional (omitempty); and
  2. have default config value
    so that the marshalling & unmarshalling are compatible with previous codes?

@HAOYUatHZ Done.

@jeswinsimon
Copy link
Author

@HAOYUatHZ I have fixed the failing test cases.

@0xmountaintop
Copy link
Member

looks weird that there are so many contracts diff

I guess it's because the develop branch of your fork is left behind?

Copy link

codecov bot commented Mar 23, 2024

Codecov Report

Attention: Patch coverage is 57.82609% with 97 lines in your changes are missing coverage. Please review.

Project coverage is 56.39%. Comparing base (02415a6) to head (b0676fd).
Report is 1 commits behind head on develop.

❗ Current head b0676fd differs from pull request most recent head ece6b6f. Consider uploading reports for the commit ece6b6f to get more accurate results

Files Patch % Lines
contracts/src/L1/rollup/ScrollChain.sol 55.80% 80 Missing ⚠️
...ntracts/src/libraries/codec/BatchHeaderV1Codec.sol 47.05% 9 Missing ⚠️
contracts/src/libraries/codec/ChunkCodecV1.sol 0.00% 7 Missing ⚠️
...ntracts/src/libraries/codec/BatchHeaderV0Codec.sol 83.33% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1198      +/-   ##
===========================================
- Coverage    56.79%   56.39%   -0.41%     
===========================================
  Files          155      157       +2     
  Lines        11848    11966     +118     
===========================================
+ Hits          6729     6748      +19     
- Misses        4613     4712      +99     
  Partials       506      506              
Flag Coverage Δ
contracts 55.25% <57.82%> (-2.29%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jeswinsimon
Copy link
Author

@HAOYUatHZ The additional file change happened after I rebased to develop. I am closing this PR in favour of #1207. It has all the changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants