Skip to content

Commit

Permalink
Merge branch 'release' into sharat87-patch-3
Browse files Browse the repository at this point in the history
  • Loading branch information
sharat87 authored Nov 13, 2024
2 parents ca6a304 + 81c6a1e commit f049d46
Show file tree
Hide file tree
Showing 49 changed files with 640 additions and 523 deletions.
2 changes: 1 addition & 1 deletion .github/config.json

Large diffs are not rendered by default.

35 changes: 32 additions & 3 deletions .github/workflows/sync-release-to-pg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,36 @@ jobs:
- name: Push changes
if: env.MERGE_CONFLICT == 'false'
run: |
git push origin pg
set -e
git push origin pg || echo "PUSH_FAILURE=true" >> $GITHUB_ENV
- name: Capture push failure message
if: env.PUSH_FAILURE == 'true'
run: |
# Capture the last git error message
push_error_message=$(git push origin pg 2>&1 | tail -n 1)
echo "PUSH_ERROR_MESSAGE=$push_error_message" >> $GITHUB_ENV
- name: Notify on push failure
if: env.PUSH_FAILURE == 'true'
env:
SLACK_MESSAGE: "Push to pg branch failed: ${{ env.PUSH_ERROR_MESSAGE }}"
run: |
# Format the Slack message
slack_message="${{ env.SLACK_MESSAGE }}"
# Set the Slack message body with channel ID and text
body="$(jq -nc \
--arg channel C07JMLWEXDJ \
--arg text "$slack_message" \
'$ARGS.named'
)"
# Send the message to Slack
curl -v https://slack.com/api/chat.postMessage \
--header "Authorization: Bearer ${{ secrets.SLACK_APPSMITH_ALERTS_TOKEN }}" \
--header "Content-Type: application/json; charset=utf-8" \
--data-raw "$body"
- name: Notify on merge conflicts
if: env.MERGE_CONFLICT == 'true'
Expand All @@ -59,9 +88,9 @@ jobs:
CONFLICTING_COMMIT: ${{ env.CONFLICTING_COMMIT }}
run: |
# Prepare the message for Slack
message="Merge conflict detected while merging release into pg branch. Conflicted commits:\n"
message="Merge conflict detected while merging release into pg branch. Conflicted commits:"
commit_url="$REPOSITORY_URL/commit/$CONFLICTING_COMMIT"
message+="$commit_url\n"
message+="$commit_url"
# Send the message to Slack
# This unwieldy horror of a sed command, converts standard Markdown links to Slack's unwieldy link syntax.
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/test-vulnerabilities-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,20 @@ jobs:
- name: Check for new vulnerabilities in Scout and Trivy files
if: always()
run: |
# Check if Scout vulnerabilities file is not empty
if [ -s "scout_new_vulnerabilities.csv" ]; then
# Check if Scout vulnerabilities file has data after the header
if [ $(tail -n +2 scout_new_vulnerabilities.csv | wc -l) -gt 0 ]; then
echo "Scout vulnerabilities detected."
cat scout_new_vulnerabilities.csv
exit 1 # Fail the job if data exists
else
echo "No new Scout vulnerabilities detected."
fi
# Check if Trivy vulnerabilities file is not empty
if [ -s "trivy_new_vulnerabilities.csv" ]; then
# Check if Trivy vulnerabilities file has data after the header
if [ $(tail -n +2 trivy_new_vulnerabilities.csv | wc -l) -gt 0 ]; then
echo "Trivy vulnerabilities detected."
cat trivy_new_vulnerabilities.csv
exit 1 # Fail the job if data exists
else
echo "No new Trivy vulnerabilities detected."
fi
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -7311,7 +7311,7 @@
"controlType": "OPEN_CONFIG_PANEL",
"buttonConfig": {
"label": "Configure",
"icon": "settings-2-line"
"icon": "settings-v3"
},
"label": "Configure menu items",
"isBindProperty": false,
Expand Down Expand Up @@ -47874,7 +47874,7 @@
"controlType": "OPEN_CONFIG_PANEL",
"buttonConfig": {
"label": "Configure",
"icon": "settings-2-line"
"icon": "settings-v3"
},
"label": "Configure menu items",
"isBindProperty": false,
Expand Down
2 changes: 1 addition & 1 deletion app/client/src/IDE/Components/ToolbarSettingsPopover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const ToolbarSettingsPopover = (props: Props) => {
<ToggleButton
data-testid={props.dataTestId}
disabled={props.disabled}
icon="settings-2-line"
icon="settings-v3"
isSelected={isOpen}
onClick={handleButtonClick}
size="md"
Expand Down
7 changes: 7 additions & 0 deletions app/client/src/ce/constants/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2522,3 +2522,10 @@ export const JS_EDITOR_SETTINGS = {
TITLE: () => "Settings",
ON_LOAD_TITLE: () => "Choose the functions to run on page load",
};

export const CUSTOM_WIDGET_BUILDER_TAB_TITLE = {
AI: () => "AI",
HTML: () => "HTML",
STYLE: () => "Style",
JS: () => "Javascript",
};
4 changes: 4 additions & 0 deletions app/client/src/ce/entities/FeatureFlag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export const FEATURE_FLAG = {
release_actions_redesign_enabled: "release_actions_redesign_enabled",
rollout_remove_feature_walkthrough_enabled:
"rollout_remove_feature_walkthrough_enabled",
rollout_eslint_enabled: "rollout_eslint_enabled",
release_drag_drop_building_blocks_enabled:
"release_drag_drop_building_blocks_enabled",
rollout_side_by_side_enabled: "rollout_side_by_side_enabled",
Expand All @@ -41,6 +42,7 @@ export const FEATURE_FLAG = {
"release_ide_datasource_selector_enabled",
release_table_custom_loading_state_enabled:
"release_table_custom_loading_state_enabled",
release_custom_widget_ai_builder: "release_custom_widget_ai_builder",
} as const;

export type FeatureFlag = keyof typeof FEATURE_FLAG;
Expand Down Expand Up @@ -70,13 +72,15 @@ export const DEFAULT_FEATURE_FLAG_VALUE: FeatureFlags = {
ab_appsmith_ai_query: false,
release_actions_redesign_enabled: false,
rollout_remove_feature_walkthrough_enabled: true,
rollout_eslint_enabled: false,
rollout_side_by_side_enabled: false,
release_layout_conversion_enabled: false,
release_anvil_toggle_enabled: false,
release_git_persist_branch_enabled: false,
release_ide_animations_enabled: false,
release_ide_datasource_selector_enabled: false,
release_table_custom_loading_state_enabled: false,
release_custom_widget_ai_builder: false,
};

export const AB_TESTING_EVENT_KEYS = {
Expand Down
2 changes: 1 addition & 1 deletion app/client/src/ce/pages/AdminSettings/config/general.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export const APPSMITH_ALLOWED_FRAME_ANCESTORS_SETTING: Setting = {
};

export const config: AdminConfigType = {
icon: "settings-2-line",
icon: "settings-v3",
type: SettingCategories.GENERAL,
categoryType: CategoryType.GENERAL,
controlType: SettingTypes.GROUP,
Expand Down
2 changes: 1 addition & 1 deletion app/client/src/ce/pages/Applications/WorkspaceMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function WorkspaceMenu({
})
}
>
<Icon name="settings-2-line" size="md" />
<Icon name="settings-v3" size="md" />
Settings
</CustomMenuItem>
</>
Expand Down
28 changes: 10 additions & 18 deletions app/client/src/ce/sagas/userSagas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ import {
import AnalyticsUtil from "ee/utils/AnalyticsUtil";
import { INVITE_USERS_TO_WORKSPACE_FORM } from "ee/constants/forms";
import type { User } from "constants/userConstants";
import { ANONYMOUS_USERNAME } from "constants/userConstants";
import {
flushErrorsAndRedirect,
safeCrashAppRequest,
Expand Down Expand Up @@ -190,9 +189,15 @@ export function* getCurrentUserSaga(action?: {
}
}

function* intializeSmartLook(currentUser: User) {
if (!currentUser.isAnonymous && currentUser.username !== ANONYMOUS_USERNAME) {
yield AnalyticsUtil.identifyUser(currentUser);
function* initTrackers(currentUser: User) {
const initializeSentry = initializeAnalyticsAndTrackers(currentUser);

const sentryInitialized: boolean = yield initializeSentry;

if (sentryInitialized) {
yield put(segmentInitSuccess());
} else {
yield put(segmentInitUncertain());
}
}

Expand All @@ -202,20 +207,7 @@ export function* runUserSideEffectsSaga() {
const isAirgappedInstance = isAirgapped();

if (enableTelemetry) {
// parallelize sentry and smart look initialization

yield fork(intializeSmartLook, currentUser);
const initializeSentry = initializeAnalyticsAndTrackers();

if (initializeSentry instanceof Promise) {
const sentryInialized: boolean = yield initializeSentry;

if (sentryInialized) {
yield put(segmentInitSuccess());
} else {
yield put(segmentInitUncertain());
}
}
yield fork(initTrackers, currentUser);
}

const isFFFetched: boolean = yield select(getFeatureFlagsFetched);
Expand Down
23 changes: 12 additions & 11 deletions app/client/src/components/editorComponents/ErrorBoundry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import type { ReactNode, CSSProperties } from "react";
interface Props {
children: ReactNode;
style?: CSSProperties;
fallback?: ReactNode;
}
interface State {
hasError: boolean;
Expand Down Expand Up @@ -47,17 +48,17 @@ class ErrorBoundary extends React.Component<Props, State> {
className="error-boundary"
style={this.props.style}
>
{this.state.hasError ? (
<p>
Oops, Something went wrong.
<br />
<RetryLink onClick={() => this.setState({ hasError: false })}>
Click here to retry
</RetryLink>
</p>
) : (
this.props.children
)}
{this.state.hasError
? this.props.fallback || (
<p>
Oops, Something went wrong.
<br />
<RetryLink onClick={() => this.setState({ hasError: false })}>
Click here to retry
</RetryLink>
</p>
)
: this.props.children}
</ErrorBoundaryContainer>
);
}
Expand Down
1 change: 1 addition & 0 deletions app/client/src/components/formControls/BaseControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ export interface ControlData {
validator?: (value: string) => { isValid: boolean; message: string };
isSecretExistsPath?: string;
addMoreButtonLabel?: string;
datasourceId?: string;
}
export type FormConfigType = Omit<ControlData, "configProperty"> & {
configProperty?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export function DraggableListCard(props: RenderComponentProps) {
}}
onFocus={(e) => e.stopPropagation()}
size="sm"
startIcon="settings-2-line"
startIcon="settings-v3"
/>
)}
{showDelete && (
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import type { ControlProps } from "../../../../components/formControls/BaseControl";

export interface CarbonButtonProps extends ControlProps {}

export const CarbonButton = () => {
return null;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./CarbonButton";
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const propertyPaneContentConfig = [
controlType: "OPEN_CONFIG_PANEL",
buttonConfig: {
label: "Configure",
icon: "settings-2-line",
icon: "settings-v3",
},
label: "Configure menu items",
isBindProperty: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function AppSettings() {
const SectionHeadersConfig: SectionHeaderProps[] = [
{
id: "t--general-settings-header",
icon: "settings-2-line",
icon: "settings-v3",
isSelected: selectedTab.type === AppSettingsTabs.General,
name: createMessage(GENERAL_SETTINGS_SECTION_HEADER),
onClick: () => {
Expand Down
Loading

0 comments on commit f049d46

Please sign in to comment.