Skip to content

Commit

Permalink
test changes on master
Browse files Browse the repository at this point in the history
  • Loading branch information
dvj1988 committed Feb 6, 2025
1 parent a089b9c commit 2363798
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/ci-client-cyclic-deps-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,37 +63,37 @@ jobs:
echo "pr_count=$pr_count" >> $GITHUB_OUTPUT
cat pr_circular_deps.txt
- name: Checkout release branch
- name: Checkout base branch
uses: actions/checkout@v4
if: steps.changed-files.outputs.any_changed == 'true'
with:
ref: release
ref: ${{ github.event.pull_request.base.ref }}

# Install all the dependencies
- name: Install dependencies
if: steps.changed-files.outputs.any_changed == 'true'
run: |
yarn install --immutable
- name: Count circular dependencies on release branch
id: count-cyclic-deps-in-release
- name: Count circular dependencies on base branch
id: count-cyclic-deps-in-base
if: steps.changed-files.outputs.any_changed == 'true'
run: |
dpdm "./src/**/*.{js,jsx,ts,tsx}" --circular --warning=false --tree=false > release_circular_deps.txt
# awk 'NF' release_circular_deps.txt: Filter out empty lines from the file
dpdm "./src/**/*.{js,jsx,ts,tsx}" --circular --warning=false --tree=false > base_branch_circular_deps.txt
# awk 'NF' base_branch_circular_deps.txt: Filter out empty lines from the file
# wc -l: Count the number of lines in the file
# awk '{print $1 - 1}': Subtract 1 from the count because the first line is the header 'Circular Dependencies'
release_count="$(awk 'NF' release_circular_deps.txt | wc -l | awk '{print $1 - 1}')"
echo "release_count=$release_count" >> $GITHUB_OUTPUT
cat release_circular_deps.txt
base_branch_count="$(awk 'NF' base_branch_circular_deps.txt | wc -l | awk '{print $1 - 1}')"
echo "base_branch_count=$base_branch_count" >> $GITHUB_OUTPUT
cat base_branch_circular_deps.txt
- name: Compare circular dependencies
id: compare-deps
if: steps.changed-files.outputs.any_changed == 'true'
run: |
release_count="${{ steps.count-cyclic-deps-in-release.outputs.release_count }}"
base_branch_count="${{ steps.count-cyclic-deps-in-base.outputs.base_branch_count }}"
pr_count="${{ steps.count-cyclic-deps-in-pr.outputs.pr_count }}"
diff="$((pr_count - release_count))"
diff="$((pr_count - base_branch_count))"
if [ "$diff" -gt 0 ]; then
echo "has_more_cyclic_deps=true" >> "$GITHUB_OUTPUT"
Expand All @@ -108,7 +108,7 @@ jobs:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const prNumber = context.payload.pull_request.number;
const message = `🔴🔴🔴 Cyclic Dependency Check:\n\nThis PR has increased the number of cyclic dependencies by ${{steps.compare-deps.outputs.diff}}, when compared with the release branch.\n\nRefer [this document](https://appsmith.notion.site/How-to-check-cyclic-dependencies-c47b08fe5f2f4261a3a234b19e13f2db) to identify the cyclic dependencies introduced by this PR.`;
const message = `🔴🔴🔴 Cyclic Dependency Check:\n\nThis PR has increased the number of cyclic dependencies by ${{steps.compare-deps.outputs.diff}}, when compared with the ${{github.event.pull_request.base.ref}} branch.\n\nRefer [this document](https://appsmith.notion.site/How-to-check-cyclic-dependencies-c47b08fe5f2f4261a3a234b19e13f2db) to identify the cyclic dependencies introduced by this PR.`;
github.issues.createComment({
...context.repo,
issue_number: prNumber,
Expand All @@ -118,4 +118,4 @@ jobs:
# Fail the workflow if cyclic dependencies are found
- name: Fail the workflow if cyclic dependencies are found
if: steps.compare-deps.outputs.has_more_cyclic_deps == 'true' && steps.changed-files.outputs.any_changed == 'true'
run: exit 1
run: exit 1
2 changes: 1 addition & 1 deletion app/client/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import AppErrorBoundary from "./AppErrorBoundry";
import log from "loglevel";
import { FaroErrorBoundary } from "@grafana/faro-react";
import { isTracingEnabled } from "instrumentation/utils";

//
const shouldAutoFreeze = process.env.NODE_ENV === "development";

setAutoFreeze(shouldAutoFreeze);
Expand Down

0 comments on commit 2363798

Please sign in to comment.