Skip to content

chore: fixes issue with pull redirection#39478

Merged
brayn003 merged 1 commit intoreleasefrom
chore/git-pkg-fix-1
Feb 27, 2025
Merged

chore: fixes issue with pull redirection#39478
brayn003 merged 1 commit intoreleasefrom
chore/git-pkg-fix-1

Conversation

@brayn003
Copy link
Contributor

@brayn003 brayn003 commented Feb 27, 2025

Description

Issue with pull redirection - When a git repository has changes in remote, the user is able to pull the changes from remote. But once the changes are pulled, the application is not redirecting properly.
The issue was caused after merging modularisation related fixes to release

Fixes #39460

Automation

/ok-to-test tags="@tag.Git"

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/13567103097
Commit: 064f918
Cypress dashboard.
Tags: @tag.Git
Spec:


Thu, 27 Feb 2025 14:02:58 UTC

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

  • New Features
    • Enhanced Git integration to include more focused artifact information in pull request responses.
  • Refactor
    • Streamlined the processing of pull request success data to improve efficiency and precision in handling Git artifacts.

@brayn003 brayn003 self-assigned this Feb 27, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 27, 2025

Walkthrough

The changes update the pull request handling for Git by expanding the response data structure. A new artifact property is added to the PullResponseData interface in the type definitions, and subsequent modifications in the saga and actions ensure only this nested artifact is extracted and used in the success flow.

Changes

File(s) Change Summary
app/client/src/git/requests/pullRequest.types.ts Added a new import for GitArtifact and introduced the artifact: GitArtifact; property in the PullResponseData interface.
app/client/src/git/sagas/pullSaga.ts, app/client/src/git/store/actions/pullActions.ts Modified the pull success flow: the saga now extracts the nested artifact from the response, and the action type is updated to use PullResponseData["artifact"] instead of the full response.

Sequence Diagram(s)

sequenceDiagram
    participant C as Client
    participant PS as Pull Saga
    participant GS as Git Service
    participant PA as Pull Action

    C->>PS: Initiate pull request
    PS->>GS: Send pull request
    GS-->>PS: Return response { artifact: ... }
    PS->>PA: Dispatch success action with artifact
Loading

Possibly related PRs

Suggested labels

Bug, Production, Needs Triaging, ok-to-test, Git Product, Medium, Query & Widgets Pod

Suggested reviewers

  • ashit-rath
  • sneha122

Poem

In the code forest, a new branch grows,
With an artifact shining where logic flows.
Pull requests sing a refined new tune,
Extracting gems beneath the moon.
Cheers to cleaner code and a path well-sown! 🚀
Happy coding, team!


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9deaf06 and 064f918.

📒 Files selected for processing (3)
  • app/client/src/git/requests/pullRequest.types.ts (1 hunks)
  • app/client/src/git/sagas/pullSaga.ts (1 hunks)
  • app/client/src/git/store/actions/pullActions.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-build / client-build
  • GitHub Check: client-prettier / prettier-check
🔇 Additional comments (3)
app/client/src/git/requests/pullRequest.types.ts (1)

2-2: Well-structured type expansion

Adding the GitArtifact type import and embedding it as a property in PullResponseData provides a cleaner structure for the pull response. This change properly aligns the type definition with the API response format.

Also applies to: 5-5

app/client/src/git/sagas/pullSaga.ts (1)

36-36: Correct nested property access

The update to access response.data.artifact instead of just response.data properly aligns with the type changes in PullResponseData. This resolves the redirection issue by ensuring we're working with the correct data structure.

app/client/src/git/store/actions/pullActions.ts (1)

17-19: Type refinement improves type safety

Updating the PullSuccessPayload type to use PullResponseData["artifact"] instead of the entire PullResponseData ensures type consistency with the changes in the saga. This narrower type definition better represents the actual data flow.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@brayn003 brayn003 requested a review from ashit-rath February 27, 2025 11:41
@github-actions github-actions bot added Bug Something isn't working Git Product Issues related to version control product High This issue blocks a user from building or impacts a lot of users Needs Triaging Needs attention from maintainers to triage Packages & Git Pod All issues belonging to Packages and Git Production Release Blocker This issue must be resolved before the release skip-changelog Adding this label to a PR prevents it from being listed in the changelog and removed Bug Something isn't working labels Feb 27, 2025
@brayn003 brayn003 added the ok-to-test Required label for CI label Feb 27, 2025
@github-actions github-actions bot added Bug Something isn't working and removed Bug Something isn't working labels Feb 27, 2025
@brayn003 brayn003 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Feb 27, 2025
@github-actions github-actions bot added the Bug Something isn't working label Feb 27, 2025
@brayn003 brayn003 merged commit 635aa06 into release Feb 27, 2025
58 of 60 checks passed
@brayn003 brayn003 deleted the chore/git-pkg-fix-1 branch February 27, 2025 14:21
brayn003 pushed a commit that referenced this pull request Feb 27, 2025
## Description
Issue with pull redirection - When a git repository has changes in
remote, the user is able to pull the changes from remote. But once the
changes are pulled, the application is not redirecting properly.
The issue was caused after merging modularisation related fixes to
release

Fixes #39460

## Automation

/ok-to-test tags="@tag.Git"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/13567103097>
> Commit: 064f918
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13567103097&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Git`
> Spec:
> <hr>Thu, 27 Feb 2025 14:02:58 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced Git integration to include more focused artifact information
in pull request responses.
- **Refactor**
- Streamlined the processing of pull request success data to improve
efficiency and precision in handling Git artifacts.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
btsgh added a commit that referenced this pull request Feb 28, 2025
github-actions bot pushed a commit to Zeral-Zhang/appsmith that referenced this pull request Apr 12, 2025
## Description
Issue with pull redirection - When a git repository has changes in
remote, the user is able to pull the changes from remote. But once the
changes are pulled, the application is not redirecting properly.
The issue was caused after merging modularisation related fixes to
release

Fixes appsmithorg#39460

## Automation

/ok-to-test tags="@tag.Git"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/13567103097>
> Commit: 064f918
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13567103097&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Git`
> Spec:
> <hr>Thu, 27 Feb 2025 14:02:58 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced Git integration to include more focused artifact information
in pull request responses.
- **Refactor**
- Streamlined the processing of pull request success data to improve
efficiency and precision in handling Git artifacts.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working Git Product Issues related to version control product High This issue blocks a user from building or impacts a lot of users Needs Triaging Needs attention from maintainers to triage ok-to-test Required label for CI Packages & Git Pod All issues belonging to Packages and Git Production Release Blocker This issue must be resolved before the release skip-changelog Adding this label to a PR prevents it from being listed in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Auto refresh isn’t seen on pulling remote changes

2 participants