Giter Club home page Giter Club logo

microsoft / vscode-azurecache Goto Github PK

View Code? Open in Web Editor NEW
7.0 8.0 7.0 2.6 MB

Azure Cache for Redis is a fully managed, open source–compatible in-memory data store to power fast, scalable applications. Use this extension to view data in your Azure Caches and monitor them at a glance.

Home Page: https://marketplace.visualstudio.com/items?itemName=ms-azurecache.vscode-azurecache

License: MIT License

JavaScript 2.64% TypeScript 96.36% CSS 0.99%

vscode-azurecache's Introduction

Azure Cache for Visual Studio Code (Preview)

Version Build Status

Azure Cache for Redis is a fully managed, open source–compatible in-memory data store to power fast, scalable applications. Use this extension to view the data in your Azure Caches and monitor them at a glance.

Sign up today for your free Azure account and receive 12 months of free popular services, $200 free credit and 25+ always free services 👉 Start Free.

Extension screenshot

Features

  • View data in your Azure Caches across all your Azure subscriptions
    • Supports clustered and non-clustered caches
    • Supports all Redis data types
  • Filter Redis keys by match expression
  • View cache properties
  • Access primary key and connection string

Installation

  1. Download and install the Azure Cache extension for Visual Studio Code

  2. Once installed, you'll see an Azure icon in the Activity Bar

    If your activity bar is hidden, you won't be able to access the extension. Show the Activity Bar by clicking View > Appearance > Show Activity Bar

  3. Sign in to your Azure Account by clicking Sign in to Azure...

    You may already be signed in if currently use other Azure extensions.

    If you don't already have an Azure Account, click Create a Free Azure Account... for a free account with $200 in Azure credits to try out any combination of services for 30 days.

View cache data

  1. Expand the subscription tree item to reveal the caches belonging to it.

    Subscription tree item

  2. Expand a cache item to connect to it and see all the DBs with data in them. For a clustered cache, you will see shards instead.

    Azure Cache tree item

  3. Expand a DB/shard to reveal all the Redis keys under it.

    DB tree item

  4. Click on a Redis key name to open its contents in a new editor tab.

    List tree item and key content

    For collection type Redis keys, clicking on it will reveal the individual elements in it. Clicking the individual element will display its contents.

    For string type Redis keys, clicking on it directly reveals the contents in a new tab.

View cache properties

  1. Expand the subscription tree item to reveal the caches belonging to it.

  2. Click on a cache item to see its properties.

Contributing

There are several ways you can contribute to our repo:

  • Ideas, feature requests and bugs: We are open to all ideas and we want to get rid of bugs! Use the Issues section to report a new issue, provide your ideas or contribute to existing threads.
  • Documentation: Found a typo or strangely worded sentences? Submit a PR!
  • Code: Contribute bug fixes, features or design changes. See the wiki for instructions.

Known Issues

  • Connections to clustered caches do not use SSL due to an ioredis issue.
    • (Connections to non-clustered caches always use SSL.)

Legal

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

License

The source code in our public repository is licensed under the MIT license and may be locally built and used in accordance with this license.

vscode-azurecache's People

Contributors

dependabot[bot] avatar jeffreyca avatar kelzha avatar microsoft-github-policy-service[bot] avatar suryaren avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-azurecache's Issues

Make the number of elements loaded after "Load More" consistent

  1. HSCAN may return all the hash elements if hash size is small enough (<100).

    As mentioned in the Redis docs:

    When iterating Sets encoded as intsets (small sets composed of just integers), or Hashes and Sorted Sets encoded as ziplists (small hashes and sets composed of small individual values), usually all the elements are returned in the first SCAN call regardless of the COUNT value.

    To avoid this, add way to internally control the number of elements to be shown after clicking "Load More..."

  2. When doing a filtered scan, sometimes only one result is returned after the first SCAN, although there may be many more matches

    We should continue scanning until we have loaded say max of 10 elements.

Extension not showing all keys in Redis

I installed this extension, when I connect I have only 1 key, e007 which I don't know where it comes from but no the others (almost around 100 items) as you can notice in the 2nd snapshot

EdisVSExt

here is a napshot when I query Azure redis
EdisVSExt_002

Changing filter in clustered cache always forces client to reconnect

When the key filter expression changes inside a cluster tree item, it refreshes the AzureCacheItem node, which will get a new ParsedRedisResource, disconnect, and reconnect to the cache.

In the non-clustered cache case, the key filter item is inside a DB tree item so a full refresh doesn't happen.

I was thinking in the case of a clustered cache, when the key filter changes, instead of calling refresh() on the entire cache tree item, just notify its children (the shard tree nodes) that the filter has changed.

Support virtual workspaces

👋 Hi there, Martin here, from the VS Code team.

Recently we've announced the Remote Repository feature that lets you browse and edit files and folders directly on GitHub.

Open Remote Repository... opens VSCode on a folder or workspace located on a virtual file system. We call this a virtual workspace. We observed that not all extension support this well, either because they can not, or they haven't thought about it.

It would be fantastic if you could test whether your extension can handle virtual workspaces:

Check out the Virtual Workspaces Extension Author Guide on how to do that.

When done, set the new virtualWorkspaces capability in your 'package.json'.

{
  "capabilities": {
    "virtualWorkspaces": true | false
  }
}
  • Use "virtualWorkspaces": true if your extension is prepared for virtual workspaces
  • Use "virtualWorkspaces": false if your extension should be disabled when a virtual workspace is opened

For questions and comments please use the Virtual Workspaces Tracking Issue.

Thanks for the support and the great work! ❤️

String localization

VS Code extensions typically use vscode-nls to support externalization/localization.

The vscode-nls-dev is a tool that automates the extraction of strings to be externalized from TS and JS code

Azure cache vs code extension error

Does this occur consistently? No
Repro steps:

  1. Let VS Code sit idle

Action: azureCache.refresh
Error type: ENOTFOUND
Error Message: getaddrinfo ENOTFOUND management.azure.com

Version: 0.1.0
OS: darwin
OS Release: 22.1.0
Product: Visual Studio Code
Product Version: 1.76.0
Language: en

Is this project still maintained?

Hi,

I recently installed the extension and was able to use it for very basic concepts. I even faced an issue, but was unable to file it under the right repository (see microsoft/azcode#38 for reference).

Looking at the issues, they don't have much activity nor answers and I wondered whether it would be worth for me to file the problem I had or not. The last commits date from August 2020 (notably @JeffreyCA and @kelzha as contributors) and the extension is technically in preview.

Thank you for your time. 😄

Duplicate webviews may exist after refreshing parent's tree item

Subscription1
|-- Cache1 <=> webview1
|-- Cache2 <=> webview2

Currently, webviews are associated with a particular instance of a Cache tree item. But when you refresh the parent node of a Cache tree item (i.e. Subscription tree item), it discards all of its current child items and re-creates new ones.

Say for instance the user has the cache properties webview open for Cache1 and then refreshes the subscription tree node. If they click on the cache tree node again, instead of focusing the existing webview it opens another webview, resulting in two cache properties webviews for the same cache.

Demo:
recording (2)

Cannot connect to clustered cache over SSL

There is a bug in ioredis (redis/ioredis#1149) that prevents it from connecting to a clustered Azure cache over SSL, so the extension always connects over non-SSL for clustered caches.

This is not ideal and users cannot connect to clustered caches that are SSL-only.

Support Workspace Trust

Hello 👋 I'm from the VS Code team.

Recently, we have been exploring a security feature we refer to as Workspace Trust. This feature is intended to centralize and unify a security conscious decision required by a variety of VS Code features. With workspace trust, the user will be able to declare whether or not they trust the folder that is opened in VS Code before these features are executed.

Why you should care

Your extension is incredibly popular with VS Code users! We want to make sure that those users have a delightful experience with workspace trust and that includes extension authors deciding how much of their extension is supported in an untrusted workspace.

Workspace Trust experience

You can enable the feature with the following setting security.workspace.trust.enabled. Once enabled, you will see the following dialog when opening folders in VS Code.

Workspace Trust Startup Dialog

This dialog is important for allowing the user to make a decision early and understand the impact of their decision. Once you understand the feature, you may want to customize when to display the dialog using the setting security.workspace.trust.startupPrompt.

You can follow the development of Workspace Trust and provide feedback in issue #106488.

Workspace trust API

First off, all of what I am about to say can be found in issue #120251. That issue will include discussion of the feature and any updates to the feature.

The Workspace Trust extension API is now in stable. This allowed us to release the first cut of our guide for onboarding your extension to Workspace Trust. The API is small, so here is a quick look.

You can declare your extension to provide complete, partial or no support in untrusted workspaces using the untrustedWorkspaces capability in package.json.

The following example declares that the extension is supported completely in untrusted workspaces. In this case, the extension is enabled in untrusted workspaces.

"capabilities": {
  "untrustedWorkspaces": {
    "supported": true
  }
}

The next example declares that the extension is not supported in untrusted workspaces. In this case, the extension is disabled in untrusted workspaces.

"capabilities": {
  "untrustedWorkspaces": {
    "supported": false
  }
}

The third option is to declared limited support. There are three tools provided to you when you select the limited option.

First, if you have a setting that can be configured in the workspace but requires the workspace to be trusted in order to apply the workspace value, then you can include the setting using restrictedConfigurations array property in untrustedWorkspaces object. Doing so, VS Code will ignore the workspace value of these restricted settings when your extension reads these settings values using the VS Code Workspace Configuration API.

The following example declares the settings that are restricted in untrusted workspaces.

"capabilities": {
  "untrustedWorkspaces": {
    "supported": "limited",
    "restrictedConfigurations": [
      "markdown.styles"
    ]
  }
}

Next, you can also check and listen if the current workspace is trusted or not programmatically using the following API:

export namespace workspace {
  /**
   * When true, the user has explicitly trusted the contents of the workspace.
   */
  export const isTrusted: boolean;
  /**
   * Event that fires when the current workspace has been trusted.
   */
  export const onDidGrantWorkspaceTrust: Event<void>;
}

Lastly, you can hide commands or views declaratively with the isWorkspaceTrusted context key in your when clauses.

A far more detailed guide on how to onboard which will be updated as we receive feedback can be found in issue #120251.

Rollout plan

Workspace Trust will remain disabled for the month of May, but we are planning on enabling this by default in the future. To prepare for that day, we would love for you to try it out and provide feedback.

We'd love your feedback

Since this issue was created in an automated fashion, we won't be monitoring the responses in this issue (our notifications would explode!). Instead we ask you to drop questions, and feedback in issue #120251 as we've mentioned above.

We're excited to see what you do with workspace trust!

Add live info view

It would be a separate view from the Cache Properties where the user can see the results of the INFO Redis command in an organized way.

We could first focus on getting the results of INFO to display in a plain text document, and then consider rendering it in a webview. Supporting multiple webviews will need bigger refactoring.

Lower minimum version requirement

The minimum version is currently set to 1.47.0, which is the latest release minor version. Should lower it so it can reach more users.

Cannot read access keys

VS Code connects to the Azure Redis instance, but with errors. Error: Cannot read access keys

Show all keys in right side using a webview

This involves a fairly significant architectural change so it will be broken down into the following stages:

  • Collection key children (lists, hashes, sets, zsets) (PR: #25)
  • String keys (PR: #30)
  • All keys in a single view in webview

Built-in VS Code JSON formatter does not work

Syntax highlighting works fine, but pretty-print with carriage returns and spacing does not work (Alt+Shift+F). It would be helpful to have JSON formatted in a way that is more readable directly in the pane showing the field values for each redis db.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.