Skip to content

Minor Bug Fixes on GCP #252

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ cache*
minio-volume
scylladb-volume


# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down Expand Up @@ -188,3 +187,6 @@ cache
# IntelliJ IDEA files
.idea
*.iml

# MacOS Finder
**/.DS_Store
1 change: 0 additions & 1 deletion benchmarks/100.webapps/120.uploader/python/function.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

import datetime
import os
import uuid

import urllib.request

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/wrappers/gcp/nodejs/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class gcp_storage {
upload(container, file, filepath) {
let bucket = this.storage.bucket(container);
let uniqueName = this.unique_name(file);
let options = {destination: uniqueName};
let options = {destination: uniqueName, resumable: false};
return [uniqueName, bucket.upload(filepath, options)];
};

Expand Down
5 changes: 0 additions & 5 deletions config/systems.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@
"python": {
"base_images": {
"x64": {
"3.7": "ubuntu:22.04",
"3.8": "ubuntu:22.04",
"3.9": "ubuntu:22.04",
"3.10": "ubuntu:22.04",
Expand Down Expand Up @@ -228,10 +227,6 @@
"nodejs": {
"base_images": {
"x64": {
"10": "ubuntu:18.04",
"12": "ubuntu:18.04",
"14": "ubuntu:18.04",
"16": "ubuntu:18.04",
"18": "ubuntu:22.04",
"20": "ubuntu:22.04"
}
Expand Down
4 changes: 4 additions & 0 deletions sebs/gcp/gcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,16 @@ def create_trigger(self, function: Function, trigger_type: Trigger.TriggerType)
self.function_client.projects().locations().functions().get(name=full_func_name)
)
deployed = False
begin = time.time()
while not deployed:
status_res = our_function_req.execute()
if status_res["status"] == "ACTIVE":
deployed = True
else:
time.sleep(3)
if time.time() - begin > 300: # wait 5 minutes; TODO: make it configurable
self.logging.error(f"Failed to deploy function: {function.name}")
raise RuntimeError(f"Deployment timeout!")
self.logging.info(f"Function {function.name} - deployed!")
invoke_url = status_res["httpsTrigger"]["url"]

Expand Down