tanishqgandhi1908 commented on code in PR #8546:
URL: https://github.com/apache/texera/pull/8546#discussion_r4031649915
##########
frontend/src/app/common/component/computing-unit-create-modal/computing-unit-create-modal.component.ts:
##########
@@ -171,15 +182,36 @@ export class ComputingUnitCreateModalComponent implements
OnInit, OnChanges {
ngOnChanges(changes: SimpleChanges): void {
if (changes["visible"]?.currentValue === true) {
this.resetAdvancedSettings();
+ this.loadCuratedImages();
}
}
+ /**
+ * Read when the dialog opens rather than in ngOnInit: both hosts render
this component
+ * unconditionally, so ngOnInit runs once at page load. An image that became
ready since
+ * then would never appear, and one failed read would hide the field for the
session.
+ *
+ * Readable by any signed-in user. A deployment with curated images off
answers 503, and
+ * a user who never sees the dropdown gets exactly today's behaviour.
+ */
+ private loadCuratedImages(): void {
+ this.cuImageService
+ .list()
+ .pipe(untilDestroyed(this))
+ .subscribe({
+ next: images => (this.curatedImages = images.filter(isStartable)),
+ error: () => (this.curatedImages = []),
Review Comment:
Fixed
Only 503 is silent now. The field still empties either way, so the unit
falls back to the deployment's image, but anything else is reported. Two tests:
a 500 is surfaced, a 503 is not.
--
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]