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

[feature] update config types to use bytesize.Size #828

Conversation

NyaaaWhatsUpDoc
Copy link
Member

@NyaaaWhatsUpDoc NyaaaWhatsUpDoc commented Sep 13, 2022

Allows passing 40MiB, 40MB, 1kiB etc instead of literal sizes in bytes. Also updates some of the file sizes returned in the codebase to be int64 and not int.

Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
@NyaaaWhatsUpDoc
Copy link
Member Author

Okay turns out mapstructure is angery and doesn't handle the decoding properly. Grrr.

Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
@NyaaaWhatsUpDoc
Copy link
Member Author

@tsmethurst I am so confused as to why the pipeline is failing. running test/envparsing.sh locally passes for me. would you be able to checkout this branch and see if it works locally for you?

@tsmethurst
Copy link
Contributor

I am so confused as to why the pipeline is failing. running test/envparsing.sh locally passes for me

You're running go 1.19 now right? This PR is still building/testing/etc on 1.18

@NyaaaWhatsUpDoc
Copy link
Member Author

I am so confused as to why the pipeline is failing. running test/envparsing.sh locally passes for me

You're running go 1.19 now right? This PR is still building/testing/etc on 1.18

This is true! Though I think I just managed to catch and fix the error now, related to a small change I made in envparsing :)

@NyaaaWhatsUpDoc
Copy link
Member Author

^ this is what I get for attempting to edit and fix things from my phone using the GitHub text editor lmao

@NyaaaWhatsUpDoc
Copy link
Member Author

@tsmethurst how do we feel about merging this one? :)

@tsmethurst
Copy link
Contributor

I feel good about it, BUT we should probably fix the broken snapshot build first, looks like swagger is not in the path for some reason? https://drone.superseriousbusiness.org/superseriousbusiness/gotosocial/2834/1/2

@NyaaaWhatsUpDoc
Copy link
Member Author

I feel good about it, BUT we should probably fix the broken snapshot build first, looks like swagger is not in the path for some reason? https://drone.superseriousbusiness.org/superseriousbusiness/gotosocial/2834/1/2

how on earth 🤔 i'll take a look into this tomorrow

@tsmethurst
Copy link
Contributor

One thing I forgot to ask earlier: will this require users to update their configs? or is it backwards compatible?

@NyaaaWhatsUpDoc NyaaaWhatsUpDoc merged commit 1d99971 into superseriousbusiness:main Sep 29, 2022
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.

None yet

2 participants