Skip to content

Revert "chore: Don't include new in responses (#34617)"#34646

Merged
sharat87 merged 1 commit intoreleasefrom
chore/revert-new
Jul 2, 2024
Merged

Revert "chore: Don't include new in responses (#34617)"#34646
sharat87 merged 1 commit intoreleasefrom
chore/revert-new

Conversation

@sharat87
Copy link
Member

@sharat87 sharat87 commented Jul 2, 2024

/test ImportExport git

Caution

🔴 🔴 🔴 Some tests have failed.
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/9761964432
Commit: 44fd1e6
Cypress dashboard.
Tags: @tag.ImportExport, @tag.Git
The following are new failures, please fix them before merging the PR:

  1. cypress/e2e/Regression/ClientSide/Git/GitSync/GitSyncedApps_spec.js
List of identified flaky tests.

Summary by CodeRabbit

  • Bug Fixes

    • Updated visibility of the isNew() method for JSON serialization to enhance the accuracy of JSON representations.
  • Tests

    • Enhanced test coverage to include a new field in JSON object comparison, ensuring improved validation of JSON outputs.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 2, 2024

Warning

Review failed

The pull request is closed.

Walkthrough

The modifications primarily focus on changing JSON serialization behavior in the BaseDomain class by replacing @JsonIgnore with @JsonView(Views.Public.class) for the isNew() method, ensuring it's now included in public view serialization. Additionally, the test case in CommonConfigTest.java has been updated to reflect this change by adding the new field to the JSON object comparison.

Changes

File Path Change Summary
app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/BaseDomain.java Replaced @JsonIgnore with @JsonView(Views.Public.class) for the isNew() method.
...appsmith-server/src/test/java/com/appsmith/server/configurations/CommonConfigTest.java Updated JSON object comparison in objectMapper_BeanCreated_WithPublicJsonViewAsDefault to include new.

Poem

In the world of code where JSON views shine bright,
A change was made to give isNew() its light.
No longer ignored, it's now in public sight,
Testing ensures it fits just right,
A small tweak, making everything right.

Tip

AI model upgrade

gpt-4o model for reviews and chat is now live

OpenAI claims that this model is better at understanding and generating code than the previous models. Please join our Discord Community to provide any feedback or to report any issues.


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 Configration 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.

@sharat87 sharat87 added the ok-to-test Required label for CI label Jul 2, 2024

@Override
@JsonIgnore
@JsonView(Views.Public.class)
Copy link
Contributor

Choose a reason for hiding this comment

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

@sharat87 Now we are expecting this to be part of serialisation as well? i.e. git flows?

Copy link
Contributor

Choose a reason for hiding this comment

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

If yes then let's add the git annotation as well which works with the cleanup whitelisting

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a revert PR, reverting #34617. Git was not there before, so this revert isn't adding it either. Do we need it? 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

Nope, AFAIR we don't require this for our ops. we should be good.

@sharat87 sharat87 marked this pull request as ready for review July 2, 2024 17:17
@sharat87 sharat87 merged commit 3b38df7 into release Jul 2, 2024
@sharat87 sharat87 deleted the chore/revert-new branch July 2, 2024 17:17
Shivam-z pushed a commit to Shivam-z/appsmith that referenced this pull request Jul 10, 2024
…ppsmithorg#34646)

**/test ImportExport git**



<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]
> 🔴 🔴 🔴 Some tests have failed.
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9761964432>
> Commit: 44fd1e6
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9761964432&attempt=2&selectiontype=test&testsstatus=failed&specsstatus=fail"
target="_blank">Cypress dashboard</a>.
> Tags: @tag.ImportExport, @tag.Git
> The following are new failures, please fix them before merging the PR:
<ol>
>
<li>cypress/e2e/Regression/ClientSide/Git/GitSync/GitSyncedApps_spec.js</ol>
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master"
target="_blank">List of identified flaky tests</a>.
<!-- end of auto-generated comment: Cypress test results  -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Required label for CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants