tbonelee commented on code in PR #5128:
URL: https://github.com/apache/zeppelin/pull/5128#discussion_r2601735220
##########
.github/workflows/frontend.yml:
##########
@@ -93,15 +95,33 @@ jobs:
key: ${{ runner.os }}-zeppelin-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-zeppelin-
+ - name: Setup conda environment with python ${{ matrix.python }}
+ uses: conda-incubator/setup-miniconda@v3
+ with:
+ activate-environment: python_only
+ python-version: ${{ matrix.python }}
+ auto-activate-base: false
+ use-mamba: true
+ channels: conda-forge,defaults
+ channel-priority: strict
- name: Install application
- run: ./mvnw clean install -DskipTests -am -pl zeppelin-web-angular
${MAVEN_ARGS}
+ run: ./mvnw clean install -DskipTests -am -pl
python,rlang,zeppelin-jupyter-interpreter,zeppelin-web-angular ${MAVEN_ARGS}
- name: Setup Zeppelin Server (Shiro.ini)
run: |
export ZEPPELIN_CONF_DIR=./conf
if [ "${{ matrix.mode }}" != "anonymous" ]; then
cp conf/shiro.ini.template conf/shiro.ini
sed -i 's/user1 = password2, role1, role2/user1 = password2,
role1, role2, admin/' conf/shiro.ini
fi
+ - name: Setup Zeppelin Configuration (Disable Git)
+ run: |
+ echo "Setting ZEPPELIN_NOTEBOOK_STORAGE environment variable"
+ echo
"ZEPPELIN_NOTEBOOK_STORAGE=org.apache.zeppelin.notebook.repo.VFSNotebookRepo"
>> $GITHUB_ENV
Review Comment:
Why set `ZEPPELIN_NOTEBOOK_STORAGE` in a separate step instead of in the
job's `env` section?
```yaml
run-playwright-e2e-tests:
env:
ZEPPELIN_NOTEBOOK_STORAGE:
org.apache.zeppelin.notebook.repo.VFSNotebookRepo
```
Is there a specific reason for the current approach?
##########
zeppelin-web-angular/e2e/cleanup-util.ts:
##########
@@ -0,0 +1,83 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { BASE_URL, E2E_TEST_FOLDER } from './utils';
+
+export const cleanupTestNotebooks = async () => {
+ try {
+ console.log('Cleaning up test folder via API...');
+
+ // Get all notebooks and folders
+ const response = await fetch(`${BASE_URL}/api/notebook`);
+ const data = await response.json();
+ if (!data.body || !Array.isArray(data.body)) {
+ console.log('No notebooks found or invalid response format');
+ return;
+ }
+
+ // Find the test folder
+ const testFolders = data.body.filter(
+ (item: { path: string }) =>
+ item.path && item.path.split(E2E_TEST_FOLDER)[0] === '/' &&
!item.path.includes(`~Trash`)
Review Comment:
This might be subjective, but `item.path.split('/')[1] === E2E_TEST_FOLDER`
felt a bit easier for me to understand at a glance.
Using split('/') makes it clearer that we’re checking the first segment of
the path.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]