Commit e61a927a authored by Jérome Perrin's avatar Jérome Perrin

Theia 1.31.1

See merge request !1282
parents 1739b986 2127c79e
# libcurl - the multiprotocol file transfer library # libcurl - the multiprotocol file transfer library
# http://curl.haxx.se/ # https://curl.se/
[buildout] [buildout]
extends = extends =
...@@ -17,8 +17,8 @@ parts = ...@@ -17,8 +17,8 @@ parts =
[curl] [curl]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true shared = true
url = http://curl.haxx.se/download/curl-7.79.1.tar.xz url = https://curl.se/download/curl-7.86.0.tar.xz
md5sum = 74d3c4ca8aaa6c0619806d6e246e65fb md5sum = 19a2165f37941a6f412afc924e750568
configure-options = configure-options =
--disable-static --disable-static
--disable-ech --disable-ech
......
...@@ -18,8 +18,8 @@ parts = ...@@ -18,8 +18,8 @@ parts =
[git] [git]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true shared = true
url = https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.37.0.tar.xz url = https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.38.1.tar.xz
md5sum = 9716e2b4be3f9e1105f23aa1f80a37e4 md5sum = abdafbfb85d205421903a2100c734b17
configure-options = configure-options =
--with-curl=${curl:location} --with-curl=${curl:location}
--with-openssl=${openssl:location} --with-openssl=${openssl:location}
......
...@@ -19,7 +19,7 @@ md5sum = 8157c22134200bd862a07c6521ebf799 ...@@ -19,7 +19,7 @@ md5sum = 8157c22134200bd862a07c6521ebf799
[yarn.lock] [yarn.lock]
_update_hash_filename_ = yarn.lock _update_hash_filename_ = yarn.lock
md5sum = f961f8ef90e9a02543b4231af4fbd5cc md5sum = 3b8ac3a6933a1d52b31c74fad8af2d8e
[ms-python-disable-jedi-buildout.patch] [ms-python-disable-jedi-buildout.patch]
_update_hash_filename_ = ms-python-disable-jedi-buildout.patch _update_hash_filename_ = ms-python-disable-jedi-buildout.patch
......
This diff is collapsed.
...@@ -17,6 +17,7 @@ for plugin_and_version in '''\ ...@@ -17,6 +17,7 @@ for plugin_and_version in '''\
vscode/docker/latest vscode/docker/latest
vscode/emmet/latest vscode/emmet/latest
vscode/fsharp/latest vscode/fsharp/latest
vscode/git-base/latest
vscode/git/latest vscode/git/latest
vscode/go/latest vscode/go/latest
vscode/groovy/latest vscode/groovy/latest
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -15,11 +15,11 @@ ...@@ -15,11 +15,11 @@
[instance-theia] [instance-theia]
_update_hash_filename_ = instance-theia.cfg.jinja.in _update_hash_filename_ = instance-theia.cfg.jinja.in
md5sum = 153be75bad8e1f38fbf05fedbf99650d md5sum = 3d00572afdd311ba8b4fc8b6ad0ac4b6
[instance] [instance]
_update_hash_filename_ = instance.cfg.in _update_hash_filename_ = instance.cfg.in
md5sum = e211c439571e2900f9f35482c9638d06 md5sum = 08b8aa2b7f59ac0e4e5d4ca180054937
[instance-import] [instance-import]
_update_hash_filename_ = instance-import.cfg.jinja.in _update_hash_filename_ = instance-import.cfg.jinja.in
......
...@@ -25,6 +25,16 @@ ...@@ -25,6 +25,16 @@
"{\"software-url\": \"~/srv/project/slapos/software/html5as/software.cfg\", \"software-type\": \"replicate\", \"instance-parameters\": {\"replicate-quantity\": 3}}" "{\"software-url\": \"~/srv/project/slapos/software/html5as/software.cfg\", \"software-type\": \"replicate\", \"instance-parameters\": {\"replicate-quantity\": 3}}"
] ]
}, },
"forward-slapos-frontend-requests": {
"title": "Forward Frontend Requests in the Embedded SlapOS",
"description": "Embedded SlapOS instance by default forwards frontend requests as shared instances attached to the Theia instance, so that HTTP frontends can be allocated for services. This behavior can be disabled, in that case frontends will not be allocated.",
"type": "string",
"enum": [
"enabled",
"disabled"
],
"default": "enabled"
},
"frontend-guid": { "frontend-guid": {
"title": "Frontend Instance ID", "title": "Frontend Instance ID",
"description": "Unique identifier of the frontend instance, like \"SOFTINST-11031\".", "description": "Unique identifier of the frontend instance, like \"SOFTINST-11031\".",
......
...@@ -535,7 +535,7 @@ context = ...@@ -535,7 +535,7 @@ context =
key forward_frontend_requests :forward-frontend-requests key forward_frontend_requests :forward-frontend-requests
section slap_connection slap-connection section slap_connection slap-connection
section slapos_standalone_config slapos-standalone-config section slapos_standalone_config slapos-standalone-config
forward-frontend-requests = enabled forward-frontend-requests = {{ parameter_dict['forward-slapos-frontend-requests'] }}
url = ${slapos-standalone-script:output} url = ${slapos-standalone-script:output}
[slapos-standalone] [slapos-standalone]
......
...@@ -45,6 +45,7 @@ default-parameters = ...@@ -45,6 +45,7 @@ default-parameters =
{ {
"autorun": "running", "autorun": "running",
"initial-embedded-instance": null, "initial-embedded-instance": null,
"forward-slapos-frontend-requests": "enabled",
"frontend-name": "Theia Frontend", "frontend-name": "Theia Frontend",
"frontend-sr": "$${:frontend-sr}", "frontend-sr": "$${:frontend-sr}",
"frontend-sr-type": "RootSoftwareInstance", "frontend-sr-type": "RootSoftwareInstance",
......
...@@ -56,7 +56,7 @@ pygls = 0.12:whl ...@@ -56,7 +56,7 @@ pygls = 0.12:whl
typeguard = 2.13.3:whl typeguard = 2.13.3:whl
typing-extensions = 4.3.0:whl typing-extensions = 4.3.0:whl
yarl = 1.7.2 yarl = 1.7.2
zc.buildout.languageserver = 0.8.1 zc.buildout.languageserver = 0.8.3
# Downloads and templates # Downloads and templates
...@@ -155,6 +155,7 @@ needs-these-eggs-scripts-in-path = ...@@ -155,6 +155,7 @@ needs-these-eggs-scripts-in-path =
[python-for-buildout-languageserver] [python-for-buildout-languageserver]
<= python-interpreter <= python-interpreter
interpreter = ${:_buildout_section_name_}
executable = ${buildout:bin-directory}/${:interpreter} executable = ${buildout:bin-directory}/${:interpreter}
eggs += eggs +=
zc.buildout.languageserver zc.buildout.languageserver
......
...@@ -31,6 +31,7 @@ import logging ...@@ -31,6 +31,7 @@ import logging
import os import os
import re import re
import subprocess import subprocess
import sqlite3
import time import time
import pexpect import pexpect
...@@ -42,6 +43,7 @@ from six.moves.urllib.parse import urlparse, urljoin ...@@ -42,6 +43,7 @@ from six.moves.urllib.parse import urlparse, urljoin
from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass, SlapOSNodeCommandError from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass, SlapOSNodeCommandError
from slapos.grid.svcbackend import getSupervisorRPC, _getSupervisordSocketPath from slapos.grid.svcbackend import getSupervisorRPC, _getSupervisordSocketPath
from slapos.proxy.db_version import DB_VERSION
theia_software_release_url = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'software.cfg')) theia_software_release_url = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'software.cfg'))
...@@ -356,6 +358,60 @@ class TestTheiaFrontend(TheiaTestCase): ...@@ -356,6 +358,60 @@ class TestTheiaFrontend(TheiaTestCase):
self.assertEqual(requests.codes.unauthorized, resp.status_code) self.assertEqual(requests.codes.unauthorized, resp.status_code)
class TestTheiaForwardFrontendRequestsEnabled(TheiaTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {"autorun": "user-controlled"} # we interact with slapos in this test
def _getRequestedInstanceList(self, query):
with sqlite3.connect(os.path.join(
self.computer_partition_root_path,
'srv/runner/var/proxy.db',
)) as db:
return [row[0] for row in db.execute(query).fetchall()]
def getRequestedInstanceList(self):
return self._getRequestedInstanceList(
f"SELECT partition_reference FROM partition{DB_VERSION} where slap_state='busy'"
)
def getForwardedInstanceList(self):
return self._getRequestedInstanceList(
f"SELECT partition_reference FROM forwarded_partition_request{DB_VERSION}"
)
def requestEmbeddedFrontendInstance(self, state='available'):
self.checkSlapos(
'request',
'--state',
state,
'frontend',
'http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg',
)
def test(self):
self.requestEmbeddedFrontendInstance()
# partition requested directly by user are forwarded with user_ prefix
self.assertEqual(self.getForwardedInstanceList(), ['user_frontend'])
self.assertEqual(self.getRequestedInstanceList(), [])
self.requestEmbeddedFrontendInstance(state='destroyed')
self.requestInstance({'forward-slapos-frontend-requests': 'disabled'})
self.waitForInstance()
self.requestEmbeddedFrontendInstance()
self.assertEqual(self.getForwardedInstanceList(), [])
self.assertEqual(self.getRequestedInstanceList(), ['frontend'])
self.requestEmbeddedFrontendInstance(state='destroyed')
self.checkSlapos('node', 'report')
self.requestInstance({'forward-slapos-frontend-requests': 'enabled'})
self.waitForInstance()
self.requestEmbeddedFrontendInstance()
self.assertEqual(self.getForwardedInstanceList(), ['user_frontend'])
self.assertEqual(self.getRequestedInstanceList(), [])
class TestTheiaEnv(TheiaTestCase): class TestTheiaEnv(TheiaTestCase):
dummy_software_path = os.path.abspath('dummy/software.cfg') dummy_software_path = os.path.abspath('dummy/software.cfg')
......
...@@ -195,11 +195,11 @@ setuptools-dso = 1.7 ...@@ -195,11 +195,11 @@ setuptools-dso = 1.7
rubygemsrecipe = 0.4.3 rubygemsrecipe = 0.4.3
six = 1.16.0 six = 1.16.0
slapos.cookbook = 1.0.291 slapos.cookbook = 1.0.291
slapos.core = 1.8.3 slapos.core = 1.8.4
slapos.extension.shared = 1.0 slapos.extension.shared = 1.0
slapos.libnetworkcache = 0.25 slapos.libnetworkcache = 0.25
slapos.rebootstrap = 4.5 slapos.rebootstrap = 4.5
slapos.recipe.build = 0.55 slapos.recipe.build = 0.56
slapos.recipe.cmmi = 0.19 slapos.recipe.cmmi = 0.19
slapos.recipe.template = 5.0 slapos.recipe.template = 5.0
slapos.toolbox = 0.128 slapos.toolbox = 0.128
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment