Skip to content

Commit

Permalink
fix race condition in app form
Browse files Browse the repository at this point in the history
  • Loading branch information
mms-gianni committed Nov 1, 2024
1 parent e8dfc2d commit b1c6cef
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions client/src/components/apps/form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1646,15 +1646,12 @@ export default defineComponent({
},
},
mounted() {
this.loadPipeline();
this.loadPipelineAndApp();
this.loadStorageClasses();
this.loadPodsizeList();
this.loadBuildpacks();
this.loadClusterIssuers();
this.getDomains();
if (this.app != 'new') {
this.loadApp(); // this may lead into a race condition with the buildpacks loaded in loadPipeline
}
if (this.$route.query.template && this.$route.query.catalogId) {
const catalogId = this.$route.query.catalogId as string;
Expand Down Expand Up @@ -1762,7 +1759,7 @@ export default defineComponent({
changeName(name: string) {
this.ingress.hosts[0].host = name+"."+this.pipelineData.domain;
},
loadPipeline() {
loadPipelineAndApp() {
axios.get('/api/pipelines/'+this.pipeline).then(response => {
this.pipelineData = response.data;
Expand Down Expand Up @@ -1803,6 +1800,11 @@ export default defineComponent({
this.buildpack.run.readOnlyAppStorage = true;
}
if (this.app != 'new') {
this.loadApp();
}
});
},
loadStorageClasses() {
Expand Down

0 comments on commit b1c6cef

Please sign in to comment.