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

Version 1 of Serverless Action Provider #1

Open
wants to merge 89 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
a10c840
First workflow to deploy layer
BenGalewsky Mar 23, 2021
a9727df
Add deployment of globus-auth function
BenGalewsky Mar 23, 2021
898a4b2
Add funcx-run and introspect lambdas
BenGalewsky Mar 23, 2021
fbcb582
Add some basic instructions
BenGalewsky Mar 23, 2021
f6d5f3f
Getting the right collection of scopes
BenGalewsky Mar 23, 2021
5fe06b9
Add dynamo db tracking of requests and status
BenGalewsky Mar 24, 2021
29c81df
Update status
BenGalewsky Mar 24, 2021
06b890b
Drop action_provider_tools
BenGalewsky Mar 24, 2021
e776808
Working for multiple tasks. Added example flow
BenGalewsky Mar 26, 2021
3b6b20c
Make a smarter deploy_example_flow
BenGalewsky Mar 26, 2021
03052b5
Submit tasks as a batch
BenGalewsky Mar 26, 2021
1b97c53
Migrate CI job to funcX AWS Account
BenGalewsky Mar 30, 2021
11f89e9
Update README with complete deployment hints
BenGalewsky Apr 1, 2021
20544b8
Bump to 0.2.3
ryanchard May 20, 2021
b9f37c1
Add python 3.7 to list of valid runtimes
BenGalewsky May 24, 2021
21a6bc5
use_offprocess_checker to False
BenGalewsky May 24, 2021
abc2155
Disable use_offprocess_checker for status call too
BenGalewsky May 24, 2021
ae84c09
Use a slimmed down version of parsl
BenGalewsky Jun 23, 2021
43bed77
action record saved as JSON
BenGalewsky Jun 24, 2021
ba1d43d
Remove dumps statement on result
ryanchard Jul 9, 2021
de9226f
Reverting to a list of results
ryanchard Jul 13, 2021
cbcbcf8
Merge pull request #4 from funcx-faas/list_responses
ryanchard Jul 13, 2021
dd247a3
bugfix task_result instead of action_response
ryanchard Jul 13, 2021
74a51a7
Nest result in a result field.
ryanchard Jul 13, 2021
f90b067
Add decimal import
ryanchard Jul 21, 2021
1625cab
Add second running_tasks check after polling task status
ryanchard Sep 14, 2021
142d0e1
Fix not running check
ryanchard Sep 14, 2021
e6a4d51
Bump versions to 0.3.4 and include funcx-endpoint
ryanchard Nov 8, 2021
95b6a92
Return stack trace rather than stringified exception
ryanchard Nov 18, 2021
b071418
Don't publish to aws on PRs
BenGalewsky Nov 19, 2021
0db3593
Adds None as the result if none returned.
ryanchard Mar 2, 2022
822a95e
Changing to a completed flag to track running tasks
ryanchard Mar 2, 2022
852ea79
Remove unused var
ryanchard Mar 2, 2022
f507fb2
Merge pull request #9 from funcx-faas/fix_none_result
ryanchard Mar 5, 2022
633ed31
Adds error handling on submit and supports None payload. Adds log lin…
ryanchard Apr 4, 2022
986c5d1
Merge pull request #11 from funcx-faas/handle_submit_errors
ryanchard Apr 11, 2022
d5301f5
Merge branch 'serverless' into return_stack_trace
ryanchard Apr 11, 2022
c0c242c
Merge pull request #12 from funcx-faas/return_stack_trace
ryanchard Apr 11, 2022
23653f8
Fix result status message
ryanchard Apr 11, 2022
2c07e96
Merge pull request #13 from funcx-faas/fix_result_details
ryanchard Apr 11, 2022
bf84e7f
Return the error message as the result
ryanchard Apr 11, 2022
113edbc
Merge pull request #14 from funcx-faas/return_error_result
ryanchard Apr 11, 2022
c5305b6
Logging submit error
ryanchard Apr 21, 2022
69aa7a9
Merge pull request #16 from funcx-faas/log_submit_errors
ryanchard Apr 21, 2022
9861411
Sets the task group id to the user id
ryanchard Apr 29, 2022
94b693c
Update reqs
ryanchard Apr 29, 2022
c3bdea7
Update lambda layer on deploy
ryanchard May 16, 2022
dca7aa6
Merge pull request #20 from funcx-faas/deploy_lambda_layer
ryanchard May 17, 2022
4443572
Remove layer deployment from globus_auth lambda
ryanchard May 17, 2022
544a0fa
Add wait for function to deployment
ryanchard May 17, 2022
0e31bed
Add wait cli command to deployment
ryanchard May 17, 2022
946a9ff
Add debug logs to build
ryanchard May 17, 2022
68bd98a
debugging
ryanchard May 17, 2022
f453832
Add state between steps
ryanchard May 17, 2022
0284786
Update github env var usage
ryanchard May 17, 2022
464f7cb
Typo
ryanchard May 17, 2022
f038fd4
Clean up debugging and set deployment for all actions
ryanchard May 17, 2022
62c5196
Add wait steps back into deployment
ryanchard May 17, 2022
9a15a24
Update requirements for environment
ryanchard May 17, 2022
af541d6
Merge branch 'serverless' into set_task_group_id
ryanchard May 17, 2022
6a2fc4b
Merge pull request #18 from funcx-faas/set_task_group_id
ryanchard May 17, 2022
30f42f0
Fix status active overwrite bug
ryanchard May 25, 2022
0429f3b
Add two-week TTLs to the dynamo record
ryanchard May 31, 2022
0a772cc
Merge pull request #21 from funcx-faas/add_ttl
ryanchard Jun 28, 2022
2aa2475
Rename ttl to fx_ttl
ryanchard Jun 28, 2022
7f75775
Bump to 1.0.0
ryanchard Aug 16, 2022
9df3c23
Merge pull request #22 from funcx-faas/bump_1.0.0
ryanchard Aug 16, 2022
b1df91c
Change funcx home to work with 1.0.0 and use /tmp for lambda
ryanchard Aug 16, 2022
b07a72a
Merge pull request #23 from funcx-faas/bump_1.0.0
ryanchard Aug 16, 2022
1421045
Changing token storage _home() function path
ryanchard Aug 16, 2022
dfeaa6a
Merge pull request #24 from funcx-faas/1.0.0_fixes
ryanchard Aug 16, 2022
f63107b
Change to Path over PurePath for exists() to work.
ryanchard Aug 16, 2022
7897835
Merge pull request #25 from funcx-faas/1.0.0_fixes
ryanchard Aug 16, 2022
0450340
Bump endpoint version to 1.0.1
ryanchard Aug 16, 2022
feae152
Merge pull request #26 from funcx-faas/bump_1.0.1
ryanchard Aug 16, 2022
cb7bd4c
Use custom login manager to manage auth tokens
ryanchard Aug 17, 2022
f5d3262
Add login manager to action status
ryanchard Aug 17, 2022
b57f66b
Merge pull request #27 from funcx-faas/bump_1.0.1
ryanchard Aug 17, 2022
469e2eb
Add globus sdk dependencies
ryanchard Aug 17, 2022
2060b55
Import TaskPending exception
ryanchard Aug 17, 2022
014c67b
Import new version
ryanchard Aug 17, 2022
789b788
Move details definition and default to None
ryanchard Oct 31, 2022
9ca2d63
Merge pull request #29 from funcx-faas/fix_details_not_set
ryanchard Nov 1, 2022
346fb00
Update version and remove task group
ryanchard Mar 29, 2023
6bf80fc
Merge pull request #30 from funcx-faas/update_1.0.12
ryanchard Mar 29, 2023
aa7a25d
Pin cryptography wheel requirement for lambda
ryanchard Apr 6, 2023
a4c4243
Try pinning to an old cryptography package.
ryanchard Apr 6, 2023
ae8909e
Try manylinux_2_12
ryanchard Apr 6, 2023
37115dd
Switch to kwargs for adding values to a batch
ryanchard Apr 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions .github/workflows/deploy_lambdas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: CI

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
#when there is a push to the main
push:
branches: [ serverless ]

jobs:
build:
runs-on: ubuntu-latest
steps:

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

#installs a version of python, but I need this if deploying to a severless Python Lambda?
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.7'

#credentials to connect to AWS
- name: Configure AWS credentials from Production account
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
profile_name: default
project_name: FuncXActionProvider
runtime: python3.7

- name: Create dependency layer
run: |
python -m pip install --upgrade pip
mkdir python
#install all dependencies as defined by requirements.txt in the aws directory
pip3 install --use-deprecated=legacy-resolver -r aws/requirements.txt -t ./python

# There is a problem with the parsl library in lambda. We have a slimmed
# down version to replace it
rm -Rf python/parsl*
pip3 install --use-deprecated=legacy-resolver -t python ./slim-parsl

#zip files into current directory
zip -r funcxLayer.zip ./python
aws lambda publish-layer-version --layer-name FuncxLayer --zip-file fileb://./funcxLayer.zip --compatible-runtimes python3.6 python3.7 python3.8 > layer_info.json
cat layer_info.json
LAYER_VERSION=$(jq ".Version" layer_info.json)
LAYER_VERSION_ARN=$(jq ".LayerVersionArn" layer_info.json)
echo "LAYER_VERSION_ARN=$LAYER_VERSION_ARN" >> $GITHUB_ENV

- name: Upload Globus Auth Function
run: |
cp aws/funcx-globus-auth.py ./lambda_function.py
zip funcx-globus-auth.zip ./lambda_function.py
rm ./lambda_function.py
aws lambda update-function-code --function-name funcx-globus-auth --zip-file fileb://./funcx-globus-auth.zip

- name: Upload Action Introspect Function
run: |
cp aws/action_introspect.py ./lambda_function.py
zip action_introspect.zip ./lambda_function.py
rm ./lambda_function.py
aws lambda update-function-code --function-name action_introspect --zip-file fileb://./action_introspect.zip
aws lambda wait function-updated --function-name action_introspect
aws lambda update-function-configuration --function-name action_introspect --layers ${{ env.LAYER_VERSION_ARN }}

- name: Upload Action Run Function
run: |
cp aws/funcx-run.py ./lambda_function.py
zip funcx-run.zip ./lambda_function.py
rm ./lambda_function.py
aws lambda update-function-code --function-name funcx-run --zip-file fileb://./funcx-run.zip
aws lambda wait function-updated --function-name funcx-run
aws lambda update-function-configuration --function-name funcx-run --layers ${{ env.LAYER_VERSION_ARN }}

- name: Upload Action Status Function
run: |
cp aws/action-status.py ./lambda_function.py
zip action-status.zip ./lambda_function.py
rm ./lambda_function.py
aws lambda update-function-code --function-name action_status --zip-file fileb://./action-status.zip
aws lambda wait function-updated --function-name action_status
aws lambda update-function-configuration --function-name action_status --layers ${{ env.LAYER_VERSION_ARN }}

143 changes: 143 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

.automatesecrets
example_flow_info.json
.python-version
.idea
Loading