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

chore: Don't include new in responses #34617

Merged
merged 2 commits into from
Jul 2, 2024
Merged

chore: Don't include new in responses #34617

merged 2 commits into from
Jul 2, 2024

Conversation

sharat87
Copy link
Member

@sharat87 sharat87 commented Jul 2, 2024

This field isn't used on client and so shouldn't be sent across.

/test sanity

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/9756721589
Commit: ea11761
Cypress dashboard.
Tags: @tag.Sanity

Summary by CodeRabbit

  • Bug Fixes

    • Improved data handling by modifying visibility annotations, enhancing security and data privacy.
  • Tests

    • Updated tests to align with changes in data visibility, ensuring accurate validation of JSON responses.

Copy link
Contributor

coderabbitai bot commented Jul 2, 2024

Walkthrough

The recent updates involve modifying the visibility of the isNew() method in the BaseDomain class by replacing its @JsonView annotation with @JsonIgnore. This change affects the test case in CommonConfigTest.java: an assertion for the "new" field in a JSON response has been removed.

Changes

File Path Summary
app/.../BaseDomain.java Replaced @JsonView(Views.Public.class) with @JsonIgnore for isNew() method.
app/.../CommonConfigTest.java Removed assertion for the "new": true field in the JSON response test.

Poem

In lines of code we chisel,
A tiny change, a little drizzle.
@JsonView bowing out with grace,
@JsonIgnore now takes its place.
Tests refined, their burden eased,
Our program runs, more pleased. 🌟🐇


Tip

Early access features: enabled

We are currently testing the following features in early access:

  • OpenAI gpt-4o model for code reviews and chat: OpenAI claims that this model is better at understanding and generating code than the previous models. We seek your feedback over the next few weeks before making it generally available.

Note:

  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.
  • Please join our Discord Community to provide feedback and report issues.
  • OSS projects are currently opted into early access features by default.

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.

@github-actions github-actions bot added the skip-changelog Adding this label to a PR prevents it from being listed in the changelog label Jul 2, 2024
Copy link

github-actions bot commented Jul 2, 2024

Failed server tests

  • com.appsmith.server.configurations.CommonConfigTest#objectMapper_BeanCreated_WithPublicJsonViewAsDefault

@sharat87 sharat87 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Jul 2, 2024
@sharat87 sharat87 marked this pull request as ready for review July 2, 2024 07:25
@sharat87 sharat87 requested review from nidhi-nair, vivonk and abhvsn July 2, 2024 07:26
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 55b6e6d and ea11761.

Files selected for processing (2)
  • app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/BaseDomain.java (2 hunks)
  • app/server/appsmith-server/src/test/java/com/appsmith/server/configurations/CommonConfigTest.java (1 hunks)
Files skipped from review due to trivial changes (1)
  • app/server/appsmith-server/src/test/java/com/appsmith/server/configurations/CommonConfigTest.java
Additional comments not posted (1)
app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/BaseDomain.java (1)

82-84: LGTM! But verify the impact on JSON responses.

The change from @JsonView(Views.Public.class) to @JsonIgnore for the isNew() method is correct and aligns with the PR objective to remove the new field from responses.

However, ensure that this method is not required in any JSON responses elsewhere in the codebase.

Verification successful

LGTM! But verify the impact on JSON responses.

The change from @JsonView(Views.Public.class) to @JsonIgnore for the isNew() method is correct and aligns with the PR objective to remove the new field from responses.

There are no references to the isNew() method elsewhere in the codebase, ensuring that this change does not impact any JSON responses.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the impact of the `isNew()` method change on JSON responses.

# Test: Search for the usage of the `isNew()` method in the codebase. Expect: No critical dependencies on JSON responses.
rg --type java $'isNew'

Length of output: 3802



Script:

#!/bin/bash
# Description: Verify the impact of the `isNew()` method change on JSON responses.

# Test: Search for references to the `isNew()` method in the codebase to identify any JSON serialization dependencies.
rg --type java 'isNew\('

Length of output: 145

@sharat87 sharat87 merged commit 33325dd into release Jul 2, 2024
67 of 73 checks passed
@sharat87 sharat87 deleted the sharat87-patch-3 branch July 2, 2024 10:38
sharat87 added a commit that referenced this pull request Jul 2, 2024
sharat87 added a commit that referenced this pull request Jul 2, 2024
**/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  -->
sharat87 added a commit that referenced this pull request Jul 3, 2024
This field isn't used on client and so shouldn't be sent across.

/test sanity

<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9756721589>
> Commit: ea11761
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9756721589&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`

<!-- end of auto-generated comment: Cypress test results  -->




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

## Summary by CodeRabbit

- **Bug Fixes**
- Improved data handling by modifying visibility annotations, enhancing
security and data privacy.

- **Tests**
- Updated tests to align with changes in data visibility, ensuring
accurate validation of JSON responses.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Shivam-z pushed a commit to Shivam-z/appsmith that referenced this pull request Jul 10, 2024
This field isn't used on client and so shouldn't be sent across.

/test sanity

<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9756721589>
> Commit: ea11761
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9756721589&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`

<!-- end of auto-generated comment: Cypress test results  -->




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

## Summary by CodeRabbit

- **Bug Fixes**
- Improved data handling by modifying visibility annotations, enhancing
security and data privacy.

- **Tests**
- Updated tests to align with changes in data visibility, ensuring
accurate validation of JSON responses.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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 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.

3 participants