Skip to content

Commit dba2e66

Browse files
authored
Merge pull request #29874 from loganharbour/29873_language_server
Update language server extension in `moose-dev`
2 parents 220ffa7 + dc56fd9 commit dba2e66

File tree

7 files changed

+36
-14
lines changed

7 files changed

+36
-14
lines changed

apptainer/files/moose-dev/opt/code-server/bin/code-server-start

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,23 @@
1111
# - CODE_SERVER_DATAROOT: The data root to use for code server and the extensions.
1212
# If not set, the default by code-server will be used.
1313
# - CODE_SERVER_SKIP_EXTENSIONS: Set to anything to skip the install of extensions
14+
# - UNSET_APPTAINER_VARS: Set to anything to unset APPTAINER/SINGULARITY vars
1415

1516
set -e
1617

1718
# The port to run on, auto set to 8080
18-
CODE_SERVER_PORT=${CODE_SERVER_PORT:-8080}
19+
PORT=${CODE_SERVER_PORT:-8080}
20+
unset CODE_SERVER_PORT
1921

2022
# The password to connect with, if one is not provided (randomly generated)
23+
PASSWORD=
2124
if [ -z "$CODE_SERVER_PASSWORD" ]; then
22-
export PASSWORD=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 24)
25+
PASSWORD="$(tr -dc A-Za-z0-9 </dev/urandom | head -c 24)"
2326
# Password was provided, so don't show it
2427
else
25-
export PASSWORD="${CODE_SERVER_PASSWORD}"
28+
PASSWORD="${CODE_SERVER_PASSWORD}"
2629
fi
30+
export PASSWORD
2731

2832
# Create the dataroot if it doesn't exist + the extensions
2933
if [ -n "$CODE_SERVER_DATAROOT" ]; then
@@ -40,23 +44,32 @@ fi
4044
# Install the extensions, unless requested not to
4145
if [ -z "$CODE_SERVER_SKIP_EXTENSIONS" ]; then
4246
/opt/code-server/bin/code-server-setup-extensions "${CODE_SERVER_ARGS[@]}"
47+
else
48+
unset CODE_SERVER_SKIP_EXTENSIONS
4349
fi
4450

4551
# Pass the dataroot if its set
4652
if [ -n "$CODE_SERVER_DATAROOT" ]; then
4753
CODE_SERVER_ARGS+=("--user-data-dir=${CODE_SERVER_DATAROOT}")
4854
fi
55+
unset CODE_SERVER_DATAROOT
4956

5057
# Expose the password to the user if we set it
5158
if [ -z "$CODE_SERVER_PASSWORD" ]; then
5259
GREEN='\033[0;32m'
5360
NC='\033[0m'
54-
printf "${GREEN}Connect to the instance at http://localhost:${CODE_SERVER_PORT} with password ${PASSWORD}${NC}\n"
61+
printf "${GREEN}Connect to the instance at http://localhost:${PORT} with password ${PASSWORD}${NC}\n"
62+
else
63+
unset CODE_SERVER_PASSWORD
64+
fi
65+
66+
if [ -n "$UNSET_APPTAINER_VARS" ]; then
67+
unset "${!APPTAINER@}" "${!SINGULARITY@}" UNSET_APPTAINER_VARS
5568
fi
5669

5770
# Run the server
5871
code-server --auth=password \
59-
--bind-addr=0.0.0.0:"${CODE_SERVER_PORT}" \
72+
--bind-addr=0.0.0.0:"${PORT}" \
6073
--disable-telemetry \
6174
--disable-getting-started-override \
6275
--disable-update-check \

apptainer/moose-dev.def

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Fingerprints: 0CFFCAB55E806363601C442D211817B01E0911DB
8282
# Pinned versions
8383
MINIFORGE_VERSION=23.3.1-1
8484
PYTHON_VERSION=3.11
85-
CODE_SERVER_VERSION=4.92.2
85+
CODE_SERVER_VERSION=4.96.4
8686

8787
# Install code-server
8888
CODE_SERVER_FILE=code-server-${CODE_SERVER_VERSION}-amd64.rpm
@@ -96,9 +96,9 @@ Fingerprints: 0CFFCAB55E806363601C442D211817B01E0911DB
9696
# by the "setup-code-server-extensions" script (in PATH)
9797
mkdir /opt/code-server/extensions
9898
# Download extensions for code-server, currently just moose language support
99-
MOOSE_LANGUAGE_SUPPORT_VERSION=1.1.2
99+
MOOSE_LANGUAGE_SUPPORT_VERSION=1.3.2
100100
cd /opt/code-server/extensions
101-
curl -L -O https://github.com/idaholab/moose-language-support/releases/download/v${MOOSE_LANGUAGE_SUPPORT_VERSION}/DanielSchwen.moose-language-support-${MOOSE_LANGUAGE_SUPPORT_VERSION}.vsix
101+
curl -L -O https://github.com/idaholab/moose-language-support/releases/download/v${MOOSE_LANGUAGE_SUPPORT_VERSION}/moose-language-support-${MOOSE_LANGUAGE_SUPPORT_VERSION}.vsix
102102

103103
# Setup permissions for the code server extras
104104
find /opt/code-server -type d -exec chmod 755 {} +

conda/moose-dev/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# REMEMBER TO UPDATE the .yaml files for the following packages:
33
# moose/conda_build_config.yaml
44
# As well as any directions pertaining to modifying those files.
5-
{% set version = "2024.12.23" %}
5+
{% set version = "2024.02.12" %}
66

77
package:
88
name: moose-dev

conda/moose/conda_build_config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ mpi:
33
- openmpi
44

55
moose_dev:
6-
- moose-dev 2024.12.23
6+
- moose-dev 2024.02.12
77

88
#### Darwin SDK SYSROOT
99
CONDA_BUILD_SYSROOT: # [osx]

scripts/tests/test_versioner.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ def testOldHashes(self):
3232
for hash, packages in OLD_HASHES.items():
3333
meta = versioner.version_meta(hash)
3434
for package, package_hash in packages.items():
35-
self.assertEqual(str(package_hash), str(meta[package]['hash']))
35+
actual_package_hash = str(meta[package]['hash'])
36+
message = f'Commit {hash}, package {package}: expected = {package_hash}, actual = {actual_package_hash}'
37+
self.assertEqual(str(package_hash), actual_package_hash, message)
3638

3739
def testBadCommit(self):
3840
with self.assertRaises(Exception) as e:

scripts/tests/versioner_hashes.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,3 +397,10 @@ cece3f711bd9c235af31c9d5a4c54e292400ecc1: #29074
397397
libmesh: b8b3d69
398398
wasp: 2fbcef5
399399
moose-dev: 5e9be02
400+
d5e5defe99e1214278c8353e136b2ec38ffeab67: #29874
401+
tools: 5abb5f2
402+
mpi: 82bbd28
403+
petsc: e78a9a4
404+
libmesh: b8b3d69
405+
wasp: 2fbcef5
406+
moose-dev: '0443606'

scripts/versioner.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,14 @@ def verify_recipes(self, args) ->str:
173173
def output_summary(self, args):
174174
""" generate summary report that can be used to generate versioner_hash blocks """
175175
head = self.version_meta(args.commit, full_hash=True)["app"]["hash"]
176-
formatted_output = f'{head}: #PR\n'
176+
output = {head: {}}
177177
for library in TRACKING_LIBRARIES:
178178
if library == 'app':
179179
continue
180180
meta = self.version_meta(args.commit).get(library, {})
181181
meta_hash = meta['hash']
182-
formatted_output+=f' {library}: {meta_hash}\n'
183-
return formatted_output
182+
output[head][library] = str(meta_hash)
183+
return yaml.dump(output, sort_keys=False)
184184

185185
def output_cli(self, args):
186186
""" performs command line actions """

0 commit comments

Comments
 (0)