Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick #5096 #5099 #5108 #5113 #5114 #5115 #5116 #5118 #5126 #5136

2 changes: 2 additions & 0 deletions .github/workflows/cherry_pick.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: make a cherry-pick PR
run: |
git config user.name "pipecd-bot"
Expand Down
140 changes: 69 additions & 71 deletions docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"homepage": "https://github.com/google/docsy-example#readme",
"devDependencies": {
"autoprefixer": "^9.8.6",
"autoprefixer": "^10.4.20",
"postcss": "^8.4.31",
"postcss-cli": "^8.3.1"
}
Expand Down
17 changes: 12 additions & 5 deletions pkg/app/piped/cmd/piped/piped.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
addLoginUserToPasswd bool
launcherVersion string
maxRecvMsgSize int
appManifestCacheCount int
}

func NewCommand() *cobra.Command {
Expand All @@ -107,10 +108,11 @@
panic(fmt.Sprintf("failed to detect the current user's home directory: %v", err))
}
p := &piped{
adminPort: 9085,
toolsDir: path.Join(home, ".piped", "tools"),
gracePeriod: 30 * time.Second,
maxRecvMsgSize: 1024 * 1024 * 10, // 10MB
adminPort: 9085,
toolsDir: path.Join(home, ".piped", "tools"),
gracePeriod: 30 * time.Second,
maxRecvMsgSize: 1024 * 1024 * 10, // 10MB
appManifestCacheCount: 150,

Check warning on line 115 in pkg/app/piped/cmd/piped/piped.go

View check run for this annotation

Codecov / codecov/patch

pkg/app/piped/cmd/piped/piped.go#L111-L115

Added lines #L111 - L115 were not covered by tests
}
cmd := &cobra.Command{
Use: "piped",
Expand All @@ -131,6 +133,7 @@
cmd.Flags().BoolVar(&p.enableDefaultKubernetesCloudProvider, "enable-default-kubernetes-cloud-provider", p.enableDefaultKubernetesCloudProvider, "Whether the default kubernetes provider is enabled or not. This feature is deprecated.")
cmd.Flags().BoolVar(&p.addLoginUserToPasswd, "add-login-user-to-passwd", p.addLoginUserToPasswd, "Whether to add login user to $HOME/passwd. This is typically for applications running as a random user ID.")
cmd.Flags().DurationVar(&p.gracePeriod, "grace-period", p.gracePeriod, "How long to wait for graceful shutdown.")
cmd.Flags().IntVar(&p.appManifestCacheCount, "app-manifest-cache-count", p.appManifestCacheCount, "The number of app manifests to cache. The cache-key contains the commit hash. The default is 150.")

Check warning on line 136 in pkg/app/piped/cmd/piped/piped.go

View check run for this annotation

Codecov / codecov/patch

pkg/app/piped/cmd/piped/piped.go#L136

Added line #L136 was not covered by tests

cmd.Flags().StringVar(&p.launcherVersion, "launcher-version", p.launcherVersion, "The version of launcher which initialized this Piped.")

Expand Down Expand Up @@ -344,7 +347,11 @@
analysisResultStore := analysisresultstore.NewStore(apiClient, input.Logger)

// Create memory caches.
appManifestsCache := memorycache.NewTTLCache(ctx, time.Hour, time.Minute)
appManifestsCache, err := memorycache.NewLRUCache(p.appManifestCacheCount)
if err != nil {
input.Logger.Error("failed to create app manifests cache", zap.Error(err))
return err
}

Check warning on line 354 in pkg/app/piped/cmd/piped/piped.go

View check run for this annotation

Codecov / codecov/patch

pkg/app/piped/cmd/piped/piped.go#L350-L354

Added lines #L350 - L354 were not covered by tests

var liveStateGetter livestatestore.Getter
// Start running application live state store.
Expand Down
2 changes: 1 addition & 1 deletion tool/actions-gh-release/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22.4-alpine3.20
FROM golang:1.22.5-alpine3.20

RUN apk update && apk add git

Expand Down
6 changes: 3 additions & 3 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@
"@types/yup": "^0.29.14",
"clsx": "^1.2.1",
"dagre": "^0.8.5",
"dayjs": "^1.8.28",
"dayjs": "^1.11.12",
"dotenv": "^8.6.0",
"echarts": "^5.5.1",
"formik": "^2.2.9",
"google-protobuf": "^3.15.6",
"google-protobuf": "^3.21.4",
"grpc-web": "^1.5.0",
"history": "^4.10.1",
"path-browserify": "^1.0.1",
Expand All @@ -84,7 +84,7 @@
"react-dom": "^17.0.2",
"react-draggable": "^4.4.6",
"react-intersection-observer": "^8.26.2",
"react-markdown": "^6.0.2",
"react-markdown": "^6.0.3",
"react-redux": "^7.2.9",
"react-router-dom": "^5.3.4",
"react-syntax-highlighter": "^15.5.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,14 @@ export const DeleteApplicationDialog: FC<DeleteApplicationDialogProps> = memo(
}, [dispatch]);

return (
<Dialog open={Boolean(application)} disableBackdropClick={isDeleting}>
<Dialog
open={Boolean(application)}
onClose={(_event, reason) => {
if (reason !== "backdropClick" || !isDeleting) {
handleCancel();
}
}}
>
<DialogTitle>{TITLE}</DialogTitle>
<DialogContent>
<Alert severity="error" className={classes.description}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export const ApplicationList: FC<ApplicationListProps> = memo(
onPageChange={(_, newPage) => {
onPageChange(newPage + 1);
}}
onChangeRowsPerPage={(e) => {
onRowsPerPageChange={(e) => {
setRowsPerPage(parseInt(e.target.value, 10));
onPageChange(1);
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,13 @@ export const SealedSecretDialog: FC<SealedSecretDialogProps> = memo(
}

return (
<Dialog open={open} onEnter={handleOnEnter} onClose={handleClose}>
<Dialog
open={open}
TransitionProps={{
onEnter: handleOnEnter,
}}
onClose={handleClose}
>
{sealedSecret ? (
<>
<DialogTitle>{DIALOG_TITLE}</DialogTitle>
Expand Down
4 changes: 2 additions & 2 deletions web/src/theme.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createMuiTheme } from "@material-ui/core/styles";
import { createTheme } from "@material-ui/core/styles";
import cyan from "@material-ui/core/colors/cyan";

declare module "@material-ui/core/styles/createTypography" {
Expand All @@ -11,7 +11,7 @@ declare module "@material-ui/core/styles/createTypography" {
}
}

export const theme = createMuiTheme({
export const theme = createTheme({
props: {
MuiButtonBase: {
disableRipple: true,
Expand Down
Loading
Loading