Details
-
Bug
-
Resolution: Fixed
-
Minor
-
6.5.0
-
Untriaged
-
Unknown
Description
Build: 6.5.0-4854
- Try to import a function where alias bucket is not present. It shows multiple blank entries
- If we deploy current handler with blank , it take the incorrect bucket name
{
|
"appcode": "function OnUpdate(doc, meta) {\n dst_bucket[meta.id]=\"curl bucket op\";\n var request = {\n\tpath : 'job/test_suite_executor/api/json?tree=jobs[component]'\n };\n while(true){\n try {\n if (meta.id.includes(\"_\")){\n var id = meta.id.split(\"_\")[1];\n if(parseInt(id)%5==0){\n \tvar response = curl(\"GET\", server, request);\n \tlog('response body received from server:', response.body);\n \tlog('response headers received from server:', response.headers);\n \tlog('response status received from server:', response.status);\n \tvar res= new Uint8Array(response.body);\n \tif(response.status == 200){\n \t \tbreak; \n \t }\n }\n }\n }\n catch (e) {\n \tlog('error:', e);\n }\n }\n}\n\n\n\nfunction OnDelete(meta) {\n delete dst_bucket[meta.id];\n var request = {\n\tpath : 'job/test_suite_executor/api/json?tree=jobs[component]'\n };\n while(true){\n try {\n if (meta.id.includes(\"_\")){\n var id = meta.id.split(\"_\")[1];\n if(parseInt(id)%5==0){\n \tvar response = curl(\"GET\", server, request);\n \tlog('response body received from server:', response.body);\n \tlog('response headers received from server:', response.headers);\n \tlog('response status received from server:', response.status);\n \tvar res= new Uint8Array(response.body);\n \tif(response.status == 200){\n \t \tbreak; \n \t}\n }\n }\n }\n catch (e) {\n \tlog('error:', e);\n }\n }\n}",
|
"depcfg": {
|
"buckets": [
|
{
|
"alias": "dst_bucket",
|
"bucket_name": "ITEM",
|
"access": "rw"
|
}
|
],
|
"curl": [
|
{
|
"hostname": "http://qa.sc.couchbase.com/",
|
"value": "server",
|
"auth_type": "no-auth",
|
"username": "",
|
"password": "",
|
"bearer_key": "",
|
"allow_cookies": false,
|
"validate_ssl_certificate": false
|
}
|
],
|
"metadata_bucket": "metadata",
|
"source_bucket": "src_bucket"
|
},
|
"version": "evt-6.5.0-4854-ee",
|
"handleruuid": 4175165125,
|
"id": 0,
|
"function_instance_id": "dBy1z2",
|
"appname": "bucket_op_curl",
|
"settings": {
|
"dcp_stream_boundary": "everything",
|
"deadline_timeout": 62,
|
"deployment_status": true,
|
"description": "",
|
"execution_timeout": 60,
|
"log_level": "INFO",
|
"n1ql_consistency": "none",
|
"processing_status": true,
|
"user_prefix": "eventing",
|
"using_timer": false,
|
"worker_count": 12
|
},
|
"using_timer": false,
|
"src_mutation": false
|
}
|
|
As per screenshot we dont have "ITEM" bucket itself
Attachments
For Gerrit Dashboard: MB-37007 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
118852,1 | MB-37007: Remove blank options from bucket selection | unstable | eventing | Status: ABANDONED | 0 | 0 |
143034,3 | MB-37007: Block Bindings submission if one of the keyspaces are invalid | unstable | eventing | Status: MERGED | +2 | +1 |
160083,2 | MB-37007: UI: Imported function has multiple blank options for bucket drop down | cheshire-cat | eventing | Status: MERGED | +2 | +1 |
160105,2 | MB-37007: UI: Imported function has multiple blank options for bucket drop down | unstable | eventing | Status: MERGED | +2 | +1 |
161035,2 | MB-37007: Fix to eliminate 'Bucket Name cannot be empty' in Add Function dialog | cheshire-cat | eventing | Status: MERGED | +2 | +1 |
161093,2 | MB-37007: Fix to eliminate 'Bucket Name cannot be empty' in Add Function dialog | unstable | eventing | Status: MERGED | +2 | +1 |