-
Notifications
You must be signed in to change notification settings - Fork 31
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
[ACNA-1304] Filter actions deployments. #478
Conversation
On file change it should only deploy it's respective action. It should not redeploy twice the same action packages if redeployment is called unless files were changed.
Codecov Report
@@ Coverage Diff @@
## master #478 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 43 43
Lines 2262 2278 +16
Branches 375 377 +2
=========================================
+ Hits 2262 2278 +16
Continue to review full report at Codecov.
|
added a new way of filtering. filtering by the already built actions.
…r filePath updated unit tests.
…nputs for the same action file.
.gitignore
Outdated
@@ -14,3 +14,11 @@ oclif.manifest.json | |||
package-lock.json | |||
|
|||
bin/openwhisk-standalone*.jar | |||
/.idea/.gitignore |
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.
what about just /.idea/ ?
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.
right
src/lib/actions-watcher.js
Outdated
Object.entries(config.manifest.full.packages).forEach(([, pkg]) => { | ||
if (pkg.actions) { | ||
Object.entries(pkg.actions).forEach(([actionName, action]) => { | ||
if (action.function.includes(filePath)) { |
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.
Let's be double safe here, this might not work if filePath
or action.funtion
is a windows path, or if filePath
is absolut. What about making both to unix and absolut and check for equality ?
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.
Yep, you are right, action.function
will have a Unix path even if it's generated on windows.
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.
few nitpicks comments otherwise lgtm, feel free to merge after resolving those
Changing the way deployments go.
On file change, it should deploy only its respective action.
It should not redeploy twice the same action packages if redeployment is called unless files were changed.
Extends: adobe/aio-lib-runtime#75
Description
Create a filter array based on the current file changed. This will help the deploy function to decide which actions to deploy.
Related Issue
#468
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: