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

Memory limits follow documentation #106

Merged

Conversation

fe-lix-
Copy link
Contributor

@fe-lix- fe-lix- commented Jul 29, 2022

Description

Adobe Documentation state that memory limits should be configured as follow in the app.config.yaml

application:
  actions: actions
  web: web-src
  runtimeManifest:
    packages:
      mypackage:
        actions:
          myactions:
            function: actions/myaction.js
            runtime: 'nodejs:14'
            limits:
              memory: 512

Currently the code only looks for property memorySize and not memory

Documentation 1

Documentation 2

Related Issue

#105

Motivation and Context

The behaviour difference has been found by a customer here : https://experienceleaguecommunities.adobe.com/t5/project-firefly-questions/can-t-change-action-memory-limit/td-p/454197

How Has This Been Tested?

  • Automated tests

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov
Copy link

codecov bot commented Jul 29, 2022

Codecov Report

Merging #106 (12adc7a) into master (975fd68) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #106   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           11        11           
  Lines         1290      1290           
  Branches       338       338           
=========================================
  Hits          1290      1290           
Impacted Files Coverage Δ
src/utils.js 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@arjuncooliitr arjuncooliitr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@purplecabbage
Copy link
Member

It looks like the docs were wrong, OpenWhisk defines memorySize as the value ...
https://github.com/apache/openwhisk-wskdeploy/blob/03df1126c3b5205d642738479a08bb7cd66a03b3/tests/dat/manifest_data_compose_actions_for_limits.yaml#L29

Should we change this to support both?

@arjuncooliitr
Copy link
Contributor

arjuncooliitr commented Sep 7, 2022

Maybe, we can support both memory and memorySize inputs, just thinking wouldn't it be better to go with one variable value memorySize to avoid confusion

@fe-lix-
Copy link
Contributor Author

fe-lix- commented Sep 7, 2022

I think wskdeploy and the OpenWhisk API do not agree that probably what stems the confusion.

wskdeploy use memorySize but the OpenWhisk API uses memory.

https://github.com/apache/openwhisk/blob/59b67fe96f44e573f3348afed966a1cdaf80ddf2/docs/reference.md?plain=1#L80

@purplecabbage purplecabbage merged commit ef008d9 into adobe:master Sep 17, 2022
@purplecabbage
Copy link
Member

Merging, thanks @fe-lix-
I missed that you are in fact supporting both!

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.

4 participants