Repository navigation
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9904 +/- ##
=======================================
Coverage 85.34% 85.35%
=======================================
Files 339 339
Lines 13822 13831 +9
=======================================
+ Hits 11797 11806 +9
Misses 2025 2025
Continue to review full report at Codecov.
|
|
Hello @medikoo could you please take a look? Do these changes make sense from your point of view? |
| provider.s3CodeArtifactsDirectoryPath = `${prefix}/${serviceStage}/code-artifacts`; | ||
| provider.s3DeploymentDirectoryPath = `${prefix}/${serviceStage}/${dateString}`; |
There was a problem hiding this comment.
Let's not set it on service.provider, this object reflects user configuration and ideally if we do not mix it with internally resolved data (although I know that currently our internals in few places do that).
Ideally if s3CodeArtifactsDirectoryPath and s3DeploymentDirectoryPath getters simply resolve it on spot
And timestamp part can be set on provider instance in its constructor as e.g. this.deploymentTimestamp = ...
| const dateString = `${date.getTime().toString()}-${date.toISOString()}`; | ||
| const prefix = this.provider.getDeploymentPrefix(); | ||
|
|
||
| provider.s3CodeArtifactsDirectoryPath = `${prefix}/${serviceStage}/code-artifacts`; |
There was a problem hiding this comment.
In context of this PR we should not yet introduce s3CodeArtifactsDirectoryPath
| provider.s3DeploymentDirectoryPath = `${prefix}/${serviceStage}/${dateString}`; | ||
| } | ||
|
|
||
| get s3CodeArtifactsDirectoryPath() { |
There was a problem hiding this comment.
In context of this PR we should not yet introduce s3CodeArtifactsDirectoryPath, as so far path is same as s3DeploymentDirectoryPath.
| } | ||
|
|
||
| service.package.artifactDirectoryName = `${prefix}/${dateString}`; | ||
| service.provider.s3DeploymentDirectoryPath = `${prefix}/${dateString}`; |
There was a problem hiding this comment.
I think here what should be overriden is just serverless.getProvider('aws').deploymentTimestamp and having that getters should start resolve the right deployment path (?)
| beforeEach(() => { | ||
| awsProvider.hooks.initialize(); | ||
| }); | ||
| it('should provide proper code artifacts S3 directory path', () => { |
There was a problem hiding this comment.
Any new tests should be based on runServerless util, e.g. see how provider.getRegion() is tested:
serverless/test/unit/lib/plugins/aws/provider.test.js
Lines 602 to 637 in 9e308bd
|
This is already far away from possibility of merging to main |
What it does?
What else is important?