-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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(self-hosted): convert experimental env vars to config options #29154
base: main
Are you sure you want to change the base?
feat(self-hosted): convert experimental env vars to config options #29154
Conversation
Verified each migration locally, by either logging the values of each option at runtime or confirming that they are working as expected |
## s3PathStyle | ||
|
||
If set, Renovate will enable `forcePathStyle` when creating the AWS S3 client instance. | ||
|
||
> Whether to force path-style URLs for S3 objects (e.g., `https://s3.amazonaws.com//` instead of `https://.s3.amazonaws.com/`) | ||
|
||
Source: [AWS S3 documentation - Interface BucketEndpointInputConfig](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-s3/interfaces/bucketendpointinputconfig.html) | ||
|
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.
@Gabriel-Ladzaretti why is this necessary? Isn't it the same administrator who's configuring the S3?
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.
This is mainly used for s3 compatible solutions that dont support or are not configured to use virtual-hosted–style
requests. It essentially alters the way the aws client constructs and resolves urls.
path-style-access
e.g, https://s3.amazonaws.com/mybucket/myfile
vs
virtual-hosted-style-access
e,g, https://mybucket.s3.amazonaws.com/myfile
i dont think there is another way to support these s3 instances.
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 use it for my Minio instance
## s3PathStyle | ||
|
||
If set, Renovate will enable `forcePathStyle` when creating the AWS S3 client instance. | ||
|
||
> Whether to force path-style URLs for S3 objects (e.g., `https://s3.amazonaws.com//` instead of `https://.s3.amazonaws.com/`) | ||
|
||
Source: [AWS S3 documentation - Interface BucketEndpointInputConfig](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-s3/interfaces/bucketendpointinputconfig.html) | ||
|
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 use it for my Minio instance
@@ -89,7 +89,7 @@ export async function exportStats(config: RenovateConfig): Promise<void> { | |||
ContentType: 'application/json', | |||
}; | |||
|
|||
const client = getS3Client(); | |||
const client = getS3Client(config.s3Endpoint, config.s3PathStyle); |
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.
Is this required because we didn't initialized the global config at that time?
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.
Yes, we do not have global config class initialized.
Changes
RENOVATE_X_DELETE_CONFIG_FILE
deleteConfigFile
RENOVATE_X_S3_ENDPOINT
s3Endpoint
RENOVATE_X_S3_PATH_STYLE
s3PathStyle
There are some boolean types here. They could not be converted to
experimentalFlags
becauseGlobalConfig
hasn't been initialized yet, when they are used, hence converting them to self-hosted config options instead.Context
Last of: #27879 (comment)
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: