Skip to content

Commit c117aab

Browse files
authored
Merge pull request #473 from kubero-dev/fix/race-condition-in-app-form
fix race condition in app form
2 parents e8dfc2d + b1c6cef commit c117aab

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

client/src/components/apps/form.vue

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1646,15 +1646,12 @@ export default defineComponent({
16461646
},
16471647
},
16481648
mounted() {
1649-
this.loadPipeline();
1649+
this.loadPipelineAndApp();
16501650
this.loadStorageClasses();
16511651
this.loadPodsizeList();
16521652
this.loadBuildpacks();
16531653
this.loadClusterIssuers();
16541654
this.getDomains();
1655-
if (this.app != 'new') {
1656-
this.loadApp(); // this may lead into a race condition with the buildpacks loaded in loadPipeline
1657-
}
16581655
16591656
if (this.$route.query.template && this.$route.query.catalogId) {
16601657
const catalogId = this.$route.query.catalogId as string;
@@ -1762,7 +1759,7 @@ export default defineComponent({
17621759
changeName(name: string) {
17631760
this.ingress.hosts[0].host = name+"."+this.pipelineData.domain;
17641761
},
1765-
loadPipeline() {
1762+
loadPipelineAndApp() {
17661763
axios.get('/api/pipelines/'+this.pipeline).then(response => {
17671764
this.pipelineData = response.data;
17681765
@@ -1803,6 +1800,11 @@ export default defineComponent({
18031800
this.buildpack.run.readOnlyAppStorage = true;
18041801
}
18051802
1803+
if (this.app != 'new') {
1804+
this.loadApp();
1805+
}
1806+
1807+
18061808
});
18071809
},
18081810
loadStorageClasses() {

0 commit comments

Comments
 (0)