Skip to content

Commit 4b8513a

Browse files
authored
Merge branch 'main' into fix/podutils-inverted-condition-and-rpc-kfp-loop
2 parents 0b5ff95 + 10e1e88 commit 4b8513a

5 files changed

Lines changed: 13 additions & 21 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,3 +282,4 @@ jobs:
282282
title: "Bump dev version to ${{ steps.next.outputs.next }}"
283283
body: "Automated version bump after releasing v${{ needs.prepare.outputs.version }}."
284284
committer: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
285+
signoff: true

kale/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
__version__ = "2.0.0a4"
15+
__version__ = "2.0.0a5"
1616

1717
from typing import Any, NamedTuple
1818

labextension/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jupyterlab-kubeflow-kale",
3-
"version": "2.0.0-alpha.4",
3+
"version": "2.0.0-alpha.5",
44
"description": "Convert Notebooks to Kubeflow pipelines with Kale",
55
"keywords": [
66
"jupyter",

labextension/src/lib/NotebookUtils.tsx

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -259,13 +259,8 @@ export default class NotebookUtilities {
259259
);
260260
}
261261

262-
if (notebookPanel.model?.metadata) {
263-
const metadata = notebookPanel.model.metadata as any;
264-
if (typeof metadata.has === 'function' && metadata.has(key)) {
265-
return metadata.get(key);
266-
}
267-
// Fallback for different metadata implementations
268-
return metadata[key] || null;
262+
if (notebookPanel.model) {
263+
return notebookPanel.model.getMetadata(key) || null;
269264
}
270265
return null;
271266
}
@@ -292,20 +287,12 @@ export default class NotebookUtilities {
292287
);
293288
}
294289

295-
if (!notebookPanel.model?.metadata) {
296-
throw new Error('Notebook metadata is not available.');
290+
if (!notebookPanel.model) {
291+
throw new Error('Notebook model is not available.');
297292
}
298293

299-
const metadata = notebookPanel.model.metadata as any;
300-
let oldVal: any;
301-
302-
if (typeof metadata.set === 'function') {
303-
oldVal = metadata.set(key, value);
304-
} else {
305-
// Fallback for different metadata implementations
306-
oldVal = (metadata as any)[key];
307-
(metadata as any)[key] = value;
308-
}
294+
const oldVal = notebookPanel.model.getMetadata(key);
295+
notebookPanel.model.setMetadata(key, value);
309296

310297
if (save) {
311298
this.saveNotebook(notebookPanel);

labextension/src/widgets/LeftPanel.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,10 @@ export class KubeflowKaleLeftPanel extends React.Component<IProps, IState> {
478478
};
479479

480480
onPanelRemove = (index: number) => {
481+
const deploy = this.state.deploys[index];
482+
if (deploy === undefined || deploy === null) {
483+
return;
484+
}
481485
const deploys = { ...this.state.deploys };
482486
deploys[index].deleted = true;
483487
this.setState({ deploys });

0 commit comments

Comments
 (0)