Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix: Fixed race condition in import application flow #22764

Merged
merged 4 commits into from
May 2, 2023

Conversation

nayan-rafiq
Copy link
Contributor

@nayan-rafiq nayan-rafiq commented Apr 26, 2023

Description

This PR fixes the import application failure issue due to the race condition.

Fixes #21126

Media

A video or a GIF is preferred. when using Loom, don’t embed because it looks like it’s a GIF. instead, just link to the video

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Manual

Test Plan

Add Testsmith test cases links that relate to this PR

Issues raised during DP testing

Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR)

Checklist:

Dev activity

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • PR is being merged under a feature flag

QA activity:

  • Test plan has been approved by relevant developers
  • Test plan has been peer reviewed by QA
  • Cypress test cases have been added and approved by either SDET or manual QA
  • Organized project review call with relevant stakeholders after Round 1/2 of QA
  • Added Test Plan Approved label after reveiwing all Cypress test

@nayan-rafiq nayan-rafiq self-assigned this Apr 26, 2023
@github-actions github-actions bot added Git Platform Pod Issues related to the git & the app platform Import-Export-App Issues related to importing and exporting apps labels Apr 26, 2023
@nayan-rafiq nayan-rafiq marked this pull request as ready for review April 26, 2023 17:30
@nayan-rafiq nayan-rafiq changed the title fixed race condition in import application flow fix: Fixed race condition in import application flow Apr 26, 2023
@github-actions github-actions bot added the Bug Something isn't working label Apr 26, 2023
@nayan-rafiq nayan-rafiq added the QA Needs QA attention label Apr 26, 2023
@nayan-rafiq
Copy link
Contributor Author

/ok-to-test sha=8a584bf

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/4812191048.
Workflow: Appsmith External Integration Test Workflow.
Commit: 8a584bf.
PR: 22764.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=22764&runId=4812191048_1

@github-actions
Copy link

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/4812191048.
Commit: 8a584bf.
The following are new failures, please fix them before merging the PR:

  1. cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/Mongo_Spec.ts

  2. cypress/integration/SanitySuite/Datasources/Airtable_Basic_Spec.ts
To know the list of identified flaky tests - Refer here

Copy link
Member

@AnaghHegde AnaghHegde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit. Rest LGTM

Mono<Workspace> workspaceMono = workspaceService.findById(
workspaceId, isGitSync ? Optional.empty() : Optional.of(workspacePermission.getApplicationCreatePermission())
).cache();

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to cache this? I don't see this being used anywhere else in the flow.

@Parthvi12
Copy link
Contributor

/build-deploy-preview skip-tests=true

@github-actions
Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/4818615532.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 22764.
recreate: .

@github-actions
Copy link

Deploy-Preview-URL: https://ce-22764.dp.appsmith.com

Parthvi12
Parthvi12 previously approved these changes Apr 27, 2023
@Parthvi12 Parthvi12 added the Test Plan Approved Manual/Cypress tests covers changes made on the PR. Else, add skip-testPlan label if not applicable label Apr 27, 2023
@github-actions github-actions bot added CI impacted Issues that cause CI failures and need to be addressed on priority by respective pods Custom JS Libraries Issues related to adding custom JS library Javascript Product Issues related to users writing javascript in appsmith Git Product Issues related to version control product Needs Triaging Needs attention from maintainers to triage Release labels Apr 27, 2023
@nayan-rafiq
Copy link
Contributor Author

/ok-to-test sha=090d7ec

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/4839981077.
Workflow: Appsmith External Integration Test Workflow.
Commit: 090d7ec.
PR: 22764.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=22764&runId=4839981077_1

@github-actions
Copy link

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/4839981077.
Commit: 090d7ec.
The following are new failures, please fix them before merging the PR:

  1. cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Widgets_Default_data_validation_spec.js

  2. cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/AllWidgets_Reset_Spec.ts
  3. cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/CurrencyInput/CurrencyInput_ShowStepArrows_spec.js
  4. cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Filepicker/FilePicker2_spec.js
  5. cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Image/Image_validation_spec.js
  6. cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/List/ListWidgetParseError.ts
  7. cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Modal/Modal_focus_spec.js
  8. cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Divider_spec.js
To know the list of identified flaky tests - Refer here

@nayan-rafiq
Copy link
Contributor Author

/ok-to-test sha=e75196d

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/4845578320.
Workflow: Appsmith External Integration Test Workflow.
Commit: e75196d.
PR: 22764.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=22764&runId=4845578320_1

@github-actions
Copy link

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/4845578320.
Commit: e75196d.
The following are new failures, please fix them before merging the PR:


    To know the list of identified flaky tests - Refer here

    2 similar comments
    @github-actions
    Copy link

    github-actions bot commented May 1, 2023

    Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/4845578320.
    Commit: e75196d.
    The following are new failures, please fix them before merging the PR:


      To know the list of identified flaky tests - Refer here

      @github-actions
      Copy link

      github-actions bot commented May 1, 2023

      Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/4845578320.
      Commit: e75196d.
      The following are new failures, please fix them before merging the PR:


        To know the list of identified flaky tests - Refer here

        @nayan-rafiq
        Copy link
        Contributor Author

        /ok-to-test sha=1d9d51b

        @github-actions
        Copy link

        github-actions bot commented May 1, 2023

        Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/4853224596.
        Workflow: Appsmith External Integration Test Workflow.
        Commit: 1d9d51b.
        PR: 22764.
        Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=22764&runId=4853224596_1

        Copy link
        Member

        @AnaghHegde AnaghHegde left a comment

        Choose a reason for hiding this comment

        The reason will be displayed to describe this comment to others. Learn more.

        This is needed for the ImportExport v1 as well right?

        @github-actions
        Copy link

        github-actions bot commented May 1, 2023

        Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/4853224596.
        Commit: 1d9d51b.
        The following are new failures, please fix them before merging the PR:

        1. cypress/integration/Regression_TestSuite/ClientSideTests/Templates/Fork_Template_spec.js

        To know the list of identified flaky tests - Refer here

        @nayan-rafiq
        Copy link
        Contributor Author

        This is needed for the ImportExport v1 as well right?

        @AnaghHegde no, the v1 is a bit different. It has custom js lib import later in the flow, not in the first.

        @github-actions
        Copy link

        github-actions bot commented May 2, 2023

        Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/4853224596.
        Commit: 1d9d51b.
        All cypress tests have passed 🎉

        @nayan-rafiq nayan-rafiq merged commit 82c660c into release May 2, 2023
        @nayan-rafiq nayan-rafiq deleted the fix/race-condition-in-import branch May 2, 2023 09:34
        @Nikhil-Nandagopal Nikhil-Nandagopal removed the Git Product Issues related to version control product label Aug 6, 2024
        @github-actions github-actions bot added Git Product Issues related to version control product Verified When issue is retested post its fixed labels Aug 6, 2024
        Copy link
        Contributor

        coderabbitai bot commented Aug 6, 2024

        Warning

        Rate limit exceeded

        @github-actions[bot] has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 29 minutes and 50 seconds before requesting another review.

        How to resolve this issue?

        After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

        We recommend that you space out your commits to avoid hitting the rate limit.

        How do rate limits work?

        CodeRabbit enforces hourly rate limits for each developer per organization.

        Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

        Please see our FAQ for further information.

        Commits

        Files that changed from the base of the PR and between 09fd519 and 1d9d51b.


        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>.
          • 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 generate interesting stats about this repository and render them as a table.
          • @coderabbitai show all the console.log statements in this repository.
          • @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 as 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 resolve resolve all the CodeRabbit review comments.
        • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
        • @coderabbitai help to get help.

        Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

        CodeRabbit Configuration File (.coderabbit.yaml)

        • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
        • Please see the configuration documentation for more information.
        • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

        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.

        Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
        Labels
        Bug Something isn't working CI impacted Issues that cause CI failures and need to be addressed on priority by respective pods Custom JS Libraries Issues related to adding custom JS library Git Platform Pod Issues related to the git & the app platform Git Product Issues related to version control product Import-Export-App Issues related to importing and exporting apps Javascript Product Issues related to users writing javascript in appsmith Needs Triaging Needs attention from maintainers to triage QA Needs QA attention Release Test Plan Approved Manual/Cypress tests covers changes made on the PR. Else, add skip-testPlan label if not applicable Verified When issue is retested post its fixed
        Projects
        None yet
        Development

        Successfully merging this pull request may close these issues.

        [Bug]: CI failure: Merge randomly failing on Git connected with JSLib Installed change
        4 participants