API split not clear

This page does not specify that each cosmos db account is for a single API only, and using multiple APIs means multiple accounts. It also doesn't say that multiple dbs in an API can be in one account. It's documentation that you have to piece together through a lot of reading and experimentation to determine. This ought to be explicitly stated.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: af9dbd47-fa87-2e2b-c359-820c51603c1e
Version Independent ID: 6fb95e4c-4472-022e-4198-8e3c0f76c40a
Content: Azure Cosmos DB resource model
Content Source: articles/cosmos-db/account-databases-containers-items.md
Service: cosmos-db
GitHub Login: @markjbrown
Microsoft Alias: mjbrown

@way0utwest Thank you for the feedback. We are actively investigating and will get back to you soon.

@way0utwest Thanks for your patience. Service Quota related information is mentioned in below document. Having multiple databases per account limit is also part of same document.
Per-account limits

Related to other query where we can use one API per account is also mentioned in another document.
Manage an Azure Cosmos account using the Azure portal

We understand your concerns but sometimes it is difficult to contain all information in single document. However content teams keeps on revising these documents.
Please let us know if this helps.

@way0utwest Please let me know if above details help.

Apologies, I don't typically respond to issues on the weekend, so I am a little delayed here.
This isn't really acceptable. The "Manage An Account" article is a practical, how-to article, so this isn't a place I would typically come to learn about how the service works, but rather then implementing or experimenting with the service. Same with the Service Quotas. That's a reference piece that isn't involved with learning.
As a SQL Server person, this is like saying that I ought to look at the Maximum Capacity Specifications when I want to know how many indexes I can create on a table. However, there, the Clustered and nonclustered indexes described article states there is one clustered indexes and specifically references a link to note you can check the number (as this doc handles multiple versions). Quote: " For details about index key limits see Maximum capacity specifications for SQL Server."
I completely understand that you do not want maintenance issues and have to make multiple updates, but I think that the Azure Cosmos DB Resource Model page is a place to explicitly call this out. When looking at migrating 2 MongoDB accounts, or 2 Azure Table Storage accounts and 1 Mongo DB account. I'd come here to decide if I need 1 account or 2 (or 3).
The second paragraph notes that the account is a fundamental unit, and the "Elements" section starts to describe what is in an account, but when listing the hierarchy, you don't specify that the databases that are created under one account must be of a single API type. Exactly what someone learning about Cosmos Db, in the Concepts section, would need.
Also, in the Choose an API doc, a similar issue. You repeat the marketing of modern, scaling, automatic, etc. terms, but never note in the "APIs" section that any single account is limited to one API type, and all the databases (or tables) in that account, are of the same type. Touting the multiple APIs without explaining this architectural limitation is very misleading.

This is not a topic we see much confusion whether customers can create a single account that supports all API's simultaneously. There is no multi-model database I am aware of that does this. Additionally, most customers first experience starts by provisioning an account in the portal. The API type is a drop down and not a multi-select which should tip off most folks that they must make a choice.
In either case what you are asking for is indeed called out on that page in in this graphic on the same page as you filed this GitHub issue against.

Thanks.

@markjbrown Thanks for providing the details.
@way0utwest We appreciate your concerns and your feedback, however as mentioned by Mark these details are covered in the same page as well, also while we create the account we cant select multiple APIs. Please let us know if this helps your concerns.

Hi @way0utwest we dint hear back from you please let us know if you have any other questions.

I appreciate the response, both from @markjbrown and @AnuragSharma-MSFT . If you feel this is sufficient, then I accept that.
I'm not sure you see my point, however. I was studying for the Cosmos DB exam, and specifically looking for an answer to this question. It wasn't clear. I don't think the "create an account or db" part is either, as I can create multiple databases, and I could easily see some assuming this means one account could host a Cassandra database and a MongoDB database. I thought that until I read through enough documentation to find the answer. The places I assumed it would be documented, on the initial page I listed, and in the Overview, it wasn't stated.
My view is that you have written the documentation as a group that has been evolving with CosmoDB, for customers who have been on a similar journey. I do not think you sufficiently account for people starting to use CosmosDB now.
If you think you have covered this, then feel free to close this issue. I won't continue to pester you or publicly complain. However, the power of the web is that we not only link things together, but we can put things in multiple places for people that journey along different paths.

We will proceed to close this issue now.
If there are further questions regarding this, please comment and we will gladly continue the discussion.


Documentation property SmartContent

the parameter website_categories_operator is actually website_category_operator,
the question is both in plural or not, so change in code or in documentation?
website_tags_operator
website_categories_operator

i would change it in code @danrot what did you think?

Since the operator requires at least two categories to make sense I would also say plural, but this name is not too important for me.


Added support for custom margins

The marginsType option (from Electron's printToPDF spec) was strangely missing, so I added it in now as a CLI argument with the following options:

standard (0)
none (1)
minimal (2)

How does it look now, @MrSaints ? :)

This is fantastic! Thanks @rorz, and apologies for the delay.


Stryker with Mocha / Typescript results in different mutation score every run

Summary
When running stryker run with mocha and typescript it succeeds. However the issue is that on every subsequent run the score is different. No file manipulation is present, no changes to source are made during runs.
Reproduction

Please checkout the following branch:
https://github.com/ChannelApe/channelape-typescript-web-service-sdk/tree/feature/channelape-actions-controller-and-sqs-functions

Run npm i

Run npm run mutate
stryker_first_run.log
stryker_second_run.log

You will note that stryker succeeds. Make note of the mutation score

Run npm run mutate again

Now you will see that the score has changed. You may repeat this as often as you like, the score is different each time.

Stryker config
module.exports = function(config) {
  config.set({
    files: [
      "test/**/*.ts",
      "src/**/*.ts"
    ],
    testRunner: "mocha",
    mochaOptions: {
      files: ["test/**/*.ts", "src/**/*.ts"],
      opts: "test/mocha.opts"
    },
    mutator: "typescript",
    reporters: ["clear-text", "progress", "html"],
    testFramework: "mocha",
    coverageAnalysis: "off",
    tsconfigFile: "tsconfig.json",
    thresholds: { high: 90, low: 70, break: 20 },
    mutate: [
      "src/**/*.ts"
    ]
  });
};

Stryker environment
+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>

+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>
Your Environment

software
version(s)

node
8.11.2

npm
6.4.0

Operating System
Windows

stryker_first_run.log
stryker_second_run.log

@csimko It can be caused because using windows or not enough space. Try to empty ram and CPU as much as you can, also check if there are not killed processes. Also try testing in headless browser if you are not doing it.

@csimko I can also reproduce this on my machine. The score seems to be more consistent if I don't test in parallel (maxConcurrentTestrunners: 1).
The transpiler errors seem to always be the same, so the issue really seems to be in your tests. What kind of application is it? What system resources (files outside of src and test, network ports on your system, etc) does it use?

I am seeing consistent runs on Linux with a score of 21,74%. Seems to be related to Windows indeed.

Thanks for testing it @archcry!

@Archcry, @simondel when I was making PR and testing on linux i also had inconsistent results (probably caused by memory limit) [travis tests it perfectly :/], but on windows it is not consistent at all. [Simondel PR is waiting for you :)]

I'm closing this issue for now. If you need any help from us, let us know!


AttributeError: 'DataFrame' object has no attribute 'append'

With pandas 2.0, the DataFrame method append has been removed. Solution: either use concat or _append.

fixed by mistakenly pushing directly in the master branch https://github.com/astrolabsoftware/fink-science-portal/commit/b7326ed4febe0e106c1e93565ea622c1c95218e8)


Updated to delay the bean resolution for TaskExplorer to later in the…

… lifecycle
TaskConfigurer was used to retrieve TaskExplorer by CTRConfiguration early in the bean lifecycle.   After SCT switched to 2.1.x the CTRConfiguration was configured prior to the autoconfiguration and thus the TaskConfigurer used by CTRConfiguration to retrieve the TaskExplorer wasn't present.  To prevent premature initialization of the TaskConfigurer (just to retrieve the TaskExplorer), we updated the ComposedTaskStepExecutionListener to use @Autowired for the TaskExplorer.  Thus TaskExplorer was set at the appropriate time in the lifecycle.
resolves #56

LGTM.  Rebased, squashed, and merged as 87213f0e6092944a02d73d904d28fc91a0aed554


Clarify pagination support

Pagination has been adopted by the Network Control v1.0 API based on the IS-04 Query API, but seems incompletely documented in this specification.
Is the paged trait REQUIRED to be supported by Network Control v1.0 API implementations? It seems so as specified now. This is not the case with IS-04 Query API, which allows a 501 Not Implemented response if the API does not support pagination.
There is also no discussion of how strictly-increasing creation and update timestamps are associated with each resource type in the API. Probably it can be assumed that the API must give Endpoints and Network Flows an initial creation (and update) timestamp at the initial PUT request, and the update timestamp is modified at each PATCH. It is perhaps less clear for Network Devices and Network Links how these timestamps are decided.

Looks like pagination may be copy/paste from other specs as there is no mention of endpoint/flow creation timestamp in schema. Should we add this support later? Considering these objects should be less than 1KB, we should be able to support large numbers w/o any pagination day one, regards ..Sachin
From: Gareth Sylvester-Bradley<EMAIL_ADDRESS>Reply-To: AMWA-TV/nmos-network-control<EMAIL_ADDRESS>Date: Tuesday, October 22, 2019 at 8:41 AM
To: AMWA-TV/nmos-network-control<EMAIL_ADDRESS>Cc: Subscribed<EMAIL_ADDRESS>Subject: [AMWA-TV/nmos-network-control] Clarify pagination support (#25)
Pagination has been adopted by the Network Control v1.0 API based on the IS-04 Query API, but seems incompletely documented in this specification.
Is the paged trait REQUIRED to be supported by Network Control v1.0 API implementations? It seems so as specified now. This is not the case with IS-04 Query API, which allows a 501 Not Implemented response if the API does not support pagination.
There is also no discussion of how strictly-increasing creation and update timestamps are associated with each resource type in the API. Probably it can be assumed that the API must give Endpoints and Network Flows an initial creation (and update) timestamp at the initial PUT request, and the update timestamp is modified at each PATCH. It is perhaps less clear for Network Devices and Network Links how these timestamps are decided.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Are you saying pagination is in the v1.0 spec but not supposed to be?
What scale of network is this API designed to support? Thousands of endpoints/network flows/etc.?
In IS-04, creation/update timestamps are not part of the resource data, they are metadata associated with the resources, used primarily for pagination.

Resolved by #41, #43.


Add a workflow to sync examples repository

What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?:

Close this because the workflow was added in the examples repository.


discuss epoch sampling for confmat cells

We need to discuss strategies for handling cases when the number of epochs exceeds the available pixels (sampling problem)

@gfrogat Do you mean discussiong it in the paper or implement a solution in the paper prototype?

ideally both 🙂
I have to look into how the heatmaps are currently implemented and how we sample the data


tkn version command display pipeline version as devel instead of 0.14.0

Expected Behavior
tkn version should display pipeline version as 0.14.0 when installed from released yaml
Actual Behavior
tkn version displaying pipeline version as devel when installed from released yaml
Steps to Reproduce the Problem

Install pipeline from latest release
kubectl apply -f https://github.com/tektoncd/pipeline/releases/download/v0.14.0/release.yaml
tkn version
output

tkn version
Client version: dev
Pipeline version: devel

Additional Info

Kubernetes version:

Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.0", GitCommit:"641856db18352033a0d96dbc99153fa3b27298e5", GitTreeState:"clean", BuildDate:"2019-03-25T15:53:57Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:09:08Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}

Tekton Pipeline version:

0.14.0

/assign @vdemeester

https://github.com/tektoncd/cli/issues/1055#issuecomment-655305701

I fixed the release.yaml for the time being (and there is a bugfix for this not to happen in the next releases, will be in a 0.14.1 too).

$ tkn version
Client version: 0.10.0
Pipeline version: v0.14.0
Triggers version: unknown

#2900 has been merged, should also be fixed when doing 0.14.1
/close


Check with 'doc' feature

The move to optional dependencies broke documentation generation. The issue manifests in docs.rs, which cannot generate documentation for the 0.4.2 release. This PR

fixes the build with the "doc" feature
adds a job in CI to check for this kind of build

Since this doesn't affect end users, I'm not planning a release to correct docs.rs usage. In the interim, we'll host docs in this repo. The next release's docs will be on docs.rs


fix(content-switcher): adds class for hidden content, don't rely solely on hidden

Adds class for hidden content, don't rely solely on hidden
Resolves https://github.com/carbon-design-system/carbon-components/issues/743
We were relying solely on hidden attribute, which can be overriden by css display properties. Adds in an extra class that sets display: none; to enforce the contents hidden-ness.
Added

.bx--content-switcher--hidden which hides content

Removed

Extra, commented-out code

Testing / Reviewing
Ensure hidden classes are added to hidden content sections, here is an exmaple block that can be pasted in to content-switcher.hbs

test 1

test 2

test 3

Ah, that could work as well. I like that since it is less code 😄 Will update

Actually, taking a deeper look at this, we don't provide any classes like .bx—content-switcher__panel. It seems we rely on the data-target, i.e data-target=".demo--panel--opt-1" in our examples, and add the hidden attribute that way.
We can either:

Add a class of .bx—content-switcher__panel when we add the hidden attribute and then target  .bx—content-swithcher__panel[hidden] css
Keep this PR as is and add .bx—content-switcher--hidden

Yeah, I think I lean towards your second option. I don't see a pressing need for this, and if an offending application overrides the hidden attribute, it should be the responsibility of that team. Going to close this PR and the associated issue.


DAEMON-424: Replace std streams before loading the main class

DAEMON-424 has been fixed using the provided patch file. This pull request is obsolete.


New option in server config: DisableMulticastLoopback.

New option in server config: DisableMulticastLoopback.
Setting this option to false (default) sets the IP_MULTICAST_LOOP socket option
to true on the multicast sockets opened by the mDNS server.  This is necessary
for other sockets on the same machine to receive packets sent by the server and
thus discover the service.

What's the point in the change? Have have an option to disable multicast loopback when this is for multicast dns?

mDNS often do not need to be discoverable on the same system.It may not be worth merging.

Unfortunately I'm going to opt for not merging as I'm not really seeing the benefit in this specific use case.


fix 4 Readme updated

@auremoser  Updated README.md with the information on "how to set up Mozilla Study Group locally". If it looks good, I will update it in README-hi.md!

@auremoser Please review it!

@auremoser thank you! Let me know for any changes!


When a service goes down, because the ttl mechanism won't get the suspended node, why does the master need to monitor the service node changes stored in etcd.

When a service goes down, because the ttl mechanism won't get the suspended node, why does the master need to monitor the service node changes stored in etcd.

Can you explain your issue with more detail?

why does the master need to monitor the service node changes stored in etcd.

I don't understand this?


Add ability to merge configurations coming from addons

Given an addon, pulled from mrs.developer we need the ability to be able to merge the default Volto configuration object with an addon one, then merge with the local project one.

We've taken this approach with out addons (visible in this file: https://github.com/eea/forests-frontend/blob/master/src/config.js ):

in the config.js file, we import configuration methods from other addon packages
we import all exports of Volto's config as:  import * as voltoConfig from '@plone/volto/config';
we call these configuration methods, passing the config object and allowing packages to mutate the config, with:

const config = [
    addonConfigA,
    addonConfigB,
].reduce((acc, apply) => apply(acc), voltoConfig);

and then export everything is needed from this reduced config object.

We took this approach and mutate the config directly in order to allow more freedom in how addons mutate the config, what we include from the addons (make some addon features optional, for example) and to reduce the need of large code blocks with many spreads.

One thing that was tricky and required some tooling work was allowing addon packages to have their own requirements, which meant we needed to npm install the addon, which then copies the addon to node_modules and needs to be that location. This could also be achieved, probably, with npm link.

Dupe and solved already :)

Dupe and solved already :)


Pluggable ModelMetadataProvider, Localized display name attributes

Created a pluggable ModelMetadataProvider framework and a provider
implementation allowing LocalizedDisplayName attributes to be placed on
view model properties

Closing since I got that weird merge in here. I'll create a new pull request and try again.


UI: Move shared V3 components to argo-ui

Summary
Move the shared UI component to argo-ui.
Use Cases
This will make it easier to reuse those components.
@dcherman @alexmt I think we should go over this list and make a determination:
Simple UI components (e.g. wrap a form input or add some feature to it):
ui/src/app/shared/components/button.tsx
ui/src/app/shared/components/chat-button.tsx
ui/src/app/shared/components/checkbox-list.tsx
ui/src/app/shared/components/data-loader-dropdown.tsx
ui/src/app/shared/components/drop-down-button.tsx
ui/src/app/shared/components/icon.ts
ui/src/app/shared/components/icons.ts
ui/src/app/shared/components/link-button.tsx
ui/src/app/shared/components/loading.tsx
ui/src/app/shared/components/notice.tsx
ui/src/app/shared/components/nudge.tsx
ui/src/app/shared/components/number-input.tsx
ui/src/app/shared/components/text-input.tsx
ui/src/app/shared/components/filter-drop-down.tsx
ui/src/app/shared/components/toggle-button.tsx
ui/src/app/shared/components/upload-button.tsx
ui/src/app/shared/components/tags-input/tags-input.tsx
Complex UI components:
ui/src/app/shared/components/editors/key-value-editor.tsx
ui/src/app/shared/components/editors/labels-and-annotations-editor.tsx
ui/src/app/shared/components/editors/metadata-editor.tsx
ui/src/app/shared/components/error-notice.tsx
ui/src/app/shared/components/object-editor/object-editor.tsx
ui/src/app/shared/components/object-parser.ts
ui/src/app/shared/components/resource-editor/resource-editor.tsx
ui/src/app/shared/components/zero-state.tsx
Fast SVG DAG rendering panel:
ui/src/app/shared/components/graph/coffman-graham-sorter.ts
ui/src/app/shared/components/graph/dfs-sorter.ts
ui/src/app/shared/components/graph/fast-layout.ts
ui/src/app/shared/components/graph/graph-panel.scss
ui/src/app/shared/components/graph/graph-panel.tsx
ui/src/app/shared/components/graph/icon.tsx
ui/src/app/shared/components/graph/label.tsx
ui/src/app/shared/components/graph/layout.ts
ui/src/app/shared/components/graph/pretty-layout.ts
ui/src/app/shared/components/graph/types.ts

Message from the maintainers:
Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.

I think most of these were not moved (although a few might have been). They won't be moved these days per https://github.com/argoproj/argo-ui/issues/453


Support custom nested fields injection

Currently the code-generator allow users to inject new custom fields to CRDs, e.g InlinePolicies in the iam-controller .
We typically using something like in the generator.yaml to instruct the code-generator to inject a new ABC field in XYZ resource spec.
resources:
  XYZ:
    fields:
      ABC:
        type: string

However this feature doesn't work well when trying to inject fields in a nested struct in the Spec/Status of a CRD. For example:
resources:
  XYZ:
    fields:
      A.B.C:
        type: string

A.B.C is supposed to inject a C field of type string in a new B struct in the top level field A. This is not currently the case and the code generator just transforms A.B.C to ABC.
We will need to extend the code generator to support inject custom nest fields into CRDs.
/assign @Vandita2020

/assign


Download link for file stored in database

Hello Volkan,
I have a database column of image type which contains an arbitrary file (pdf, excel, etc). Currently, this column is initialized by an outside process (outside of the webapp). How can I render this column in a grid or form as a download link?

I looked thru closed issues and I see some clues on how to store files in database rather than on disk but I did not find anything on how to implement a download link to such file. I would appreciate pointing me to an existing example or another resource. Many thanks in advance.

Hi Mark,
Try to do it like:
http://jsfiddle.net/pYpqW/
e.g. with anchor and data uri.
You can take static text block sample as starting point for your custom editor.

Hi Volkan,
Do you think this approach will work with very large files (20-30 MB in size)? Is there another method I could use?

Nope id recommend something like FilePage in that case, reading from db

I solved my problem by creating a simple .aspx file in the project which streams the file stored in database. Then I used the UrlFormatter attribute to create the link.
[DisplayName("File Name"), Size(255), ReadOnly(true), UrlFormatter(Target = "_blank", UrlFormat = "~/DownloadAttachment.aspx?id={0}", UrlProperty = "AttachmentId")]


Collatz Conjecture Added

Collatz Conjecture (3n + 1 number sequence) added.
Collatz Conjecture:
If n % 2 == 0 then n / 2
If n % 2 == 1 then 3(n + 1)
For each step of a given n that is greater than 0.
Each step is printed and counted until the sequence goes to the infamous 4,2,1 loop.

You're welcome 😊


Move cursor by paragraphs

This extension is one of my most used VSCode extensions. Sadly it does not appear to function correctly in the presence of code folding. The issue appears to be much the same as the one presented in #81498. I suggest moving this functionality into VSCode proper, perhaps by a new option in the to field of cursorMove.

Just an extra data point in support of this, it appears that the extension I mentioned doesn't work in notebook view.

Just an extra data point in support of this, it appears that the extension I mentioned doesn't work in notebook view.

I think I might be able to do this. I reviewed the relevant code and here are the list of things I think would need to be done:

Add functions to get the next/previous empty line to IViewModel https://github.com/microsoft/vscode/blob/044741569781be2f5842ae01bb5ceba4b26f1cc3/src/vs/editor/common/viewModel/viewModel.ts
Implement functions in viewModelImpl https://github.com/microsoft/vscode/blob/3564f180616c43054e2f7c3cdbcc75934dcc7d37/src/vs/editor/common/viewModel/viewModelImpl.ts
Add a pair of functions to perform the relevant cursor motions to https://github.com/microsoft/vscode/blob/7ecce71a487455c782eef943fb22af450ba07267/src/vs/editor/common/controller/cursorMoveCommands.ts. CursorState.fromViewState is the function to call to create a cursor at a given view position.
Add a new by property here: https://github.com/microsoft/vscode/blob/7ecce71a487455c782eef943fb22af450ba07267/src/vs/editor/common/controller/cursorMoveCommands.ts#L640
Update the parse function: https://github.com/microsoft/vscode/blob/7ecce71a487455c782eef943fb22af450ba07267/src/vs/editor/common/controller/cursorMoveCommands.ts#L698
Add the commands to the keymapping, default unbound
Write unit tests as needed. Not sure what your requirements for this are.

I think I might be able to do this. I reviewed the relevant code and here are the list of things I think would need to be done:

Add functions to get the next/previous empty line to IViewModel https://github.com/microsoft/vscode/blob/044741569781be2f5842ae01bb5ceba4b26f1cc3/src/vs/editor/common/viewModel/viewModel.ts
Implement functions in viewModelImpl https://github.com/microsoft/vscode/blob/3564f180616c43054e2f7c3cdbcc75934dcc7d37/src/vs/editor/common/viewModel/viewModelImpl.ts
Add a pair of functions to perform the relevant cursor motions to https://github.com/microsoft/vscode/blob/7ecce71a487455c782eef943fb22af450ba07267/src/vs/editor/common/controller/cursorMoveCommands.ts. CursorState.fromViewState is the function to call to create a cursor at a given view position.
Add a new by property here: https://github.com/microsoft/vscode/blob/7ecce71a487455c782eef943fb22af450ba07267/src/vs/editor/common/controller/cursorMoveCommands.ts#L640
Update the parse function: https://github.com/microsoft/vscode/blob/7ecce71a487455c782eef943fb22af450ba07267/src/vs/editor/common/controller/cursorMoveCommands.ts#L698
Add the commands to the keymapping, default unbound
Write unit tests as needed. Not sure what your requirements for this are.

The first two bullet points are not necessary:

Add functions to get the next/previous empty line to IViewModel https://github.com/microsoft/vscode/blob/044741569781be2f5842ae01bb5ceba4b26f1cc3/src/vs/editor/common/viewModel/viewModel.ts
Implement functions in viewModelImpl https://github.com/microsoft/vscode/blob/3564f180616c43054e2f7c3cdbcc75934dcc7d37/src/vs/editor/common/viewModel/viewModelImpl.ts

You can simply use getLineContent() and getLineCount() to find empty lines from the command implementation.
The other bullet points make sense to me. No need to add a keybinding, some simple unit tests should be fine, like having 2 empty lines, having empty lines at the end of the file, etc.

To verify, you can use the following keybindings:
{
    "key": "ctrl+down",
    "command": "cursorMove",
    "when": "editorTextFocus",
    "args": {
        "to": "nextBlankLine",
        "by": "wrappedLine"
    }
},
{
    "key": "ctrl+up",
    "command": "cursorMove",
    "when": "editorTextFocus",
    "args": {
        "to": "prevBlankLine",
        "by": "wrappedLine"
    }
}


How to react to actions like changing the current focused item or closing snap?

I'm thinking to add a colorscheme picker for snap but those are stoppers for me.
My plan with the current API is like

Producer stores the current colorscheme and produces the list of known ones.
A  preview that changes the colorsheme  to the one selected and shows something in the buffer (as it's required) like a line with several words highlighted using the termial_color_#   (this is a workaround to the fact that there is not, as far as I know, how to react to focusing an item)
If the user selects it we have nothing to do as the theme is already set.
If the user  cancels (ESC)  we just have to bring back the old colorscheme  (I don't know how to implement it properly or at least workaround it )

Really interesting ideas, I will have to think about the API for this, because it's definitely doable.


Get Chavah on the iOS and Android app stores

Given we're a PWA now, this might be easier than expected. https://www.pwabuilder.com will generate iOS, Android, and Windows Store packages from an PWA manifest.

I used PWA Builder to generate a Windows Store app. It's now in the Windows Store. https://www.microsoft.com/en-us/store/p/chavah/9nhkjb6lpptv
PWA Builder also is generating an Android and iOS app. We should submit those to the app stores.

Chavah is now on the Google Play store!

And now Chavah is the iOS app store - wooohoo!


README lacks instructions on how to add this repository to winget

Title. I've just installed winget and stumbled upon this neat community repository. Unfortunately I have no idea how to add it. I would assume the GitHub URL also serves as the winget repo URL, but apparently not:
> winget source add -n Community https://github.com/microsoft/winget-pkgs

Adding source:
  Community -> https://github.com/microsoft/winget-pkgs
An unexpected error occurred while executing the command:
No ranges for the specified operation were able to be processed.

I would submit a PR myself to fix this, but I don't know what the correct way to add the repo is.

@NSExceptional This repository is automatically added when you install WinGet by default so no need to add it manually.

Oh, hm. The URL that shows up in source list looks like it would be a different repo judging by the domain. Sorry


Add NCL support

Rad. I assume there's a language package you use that defines NCL?
Ah, yes indeed! It's yours! https://github.com/rpavlick/language-ncl

$ apm publish patch
Preparing and tagging a new version ✓
Pushing v2.26.3 tag ✓
Publishing<EMAIL_ADDRESS>✓


Improve "cannot setRegion" error message / failure mode

I am running vg and getting this error:
$ ./vg construct -r hg19.fasta -v NA12878.vcf
cannot setRegion on a non-tabix indexed file

help debugging would be appreciated
a more descriptive error message would be helpful here.

I see that it comes from vcflib but that's all I've got.

tabix is in htslib. You use it to
index "block gzipped" (bgzipped) files.
You use bgzip and tabix like this:
bgzip NA12878.vcf
tabix -p vcf NA12878.vcf.gz

Now you can use the VCF file for construction:
./vg construct -r hg19.fasta -v NA12878.vcf.gz

Probably the error message (and you're right that it's in vcflib) just
needs to indicate this process.
On Wed, Mar 11, 2015 at 12:04 AM, Ryan Williams<EMAIL_ADDRESS>wrote:

I am running vg and getting this error:
$ ./vg construct -r hg19.fasta -v NA12878.vcf
cannot setRegion on a non-tabix indexed file

help debugging would be appreciated
a more descriptive error message would be helpful here.

I see that it comes from vcflib
https://github.com/ekg/vcflib/blob/b1dfd7a73140f9b12cb8fd2a554d70188ff05cca/src/Variant.cpp#L1313
but that's all I've got.
—
Reply to this email directly or view it on GitHub
https://github.com/ekg/vg/issues/6.

Sorry if this is pedantic, but in case someone else gets caught by it
before the fix propagates to various repos that depend on vcflib.
On Wed, Mar 11, 2015 at 12:16 AM, Erik Garrison<EMAIL_ADDRESS>wrote:

tabix is in htslib. You use it to
index "block gzipped" (bgzipped) files.
You use bgzip and tabix like this:
bgzip NA12878.vcf
tabix -p vcf NA12878.vcf.gz

Now you can use the VCF file for construction:
./vg construct -r hg19.fasta -v NA12878.vcf.gz

Probably the error message (and you're right that it's in vcflib) just
needs to indicate this process.
On Wed, Mar 11, 2015 at 12:04 AM, Ryan Williams<EMAIL_ADDRESS>wrote:

I am running vg and getting this error:
$ ./vg construct -r hg19.fasta -v NA12878.vcf
cannot setRegion on a non-tabix indexed file

help debugging would be appreciated
a more descriptive error message would be helpful here.

I see that it comes from vcflib
https://github.com/ekg/vcflib/blob/b1dfd7a73140f9b12cb8fd2a554d70188ff05cca/src/Variant.cpp#L1313
but that's all I've got.
—
Reply to this email directly or view it on GitHub
https://github.com/ekg/vg/issues/6.

no that is perfect, thanks


"history/extreme events" needs more context

Currently you can enter the date on which an extreme event occurred, but there is no where to explain what the actual extreme event was. ESS attendees noted that "history/extreme events" (which expects a date) should be accompanied by another term that provides more context on the extreme event itself.
This may require submitting a ticket to the GSC? Please discuss then address. @turbomam @cmungall

Good one. There are a lot of MIxS terms like this that inefficiently address the need to identify noteworthy events and the dates on which they occurred. I'll dig up some more examples and make some suggestions.

https://github.com/microbiomedata/nmdc-schema/pull/545

@ssarrafan  can you add this to the sprint that starts monday the 12th

This is basically done. PR approved and merged. Need to add "todo". WIll do that in a different branch

Since the PR is merged, can we close this. Is there an issue for the addition of todos yet?


Allow local interface definition

It is impossible to define local interface in the function, but you can do it in the module.
module A {
  interface B{} // OK
}

(function X() {
  interface Y { } // Error
})();

I thought we had a bug for block-level interfaces somewhere already?
Anyway some compelling examples would be useful. It's just as easy to write a var declaration with a given type and use typeof x to refer to that shape, since you're probably going to consume the type that way regardless?

Agree, 'typeof x' is possible workaround.
I should get used to it.


WSHint: use esversion 6 while having an eslint file that says it

Issue Type: Bug

Have an javascript file and a .eslintrc.yml or .eslintrc.json file
on the eslint file :
parserOptions :
ecmaVersion: 6
on the javascript file, use the import from.
WSHint will say that you do not have the correct "esversion" while you clearly stated in your parserOptions file that you have es6.

Extension version: 1.9.1
VS Code version: Code - Insiders 1.39.0-insider (d3eb24828e2d977e4f3ac16ff1a332a020028464, 2019-10-04T05:27:12.385Z)
OS version: Windows_NT x64 10.0.18362

System Info

Item
Value

CPUs
AMD A10-9620P RADEON R5, 10 COMPUTE CORES 4C+6G (4 x 2495)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onnative_gpu_memory_buffers: disabled_softwareoop_rasterization: disabled_offprotected_video_decode: unavailable_offrasterization: enabledskia_deferred_display_list: disabled_offskia_renderer: disabled_offsurface_synchronization: enabled_onvideo_decode: enabledviz_display_compositor: disabled_offwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
11.47GB (4.37GB free)

Process Argv

Screen Reader
no

VM
0%

I've added pictures so it's better to see:

Opening same thread on jshint, since they're related to both extensions.

Solved on JSHint. -> Solution is to use the ESLint extension available in the marketplace : dbaeumer.vscode-eslint


"Couldn't load TypeScript from path undefined" error when open .astro file

Hey folks!
I have an issue with TypeScript in .astro files. I am using macOS 12.6 and Sublime Text 4 4126.
So, the problem is that TypeScript does not work in .astro files. I have both Astro and LSP-astro packages installed. When I try to open .astro file I get this error:

TypeScript work fine in .tsx files. I suppose, error is might be because of pnpm specifics, but I am not sure. Could you please look into it?
Thanks in advance!

It appears astro tries to utilize an existing typescript language server. I tried to add {ST}\DataPackage Storage\LSP-typescript\16.14.0\typescript-language-server\node_modules\typescript-language-server\lib\cli.js to PATH but it looks the script expects something else.
I am however not familiar enough with TypeScript, VS Code nor the architecture of Astro Language Server to find out what would be required to get that working.
It also appears, Astro ships a plugin for typescript language server, which I have no idea how to setup/install in ST's typescript language server plugin.
Sovling that issue, would require someone of more knowledge about Astro language server.

Is typescript installed in the project? Servers can sometimes find it automatically if it's installed.
I could look deeper into it but it would help to have a simple (or less simply) project that reproduces the issue.

I've just opened the preview.astro and see the error message as well. Both LSP-astro and LSP-typescript installed. Maybe should find a way to automatically point LSP-astro to LSP-typescript in some way.

But aren't astro projects typically node/npm-based? I would kinda expect problems when opening single files like that.

I have absolutely no idea. Never used Astro beyond getting Astro.sublime-syntax working.

Yeah, most likely those need package.json, node_modules and all that shebang.
Additionally the original comment is about using non-standard pnpm which uses some virtual/redirected file system or something so node_modules might not be visible to the server like with npm.
Thus I'm not touching it without a repo that reproduces the issue.

Hey folks, thanks for looking into it!
I put up small repo, where you may observe the issue - https://github.com/privetkuku/lsp-astro-sublime-issue.
TypeScript is used in the project and it's working for typescript files (just try adding dummy file like test.ts in the project and trigger some error).
Hope that helps!

Haven't looked at it yet but just a note about *.ts files... This server is not set up to open *.ts files so it working there is not that relevant as it's a different server that handles those (LSP-typescript).

For now you can add typescript dependency in your project and then set full path to it in the LSP-astro settings.
Add this (replace [...] with full path):
	"initializationOptions": {
		"typescript.serverPath": "[...]/lsp-astro-sublime-issue/node_modules/typescript/lib/tsserverlibrary.js",
	},

I guess this package would have to implement all this custom logic to lookup typescript in the project or fall back to bundled typescript like the VSCode extension does.

Thanks Rafał, it works!

Side question, do I understand corretly that tsserver is built fromtsserverlibrary.js?

Wouldn't it be enough to add typescript package to the list of dependencies and point initializationOptions to it?
	"initializationOptions": {
		"typescript.serverPath": "$server_directory_path/node_modules/typescript/lib/tsserverlibrary.js",
	},

Ideally LSP-astro should lookup and use typescript from the project first and only fallback to bundled otherwise.
This is because different versions of typescript can produce different results so it would be confusing to see different results from LSP and different when building the project.
Though it would be acceptable to use bundled typescript as a quickfix.

Same would apply to LSP-typescript, wouldn't it? A project could target any version of Typescript, while LSP-typescript always uses TS 4.8.3 at the moment.

No, LSP-typescript uses typescript from workspace if available. The difference there is that the typescript-language-server is the one that implements the logic to lookup typescript.
LSP-volar is an example of a package that does typescript lookup itself.
https://github.com/sublimelsp/LSP-volar/blob/eb60ac7cf2cdd358690017e51830973ac74e5365/plugin.py#L47-L50

Looks pretty simple. I wouldn't run a node script just to resolve a path though.

Wouldn't it be enough to add typescript package to the list of dependencies and point initializationOptions to it?
	"initializationOptions": {
		"typescript.serverPath": "$server_directory_path/node_modules/typescript/lib/tsserverlibrary.js",
	},

Hey, where is $server_directory_path variable get assigned?

In the lsp_utils dependency: https://github.com/sublimelsp/lsp_utils/blob/467636293a0e92e5797a6ad98423b70b97b42f80/st3/lsp_utils/npm_client_handler.py#L69-L73

The issue is resolved by LSP-astro v1.2.0+

I ran into the same problem while using the Astro LSP installed with Mason on Neovim. I installed TypeScript onto the project and it started working, thanks!


Allow registering user modules as NNCF modules for weight quantization

@ljaljushkin @vanyalzr

@ljaljushkin, indeed, I had to resort to this functionality in order to quantize the weight parameter of the custom "Conv1D" OpenAI module as defined here:
https://github.com/huggingface/transformers/blob/f3065abdb8805f5beaed9ff1e92ce874e655f5c9/src/transformers/modeling_utils.py#L919
This is how the patched code looks like - only the decorator was added:


fix: Fixed chart topologySpreadConstraints formatting & logic

Fixes #
Description
This PR fixes the formatting of the deployment topologySpreadConstraints (- on a separate line). It also removes the undocumented behaviour of ALWAYS adding the default labelSelector even if one has been explicitly provided to the chart values.
I've also added the same label selector logic to the afinity.podAffinity & affinity.podAntiAffinity patterns. This has the benefit of removing the requirement to use the tpl, which can have unintended side effects if used incorrectly, and will remove the potential for an (unlikely) issue if multiple charts were deployed with the same instance label.
How was this change tested?

Templated locally

Does this change impact docs?

[x] Yes, PR includes docs updates
[ ] Yes, issue opened: #
[x] No

Release Note

NONE

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jonathan-innis I've added some additional changes for affinity (see description). I'm not sure if any of these changes require release notes?

@stevehipwell I'm curious how other charts achieve this kind of behavior for topologySpreadConstraints, and podAffinity . This seems like a lot of complexity added to the templates directory to make things potentially slightly easier to configure in the values.yaml but it also obfuscates some values in affinity and topologyspread in the values.yaml that users are more familiar with, which might be more confusing. Thoughts?

@jonathan-innis this is the pattern I've gone with for my charts, coincidentally I was working on this pattern to use on my overprovisioner chart for Karpenter testing. The following options I have either tested or used but on balance this pattern seems to me to be the best.

Add template complexity, allow idiomatic values (the pattern in this PR)

Chart works as expected
Default selector labels for custom inputs is great
Complexity is visible (IMHO this is a good thing, cost fallacies cause significant issues)

Add template complexity but hide it in helpers, allow idiomatic values

Chart works as expected
Default selector labels for custom inputs is great
Harder for non Helm authors to understand

Support object or mulit-line string values, allow strings to be templated

Looks simpler
Complexity about which mode
No schema in string mode
No tpl edge cases as only used on string

Support templating in object, requires duplication of selector labels in each values block

Looks simple
Selector labels need duplicating (will cause issues if changes aren't replicated)
Someone WILL use it wrong and try and use the selector labels template which will break the chart

Support object or mulit-line string values, allow strings to be templated

Trying to understand which one this is. I assume this is the current state for the helm chart on things like podAffinity today. Also, I see you mention edge-cases on tpl. Not as familiar with these so I'm curious what the issues are with using this function from strings in the values like we are currently doing today.

@jonathan-innis the object or mulit-line string solution adds a check into the template to detect if the input is of type string, at which point tpl can be used, otherwise it uses the standard toYaml function without templating. It allows you to use the selector labels function for these blocks at the cost of two potential patterns and no schema support.
For the current chart, try using the selector labels function for the topology spread and you'll see how it breaks.
The benefit of the pattern in this PR is that the values are completely standard with the addition of providing default label selectors if they're omitted.

@stevehipwell I pulled back my initial approval here. I really want to nail down the value added here given that there's quite a bit of lines changed and added complexity for someone wanting to change this in the future. I see a lot of examples of helm charts just templating out the whole section (by letting the user specify everything) or using the tpl function to template out values that need to be converted at runtime, rather than having to case every individual part of the yaml

@jonathan-innis the code for this is complex because it's a complex problem to solve. I think that this pattern (or a variation of it) is the best way to solve the problem as it has no impact on the end-user and doesn't change the K8s API (other than allowing the omission of labelSelector); all the other potential solutions require the end user to either use a non-standard pattern and/or fully understand how Helm and the tpl function works. The point of Helm is to wrap these kind of considerations up in a way which is transparent to the end-user so this seems like a prime example of where Helm shines.
Would you like me to split this PR up so the changes to affinity are in a separate PR? I've been looking at the possibility of moving the logic into helper functions as some of my charts have multiple sub charts which all duplicate this logic but I'm still on the fence as to if this would be better for a chart with a single use of the logic.

@jonathan-innis I've added some comments.


Including bats-support as a submodule causes submodule update to fail on projects which use bats-file as a submodule

I am using bats-file for a project, and bats-file is included as a submodule in the repository. Attempting to execute git submodule update --init results in a error.
git submodule update --init --recursive
fatal: No url found for submodule path 'bats/bats-file/bats-support' in .gitmodules
fatal: Failed to recurse into submodule path 'bats/bats-file'

I have managed to work around the issue by rolling back to commit cc3fb8c, but I was wondering if this breaking change is intentional?

This was an accident that made it through the review process. I removed this on master.


Styling for Citation Search Results

When the user searches for their citation with the citation number on their ticket, the results should come back as a card similar to what was styled within AEM.
If the user fails to find their citation immediately with their citation number, the interview will prompt them to do an additional citation search with their name, driver's license number, and DOB. This could bring back multiple options.
If there is more than one option we need for the "result cards" to visually differentiate from each other and we need a way for the user to pick a citation from the list.
Recommendation is to investigate whether DocAssemble creates unique page  IDs that we can drop custom classes into?

@slowbot Great. We will need both. I imagine that we will need a custom data type or else all the radio buttons within our docassemble instance will get this treatment.
@rdeshpande Will you be able to implement this?

I was doing some searching in the documentation and it's not yet clear how best to build out a custom component type.
That said, wanted to share another possibility: it looks like you can just write raw HTML inline in each choice for a radio, e.g.:
---
question: |
  Test Question
fields:
- What is life?: some_variable
  datatype: radio
  choices:
    - <b>TEST</b>
    - Not Cool
    - OK

In this case, TEST will be rendered in bold. So, we could try rendering the static list using this approach, and once the A2P API is ready I can test generating this list programatically using a code block. @slowbot what do you think?

Per our chat, I think we can just go with your approach and I can just build the HTML manually based on your spec.

Don't think there are any followups here - going to close this.


entry(ticdc): clean up Synced state

What problem does this PR solve?

Issue Number: close #8449
What is changed and how it works?
Clean up Synced state, see issue #8449
Check List
Tests

Unit test
Integration test

Questions
Will it cause performance regression or break compatibility?
No
Do you need to update user documentation, design documentation or monitoring documentation?
No
Release note
None

/run-all-tests

/run-all-tests

/merge

/run-integration-test
/run-engine-integration-test


chore(main): release 0.8.1

:robot: I have created a release beep boop
0.8.1 (2024-03-07)
Bug Fixes

filter offline trek contents (af764ae)
handle checked switch value (e17e7e5)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/GeotrekCE/Geotrek-rando-widget/releases/tag/v0.8.1 :sunflower:


ASE with one substantive test

Based on this test from R package, wrote similar test for ASE and looks like it's working. Still want to write more tests

explicitly do not specify k as a command line argument in your ase implementation. The base-class takes care of all kwargs and such; if you specify k as an explicit argument, you won't be able to use the flexibility of being able to hot-swap dimensionality reduction algorithms.
I think calling things "Embedders" sounds weird; especially for ASE and LSE where the E stands for embedding. I would call it AdjacencySpectralEmbedding or something like that if you want to be more descriptive, or AdjacencySpectralEmbed or something like that.

I agree to AdjacencySpectralEmbed.
ASE need more documentation. One for the class and one for the fit function.

@bdpedigo your tests are random. This means that they could (note, with low probability, but COULD) arbitrarily fail. Add a seed before the for-loop so that the outcome of the test is deterministic. Also, if you note in the R code, the tests there construct a simple hypothesis test. I would add hypothesis testing instead of simply doing binary testing like you do.

hopefully most recent commit addresses those concerns @ebridge2?

seems fine; im checking your updated PR now. closing this one since you seem to say you want that branch to be integrated


Level up README and related markdown content

Level up and cleanup markdown content.
See .github#8 for details and recommendations, and common-utils for an example.

[x] README.md
[x] CONTRIBUTING.md
[x] DEVELOPER_GUIDE.md
[x] MAINTAINERS.md
[x] ADMINS.md
[x] SECURITY.md
[x] RELEASING.md
[x] TESTING.md
[x] other .md files

All templates can be found in https://github.com/opensearch-project/.github

Documentation has been updated recently in PR #85


OpenSuse Support

Issue: I'm using OpenSuse Tumbleweed. I want to use Oni but I can't install on here. Is there a way to install it one OpenSuse?

Why can't you install it? What did you try? What happened? Did you get any error messages?

Is there a "building" Oni Editor Tutorial?

Can you try instructions found on this page under setup and building? https://github.com/onivim/oni/wiki/Development

Thanks, I'll test it, if it doesn't work I'll reopen the issue.

@midnio Altenatively you can try the rpm listed here: https://github.com/onivim/oni/releases/tag/v0.3.6
Not sure if it's target is compatible with suse though.


Update http4s-circe, http4s-dsl, ... to 0.22.14

Updates

org.http4s:http4s-circe
org.http4s:http4s-dsl
org.http4s:http4s-ember-client
org.http4s:http4s-ember-server

from 0.22.6 to 0.22.14.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.http4s" } ]

labels: library-update, early-semver-minor, semver-spec-patch, commit-count:1

Superseded by #89.


Menu Button

Menu button should be on the right end of the navbar. Can someone try fixing it please?

Search bar included in the navbar block was the issue. Made it another form element.


This cache store does not support tagging.

Happend after update to 5.2.
Not sure if this has something to do with entrust but in the list I see that this issue has something to do with Repository->tags('role_user') and
Cache::tags('role_user') in EntrustUserTrait.php line 29
BadMethodCallException in C:\wamp\www\baseapp\vendor\laravel\framework\src\Illuminate\Cache\Repository.php line 380:
This cache store does not support tagging.
in Repository.php line 380
at Repository->tags('role_user')
at call_user_func_array(array(object(Repository), 'tags'), array('role_user')) in CacheManager.php line 296
at CacheManager->__call('tags', array('role_user')) in Facade.php line 216
at CacheManager->tags('role_user') in Facade.php line 216
at Facade::__callStatic('tags', array('role_user')) in EntrustUserTrait.php line 29
at Cache::tags('role_user') in EntrustUserTrait.php line 29
at User->save() in EloquentUserProvider.php line 78

Anyone else had this one?
And ideas?

I think I found the issue, maybe.
Note: Cache tags are not supported when using the file or database cache drivers. Furthermore, when using multiple tags with caches that are stored "forever", performance will be best with a driver such as memcached, which automatically purges stale records.

and here is the entrust trait:
//Big block of caching functionality.
    public function cachedRoles()
    {
        $userPrimaryKey = $this->primaryKey;
        $cacheKey = 'entrust_roles_for_user_'.$this->$userPrimaryKey;
        return Cache::tags(Config::get('entrust.role_user_table'))->remember($cacheKey, Config::get('cache.ttl'), function () {
            return $this->roles()->get();
        });
    }
    public function save(array $options = [])
    {   //both inserts and updates
        parent::save($options);
        Cache::tags(Config::get('entrust.role_user_table'))->flush();
    }
    public function delete(array $options = [])
    {   //soft or hard
        parent::delete($options);
        Cache::tags(Config::get('entrust.role_user_table'))->flush();
    }
    public function restore()
    {   //soft delete undo's
        parent::restore();
        Cache::tags(Config::get('entrust.role_user_table'))->flush();
    }

Could this be the issue and how can it be dealt with?

Yes, Laravel file and database drivers doesn't support tags. What you can do to while developing is change the driver to array in your .env file.
CACHE_DRIVER=array

i saw that already, but was changing the thing in config/cache.php lol
forgot the env setting, works great now, thanks.

should i change both settings?
.env file

CACHE_DRIVER=array

and in config/cache.php
'default' => env('CACHE_DRIVER', 'array'),

I have tried for all still i am getting error regarding cache
BadMethodCallException in Repository.php line 367:
This cache store does not support tagging.

I have the same issue with Laravel 5.1.29 when trying this command :
echo Entrust::hasRole('role-name');
BadMethodCallException in Repository.php line 294:
This cache store does not support tagging.

I changed to composer to "zizaco/entrust": "dev-laravel-5" and it solved it.
Blade directives
@if(Entrust::hasRole('admin'))
    ....
@endif

working but
@role('admin'))

This is visible to users with the admin role. Gets translated to role('admin')

@endrole

not.

I m facing problem while i am registering new user and setting role for that user in controller
/**
     * Create a new user instance after a valid registration.
     *
     * @param  array  $data
     * @return User
     */
    protected function create(array $data)
    {
        $user=User::create([
            'firstname' => $data['firstname'],
            'lastname' => $data['lastname'],
            'gender' => $data['gender'],
            'birthdate' => date("Y-m-d", strtotime($data['birthdate'])),
            'email' => $data['email'],
            'password' => bcrypt($data['password']),
            'temple' => $data['temple'],
            'refname' => $data['refname'],
            'refcontact' => $data['refcontact'],
        ]);
       $user->attachRole(2); // parameter can be an Role object, array, or id

        return $user;

    }

I am still the same error, even after update .env file and change to composer to "zizaco/entrust": "dev-laravel-5" :(

+1 when trying to create users with attached foreign key for role_id from the roles table.

Changing cache driver to array: CACHE_DRIVER=array fixed this issue for me, I am also creating user and attaching role directly after and have no issue. I'm using laravel 5.2.

CACHE_DRIVER=array is just a temporary fix for development, isn't it? I'd like to keep using the file cache driver on the production site but that isn't working right now. Any news on this issue?
Occured to me when registering a new user on a new L5.2 installation with "zizaco/entrust": "5.2.x-dev",

This is also an issue for me. I'm on L5.2 using "zizaco/entrust": "5.2.x-dev"

Same problem here with 5.2 using "zizaco/entrust": "5.2.x-dev"

Same problem here with 5.2

I'm having issues with this in 5.2 when I moved to production.  Is there a solution for production?

+1

+1

+1

+2

+3

.env CACHE_DRIVER=array
is worked for  me

Using array as a cache driver works, but it's an workaround and should not be used in production. Any other solution to don't use array as a cache driver? thanks in advance.

@pxpm - Changing to memcached fixed the problem for me as I didn't want to use array in production.  It does look like this has been addressed though so check out this: https://github.com/Zizaco/entrust/pull/547

Ultimately I made the decision that the best option was to start using memcached.

"zizaco/entrust": "dev-laravel-5" will solve this problem

change to cache array
CACHE_DRIVER=array
and dont forget to run
php artisan config:cache

+!

+5

Using the array cache driver locally is not a solution, that just disables caching.  So while Cache methods will work, no data will actually be available between requests.

This cache feature I guess is perfect for big/performant systems.
But for something quick I just switched to
https://github.com/caffeinated/shinobi
Because is quicker to configure and already has a GUI and I'm lazy.

+1

+1

+1

+1

.env CACHE_DRIVER=array
is worked for me
Thanks

It is possible to use apc, memcached or redis.

CACHE_DRIVER=apc
CACHE_DRIVER=memcached
CACHE_DRIVER=redis

Moreover, they are all preconfigured in homestead environment.

.env CACHE_DRIVER=array
works for me but since this is not a permanent fix. Have one of us found a permanent fix for this.
Thanks

@eduardoarandah, @CaptainHypertext: As far as I know doesn't array disable the cache, but restricts it to a single request only.
I just forked the project and played around a bit. Following code reduced my queries dramatically (40+ queries to 8):
/**
 * Big block of caching functionality.
 *
 * @return \Illuminate\Database\Eloquent\Collection
 */
public function cachedPermissions()
{
    $rolePrimaryKey = $this->primaryKey;
    $cacheKey       = 'entrust_permissions_for_role_' . $this->$rolePrimaryKey;

    if (Cache::getStore() instanceof TaggableStore) {
        return Cache::tags(Config::get('entrust.permission_role_table'))->remember($cacheKey, Config::get('cache.ttl', 60), function () {
            return $this->perms()->get();
        });
    }
    else {
        return Cache::store('array')->remember($cacheKey, 0, function () {
            return $this->perms()->get();
        });
    }
}

and
/**
 * Big block of caching functionality.
 *
 * @return \Illuminate\Database\Eloquent\Collection
 */
public function cachedRoles()
{
    $userPrimaryKey = $this->primaryKey;
    $cacheKey       = 'entrust_roles_for_user_' . $this->$userPrimaryKey;

    if (Cache::getStore() instanceof TaggableStore) {
        return Cache::tags(Config::get('entrust.role_user_table'))->remember($cacheKey, Config::get('cache.ttl', 60), function () {
            return $this->roles()->get();
        });
    }
    else {
        return Cache::store('array')->remember($cacheKey, 0, function () {
            return $this->roles()->get();
        });
    }
}

Full code is at https://github.com/marcoraddatz/entrust – will provide it soon via packagist.

@marcoraddatz Your version forked merge to master? how i can use some issues you fixed

CACHE_DRIVER=array worked for me as well on Laravel 5.2

@marcoraddatz @thanhdevapp @kickthemooon All these errors/alerts are fixed in branch master. Do a require of "zizaco/entrust": "dev-master" to install it. You can check the changes done to solve it in https://github.com/Zizaco/entrust/pull/547.

@thanhdevapp  You can either fork it or use it temporary until changes/PR are merged into this package.
Add this to your composer.json
  "repositories": [
    {
      "type": "vcs",
      "url": "git@github.com:marcoraddatz/entrust.git"
    }
  ],
  "require": {
    "marcoraddatz/entrust": "dev-master",
  }

@pjmartorell: Thanks for providing your solution! Yes, the exceptions are fixed, but a cache for non-taggable providers is still missing.
Right now, when using array or file caches, Entrust will query the DB every time a permission/role is requested—even though it's exactly the same query. To avoid that, I extended your code a bit, so that they are at least cached for the request.

@marcoraddatz Nice, but if there is a 'file' store defined, with your implementation, you are forcing the user to use an 'array' store.

@pjmartorell Yes, that is intended, because if the user would use the file cache, we would have to clean it up on changes. When using the array only, it's only valid for the request, so there's no need to clean it up later. :)

I changed to composer.json to "zizaco/entrust": "dev-laravel-5"  as well as updated my .env file and config/cache.php file to be CACHE_DRIVER array. Problem was solved for me

Hi all. I changed my .env CACHE_DRIVER=array and run php artisan config:cache but unfortunately after it I got a new error which is Fatal error: Uncaught ReflectionException: Class log does not exist in vendor/laravel/framework/src/Illuminate/Container/Container.php on line 73
Is there anyone here experience the same problem, or any knowledge on how to fix this, please help. Thanks!

See #422 for a fix that doesnt involve changing the cache driver.
It tells you to use the following version "dev-laravel-5" in your composer.json

+1

CACHE_DRIVER=array worked for me as well on Laravel 5.3.17

Will it be fixed?
Still switching to array in Laravel 5.3.19.

I can confirm that the issue still exists. Laravel v5.3.24, Entrust 5.2.x-dev.
Whenever I try to logout I get the following exception thrown:
BadMethodCallException in Repository.php line 391:
This cache store does not support tagging.

CACHE_DRIVER=array work for me on L5.3.24
remember to restart your web server.

Switching to array is not a solution if you use the DB for a cache in production.

Laratrust doesn't have that issue, which is based on Entrust.

I'm having same issues, I really wish to have a fix on this so we can use default cache driver "file" of Laravel. I've seen it working on a different project with cache driver. I don't know how the author succeed making it work with cache driver = "file". Can we expect a fix for this issue on a fresh Laravel installation with Entrust ?

I personally switched to Laratrust since it supports the "file" cache driver. It's pretty neat and has the same functionality like Entrust.

Ok thanks, would it still be compatible with Entrust permissions_roles, since our project is not starting... I was checking to fix cache driver issue before production. We'll probably use memcached too

If you're talking about the database tables, it's all the same. I haven't changed anything. And as far as I know, the methods to add/remove and update roles and permissions are the same mostly. Give it a try.

+1

Isn't there a release with the fix for this issue yet?

+1

+1

+1

+1

I was getting this same error as a result of a mis-configured installation of the Torann/laravel-geoip package.
This package uses cache_tags by default and I have to comment out a line in the geoip.php vendor config file after publishing the package. Like so:
 //'cache_tags' => ['torann-geoip-location'],
Problem solved for me.

its work
thanks

Try to config cache ( php artisan config:cache ) for laravel

if you're using homestead it has redis installed, just CACHE_DRIVER=redis

@lcdss is it safe to use array? You said that "While developing". Then what if in the production? Thanks for your answer.

I have CACHE_DRIVER=array and works fine !!! However I want to use CACHE_DRIVER=memcached.
I've tried to add on the .env file the memcached but it doesn't work. Keep saying Class 'Memcached' not found. I've tried to download memcached but I dont have apt-get in my shared server. What can I do ? Anyone can help me ?

@DiakosavvasN its a difficult problem with entrust, but hope, they will fix it soon. Anyways, you may try other package if you want to, because CACHE_DRIVER=array is not the right way to solve this kind of issue according to my research.

Any update on this?

Just change:
"zizaco/entrust": "5.2.x-dev"
TO
"zizaco/entrust": "dev-master"
then solved.
"dev-master" have Merged pjmartorell:fix-cache-tags

Just change:
"zizaco/entrust": "5.2.x-dev"
to
"zizaco/entrust": "dev-master"
Thats it

Yes, Laravel file and database drivers doesn't support tags. What you can do to while developing is change the driver to array in your .env file.
CACHE_DRIVER=array

Worked 100%. Thanks for the tip!

CACHE_DRIVER=file
doesn't support tagging, and changing it to array is not a best solution, as array cache is only limited to a request,
better to use redis or memcahce


feat(x/twap): implement reusable TWAP API

Background
We need to expose a geometric TWAP API. Its implementation would be almost identical to the arithmetic TWAP API.
Therefore, we must develop proper abstractions to reduce code duplication and avoid complexity.
Consider the current implementation of GetArithmeticTWAP():
func (k Keeper) GetArithmeticTwap(
	ctx sdk.Context,
	poolId uint64,
	baseAssetDenom string,
	quoteAssetDenom string,
	startTime time.Time,
	endTime time.Time,
) (sdk.Dec, error) {
	if startTime.After(endTime) {
		return sdk.Dec{}, types.StartTimeAfterEndTimeError{StartTime: startTime, EndTime: endTime}
	}
	if endTime.Equal(ctx.BlockTime()) {
		return k.GetArithmeticTwapToNow(ctx, poolId, baseAssetDenom, quoteAssetDenom, startTime) // difference 1
	} else if endTime.After(ctx.BlockTime()) {
		return sdk.Dec{}, types.EndTimeInFutureError{EndTime: endTime, BlockTime: ctx.BlockTime()}
	}
	startRecord, err := k.getInterpolatedRecord(ctx, poolId, startTime, baseAssetDenom, quoteAssetDenom)
	if err != nil {
		return sdk.Dec{}, err
	}
	endRecord, err := k.getInterpolatedRecord(ctx, poolId, endTime, baseAssetDenom, quoteAssetDenom)
	if err != nil {
		return sdk.Dec{}, err
	}
	return computeArithmeticTwap(startRecord, endRecord, quoteAssetDenom) // difference 2
}

With the GetGeometricTWAP(), all code would be similar besides the lines marked as "difference" in comments. Even the lines that differ would have the same API.
That is:

GetArithmeticTwapToNow would become GetGeometricTwapToNow
 computeArithmeticTwap would become  computeGeometricTwap

taking the same arguments.
Suggested Design
To avoid code duplication we should consider using strategy pattern.
// x/twap/strategy.go
type twapStrategy interface {
	getTwapToNow(
		ctx sdk.Context,
		poolId uint64,
		baseAssetDenom string,
		quoteAssetDenom string,
		startTime time.Time) (sdk.Dec, error)
	computeTwap(startRecord types.TwapRecord, endRecord types.TwapRecord, quoteAsset string) (sdk.Dec, error)
}

type arithmetic struct {
	keeper Keeper
}

var _ twapStrategy = &arithmetic{}

func (s *arithmetic) getTwapToNow(
	ctx sdk.Context,
	poolId uint64,
	baseAssetDenom string,
	quoteAssetDenom string,
	startTime time.Time,
) (sdk.Dec, error) {
	return s.keeper.GetArithmeticTwapToNow(ctx, poolId, baseAssetDenom, quoteAssetDenom, startTime)
}

func (s *arithmetic) computeTwap(startRecord types.TwapRecord, endRecord types.TwapRecord, quoteAsset string) (sdk.Dec, error) {
	return computeArithmeticTwap(startRecord, endRecord, quoteAsset)
}

Then, we can extract a reusable function that takes strategy as a parameter:
// x/twap/api.go

func (k Keeper) getTwap(
	ctx sdk.Context,
	poolId uint64,
	baseAssetDenom string,
	quoteAssetDenom string,
	startTime time.Time,
	endTime time.Time,
	strategy twapStrategy,
) (sdk.Dec, error) {
	if startTime.After(endTime) {
		return sdk.Dec{}, types.StartTimeAfterEndTimeError{StartTime: startTime, EndTime: endTime}
	}
	if endTime.Equal(ctx.BlockTime()) {
		return strategy.getTwapToNow(ctx, poolId, baseAssetDenom, quoteAssetDenom, startTime)
	} else if endTime.After(ctx.BlockTime()) {
		return sdk.Dec{}, types.EndTimeInFutureError{EndTime: endTime, BlockTime: ctx.BlockTime()}
	}
	startRecord, err := k.getInterpolatedRecord(ctx, poolId, startTime, baseAssetDenom, quoteAssetDenom)
	if err != nil {
		return sdk.Dec{}, err
	}
	endRecord, err := k.getInterpolatedRecord(ctx, poolId, endTime, baseAssetDenom, quoteAssetDenom)
	if err != nil {
		return sdk.Dec{}, err
	}
	return strategy.computeTwap(startRecord, endRecord, quoteAssetDenom)
}

and the existing GetArithmeticTwap exported function would become:
// x/twap/api.go

func (k Keeper) GetArithmeticTwap(
	ctx sdk.Context,
	poolId uint64,
	baseAssetDenom string,
	quoteAssetDenom string,
	startTime time.Time,
	endTime time.Time,
) (sdk.Dec, error) {
	arithmeticStrategy := &arithmetic{k}
	return k.getTwap(ctx, poolId, baseAssetDenom, quoteAssetDenom, startTime, endTime, arithmeticStrategy)
}

Similarly, we should be able to introduce geometric strategy and refactor GetArithmaticTwapToNow
Acceptance Criteria

twapStrategy interface is introduced in `strategy.go
arithmetic implementation is added to strategy.go

tested with coverage maximized

geometric implementation is added to strategy.go

tested with coverage maximized

getTwap function is introduced to api.go

thoroughly tested, having old tests ported from getArithmaticTwap
run these tests for both arithmetic and geometric strategies, minimizing code duplication in tests

getArithmeticTwap utilizes arithmetic strategy and calls getTwap

only have a few tests covering all code branches while porting the core tests to getTwap

getTwapToNow function is introduced to api.go

thoroughly tested, having old tests ported from getArithmaticTwapToNow

run these tests for both arithmetic and Geometric strategies, minimizing code duplication in tests

getArithmeticTwapToNow utilizes arithmetic strategy and calls getTwapToNow

only have a few tests covering all code branches while porting the core tests to getTwap

Similarly, introduce getGeometricTwap and getGeometricTwapToNow

The PR split could be done in the following way to limit the scope and simplify reviews:

Points 1-3
Points 4-5
Points 6-7
Point 8

First PR (1-3) can be started immediately while the rest is blocked on https://github.com/osmosis-labs/osmosis/pull/3420

@stackman27 please let me know if you're interested in picking this up
Would also appreciate reviews of the proposal from anyone to agree on the direction

Hi @p0mvn yea i can give points 1-3 a shot

This looks good to me. I don't expect other TWAP strategies to exist, but I like the abstraction pattern so that we can use it on other parts of the codebase

Sweet, thanks for reviewing @nicolaslara .
Could you please take a look at the first PR towards this when you have the time: https://github.com/osmosis-labs/osmosis/pull/3529

@stackman27 FYI, updated the A/C by adding a step 4 to cover changes we discussed in #3529

closed by #3696 , thanks @stackman27


Update toThrow() to be able to use Error.cause

Summary
Update toThrow() and toThrowError() to be able to use Error.cause.
Closes https://github.com/facebook/jest/issues/12053

Test plan

Test code
// sample.js

const testFunc = () => {
  const a = new Error("a");
  const b = new Error("b", { cause: a });
  const c = new Error("c", { cause: b });
  throw c;
};

module.exports = testFunc;

// sample.test.js

const testFunc = require("./sample");

const a = new Error("a");
const b = new Error("b", { cause: a });
const c = new Error("c", { cause: b });

test("pass: new Error", () => {
  expect(testFunc).toThrow(c);
});

test("pass: object", () => {
  expect(testFunc).toThrow({ message: "c", cause: b });
});

test("fail: new Error", () => {
  expect(testFunc).toThrow(b);
});

Result

Can you add a snapshot test or something which shows what the error looks like if the cause is different? all the messageAndCause calls seems uncovered in the failing case

I tried but snapshot tests are failed because they were obsoleted.
https://github.com/facebook/jest/actions/runs/3470613139/jobs/5799045755
I can't think of a good way to do this 🤔


Add PROPERTY_USAGE_ALWAYS_SHARE_ON_DUPLICATE flag

This adds PROPERTY_USAGE_ALWAYS_SHARE_ON_DUPLICATE flag. With this PR, Resource.duplicate will not duplicate Object.script property. Fixes #33079.

Please avoid including [funexpected] in the commit title, it's not relevant to what the commit does.
If you want to acknowledge your company as author, it's OK to do it in the commit description though, e.g.:
Add PROPERTY_USAGE_ALWAYS_SHARE_ON_DUPLICATE flag

Fixes #33079.
Contributed by funexpected.

Superseded by #71142.


Add to lontra-cli 'harvest-next' option

The lontra-cli is now able to list all resources that require a harvest. This option should take the first resource that requires a harvest and harvest it.

'--harvest' without arguments from the cli will perform this task