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: Updating analytics events to use workspaceId instead of orgId #38931

Merged
merged 2 commits into from
Jan 31, 2025

Conversation

trishaanand
Copy link
Contributor

@trishaanand trishaanand commented Jan 30, 2025

Description

Tip

Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team).

Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR.

Fixes #Issue Number
or
Fixes Issue URL

Warning

If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.

Automation

/test sanity

🔍 Cypress test results

Tip

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


Fri, 31 Jan 2025 08:08:50 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

Release Notes

  • Refactor

    • Updated terminology from "organization ID" to "workspace ID" across multiple components and services.
    • Standardized analytics event logging to use a consistent workspace identifier.
    • Removed redundant organization ID references in analytics properties.
  • Technical Improvements

    • Simplified data structures in analytics event tracking.
    • Improved consistency in workspace identification across client and server-side code.

@trishaanand trishaanand added the ok-to-test Required label for CI label Jan 30, 2025
Copy link
Contributor

coderabbitai bot commented Jan 30, 2025

Walkthrough

The pull request introduces a systematic renaming of organization-related identifiers to workspace identifiers across multiple client and server-side files. The changes primarily focus on updating analytics logging and property mapping, replacing orgId and organizationId with workspaceId. This modification appears to be part of a broader terminology standardization effort, ensuring consistent identifier usage throughout the application's codebase.

Changes

File Path Change Summary
app/client/src/actions/pageActions.tsx Updated parameter names from orgId to workspaceId in createPageAction and createNewPageFromEntities
app/client/src/ce/pages/workspace/InviteUsersForm.tsx Modified analytics logging key from orgId to workspaceId
app/client/src/pages/common/datasourceAuth/index.tsx Updated event logging object to use workspaceId instead of orgId
app/server/appsmith-server/src/main/java/com/appsmith/server/actioncollections/base/ActionCollectionServiceCEImpl.java Changed analytics properties key from orgId to workspaceId
app/server/appsmith-server/src/main/java/com/appsmith/server/applications/base/ApplicationServiceCEImpl.java Updated analytics properties key from orgId to workspaceId
app/server/appsmith-server/src/main/java/com/appsmith/server/artifacts/base/ArtifactServiceCEImpl.java Changed key in data map from organizationId to workspaceId
app/server/appsmith-server/src/main/java/com/appsmith/server/git/autocommit/AutoCommitEventHandlerCEImpl.java Updated analytics properties key from orgId to workspaceId
app/server/appsmith-server/src/main/java/com/appsmith/server/git/common/CommonGitServiceCEImpl.java Renamed key from organizationId to workspaceId and removed orgId
app/server/appsmith-server/src/main/java/com/appsmith/server/git/utils/GitAnalyticsUtils.java Updated multiple methods to replace organizationId and orgId with workspaceId
app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/DatasourceAnalyticsUtils.java Removed orgId from analytics properties in two methods
app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/ce/CommonGitFileUtilsCE.java Changed key from organizationId to workspaceId in analytics data
app/server/appsmith-server/src/main/java/com/appsmith/server/newactions/base/NewActionServiceCEImpl.java Updated analytics properties key from orgId to workspaceId
app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ApplicationPageServiceCEImpl.java Changed key in extraProperties map from orgId to workspaceId
app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/MockDataServiceCEImpl.java Updated parameter from orgId to workspaceId in analytics event
app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCEImpl.java Changed key in analytics data from orgId to workspaceId
app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/CreateDBTablePageSolutionCEImpl.java Consolidated organization identifiers into workspaceId

Suggested labels

Enhancement, Bug

Suggested reviewers

  • nidhi-nair
  • abhvsn
  • albinAppsmith

Possibly related PRs

  • chore: Remove deprecated organization from code #38878: The changes in this PR involve replacing organizationId with workspaceId in the TemplatesAPI class, which aligns with the changes made in the main PR regarding the renaming of identifiers.
  • chore: Refactor code for seat based sign up check. #38912: This PR introduces a new method isSignupAllowed(User user) in the UserServiceCEImpl class, which centralizes the logic for determining signup eligibility, reflecting a shift in how user roles and identifiers are managed, similar to the changes in the main PR.

Poem

🏢 From org to workspace, we stride
Refactoring code with semantic pride
Keys dance and rename with grace
Consistency finds its rightful place
Code evolves, clean and bright! 🌟


📜 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 9bbf7ed and 8428afa.

📒 Files selected for processing (1)
  • app/server/appsmith-server/src/main/java/com/appsmith/server/git/utils/GitAnalyticsUtils.java (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/server/appsmith-server/src/main/java/com/appsmith/server/git/utils/GitAnalyticsUtils.java
⏰ Context from checks skipped due to timeout of 90000ms (9)
  • GitHub Check: perform-test / rts-build / build
  • GitHub Check: perform-test / server-build / server-unit-tests
  • GitHub Check: server-spotless / spotless-check
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-prettier / prettier-check
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-build / client-build
  • GitHub Check: server-unit-tests / server-unit-tests

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. (Beta)
  • @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.

@trishaanand trishaanand requested review from abhvsn and albinAppsmith and removed request for a team, ayushpahwa and ankitakinger January 30, 2025 13:30
@github-actions github-actions bot added the skip-changelog Adding this label to a PR prevents it from being listed in the changelog label Jan 30, 2025
Copy link

Failed server tests

  • com.external.plugins.SnowflakePluginTest#
  • com.external.plugins.SmtpPluginTest#
  • com.external.plugins.VisionCommandTest#
  • com.external.plugins.EmbeddingCommandTest#
  • com.external.plugins.OpenAIPluginTest#
  • com.external.plugins.ChatCommandTest#
  • com.external.plugins.AnthropicPluginTest#
  • com.external.plugins.GoogleAiPluginTest#
  • com.external.plugins.GenerateContentCommandTest#
  • com.external.plugins.services.AiFeatureServiceFactoryTest#
  • com.external.plugins.services.features.TextClassificationServiceImplTest#
  • com.external.plugins.services.features.TextSummarizationServiceImplTest#
  • com.external.plugins.services.features.TextEntityExtractionServiceImplTest#
  • com.external.plugins.services.features.ImageClassificationServiceImplTest#
  • com.external.plugins.services.features.ImageCaptioningServiceImplTest#
  • com.external.plugins.services.features.ImageEntityExtractionServiceImplTest#
  • com.external.plugins.services.features.TextGenerationServiceImplTest#
  • com.external.plugins.services.HeadersUtilTest#
  • com.external.plugins.services.FieldValidationHelperTest#
  • com.external.plugins.services.FileUtilTest#
  • com.external.plugins.AwsLambdaPluginTest#
  • com.external.plugins.DatabricksPluginTest#
  • GsonUnorderedToOrderedSerializationTest#
  • com.appsmith.git.helpers.DSLTransformerHelperTest#
  • com.appsmith.git.helpers.FileUtilsImplTest#
  • com.appsmith.git.converters.GsonDoubleToLongConverterTest#
  • com.external.plugins.GraphQLPluginTest#testValidGraphQLApiExecutionWithQueryVariablesWithHttpGet

albinAppsmith
albinAppsmith previously approved these changes Jan 31, 2025
@trishaanand trishaanand merged commit 904a9f0 into release Jan 31, 2025
45 checks passed
@trishaanand trishaanand deleted the chore/remove-orgId-from-analytics branch January 31, 2025 08:47
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