Skip to content
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
10 changes: 10 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ jobs:
- name: Build go modules
run: make build/go

plugin:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Build plugin
run: make build/plugin

web:
runs-on: ubuntu-24.04
steps:
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,18 @@ jobs:
# It is used to set as required check for the branch protection rules
go-lint-completed:
runs-on: ubuntu-24.04
if: always()
needs: go
steps:
- run: |
echo completed
- name: Check if all go lint jobs succeeded
# if jobs in the 'go' job matrix failed or were cancelled, this job will fail
# otherwise this job is marked as successful because all steps are skipped
run: exit 1
if: >-
${{
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
}}

web:
runs-on: ubuntu-24.04
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/plugin_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
with:
go-version: ${{ env.GO_VERSION }}
cache: true
cache-dependency-path: ${{ inputs.path }}/go.sum
- name: Determine Plugin Info
run: echo "PLUGIN_NAME=$(basename ${{ inputs.path }})" >> $GITHUB_ENV
- name: Build binary artifacts
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,18 @@ jobs:
# It is used to set as required check for the branch protection rules
go-test-completed:
runs-on: ubuntu-24.04
if: always()
needs: go
steps:
- run: |
echo completed
- name: Check if all go test jobs succeeded
# if jobs in the 'go' job matrix failed or were cancelled, this job will fail
# otherwise this job is marked as successful because all steps are skipped
run: exit 1
if: >-
${{
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
}}

web:
runs-on: ubuntu-24.04
Expand Down
2 changes: 1 addition & 1 deletion RELEASE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated by `make release` command.
# DO NOT EDIT.
tag: v0.54.1
tag: v0.54.2

releaseNoteGenerator:
showCommitter: false
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/pipedv1/livestatereporter/livestatereporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func (r *reporter) flush(ctx context.Context, app *model.Application, repo git.R
ApplicationId: app.GetId(),
ApplicationName: app.GetName(),
DeploySource: ds.ToPluginDeploySource(),
DeployTargets: app.GetDeployTargets(),
DeployTargets: app.GetDeployTargetsByPluginName(pluginClient.Name()),
})
if err != nil {
st, ok := status.FromError(err)
Expand Down
4 changes: 4 additions & 0 deletions pkg/app/pipedv1/livestatereporter/livestatereporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func (f *fakeAPIClient) ReportApplicationSyncState(ctx context.Context, req *pip
// TODO: make lib for fakePlugin to use in other tests
type fakePlugin struct {
pluginapi.PluginClient
name string
syncStrategy *deployment.DetermineStrategyResponse
quickStages []*model.PipelineStage
pipelineStages []*model.PipelineStage
Expand Down Expand Up @@ -122,6 +123,9 @@ func (p *fakePlugin) GetLivestate(ctx context.Context, in *livestate.GetLivestat
SyncState: &model.ApplicationSyncState{},
}, nil
}
func (p *fakePlugin) Name() string {
return p.name
}

type fakeAPILister struct {
applicationLister
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/pipedv1/planpreview/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ func (b *builder) buildApp(ctx context.Context, worker int, command string, app
ApplicationId: app.Id,
ApplicationName: app.Name,
PipedId: b.pipedCfg.PipedID,
DeployTargets: app.GetDeployTargets(),
DeployTargets: app.GetDeployTargetsByPluginName(plugin.Name()),
TargetDeploymentSource: pluginTargetDS,
RunningDeploymentSource: pluginRunningDS,
})
Expand Down
9 changes: 9 additions & 0 deletions pkg/model/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,15 @@ func (a *Application) GetDeployTargets() []string {
return deployTargets
}

func (a *Application) GetDeployTargetsByPluginName(name string) []string {
dts, ok := a.DeployTargetsByPlugin[name]
if !ok {
return []string{}
}

return dts.GetDeployTargets()
}

func (a *Application) GetLabelsString() string {
labels := make([]string, 0, len(a.Labels))
for k, v := range a.Labels {
Expand Down
2 changes: 1 addition & 1 deletion quickstart/control-plane-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ quickstart:
enabled: true

localStorageVolumes:
enabled: true
enabled: false

config:
data: |
Expand Down
2 changes: 1 addition & 1 deletion tool/actions-plan-preview/planpreview.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func makeCommentBody(event *githubEvent, r *PlanPreviewResult, title string) str
for _, ppr := range app.PluginPlanResults {
fmt.Fprintf(&b, " - %s(%s): %s\n", ppr.PluginName, ppr.DeployTarget, ppr.PlanSummary)
}
fmt.Fprint(&b, " Details:\n")
fmt.Fprint(&b, "\n Details:\n")
for _, ppr := range app.PluginPlanResults {
fmt.Fprintf(&b, " - %s(%s):\n", ppr.PluginName, ppr.DeployTarget)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Sync strategy: PIPELINE
Plugin(s): kubernetes
Summary:
- kubernetes(dt-1): 2 resources will be added, 1 resource will be deleted and 5 resources will be changed

Details:
- kubernetes(dt-1):
<details>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Sync strategy: PIPELINE
Summary:
- kubernetes(dt-1): 2 resources will be added, 1 resource will be deleted and 5 resources will be changed
- terraform(dt-2): 1 resource will be added, 2 resources will be deleted and 3 resources will be changed

Details:
- kubernetes(dt-1):
<details>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Sync strategy: QUICK_SYNC
Plugin(s): kubernetes
Summary:
- kubernetes(dt-1): 2 resources will be added, 1 resource will be deleted and 5 resources will be changed

Details:
- kubernetes(dt-1):
<details>
Expand Down
2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"@types/yup": "^0.29.14",
"clsx": "^1.2.1",
"dagre": "^0.8.5",
"dayjs": "^1.11.13",
"dayjs": "^1.11.15",
"dotenv": "^8.6.0",
"echarts": "^5.6.0",
"formik": "^2.2.9",
Expand Down
7 changes: 3 additions & 4 deletions web/src/components/settings-page/api-key/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,9 @@ export const APIKeyPage: FC = memo(function APIKeyPage() {
);
const [generatedKey, setGeneratedKey] = useState<string | null>(null);

const { data: keys = [], isLoading: loading } = useGetApiKeys(
{ enabled: true },
{ retry: false }
);
const { data: keys = [], isLoading: loading } = useGetApiKeys({
enabled: true,
});
const { addToast } = useToast();

const { mutateAsync: generateApiKey } = useGenerateApiKey();
Expand Down
4 changes: 2 additions & 2 deletions web/src/components/settings-page/piped/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const SettingsPipedPage: FC = memo(function SettingsPipedPage() {

const { data: allPipeds } = useGetPipeds(
{ withStatus: true },
{ refetchInterval: FETCH_INTERVAL }
{ refetchInterval: FETCH_INTERVAL, retry: false, staleTime: FETCH_INTERVAL }
);

const { data: releasedVersions = [] } = useGetReleasedVersions({
Expand All @@ -91,7 +91,7 @@ export const SettingsPipedPage: FC = memo(function SettingsPipedPage() {

const { data: breakingChangesNote } = useGetBreakingChanges(
{ projectId: projectDetail?.id ?? "" },
{ enabled: !!projectDetail?.id, retry: false }
{ enabled: !!projectDetail?.id }
);

const pipeds = useMemo(() => {
Expand Down
6 changes: 6 additions & 0 deletions web/src/queries/api-keys/use-get-api-keys.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ export const useGetApiKeys = (
const res = await APIKeysAPI.getAPIKeys({ options });
return res.keysList;
},
retry: false,
refetchOnMount: false,
refetchOnReconnect: false,
refetchOnWindowFocus: false,
staleTime: 120000, // 2 minutes
cacheTime: 300000, // 5 minutes
...queryOption,
});
};
6 changes: 6 additions & 0 deletions web/src/queries/pipeds/use-get-breaking-changes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ export const useGetBreakingChanges = (
});
return notes;
},
retry: false,
refetchOnMount: false,
refetchOnReconnect: false,
refetchOnWindowFocus: false,
staleTime: 120000, // 2 minutes
cacheTime: 300000, // 5 minutes
...queryOption,
});
};
5 changes: 5 additions & 0 deletions web/src/queries/pipeds/use-get-released-versions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ export const useGetReleasedVersions = (
const { versionsList } = await pipedsApi.listReleasedVersions();
return versionsList;
},
refetchOnMount: false,
refetchOnReconnect: false,
refetchOnWindowFocus: false,
staleTime: 120000, // 2 minutes
cacheTime: 300000, // 5 minutes
...queryOption,
});
};
6 changes: 6 additions & 0 deletions web/src/queries/project/use-get-project.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ export const useGetProject = (
userGroups: [],
rbacRoles: [],
},
retry: false,
refetchOnMount: false,
refetchOnReconnect: false,
refetchOnWindowFocus: false,
staleTime: 120000, // 2 minutes
cacheTime: 300000, // 5 minutes
...queryOption,
});
};
8 changes: 4 additions & 4 deletions web/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3220,10 +3220,10 @@ data-view-byte-offset@^1.0.1:
es-errors "^1.3.0"
is-data-view "^1.0.1"

dayjs@^1.11.13:
version "1.11.13"
resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.13.tgz#92430b0139055c3ebb60150aa13e860a4b5a366c"
integrity sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==
dayjs@^1.11.15:
version "1.11.18"
resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.18.tgz#835fa712aac52ab9dec8b1494098774ed7070a11"
integrity sha512-zFBQ7WFRvVRhKcWoUh+ZA1g2HVgUbsZm9sbddh8EC5iv93sui8DVVz1Npvz+r6meo9VKfa8NyLWBsQK1VvIKPA==

debug@2.6.9:
version "2.6.9"
Expand Down