Skip to content
This repository was archived by the owner on Mar 9, 2025. It is now read-only.

Fixing broken manifest links #881

Merged
merged 2 commits into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkg/dashboard/server/gitContents.go
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ func saveEnvConfig(w http.ResponseWriter, r *http.Request) {
return
}

gitRepoCache.Invalidate(repoPath)
w.WriteHeader(http.StatusOK)
w.Write(responseJson)
return
Expand Down
3 changes: 3 additions & 0 deletions pkg/dx/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ func (d *Dependency) UnmarshalJSON(data []byte) error {
}

d.Name = dat["name"].(string)
if _, ok := dat["kind"]; !ok {
return fmt.Errorf("kind is mandatory for dependency")
}
d.Kind = dat["kind"].(string)

switch d.Kind {
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/env/env.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function Env(props) {
const { env, repoRolloutHistory, envConfigs, navigateToConfigEdit, linkToDeployment, rollback, owner, repoName, fileInfos } = props;
const { releaseHistorySinceDays, deploymentFromParams, settings, alerts, appFilter } = props;

const renderedServices = renderServices(env.stacks, envConfigs, env, repoRolloutHistory, navigateToConfigEdit, linkToDeployment, rollback, owner, repoName, fileInfos, releaseHistorySinceDays, gimletClient, store, deploymentFromParams, settings.scmUrl, alerts, appFilter);
const renderedServices = renderServices(env.stacks, envConfigs, env, repoRolloutHistory, navigateToConfigEdit, linkToDeployment, rollback, owner, repoName, fileInfos, releaseHistorySinceDays, gimletClient, store, deploymentFromParams, settings, alerts, appFilter);
const navigate = useNavigate()

return (
Expand Down
15 changes: 13 additions & 2 deletions web/src/views/deployWizzard/deployWizzard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ import SimpleServiceDetail from '../../components/serviceDetail/simpleServiceDet
import DeployHandler from '../../deployHandler';
import Confetti from 'react-confetti'
import { Loading } from '../repo/deployStatus';
import { ACTION_TYPE_CLEAR_DEPLOY } from "../../redux/redux";
import {
ACTION_TYPE_CLEAR_DEPLOY,
ACTION_TYPE_REPO_METAS,
} from "../../redux/redux";
import { v4 as uuidv4 } from 'uuid';
import SealedSecretWidget from "../envConfig/sealedSecretWidget";
import { useParams, useNavigate } from 'react-router-dom'
Expand Down Expand Up @@ -253,7 +256,15 @@ export function DeployWizzard(props) {
bodyClassName: "p-2",
autoClose: false
});

gimletClient.getRepoMetas(owner, repo)
.then(data => {
store.dispatch({
type: ACTION_TYPE_REPO_METAS, payload: {
repoMetas: data,
}
});
}, () => {/* Generic error handler deals with it */
});
setSavingConfigInProgress(false)
navigate(`/repo/${repoName}`);
window.scrollTo({ top: 0, left: 0 });
Expand Down
6 changes: 1 addition & 5 deletions web/src/views/repo/repo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,6 @@ export default function Repo(props) {
navigate(`/repo/${owner}/${repo}/${env}/${deployment}?${location.search}`)
}

const fileMetasByEnv = (envName) => {
return fileInfos.filter(fileInfo => fileInfo.envName === envName)
}

const stacksForRepo = envsForRepo(envs, connectedAgents, repoName);

let repoRolloutHistory = undefined;
Expand Down Expand Up @@ -177,7 +173,7 @@ export default function Repo(props) {
}}
owner={owner}
repoName={repo}
fileInfos={fileMetasByEnv(envName)}
fileInfos={fileInfos.filter(fileInfo => fileInfo.envName === envName)}
releaseHistorySinceDays={settings.releaseHistorySinceDays}
gimletClient={gimletClient}
store={store}
Expand Down
Loading