Dataset Viewer
Auto-converted to Parquet
commit_message
stringlengths
3
2.32k
diff
stringlengths
186
49.5k
concern_count
int64
1
5
shas
stringlengths
44
220
types
stringlengths
7
45
do not run tests and build when no changes reported by lerna
["diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml\nindex ca46ca4..d69e581 100644\n--- a/.github/workflows/tests.yml\n+++ b/.github/workflows/tests.yml\n@@ -42,23 +42,25 @@ jobs:\n - name: Set CC Required env vars\n run: export GIT_BRANCH=$GITHUB_HEAD_REF && export GIT_COMMIT_SHA=$(git rev-parse origin/$GITHUB_HEAD_REF)\n \n- - name: Build\n- run: yarn build\n-\n - name: Lint\n run: yarn lint\n \n+ - name: Check for changes\n+ id: changed_packages\n+ run: |\n+ echo \"::set-output name=changed_packages::$(node ./node_modules/.bin/lerna changed -p | wc -l)\"\n+\n+ - name: Build\n+ if: steps.changed_packages.outputs.changed_packages != '0'\n+ run: yarn build\n+\n - name: Test\n+ if: steps.changed_packages.outputs.changed_packages != '0'\n run: |\n yarn run-rs-in-background\n yarn coverage > COVERAGE_RESULT\n echo \"$(cat COVERAGE_RESULT)\"\n \n- - name: Check for changes\n- id: changed_packages\n- run: |\n- echo \"::set-output name=changed_packages::$(node ./node_modules/.bin/lerna changed -p | wc -l)\"\n-\n - name: Release dev version for testing\n if: github.ref == 'refs/heads/master' && matrix.node-version == '15.x' && steps.changed_packages.outputs.changed_packages != '0'\n run: |\n@@ -70,11 +72,13 @@ jobs:\n NPM_TOKEN: ${{ secrets.NPM_TOKEN }}\n \n - name: Coveralls\n+ if: steps.changed_packages.outputs.changed_packages != '0'\n uses: coverallsapp/github-action@master\n with:\n github-token: ${{ secrets.GITHUB_TOKEN }}\n \n - name: Codeclimate\n+ if: steps.changed_packages.outputs.changed_packages != '0'\n uses: paambaati/[email protected]\n env:\n CC_TEST_REPORTER_ID: e2a39c5dc1a13674e97e94a467bacfaec953814982c7de89e9f0b55031e43bd8\n"]
1
["155611c99fe8692f1afc092599f5a7c727893315"]
["build"]
add classname and style props for Playground
["diff --git a/packages/docz-theme-default/src/components/ui/Render.tsx b/packages/docz-theme-default/src/components/ui/Render.tsx\nindex 197359b..943f9ab 100644\n--- a/packages/docz-theme-default/src/components/ui/Render.tsx\n+++ b/packages/docz-theme-default/src/components/ui/Render.tsx\n@@ -24,9 +24,16 @@ const Code = styled('div')`\n }\n `\n \n-export const Render: RenderComponent = ({ component, code }) => (\n+export const Render: RenderComponent = ({\n+ component,\n+ code,\n+ className,\n+ style,\n+}) => (\n <Fragment>\n- <Playground>{component}</Playground>\n+ <Playground className={className} style={style}>\n+ {component}\n+ </Playground>\n <Code>{code}</Code>\n </Fragment>\n )\ndiff --git a/packages/docz/src/components/DocPreview.tsx b/packages/docz/src/components/DocPreview.tsx\nindex ca2d88f..ee8f7c0 100644\n--- a/packages/docz/src/components/DocPreview.tsx\n+++ b/packages/docz/src/components/DocPreview.tsx\n@@ -16,6 +16,8 @@ const DefaultLoading: SFC = () => null\n export type RenderComponent = ComponentType<{\n component: JSX.Element\n code: any\n+ className?: string\n+ style?: any\n }>\n \n export const DefaultRender: RenderComponent = ({ component, code }) => (\ndiff --git a/packages/docz/src/components/Playground.tsx b/packages/docz/src/components/Playground.tsx\nindex d6ff5a3..418c82e 100644\n--- a/packages/docz/src/components/Playground.tsx\n+++ b/packages/docz/src/components/Playground.tsx\n@@ -9,15 +9,21 @@ export interface PlaygroundProps {\n __code: (components: ComponentsMap) => any\n children: any\n components: ComponentsMap\n+ className?: string\n+ style?: any\n }\n \n const BasePlayground: SFC<PlaygroundProps> = ({\n components,\n children,\n __code,\n+ className,\n+ style,\n }) => {\n return components && components.render ? (\n <components.render\n+ className={className}\n+ style={style}\n component={isFn(children) ? children() : children}\n code={__code(components)}\n />\n"]
1
["1b64ed30a2e3c41abf3976efee4c7463044b2ef1"]
["feat"]
process CommandDistribution ACKNOWLEDGED event Adds an EventApplier for the CommandDistribution ACKNOWLEDGED event. This applier will be responsible to remove a pending distribution from the state. This will be used to mark the distribution to a specific partition as completed.
["diff --git a/engine/src/main/java/io/camunda/zeebe/engine/state/appliers/CommandDistributionAcknowledgedApplier.java b/engine/src/main/java/io/camunda/zeebe/engine/state/appliers/CommandDistributionAcknowledgedApplier.java\nnew file mode 100644\nindex 0000000..4abf2e3\n--- /dev/null\n+++ b/engine/src/main/java/io/camunda/zeebe/engine/state/appliers/CommandDistributionAcknowledgedApplier.java\n@@ -0,0 +1,28 @@\n+/*\n+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH under\n+ * one or more contributor license agreements. See the NOTICE file distributed\n+ * with this work for additional information regarding copyright ownership.\n+ * Licensed under the Zeebe Community License 1.1. You may not use this file\n+ * except in compliance with the Zeebe Community License 1.1.\n+ */\n+package io.camunda.zeebe.engine.state.appliers;\n+\n+import io.camunda.zeebe.engine.state.TypedEventApplier;\n+import io.camunda.zeebe.engine.state.mutable.MutableDistributionState;\n+import io.camunda.zeebe.protocol.impl.record.value.distribution.CommandDistributionRecord;\n+import io.camunda.zeebe.protocol.record.intent.CommandDistributionIntent;\n+\n+public final class CommandDistributionAcknowledgedApplier\n+ implements TypedEventApplier<CommandDistributionIntent, CommandDistributionRecord> {\n+\n+ private final MutableDistributionState distributionState;\n+\n+ public CommandDistributionAcknowledgedApplier(final MutableDistributionState distributionState) {\n+ this.distributionState = distributionState;\n+ }\n+\n+ @Override\n+ public void applyState(final long key, final CommandDistributionRecord value) {\n+ distributionState.removePendingDistribution(key, value.getPartitionId());\n+ }\n+}\ndiff --git a/engine/src/main/java/io/camunda/zeebe/engine/state/appliers/EventAppliers.java b/engine/src/main/java/io/camunda/zeebe/engine/state/appliers/EventAppliers.java\nindex a72309b..4793315 100644\n--- a/engine/src/main/java/io/camunda/zeebe/engine/state/appliers/EventAppliers.java\n+++ b/engine/src/main/java/io/camunda/zeebe/engine/state/appliers/EventAppliers.java\n@@ -284,6 +284,9 @@ public final class EventAppliers implements EventApplier {\n CommandDistributionIntent.DISTRIBUTING,\n new CommandDistributionDistributingApplier(distributionState));\n register(\n+ CommandDistributionIntent.ACKNOWLEDGED,\n+ new CommandDistributionAcknowledgedApplier(distributionState));\n+ register(\n CommandDistributionIntent.FINISHED,\n new CommandDistributionFinishedApplier(distributionState));\n }\n"]
1
["6f4c06076abff94f8bb5c634beaba55483a78b72"]
["feat"]
add react ecosystem
["diff --git a/package.json b/package.json\nindex 1ba8c4f..d1de9a0 100644\n--- a/package.json\n+++ b/package.json\n@@ -36,14 +36,19 @@\n \"@types/node\": \"^9.3.0\",\n \"@types/react\": \"^16.0.34\",\n \"@types/react-dom\": \"^16.0.3\",\n+ \"@types/react-motion\": \"^0.0.25\",\n \"bootstrap-sass\": \"^3.3.7\",\n \"highcharts\": \"^6.0.4\",\n \"html2canvas\": \"^1.0.0-alpha.9\",\n+ \"immer\": \"^1.2.1\",\n \"lodash\": \"^4.17.4\",\n \"moment\": \"^2.20.1\",\n \"normalize.css\": \"^8.0.0\",\n- \"react\": \"^16.2.0\",\n- \"react-dom\": \"^16.2.0\",\n+ \"react\": \"^16.3.1\",\n+ \"react-dom\": \"^16.3.1\",\n+ \"react-motion\": \"^0.5.2\",\n+ \"react-redux\": \"^5.0.7\",\n+ \"redux\": \"^3.7.2\",\n \"rxjs\": \"^5.5.6\",\n \"vue\": \"^2.5.13\",\n \"vue-plugin-webextension-i18n\": \"^0.1.0\",\ndiff --git a/yarn.lock b/yarn.lock\nindex c8898d8..5d0fc9f 100644\n--- a/yarn.lock\n+++ b/yarn.lock\n@@ -187,6 +187,12 @@\n \"@types/node\" \"*\"\n \"@types/react\" \"*\"\n \n+\"@types/react-motion@^0.0.25\":\n+ version \"0.0.25\"\n+ resolved \"https://registry.npmjs.org/@types/react-motion/-/react-motion-0.0.25.tgz#2445745ee8e8e6149faa47a36ff6b0d4c21dbf94\"\n+ dependencies:\n+ \"@types/react\" \"*\"\n+\n \"@types/react@*\", \"@types/react@^16.0.34\":\n version \"16.0.40\"\n resolved \"https://registry.npmjs.org/@types/react/-/react-16.0.40.tgz#caabc2296886f40b67f6fc80f0f3464476461df9\"\n@@ -3837,6 +3843,10 @@ [email protected]:\n version \"4.2.1\"\n resolved \"https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz#9634502aa12c445dd5a7c5734b572bb8738aacbb\"\n \n+hoist-non-react-statics@^2.5.0:\n+ version \"2.5.0\"\n+ resolved \"https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.0.tgz#d2ca2dfc19c5a91c5a6615ce8e564ef0347e2a40\"\n+\n home-or-tmp@^2.0.0:\n version \"2.0.0\"\n resolved \"https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8\"\n@@ -4004,6 +4014,10 @@ ignore@^3.3.5:\n version \"3.3.7\"\n resolved \"https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021\"\n \n+immer@^1.2.1:\n+ version \"1.2.1\"\n+ resolved \"https://registry.npmjs.org/immer/-/immer-1.2.1.tgz#96e2ae29cdfc428f28120b832701931b92fa597c\"\n+\n import-local@^1.0.0:\n version \"1.0.0\"\n resolved \"https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc\"\n@@ -4104,7 +4118,7 @@ interpret@^1.0.0:\n version \"1.1.0\"\n resolved \"https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614\"\n \n-invariant@^2.2.2:\n+invariant@^2.0.0, invariant@^2.2.2:\n version \"2.2.4\"\n resolved \"https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6\"\n dependencies:\n@@ -5040,6 +5054,10 @@ locate-path@^2.0.0:\n p-locate \"^2.0.0\"\n path-exists \"^3.0.0\"\n \n+lodash-es@^4.17.5, lodash-es@^4.2.1:\n+ version \"4.17.8\"\n+ resolved \"https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.8.tgz#6fa8c8c5d337481df0bdf1c0d899d42473121e45\"\n+\n lodash._reinterpolate@~3.0.0:\n version \"3.0.0\"\n resolved \"https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d\"\n@@ -5149,7 +5167,7 @@ [email protected]:\n version \"4.17.2\"\n resolved \"https://registry.npmjs.org/lodash/-/lodash-4.17.2.tgz#34a3055babe04ce42467b607d700072c7ff6bf42\"\n \[email protected], lodash@^4.0.0, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.16.3, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0, lodash@~4.17.4:\[email protected], lodash@^4.0.0, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.16.3, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0, lodash@~4.17.4:\n version \"4.17.5\"\n resolved \"https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511\"\n \n@@ -6467,7 +6485,7 @@ promise@^7.1.1:\n dependencies:\n asap \"~2.0.3\"\n \n-prop-types@^15.6.0:\n+prop-types@^15.5.8, prop-types@^15.6.0:\n version \"15.6.1\"\n resolved \"https://registry.npmjs.org/prop-types/-/prop-types-15.6.1.tgz#36644453564255ddda391191fb3a125cbdf654ca\"\n dependencies:\n@@ -6574,7 +6592,7 @@ quick-lru@^1.0.0:\n version \"1.1.0\"\n resolved \"https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8\"\n \[email protected]:\[email protected], raf@^3.1.0:\n version \"3.4.0\"\n resolved \"https://registry.npmjs.org/raf/-/raf-3.4.0.tgz#a28876881b4bc2ca9117d4138163ddb80f781575\"\n dependencies:\n@@ -6645,9 +6663,9 @@ react-dev-utils@^5.0.0:\n strip-ansi \"3.0.1\"\n text-table \"0.2.0\"\n \n-react-dom@^16.2.0:\n- version \"16.2.0\"\n- resolved \"https://registry.npmjs.org/react-dom/-/react-dom-16.2.0.tgz#69003178601c0ca19b709b33a83369fe6124c044\"\n+react-dom@^16.3.1:\n+ version \"16.3.1\"\n+ resolved \"https://registry.npmjs.org/react-dom/-/react-dom-16.3.1.tgz#6a3c90a4fb62f915bdbcf6204422d93a7d4ca573\"\n dependencies:\n fbjs \"^0.8.16\"\n loose-envify \"^1.1.0\"\n@@ -6658,9 +6676,28 @@ react-error-overlay@^4.0.0:\n version \"4.0.0\"\n resolved \"https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-4.0.0.tgz#d198408a85b4070937a98667f500c832f86bd5d4\"\n \n-react@^16.2.0:\n- version \"16.2.0\"\n- resolved \"https://registry.npmjs.org/react/-/react-16.2.0.tgz#a31bd2dab89bff65d42134fa187f24d054c273ba\"\n+react-motion@^0.5.2:\n+ version \"0.5.2\"\n+ resolved \"https://registry.npmjs.org/react-motion/-/react-motion-0.5.2.tgz#0dd3a69e411316567927917c6626551ba0607316\"\n+ dependencies:\n+ performance-now \"^0.2.0\"\n+ prop-types \"^15.5.8\"\n+ raf \"^3.1.0\"\n+\n+react-redux@^5.0.7:\n+ version \"5.0.7\"\n+ resolved \"https://registry.npmjs.org/react-redux/-/react-redux-5.0.7.tgz#0dc1076d9afb4670f993ffaef44b8f8c1155a4c8\"\n+ dependencies:\n+ hoist-non-react-statics \"^2.5.0\"\n+ invariant \"^2.0.0\"\n+ lodash \"^4.17.5\"\n+ lodash-es \"^4.17.5\"\n+ loose-envify \"^1.1.0\"\n+ prop-types \"^15.6.0\"\n+\n+react@^16.3.1:\n+ version \"16.3.1\"\n+ resolved \"https://registry.npmjs.org/react/-/react-16.3.1.tgz#4a2da433d471251c69b6033ada30e2ed1202cfd8\"\n dependencies:\n fbjs \"^0.8.16\"\n loose-envify \"^1.1.0\"\n@@ -6788,6 +6825,15 @@ reduce-function-call@^1.0.1:\n dependencies:\n balanced-match \"^0.4.2\"\n \n+redux@^3.7.2:\n+ version \"3.7.2\"\n+ resolved \"https://registry.npmjs.org/redux/-/redux-3.7.2.tgz#06b73123215901d25d065be342eb026bc1c8537b\"\n+ dependencies:\n+ lodash \"^4.2.1\"\n+ lodash-es \"^4.2.1\"\n+ loose-envify \"^1.1.0\"\n+ symbol-observable \"^1.0.3\"\n+\n regenerate@^1.2.1:\n version \"1.3.3\"\n resolved \"https://registry.npmjs.org/regenerate/-/regenerate-1.3.3.tgz#0c336d3980553d755c39b586ae3b20aa49c82b7f\"\n@@ -7811,6 +7857,10 @@ [email protected]:\n version \"1.0.1\"\n resolved \"https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4\"\n \n+symbol-observable@^1.0.3:\n+ version \"1.2.0\"\n+ resolved \"https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804\"\n+\n symbol-tree@^3.2.2:\n version \"3.2.2\"\n resolved \"https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6\"\n"]
1
["7e04a5e829d7416e312ac342a00a11787745753b"]
["build"]
remove unnecessary lines from verify-wal test
["diff --git a/storage/wal/verifier_test.go b/storage/wal/verifier_test.go\nindex 61e1536..a44755f 100644\n--- a/storage/wal/verifier_test.go\n+++ b/storage/wal/verifier_test.go\n@@ -138,22 +138,13 @@ func writeCorruptEntries(file *os.File, t *testing.T, n int) {\n \t\t}\n \t}\n \n-\n \t// Write some random bytes to the file to simulate corruption.\n \tif _, err := file.Write(corruption); err != nil {\n \t\tfatal(t, \"corrupt WAL segment\", err)\n \t}\n-\tcorrupt := []byte{1, 255, 0, 3, 45, 26, 110}\n-\n-\twrote, err := file.Write(corrupt)\n-\tif err != nil {\n-\t\tt.Fatal(err)\n-\t} else if wrote != len(corrupt) {\n-\t\tt.Fatal(\"Error writing corrupt data to file\")\n-\t}\n \n \tif err := file.Close(); err != nil {\n-\t\tt.Fatalf(\"Error: filed to close file: %v\\n\", err)\n+\t\tt.Fatalf(\"Error: failed to close file: %v\\n\", err)\n \t}\n }\n \n"]
1
["fba4326c72fc22d81aba6976a9fef1e4b6154fd9"]
["refactor"]
removed files
["diff --git a/packages/tui/src/widgets/button.rs b/packages/tui/src/widgets/button.rs\nindex f3ebc79..845a60c 100644\n--- a/packages/tui/src/widgets/button.rs\n+++ b/packages/tui/src/widgets/button.rs\n@@ -32,7 +32,6 @@ pub(crate) fn Button<'a>(cx: Scope<'a, ButtonProps>) -> Element<'a> {\n callback.call(FormData {\n value: text.to_string(),\n values: HashMap::new(),\n- files: None,\n });\n }\n state.set(new_state);\ndiff --git a/packages/tui/src/widgets/checkbox.rs b/packages/tui/src/widgets/checkbox.rs\nindex 4831172..90c7212 100644\n--- a/packages/tui/src/widgets/checkbox.rs\n+++ b/packages/tui/src/widgets/checkbox.rs\n@@ -56,7 +56,6 @@ pub(crate) fn CheckBox<'a>(cx: Scope<'a, CheckBoxProps>) -> Element<'a> {\n \"on\".to_string()\n },\n values: HashMap::new(),\n- files: None,\n });\n }\n state.set(new_state);\ndiff --git a/packages/tui/src/widgets/number.rs b/packages/tui/src/widgets/number.rs\nindex 05cb2d6..93f9edd 100644\n--- a/packages/tui/src/widgets/number.rs\n+++ b/packages/tui/src/widgets/number.rs\n@@ -84,7 +84,6 @@ pub(crate) fn NumbericInput<'a>(cx: Scope<'a, NumbericInputProps>) -> Element<'a\n input_handler.call(FormData {\n value: text,\n values: HashMap::new(),\n- files: None,\n });\n }\n };\ndiff --git a/packages/tui/src/widgets/password.rs b/packages/tui/src/widgets/password.rs\nindex 7f8455d..d7e978f 100644\n--- a/packages/tui/src/widgets/password.rs\n+++ b/packages/tui/src/widgets/password.rs\n@@ -99,7 +99,6 @@ pub(crate) fn Password<'a>(cx: Scope<'a, PasswordProps>) -> Element<'a> {\n input_handler.call(FormData{\n value: text.clone(),\n values: HashMap::new(),\n- files: None\n });\n }\n \ndiff --git a/packages/tui/src/widgets/slider.rs b/packages/tui/src/widgets/slider.rs\nindex 43f0ac7..257c765 100644\n--- a/packages/tui/src/widgets/slider.rs\n+++ b/packages/tui/src/widgets/slider.rs\n@@ -58,7 +58,6 @@ pub(crate) fn Slider<'a>(cx: Scope<'a, SliderProps>) -> Element<'a> {\n oninput.call(FormData {\n value,\n values: HashMap::new(),\n- files: None,\n });\n }\n };\ndiff --git a/packages/tui/src/widgets/textbox.rs b/packages/tui/src/widgets/textbox.rs\nindex 8628fca..ce0ffcc 100644\n--- a/packages/tui/src/widgets/textbox.rs\n+++ b/packages/tui/src/widgets/textbox.rs\n@@ -95,7 +95,6 @@ pub(crate) fn TextBox<'a>(cx: Scope<'a, TextBoxProps>) -> Element<'a> {\n input_handler.call(FormData{\n value: text.clone(),\n values: HashMap::new(),\n- files: None\n });\n }\n \ndiff --git a/packages/web/src/dom.rs b/packages/web/src/dom.rs\nindex 7fa3d20..5037c4d 100644\n--- a/packages/web/src/dom.rs\n+++ b/packages/web/src/dom.rs\n@@ -331,11 +331,7 @@ fn read_input_to_data(target: Element) -> Rc<FormData> {\n }\n }\n \n- Rc::new(FormData {\n- value,\n- values,\n- files: None,\n- })\n+ Rc::new(FormData { value, values })\n }\n \n fn walk_event_for_id(event: &web_sys::Event) -> Option<(ElementId, web_sys::Element)> {\n"]
1
["a81bbb83d64867f08c4d1be10919ef6806a1bf51"]
["fix"]
correctly read new last flushed index
["diff --git a/restore/src/main/java/io/camunda/zeebe/restore/PartitionRestoreService.java b/restore/src/main/java/io/camunda/zeebe/restore/PartitionRestoreService.java\nindex 69b06b6..a4fcb77 100644\n--- a/restore/src/main/java/io/camunda/zeebe/restore/PartitionRestoreService.java\n+++ b/restore/src/main/java/io/camunda/zeebe/restore/PartitionRestoreService.java\n@@ -112,7 +112,7 @@ public class PartitionRestoreService {\n SegmentedJournal.builder()\n .withDirectory(dataDirectory.toFile())\n .withName(partition.name())\n- .withLastWrittenIndex(-1)\n+ .withLastFlushedIndex(-1)\n .build()) {\n \n resetJournal(checkpointPosition, journal);\n"]
1
["5ffc5794808647de14f945141692be26ad143006"]
["fix"]
use trait objects for from_str Use `Box<dyn error::Error>` to allow solutions to use `?` to propagate errors.
["diff --git a/exercises/conversions/from_str.rs b/exercises/conversions/from_str.rs\nindex 41fccd7..4beebac 100644\n--- a/exercises/conversions/from_str.rs\n+++ b/exercises/conversions/from_str.rs\n@@ -2,6 +2,7 @@\n // Additionally, upon implementing FromStr, you can use the `parse` method\n // on strings to generate an object of the implementor type.\n // You can read more about it at https://doc.rust-lang.org/std/str/trait.FromStr.html\n+use std::error;\n use std::str::FromStr;\n \n #[derive(Debug)]\n@@ -23,7 +24,7 @@ struct Person {\n // If everything goes well, then return a Result of a Person object\n \n impl FromStr for Person {\n- type Err = String;\n+ type Err = Box<dyn error::Error>;\n fn from_str(s: &str) -> Result<Person, Self::Err> {\n }\n }\ndiff --git a/info.toml b/info.toml\nindex 2068750..4a1d3aa 100644\n--- a/info.toml\n+++ b/info.toml\n@@ -884,5 +884,5 @@ path = \"exercises/conversions/from_str.rs\"\n mode = \"test\"\n hint = \"\"\"\n The implementation of FromStr should return an Ok with a Person object,\n-or an Err with a string if the string is not valid.\n+or an Err with an error if the string is not valid.\n This is almost like the `try_from_into` exercise.\"\"\"\n"]
1
["c3e7b831786c9172ed8bd5d150f3c432f242fba9"]
["fix"]
update version (nightly.0)
["diff --git a/Cargo.lock b/Cargo.lock\nindex f949506..6a10219 100644\n--- a/Cargo.lock\n+++ b/Cargo.lock\n@@ -94,7 +94,7 @@ dependencies = [\n \n [[package]]\n name = \"els\"\n-version = \"0.1.22\"\n+version = \"0.1.23-nightly.0\"\n dependencies = [\n \"erg_common\",\n \"erg_compiler\",\n@@ -105,7 +105,7 @@ dependencies = [\n \n [[package]]\n name = \"erg\"\n-version = \"0.6.10\"\n+version = \"0.6.11-nightly.0\"\n dependencies = [\n \"els\",\n \"erg_common\",\n@@ -115,7 +115,7 @@ dependencies = [\n \n [[package]]\n name = \"erg_common\"\n-version = \"0.6.10\"\n+version = \"0.6.11-nightly.0\"\n dependencies = [\n \"backtrace-on-stack-overflow\",\n \"crossterm\",\n@@ -126,7 +126,7 @@ dependencies = [\n \n [[package]]\n name = \"erg_compiler\"\n-version = \"0.6.10\"\n+version = \"0.6.11-nightly.0\"\n dependencies = [\n \"erg_common\",\n \"erg_parser\",\n@@ -134,7 +134,7 @@ dependencies = [\n \n [[package]]\n name = \"erg_parser\"\n-version = \"0.6.10\"\n+version = \"0.6.11-nightly.0\"\n dependencies = [\n \"erg_common\",\n \"unicode-xid\",\ndiff --git a/Cargo.toml b/Cargo.toml\nindex 04fdad7..ecc45e5 100644\n--- a/Cargo.toml\n+++ b/Cargo.toml\n@@ -20,7 +20,7 @@ members = [\n ]\n \n [workspace.package]\n-version = \"0.6.10\"\n+version = \"0.6.11-nightly.0\"\n authors = [\"erg-lang team <[email protected]>\"]\n license = \"MIT OR Apache-2.0\"\n edition = \"2021\"\n@@ -64,10 +64,10 @@ full-repl = [\"erg_common/full-repl\"]\n full = [\"els\", \"full-repl\", \"unicode\", \"pretty\"]\n \n [workspace.dependencies]\n-erg_common = { version = \"0.6.10\", path = \"./crates/erg_common\" }\n-erg_parser = { version = \"0.6.10\", path = \"./crates/erg_parser\" }\n-erg_compiler = { version = \"0.6.10\", path = \"./crates/erg_compiler\" }\n-els = { version = \"0.1.22\", path = \"./crates/els\" }\n+erg_common = { version = \"0.6.11-nightly.0\", path = \"./crates/erg_common\" }\n+erg_parser = { version = \"0.6.11-nightly.0\", path = \"./crates/erg_parser\" }\n+erg_compiler = { version = \"0.6.11-nightly.0\", path = \"./crates/erg_compiler\" }\n+els = { version = \"0.1.23-nightly.0\", path = \"./crates/els\" }\n \n [dependencies]\n erg_common = { workspace = true }\ndiff --git a/crates/els/Cargo.toml b/crates/els/Cargo.toml\nindex bc031e6..7c9455f 100644\n--- a/crates/els/Cargo.toml\n+++ b/crates/els/Cargo.toml\n@@ -2,7 +2,7 @@\n name = \"els\"\n description = \"An Erg compiler frontend for IDEs, implements LSP.\"\n documentation = \"http://docs.rs/els\"\n-version = \"0.1.22\"\n+version = \"0.1.23-nightly.0\"\n authors.workspace = true\n license.workspace = true\n edition.workspace = true\n"]
1
["607ecc92b5f8c084304e406eec725b7dcfa0a562"]
["build"]
generate terminate end event compatible execution steps part 1 The random execution tests don't know the concept of flow scopes. This makes it challenging to generate a correct execution path for terminate end events, as they terminate a specific flow scope. Processing should continue as normal once the flow scope has been terminated. Whilst we don't have flow scopes, we do have execution path segments. These segments don't map 1 to 1 to flow scopes. However, since every flow scope starts a new segment we can use these segments to get the desired behavior. Each segment must keep track whether is has reached a terminate end event. If this is the case that means that we don't expect any further execution steps. We can isolate this behavior in a single location, during the appending of one segment to another segment. In order to differentiate between flow scopes a new append method has been added which takes the boolean `changesFlowScope` as a parameter. Blockbuilder where the flow scope changes (e.g. SubProcessBlockBuilder) can use this to indicate that even though a terminate end event has been reached. Execution steps after this specific segment still need to added to complete the process. When a segment is appended to a different segment and the flow scope does not change we can use the segment that should be appended to identify whether new segment can still be added to the current segment. If passed segment has reached a terminate end event and the flow scope has not been changed it is guaranteed that the current segment is in the same flow scope has the previous segment and thus has also reached the terminate end event.
["diff --git a/test-util/src/main/java/io/camunda/zeebe/test/util/bpmn/random/ExecutionPathSegment.java b/test-util/src/main/java/io/camunda/zeebe/test/util/bpmn/random/ExecutionPathSegment.java\nindex da33c23..23c43be 100644\n--- a/test-util/src/main/java/io/camunda/zeebe/test/util/bpmn/random/ExecutionPathSegment.java\n+++ b/test-util/src/main/java/io/camunda/zeebe/test/util/bpmn/random/ExecutionPathSegment.java\n@@ -29,6 +29,10 @@ import org.apache.commons.lang3.builder.ToStringStyle;\n */\n public final class ExecutionPathSegment {\n \n+ // If we have reached a terminate end event we want to stop generating execution steps for a\n+ // specific flow scope. By setting this flag to true no new execution steps will be added for the\n+ // flow scope this segment is in.\n+ private boolean reachedTerminateEndEvent = false;\n private final List<ScheduledExecutionStep> scheduledSteps = new ArrayList<>();\n private final Map<String, Object> variableDefaults = new HashMap<>();\n \n@@ -87,10 +91,28 @@ public final class ExecutionPathSegment {\n new ScheduledExecutionStep(logicalPredecessor, executionPredecessor, executionStep));\n }\n \n+ /**\n+ * Appends the steps of the passed execution path segment to the current segment.\n+ *\n+ * @param pathToAdd execution path segment to append to this segment\n+ */\n public void append(final ExecutionPathSegment pathToAdd) {\n+ append(pathToAdd, false);\n+ }\n+\n+ /**\n+ * Appends the step of the passed execution path segment to the current segment if the current\n+ *\n+ * @param pathToAdd\n+ * @param changesFlowScope\n+ */\n+ public void append(final ExecutionPathSegment pathToAdd, final boolean changesFlowScope) {\n mergeVariableDefaults(pathToAdd);\n \n- pathToAdd.getScheduledSteps().forEach(this::append);\n+ if (!hasReachedTerminateEndEvent() || changesFlowScope) {\n+ pathToAdd.getScheduledSteps().forEach(this::append);\n+ }\n+ reachedTerminateEndEvent = pathToAdd.hasReachedTerminateEndEvent() && !changesFlowScope;\n }\n \n public void append(final ScheduledExecutionStep scheduledExecutionStep) {\n@@ -259,6 +281,14 @@ public final class ExecutionPathSegment {\n return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);\n }\n \n+ public boolean hasReachedTerminateEndEvent() {\n+ return reachedTerminateEndEvent;\n+ }\n+\n+ public void setReachedTerminateEndEvent(final boolean reachedTerminateEndEvent) {\n+ this.reachedTerminateEndEvent = reachedTerminateEndEvent;\n+ }\n+\n /**\n * An execution boundary is the point where automatic and non-automatic {@link\n * ScheduledExecutionStep}'s meet each other. This class contains information about the existing\n"]
1
["40597fb4de41c7194eb99479a914db70da7909ea"]
["feat"]
update version (v0.6.18)
["diff --git a/Cargo.lock b/Cargo.lock\nindex c32d8b4..599790e 100644\n--- a/Cargo.lock\n+++ b/Cargo.lock\n@@ -94,7 +94,7 @@ dependencies = [\n \n [[package]]\n name = \"els\"\n-version = \"0.1.30-nightly.2\"\n+version = \"0.1.30\"\n dependencies = [\n \"erg_common\",\n \"erg_compiler\",\n@@ -105,7 +105,7 @@ dependencies = [\n \n [[package]]\n name = \"erg\"\n-version = \"0.6.18-nightly.2\"\n+version = \"0.6.18\"\n dependencies = [\n \"els\",\n \"erg_common\",\n@@ -115,7 +115,7 @@ dependencies = [\n \n [[package]]\n name = \"erg_common\"\n-version = \"0.6.18-nightly.2\"\n+version = \"0.6.18\"\n dependencies = [\n \"backtrace-on-stack-overflow\",\n \"crossterm\",\n@@ -125,7 +125,7 @@ dependencies = [\n \n [[package]]\n name = \"erg_compiler\"\n-version = \"0.6.18-nightly.2\"\n+version = \"0.6.18\"\n dependencies = [\n \"erg_common\",\n \"erg_parser\",\n@@ -133,7 +133,7 @@ dependencies = [\n \n [[package]]\n name = \"erg_parser\"\n-version = \"0.6.18-nightly.2\"\n+version = \"0.6.18\"\n dependencies = [\n \"erg_common\",\n \"unicode-xid\",\ndiff --git a/Cargo.toml b/Cargo.toml\nindex baaa0ac..5082cd3 100644\n--- a/Cargo.toml\n+++ b/Cargo.toml\n@@ -20,7 +20,7 @@ members = [\n ]\n \n [workspace.package]\n-version = \"0.6.18-nightly.2\"\n+version = \"0.6.18\"\n authors = [\"erg-lang team <[email protected]>\"]\n license = \"MIT OR Apache-2.0\"\n edition = \"2021\"\n@@ -64,10 +64,10 @@ full = [\"els\", \"full-repl\", \"unicode\", \"pretty\"]\n experimental = [\"erg_common/experimental\", \"erg_parser/experimental\", \"erg_compiler/experimental\"]\n \n [workspace.dependencies]\n-erg_common = { version = \"0.6.18-nightly.2\", path = \"./crates/erg_common\" }\n-erg_parser = { version = \"0.6.18-nightly.2\", path = \"./crates/erg_parser\" }\n-erg_compiler = { version = \"0.6.18-nightly.2\", path = \"./crates/erg_compiler\" }\n-els = { version = \"0.1.30-nightly.2\", path = \"./crates/els\" }\n+erg_common = { version = \"0.6.18\", path = \"./crates/erg_common\" }\n+erg_parser = { version = \"0.6.18\", path = \"./crates/erg_parser\" }\n+erg_compiler = { version = \"0.6.18\", path = \"./crates/erg_compiler\" }\n+els = { version = \"0.1.30\", path = \"./crates/els\" }\n \n [dependencies]\n erg_common = { workspace = true }\ndiff --git a/crates/els/Cargo.toml b/crates/els/Cargo.toml\nindex 3efbf4e..9f902fa 100644\n--- a/crates/els/Cargo.toml\n+++ b/crates/els/Cargo.toml\n@@ -2,7 +2,7 @@\n name = \"els\"\n description = \"An Erg compiler frontend for IDEs, implements LSP.\"\n documentation = \"http://docs.rs/els\"\n-version = \"0.1.30-nightly.2\"\n+version = \"0.1.30\"\n authors.workspace = true\n license.workspace = true\n edition.workspace = true\n"]
1
["bb3e3d9b96e435c3b92fc208bca93d1ad7e1ad50"]
["build"]
update get-started
["diff --git a/docs/src/go-client/get-started.md b/docs/src/go-client/get-started.md\nindex 4f4405f..a792e0e 100755\n--- a/docs/src/go-client/get-started.md\n+++ b/docs/src/go-client/get-started.md\n@@ -199,14 +199,12 @@ workflowKey:1 bpmnProcessId:\"order-process\" version:1 workflowInstanceKey:6\n \n You did it! You want to see how the workflow instance is executed?\n \n-Start the Zeebe Monitor using `java -jar zeebe-simple-monitor.jar`.\n+Start the Zeebe Monitor using `java -jar zeebe-simple-monitor-app-*.jar`.\n \n Open a web browser and go to <http://localhost:8080/>.\n \n-Connect to the broker and switch to the workflow instances view.\n-Here, you see the current state of the workflow instance which includes active jobs, completed activities, the payload and open incidents.\n-\n-![zeebe-monitor-step-1](/java-client/zeebe-monitor-1.png)\n+Here, you see the current state of the workflow instance.\n+![zeebe-monitor-step-1](/java-client/java-get-started-monitor-1.gif)\n \n \n ## Work on a task\n@@ -322,7 +320,7 @@ it encounters a problem while processing the job.\n \n When you have a look at the Zeebe Monitor, then you can see that the workflow instance moved from the first service task to the next one:\n \n-![zeebe-monitor-step-2](/go-client/zeebe-monitor-2.png)\n+![zeebe-monitor-step-2](/java-client/java-get-started-monitor-2.gif)\n \n When you run the above example you should see similar output:\n \ndiff --git a/docs/src/go-client/java-get-started-monitor-1.gif b/docs/src/go-client/java-get-started-monitor-1.gif\nnew file mode 100644\nindex 0000000..b86803a\nBinary files /dev/null and b/docs/src/go-client/java-get-started-monitor-1.gif differ\ndiff --git a/docs/src/go-client/java-get-started-monitor-2.gif b/docs/src/go-client/java-get-started-monitor-2.gif\nnew file mode 100644\nindex 0000000..8f0f2a4\nBinary files /dev/null and b/docs/src/go-client/java-get-started-monitor-2.gif differ\ndiff --git a/docs/src/go-client/zeebe-monitor-1.png b/docs/src/go-client/zeebe-monitor-1.png\ndeleted file mode 100644\nindex 0075f3d..0000000\nBinary files a/docs/src/go-client/zeebe-monitor-1.png and /dev/null differ\ndiff --git a/docs/src/go-client/zeebe-monitor-2.png b/docs/src/go-client/zeebe-monitor-2.png\ndeleted file mode 100644\nindex 6687bb0..0000000\nBinary files a/docs/src/go-client/zeebe-monitor-2.png and /dev/null differ\ndiff --git a/docs/src/go-client/zeebe-monitor-3.png b/docs/src/go-client/zeebe-monitor-3.png\ndeleted file mode 100644\nindex bc15659..0000000\nBinary files a/docs/src/go-client/zeebe-monitor-3.png and /dev/null differ\ndiff --git a/docs/src/introduction/quickstart.md b/docs/src/introduction/quickstart.md\nindex 70abacf..68be28b 100644\n--- a/docs/src/introduction/quickstart.md\n+++ b/docs/src/introduction/quickstart.md\n@@ -215,7 +215,7 @@ and completed by a [job worker](/basics/job-workers.html). A job worker is a\n long living process which repeatedly tries to activate jobs for a given job\n type and completes them after executing its business logic. The `zbctl` also\n provides a command to spawn simple job workers using an external command or\n-script. The job worker will receive for every job the payload as JSON object on\n+script. The job worker will receive for every job the workflow instance variables as JSON object on\n `stdin` and has to return its result also as JSON object on `stdout` if it\n handled the job successfully.\n \ndiff --git a/docs/src/java-client/get-started.md b/docs/src/java-client/get-started.md\nindex 54d2208..afc1fd4 100755\n--- a/docs/src/java-client/get-started.md\n+++ b/docs/src/java-client/get-started.md\n@@ -21,9 +21,9 @@ You will be guided through the following steps:\n * [Zeebe Modeler](https://github.com/zeebe-io/zeebe-modeler/releases)\n * [Zeebe Monitor](https://github.com/zeebe-io/zeebe-simple-monitor/releases)\n \n-Before you begin to setup your project please start the broker, i.e. by running the start up script \n-`bin/broker` or `bin/broker.bat` in the distribution. Per default the broker is binding to the \n-address `localhost:26500`, which is used as contact point in this guide. In case your broker is \n+Before you begin to setup your project please start the broker, i.e. by running the start up script\n+`bin/broker` or `bin/broker.bat` in the distribution. Per default the broker is binding to the\n+address `localhost:26500`, which is used as contact point in this guide. In case your broker is\n available under another address please adjust the broker contact point when building the client.\n \n ## Set up a project\n@@ -182,14 +182,12 @@ Workflow instance created. Key: 6\n \n You did it! You want to see how the workflow instance is executed?\n \n-Start the Zeebe Monitor using `java -jar zeebe-simple-monitor.jar`.\n+Start the Zeebe Monitor using `java -jar zeebe-simple-monitor-app-*.jar`.\n \n Open a web browser and go to <http://localhost:8080/>.\n \n-Connect to the broker and switch to the workflow instances view.\n-Here, you see the current state of the workflow instance which includes active jobs, completed activities, the payload and open incidents.\n-\n-![zeebe-monitor-step-1](/java-client/zeebe-monitor-1.png)\n+Here, you see the current state of the workflow instance.\n+![zeebe-monitor-step-1](/java-client/java-get-started-monitor-1.gif)\n \n ## Work on a job\n \n@@ -205,12 +203,9 @@ Insert a few service tasks between the start and the end event.\n You need to set the type of each task, which identifies the nature of the work to be performed.\n Set the type of the first task to 'payment-service'.\n \n-Optionally, you can define parameters of the task by adding headers.\n-Add the header `method = VISA` to the first task.\n-\n Save the BPMN diagram and switch back to the main class.\n \n-Add the following lines to create a [job worker][] for the first jobs type:\n+Add the following lines to create a job worker for the first jobs type:\n \n ```java\n package io.zeebe;\n@@ -227,10 +222,7 @@ public class Application\n .jobType(\"payment-service\")\n .handler((jobClient, job) ->\n {\n- final Map<String, Object> headers = job.getCustomHeaders();\n- final String method = (String) headers.get(\"method\");\n-\n- System.out.println(\"Collect money using payment method: \" + method);\n+ System.out.println(\"Collect money\");\n \n // ...\n \n@@ -252,40 +244,29 @@ public class Application\n Run the program and verify that the job is processed. You should see the output:\n \n ```\n-Collect money using payment method: VISA\n+Collect money\n ```\n \n When you have a look at the Zeebe Monitor, then you can see that the workflow instance moved from the first service task to the next one:\n \n-![zeebe-monitor-step-2](/java-client/zeebe-monitor-2.png)\n+![zeebe-monitor-step-2](/java-client/java-get-started-monitor-2.gif)\n \n ## Work with data\n \n-Usually, a workflow is more than just tasks, there is also data flow.\n-The tasks need data as input and in order to produce data.\n+Usually, a workflow is more than just tasks, there is also a data flow. The worker gets the data from the workflow instance to do its work and send the result back to the workflow instance.\n \n-In Zeebe, the data is represented as a JSON document.\n-When you create a workflow instance, then you can pass the data as payload.\n-Within the workflow, you can use input and output mappings on tasks to control the data flow.\n+In Zeebe, the data is stored as key-value-pairs in form of variables. Variables can be set when the workflow instance is created. Within the workflow, variables can be read and modified by workers.\n \n-In our example, we want to create a workflow instance with the following data:\n+In our example, we want to create a workflow instance with the following variables:\n \n ```json\n-{\n- \"orderId\": 31243,\n- \"orderItems\": [435, 182, 376]\n-}\n+\"orderId\": 31243\n+\"orderItems\": [435, 182, 376]\n ```\n \n-The first task should take `orderId` as input and return `totalPrice` as result.\n-\n-Open the BPMN diagram and switch to the input-output-mappings of the first task.\n-Add the input mapping `$.orderId : $.orderId` and the output mapping `$.totalPrice : $.totalPrice`.\n+The first task should read `orderId` as input and return `totalPrice` as result.\n \n-Save the BPMN diagram and go back to the main class.\n-\n-Modify the create command and pass the data as variables.\n-Also, modify the job worker to read the jobs payload and complete the job with payload.\n+Modify the workflow instance create command and pass the data as variables. Also, modify the job worker to read the job variables and complete the job with a result.\n \n ```java\n package io.zeebe;\n@@ -313,23 +294,22 @@ public class Application\n .jobType(\"payment-service\")\n .handler((jobClient, job) ->\n {\n- final Map<String, Object> headers = job.getCustomHeaders();\n- final String method = (String) headers.get(\"method\");\n-\n- final Map<String, Object> payload = job.getPayloadAsMap();\n+ final Map<String, Object> variables = job.getVariablesAsMap();\n \n- System.out.println(\"Process order: \" + payload.get(\"orderId\"));\n- System.out.println(\"Collect money using payment method: \" + method);\n+ System.out.println(\"Process order: \" + variables.get(\"orderId\"));\n+ System.out.println(\"Collect money\");\n \n // ...\n \n- payload.put(\"totalPrice\", 46.50);\n+ final Map<String, Object> result = new HashMap<>();\n+ result.put(\"totalPrice\", 46.50);\n \n jobClient.newCompleteCommand(job.getKey())\n- .payload(payload)\n+ .variables(result)\n .send()\n .join();\n })\n+ .fetchVariables(\"orderId\")\n .open();\n \n // ...\n@@ -337,16 +317,16 @@ public class Application\n }\n ```\n \n-Run the program and verify that the payload is mapped into the job. You should see the output:\n+Run the program and verify that the variable is read. You should see the output:\n \n ```\n-Process order: {\"orderId\":31243}\n-Collect money using payment method: VISA\n+Process order: 31243\n+Collect money\n ```\n \n-When we have a look at the Zeebe Monitor, then we can see how the payload is modified after the activity:\n+When we have a look at the Zeebe Monitor, then we can see that the variable `totalPrice` is set:\n \n-![zeebe-monitor-step-3](/java-client/zeebe-monitor-3.png)\n+![zeebe-monitor-step-3](/java-client/java-get-started-monitor-3.gif)\n \n ## What's next?\n \ndiff --git a/docs/src/java-client/java-get-started-monitor-1.gif b/docs/src/java-client/java-get-started-monitor-1.gif\nnew file mode 100644\nindex 0000000..b86803a\nBinary files /dev/null and b/docs/src/java-client/java-get-started-monitor-1.gif differ\ndiff --git a/docs/src/java-client/java-get-started-monitor-2.gif b/docs/src/java-client/java-get-started-monitor-2.gif\nnew file mode 100644\nindex 0000000..8f0f2a4\nBinary files /dev/null and b/docs/src/java-client/java-get-started-monitor-2.gif differ\ndiff --git a/docs/src/java-client/java-get-started-monitor-3.gif b/docs/src/java-client/java-get-started-monitor-3.gif\nnew file mode 100644\nindex 0000000..1f6cb56\nBinary files /dev/null and b/docs/src/java-client/java-get-started-monitor-3.gif differ\ndiff --git a/docs/src/java-client/zeebe-monitor-1.png b/docs/src/java-client/zeebe-monitor-1.png\ndeleted file mode 100644\nindex 0075f3d..0000000\nBinary files a/docs/src/java-client/zeebe-monitor-1.png and /dev/null differ\ndiff --git a/docs/src/java-client/zeebe-monitor-2.png b/docs/src/java-client/zeebe-monitor-2.png\ndeleted file mode 100644\nindex 6687bb0..0000000\nBinary files a/docs/src/java-client/zeebe-monitor-2.png and /dev/null differ\ndiff --git a/docs/src/java-client/zeebe-monitor-3.png b/docs/src/java-client/zeebe-monitor-3.png\ndeleted file mode 100644\nindex bc15659..0000000\nBinary files a/docs/src/java-client/zeebe-monitor-3.png and /dev/null differ\n"]
1
["cf6d526123abab2689b24a06aaf03d8e4d6ddff4"]
["docs"]
backup manager can mark inprogress backups as failed
["diff --git a/backup/src/main/java/io/camunda/zeebe/backup/api/BackupManager.java b/backup/src/main/java/io/camunda/zeebe/backup/api/BackupManager.java\nindex b2dfb98..21eaf6d 100644\n--- a/backup/src/main/java/io/camunda/zeebe/backup/api/BackupManager.java\n+++ b/backup/src/main/java/io/camunda/zeebe/backup/api/BackupManager.java\n@@ -42,4 +42,6 @@ public interface BackupManager {\n \n /** Close Backup manager */\n ActorFuture<Void> closeAsync();\n+\n+ void failInProgressBackup(long lastCheckpointId);\n }\ndiff --git a/backup/src/main/java/io/camunda/zeebe/backup/management/BackupService.java b/backup/src/main/java/io/camunda/zeebe/backup/management/BackupService.java\nindex a1e1319..33149ae 100644\n--- a/backup/src/main/java/io/camunda/zeebe/backup/management/BackupService.java\n+++ b/backup/src/main/java/io/camunda/zeebe/backup/management/BackupService.java\n@@ -16,6 +16,7 @@ import io.camunda.zeebe.scheduler.future.ActorFuture;\n import io.camunda.zeebe.scheduler.future.CompletableActorFuture;\n import io.camunda.zeebe.snapshots.PersistedSnapshotStore;\n import java.nio.file.Path;\n+import java.util.List;\n import java.util.function.Predicate;\n import org.slf4j.Logger;\n import org.slf4j.LoggerFactory;\n@@ -31,11 +32,13 @@ public final class BackupService extends Actor implements BackupManager {\n private final PersistedSnapshotStore snapshotStore;\n private final Path segmentsDirectory;\n private final Predicate<Path> isSegmentsFile;\n+ private List<Integer> partitionMembers;\n \n public BackupService(\n final int nodeId,\n final int partitionId,\n final int numberOfPartitions,\n+ final List<Integer> partitionMembers,\n final PersistedSnapshotStore snapshotStore,\n final Predicate<Path> isSegmentsFile,\n final Path segmentsDirectory) {\n@@ -48,6 +51,7 @@ public final class BackupService extends Actor implements BackupManager {\n snapshotStore,\n segmentsDirectory,\n isSegmentsFile);\n+ this.partitionMembers = partitionMembers;\n }\n \n public BackupService(\n@@ -122,6 +126,12 @@ public final class BackupService extends Actor implements BackupManager {\n new UnsupportedOperationException(\"Not implemented\"));\n }\n \n+ @Override\n+ public void failInProgressBackup(final long lastCheckpointId) {\n+ internalBackupManager.failInProgressBackups(\n+ partitionId, lastCheckpointId, partitionMembers, actor);\n+ }\n+\n private BackupIdentifierImpl getBackupId(final long checkpointId) {\n return new BackupIdentifierImpl(nodeId, partitionId, checkpointId);\n }\ndiff --git a/backup/src/main/java/io/camunda/zeebe/backup/management/BackupServiceImpl.java b/backup/src/main/java/io/camunda/zeebe/backup/management/BackupServiceImpl.java\nindex e462dd5..f6d76b6 100644\n--- a/backup/src/main/java/io/camunda/zeebe/backup/management/BackupServiceImpl.java\n+++ b/backup/src/main/java/io/camunda/zeebe/backup/management/BackupServiceImpl.java\n@@ -9,16 +9,23 @@ package io.camunda.zeebe.backup.management;\n \n import io.camunda.zeebe.backup.api.BackupIdentifier;\n import io.camunda.zeebe.backup.api.BackupStatus;\n+import io.camunda.zeebe.backup.api.BackupStatusCode;\n import io.camunda.zeebe.backup.api.BackupStore;\n+import io.camunda.zeebe.backup.common.BackupIdentifierImpl;\n+import io.camunda.zeebe.backup.processing.state.CheckpointState;\n import io.camunda.zeebe.scheduler.ConcurrencyControl;\n import io.camunda.zeebe.scheduler.future.ActorFuture;\n import io.camunda.zeebe.scheduler.future.CompletableActorFuture;\n+import java.util.Collection;\n import java.util.HashSet;\n import java.util.Set;\n import java.util.function.BiConsumer;\n import java.util.function.Consumer;\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n \n final class BackupServiceImpl {\n+ private static final Logger LOG = LoggerFactory.getLogger(BackupServiceImpl.class);\n private final Set<InProgressBackup> backupsInProgress = new HashSet<>();\n private final BackupStore backupStore;\n private ConcurrencyControl concurrencyControl;\n@@ -138,4 +145,48 @@ final class BackupServiceImpl {\n }));\n return future;\n }\n+\n+ void failInProgressBackups(\n+ final int partitionId,\n+ final long lastCheckpointId,\n+ final Collection<Integer> brokers,\n+ final ConcurrencyControl executor) {\n+ if (lastCheckpointId != CheckpointState.NO_CHECKPOINT) {\n+ executor.run(\n+ () -> {\n+ final var backupIds =\n+ brokers.stream()\n+ .map(b -> new BackupIdentifierImpl(b, partitionId, lastCheckpointId))\n+ .toList();\n+ // Fail backups initiated by previous leaders\n+ backupIds.forEach(this::failInProgressBackup);\n+ });\n+ }\n+ }\n+\n+ private void failInProgressBackup(final BackupIdentifier backupId) {\n+ backupStore\n+ .getStatus(backupId)\n+ .thenAccept(\n+ status -> {\n+ if (status.statusCode() == BackupStatusCode.IN_PROGRESS) {\n+ LOG.debug(\n+ \"The backup {} initiated by previous leader is still in progress. Marking it as failed.\",\n+ backupId);\n+ backupStore\n+ .markFailed(backupId)\n+ .thenAccept(ignore -> LOG.trace(\"Marked backup {} as failed.\", backupId))\n+ .exceptionally(\n+ failed -> {\n+ LOG.debug(\"Failed to mark backup {} as failed\", backupId, failed);\n+ return null;\n+ });\n+ }\n+ })\n+ .exceptionally(\n+ error -> {\n+ LOG.debug(\"Failed to retrieve status of backup {}\", backupId);\n+ return null;\n+ });\n+ }\n }\ndiff --git a/backup/src/main/java/io/camunda/zeebe/backup/processing/CheckpointRecordsProcessor.java b/backup/src/main/java/io/camunda/zeebe/backup/processing/CheckpointRecordsProcessor.java\nindex c83fdc1..2899d4d 100644\n--- a/backup/src/main/java/io/camunda/zeebe/backup/processing/CheckpointRecordsProcessor.java\n+++ b/backup/src/main/java/io/camunda/zeebe/backup/processing/CheckpointRecordsProcessor.java\n@@ -14,20 +14,24 @@ import io.camunda.zeebe.backup.processing.state.DbCheckpointState;\n import io.camunda.zeebe.engine.api.ProcessingResult;\n import io.camunda.zeebe.engine.api.ProcessingResultBuilder;\n import io.camunda.zeebe.engine.api.ProcessingScheduleService;\n+import io.camunda.zeebe.engine.api.ReadonlyStreamProcessorContext;\n import io.camunda.zeebe.engine.api.RecordProcessor;\n import io.camunda.zeebe.engine.api.RecordProcessorContext;\n+import io.camunda.zeebe.engine.api.StreamProcessorLifecycleAware;\n import io.camunda.zeebe.engine.api.TypedRecord;\n import io.camunda.zeebe.protocol.impl.record.value.management.CheckpointRecord;\n import io.camunda.zeebe.protocol.record.ValueType;\n import io.camunda.zeebe.protocol.record.intent.management.CheckpointIntent;\n import java.time.Duration;\n+import java.util.List;\n import java.util.Set;\n import java.util.concurrent.CopyOnWriteArraySet;\n import org.slf4j.Logger;\n import org.slf4j.LoggerFactory;\n \n /** Process and replays records related to Checkpoint. */\n-public final class CheckpointRecordsProcessor implements RecordProcessor {\n+public final class CheckpointRecordsProcessor\n+ implements RecordProcessor, StreamProcessorLifecycleAware {\n \n private static final Logger LOG = LoggerFactory.getLogger(CheckpointRecordsProcessor.class);\n \n@@ -62,6 +66,8 @@ public final class CheckpointRecordsProcessor implements RecordProcessor {\n checkpointListeners.forEach(\n listener -> listener.onNewCheckpointCreated(checkpointState.getCheckpointId()));\n }\n+\n+ recordProcessorContext.addLifecycleListeners(List.of(this));\n }\n \n @Override\n@@ -126,4 +132,12 @@ public final class CheckpointRecordsProcessor implements RecordProcessor {\n });\n }\n }\n+\n+ @Override\n+ public void onRecovered(final ReadonlyStreamProcessorContext context) {\n+ // After a leader change, the new leader will not continue taking the backup initiated by\n+ // previous leader. So mark them as failed, so that the users do not wait forever for it to be\n+ // completed.\n+ backupManager.failInProgressBackup(checkpointState.getCheckpointId());\n+ }\n }\ndiff --git a/broker/src/main/java/io/camunda/zeebe/broker/system/partitions/impl/steps/BackupServiceTransitionStep.java b/broker/src/main/java/io/camunda/zeebe/broker/system/partitions/impl/steps/BackupServiceTransitionStep.java\nindex 3424e19..591e17b 100644\n--- a/broker/src/main/java/io/camunda/zeebe/broker/system/partitions/impl/steps/BackupServiceTransitionStep.java\n+++ b/broker/src/main/java/io/camunda/zeebe/broker/system/partitions/impl/steps/BackupServiceTransitionStep.java\n@@ -7,6 +7,7 @@\n */\n package io.camunda.zeebe.broker.system.partitions.impl.steps;\n \n+import io.atomix.cluster.MemberId;\n import io.atomix.raft.RaftServer.Role;\n import io.camunda.zeebe.backup.api.BackupManager;\n import io.camunda.zeebe.backup.management.BackupService;\n@@ -17,6 +18,7 @@ import io.camunda.zeebe.journal.file.SegmentFile;\n import io.camunda.zeebe.scheduler.future.ActorFuture;\n import io.camunda.zeebe.scheduler.future.CompletableActorFuture;\n import java.nio.file.Path;\n+import java.util.List;\n import java.util.function.Predicate;\n \n public final class BackupServiceTransitionStep implements PartitionTransitionStep {\n@@ -69,6 +71,7 @@ public final class BackupServiceTransitionStep implements PartitionTransitionSte\n context.getNodeId(),\n context.getPartitionId(),\n context.getBrokerCfg().getCluster().getPartitionsCount(),\n+ getPartitionMembers(context),\n context.getPersistedSnapshotStore(),\n isSegmentsFile,\n context.getRaftPartition().dataDirectory().toPath());\n@@ -90,4 +93,12 @@ public final class BackupServiceTransitionStep implements PartitionTransitionSte\n });\n return installed;\n }\n+\n+ // Brokers which are members of this partition's replication group\n+ private static List<Integer> getPartitionMembers(final PartitionTransitionContext context) {\n+ return context.getRaftPartition().members().stream()\n+ .map(MemberId::id)\n+ .map(Integer::parseInt)\n+ .toList();\n+ }\n }\n"]
1
["fb83ef33b699fd966486a922ba1ade4cf8e55858"]
["feat"]
add system get version info Fiddle example (#20536)
["diff --git a/docs/fiddles/system/system-information/get-version-information/index.html b/docs/fiddles/system/system-information/get-version-information/index.html\nnew file mode 100644\nindex 0000000..0867bc3\n--- /dev/null\n+++ b/docs/fiddles/system/system-information/get-version-information/index.html\n@@ -0,0 +1,26 @@\n+<!DOCTYPE html>\n+<html>\n+ <head>\n+ <meta charset=\"UTF-8\">\n+ </head>\n+ <body>\n+ <div>\n+ <div>\n+ <h1>Get version information</h1>\n+ <i>Supports: Win, macOS, Linux <span>|</span> Process: Both</i>\n+ <div>\n+ <div>\n+ <button id=\"version-info\">View Demo</button>\n+ <span id=\"got-version-info\"></span>\n+ </div>\n+ <p>The <code>process</code> module is built into Node.js (therefore you can use this in both the main and renderer processes) and in Electron apps this object has a few more useful properties on it.</p>\n+ <p>The example below gets the version of Electron in use by the app.</p>\n+ <p>See the <a href=\"http://electron.atom.io/docs/api/process\">process documentation <span>(opens in new window)</span></a> for more.</p>\n+ </div>\n+ </div>\n+ </div>\n+ </body>\n+ <script>\n+ require('./renderer.js')\n+ </script>\n+</html>\ndiff --git a/docs/fiddles/system/system-information/get-version-information/main.js b/docs/fiddles/system/system-information/get-version-information/main.js\nnew file mode 100644\nindex 0000000..1f9f917\n--- /dev/null\n+++ b/docs/fiddles/system/system-information/get-version-information/main.js\n@@ -0,0 +1,25 @@\n+const { app, BrowserWindow } = require('electron')\n+\n+let mainWindow = null\n+\n+function createWindow () {\n+ const windowOptions = {\n+ width: 600,\n+ height: 400,\n+ title: 'Get version information',\n+ webPreferences: {\n+ nodeIntegration: true\n+ }\n+ }\n+\n+ mainWindow = new BrowserWindow(windowOptions)\n+ mainWindow.loadFile('index.html')\n+\n+ mainWindow.on('closed', () => {\n+ mainWindow = null\n+ })\n+}\n+\n+app.on('ready', () => {\n+ createWindow()\n+})\ndiff --git a/docs/fiddles/system/system-information/get-version-information/renderer.js b/docs/fiddles/system/system-information/get-version-information/renderer.js\nnew file mode 100644\nindex 0000000..40f7f2c\n--- /dev/null\n+++ b/docs/fiddles/system/system-information/get-version-information/renderer.js\n@@ -0,0 +1,8 @@\n+const versionInfoBtn = document.getElementById('version-info')\n+\n+const electronVersion = process.versions.electron\n+\n+versionInfoBtn.addEventListener('click', () => {\n+ const message = `This app is using Electron version: ${electronVersion}`\n+ document.getElementById('got-version-info').innerHTML = message\n+})\n"]
1
["16d4ace80096557fb3fd48396aa09107241c3131"]
["docs"]
deploy dmn using java client This test is an acceptance test that verifies that the java client can deploy a dmn decision model using the newDeployCommand client method. It verifies that the model was resource was parsed and deployed, resulting in a response that contains metadata of the deployed decision requirements graph and the decisions it contains.
["diff --git a/qa/integration-tests/src/test/java/io/camunda/zeebe/it/client/command/CreateDeploymentTest.java b/qa/integration-tests/src/test/java/io/camunda/zeebe/it/client/command/CreateDeploymentTest.java\nindex f36465b..6b6ab48 100644\n--- a/qa/integration-tests/src/test/java/io/camunda/zeebe/it/client/command/CreateDeploymentTest.java\n+++ b/qa/integration-tests/src/test/java/io/camunda/zeebe/it/client/command/CreateDeploymentTest.java\n@@ -67,6 +67,49 @@ public final class CreateDeploymentTest {\n }\n \n @Test\n+ public void shouldDeployDecisionModel() {\n+ // given\n+ final String resourceName = \"dmn/drg-force-user.dmn\";\n+\n+ // when\n+ final DeploymentEvent result =\n+ CLIENT_RULE\n+ .getClient()\n+ .newDeployCommand()\n+ .addResourceFromClasspath(resourceName)\n+ .send()\n+ .join();\n+\n+ // then\n+ assertThat(result.getKey()).isPositive();\n+ assertThat(result.getDecisionRequirements()).hasSize(1);\n+ assertThat(result.getDecisions()).hasSize(2);\n+\n+ final var decisionRequirements = result.getDecisionRequirements().get(0);\n+ assertThat(decisionRequirements.getDmnDecisionRequirementsId()).isEqualTo(\"force_users\");\n+ assertThat(decisionRequirements.getDmnDecisionRequirementsName()).isEqualTo(\"Force Users\");\n+ assertThat(decisionRequirements.getVersion()).isEqualTo(1);\n+ assertThat(decisionRequirements.getDecisionRequirementsKey()).isPositive();\n+ assertThat(decisionRequirements.getResourceName()).isEqualTo(resourceName);\n+\n+ final var decision1 = result.getDecisions().get(0);\n+ assertThat(decision1.getDmnDecisionId()).isEqualTo(\"jedi_or_sith\");\n+ assertThat(decision1.getDmnDecisionName()).isEqualTo(\"Jedi or Sith\");\n+ assertThat(decision1.getVersion()).isEqualTo(1);\n+ assertThat(decision1.getDecisionKey()).isPositive();\n+ assertThat(decision1.getDmnDecisionRequirementsId()).isEqualTo(\"force_users\");\n+ assertThat(decision1.getDecisionRequirementsKey()).isPositive();\n+\n+ final var decision2 = result.getDecisions().get(1);\n+ assertThat(decision2.getDmnDecisionId()).isEqualTo(\"force_user\");\n+ assertThat(decision2.getDmnDecisionName()).isEqualTo(\"Which force user?\");\n+ assertThat(decision2.getVersion()).isEqualTo(1);\n+ assertThat(decision2.getDecisionKey()).isPositive();\n+ assertThat(decision2.getDmnDecisionRequirementsId()).isEqualTo(\"force_users\");\n+ assertThat(decision2.getDecisionRequirementsKey()).isPositive();\n+ }\n+\n+ @Test\n public void shouldRejectDeployIfProcessIsInvalid() {\n // given\n final BpmnModelInstance process =\ndiff --git a/qa/integration-tests/src/test/resources/dmn/drg-force-user.dmn b/qa/integration-tests/src/test/resources/dmn/drg-force-user.dmn\nnew file mode 100644\nindex 0000000..8d55c55\n--- /dev/null\n+++ b/qa/integration-tests/src/test/resources/dmn/drg-force-user.dmn\n@@ -0,0 +1,144 @@\n+<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n+<definitions xmlns=\"https://www.omg.org/spec/DMN/20191111/MODEL/\" xmlns:dmndi=\"https://www.omg.org/spec/DMN/20191111/DMNDI/\" xmlns:dc=\"http://www.omg.org/spec/DMN/20180521/DC/\" xmlns:biodi=\"http://bpmn.io/schema/dmn/biodi/2.0\" xmlns:di=\"http://www.omg.org/spec/DMN/20180521/DI/\" id=\"force_users\" name=\"Force Users\" namespace=\"http://camunda.org/schema/1.0/dmn\" exporter=\"Camunda Modeler\" exporterVersion=\"4.12.0\">\n+ <decision id=\"jedi_or_sith\" name=\"Jedi or Sith\">\n+ <decisionTable id=\"DecisionTable_14n3bxx\">\n+ <input id=\"Input_1\" label=\"Lightsaber color\" biodi:width=\"192\">\n+ <inputExpression id=\"InputExpression_1\" typeRef=\"string\">\n+ <text>lightsaberColor</text>\n+ </inputExpression>\n+ </input>\n+ <output id=\"Output_1\" label=\"Jedi or Sith\" name=\"jedi_or_sith\" typeRef=\"string\" biodi:width=\"192\">\n+ <outputValues id=\"UnaryTests_0hj346a\">\n+ <text>\"Jedi\",\"Sith\"</text>\n+ </outputValues>\n+ </output>\n+ <rule id=\"DecisionRule_0zumznl\">\n+ <inputEntry id=\"UnaryTests_0leuxqi\">\n+ <text>\"blue\"</text>\n+ </inputEntry>\n+ <outputEntry id=\"LiteralExpression_0c9vpz8\">\n+ <text>\"Jedi\"</text>\n+ </outputEntry>\n+ </rule>\n+ <rule id=\"DecisionRule_1utwb1e\">\n+ <inputEntry id=\"UnaryTests_1v3sd4m\">\n+ <text>\"green\"</text>\n+ </inputEntry>\n+ <outputEntry id=\"LiteralExpression_0tgh8k1\">\n+ <text>\"Jedi\"</text>\n+ </outputEntry>\n+ </rule>\n+ <rule id=\"DecisionRule_1bwgcym\">\n+ <inputEntry id=\"UnaryTests_0n1ewm3\">\n+ <text>\"red\"</text>\n+ </inputEntry>\n+ <outputEntry id=\"LiteralExpression_19xnlkw\">\n+ <text>\"Sith\"</text>\n+ </outputEntry>\n+ </rule>\n+ </decisionTable>\n+ </decision>\n+ <decision id=\"force_user\" name=\"Which force user?\">\n+ <informationRequirement id=\"InformationRequirement_1o8esai\">\n+ <requiredDecision href=\"#jedi_or_sith\" />\n+ </informationRequirement>\n+ <decisionTable id=\"DecisionTable_07g94t1\" hitPolicy=\"FIRST\">\n+ <input id=\"InputClause_0qnqj25\" label=\"Jedi or Sith\">\n+ <inputExpression id=\"LiteralExpression_00lcyt5\" typeRef=\"string\">\n+ <text>jedi_or_sith</text>\n+ </inputExpression>\n+ <inputValues id=\"UnaryTests_1xjidd8\">\n+ <text>\"Jedi\",\"Sith\"</text>\n+ </inputValues>\n+ </input>\n+ <input id=\"InputClause_0k64hys\" label=\"Body height\">\n+ <inputExpression id=\"LiteralExpression_0ib6fnk\" typeRef=\"number\">\n+ <text>height</text>\n+ </inputExpression>\n+ </input>\n+ <output id=\"OutputClause_0hhe1yo\" label=\"Force user\" name=\"force_user\" typeRef=\"string\" />\n+ <rule id=\"DecisionRule_13zidc5\">\n+ <inputEntry id=\"UnaryTests_056skcq\">\n+ <text>\"Jedi\"</text>\n+ </inputEntry>\n+ <inputEntry id=\"UnaryTests_0l4xksq\">\n+ <text>&gt; 190</text>\n+ </inputEntry>\n+ <outputEntry id=\"LiteralExpression_0hclhw3\">\n+ <text>\"Mace Windu\"</text>\n+ </outputEntry>\n+ </rule>\n+ <rule id=\"DecisionRule_0uin2hk\">\n+ <description></description>\n+ <inputEntry id=\"UnaryTests_16maepk\">\n+ <text>\"Jedi\"</text>\n+ </inputEntry>\n+ <inputEntry id=\"UnaryTests_0rv0nwf\">\n+ <text>&gt; 180</text>\n+ </inputEntry>\n+ <outputEntry id=\"LiteralExpression_0t82c11\">\n+ <text>\"Obi-Wan Kenobi\"</text>\n+ </outputEntry>\n+ </rule>\n+ <rule id=\"DecisionRule_0mpio0p\">\n+ <inputEntry id=\"UnaryTests_09eicyc\">\n+ <text>\"Jedi\"</text>\n+ </inputEntry>\n+ <inputEntry id=\"UnaryTests_1bekl8k\">\n+ <text>&lt; 70</text>\n+ </inputEntry>\n+ <outputEntry id=\"LiteralExpression_0brx3vt\">\n+ <text>\"Yoda\"</text>\n+ </outputEntry>\n+ </rule>\n+ <rule id=\"DecisionRule_06paffx\">\n+ <inputEntry id=\"UnaryTests_1baiid4\">\n+ <text>\"Sith\"</text>\n+ </inputEntry>\n+ <inputEntry id=\"UnaryTests_0fcdq0i\">\n+ <text>&gt; 200</text>\n+ </inputEntry>\n+ <outputEntry id=\"LiteralExpression_02oibi4\">\n+ <text>\"Darth Vader\"</text>\n+ </outputEntry>\n+ </rule>\n+ <rule id=\"DecisionRule_1ua4pcl\">\n+ <inputEntry id=\"UnaryTests_1s1h3nm\">\n+ <text>\"Sith\"</text>\n+ </inputEntry>\n+ <inputEntry id=\"UnaryTests_1pnvw8p\">\n+ <text>&gt; 170</text>\n+ </inputEntry>\n+ <outputEntry id=\"LiteralExpression_1w1n2rc\">\n+ <text>\"Darth Sidius\"</text>\n+ </outputEntry>\n+ </rule>\n+ <rule id=\"DecisionRule_00ew25e\">\n+ <inputEntry id=\"UnaryTests_07uxyug\">\n+ <text></text>\n+ </inputEntry>\n+ <inputEntry id=\"UnaryTests_1he6fym\">\n+ <text></text>\n+ </inputEntry>\n+ <outputEntry id=\"LiteralExpression_07i3sc8\">\n+ <text>\"unknown\"</text>\n+ </outputEntry>\n+ </rule>\n+ </decisionTable>\n+ </decision>\n+ <dmndi:DMNDI>\n+ <dmndi:DMNDiagram>\n+ <dmndi:DMNShape dmnElementRef=\"jedi_or_sith\">\n+ <dc:Bounds height=\"80\" width=\"180\" x=\"160\" y=\"280\" />\n+ </dmndi:DMNShape>\n+ <dmndi:DMNShape id=\"DMNShape_1sb3tre\" dmnElementRef=\"force_user\">\n+ <dc:Bounds height=\"80\" width=\"180\" x=\"280\" y=\"80\" />\n+ </dmndi:DMNShape>\n+ <dmndi:DMNEdge id=\"DMNEdge_0gt1p1u\" dmnElementRef=\"InformationRequirement_1o8esai\">\n+ <di:waypoint x=\"250\" y=\"280\" />\n+ <di:waypoint x=\"370\" y=\"180\" />\n+ <di:waypoint x=\"370\" y=\"160\" />\n+ </dmndi:DMNEdge>\n+ </dmndi:DMNDiagram>\n+ </dmndi:DMNDI>\n+</definitions>\n"]
1
["73eac947689e3fc6b53bf626a6b4604056166d6e"]
["test"]
apply permissions to profile request
["diff --git a/client/src/components/Profile/AboutCard.tsx b/client/src/components/Profile/AboutCard.tsx\nindex 3bd6e9a..e07ddb6 100644\n--- a/client/src/components/Profile/AboutCard.tsx\n+++ b/client/src/components/Profile/AboutCard.tsx\n@@ -11,6 +11,7 @@ import { InfoCircleOutlined } from '@ant-design/icons';\n \n type Props = {\n data: GeneralInfo;\n+ isEditingModeEnabled: boolean;\n };\n \n class AboutCard extends React.Component<Props> {\ndiff --git a/client/src/components/Profile/ContactsCard.tsx b/client/src/components/Profile/ContactsCard.tsx\nindex 6fe80a3..3a35c9f 100644\n--- a/client/src/components/Profile/ContactsCard.tsx\n+++ b/client/src/components/Profile/ContactsCard.tsx\n@@ -12,8 +12,11 @@ import { ContactsOutlined } from '@ant-design/icons';\n \n type Props = {\n data: Contacts;\n+ isEditingModeEnabled: boolean;\n };\n \n+type Contact = { name: string, value?: string };\n+\n class ContactsCard extends React.Component<Props> {\n render() {\n const { email, telegram, phone, skype, notes } = this.props.data;\n@@ -32,7 +35,7 @@ class ContactsCard extends React.Component<Props> {\n }, {\n name: 'Notes',\n value: notes,\n- }].filter(({ value }: { name: string, value: string | null }) => value);\n+ }].filter(({ value }: Contact) => value);\n \n return (\n <CommonCard\n@@ -42,7 +45,7 @@ class ContactsCard extends React.Component<Props> {\n <List\n itemLayout=\"horizontal\"\n dataSource={contacts}\n- renderItem={({ name, value }: { name: string, value: string }) => (\n+ renderItem={({ name, value }: Contact) => (\n <List.Item>\n <Text strong>{name}:</Text> {value}\n </List.Item>\ndiff --git a/client/src/components/Profile/EducationCard.tsx b/client/src/components/Profile/EducationCard.tsx\nindex 4279c9f..b409c29 100644\n--- a/client/src/components/Profile/EducationCard.tsx\n+++ b/client/src/components/Profile/EducationCard.tsx\n@@ -12,6 +12,7 @@ import { ReadOutlined } from '@ant-design/icons';\n \n type Props = {\n data: GeneralInfo;\n+ isEditingModeEnabled: boolean;\n };\n \n class EducationCard extends React.Component<Props> {\ndiff --git a/client/src/components/Profile/EnglishCard.tsx b/client/src/components/Profile/EnglishCard.tsx\nindex d8f8ab4..2d5efa0 100644\n--- a/client/src/components/Profile/EnglishCard.tsx\n+++ b/client/src/components/Profile/EnglishCard.tsx\n@@ -11,6 +11,7 @@ import { TagOutlined } from '@ant-design/icons';\n \n type Props = {\n data: GeneralInfo;\n+ isEditingModeEnabled: boolean;\n };\n \n class EnglishCard extends React.Component<Props> {\ndiff --git a/client/src/components/Profile/MainCard.tsx b/client/src/components/Profile/MainCard.tsx\nindex cbfb71b..c0d49cc 100644\n--- a/client/src/components/Profile/MainCard.tsx\n+++ b/client/src/components/Profile/MainCard.tsx\n@@ -4,6 +4,8 @@ import { GithubAvatar } from 'components';\n import {\n Card,\n Typography,\n+ Drawer,\n+ Checkbox,\n } from 'antd';\n \n const { Title, Paragraph } = Typography;\n@@ -11,30 +13,70 @@ const { Title, Paragraph } = Typography;\n import {\n GithubFilled,\n EnvironmentFilled,\n+ EditOutlined,\n+ SettingOutlined,\n } from '@ant-design/icons';\n \n type Props = {\n data: GeneralInfo;\n+ isEditingModeEnabled: boolean;\n };\n \n-class MainCard extends React.Component<Props> {\n+type State = {\n+ isSettingsVisible: boolean;\n+}\n+\n+class MainCard extends React.Component<Props, State> {\n+ state = {\n+ isSettingsVisible: false,\n+ }\n+\n+ private showSettings = () => {\n+ this.setState({ isSettingsVisible: true });\n+ }\n+\n+ private hideSettings = () => {\n+ this.setState({ isSettingsVisible: false });\n+ }\n+\n render() {\n const { githubId, name, locationName } = this.props.data;\n+ const { isSettingsVisible } = this.state;\n+\n return (\n- <Card>\n- <GithubAvatar size={96} githubId={githubId} style={{ margin: '0 auto 10px', display: 'block' }} />\n- <Title level={1} style={{ fontSize: 24, textAlign: 'center', margin: 0 }}>{name}</Title>\n- <Paragraph style={{ textAlign: 'center', marginBottom: 20 }}>\n- <a target=\"_blank\" href={`https://github.com/${githubId}`} style={{ marginLeft: '-14px', fontSize: 16 }}>\n- <GithubFilled /> {githubId}\n- </a>\n- </Paragraph>\n- <Paragraph style={{ textAlign: 'center', margin: 0 }}>\n- <span style={{ marginLeft: '-14px' }}>\n- <EnvironmentFilled /> {locationName}\n- </span>\n- </Paragraph>\n- </Card>\n+ <>\n+\n+ <Card\n+ actions={[\n+ <EditOutlined key=\"main-card-actions-edit\"/>,\n+ <SettingOutlined key=\"main-card-actions-settings\" onClick={this.showSettings} />,\n+ ]}\n+ >\n+ <GithubAvatar size={96} githubId={githubId} style={{ margin: '0 auto 10px', display: 'block' }} />\n+ <Title level={1} style={{ fontSize: 24, textAlign: 'center', margin: 0 }}>{name}</Title>\n+ <Paragraph style={{ textAlign: 'center', marginBottom: 20 }}>\n+ <a target=\"_blank\" href={`https://github.com/${githubId}`} style={{ marginLeft: '-14px', fontSize: 16 }}>\n+ <GithubFilled /> {githubId}\n+ </a>\n+ </Paragraph>\n+ <Paragraph style={{ textAlign: 'center', margin: 0 }}>\n+ <span style={{ marginLeft: '-14px' }}>\n+ <EnvironmentFilled /> {locationName}\n+ </span>\n+ </Paragraph>\n+ <Drawer\n+ title=\"Who can see my profile?\"\n+ placement=\"top\"\n+ closable={true}\n+ onClose={this.hideSettings}\n+ visible={isSettingsVisible}\n+ getContainer={false}\n+ style={{ position: 'absolute', display: isSettingsVisible ? 'block' : 'none' }}\n+ >\n+ <Checkbox>Nobody</Checkbox>\n+ </Drawer>\n+ </Card>\n+ </>\n );\n }\n }\ndiff --git a/client/src/components/Profile/MentorStatsCard.tsx b/client/src/components/Profile/MentorStatsCard.tsx\nindex ca54480..1ec3b9c 100644\n--- a/client/src/components/Profile/MentorStatsCard.tsx\n+++ b/client/src/components/Profile/MentorStatsCard.tsx\n@@ -18,6 +18,7 @@ import {\n \n type Props = {\n data: MentorStats[];\n+ isEditingModeEnabled: boolean;\n };\n \n type State = {\n@@ -80,7 +81,7 @@ class MentorStatsCard extends React.Component<Props, State> {\n <Text strong>{courseName}{locationName && ` / ${locationName}`}</Text>\n </p>\n {\n- idx === 0 && (\n+ students ? idx === 0 && (\n <List\n itemLayout=\"horizontal\"\n dataSource={students}\n@@ -116,12 +117,14 @@ class MentorStatsCard extends React.Component<Props, State> {\n </List.Item>\n )}\n />\n- )\n+ ) : <p>Doesn't have students at this course yet</p>\n }\n </div>\n- <Button type=\"dashed\" onClick={this.showMentorStatsModal.bind(null, idx)}>\n- <FullscreenOutlined/>\n- </Button>\n+ {\n+ students && <Button type=\"dashed\" onClick={this.showMentorStatsModal.bind(null, idx)}>\n+ <FullscreenOutlined/>\n+ </Button>\n+ }\n </List.Item>\n )}\n />\ndiff --git a/client/src/components/Profile/MentorStatsModal.tsx b/client/src/components/Profile/MentorStatsModal.tsx\nindex 47b5f2a..0e94cc1 100644\n--- a/client/src/components/Profile/MentorStatsModal.tsx\n+++ b/client/src/components/Profile/MentorStatsModal.tsx\n@@ -38,7 +38,7 @@ class MentorStatsModal extends React.Component<Props> {\n >\n <Row gutter={[16, 16]}>\n {\n- students.map(({ name, githubId, isExpelled, totalScore }) => {\n+ students?.map(({ name, githubId, isExpelled, totalScore }) => {\n const profile = `/profile?githubId=${githubId}`;\n const guithubLink = `https://github.com/${githubId}`;\n const privateRepoLink = `https://github.com/rolling-scopes-school/${githubId}-${courseYearPostfix}`;\ndiff --git a/client/src/components/Profile/PublicFeedbackCard.tsx b/client/src/components/Profile/PublicFeedbackCard.tsx\nindex 2f8a999..6ce1862 100644\n--- a/client/src/components/Profile/PublicFeedbackCard.tsx\n+++ b/client/src/components/Profile/PublicFeedbackCard.tsx\n@@ -22,6 +22,7 @@ import {\n \n type Props = {\n data: PublicFeedback[];\n+ isEditingModeEnabled: boolean;\n };\n \n interface State {\ndiff --git a/client/src/components/Profile/StudentStatsCard.tsx b/client/src/components/Profile/StudentStatsCard.tsx\nindex c811640..b472e49 100644\n--- a/client/src/components/Profile/StudentStatsCard.tsx\n+++ b/client/src/components/Profile/StudentStatsCard.tsx\n@@ -18,6 +18,7 @@ import {\n \n type Props = {\n data: StudentStats[];\n+ isEditingModeEnabled: boolean;\n };\n \n type State = {\ndiff --git a/client/src/pages/profile/index.tsx b/client/src/pages/profile/index.tsx\nindex 68b2a70..b6ffb1a 100644\n--- a/client/src/pages/profile/index.tsx\n+++ b/client/src/pages/profile/index.tsx\n@@ -1,6 +1,7 @@\n import * as React from 'react';\n import {\n Result,\n+ Button,\n } from 'antd';\n import css from 'styled-jsx/css';\n import Masonry from 'react-masonry-css';\n@@ -23,18 +24,25 @@ import CoreJsIviewsCard from 'components/Profile/CoreJsIviewsCard';\n import { CoreJsInterviewData } from 'components/Profile/CoreJsIviewsCard';\n import PreScreeningIviewCard from 'components/Profile/PreScreeningIviewCard';\n \n+import {\n+ EditOutlined,\n+ EyeOutlined,\n+} from '@ant-design/icons';\n+\n type Props = {\n router: NextRouter;\n session: Session;\n };\n \n type State = {\n+ isEditingModeEnabled: boolean;\n profile: ProfileInfo | null;\n isLoading: boolean;\n };\n \n class ProfilePage extends React.Component<Props, State> {\n state: State = {\n+ isEditingModeEnabled: false,\n isLoading: true,\n profile: null,\n };\n@@ -79,6 +87,12 @@ class ProfilePage extends React.Component<Props, State> {\n }\n };\n \n+ private toggleEditViewProfileButton = () => {\n+ const { isEditingModeEnabled } = this.state;\n+\n+ this.setState({ isEditingModeEnabled: !isEditingModeEnabled });\n+ }\n+\n async componentDidMount() {\n await this.fetchData();\n }\n@@ -90,21 +104,29 @@ class ProfilePage extends React.Component<Props, State> {\n }\n \n render() {\n- const { profile } = this.state;\n+ const { profile, isEditingModeEnabled } = this.state;\n \n const cards = [\n- profile?.generalInfo && <MainCard data={profile.generalInfo}/>,\n- profile?.generalInfo?.aboutMyself && <AboutCard data={profile.generalInfo}/>,\n- profile?.generalInfo?.englishLevel && <EnglishCard data={profile.generalInfo}/>,\n- profile?.generalInfo?.educationHistory.length && <EducationCard data={profile.generalInfo}/>,\n- profile?.contacts && <ContactsCard data={profile.contacts}/>,\n- profile?.publicFeedback.length && <PublicFeedbackCard data={profile.publicFeedback}/>,\n- profile?.studentStats.length && <StudentStatsCard data={profile.studentStats}/>,\n- profile?.mentorStats.length && <MentorStatsCard data={profile.mentorStats}/>,\n- profile?.studentStats.length &&\n- this.hadStudentCoreJSInterview(profile.studentStats) &&\n+ profile?.generalInfo &&\n+ <MainCard data={profile.generalInfo} isEditingModeEnabled={isEditingModeEnabled}/>,\n+ profile?.generalInfo?.aboutMyself &&\n+ <AboutCard data={profile.generalInfo} isEditingModeEnabled={isEditingModeEnabled}/>,\n+ profile?.generalInfo?.englishLevel &&\n+ <EnglishCard data={profile.generalInfo} isEditingModeEnabled={isEditingModeEnabled}/>,\n+ profile?.generalInfo?.educationHistory?.length &&\n+ <EducationCard data={profile.generalInfo} isEditingModeEnabled={isEditingModeEnabled}/>,\n+ profile?.contacts &&\n+ <ContactsCard data={profile.contacts} isEditingModeEnabled={isEditingModeEnabled}/>,\n+ profile?.publicFeedback?.length &&\n+ <PublicFeedbackCard data={profile.publicFeedback} isEditingModeEnabled={isEditingModeEnabled}/>,\n+ profile?.studentStats?.length &&\n+ <StudentStatsCard data={profile.studentStats} isEditingModeEnabled={isEditingModeEnabled}/>,\n+ profile?.mentorStats?.length &&\n+ <MentorStatsCard data={profile.mentorStats} isEditingModeEnabled={isEditingModeEnabled}/>,\n+ profile?.studentStats?.length && this.hadStudentCoreJSInterview(profile.studentStats) &&\n <CoreJsIviewsCard data={this.getStudentCoreJSInterviews(profile.studentStats)}/>,\n- profile?.stageInterviewFeedback.length && <PreScreeningIviewCard data={profile.stageInterviewFeedback}/>,\n+ profile?.stageInterviewFeedback.length &&\n+ <PreScreeningIviewCard data={profile.stageInterviewFeedback}/>,\n ].filter(Boolean) as JSX.Element[];\n \n return (\n@@ -114,6 +136,17 @@ class ProfilePage extends React.Component<Props, State> {\n {\n this.state.profile\n ? <div style={{ padding: 10 }}>\n+ <Button\n+ type=\"ghost\"\n+ style={{ position: 'fixed', width: 80, right: 10, zIndex: 1 }}\n+ onClick={this.toggleEditViewProfileButton}\n+ >\n+ {\n+ isEditingModeEnabled ?\n+ <span><EditOutlined/> Edit</span> :\n+ <span><EyeOutlined /> View</span>\n+ }\n+ </Button>\n <Masonry\n breakpointCols={{\n default: 4,\ndiff --git a/common/models/profile.ts b/common/models/profile.ts\nindex 6a06fd1..ce7abc2 100644\n--- a/common/models/profile.ts\n+++ b/common/models/profile.ts\n@@ -3,26 +3,25 @@ import { EnglishLevel } from './';\n export interface GeneralInfo {\n name: string;\n githubId: string;\n- aboutMyself: string;\n+ aboutMyself?: string;\n locationName: string;\n- educationHistory: any;\n- employmentHistory: any;\n- englishLevel: EnglishLevel;\n+ educationHistory?: any;\n+ englishLevel?: EnglishLevel;\n }\n \n export interface Contacts {\n- phone: string;\n- email: string;\n- skype: string;\n- telegram: string;\n- notes: string;\n+ phone?: string;\n+ email?: string;\n+ skype?: string;\n+ telegram?: string;\n+ notes?: string;\n }\n \n export interface MentorStats {\n courseName: string;\n locationName: string;\n courseFullName: string;\n- students: {\n+ students?: {\n githubId: string;\n name: string;\n isExpelled: boolean;\n@@ -102,14 +101,14 @@ export interface StageInterviewDetailedFeedback {\n \n export interface UserInfo {\n generalInfo: GeneralInfo;\n- contacts: Contacts;\n+ contacts?: Contacts;\n };\n \n export interface ProfileInfo {\n generalInfo?: GeneralInfo;\n contacts?: Contacts;\n- mentorStats: MentorStats[];\n- studentStats: StudentStats[];\n- publicFeedback: PublicFeedback[];\n+ mentorStats?: MentorStats[];\n+ studentStats?: StudentStats[];\n+ publicFeedback?: PublicFeedback[];\n stageInterviewFeedback: StageInterviewDetailedFeedback[];\n };\ndiff --git a/server/package.json b/server/package.json\nindex 1bd6de1..bf2d5f0 100755\n--- a/server/package.json\n+++ b/server/package.json\n@@ -4,7 +4,7 @@\n \"private\": true,\n \"scripts\": {\n \"build\": \"tsc\",\n- \"start\": \"nodemon --inspect --watch 'src/**/*' -e ts --exec node -r ts-node/register -r dotenv/config ./index.ts | pino-pretty -i time,hostname,pid,host,method,remoteAddress\",\n+ \"start\": \"nodemon --inspect --watch \\\"src/**/*\\\" -e ts --exec node -r ts-node/register -r dotenv/config ./index.ts | pino-pretty -i time,hostname,pid,host,method,remoteAddress\",\n \"lint\": \"tslint -c tslint.json -p tsconfig.json\",\n \"swagger\": \"swagger-jsdoc -d swaggerDef.js -o ./public/swagger.yml ./src/routes/**/*.ts ./src/routes/**.ts\"\n },\ndiff --git a/server/src/models/profilePermissions.ts b/server/src/models/profilePermissions.ts\nindex 1b2a79a..fd06900 100644\n--- a/server/src/models/profilePermissions.ts\n+++ b/server/src/models/profilePermissions.ts\n@@ -1,20 +1,20 @@\n import { Entity, Column, CreateDateColumn, UpdateDateColumn, PrimaryGeneratedColumn, OneToOne } from 'typeorm';\n import { User } from './user';\n \n-interface PublicVisibilitySettings {\n+export interface PublicVisibilitySettings {\n all: boolean;\n }\n \n-interface VisibilitySettings extends PublicVisibilitySettings {\n+export interface VisibilitySettings extends PublicVisibilitySettings {\n mentor: boolean;\n student: boolean;\n }\n \n-const defaultPublicVisibilitySettings = {\n+export const defaultPublicVisibilitySettings = {\n all: false,\n };\n \n-const defaultVisibilitySettings = {\n+export const defaultVisibilitySettings = {\n mentor: false,\n student: false,\n all: false,\ndiff --git a/server/src/routes/profile/info.ts b/server/src/routes/profile/info.ts\nindex f5d249d..22a8132 100644\n--- a/server/src/routes/profile/info.ts\n+++ b/server/src/routes/profile/info.ts\n@@ -1,4 +1,4 @@\n-import { NOT_FOUND, OK } from 'http-status-codes';\n+import { NOT_FOUND, OK, FORBIDDEN } from 'http-status-codes';\n import Router from 'koa-router';\n import { ILogger } from '../../logger';\n import { setResponse } from '../utils';\n@@ -9,7 +9,7 @@ import { getPublicFeedback } from './public-feedback';\n import { getStageInterviewFeedback } from './stage-interview-feedback';\n import { getStudentStats } from './student-stats';\n import { getUserInfo } from './user-info';\n-import { getPermissions } from './permissions';\n+import { getPermissions, getOwnerPermissions } from './permissions';\n \n /*\n WHO CAN SEE\n@@ -60,13 +60,9 @@ import { getPermissions } from './permissions';\n */\n \n export const getProfileInfo = (_: ILogger) => async (ctx: Router.RouterContext) => {\n- const {\n- // id: userId,\n- githubId: userGithubId,\n- } = ctx.state!.user as IUserSession;\n+ const { githubId: userGithubId } = ctx.state!.user as IUserSession;\n // const { isAdmin, roles } = ctx.state!.user as IUserSession;\n- const { githubId } = ctx.query as { githubId: string | undefined };\n-\n+ const { githubId = userGithubId } = ctx.query as { githubId: string | undefined };\n // console.log('GITHUB =>', githubId);\n // console.log('ADMIN =>', isAdmin);\n // console.log('ROLES =>', roles);\n@@ -75,16 +71,28 @@ export const getProfileInfo = (_: ILogger) => async (ctx: Router.RouterContext) \n return setResponse(ctx, NOT_FOUND);\n }\n \n+ const isProfileOwner = githubId === userGithubId;\n+ console.log('isProfileOwner', isProfileOwner);\n // await getRepository(ProfilePermissions).save({ userId });\n \n- const permissions = await getPermissions(userGithubId, githubId);\n+ const permissions = await getPermissions(userGithubId, githubId, { isProfileOwner });\n \n- console.log(JSON.stringify(permissions, null, 2));\n+ const { isProfileVisible, isPublicFeedbackVisible, isMentorStatsVisible, isStudentStatsVisible } = permissions;\n+\n+ if (!isProfileVisible && !isProfileOwner) {\n+ return setResponse(ctx, FORBIDDEN);\n+ }\n+\n+ if (isProfileOwner) {\n+ const ownerPermissions = await getOwnerPermissions(userGithubId);\n+\n+ console.log('OWN =>', ownerPermissions);\n+ }\n \n const { generalInfo, contacts } = await getUserInfo(githubId, permissions);\n- const publicFeedback = await getPublicFeedback(githubId);\n- const mentorStats = await getMentorStats(githubId);\n- const studentStats = await getStudentStats(githubId);\n+ const publicFeedback = isPublicFeedbackVisible ? await getPublicFeedback(githubId) : undefined;\n+ const mentorStats = isMentorStatsVisible ? await getMentorStats(githubId) : undefined;\n+ const studentStats = isStudentStatsVisible ? await getStudentStats(githubId) : undefined;\n const stageInterviewFeedback = await getStageInterviewFeedback(githubId);\n \n const profileInfo: ProfileInfo = {\n@@ -96,7 +104,8 @@ export const getProfileInfo = (_: ILogger) => async (ctx: Router.RouterContext) \n studentStats,\n };\n \n- // console.log(JSON.stringify(profileInfo, null, 2));\n+ console.log(JSON.stringify(permissions, null, 2));\n+ console.log(JSON.stringify(profileInfo, null, 2));\n \n setResponse(ctx, OK, profileInfo);\n };\ndiff --git a/server/src/routes/profile/mentor-stats.ts b/server/src/routes/profile/mentor-stats.ts\nindex 843a2f7..72e6b30 100644\n--- a/server/src/routes/profile/mentor-stats.ts\n+++ b/server/src/routes/profile/mentor-stats.ts\n@@ -36,11 +36,11 @@ export const getMentorStats = async (githubId: string): Promise<MentorStats[]> =\n studentIsExpelledStatuses,\n studentTotalScores,\n }: any) => {\n- const students = studentGithubIds.map((githubId: string, idx: number) => ({\n+ const students = studentGithubIds[0] ? studentGithubIds.map((githubId: string, idx: number) => ({\n githubId,\n name: getFullName(studentFirstNames[idx], studentLastNames[idx], githubId),\n isExpelled: studentIsExpelledStatuses[idx],\n totalScore: studentTotalScores[idx],\n- }));\n+ })) : undefined;\n return { courseName, locationName, courseFullName, students };\n });\ndiff --git a/server/src/routes/profile/permissions.ts b/server/src/routes/profile/permissions.ts\nindex 61924a8..b40121c 100644\n--- a/server/src/routes/profile/permissions.ts\n+++ b/server/src/routes/profile/permissions.ts\n@@ -1,3 +1,4 @@\n+import { get, mapValues } from 'lodash';\n import { getRepository } from 'typeorm';\n import {\n User,\n@@ -8,6 +9,12 @@ import {\n TaskInterviewResult,\n StageInterview,\n } from '../../models';\n+import {\n+ PublicVisibilitySettings,\n+ VisibilitySettings,\n+ defaultPublicVisibilitySettings,\n+ defaultVisibilitySettings,\n+} from '../../models/profilePermissions';\n \n interface Relations {\n student: string;\n@@ -19,7 +26,43 @@ interface Relations {\n \n type RelationRole = 'student' | 'mentor' | 'all';\n \n-const getAllProfilePermissions = async (githubId: string): Promise<any> => (\n+interface SuperAccessRights {\n+ isProfileOwner: boolean;\n+}\n+\n+interface ConfigurableProfilePermissions {\n+ isProfileVisible: PublicVisibilitySettings;\n+ isAboutVisible: VisibilitySettings;\n+ isEducationVisible: VisibilitySettings;\n+ isEnglishVisible: VisibilitySettings;\n+ isEmailVisible: VisibilitySettings;\n+ isTelegramVisible: VisibilitySettings;\n+ isSkypeVisible: VisibilitySettings;\n+ isPhoneVisible: VisibilitySettings;\n+ isContactsNotesVisible: VisibilitySettings;\n+ isLinkedInVisible: VisibilitySettings;\n+ isPublicFeedbackVisible: VisibilitySettings;\n+ isMentorStatsVisible: VisibilitySettings;\n+ isStudentStatsVisible: VisibilitySettings;\n+}\n+\n+export interface Permissions {\n+ isProfileVisible: boolean;\n+ isAboutVisible: boolean;\n+ isEducationVisible: boolean;\n+ isEnglishVisible: boolean;\n+ isEmailVisible: boolean;\n+ isTelegramVisible: boolean;\n+ isSkypeVisible: boolean;\n+ isPhoneVisible: boolean;\n+ isContactsNotesVisible: boolean;\n+ isLinkedInVisible: boolean;\n+ isPublicFeedbackVisible: boolean;\n+ isMentorStatsVisible: boolean;\n+ isStudentStatsVisible: boolean;\n+}\n+\n+const getConfigurableProfilePermissions = async (githubId: string): Promise<ConfigurableProfilePermissions> => (\n (await getRepository(ProfilePermissions)\n .createQueryBuilder('pp')\n .select('\"pp\".\"isProfileVisible\" AS \"isProfileVisible\"')\n@@ -85,16 +128,67 @@ const getRelationRole = async (userGithubId: string, requestedGithubId: string):\n return 'all';\n };\n \n-const matchPermissions = (permissions: any, role: RelationRole) => {\n- const obj: any = {};\n- Object.keys(permissions).forEach((key) => {\n- obj[key] = permissions[key].all || permissions[key][role];\n- });\n- return obj;\n+const matchPermissions = (\n+ permissions: ConfigurableProfilePermissions,\n+ role: RelationRole,\n+ { isProfileOwner }: SuperAccessRights,\n+): Permissions => {\n+ const p: Permissions = {\n+ isProfileVisible: false,\n+ isAboutVisible: false,\n+ isEducationVisible: false,\n+ isEnglishVisible: false,\n+ isEmailVisible: false,\n+ isTelegramVisible: false,\n+ isSkypeVisible: false,\n+ isPhoneVisible: false,\n+ isContactsNotesVisible: false,\n+ isLinkedInVisible: false,\n+ isPublicFeedbackVisible: false,\n+ isMentorStatsVisible: false,\n+ isStudentStatsVisible: false,\n+ };\n+\n+ // (Object.keys(p) as (keyof Permissions)[]).forEach((key) => {\n+ // p[key] = isProfileOwner || permissions[key].all || permissions[key][role];\n+ // });\n+\n+ // return p;\n+\n+ return mapValues(p, (_, key) => isProfileOwner ||\n+ get(permissions, `${key}.all`) ||\n+ get(permissions, `${key}.${role}`) ||\n+ false,\n+ );\n };\n \n-export const getPermissions = async (userGithubId: string, requestedGithubId: string) => {\n- const permissions = await getAllProfilePermissions(requestedGithubId);\n+export const getPermissions = async (\n+ userGithubId: string,\n+ requestedGithubId: string,\n+ superAccessRights: SuperAccessRights,\n+) => {\n+ const permissions = await getConfigurableProfilePermissions(requestedGithubId);\n const role = await getRelationRole(userGithubId, requestedGithubId);\n- return matchPermissions(permissions, role);\n+ return matchPermissions(permissions, role, superAccessRights);\n+};\n+\n+export const getOwnerPermissions = async (githubId: string) => {\n+ const permissions = await getConfigurableProfilePermissions(githubId);\n+ const p: ConfigurableProfilePermissions = {\n+ isProfileVisible: defaultPublicVisibilitySettings,\n+ isAboutVisible: defaultVisibilitySettings,\n+ isEducationVisible: defaultVisibilitySettings,\n+ isEnglishVisible: defaultVisibilitySettings,\n+ isEmailVisible: defaultVisibilitySettings,\n+ isTelegramVisible: defaultVisibilitySettings,\n+ isSkypeVisible: defaultVisibilitySettings,\n+ isPhoneVisible: defaultVisibilitySettings,\n+ isContactsNotesVisible: defaultVisibilitySettings,\n+ isLinkedInVisible: defaultVisibilitySettings,\n+ isPublicFeedbackVisible: defaultVisibilitySettings,\n+ isMentorStatsVisible: defaultVisibilitySettings,\n+ isStudentStatsVisible: defaultVisibilitySettings,\n+ };\n+\n+ return mapValues(p, (value, key) => get(permissions, key, value));\n };\ndiff --git a/server/src/routes/profile/user-info.ts b/server/src/routes/profile/user-info.ts\nindex 5b871e0..1998ed0 100644\n--- a/server/src/routes/profile/user-info.ts\n+++ b/server/src/routes/profile/user-info.ts\n@@ -2,23 +2,53 @@ import { getRepository } from 'typeorm';\n import { UserInfo } from '../../../../common/models/profile';\n import { getFullName } from '../../lib/utils';\n import { User } from '../../models';\n+import { Permissions } from './permissions';\n \n-export const getUserInfo = async (githubId: string, permissions: any): Promise<UserInfo> => {\n- const { isAboutVisible } = permissions;\n+export const getUserInfo = async (githubId: string, permissions: Permissions): Promise<UserInfo> => {\n+ const {\n+ isAboutVisible,\n+ isEducationVisible,\n+ isEnglishVisible,\n+ isPhoneVisible,\n+ isEmailVisible,\n+ isTelegramVisible,\n+ isSkypeVisible,\n+ isContactsNotesVisible,\n+ } = permissions;\n \n const query = await getRepository(User)\n .createQueryBuilder('user')\n .select('\"user\".\"firstName\" AS \"firstName\", \"user\".\"lastName\" AS \"lastName\"')\n .addSelect('\"user\".\"githubId\" AS \"githubId\"')\n- .addSelect('\"user\".\"locationName\" AS \"locationName\"')\n- .addSelect('\"user\".\"educationHistory\" AS \"educationHistory\"')\n- .addSelect('\"user\".\"employmentHistory\" AS \"employmentHistory\"')\n- .addSelect('\"user\".\"englishLevel\" AS \"englishLevel\"')\n- .addSelect('\"user\".\"contactsPhone\" AS \"contactsPhone\"')\n- .addSelect('\"user\".\"contactsEmail\" AS \"contactsEmail\"')\n- .addSelect('\"user\".\"contactsTelegram\" AS \"contactsTelegram\"')\n- .addSelect('\"user\".\"contactsSkype\" AS \"contactsSkype\"')\n- .addSelect('\"user\".\"contactsNotes\" AS \"contactsNotes\"');\n+ .addSelect('\"user\".\"locationName\" AS \"locationName\"');\n+\n+ if (isEducationVisible) {\n+ query.addSelect('\"user\".\"educationHistory\" AS \"educationHistory\"');\n+ }\n+\n+ if (isEnglishVisible) {\n+ query.addSelect('\"user\".\"englishLevel\" AS \"englishLevel\"');\n+ }\n+\n+ if (isPhoneVisible) {\n+ query.addSelect('\"user\".\"contactsPhone\" AS \"contactsPhone\"');\n+ }\n+\n+ if (isEmailVisible) {\n+ query.addSelect('\"user\".\"contactsEmail\" AS \"contactsEmail\"');\n+ }\n+\n+ if (isTelegramVisible) {\n+ query.addSelect('\"user\".\"contactsTelegram\" AS \"contactsTelegram\"');\n+ }\n+\n+ if (isSkypeVisible) {\n+ query.addSelect('\"user\".\"contactsSkype\" AS \"contactsSkype\"');\n+ }\n+\n+ if (isContactsNotesVisible) {\n+ query.addSelect('\"user\".\"contactsNotes\" AS \"contactsNotes\"');\n+ }\n \n if (isAboutVisible) {\n query.addSelect('\"user\".\"aboutMyself\" AS \"aboutMyself\"');\n@@ -33,7 +63,6 @@ export const getUserInfo = async (githubId: string, permissions: any): Promise<U\n lastName,\n locationName,\n educationHistory,\n- employmentHistory,\n englishLevel,\n contactsPhone,\n contactsEmail,\n@@ -49,16 +78,15 @@ export const getUserInfo = async (githubId: string, permissions: any): Promise<U\n aboutMyself,\n locationName,\n educationHistory,\n- employmentHistory,\n englishLevel,\n name: getFullName(firstName, lastName, githubId),\n },\n- contacts: {\n+ contacts: contactsPhone || contactsEmail || contactsSkype || contactsTelegram || contactsNotes ? {\n phone: contactsPhone,\n email: contactsEmail,\n skype: contactsSkype,\n telegram: contactsTelegram,\n notes: contactsNotes,\n- },\n+ } : undefined,\n };\n };\n"]
1
["1f15f71e415ba49b21684c7a3a51c8e3faaa7cf3"]
["feat"]
auto focus inputs in survey form
["diff --git a/packages/nc-gui/pages/[projectType]/form/[viewId]/index/survey.vue b/packages/nc-gui/pages/[projectType]/form/[viewId]/index/survey.vue\nindex b2a90d8..dbad824 100644\n--- a/packages/nc-gui/pages/[projectType]/form/[viewId]/index/survey.vue\n+++ b/packages/nc-gui/pages/[projectType]/form/[viewId]/index/survey.vue\n@@ -6,6 +6,7 @@ import {\n DropZoneRef,\n computed,\n onKeyStroke,\n+ onMounted,\n provide,\n ref,\n useEventListener,\n@@ -85,6 +86,8 @@ function transition(direction: TransitionDirection) {\n \n setTimeout(() => {\n isTransitioning.value = false\n+\n+ setTimeout(focusInput, 100)\n }, 1000)\n }\n \n@@ -113,6 +116,19 @@ async function goPrevious() {\n goToPrevious()\n }\n \n+function focusInput() {\n+ if (document && typeof document !== 'undefined') {\n+ const inputEl =\n+ (document.querySelector('.nc-cell input') as HTMLInputElement) ||\n+ (document.querySelector('.nc-cell textarea') as HTMLTextAreaElement)\n+\n+ if (inputEl) {\n+ inputEl.select()\n+ inputEl.focus()\n+ }\n+ }\n+}\n+\n useEventListener('wheel', (event) => {\n if (Math.abs(event.deltaX) < Math.abs(event.deltaY)) {\n // Scrolling more vertically than horizontally\n@@ -130,6 +146,8 @@ useEventListener('wheel', (event) => {\n \n onKeyStroke(['ArrowLeft', 'ArrowDown'], goPrevious)\n onKeyStroke(['ArrowRight', 'ArrowUp', 'Enter', 'Space'], goNext)\n+\n+onMounted(focusInput)\n </script>\n \n <template>\n"]
1
["5373c3036866db58b322b424d3be9dedff57a376"]
["feat"]
allow users to share their playground session
["diff --git a/playground/docker-compose.yml b/playground/docker-compose.yml\nnew file mode 100644\nindex 0000000..b8ac6aa\n--- /dev/null\n+++ b/playground/docker-compose.yml\n@@ -0,0 +1,18 @@\n+version: '3.3'\n+\n+services:\n+ db:\n+ container_name: panda-mysql\n+ image: mariadb:10.7.1-focal\n+ restart: always\n+ ports:\n+ - 3310:3306\n+ environment:\n+ MARIADB_ROOT_PASSWORD: root\n+ MARIADB_DATABASE: panda\n+ volumes:\n+ - panda-mysql:/var/lib/mysql\n+\n+volumes:\n+ panda-mysql:\n+ driver: local\ndiff --git a/playground/package.json b/playground/package.json\nindex eab6f62..0feccbb 100644\n--- a/playground/package.json\n+++ b/playground/package.json\n@@ -9,6 +9,9 @@\n \"start\": \"next start\",\n \"lint\": \"next lint\",\n \"dev\": \"next dev\",\n+ \"db:start\": \"docker-compose up -d\",\n+ \"db:stop\": \"docker-compose down\",\n+ \"db:push\": \"prisma db push --skip-generate\",\n \"db:generate\": \"prisma generate\",\n \"db:reset\": \"prisma migrate reset\",\n \"db:studio\": \"prisma studio\"\ndiff --git a/playground/prisma/dev.db b/playground/prisma/dev.db\ndeleted file mode 100644\nindex aa8281f..0000000\nBinary files a/playground/prisma/dev.db and /dev/null differ\ndiff --git a/playground/prisma/migrations/20230204163131_init/migration.sql b/playground/prisma/migrations/20230204163131_init/migration.sql\ndeleted file mode 100644\nindex b3c34f7..0000000\n--- a/playground/prisma/migrations/20230204163131_init/migration.sql\n+++ /dev/null\n@@ -1,8 +0,0 @@\n--- CreateTable\n-CREATE TABLE \"Session\" (\n- \"id\" TEXT NOT NULL PRIMARY KEY,\n- \"code\" TEXT NOT NULL,\n- \"config\" TEXT NOT NULL,\n- \"view\" TEXT NOT NULL DEFAULT 'code',\n- \"createdAt\" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP\n-);\ndiff --git a/playground/prisma/migrations/20230208183556_/migration.sql b/playground/prisma/migrations/20230208183556_/migration.sql\ndeleted file mode 100644\nindex 619fd84..0000000\n--- a/playground/prisma/migrations/20230208183556_/migration.sql\n+++ /dev/null\n@@ -1,20 +0,0 @@\n-/*\n- Warnings:\n-\n- - You are about to drop the column `config` on the `Session` table. All the data in the column will be lost.\n-\n-*/\n--- RedefineTables\n-PRAGMA foreign_keys=OFF;\n-CREATE TABLE \"new_Session\" (\n- \"id\" TEXT NOT NULL PRIMARY KEY,\n- \"code\" TEXT NOT NULL,\n- \"theme\" TEXT NOT NULL DEFAULT '',\n- \"view\" TEXT NOT NULL DEFAULT 'code',\n- \"createdAt\" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP\n-);\n-INSERT INTO \"new_Session\" (\"code\", \"createdAt\", \"id\", \"view\") SELECT \"code\", \"createdAt\", \"id\", \"view\" FROM \"Session\";\n-DROP TABLE \"Session\";\n-ALTER TABLE \"new_Session\" RENAME TO \"Session\";\n-PRAGMA foreign_key_check;\n-PRAGMA foreign_keys=ON;\ndiff --git a/playground/prisma/migrations/20230529181831_init/migration.sql b/playground/prisma/migrations/20230529181831_init/migration.sql\nnew file mode 100644\nindex 0000000..ffe5546\n--- /dev/null\n+++ b/playground/prisma/migrations/20230529181831_init/migration.sql\n@@ -0,0 +1,9 @@\n+-- CreateTable\n+CREATE TABLE `Session` (\n+ `id` VARCHAR(191) NOT NULL,\n+ `code` TEXT NOT NULL,\n+ `theme` TEXT NOT NULL,\n+ `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),\n+\n+ PRIMARY KEY (`id`)\n+) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;\ndiff --git a/playground/prisma/migrations/migration_lock.toml b/playground/prisma/migrations/migration_lock.toml\nindex e5e5c47..e5a788a 100644\n--- a/playground/prisma/migrations/migration_lock.toml\n+++ b/playground/prisma/migrations/migration_lock.toml\n@@ -1,3 +1,3 @@\n # Please do not edit this file manually\n # It should be added in your version-control system (i.e. Git)\n-provider = \"sqlite\"\n\\ No newline at end of file\n+provider = \"mysql\"\n\\ No newline at end of file\ndiff --git a/playground/prisma/schema.prisma b/playground/prisma/schema.prisma\nindex e84678a..9e1281e 100644\n--- a/playground/prisma/schema.prisma\n+++ b/playground/prisma/schema.prisma\n@@ -2,16 +2,14 @@ generator client {\n provider = \"prisma-client-js\"\n }\n \n-// Using SQLite for local development\n datasource db {\n- provider = \"sqlite\"\n- url = \"file:dev.db\"\n+ provider = \"mysql\"\n+ url = env(\"DATABASE_URL\")\n }\n \n model Session {\n- id String @id\n- code String\n- theme String @default(\"\")\n- view String @default(\"code\")\n+ id String @id @default(cuid())\n+ code String @db.Text\n+ theme String @db.Text\n createdAt DateTime @default(now())\n }\ndiff --git a/playground/src/app/[id]/page.tsx b/playground/src/app/[id]/page.tsx\nindex 40c21f0..a88d2b9 100644\n--- a/playground/src/app/[id]/page.tsx\n+++ b/playground/src/app/[id]/page.tsx\n@@ -6,9 +6,9 @@ const Page = async (props: any) => {\n params: { id },\n } = props\n \n- const initialState = await prisma?.session.findFirst({\n+ const initialState = await prisma.session.findFirst({\n where: { id },\n- select: { code: true, theme: true, view: true },\n+ select: { code: true, theme: true },\n })\n \n return <Playground intialState={initialState} />\ndiff --git a/playground/src/components/Editor.tsx b/playground/src/components/Editor.tsx\nindex 8263dba..e82469a 100644\n--- a/playground/src/components/Editor.tsx\n+++ b/playground/src/components/Editor.tsx\n@@ -123,10 +123,7 @@ export const Editor = (props: EditorProps) => {\n \n return (\n <Flex flex=\"1\" direction=\"column\" align=\"flex-start\">\n- <Tabs\n- defaultValue={value.view}\n- className={css({ flex: '1', width: 'full', display: 'flex', flexDirection: 'column' })}\n- >\n+ <Tabs defaultValue=\"code\" className={css({ flex: '1', width: 'full', display: 'flex', flexDirection: 'column' })}>\n <TabList\n className={css({\n px: '6',\ndiff --git a/playground/src/components/usePlayground.ts b/playground/src/components/usePlayground.ts\nindex 74b6069..a959fca 100644\n--- a/playground/src/components/usePlayground.ts\n+++ b/playground/src/components/usePlayground.ts\n@@ -4,7 +4,6 @@ import { Layout } from './LayoutControl'\n export type State = {\n code: string\n theme: string\n- view: string\n }\n \n export type UsePlayGroundProps = {\n@@ -51,7 +50,7 @@ export const App = () => {\n body: JSON.stringify(state),\n })\n .then((response) => response.json())\n- .then((data) => {\n+ .then(({ data }) => {\n history.pushState({ id: data.id }, '', data.id)\n setIsPristine(true)\n })\ndiff --git a/playground/src/pages/api/share.ts b/playground/src/pages/api/share.ts\nindex 23f8b9e..e6f3f26 100644\n--- a/playground/src/pages/api/share.ts\n+++ b/playground/src/pages/api/share.ts\n@@ -7,17 +7,16 @@ import { prisma } from '../../client/prisma'\n const schema = z.object({\n code: z.string(),\n theme: z.string(),\n- view: z.enum(['code', 'config']).optional(),\n })\n \n const handler = async (req: NextApiRequest, res: NextApiResponse) =>\n match(req)\n .with({ method: 'POST' }, async () => {\n try {\n- const { code, theme } = schema.parse(req.body)\n+ const data = schema.parse(req.body)\n const id = nanoid(10)\n- await prisma.session.create({ data: { id, code, theme } })\n- return res.status(200).json({ id })\n+ const session = await prisma.session.create({ data: { id, ...data }, select: { id: true } })\n+ return res.status(200).json({ success: true, data: session })\n } catch (e) {\n console.log(e)\n return res.status(500).json({ success: false })\n"]
1
["9c2c7ea1d4935d30e014ca807a4f9cb1665b1e41"]
["feat"]
don't consider cases where there are no txids
["diff --git a/src/main.rs b/src/main.rs\nindex 25d9580..9ba4e38 100644\n--- a/src/main.rs\n+++ b/src/main.rs\n@@ -441,6 +441,9 @@ fn main() {\n let mut delta_tx_fees = vec![];\n let empty_txids = vec![];\n let txids = tx_mined_deltas.get(&delta).unwrap_or(&empty_txids);\n+ if txids.len() == 0 {\n+ continue;\n+ }\n for txid in txids.iter() {\n delta_tx_fees.push(*tx_fees.get(txid).unwrap_or(&0));\n }\n"]
1
["37a1b5bbb5270befcee5d9b9621af196c787a61f"]
["fix"]
path correction Signed-off-by: Pranav C <[email protected]>
["diff --git a/packages/nocodb-nest/src/modules/test/TestResetService/resetMetaSakilaSqliteProject.ts b/packages/nocodb-nest/src/modules/test/TestResetService/resetMetaSakilaSqliteProject.ts\nindex 3afce9b..8425b00 100644\n--- a/packages/nocodb-nest/src/modules/test/TestResetService/resetMetaSakilaSqliteProject.ts\n+++ b/packages/nocodb-nest/src/modules/test/TestResetService/resetMetaSakilaSqliteProject.ts\n@@ -1,11 +1,9 @@\n import { promises as fs } from 'fs';\n import axios from 'axios';\n+import path from 'path'\n \n const sqliteFilePath = (parallelId: string) => {\n- const rootDir = __dirname.replace(\n- '/src/modules/test/TestResetService',\n- '',\n- );\n+ const rootDir = process.cwd()\n \n return `${rootDir}/test_sakila_${parallelId}.db`;\n };\n@@ -78,10 +76,10 @@ const deleteSqliteFileIfExists = async (parallelId: string) => {\n };\n \n const seedSakilaSqliteFile = async (parallelId: string) => {\n- const testsDir = __dirname.replace(\n- '/src/modules/test/TestResetService',\n- '/tests',\n- );\n+ const testsDir = path.join(\n+ process.cwd(),\n+ 'tests'\n+ );;\n \n await fs.copyFile(\n `${testsDir}/sqlite-sakila-db/sakila.db`,\ndiff --git a/packages/nocodb-nest/src/modules/test/TestResetService/resetMysqlSakilaProject.ts b/packages/nocodb-nest/src/modules/test/TestResetService/resetMysqlSakilaProject.ts\nindex 6bcd3f1..e4ed112 100644\n--- a/packages/nocodb-nest/src/modules/test/TestResetService/resetMysqlSakilaProject.ts\n+++ b/packages/nocodb-nest/src/modules/test/TestResetService/resetMysqlSakilaProject.ts\n@@ -1,4 +1,5 @@\n import { promises as fs } from 'fs';\n+import path from 'path';\n import axios from 'axios';\n import { knex } from 'knex';\n import Audit from '../../../models/Audit';\n@@ -85,10 +86,7 @@ const resetSakilaMysql = async (\n parallelId: string,\n isEmptyProject: boolean,\n ) => {\n- const testsDir = __dirname.replace(\n- '/src/modules/test/TestResetService',\n- '/tests',\n- );\n+ const testsDir = path.join(process.cwd(), '/tests');\n \n try {\n await knex.raw(`DROP DATABASE test_sakila_${parallelId}`);\ndiff --git a/packages/nocodb-nest/src/modules/test/TestResetService/resetPgSakilaProject.ts b/packages/nocodb-nest/src/modules/test/TestResetService/resetPgSakilaProject.ts\nindex 1a042c3..73923ef 100644\n--- a/packages/nocodb-nest/src/modules/test/TestResetService/resetPgSakilaProject.ts\n+++ b/packages/nocodb-nest/src/modules/test/TestResetService/resetPgSakilaProject.ts\n@@ -1,6 +1,7 @@\n import { promises as fs } from 'fs';\n import axios from 'axios';\n import { knex } from 'knex';\n+import path from 'path'\n import Audit from '../../../models/Audit';\n import type Project from '../../../models/Project';\n \n@@ -78,8 +79,8 @@ const isSakilaPgToBeReset = async (parallelId: string, project?: Project) => {\n };\n \n const resetSakilaPg = async (parallelId: string, isEmptyProject: boolean) => {\n- const testsDir = __dirname.replace(\n- '/src/modules/test/TestResetService',\n+ const testsDir = path.join(\n+ process.cwd(),\n '/tests',\n );\n \n"]
1
["974e033a3ca7484290a04201ee33856a25da0942"]
["fix"]
fix monorepo.dir prop Signed-off-by: Carlos Alexandro Becker <[email protected]>
["diff --git a/www/docs/customization/monorepo.md b/www/docs/customization/monorepo.md\nindex 6d0e857..e45490f 100644\n--- a/www/docs/customization/monorepo.md\n+++ b/www/docs/customization/monorepo.md\n@@ -18,7 +18,7 @@ project_name: subproj1\n \n monorepo:\n tag_prefix: subproject1/\n- folder: subproj1\n+ dir: subproj1\n ```\n \n Then, you can release with (from the project's root directory):\n@@ -30,11 +30,11 @@ goreleaser release --rm-dist -f ./subproj1/.goreleaser.yml\n Then, the following is different from a \"regular\" run:\n \n - GoReleaser will then look if current commit has a tag prefixed with `subproject1`, and also the previous tag with the same prefix;\n-- Changelog will include only commits that contain changes to files within the `subproj1` folder;\n+- Changelog will include only commits that contain changes to files within the `subproj1` directory;\n - Release name gets prefixed with `{{ .ProjectName }} ` if empty;\n-- All build's `dir` setting get set to `monorepo.folder` if empty;\n+- All build's `dir` setting get set to `monorepo.dir` if empty;\n - if yours is not, you might want to change that manually;\n-- Extra files on the release, archives, Docker builds, etc are prefixed with `monorepo.folder`;\n+- Extra files on the release, archives, Docker builds, etc are prefixed with `monorepo.dir`;\n - On templates, `{{.PrefixedTag}}` will be `monorepo.prefix/tag` (aka the actual tag name), and `{{.Tag}}` has the prefix stripped;\n \n The rest of the release process should work as usual.\n"]
1
["9ed3c0c4a72af977fc9150512fb6538f20a94b22"]
["docs"]
template properties
["diff --git a/docs/docs/segment-angular.md b/docs/docs/segment-angular.md\nindex b7ff7d8..c307239 100644\n--- a/docs/docs/segment-angular.md\n+++ b/docs/docs/segment-angular.md\n@@ -29,3 +29,17 @@ Display the currently active Angular CLI version.\n - display_mode: `string` - determines when the segment is displayed\n - `always`: the segment is always displayed\n - `files`: the segment is only displayed when `angular.json` file is present (default)\n+- template: `string` - A go [text/template][go-text-template] template extended with [sprig][sprig] utilizing the\n+properties below. Defaults to `{{ .Full }}`\n+\n+## Template Properties\n+\n+- `.Full`: `string` - the full version\n+- `.Major`: `string` - is the major version\n+- `.Minor`: `string` - is the minor version\n+- `.Patch`: `string` - is the patch version\n+- `.Prerelease`: `string` - is the prerelease version\n+- `.BuildMetadata`: `string` - is the build metadata\n+\n+[go-text-template]: https://golang.org/pkg/text/template/\n+[sprig]: https://masterminds.github.io/sprig/\ndiff --git a/docs/docs/segment-azfunc.md b/docs/docs/segment-azfunc.md\nindex 6b4368a..984c0fb 100644\n--- a/docs/docs/segment-azfunc.md\n+++ b/docs/docs/segment-azfunc.md\n@@ -33,3 +33,17 @@ Display the currently active Azure functions CLI version.\n - display_mode: `string` - determines when the segment is displayed\n - `always`: the segment is always displayed\n - `files`: the segment is only displayed when a `host.json` or `local.settings.json` files is present (default)\n+- template: `string` - A go [text/template][go-text-template] template extended with [sprig][sprig] utilizing the\n+properties below. Defaults to `{{ .Full }}`\n+\n+## Template Properties\n+\n+- `.Full`: `string` - the full version\n+- `.Major`: `string` - is the major version\n+- `.Minor`: `string` - is the minor version\n+- `.Patch`: `string` - is the patch version\n+- `.Prerelease`: `string` - is the prerelease version\n+- `.BuildMetadata`: `string` - is the build metadata\n+\n+[go-text-template]: https://golang.org/pkg/text/template/\n+[sprig]: https://masterminds.github.io/sprig/\ndiff --git a/docs/docs/segment-crystal.md b/docs/docs/segment-crystal.md\nindex 9cf8ead..8f995bc 100644\n--- a/docs/docs/segment-crystal.md\n+++ b/docs/docs/segment-crystal.md\n@@ -32,3 +32,17 @@ Display the currently active crystal version.\n - display_mode: `string` - determines when the segment is displayed\n - `always`: the segment is always displayed\n - `files`: the segment is only displayed when `*.cr` or `shard.yml` files are present (default)\n+- template: `string` - A go [text/template][go-text-template] template extended with [sprig][sprig] utilizing the\n+ properties below. Defaults to `{{ .Full }}`\n+\n+## Template Properties\n+\n+- `.Full`: `string` - the full version\n+- `.Major`: `string` - is the major version\n+- `.Minor`: `string` - is the minor version\n+- `.Patch`: `string` - is the patch version\n+- `.Prerelease`: `string` - is the prerelease version\n+- `.BuildMetadata`: `string` - is the build metadata\n+\n+[go-text-template]: https://golang.org/pkg/text/template/\n+[sprig]: https://masterminds.github.io/sprig/\ndiff --git a/docs/docs/segment-dart.md b/docs/docs/segment-dart.md\nindex ddfe247..9eb1d0e 100644\n--- a/docs/docs/segment-dart.md\n+++ b/docs/docs/segment-dart.md\n@@ -33,3 +33,17 @@ Display the currently active dart version.\n - `always`: the segment is always displayed\n - `files`: the segment is only displayed when `*.dart`, `pubspec.yaml`, `pubspec.yml`, `pubspec.lock` files or the `.dart_tool`\n folder are present (default)\n+- template: `string` - A go [text/template][go-text-template] template extended with [sprig][sprig] utilizing the\n+properties below. Defaults to `{{ .Full }}`\n+\n+## Template Properties\n+\n+- `.Full`: `string` - the full version\n+- `.Major`: `string` - is the major version\n+- `.Minor`: `string` - is the minor version\n+- `.Patch`: `string` - is the patch version\n+- `.Prerelease`: `string` - is the prerelease version\n+- `.BuildMetadata`: `string` - is the build metadata\n+\n+[go-text-template]: https://golang.org/pkg/text/template/\n+[sprig]: https://masterminds.github.io/sprig/\ndiff --git a/docs/docs/segment-dotnet.md b/docs/docs/segment-dotnet.md\nindex a8300c1..83bb0c2 100644\n--- a/docs/docs/segment-dotnet.md\n+++ b/docs/docs/segment-dotnet.md\n@@ -37,12 +37,13 @@ Display the currently active .NET SDK version.\n - unsupported_version_icon: `string` - text/icon that is displayed when the active .NET SDK version (e.g., one specified\n by `global.json`) is not installed/supported - defaults to `\\uf071` (X in a rectangle box)\n - template: `string` - A go [text/template][go-text-template] template extended with [sprig][sprig] utilizing the\n-properties below. Defaults does nothing(backward compatibility).\n+properties below. Defaults to `{{ .Full }}`\n - version_url_template: `string` - A go [text/template][go-text-template] template extended\n with [sprig][sprig] utilizing the properties below. Defaults does nothing(backward compatibility).\n \n ## Template Properties\n \n+- `.Full`: `string` - the full version\n - `.Major`: `string` - is the major version\n - `.Minor`: `string` - is the minor version\n - `.Patch`: `string` - is the patch version\ndiff --git a/docs/docs/segment-golang.md b/docs/docs/segment-golang.md\nindex 10321d3..7790269 100644\n--- a/docs/docs/segment-golang.md\n+++ b/docs/docs/segment-golang.md\n@@ -32,3 +32,14 @@ Display the currently active golang version.\n - display_mode: `string` - determines when the segment is displayed\n - `always`: the segment is always displayed\n - `files`: the segment is only displayed when `*.go` or `go.mod` files are present (default)\n+- template: `string` - A go [text/template][go-text-template] template extended with [sprig][sprig] utilizing the\n+properties below. Defaults to `{{ .Full }}`\n+\n+## Template Properties\n+\n+- `.Full`: `string` - the full version\n+- `.Major`: `string` - is the major version\n+- `.Minor`: `string` - is the minor version\n+- `.Patch`: `string` - is the patch version\n+- `.Prerelease`: `string` - is the prerelease version\n+- `.BuildMetadata`: `string` - is the build metadata\ndiff --git a/docs/docs/segment-java.md b/docs/docs/segment-java.md\nindex f4cc85d..c13c3e0 100644\n--- a/docs/docs/segment-java.md\n+++ b/docs/docs/segment-java.md\n@@ -45,3 +45,14 @@ Display the currently active java version.\n - `*.jar`\n - `*.clj`\n - `*.cljc`\n+- template: `string` - A go [text/template][go-text-template] template extended with [sprig][sprig] utilizing the\n+properties below. Defaults to `{{ .Full }}`\n+\n+## Template Properties\n+\n+- `.Full`: `string` - the full version\n+- `.Major`: `string` - is the major version\n+- `.Minor`: `string` - is the minor version\n+- `.Patch`: `string` - is the patch version\n+- `.Prerelease`: `string` - is the prerelease version\n+- `.BuildMetadata`: `string` - is the build metadata\ndiff --git a/docs/docs/segment-julia.md b/docs/docs/segment-julia.md\nindex 4b75608..3a4a0ec 100644\n--- a/docs/docs/segment-julia.md\n+++ b/docs/docs/segment-julia.md\n@@ -32,3 +32,17 @@ Display the currently active julia version.\n - display_mode: `string` - determines when the segment is displayed\n - `always`: the segment is always displayed\n - `files`: the segment is only displayed when `*.jl` files are present (default)\n+- template: `string` - A go [text/template][go-text-template] template extended with [sprig][sprig] utilizing the\n+properties below. Defaults to `{{ .Full }}`\n+\n+## Template Properties\n+\n+- `.Full`: `string` - the full version\n+- `.Major`: `string` - is the major version\n+- `.Minor`: `string` - is the minor version\n+- `.Patch`: `string` - is the patch version\n+- `.Prerelease`: `string` - is the prerelease version\n+- `.BuildMetadata`: `string` - is the build metadata\n+\n+[go-text-template]: https://golang.org/pkg/text/template/\n+[sprig]: https://masterminds.github.io/sprig/\ndiff --git a/docs/docs/segment-node.md b/docs/docs/segment-node.md\nindex 04d5963..ced7d23 100644\n--- a/docs/docs/segment-node.md\n+++ b/docs/docs/segment-node.md\n@@ -40,3 +40,17 @@ segment's background or foreground color\n - display_package_manager: `boolean` - show whether the current project uses Yarn or NPM - defaults to `false`\n - yarn_icon: `string` - the icon/text to display when using Yarn - defaults to ` \\uF61A`\n - npm_icon: `string` - the icon/text to display when using NPM - defaults to ` \\uE71E`\n+- template: `string` - A go [text/template][go-text-template] template extended with [sprig][sprig] utilizing the\n+properties below. Defaults to `{{ .Full }}`\n+\n+## Template Properties\n+\n+- `.Full`: `string` - the full version\n+- `.Major`: `string` - is the major version\n+- `.Minor`: `string` - is the minor version\n+- `.Patch`: `string` - is the patch version\n+- `.Prerelease`: `string` - is the prerelease version\n+- `.BuildMetadata`: `string` - is the build metadata\n+\n+[go-text-template]: https://golang.org/pkg/text/template/\n+[sprig]: https://masterminds.github.io/sprig/\ndiff --git a/docs/docs/segment-php.md b/docs/docs/segment-php.md\nindex a7b05aa..47b8ea4 100644\n--- a/docs/docs/segment-php.md\n+++ b/docs/docs/segment-php.md\n@@ -34,3 +34,17 @@ Display the currently active php version.\n - `always`: the segment is always displayed\n - `files`: the segment is only displayed when `*.php, composer.json, composer.lock, .php-version` files are present (default)\n - enable_hyperlink: `bool` - display an hyperlink to the php release notes - defaults to `false`\n+- template: `string` - A go [text/template][go-text-template] template extended with [sprig][sprig] utilizing the\n+properties below. Defaults to `{{ .Full }}`\n+\n+## Template Properties\n+\n+- `.Full`: `string` - the full version\n+- `.Major`: `string` - is the major version\n+- `.Minor`: `string` - is the minor version\n+- `.Patch`: `string` - is the patch version\n+- `.Prerelease`: `string` - is the prerelease version\n+- `.BuildMetadata`: `string` - is the build metadata\n+\n+[go-text-template]: https://golang.org/pkg/text/template/\n+[sprig]: https://masterminds.github.io/sprig/\ndiff --git a/docs/docs/segment-python.md b/docs/docs/segment-python.md\nindex 80fa718..13bd1f8 100644\n--- a/docs/docs/segment-python.md\n+++ b/docs/docs/segment-python.md\n@@ -39,3 +39,17 @@ or not - defaults to `true`\n files are present (default)\n - `environment`: the segment is only displayed when a virtual env is present\n - `context`: the segment is only displayed when either `environment` or `files` is active\n+- template: `string` - A go [text/template][go-text-template] template extended with [sprig][sprig] utilizing the\n+properties below. Defaults to `{{ .Full }}`\n+\n+## Template Properties\n+\n+- `.Full`: `string` - the full version\n+- `.Major`: `string` - is the major version\n+- `.Minor`: `string` - is the minor version\n+- `.Patch`: `string` - is the patch version\n+- `.Prerelease`: `string` - is the prerelease version\n+- `.BuildMetadata`: `string` - is the build metadata\n+\n+[go-text-template]: https://golang.org/pkg/text/template/\n+[sprig]: https://masterminds.github.io/sprig/\ndiff --git a/docs/docs/segment-ruby.md b/docs/docs/segment-ruby.md\nindex e64fcf7..5d812f6 100644\n--- a/docs/docs/segment-ruby.md\n+++ b/docs/docs/segment-ruby.md\n@@ -32,3 +32,17 @@ Display the currently active ruby version.\n - display_mode: `string` - determines when the segment is displayed\n - `always`: the segment is always displayed\n - `files`: the segment is only displayed when `*.rb`, `Gemfile` or `Rakefile` files are present (default)\n+- template: `string` - A go [text/template][go-text-template] template extended with [sprig][sprig] utilizing the\n+properties below. Defaults to `{{ .Full }}`\n+\n+## Template Properties\n+\n+- `.Full`: `string` - the full version\n+- `.Major`: `string` - is the major version\n+- `.Minor`: `string` - is the minor version\n+- `.Patch`: `string` - is the patch version\n+- `.Prerelease`: `string` - is the prerelease version\n+- `.BuildMetadata`: `string` - is the build metadata\n+\n+[go-text-template]: https://golang.org/pkg/text/template/\n+[sprig]: https://masterminds.github.io/sprig/\ndiff --git a/docs/docs/segment-rust.md b/docs/docs/segment-rust.md\nindex 30c222d..c0f2a43 100644\n--- a/docs/docs/segment-rust.md\n+++ b/docs/docs/segment-rust.md\n@@ -32,3 +32,17 @@ Display the currently active rust version.\n - display_mode: `string` - determines when the segment is displayed\n - `always`: the segment is always displayed\n - `files`: the segment is only displayed when `*.rs`, `Cargo.toml` or `Cargo.lock` files are present (default)\n+- template: `string` - A go [text/template][go-text-template] template extended with [sprig][sprig] utilizing the\n+properties below. Defaults to `{{ .Full }}`\n+\n+## Template Properties\n+\n+- `.Full`: `string` - the full version\n+- `.Major`: `string` - is the major version\n+- `.Minor`: `string` - is the minor version\n+- `.Patch`: `string` - is the patch version\n+- `.Prerelease`: `string` - is the prerelease version\n+- `.BuildMetadata`: `string` - is the build metadata\n+\n+[go-text-template]: https://golang.org/pkg/text/template/\n+[sprig]: https://masterminds.github.io/sprig/\ndiff --git a/src/segment_language.go b/src/segment_language.go\nindex d9ced7b..2cfffa8 100644\n--- a/src/segment_language.go\n+++ b/src/segment_language.go\n@@ -97,7 +97,7 @@ func (l *language) string() string {\n \t\treturn \"\"\n \t}\n \n-\tsegmentTemplate := l.props.getString(SegmentTemplate, \"{{.Full}}\")\n+\tsegmentTemplate := l.props.getString(SegmentTemplate, \"{{ .Full }}\")\n \ttemplate := &textTemplate{\n \t\tTemplate: segmentTemplate,\n \t\tContext: l.version,\n"]
1
["3a4e21c36d76b4bea8dbb365d3c3bd005a7f3f8f"]
["docs"]
skip if related view/hook/column of a filter is not found Signed-off-by: Pranav C <[email protected]>
["diff --git a/packages/nocodb/src/lib/version-upgrader/ncFilterUpgrader.ts b/packages/nocodb/src/lib/version-upgrader/ncFilterUpgrader.ts\nindex 1515f88..6c250bd 100644\n--- a/packages/nocodb/src/lib/version-upgrader/ncFilterUpgrader.ts\n+++ b/packages/nocodb/src/lib/version-upgrader/ncFilterUpgrader.ts\n@@ -21,7 +21,13 @@ export default async function ({ ncMeta }: NcUpgraderCtx) {\n } else {\n continue;\n }\n- if (filter.project_id != model.project_id) {\n+\n+ // skip if related model is not found\n+ if (!model) {\n+ continue;\n+ }\n+\n+ if (filter.project_id !== model.project_id) {\n await ncMeta.metaUpdate(\n null,\n null,\n"]
1
["ab1e60a97c6d5c688dacbd23bca40cb8f20c4ac3"]
["fix"]
bundle and tree shake assets with webpack
["diff --git a/package.json b/package.json\nindex c8051d2..b0a97fb 100644\n--- a/package.json\n+++ b/package.json\n@@ -60,6 +60,7 @@\n \"babel-cli\": \"^6.16.0\",\n \"babel-core\": \"^6.16.0\",\n \"babel-eslint\": \"^7.0.0\",\n+ \"babel-loader\": \"^6.2.5\",\n \"babel-plugin-transform-class-properties\": \"^6.10.2\",\n \"babel-plugin-transform-flow-strip-types\": \"^6.14.0\",\n \"babel-preset-es2015-node6\": \"^0.3.0\",\n@@ -82,6 +83,7 @@\n \"eslint-plugin-react\": \"^6.3.0\",\n \"flow-bin\": \"^0.33.0\",\n \"jsdom\": \"^9.4.2\",\n+ \"json-loader\": \"^0.5.4\",\n \"jsx-chai\": \"^4.0.0\",\n \"mocha\": \"^3.0.2\",\n \"mock-require\": \"^1.3.0\",\n@@ -91,6 +93,8 @@\n \"rimraf\": \"^2.5.2\",\n \"sinon\": \"^1.17.6\",\n \"sinon-chai\": \"^2.8.0\",\n- \"watch\": \"^1.0.0\"\n+ \"source-map-support\": \"^0.4.3\",\n+ \"watch\": \"^1.0.0\",\n+ \"webpack\": \"^1.13.2\"\n }\n }\ndiff --git a/webpack.config.js b/webpack.config.js\nnew file mode 100644\nindex 0000000..0ca6da1\n--- /dev/null\n+++ b/webpack.config.js\n@@ -0,0 +1,44 @@\n+const webpack = require('webpack');\n+const path = require('path');\n+const fs = require('fs');\n+\n+const nodeModules = {\n+ zmq: 'commonjs zmq',\n+ jmp: 'commonjs jmp',\n+ github: 'commonjs github',\n+};\n+\n+module.exports = {\n+ entry: './src/notebook/index.js',\n+ target: 'electron-renderer',\n+ output: {\n+ path: path.join(__dirname, 'app', 'build'),\n+ filename: 'webpacked-notebook.js'\n+ },\n+ module: {\n+ loaders: [\n+ { test: /\\.js$/, exclude: /node_modules/, loaders: ['babel'] },\n+ { test: /\\.json$/, loader: 'json-loader' },\n+ ]\n+ },\n+ resolve: {\n+ extensions: ['', '.js', '.jsx'],\n+ root: path.join(__dirname, 'app'),\n+ // Webpack 1\n+ modulesDirectories: [\n+ path.resolve(__dirname, 'app', 'node_modules'),\n+ path.resolve(__dirname, 'node_modules'),\n+ ],\n+ // Webpack 2\n+ modules: [\n+ path.resolve(__dirname, 'app', 'node_modules'),\n+ ],\n+ },\n+ externals: nodeModules,\n+ plugins: [\n+ new webpack.IgnorePlugin(/\\.(css|less)$/),\n+ new webpack.BannerPlugin('require(\"source-map-support\").install();',\n+ { raw: true, entryOnly: false })\n+ ],\n+ devtool: 'sourcemap'\n+};\n"]
1
["4ab28fc2e63e975a0c77e18ae644f34fa5f8771a"]
["build"]
remove sync ts check
["diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js\nindex 8b23fba..58a4c17 100644\n--- a/config/webpack.config.prod.js\n+++ b/config/webpack.config.prod.js\n@@ -251,7 +251,7 @@ module.exports = {\n plugins: [\n argv.notypecheck\n ? null\n- : new ForkTsCheckerWebpackPlugin({tslint: true, async: false}),\n+ : new ForkTsCheckerWebpackPlugin({tslint: true}),\n // Makes some environment variables available in index.html.\n // The public URL is available as %PUBLIC_URL% in index.html, e.g.:\n // <link rel=\"shortcut icon\" href=\"%PUBLIC_URL%/favicon.ico\">\n"]
1
["411be831591b2ea15ca9138eaf8db81f51b5101e"]
["build"]
support react@17 in peer deps resolves #1478
["diff --git a/packages/animated/package.json b/packages/animated/package.json\nindex 2249a2f..e35a1fd 100644\n--- a/packages/animated/package.json\n+++ b/packages/animated/package.json\n@@ -33,6 +33,6 @@\n \"react-layout-effect\": \"^1.0.1\"\n },\n \"peerDependencies\": {\n- \"react\": \">=16.8\"\n+ \"react\": \"^16.8.0 || ^17.0.0\"\n }\n }\ndiff --git a/packages/core/package.json b/packages/core/package.json\nindex 584bbc2..c934253 100644\n--- a/packages/core/package.json\n+++ b/packages/core/package.json\n@@ -36,7 +36,7 @@\n \"react-layout-effect\": \"^1.0.1\"\n },\n \"peerDependencies\": {\n- \"react\": \">=16.8\"\n+ \"react\": \"^16.8.0 || ^17.0.0\"\n },\n \"devDependencies\": {\n \"rafz\": \"^0.1.13\"\ndiff --git a/packages/parallax/package.json b/packages/parallax/package.json\nindex 49f8391..5a181fe 100644\n--- a/packages/parallax/package.json\n+++ b/packages/parallax/package.json\n@@ -31,6 +31,6 @@\n \"@react-spring/web\": \"~9.2.0-beta.0\"\n },\n \"peerDependencies\": {\n- \"react\": \">=16.8\"\n+ \"react\": \"^16.8.0 || ^17.0.0\"\n }\n }\ndiff --git a/packages/shared/package.json b/packages/shared/package.json\nindex 67d286c..12f7db3 100644\n--- a/packages/shared/package.json\n+++ b/packages/shared/package.json\n@@ -33,6 +33,6 @@\n \"rafz\": \"^0.1.13\"\n },\n \"peerDependencies\": {\n- \"react\": \">=16.8\"\n+ \"react\": \"^16.8.0 || ^17.0.0\"\n }\n }\ndiff --git a/targets/konva/package.json b/targets/konva/package.json\nindex 17675ac..271d58c 100644\n--- a/targets/konva/package.json\n+++ b/targets/konva/package.json\n@@ -34,7 +34,7 @@\n },\n \"peerDependencies\": {\n \"konva\": \">=2.6\",\n- \"react\": \">=16.8\",\n+ \"react\": \"^16.8.0 || ^17.0.0\",\n \"react-konva\": \">=16.8\"\n },\n \"devDependencies\": {\ndiff --git a/targets/native/package.json b/targets/native/package.json\nindex e97aa97..802a66c 100644\n--- a/targets/native/package.json\n+++ b/targets/native/package.json\n@@ -33,7 +33,7 @@\n \"@react-spring/types\": \"~9.2.0-beta.0\"\n },\n \"peerDependencies\": {\n- \"react\": \">=16.8\",\n+ \"react\": \"^16.8.0 || ^17.0.0\",\n \"react-native\": \">=0.58\"\n },\n \"devDependencies\": {\ndiff --git a/targets/web/package.json b/targets/web/package.json\nindex d74c25c..f7ac000 100644\n--- a/targets/web/package.json\n+++ b/targets/web/package.json\n@@ -33,7 +33,7 @@\n \"@react-spring/types\": \"~9.2.0-beta.0\"\n },\n \"peerDependencies\": {\n- \"react\": \">=16.8\",\n+ \"react\": \"^16.8.0 || ^17.0.0\",\n \"react-dom\": \">=16.8\"\n }\n }\ndiff --git a/targets/zdog/package.json b/targets/zdog/package.json\nindex aa57890..f65945a 100644\n--- a/targets/zdog/package.json\n+++ b/targets/zdog/package.json\n@@ -33,7 +33,7 @@\n \"@react-spring/types\": \"~9.2.0-beta.0\"\n },\n \"peerDependencies\": {\n- \"react\": \">=16.8\",\n+ \"react\": \"^16.8.0 || ^17.0.0\",\n \"react-dom\": \">=16.8\",\n \"react-zdog\": \">=1.0\",\n \"zdog\": \">=1.0\"\n"]
1
["27169897c0e58bc4fbca724f290ad54fa39abec7"]
["build"]
group example
["diff --git a/src/build/arg_group.rs b/src/build/arg_group.rs\nindex 5201e97..e1b1991 100644\n--- a/src/build/arg_group.rs\n+++ b/src/build/arg_group.rs\n@@ -43,7 +43,7 @@ use crate::util::{Id, Key};\n /// .arg(\"--minor 'auto increase minor'\")\n /// .arg(\"--patch 'auto increase patch'\")\n /// .group(ArgGroup::with_name(\"vers\")\n-/// .args(&[\"set-ver\", \"major\", \"minor\",\"patch\"])\n+/// .args(&[\"set-ver\", \"major\", \"minor\", \"patch\"])\n /// .required(true))\n /// .try_get_matches_from(vec![\"app\", \"--major\", \"--patch\"]);\n /// // Because we used two args in the group it's an error\n"]
1
["9849430b11b92ae58d94cfe4d0b06313c7eab550"]
["docs"]
do not pin time in tests but only skip ahead related to #573
["diff --git a/qa/integration-tests/src/test/java/io/zeebe/broker/it/startup/BrokerRecoveryTest.java b/qa/integration-tests/src/test/java/io/zeebe/broker/it/startup/BrokerRecoveryTest.java\nindex 636cd21..76afff7 100644\n--- a/qa/integration-tests/src/test/java/io/zeebe/broker/it/startup/BrokerRecoveryTest.java\n+++ b/qa/integration-tests/src/test/java/io/zeebe/broker/it/startup/BrokerRecoveryTest.java\n@@ -15,7 +15,9 @@\n */\n package io.zeebe.broker.it.startup;\n \n-import static io.zeebe.broker.it.util.TopicEventRecorder.*;\n+import static io.zeebe.broker.it.util.TopicEventRecorder.incidentEvent;\n+import static io.zeebe.broker.it.util.TopicEventRecorder.taskEvent;\n+import static io.zeebe.broker.it.util.TopicEventRecorder.wfInstanceEvent;\n import static io.zeebe.test.util.TestUtil.doRepeatedly;\n import static io.zeebe.test.util.TestUtil.waitUntil;\n import static org.assertj.core.api.Assertions.assertThat;\n@@ -24,11 +26,18 @@ import java.io.File;\n import java.io.InputStream;\n import java.nio.charset.StandardCharsets;\n import java.time.Duration;\n-import java.time.Instant;\n import java.util.Collections;\n import java.util.List;\n import java.util.regex.Pattern;\n \n+import org.assertj.core.util.Files;\n+import org.junit.After;\n+import org.junit.Rule;\n+import org.junit.Test;\n+import org.junit.rules.ExpectedException;\n+import org.junit.rules.RuleChain;\n+import org.junit.rules.TemporaryFolder;\n+\n import io.zeebe.broker.clustering.ClusterServiceNames;\n import io.zeebe.broker.it.ClientRule;\n import io.zeebe.broker.it.EmbeddedBrokerRule;\n@@ -38,7 +47,9 @@ import io.zeebe.client.ZeebeClient;\n import io.zeebe.client.clustering.impl.TopicLeader;\n import io.zeebe.client.clustering.impl.TopologyResponse;\n import io.zeebe.client.cmd.ClientCommandRejectedException;\n-import io.zeebe.client.event.*;\n+import io.zeebe.client.event.DeploymentEvent;\n+import io.zeebe.client.event.TaskEvent;\n+import io.zeebe.client.event.WorkflowInstanceEvent;\n import io.zeebe.model.bpmn.Bpmn;\n import io.zeebe.model.bpmn.instance.WorkflowDefinition;\n import io.zeebe.raft.Raft;\n@@ -48,9 +59,6 @@ import io.zeebe.test.util.TestFileUtil;\n import io.zeebe.test.util.TestUtil;\n import io.zeebe.transport.SocketAddress;\n import io.zeebe.util.time.ClockUtil;\n-import org.assertj.core.util.Files;\n-import org.junit.*;\n-import org.junit.rules.*;\n \n public class BrokerRecoveryTest\n {\n@@ -360,17 +368,12 @@ public class BrokerRecoveryTest\n waitUntil(() -> !recordingTaskHandler.getHandledTasks().isEmpty());\n \n // when\n- restartBroker(() ->\n- {\n- final Instant now = ClockUtil.getCurrentTime();\n- ClockUtil.setCurrentTime(now.plusSeconds(60));\n- });\n+ restartBroker(() -> ClockUtil.addTime(Duration.ofSeconds(60)));\n \n // wait until stream processor and scheduler process the lock task event which is not re-processed on recovery\n doRepeatedly(() ->\n {\n- final Instant now = ClockUtil.getCurrentTime();\n- ClockUtil.setCurrentTime(now.plusSeconds(60));\n+ ClockUtil.addTime(Duration.ofSeconds(60)); // retriggers lock expiration check in broker\n return null;\n }).until(t -> eventRecorder.hasTaskEvent(taskEvent(\"LOCK_EXPIRED\")));\n \ndiff --git a/qa/integration-tests/src/test/java/io/zeebe/broker/it/startup/BrokerRestartTest.java b/qa/integration-tests/src/test/java/io/zeebe/broker/it/startup/BrokerRestartTest.java\nindex 5ff1301..0ffe98d 100644\n--- a/qa/integration-tests/src/test/java/io/zeebe/broker/it/startup/BrokerRestartTest.java\n+++ b/qa/integration-tests/src/test/java/io/zeebe/broker/it/startup/BrokerRestartTest.java\n@@ -15,7 +15,9 @@\n */\n package io.zeebe.broker.it.startup;\n \n-import static io.zeebe.broker.it.util.TopicEventRecorder.*;\n+import static io.zeebe.broker.it.util.TopicEventRecorder.incidentEvent;\n+import static io.zeebe.broker.it.util.TopicEventRecorder.taskEvent;\n+import static io.zeebe.broker.it.util.TopicEventRecorder.wfInstanceEvent;\n import static io.zeebe.test.util.TestUtil.waitUntil;\n import static org.assertj.core.api.Assertions.assertThat;\n \n@@ -23,11 +25,18 @@ import java.io.File;\n import java.io.InputStream;\n import java.nio.charset.StandardCharsets;\n import java.time.Duration;\n-import java.time.Instant;\n import java.util.Collections;\n import java.util.List;\n import java.util.regex.Pattern;\n \n+import org.junit.After;\n+import org.junit.Rule;\n+import org.junit.Test;\n+import org.junit.experimental.categories.Category;\n+import org.junit.rules.ExpectedException;\n+import org.junit.rules.RuleChain;\n+import org.junit.rules.TemporaryFolder;\n+\n import io.zeebe.broker.clustering.ClusterServiceNames;\n import io.zeebe.broker.it.ClientRule;\n import io.zeebe.broker.it.EmbeddedBrokerRule;\n@@ -37,7 +46,9 @@ import io.zeebe.client.ZeebeClient;\n import io.zeebe.client.clustering.impl.TopicLeader;\n import io.zeebe.client.clustering.impl.TopologyResponse;\n import io.zeebe.client.cmd.ClientCommandRejectedException;\n-import io.zeebe.client.event.*;\n+import io.zeebe.client.event.DeploymentEvent;\n+import io.zeebe.client.event.TaskEvent;\n+import io.zeebe.client.event.WorkflowInstanceEvent;\n import io.zeebe.model.bpmn.Bpmn;\n import io.zeebe.model.bpmn.instance.WorkflowDefinition;\n import io.zeebe.raft.Raft;\n@@ -47,9 +58,6 @@ import io.zeebe.test.util.TestFileUtil;\n import io.zeebe.test.util.TestUtil;\n import io.zeebe.transport.SocketAddress;\n import io.zeebe.util.time.ClockUtil;\n-import org.junit.*;\n-import org.junit.experimental.categories.Category;\n-import org.junit.rules.*;\n \n public class BrokerRestartTest\n {\n@@ -360,11 +368,7 @@ public class BrokerRestartTest\n waitUntil(() -> !recordingTaskHandler.getHandledTasks().isEmpty());\n \n // when\n- restartBroker(() ->\n- {\n- final Instant now = ClockUtil.getCurrentTime();\n- ClockUtil.setCurrentTime(now.plusSeconds(60));\n- });\n+ restartBroker(() -> ClockUtil.addTime(Duration.ofSeconds(60)));\n \n waitUntil(() -> eventRecorder.hasTaskEvent(taskEvent(\"LOCK_EXPIRED\")));\n recordingTaskHandler.clear();\ndiff --git a/qa/integration-tests/src/test/java/io/zeebe/broker/it/task/TaskSubscriptionTest.java b/qa/integration-tests/src/test/java/io/zeebe/broker/it/task/TaskSubscriptionTest.java\nindex 49b527d..a322fbe 100644\n--- a/qa/integration-tests/src/test/java/io/zeebe/broker/it/task/TaskSubscriptionTest.java\n+++ b/qa/integration-tests/src/test/java/io/zeebe/broker/it/task/TaskSubscriptionTest.java\n@@ -353,7 +353,7 @@ public class TaskSubscriptionTest\n waitUntil(() -> taskHandler.getHandledTasks().size() == 1);\n \n // when\n- ClockUtil.setCurrentTime(Instant.now().plus(Duration.ofMinutes(5)));\n+ ClockUtil.addTime(Duration.ofMinutes(5));\n \n // then\n waitUntil(() -> taskHandler.getHandledTasks().size() == 2);\n"]
1
["7ece3a9a16780dc6c633bbd903d36ce0aefd6a8a"]
["test"]
#972 External links open in the same tab
["diff --git a/kofta/src/app/components/Footer.tsx b/kofta/src/app/components/Footer.tsx\nindex c55fae9..940f7ac 100644\n--- a/kofta/src/app/components/Footer.tsx\n+++ b/kofta/src/app/components/Footer.tsx\n@@ -13,14 +13,14 @@ export const Footer: React.FC<FooterProps> = ({ isLogin }) => {\n return (\n <div className={`justify-between flex text-center`}>\n {isLogin ? (\n- <RegularAnchor href=\"https://www.youtube.com/watch?v=hy-EhJ_tTQo\">\n+ <RegularAnchor href=\"https://www.youtube.com/watch?v=hy-EhJ_tTQo\" target=\"_blank\">\n {t(\"footer.link_1\")}\n </RegularAnchor>\n ) : null}\n- <RegularAnchor href=\"https://discord.gg/wCbKBZF9cV\">\n+ <RegularAnchor href=\"https://discord.gg/wCbKBZF9cV\" target=\"_blank\">\n {t(\"footer.link_2\")}\n </RegularAnchor>\n- <RegularAnchor href=\"https://github.com/benawad/dogehouse/issues\">\n+ <RegularAnchor href=\"https://github.com/benawad/dogehouse/issues\" target=\"_blank\">\n {t(\"footer.link_3\")}\n </RegularAnchor>\n {/* cramps footer on mobile @todo think about how to incorporate this without cramping footer and making the footer really tall */}\ndiff --git a/kofta/src/app/pages/Login.tsx b/kofta/src/app/pages/Login.tsx\nindex 3854b5d..1f06220 100644\n--- a/kofta/src/app/pages/Login.tsx\n+++ b/kofta/src/app/pages/Login.tsx\n@@ -46,6 +46,7 @@ export const Login: React.FC<LoginProps> = () => {\n <a\n href=\"https://github.com/benawad/dogehouse\"\n className={`p-0 text-blue-400`}\n+ target=\"_blank\"\n >\n {t(\"pages.login.featureText_4\")}\n </a>\n"]
1
["07452180fee89e98f05e1aeca68f9923d4c7ab63"]
["fix"]
add unit test for query API
["diff --git a/gateway/src/test/java/io/camunda/zeebe/gateway/api/util/StubbedBrokerClient.java b/gateway/src/test/java/io/camunda/zeebe/gateway/api/util/StubbedBrokerClient.java\nindex 2d2d084..38261ad 100644\n--- a/gateway/src/test/java/io/camunda/zeebe/gateway/api/util/StubbedBrokerClient.java\n+++ b/gateway/src/test/java/io/camunda/zeebe/gateway/api/util/StubbedBrokerClient.java\n@@ -25,6 +25,7 @@ import java.util.HashMap;\n import java.util.List;\n import java.util.Map;\n import java.util.concurrent.CompletableFuture;\n+import java.util.concurrent.TimeUnit;\n import java.util.function.Consumer;\n \n public final class StubbedBrokerClient implements BrokerClient {\n@@ -67,7 +68,15 @@ public final class StubbedBrokerClient implements BrokerClient {\n @Override\n public <T> CompletableFuture<BrokerResponse<T>> sendRequestWithRetry(\n final BrokerRequest<T> request, final Duration requestTimeout) {\n- throw new UnsupportedOperationException(\"not implemented\");\n+ final CompletableFuture<BrokerResponse<T>> result = new CompletableFuture<>();\n+\n+ sendRequestWithRetry(\n+ request,\n+ (key, response) ->\n+ result.complete(new BrokerResponse<>(response, Protocol.decodePartitionId(key), key)),\n+ result::completeExceptionally);\n+\n+ return result.orTimeout(requestTimeout.toNanos(), TimeUnit.NANOSECONDS);\n }\n \n @Override\ndiff --git a/gateway/src/test/java/io/camunda/zeebe/gateway/query/QueryApiTest.java b/gateway/src/test/java/io/camunda/zeebe/gateway/query/QueryApiTest.java\nnew file mode 100644\nindex 0000000..ec9ec80\n--- /dev/null\n+++ b/gateway/src/test/java/io/camunda/zeebe/gateway/query/QueryApiTest.java\n@@ -0,0 +1,91 @@\n+/*\n+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH under\n+ * one or more contributor license agreements. See the NOTICE file distributed\n+ * with this work for additional information regarding copyright ownership.\n+ * Licensed under the Zeebe Community License 1.1. You may not use this file\n+ * except in compliance with the Zeebe Community License 1.1.\n+ */\n+package io.camunda.zeebe.gateway.query;\n+\n+import static org.assertj.core.api.Assertions.assertThat;\n+\n+import io.camunda.zeebe.gateway.api.util.GatewayTest;\n+import io.camunda.zeebe.gateway.cmd.BrokerErrorException;\n+import io.camunda.zeebe.gateway.impl.broker.response.BrokerError;\n+import io.camunda.zeebe.gateway.impl.broker.response.BrokerErrorResponse;\n+import io.camunda.zeebe.gateway.impl.broker.response.BrokerResponse;\n+import io.camunda.zeebe.gateway.query.impl.QueryApiImpl;\n+import io.camunda.zeebe.protocol.Protocol;\n+import io.camunda.zeebe.protocol.record.ErrorCode;\n+import java.time.Duration;\n+import java.util.concurrent.CompletionStage;\n+import java.util.concurrent.ExecutionException;\n+import org.junit.Test;\n+import org.junit.runner.RunWith;\n+import org.junit.runners.Parameterized;\n+import org.junit.runners.Parameterized.Parameter;\n+import org.junit.runners.Parameterized.Parameters;\n+\n+@RunWith(Parameterized.class)\n+public final class QueryApiTest extends GatewayTest {\n+ @Parameter(0)\n+ public String name;\n+\n+ @Parameter(1)\n+ public Querier querier;\n+\n+ @Parameters(name = \"{index}: {0}\")\n+ public static Object[][] queries() {\n+ return new Object[][] {\n+ new Object[] {\"getBpmnProcessIdForProcess\", (Querier) QueryApi::getBpmnProcessIdFromProcess},\n+ new Object[] {\n+ \"getBpmnProcessIdForProcessInstance\",\n+ (Querier) QueryApi::getBpmnProcessIdFromProcessInstance\n+ },\n+ new Object[] {\"getBpmnProcessIdForProcessJob\", (Querier) QueryApi::getBpmnProcessIdFromJob},\n+ };\n+ }\n+\n+ @Test\n+ public void shouldGetBpmnProcessId() {\n+ // given\n+ final var key = Protocol.encodePartitionId(1, 1);\n+ final var api = new QueryApiImpl(brokerClient);\n+ final var timeout = Duration.ofSeconds(5);\n+ final var stub = new QueryStub(new BrokerResponse<>(\"myProcess\", 1, 1));\n+ stub.registerWith(brokerClient);\n+\n+ // when\n+ final var result = querier.query(api, key, timeout);\n+\n+ // then\n+ assertThat(result).succeedsWithin(timeout).isEqualTo(\"myProcess\");\n+ }\n+\n+ @Test\n+ public void shouldCompleteExceptionallyOnError() {\n+ // given\n+ final var key = Protocol.encodePartitionId(1, 1);\n+ final var api = new QueryApiImpl(brokerClient);\n+ final var timeout = Duration.ofSeconds(5);\n+ final var stub =\n+ new QueryStub(\n+ new BrokerErrorResponse<>(\n+ new BrokerError(ErrorCode.PARTITION_LEADER_MISMATCH, \"Leader mismatch\")));\n+ stub.registerWith(brokerClient);\n+\n+ // when\n+ final var result = querier.query(api, key, timeout);\n+\n+ // then\n+ assertThat(result)\n+ .failsWithin(timeout)\n+ .withThrowableOfType(ExecutionException.class)\n+ .havingRootCause()\n+ .isInstanceOf(BrokerErrorException.class);\n+ }\n+\n+ private interface Querier {\n+ CompletionStage<String> query(final QueryApi api, final long key, final Duration timeout);\n+ }\n+}\ndiff --git a/gateway/src/test/java/io/camunda/zeebe/gateway/query/QueryStub.java b/gateway/src/test/java/io/camunda/zeebe/gateway/query/QueryStub.java\nnew file mode 100644\nindex 0000000..2f8334e\n--- /dev/null\n+++ b/gateway/src/test/java/io/camunda/zeebe/gateway/query/QueryStub.java\n@@ -0,0 +1,31 @@\n+/*\n+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH under\n+ * one or more contributor license agreements. See the NOTICE file distributed\n+ * with this work for additional information regarding copyright ownership.\n+ * Licensed under the Zeebe Community License 1.1. You may not use this file\n+ * except in compliance with the Zeebe Community License 1.1.\n+ */\n+package io.camunda.zeebe.gateway.query;\n+\n+import io.camunda.zeebe.gateway.api.util.StubbedBrokerClient;\n+import io.camunda.zeebe.gateway.api.util.StubbedBrokerClient.RequestStub;\n+import io.camunda.zeebe.gateway.impl.broker.response.BrokerResponse;\n+import io.camunda.zeebe.gateway.query.impl.BrokerExecuteQuery;\n+\n+final class QueryStub implements RequestStub<BrokerExecuteQuery, BrokerResponse<String>> {\n+ private final BrokerResponse<String> response;\n+\n+ public QueryStub(final BrokerResponse<String> response) {\n+ this.response = response;\n+ }\n+\n+ @Override\n+ public void registerWith(final StubbedBrokerClient gateway) {\n+ gateway.registerHandler(BrokerExecuteQuery.class, this);\n+ }\n+\n+ @Override\n+ public BrokerResponse<String> handle(final BrokerExecuteQuery request) throws Exception {\n+ return response;\n+ }\n+}\n"]
1
["bed86aeae8dad2dd6371635cd24bf8ef3db80361"]
["test"]
README
["diff --git a/README.md b/README.md\nindex 11a24b3..56e8d2a 100644\n--- a/README.md\n+++ b/README.md\n@@ -16,7 +16,9 @@ oclif: create your own CLI\n \n # Description\n \n-This is a framework for building CLIs in Node.js. This framework was built out of the [Heroku CLI](https://cli.heroku.com) but generalized to build any custom CLI. It's designed both for simple CLIs that can be just a single file with a few flag options, or for very complex CLIs that have many commands (like git or heroku). Most CLI tools in Node are simple flag parsers but oclif is much more than that\u2014though without the overhead of making simple CLIs quick to write with minimal boilerplate.\n+This is a framework for building CLIs in Node.js. This framework was built out of the [Heroku CLI](https://cli.heroku.com) but generalized to build any custom CLI. It's designed both for simple CLIs that can be just a single file with a few flag options, or for very complex CLIs that have many commands (like git or heroku).\n+\n+Most CLI tools for Node are simple flag parsers but oclif is much more than that\u2014though without the overhead of making simple CLIs quick to write with minimal boilerplate.\n \n # Features\n \n"]
1
["363f84c7da411468b4103da8e0b39ca48cfd8327"]
["docs"]
remove unnecessary `parse_json` call in `ops.StructField` impl
["diff --git a/ibis/backends/snowflake/registry.py b/ibis/backends/snowflake/registry.py\nindex cbddf8d..d5a0859 100644\n--- a/ibis/backends/snowflake/registry.py\n+++ b/ibis/backends/snowflake/registry.py\n@@ -231,7 +231,7 @@ operation_registry.update(\n ops.DateFromYMD: fixed_arity(sa.func.date_from_parts, 3),\n ops.StringToTimestamp: fixed_arity(sa.func.to_timestamp_tz, 2),\n ops.RegexExtract: fixed_arity(sa.func.regexp_substr, 3),\n- ops.RegexSearch: fixed_arity(lambda left, right: left.op('REGEXP')(right), 2),\n+ ops.RegexSearch: fixed_arity(sa.sql.operators.custom_op(\"REGEXP\"), 2),\n ops.RegexReplace: fixed_arity(sa.func.regexp_replace, 3),\n ops.ExtractMillisecond: fixed_arity(\n lambda arg: sa.cast(\n@@ -244,8 +244,7 @@ operation_registry.update(\n t.translate(op.arg), _TIMESTAMP_UNITS_TO_SCALE[op.unit]\n ),\n ops.StructField: lambda t, op: sa.cast(\n- sa.func.parse_json(sa.func.get(t.translate(op.arg), op.field)),\n- t.get_sqla_type(op.output_dtype),\n+ sa.func.get(t.translate(op.arg), op.field), t.get_sqla_type(op.output_dtype)\n ),\n ops.NthValue: _nth_value,\n }\n"]
1
["9e80231539aa307e607e2b82b35df9e09ede8385"]
["refactor"]
add gitignore.nix to dep update matrix
["diff --git a/.github/workflows/update-deps.yml b/.github/workflows/update-deps.yml\nindex e0ccd62..1236f58 100644\n--- a/.github/workflows/update-deps.yml\n+++ b/.github/workflows/update-deps.yml\n@@ -13,6 +13,7 @@ jobs:\n - nixpkgs\n - poetry2nix\n - pre-commit-hooks\n+ - gitignore.nix\n steps:\n - name: Checkout\n uses: actions/checkout@v2\n"]
1
["c444fdb9e85ce44c5c0c99addc777dd7b6085153"]
["cicd"]
fixing deploying to kubernetes Signed-off-by: Rajesh Rajendran <[email protected]>
["diff --git a/.github/workflows/frontend.yaml b/.github/workflows/frontend.yaml\nindex 7e42967..77e4abf 100644\n--- a/.github/workflows/frontend.yaml\n+++ b/.github/workflows/frontend.yaml\n@@ -22,26 +22,22 @@ jobs:\n ${{ runner.OS }}-build-\n ${{ runner.OS }}-\n \n+ - uses: azure/k8s-set-context@v1\n+ with:\n+ method: kubeconfig\n+ kubeconfig: ${{ secrets.OSS_KUBECONFIG }} # Use content of kubeconfig in secret.\n+ id: setcontext\n - name: Install\n run: npm install\n \n- - name: Build\n- run: npm run build:staging\n- env:\n- ENVIRONMENT: staging\n-\n- - name: Deploy\n- env:\n- AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}\n- AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n- AWS_REGION: eu-central-1\n- AWS_S3_BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME }}\n+ - name: Build and deploy\n run: |\n- aws configure set default.s3.signature_version s3v4\n- aws --endpoint-url https://${{secrets.DOMAIN_NAME}}/frontend/ s3 cp \\\n- --recursive \\\n- --region \"$AWS_REGION\" \\\n- public s3://$AWS_S3_BUCKET_NAME\n+ cd frontend\n+ bash build.sh\n+ cp -arl public frontend\n+ minio_pod=$(kubectl get po -n db -l app.kubernetes.io/name=minio -n db --output custom-columns=name:.metadata.name | tail -n+2)\n+ kubectl -n db cp frontend $minio_pod:/data/\n+ rm -rf frontend\n \n # - name: Debug Job\n # if: ${{ failure() }}\n"]
1
["3f2eec37f76c1ad9408e423e49fe5bfe3e17d943"]
["cicd"]
add style prop to FAB group action items. closes #475
["diff --git a/src/components/FAB/FABGroup.js b/src/components/FAB/FABGroup.js\nindex 424a178..11bd10f 100644\n--- a/src/components/FAB/FABGroup.js\n+++ b/src/components/FAB/FABGroup.js\n@@ -25,6 +25,7 @@ type Props = {\n * - `label`: optional label text\n * - `accessibilityLabel`: accessibility label for the action, uses label by default if specified\n * - `color`: custom icon color of the action item\n+ * - `style`: pass additional styles for the fab item, for example, `backgroundColor`\n * - `onPress`: callback that is called when `FAB` is pressed (required)\n */\n actions: Array<{\n@@ -32,6 +33,7 @@ type Props = {\n label?: string,\n color?: string,\n accessibilityLabel?: string,\n+ style?: any,\n onPress: () => mixed,\n }>,\n /**\n@@ -44,7 +46,7 @@ type Props = {\n */\n accessibilityLabel?: string,\n /**\n- * Custom icon color for the `FAB`.\n+ * Custom color for the `FAB`.\n */\n color?: string,\n /**\n@@ -252,9 +254,7 @@ class FABGroup extends React.Component<Props, State> {\n <Card\n style={[\n styles.label,\n- {\n- transform: [{ scale: scales[i] }],\n- },\n+ { transform: [{ scale: scales[i] }] },\n ]}\n onPress={() => {\n it.onPress();\n@@ -280,6 +280,7 @@ class FABGroup extends React.Component<Props, State> {\n transform: [{ scale: scales[i] }],\n backgroundColor: theme.colors.surface,\n },\n+ it.style,\n ]}\n onPress={() => {\n it.onPress();\n"]
1
["8b9176b44bb01a1eef497a403b0304bc389c9aee"]
["feat"]
ignore all markdown files for backend and main test suites
["diff --git a/.github/workflows/ibis-backends-skip-helper.yml b/.github/workflows/ibis-backends-skip-helper.yml\nindex efd0953..058f8b6 100644\n--- a/.github/workflows/ibis-backends-skip-helper.yml\n+++ b/.github/workflows/ibis-backends-skip-helper.yml\n@@ -7,6 +7,7 @@ on:\n paths:\n - \"docs/**\"\n - \"mkdocs.yml\"\n+ - \"**/*.md\"\n branches:\n - master\n - \"*.x.x\"\n@@ -14,6 +15,7 @@ on:\n paths:\n - \"docs/**\"\n - \"mkdocs.yml\"\n+ - \"**/*.md\"\n branches:\n - master\n - \"*.x.x\"\ndiff --git a/.github/workflows/ibis-backends.yml b/.github/workflows/ibis-backends.yml\nindex d18e62d..144562c 100644\n--- a/.github/workflows/ibis-backends.yml\n+++ b/.github/workflows/ibis-backends.yml\n@@ -3,18 +3,20 @@ name: Backends\n \n on:\n push:\n- # Skip the backend suite if all changes are in the docs directory\n+ # Skip the backend suite if all changes are docs\n paths-ignore:\n - \"docs/**\"\n - \"mkdocs.yml\"\n+ - \"**/*.md\"\n branches:\n - master\n - \"*.x.x\"\n pull_request:\n- # Skip the backend suite if all changes are in the docs directory\n+ # Skip the backend suite if all changes are docs\n paths-ignore:\n - \"docs/**\"\n - \"mkdocs.yml\"\n+ - \"**/*.md\"\n branches:\n - master\n - \"*.x.x\"\ndiff --git a/.github/workflows/ibis-main-skip-helper.yml b/.github/workflows/ibis-main-skip-helper.yml\nindex f6086e1..7d79af7 100644\n--- a/.github/workflows/ibis-main-skip-helper.yml\n+++ b/.github/workflows/ibis-main-skip-helper.yml\n@@ -7,6 +7,7 @@ on:\n paths:\n - \"docs/**\"\n - \"mkdocs.yml\"\n+ - \"**/*.md\"\n branches:\n - master\n - \"*.x.x\"\n@@ -14,6 +15,7 @@ on:\n paths:\n - \"docs/**\"\n - \"mkdocs.yml\"\n+ - \"**/*.md\"\n branches:\n - master\n - \"*.x.x\"\ndiff --git a/.github/workflows/ibis-main.yml b/.github/workflows/ibis-main.yml\nindex d5b0735..3d22bff 100644\n--- a/.github/workflows/ibis-main.yml\n+++ b/.github/workflows/ibis-main.yml\n@@ -7,6 +7,7 @@ on:\n paths-ignore:\n - \"docs/**\"\n - \"mkdocs.yml\"\n+ - \"**/*.md\"\n branches:\n - master\n - \"*.x.x\"\n@@ -15,6 +16,7 @@ on:\n paths-ignore:\n - \"docs/**\"\n - \"mkdocs.yml\"\n+ - \"**/*.md\"\n branches:\n - master\n - \"*.x.x\"\n"]
1
["370830b8c9f971fa537f42308ab5e3ff356919f8"]
["cicd"]
update pr condition
["diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml\nindex 697ca8e..23f4475 100644\n--- a/.github/workflows/release-pr.yml\n+++ b/.github/workflows/release-pr.yml\n@@ -3,7 +3,6 @@ name: release\n on:\n issue_comment:\n types: [created]\n- contains: \"/trigger release\"\n \n env:\n # 7 GiB by default on GitHub, setting to 6 GiB\n@@ -11,6 +10,7 @@ env:\n \n jobs:\n release-pr:\n+ if: ${{ github.event.issue.pull_request && github.event.comment.body == '/trigger release' }}\n permissions:\n id-token: write\n runs-on: ubuntu-latest\n"]
1
["f8c7b34bdeedcf1a4628cd50b23920afeaf57cb6"]
["cicd"]
ecma 7 ready
["diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js\nindex f7c6b23..4a00c65 100644\n--- a/config/webpack.config.prod.js\n+++ b/config/webpack.config.prod.js\n@@ -266,7 +266,7 @@ module.exports = {\n : new UglifyJsPlugin({\n uglifyOptions: {\n ie8: false,\n- ecma: 6,\n+ ecma: 7,\n compress: {\n warnings: false,\n // Disabled because of an issue with Uglify breaking seemingly valid code:\n"]
1
["6aa63c9b8d4dcdbb401743adc3c9a1020d943250"]
["build"]
updated test to use rows for action items references #279
["diff --git a/ionic/components/card/test/advanced/main.html b/ionic/components/card/test/advanced/main.html\nindex 7c56a7d..c19ea12 100644\n--- a/ionic/components/card/test/advanced/main.html\n+++ b/ionic/components/card/test/advanced/main.html\n@@ -19,16 +19,20 @@\n </p>\n </ion-card-content>\n \n- <ion-item>\n- <button clear item-left>\n- <icon star></icon>\n- Star\n- </button>\n- <button clear item-right class=\"activated\">\n- <icon share></icon>\n- Share.activated\n- </button>\n- </ion-item>\n+ <ion-row no-padding>\n+ <ion-col>\n+ <button clear small>\n+ <icon star></icon>\n+ Star\n+ </button>\n+ </ion-col>\n+ <ion-col text-right>\n+ <button clear small class=\"activated\">\n+ <icon share></icon>\n+ Share.activated\n+ </button>\n+ </ion-col>\n+ </ion-row>\n \n </ion-card>\n \n@@ -51,19 +55,24 @@\n <p>Hello. I am a paragraph.</p>\n </ion-card-content>\n \n- <ion-item>\n- <button clear item-left danger class=\"activated\">\n- <icon star></icon>\n- Favorite.activated\n- </button>\n- <button clear item-left danger>\n- <icon musical-notes></icon>\n- Listen\n- </button>\n- <ion-note item-right>\n- Right Note\n- </ion-note>\n- </ion-item>\n+ <ion-row center no-padding>\n+ <ion-col width-75>\n+ <button clear small danger class=\"activated\">\n+ <icon star></icon>\n+ Favorite.activated\n+ </button>\n+ <button clear small danger>\n+ <icon musical-notes></icon>\n+ Listen\n+ </button>\n+ </ion-col>\n+ <ion-col text-right>\n+ <button clear small>\n+ <icon share></icon>\n+ Share\n+ </button>\n+ </ion-col>\n+ </ion-row>\n </ion-card>\n \n <ion-card>\n@@ -76,20 +85,27 @@\n This card was breaking the border radius.\n </ion-card-content>\n \n- <ion-item>\n- <button clear item-left dark>\n- <icon star></icon>\n- Favorite\n- </button>\n- <button clear item-right dark>\n- <icon musical-notes></icon>\n- Listen\n- </button>\n- <button clear item-right dark>\n- <icon share-alt></icon>\n- Share\n- </button>\n- </ion-item>\n+ <ion-row text-center no-padding>\n+ <ion-col>\n+ <button clear small dark>\n+ <icon star></icon>\n+ Favorite\n+ </button>\n+ </ion-col>\n+\n+ <ion-col>\n+ <button clear small dark>\n+ <icon musical-notes></icon>\n+ Listen\n+ </button>\n+ </ion-col>\n+ <ion-col>\n+ <button clear small dark>\n+ <icon share-alt></icon>\n+ Share\n+ </button>\n+ </ion-col>\n+ </ion-row>\n \n </ion-card>\n \n"]
1
["19feaea1885eb015759b5c7a5d785521f2b8a212"]
["test"]
uses macros to implement Settings enums
["diff --git a/src/app/settings.rs b/src/app/settings.rs\nindex e0e5ed1..60584f4 100644\n--- a/src/app/settings.rs\n+++ b/src/app/settings.rs\n@@ -33,76 +33,26 @@ impl AppFlags {\n AppFlags(NEEDS_LONG_VERSION | NEEDS_LONG_HELP | NEEDS_SC_HELP | UTF8_NONE)\n }\n \n- pub fn set(&mut self, s: AppSettings) {\n- match s {\n- AppSettings::SubcommandsNegateReqs => self.0.insert(SC_NEGATE_REQS),\n- AppSettings::VersionlessSubcommands => self.0.insert(VERSIONLESS_SC),\n- AppSettings::SubcommandRequired => self.0.insert(SC_REQUIRED),\n- AppSettings::ArgRequiredElseHelp => self.0.insert(A_REQUIRED_ELSE_HELP),\n- AppSettings::GlobalVersion => self.0.insert(GLOBAL_VERSION),\n- AppSettings::UnifiedHelpMessage => self.0.insert(UNIFIED_HELP),\n- AppSettings::WaitOnError => self.0.insert(WAIT_ON_ERROR),\n- AppSettings::SubcommandRequiredElseHelp => self.0.insert(SC_REQUIRED_ELSE_HELP),\n- AppSettings::NeedsLongHelp => self.0.insert(NEEDS_LONG_HELP),\n- AppSettings::NeedsLongVersion => self.0.insert(NEEDS_LONG_VERSION),\n- AppSettings::NeedsSubcommandHelp => self.0.insert(NEEDS_SC_HELP),\n- AppSettings::DisableVersion => self.0.insert(DISABLE_VERSION),\n- AppSettings::Hidden => self.0.insert(HIDDEN),\n- AppSettings::TrailingVarArg => self.0.insert(TRAILING_VARARG),\n- AppSettings::NoBinaryName => self.0.insert(NO_BIN_NAME),\n- AppSettings::AllowExternalSubcommands => self.0.insert(ALLOW_UNK_SC),\n- AppSettings::StrictUtf8 => self.0.insert(UTF8_STRICT),\n- AppSettings::AllowInvalidUtf8 => self.0.insert(UTF8_NONE),\n- AppSettings::AllowLeadingHyphen => self.0.insert(LEADING_HYPHEN),\n- }\n- }\n-\n- pub fn unset(&mut self, s: AppSettings) {\n- match s {\n- AppSettings::SubcommandsNegateReqs => self.0.remove(SC_NEGATE_REQS),\n- AppSettings::VersionlessSubcommands => self.0.remove(VERSIONLESS_SC),\n- AppSettings::SubcommandRequired => self.0.remove(SC_REQUIRED),\n- AppSettings::ArgRequiredElseHelp => self.0.remove(A_REQUIRED_ELSE_HELP),\n- AppSettings::GlobalVersion => self.0.remove(GLOBAL_VERSION),\n- AppSettings::UnifiedHelpMessage => self.0.remove(UNIFIED_HELP),\n- AppSettings::WaitOnError => self.0.remove(WAIT_ON_ERROR),\n- AppSettings::SubcommandRequiredElseHelp => self.0.remove(SC_REQUIRED_ELSE_HELP),\n- AppSettings::NeedsLongHelp => self.0.remove(NEEDS_LONG_HELP),\n- AppSettings::NeedsLongVersion => self.0.remove(NEEDS_LONG_VERSION),\n- AppSettings::NeedsSubcommandHelp => self.0.remove(NEEDS_SC_HELP),\n- AppSettings::DisableVersion => self.0.remove(DISABLE_VERSION),\n- AppSettings::Hidden => self.0.remove(HIDDEN),\n- AppSettings::TrailingVarArg => self.0.remove(TRAILING_VARARG),\n- AppSettings::NoBinaryName => self.0.remove(NO_BIN_NAME),\n- AppSettings::AllowExternalSubcommands => self.0.remove(ALLOW_UNK_SC),\n- AppSettings::StrictUtf8 => self.0.remove(UTF8_STRICT),\n- AppSettings::AllowInvalidUtf8 => self.0.remove(UTF8_NONE),\n- AppSettings::AllowLeadingHyphen => self.0.remove(LEADING_HYPHEN),\n- }\n- }\n-\n- pub fn is_set(&self, s: AppSettings) -> bool {\n- match s {\n- AppSettings::SubcommandsNegateReqs => self.0.contains(SC_NEGATE_REQS),\n- AppSettings::VersionlessSubcommands => self.0.contains(VERSIONLESS_SC),\n- AppSettings::SubcommandRequired => self.0.contains(SC_REQUIRED),\n- AppSettings::ArgRequiredElseHelp => self.0.contains(A_REQUIRED_ELSE_HELP),\n- AppSettings::GlobalVersion => self.0.contains(GLOBAL_VERSION),\n- AppSettings::UnifiedHelpMessage => self.0.contains(UNIFIED_HELP),\n- AppSettings::WaitOnError => self.0.contains(WAIT_ON_ERROR),\n- AppSettings::SubcommandRequiredElseHelp => self.0.contains(SC_REQUIRED_ELSE_HELP),\n- AppSettings::NeedsLongHelp => self.0.contains(NEEDS_LONG_HELP),\n- AppSettings::NeedsLongVersion => self.0.contains(NEEDS_LONG_VERSION),\n- AppSettings::NeedsSubcommandHelp => self.0.contains(NEEDS_SC_HELP),\n- AppSettings::DisableVersion => self.0.contains(DISABLE_VERSION),\n- AppSettings::Hidden => self.0.contains(HIDDEN),\n- AppSettings::TrailingVarArg => self.0.contains(TRAILING_VARARG),\n- AppSettings::NoBinaryName => self.0.contains(NO_BIN_NAME),\n- AppSettings::AllowExternalSubcommands => self.0.contains(ALLOW_UNK_SC),\n- AppSettings::StrictUtf8 => self.0.contains(UTF8_STRICT),\n- AppSettings::AllowInvalidUtf8 => self.0.contains(UTF8_NONE),\n- AppSettings::AllowLeadingHyphen => self.0.contains(LEADING_HYPHEN),\n- }\n+ impl_settings! { AppSettings,\n+ SubcommandsNegateReqs => SC_NEGATE_REQS,\n+ VersionlessSubcommands => VERSIONLESS_SC,\n+ SubcommandRequired => SC_REQUIRED,\n+ ArgRequiredElseHelp => A_REQUIRED_ELSE_HELP,\n+ GlobalVersion => GLOBAL_VERSION,\n+ UnifiedHelpMessage => UNIFIED_HELP,\n+ WaitOnError => WAIT_ON_ERROR,\n+ SubcommandRequiredElseHelp => SC_REQUIRED_ELSE_HELP,\n+ NeedsLongHelp => NEEDS_LONG_HELP,\n+ NeedsLongVersion => NEEDS_LONG_VERSION,\n+ NeedsSubcommandHelp => NEEDS_SC_HELP,\n+ DisableVersion => DISABLE_VERSION,\n+ Hidden => HIDDEN,\n+ TrailingVarArg => TRAILING_VARARG,\n+ NoBinaryName => NO_BIN_NAME,\n+ AllowExternalSubcommands => ALLOW_UNK_SC,\n+ StrictUtf8 => UTF8_STRICT,\n+ AllowInvalidUtf8 => UTF8_NONE,\n+ AllowLeadingHyphen => LEADING_HYPHEN\n }\n }\n \ndiff --git a/src/args/settings.rs b/src/args/settings.rs\nindex f2f1384..effc18c 100644\n--- a/src/args/settings.rs\n+++ b/src/args/settings.rs\n@@ -21,40 +21,14 @@ impl ArgFlags {\n ArgFlags(EMPTY_VALS | USE_DELIM)\n }\n \n- pub fn set(&mut self, s: ArgSettings) {\n- match s {\n- ArgSettings::Required => self.0.insert(REQUIRED),\n- ArgSettings::Multiple => self.0.insert(MULTIPLE),\n- ArgSettings::EmptyValues => self.0.insert(EMPTY_VALS),\n- ArgSettings::Global => self.0.insert(GLOBAL),\n- ArgSettings::Hidden => self.0.insert(HIDDEN),\n- ArgSettings::TakesValue => self.0.insert(TAKES_VAL),\n- ArgSettings::UseValueDelimiter => self.0.insert(USE_DELIM),\n- }\n- }\n-\n- pub fn unset(&mut self, s: ArgSettings) {\n- match s {\n- ArgSettings::Required => self.0.remove(REQUIRED),\n- ArgSettings::Multiple => self.0.remove(MULTIPLE),\n- ArgSettings::EmptyValues => self.0.remove(EMPTY_VALS),\n- ArgSettings::Global => self.0.remove(GLOBAL),\n- ArgSettings::Hidden => self.0.remove(HIDDEN),\n- ArgSettings::TakesValue => self.0.remove(TAKES_VAL),\n- ArgSettings::UseValueDelimiter => self.0.remove(USE_DELIM),\n- }\n- }\n-\n- pub fn is_set(&self, s: ArgSettings) -> bool {\n- match s {\n- ArgSettings::Required => self.0.contains(REQUIRED),\n- ArgSettings::Multiple => self.0.contains(MULTIPLE),\n- ArgSettings::EmptyValues => self.0.contains(EMPTY_VALS),\n- ArgSettings::Global => self.0.contains(GLOBAL),\n- ArgSettings::Hidden => self.0.contains(HIDDEN),\n- ArgSettings::TakesValue => self.0.contains(TAKES_VAL),\n- ArgSettings::UseValueDelimiter => self.0.contains(USE_DELIM),\n- }\n+ impl_settings!{ArgSettings,\n+ Required => REQUIRED,\n+ Multiple => MULTIPLE,\n+ EmptyValues => EMPTY_VALS,\n+ Global => GLOBAL,\n+ Hidden => HIDDEN,\n+ TakesValue => TAKES_VAL,\n+ UseValueDelimiter => USE_DELIM\n }\n }\n \ndiff --git a/src/macros.rs b/src/macros.rs\nindex 47675ac..29d5382 100644\n--- a/src/macros.rs\n+++ b/src/macros.rs\n@@ -1,3 +1,25 @@\n+macro_rules! impl_settings {\n+ ($n:ident, $($v:ident => $c:ident),+) => {\n+ pub fn set(&mut self, s: $n) {\n+ match s {\n+ $($n::$v => self.0.insert($c)),+\n+ }\n+ }\n+\n+ pub fn unset(&mut self, s: $n) {\n+ match s {\n+ $($n::$v => self.0.remove($c)),+\n+ }\n+ }\n+\n+ pub fn is_set(&self, s: $n) -> bool {\n+ match s {\n+ $($n::$v => self.0.contains($c)),+\n+ }\n+ }\n+ };\n+}\n+\n // Convenience for writing to stderr thanks to https://github.com/BurntSushi\n macro_rules! wlnerr(\n ($($arg:tt)*) => ({\n"]
1
["86f3e3397594f8312226c5a193608a054087805c"]
["refactor"]
reorder startup steps
["diff --git a/broker/src/main/java/io/camunda/zeebe/broker/bootstrap/BrokerStartupProcess.java b/broker/src/main/java/io/camunda/zeebe/broker/bootstrap/BrokerStartupProcess.java\nindex 52fa3a9..d81c27a 100644\n--- a/broker/src/main/java/io/camunda/zeebe/broker/bootstrap/BrokerStartupProcess.java\n+++ b/broker/src/main/java/io/camunda/zeebe/broker/bootstrap/BrokerStartupProcess.java\n@@ -50,21 +50,20 @@ public final class BrokerStartupProcess {\n // must be executed before any disk space usage listeners are registered\n result.add(new DiskSpaceUsageMonitorStep());\n }\n-\n result.add(new MonitoringServerStep());\n result.add(new BrokerAdminServiceStep());\n+\n result.add(new ClusterServicesCreationStep());\n+ result.add(new ClusterServicesStep());\n \n result.add(new CommandApiServiceStep());\n result.add(new SubscriptionApiStep());\n-\n- result.add(new ClusterServicesStep());\n+ result.add(new LeaderManagementRequestHandlerStep());\n \n if (config.getGateway().isEnable()) {\n result.add(new EmbeddedGatewayServiceStep());\n }\n \n- result.add(new LeaderManagementRequestHandlerStep());\n result.add(new PartitionManagerStep());\n \n return result;\n"]
1
["3e0c4cbf91fe5efc9b93baba93e4df93ef4ab5cd"]
["refactor"]
Handle different events.
["diff --git a/src/notebook/epics/kernel-launch.js b/src/notebook/epics/kernel-launch.js\nindex 9075d7c..9f16e67 100644\n--- a/src/notebook/epics/kernel-launch.js\n+++ b/src/notebook/epics/kernel-launch.js\n@@ -113,6 +113,12 @@ export function newKernelObservable(kernelSpec: KernelInfo, cwd: string) {\n observer.error({ type: 'ERROR', payload: error, err: true });\n observer.complete();\n });\n+ spawn.on('exit', () => {\n+ observer.complete();\n+ });\n+ spawn.on('disconnect', () => {\n+ observer.complete();\n+ });\n });\n });\n }\n"]
1
["a280a52c8309465276c3509848ddcddbe19732b6"]
["fix"]
retry uploading pdb files on appveyor (#21561)
["diff --git a/appveyor.yml b/appveyor.yml\nindex 9aca21e..8b54543 100644\n--- a/appveyor.yml\n+++ b/appveyor.yml\n@@ -146,12 +146,12 @@ build_script:\n - ps: >-\n if ($env:GN_CONFIG -eq 'release') {\n python electron\\script\\zip-symbols.py\n- appveyor PushArtifact out/Default/symbols.zip\n+ appveyor-retry appveyor PushArtifact out/Default/symbols.zip\n } else {\n # It's useful to have pdb files when debugging testing builds that are\n # built on CI.\n 7z a pdb.zip out\\Default\\*.pdb\n- appveyor PushArtifact pdb.zip\n+ appveyor-retry appveyor PushArtifact pdb.zip\n }\n - python electron/script/zip_manifests/check-zip-manifest.py out/Default/dist.zip electron/script/zip_manifests/dist_zip.win.%TARGET_ARCH%.manifest\n test_script:\n"]
1
["7152173d26293f4638920b17ce2dfa8ae995193b"]
["cicd"]
replace tuple with record
["diff --git a/engine/src/main/java/io/camunda/zeebe/engine/processing/processinstance/CreateProcessInstanceProcessor.java b/engine/src/main/java/io/camunda/zeebe/engine/processing/processinstance/CreateProcessInstanceProcessor.java\nindex fa6f8d4..2185b1e 100644\n--- a/engine/src/main/java/io/camunda/zeebe/engine/processing/processinstance/CreateProcessInstanceProcessor.java\n+++ b/engine/src/main/java/io/camunda/zeebe/engine/processing/processinstance/CreateProcessInstanceProcessor.java\n@@ -37,7 +37,6 @@ import io.camunda.zeebe.protocol.record.intent.ProcessInstanceCreationIntent;\n import io.camunda.zeebe.protocol.record.intent.ProcessInstanceIntent;\n import io.camunda.zeebe.protocol.record.value.BpmnElementType;\n import io.camunda.zeebe.util.Either;\n-import io.camunda.zeebe.util.collection.Tuple;\n import java.util.Arrays;\n import java.util.HashMap;\n import java.util.Map;\n@@ -236,21 +235,22 @@ public final class CreateProcessInstanceProcessor\n return startInstructions.stream()\n .map(\n instruction ->\n- Tuple.of(\n+ new ElementIdAndType(\n instruction.getElementId(),\n process.getElementById(instruction.getElementIdBuffer()).getElementType()))\n- .filter(elementTuple -> UNSUPPORTED_ELEMENT_TYPES.contains(elementTuple.getRight()))\n+ .filter(\n+ elementIdAndType -> UNSUPPORTED_ELEMENT_TYPES.contains(elementIdAndType.elementType))\n .findAny()\n .map(\n- elementTypeTuple ->\n+ elementIdAndType ->\n Either.left(\n new Rejection(\n RejectionType.INVALID_ARGUMENT,\n (\"Expected to create instance of process with start instructions but the element with id '%s' targets unsupported element type '%s'. \"\n + \"Supported element types are: %s\")\n .formatted(\n- elementTypeTuple.getLeft(),\n- elementTypeTuple.getRight(),\n+ elementIdAndType.elementId,\n+ elementIdAndType.elementType,\n Arrays.stream(BpmnElementType.values())\n .filter(\n elementType ->\n@@ -493,4 +493,6 @@ public final class CreateProcessInstanceProcessor\n }\n \n record Rejection(RejectionType type, String reason) {}\n+\n+ record ElementIdAndType(String elementId, BpmnElementType elementType) {}\n }\n"]
1
["bb2ccc1a778452aebf233cf78b20f1f4bab4354b"]
["refactor"]
add user role enum Signed-off-by: Braks <[email protected]>
["diff --git a/packages/nc-gui-v2/lib/enums.ts b/packages/nc-gui-v2/lib/enums.ts\nindex e87b69a..c6751a3 100644\n--- a/packages/nc-gui-v2/lib/enums.ts\n+++ b/packages/nc-gui-v2/lib/enums.ts\n@@ -1,3 +1,9 @@\n+export enum Role {\n+ Super = 'super',\n+ Admin = 'admin',\n+ User = 'user',\n+}\n+\n export enum Language {\n de = 'Deutsch',\n en = 'English',\ndiff --git a/packages/nc-gui-v2/lib/types.ts b/packages/nc-gui-v2/lib/types.ts\nindex bf152c4..dd8a1ce 100644\n--- a/packages/nc-gui-v2/lib/types.ts\n+++ b/packages/nc-gui-v2/lib/types.ts\n@@ -1,11 +1,12 @@\n import type { ComputedRef, ToRefs } from 'vue'\n+import type { Role } from '~/lib/enums'\n \n export interface User {\n id: string\n email: string\n firstname: string | null\n lastname: string | null\n- roles: string[]\n+ roles: (Role | string)[]\n }\n \n export interface State {\n"]
1
["176a959eb80d17f9abc5c6b5354e6097be95b42d"]
["feat"]
test
["diff --git a/tests/playwright/pages/Dashboard/Command/CmdKPage.ts b/tests/playwright/pages/Dashboard/Command/CmdKPage.ts\nindex 5ac62b2..0457243 100644\n--- a/tests/playwright/pages/Dashboard/Command/CmdKPage.ts\n+++ b/tests/playwright/pages/Dashboard/Command/CmdKPage.ts\n@@ -21,6 +21,7 @@ export class CmdK extends BasePage {\n async searchText(text: string) {\n await this.dashboardPage.rootPage.fill('.cmdk-input', text);\n await this.rootPage.keyboard.press('Enter');\n+ await this.rootPage.keyboard.press('Enter');\n }\n \n async isCmdKVisible() {\n"]
1
["990699ff4a84a5bac3abfecbec002f30e2714de9"]
["test"]
added resize observer, this will replace window.resize if available
["diff --git a/engine/src/Utils/EventListeners.ts b/engine/src/Utils/EventListeners.ts\nindex 9e7b189..a29cab4 100644\n--- a/engine/src/Utils/EventListeners.ts\n+++ b/engine/src/Utils/EventListeners.ts\n@@ -47,6 +47,7 @@ export class EventListeners {\n \n private canPush: boolean;\n private resizeTimeout?: NodeJS.Timeout;\n+ private resizeObserver?: ResizeObserver;\n \n /**\n * Events listener constructor\n@@ -144,7 +145,31 @@ export class EventListeners {\n }\n \n if (options.interactivity.events.resize) {\n- manageListener(window, Constants.resizeEvent, this.resizeHandler, add);\n+ if (typeof ResizeObserver !== \"undefined\") {\n+ if (this.resizeObserver && !add) {\n+ if (container.canvas.element) {\n+ this.resizeObserver.unobserve(container.canvas.element);\n+ }\n+\n+ this.resizeObserver.disconnect();\n+\n+ delete this.resizeObserver;\n+ } else if (!this.resizeObserver && add && container.canvas.element) {\n+ this.resizeObserver = new ResizeObserver((entries) => {\n+ const entry = entries.find((e) => e.target === container.canvas.element);\n+\n+ if (!entry) {\n+ return;\n+ }\n+\n+ this.handleWindowResize();\n+ });\n+\n+ this.resizeObserver.observe(container.canvas.element);\n+ }\n+ } else {\n+ manageListener(window, Constants.resizeEvent, this.resizeHandler, add);\n+ }\n }\n \n if (document) {\n"]
1
["4197f2654e8767039dbfd66eca34f261ee3d88c8"]
["feat"]
remove members that are left from ClusterTopology when last change is applied When the change is applied, the member is marked as LEFT. It is removed from the ClusterTopology when all changes in the ClusterChangePlan is completed.
["diff --git a/topology/src/main/java/io/camunda/zeebe/topology/state/ClusterTopology.java b/topology/src/main/java/io/camunda/zeebe/topology/state/ClusterTopology.java\nindex e5a111d..8ccd410 100644\n--- a/topology/src/main/java/io/camunda/zeebe/topology/state/ClusterTopology.java\n+++ b/topology/src/main/java/io/camunda/zeebe/topology/state/ClusterTopology.java\n@@ -171,7 +171,31 @@ public record ClusterTopology(\n }\n \n private ClusterTopology advance() {\n- return new ClusterTopology(version, members, changes.advance());\n+ final ClusterTopology result = new ClusterTopology(version, members, changes.advance());\n+ if (!result.hasPendingChanges()) {\n+ // The last change has been applied. Clean up the members that are marked as LEFT in the\n+ // topology. This operation will be executed in the member that executes the last operation.\n+ // This is ok because it is guaranteed that no other concurrent modification will be applied\n+ // to the topology. This is because all the operations are applied sequentially, and no\n+ // topology update will be done without adding a ClusterChangePlan.\n+ return result.gc();\n+ }\n+ return result;\n+ }\n+\n+ private ClusterTopology gc() {\n+ if (hasPendingChanges()) {\n+ throw new IllegalStateException(\n+ \"Expected to remove members that are left from the topology, but there are pending changes \"\n+ + changes);\n+ }\n+ // remove members that are marked as LEFT\n+ final var currentMembers =\n+ members().entrySet().stream()\n+ .filter(entry -> entry.getValue().state() != State.LEFT)\n+ .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));\n+ // Increment the version so that other members can merge by overwriting their local topology.\n+ return new ClusterTopology(version + 1, currentMembers, changes);\n }\n \n public boolean hasMember(final MemberId memberId) {\n"]
1
["4bfbf60653068ef17df98c021134692bd6d02939"]
["refactor"]
End of preview. Expand in Data Studio

Untangling Multi-Concern Commits with Small Language Models

This dataset contains commit data for training and evaluating models on software engineering tasks, specifically focusing on identifying and separating concerns in multi-concern commits.

Dataset Description

This dataset consists of two main configurations:

1. Sampled Dataset (sampled)

  • File: data/sampled_ccs_dataset.csv
  • Description: Individual atomic commits with single concerns
  • Features:
    • annotated_type: The type of concern/change in the commit
    • masked_commit_message: Commit message with sensitive information masked
    • git_diff: The actual code changes in diff format
    • sha: Git commit SHA hash

2. Tangled Dataset (tangled)

  • File: data/tangled_ccs_dataset.csv
  • Description: Multi-concern commits that combine multiple atomic commits
  • Features:
    • description: Combined description of all concerns
    • diff: Combined diff of all changes
    • concern_count: Number of individual concerns combined
    • shas: JSON string containing array of original commit SHAs
    • types: JSON string containing array of concern types

Dataset Statistics

  • Sampled Dataset: ~1.3MB, individual atomic commits
  • Tangled Dataset: ~7.1MB, artificially combined multi-concern commits

Use Cases

  1. Commit Message Generation: Generate appropriate commit messages for code changes
  2. Concern Classification: Classify the type of concern addressed in a commit
  3. Commit Decomposition: Break down multi-concern commits into individual concerns
  4. Code Change Analysis: Understand the relationship between code changes and their descriptions

Data Collection and Processing

The dataset was created by:

  1. Collecting atomic commits from software repositories
  2. Sampling and filtering commits based on quality criteria
  3. Artificially combining atomic commits to create tangled multi-concern examples
  4. Masking sensitive information while preserving semantic content

Citation

If you use this dataset in your research, please cite:

@dataset{css_commits_dataset,
  title={Untangling Multi-Concern Commits with Small Language Models},
  author={Your Name},
  year={2024},
  url={https://huggingface.co/datasets/Untangling-Multi-Concern-Commits-with-Small-Language-Models}
}

Scripts and Tools

This dataset includes several Python scripts for data processing and analysis:

  • sample_ccs_dataset.py: Script for sampling and filtering commits
  • generate_tangled.py: Script for creating tangled multi-concern commits
  • clean_ccs_dataset.py: Data cleaning and preprocessing utilities
  • show_sampled_diffs.py: Visualization of sampled commit diffs
  • show_tokens_distribution.py: Analysis of token distribution in the dataset

License

This dataset is released under the MIT License. See the LICENSE file for details.

Dataset Loading

You can load this dataset using the Hugging Face datasets library:

from datasets import load_dataset

# Load the sampled dataset
sampled_data = load_dataset("Untangling-Multi-Concern-Commits-with-Small-Language-Models", "sampled")

# Load the tangled dataset
tangled_data = load_dataset("Untangling-Multi-Concern-Commits-with-Small-Language-Models", "tangled")
Downloads last month
444