Improvements on scale bar

Description
Re-submission of a previous PR with new branch name. Unfortunately it appears that all pas comments have been discarded.
This PR introduces the option of adding a box behind the scale bar to improve legibility. It also gives user control on the color of the scale bar and of the box. The default behavior is preserved.
Screenshots that illustrate the logic:

Type of change

[ ] Bug-fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

References
Comments on the vanished PR
How has this been tested?
Illustration above shows how it works.
Final checklist:

[x] My PR is the minimum possible work for the desired functionality
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] I have added tests that prove my fix is effective or that my feature works
[x] If I included new strings, I have used trans. to make them localizable.
For more information see our translations guide.

Just adding here that
viewer.scale_bar.color = [0,0,0,1] for instance does not work because EventedModel appears to do an equality comparison that fails. Not sure how this is normally managed.

@goanpeca, @brisvag, @psobolewskiPhD : you commented on the previous PR. I updated tests, and everything seems to work. Is there anything more to do from my side?

@goanpeca, @brisvag, @psobolewskiPhD : you commented on the previous PR. I updated tests, and everything seems to work. Is there anything more to do from my side?

Just played with it a bit. Works as advertised. I love it.

Just played with it a bit. Works as advertised. I love it.

Me too! Love this :)
@isabela-pf would be great to have your input :)

Made the tests run, let's see how it goes @pierrethibault !

I love this! Increased legibility always makes my day; thanks for working on this! As always, I have a few questions to check on the experience.

Can users change the colors and background only in the console as of now? Is there another way to adjust them? I’d love to have this in the viewer settings, but I’d also understand if it’s outside the scope of this PR.
What is the default? Is it still the text color of napari’s theme (if I remember the last discussion)? Is there no background by default? I personally would prefer the background by default since you never know what image the user will open it on.
Is the scale bar fixed in place? What happens if there’s an area of interest covered by the scale bar?
Is there a reason that there are no units on the scale bar?
Is there any case where the number in the scale bar might change and/or needs to account for more characters?
Why does the scale bar not extend to the edge of the canvas and/or why is it uneven from the edge? This is nitpicky, I know. I won’t block on this, but I wanted to ask nonetheless.

Thanks for the tag @goanpeca!

Happy that you all find it useful!

I love this! Increased legibility always makes my day; thanks for working on this! As always, I have a few questions to check on the experience.

Can users change the colors and background only in the console as of now? Is there another way to adjust them? I’d love to have this in the viewer settings, but I’d also understand if it’s outside the scope of this PR.

Console only I didn't get into GIU. It feels like there are important usability/aesthetics considerations that falls outside my competences. Also, I don't have much time do dedicate to learning GUI programming...

What is the default? Is it still the text color of napari’s theme (if I remember the last discussion)? Is there no background by default? I personally would prefer the background by default since you never know what image the user will open it on.

For now I tried hard to not break anything, so the defaults are the same as before. So, no box as default. Exactly as I said above, I don't feel it's my role to decide how to change default behavior.

Is the scale bar fixed in place? What happens if there’s an area of interest covered by the scale bar?

No idea. I didn't change the positioning code, so I expect that it continues to do what it did before.

Is there a reason that there are no units on the scale bar?

Units can be turned on, but only from the console. This is a fantastic feature BTW.

Is there any case where the number in the scale bar might change and/or needs to account for more characters?

Not as far as I can tell. With units on, the orders of magnitude are taken care of by the suffixes (milli- , micro- , nano-, ...) so there are always at most 3 digits. The problem is with font size, but according to me it would be a pain to cover this edge case.

Why does the scale bar not extend to the edge of the canvas and/or why is it uneven from the edge? This is nitpicky, I know. I won’t block on this, but I wanted to ask nonetheless.

Not sure I understand. In my opinion it is more pleasing to the eye to keep a bit of space around the scale bar (and background box).

Thanks for the tag @goanpeca!

The test failures are most mysterious because I didn't touch that part of the code...

The test failures are most mysterious because I didn't touch that part of the code...

@pierrethibault @goanpeca I think those test fails are not related to this PR, but due to a dependency change. There was a PR with a fix: https://github.com/napari/napari/pull/4537
Perhaps you can merge main into this PR branch to get that fix?

Thanks for the reply @pierrethibault, that all sounds reasonable to me. I understand not wanting to change the default behavior, especially when no one seems to have asked for it but me 😆.
Looks good to me, though of course I'll take note via issue that I'd love to see this in the viewer settings long term!

@pierrethibault : I created a PR on top of this branch to make my suggestions more clear and to help get this PR merged: https://github.com/pierrethibault/napari/pull/1
If they look good to you, feel free to merge that new PR into your branch. If not, add some comments to this PR or that one and we should probably be able to get this in anyway.

@andy-sweet Thanks for this. I just merged your PR.

Failure is unrelated. Thanks again @pierrethibault !


Add macro-synteny-paf microservice

This will be similar to macro-synteny-blocks, but return a PAF file (format defined here) to applications such as JBrowse.

Current experimental branches: (destined for oblivion)
macro-synteny-paf branch: My first cut at a macro-synteny-paf microservice. It calls other microservices (genes, chromosome) instead of the Redis database. It also does not look up chromosome names from the genome prefix, instead we have to specify the chromosome name format and number of chromosomes in the URL.
https://github.com/legumeinfo/microservices/tree/macro-synteny-paf
pairwise-paf: This version uses macro-synteny-blocks/paf?genome1=[...]&genome2=[...] instead of a separate microservice.
https://github.com/legumeinfo/microservices/tree/pairwise-paf
It is very slow for some reason.

Since then we have discussed how to do it properly. My understanding of how this works:
macro-synteny-paf takes two genome prefixes (for the query and target), and looks up their chromosome names.
For each query chromosome, it calls a version (to be developed) of macro-synteny-blocks that takes the chromosome name instead of the chromosome's gene families, looks up the ordered list of gene families, and passes these and the target chromosome names to pairwise-macro-synteny-blocks which computes the target blocks and passes them back through macro-synteny-blocks to macro-synteny-paf.
Finally it assembles the PAF file, either by looking up the block positions itself, or (also to develop) we could include them in the target blocks.


Add support for moving panes and tabs between windows

Lo! Harken to me, for I shall divulge the heart of the tab tear-out saga. Verily, this PR shall bestow upon thee the power to move tabs and panes between windows by means of pre-defined actions. Though be warned, it does not yet grant thee the power to drag and drop them as thou mayest desire. Yet, the same plumbing that underpins this work shall remain steadfast. Behold, the majority of this undertaking concerns the elevation of the RequestMoveContent event from the TerminalPage to the very summit of the Monarch. From thence, a great AttachContent method shall descend back to the lowest depths. Furthermore, there are minor revisions to TermControl that shall enable thee to better detach the content and attach it to a new one.
This is the most important part of the tab tear-out saga. This PR enables the user to move tabs and panes between windows using pre-defined actions. It does not enable the user to drag/drop them yet, but the same fundamental plumbing will still apply. Most of the PR is plumbing the RequestMoveContent event up from the TerminalPage up to the Monarch, and then plumbing an AttachContent method back down. There are also small changes to TermControl to better support detaching the content and attaching to a new one.
For testing, I recommend:
        { "keys": "f1", "command": { "action": "moveTab", "window": "1" } },
        { "keys": "f2", "command": { "action": "moveTab", "window": "2" } },

        { "keys": "f3", "command": { "action": "movePane", "window": "1" } },
        { "keys": "f4", "command": { "action": "movePane", "window": "2" } },

        { "keys": "shift+f3", "command": { "action": "movePane", "window": "1", "index": 3 } },
        { "keys": "shift+f4", "command": { "action": "movePane", "window": "2", "index": 3 } },

Related to #1256
Related to #5000

Pass audit too!

And fix pre-existing, spellbot hates it


Error when retiring an Attribute Terminology

I retired an Attribute and went into All Items Index in the Orchestrator to check the display.

I then retired the Attribute Terminology and checked the Orchestrator. When I refreshed the page, the error was displayed.

It is now not in the All Items Index or Attribute list:

Do we have to remove the Attribute Terminology to Data Element CodeSet links when we retire items?

I cannot replicate what you are describing. Here is what I did, since I did not find a retired PATIENT DIAGNOSIS INDICATOR:

Used the CR8000 branch
In Mauro, found the PATIENT DIAGNOSIS INDICATOR attribute and retired it:

Then I navigated to the PATIENT DIAGNOSIS INDICATOR attribute terminology and retired that:

This is what I see in the preview:

Without better defined steps to replicate your issue, I cannot provided any further advice.

@pjmonks - I retired the item in the test branch.
It is not in the All items index as per my screen shots above.
The screen shot you have provided above is not correct as all codes have to be removed.
Do we have to remove the Attribute Terminology to Data Element CodeSet links when we retire items?

Peter to investigate.
Do we have to remove the Attribute Terminology to Data Element CodeSet links when we retire items?

This issue has been fixed and deployed to TEST, TRAINING and LIVE. Please move this to the "Ready for NHS E Testing" state.

The fix was that retired attributes no longer show the National Codes.

I have retired PATIENT DIAGNOSIS INDICATOR in the new CR8008 and it displayed Ok in the All Items Index and on the Attribute.

I then retired the Attribute Terminology and received an error message

I have tested this on my local environment and found no issue. Also, there is no PATIENT DIAGNOSIS INDICATOR attribute in the CR8008 branch.

The issue has been caused as I was trying to break the link between the Class and the Attribute but actually deleted the Attribute rather than the link.
I have created a new ticket to address this: #585


Cannot read property 'uri' of null

Issue Id: a1c1500d-69bb-ed7d-65d5-f041025e32dfVersions - 1.14.1Stack TypeError: Cannot read property 'uri' of null/vs/platform/extensionManagement/node/extensionGalleryService.ts#L515:57 (uri)vs/workbench/electron-browser/vs/base/common/winjs.base.raw.js#L1566:0 (onComplete)/vs/platform/extensionManagement/node/extensionGalleryService.ts#L511:32 (then)/vs/platform/extensionManagement/node/extensionGalleryService.ts#L408:14 (getAsset)/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts#L175:30 (getManifest)/vs/workbench/parts/extensions/browser/extensionEditor.ts#L250:53 (getManifest)/vs/base/common/cache.ts#L20:23 (task)/vs/workbench/parts/extensions/browser/extensionEditor.ts#L372:56 (get)/vs/workbench/parts/extensions/browser/extensionEditor.ts#L747:16 (loadingTask)/vs/workbench/parts/extensions/browser/extensionEditor.ts#L372:14 (loadContents)

duplicates #34462


[Alerting] Node disk is running full within 24 hours default alert is unexpectedly firing

Version: master-head (v2.3) (9/5/19)
What kind of request is this (question/bug/enhancement/feature request):
Bug
Steps to reproduce (least amount of steps as possible):

Enable alerting

Result:

After a while Node disk is running full within 24 hours alert may fire even though all linux nodes appear to have sufficient free space

@aiwantaozi I see the same issue as the Windows Expression issue. No metric graph data. And the expression results in No data Points in prometheus for me.

Yes, you could see it would alert when the value is not null, so it wouldn't have any value, this is an alert for the disk is running full within 24h, also an example to tell the user they can input an expression without threshold. There shouldn't have any graph when the predicted value of disk space is not less than 0, you could update the expression to another value, like<PHONE_NUMBER>(1G) or other values

Thanks. I will create a separate issue to track this secondary issue as Logan has requested in https://github.com/rancher/rancher/issues/20122

Version: master-head (v2.3) (9/9/19)
I have been trying various things and can never get the rule to fire. I successfully got the Windows node disk alert rule to fire, but never the linux version.
To test I basically did the same as my windows test. I would create files about 1GB in size and every 10 mins create another. Eventually I got to 78% disk utilization in as little as an hour. The rule will never fire.
This is also true if I decrease the timeframe for predict_linear(node_filesystem_files_free{mountpoint!~"^/etc/(?:resolv.conf|hosts|hostname)$"}[6h], 3600 * 24) < 0
For example I tried the following. None of these worked (rule never fires)
predict_linear(node_filesystem_files_free{mountpoint!~"^/etc/(?:resolv.conf|hosts|hostname)$"}[10m], 3600 * 24) < 0
predict_linear(node_filesystem_files_free{mountpoint!~"^/etc/(?:resolv.conf|hosts|hostname)$"}[20m], 3600 * 24) < 0
and 30m, 1h, etc and tried changing timescale to all sorts of time ranges and made no difference.
I think that there may be a mistake in the expression or something. Have we ever seen this work since the change? Also the range vector is different in this than the widows one. Is this expected? I think so but it doesn't seem to work right.
I can see that data is indeed changing I can query prometheus like:
predict_linear(node_filesystem_files_free{mountpoint!~"^/etc/(?:resolv.conf|hosts|hostname)$"}[10m], 3600 * 24) > 0
Notice the change of < to > operator. As I fill up disk space the values indeed change over time so data is coming in to prometheus correctly I just think the expression might possibly be not correct.

Version: master-head (v2.3) (9/11/19)
This is now working correctly. Thank you for all the help.
This alert now fires exactly like the windows disk alert does.
When I start slowly increasing disk space in a manner that will trigger the prometheus function the alert triggers as expected. Later the alert is resolved and I get a resolved message (since I opted into this notification for my notifier).
I didn't identify any issues during my testing.


remove usage of forc_util

forc-explore still depends on forc-util package within the Sway repo, but the only usage of this is to init the tracing_subscriber. To avoid depending on forc-util entirely we could just extract the init_tracing_subscriber function it uses here instead.
Of course this would be a slight inconvenience since any changes to the subscriber would potentially have to be copied here if we want tracing to behave exactly the same, but my impression is that the tracing subscriber won't undergo too many changes generally, and it would be trivial to apply changes in both repos either way.
cc @FuelLabs/tooling for thoughts

@bingcicle Perhaps we can extract the tracing stuff into a tiny forc-tracing crate? This might be useful in general for 3rd party plugins that want uniform logging behaviour with forc but without all the forc-util dependencies (which includes the entirety of sway-core heh).

That's a good suggestion. I take it as this new forc-tracing will be a standalone repo?

I take it as this new forc-tracing will be a standalone repo?

Yeah I think I'd keep it in the sway repo alongside forc-util, forc-pkg and forc.


[MDCT-2958]: Have repeatedFields created with form

Description

Related ticket(s)

MDCT-2958

How to test

Create a report
Go to Page 2 of State and Territory Initiatives or page 3
Use the modal and click yes to see 12 fields that are repeated from 1 wp.json field!
Check to see if they save
Check to see if they hydrate when opening the modal
Check to see if they clear if you swap to No in the choice list
Check to see if they populate the entitycard correctly

Author checklist

[x] I have performed a self-review of my code
[x] I have added thorough tests, if necessary
[x] I have updated relevant documentation, if necessary

@ntsummers1 For page 2, if you select yes and fill out the quarters should they be displayed on the cards?

@gmrabian Nick fixed the quarters showing up when the answer is 'no' in this PR, the other text bug is getting fixed in a different PR.


custom mimetype support - add direct JSON

Can we add some way to pass JSON through displayDataToJson for the new custom mimetype? Rarndom thoughts are
a) add a separate mimetype - e.g.  MimeCustomJSON Text - which can then be used in disolayDataToJson in a similar way to how MimeJson/MmeVegaite/MimeVega is handled
b) or change the MimeCustom type to treat the value in displayDataToJson directly as an Aeson Value
The bit I'd like to be able to handle is to pass a custom mimetype with a Value, not a String, in the followig.
-- from https://github.com/gibiansky/IHaskell/blob/master/ipython-kernel/src/IHaskell/IPython/Types.hs

displayDataToJson :: DisplayData -> (Text, Value)
displayDataToJson (DisplayData MimeJson dataStr) =
    pack (show MimeJson) .= fromMaybe (String "") (decodeStrict (Text.encodeUtf8 dataStr) :: Maybe Value)
displayDataToJson (DisplayData MimeVegalite dataStr) =
    pack (show MimeVegalite) .= fromMaybe (String "") (decodeStrict (Text.encodeUtf8 dataStr)
:: Maybe Value)
displayDataToJson (DisplayData MimeVega dataStr) =
    pack (show MimeVega) .= fromMaybe (String "") (decodeStrict (Text.encodeUtf8 dataStr) :: Maybe Value)
displayDataToJson (DisplayData mimeType dataStr) =
  pack (show mimeType) .= String dataStr

What is the problem you're trying to solve here? Could you encode the Value as a Text and use the existing data types? If it turns out to be necessary to add a new mimetype we can do that but I'm wary because each time it breaks backwards compatibility and complicates the interface.

I am trying to test out the custom mimetype by changing
instance IHaskellDisplay VegaLiteLab where
display (VLL vl) = let js = LT.unpack (encodeToLazyText (fromVL vl))
in pure (Display [vegalite js])
to
instance IHaskellDisplay VegaLiteLab where
display (VLL vl) = let js = LT.unpack (encodeToLazyText (fromVL vl))
vegalite' = "application/vnd.vegalite.v4+json"
in pure (Display [custom vegalite' js])
and it does not work because the custom message gets encoded as a String,
whereas the vegalite message gets special cased to handle JSON. It is
actually rather wasteful because I convert from Aeson to lazy text to
string, and them the vegalite encoding in displayDataToJson converts back
ti Aeson.
In this case an alternative is to just bump the vegalite mimetype from
v2+ to v4+, but a want to make sure we can handle the next time the
version gets updated (ie use the custom message until ihaskell can get
updated )
Doug
On Sat, May 16, 2020 at 10:29 PM Vaibhav Sagar<EMAIL_ADDRESS>wrote:

What is the problem you're trying to solve here? Could you encode the
Value as a Text and use the existing data types? If it turns out to be
necessary to add a new mimetype we can do that but I'm wary because each
time it breaks backwards compatibility and complicates the interface.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/gibiansky/IHaskell/issues/1173#issuecomment-629733240,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AABW27SP3G2RXZUXZSS6GUTRR5DYRANCNFSM4NDCHBPA
.

Okay, I'd accept a PR adding this additional mimetype.

I think this might be tricky to implement at least in part because of this line:
https://github.com/gibiansky/IHaskell/blob/d7dc460a421abaa41e04fe150e264bc2bab5cbad/ipython-kernel/src/IHaskell/IPython/Types.hs#L828
How would read know that something is a MimeCustomJSON instead of a regular MimeCustom?

#1176 is my initial attempt at this, but without resolving the readsPrec issue

I now am wondering if it would be better to just add an extra parameter to CustomMimetype to allow you to decide how the Text payload is converted to JSON - e.g. just Aeson.String or the fromMaybe (String "") (decodeStrict (Text.encodeUtf8 dataStr) :: Maybe Value) displayDataToJson (DisplayData mimeType dataStr) approach

Darn it. I was playing around with
data MimeType = PlainText
              | MimeHtml
              | MimeBmp Width Height
              | MimePng Width Height
              | MimeJpg Width Height
              | MimeGif Width Height
              | MimeSvg
              | MimeLatex
              | MimeMarkdown
              | MimeJavascript
              | MimeJson
              | MimeVega
              | MimeVegalite
              | MimeVdom
              | MimeCustom Text (Text -> Value)
  deriving (Eq, Typeable, Generic)

but the need instances give me pause (due to Text -> Value). We could instead have a simpler version, that lets you chose between String and  fromMaybe (String "") (decodeStrict (Text.encodeUtf8 dataStr) :: Maybe Value)

I've added a second commit which uses a different design (moves the choice for the encoding to the CustumMimetype type).

It still doesn't look like this new approach fixes the problem with readsPrec. I'm actually now leaning towards just keeping the wasteful old behaviour, it's far from ideal but I can't see another way that would also work sensibly in that case.

Do you want me to switch #1176 back to the original version?

I don't think it makes a difference, the original version had the same issue.

Given the way the Read instance works for other types (e.g. hardcoding width / height) I'm personally don't think it is a serious issue (and technically I think the second version is "better" for Read, but not massively so).

In coming back to this, we have
MimeCustom Text

which is - I think - processed by this step
displayDataToJson (DisplayData mimeType dataStr) =
  pack (show mimeType) .= String dataStr

What I want is for it to not encode the data as a String but as JSON, that is something like
displayDataToJson (DisplayData (MimeCustom mimeType) dataStr) =
    mimeType .= textToJson dataStr

-- pulled out as it's used in several mime types
textToJson :: Text -> Value
textToJson dataStr = fromMaybe (String "") (decodeStrict (Text.encodeUtf8 dataStr) :: Maybe Value)

Last time I tried I don't think I was able to do this as a user of IHaskell.Display - that is create the JS code and convert it to a String value for use with a custom mimetype, but I should go back and check this.

So, I've created a notebook showing that I can't seem to use the custom mimetype to replicate the vega-lite mimetype because of this. You can find it at https://gist.github.com/DougBurke/11009ad97320e352c21a0d7558bb0b8b but the gist "auto display" doesn't seem to want to work for me.
In writing this I did note that the vega-lite mimetype has been bumped up to v4 so that means I personally am not affected by this for the moment (although the vega/vega-lite schema keeps changing so it could be an issue in the future). So I'm probably/hopefully not going to be spending much time on this in the near future.


[Enhancement] Change the default value of storage_flood_stage_left_capacity_bytes

in pr #22575, we haved changed the default value of
storage_flood_stage_left_capacity_bytes to 100GB to
accommodate nowadays hardware environment, but
backend's corresponding configuration is forgotten.
What type of PR is this:

[ ] BugFix
[ ] Feature
[x] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Checklist:

[ ] I have added test cases for my bug fix or my new feature
[ ] This pr will affect users' behaviors
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

[x] I have checked the version labels which the pr will be auto-backported to the target branch

[x] 3.1
[x] 3.0
[x] 2.5
[ ] 2.4

@Mergifyio backport branch-3.1

@Mergifyio backport branch-3.0

@Mergifyio backport branch-2.5


Modal ProgressDialog: restore focus to owner

When using a modal ProgressDialog (with ShowDialog()) the focus does not return to the owner window.
Additionally, when running under Wine emulation on Linux, the window becomes unresponsive as it remains in disabled state.
This patch restores the behavior by calling user32.dll EnableWindow on the owner handle
Also solves issues like this:
https://stackoverflow.com/questions/21920645/ookii-dialogs-progressdialog-in-modal-style-doesnt-focus-owner-window-after-com

wrong upload, will fix and reopen


Attempt to install mysql N times, if not able to complete within a configurable timeout

These are the changes that I have described in: #287
The mysql installation process has introduced some flakiness into our CI environment, as it can get stuck and take minutes to complete.
After some extensive debugging, I was unable to pinpoint a specific cause. So a fix with a bit more debugging is to allow for the mysql install script to be "restarted" if it is taking too long, as per configs.
Unless these configs are applied, existing behavior of waiting for exit remains.
Also, I have a corresponding change to ch.vorburger.exec here:
https://github.com/vorburger/ch.vorburger.exec/pull/28 that this PR relies upon.

I'm quite reluctant to accept and merge this contribution... I mean, this is a kind of workaround for a very special problem - mysql_install_db is slow on your CI. (Nobody else ever reported a problem like this before.) Shouldn't you instead figure out the root cause of that problem, on your environment?
What I would be much more open for would be to make it easy for you to do what you propose here in your own code - just subclass and override, where you need? (If there's something that's not visible, then raise a PR for that.)
What do other past contributors
but also users of this project reading this think?

I can subclass in my code for now if there is reluctance.
So the only thing I would need for now is to make the method installPreparation() (which imo is better named createMysqlInstallProcess) protected.
Any opposition to this? If no, I can update this PR to just that change, which will enable me to make the other changes locally.

Created #300, which represents this same work.


update tag/linkback #10

REQUIRED: Add a summary of your PR here, typically including why the change is needed and what was changed. Include any design alternatives for discussion purposes.

update tag/linkback

REQUIRED: Fill out the below checklists or remove if irrelevant

If you are opening a PR for Official Notebooks under the notebooks/official folder, follow this mandatory checklist:

[ ] Use the notebook template as a starting point.
[ ] Follow the style and grammar rules outlined in the above notebook template.
[ ] Verify the notebook runs successfully in Colab since the automated tests cannot guarantee this even when it passes.
[ ] Passes all the required automated checks. You can locally test for formatting and linting with these instructions.
[ ] You have consulted with a tech writer to see if tech writer review is necessary. If so, the notebook has been reviewed by a tech writer, and they have approved it.
[ ] This notebook has been added to the CODEOWNERS file under the Official Notebooks section, pointing to the author or the author's team.
[ ] The Jupyter notebook cleans up any artifacts it has created (datasets, ML models, endpoints, etc) so as not to eat up unnecessary resources.

If you are opening a PR for Community Notebooks under the notebooks/community folder:

[ ] This notebook has been added to the CODEOWNERS file under the Community Notebooks section, pointing to the author or the author's team.
[ ] Passes all the required formatting and linting checks. You can locally test with these instructions.

If you are opening a PR for Community Content under the community-content folder:

[ ] Make sure your main Content Directory Name is descriptive, informative, and includes some of the key products and attributes of your content, so that it is differentiable from other content
[ ] The main content directory has been added to the CODEOWNERS file under the Community Content section, pointing to the author or the author's team.
[ ] Passes all the required formatting and linting checks. You can locally test with these instructions.

Step #5: Step #4: RuntimeError: Training failed with:
Step #5: Step #4: code: 8
Step #5: Step #4: message: "The following quotas are exceeded: AutoMLVideoClassificationConcurrentModelTrainingJobs"
Step

/gcbrun


'fallback' default vehicle (rather than 'fixed' default)

problem
I have two cars, one of them (Smart #1) not getting detected automatically. If I state this car's name as vehicle-parameter in the loadpoint-section, the working automatic detection of my other car is blocked.
the solution I'd like
I think, a fallback_vehicle-parameter in the loadpoint-section could solve it (if you don't load guests' cars too often - like us). The detection algorithm could then try to detect the connected car and then and onley then switch to this default, if the automatic detecttion fails.
(better) alternative
... of course would be the fix of the detection of the Smart #1. But I think there are severe reasons that prevent this - maybe some missing parameters in the hello-smart-api!?

Simlar issue https://github.com/evcc-io/evcc/issues/7539


refactor(streaming): remove RwResult in streaming hash join

I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.
What's changed and what's your intention?
as title
Checklist

[x] I have written necessary docs and comments
[x] I have added necessary unit tests and integration tests
[x] All checks passed in ./risedev check (or alias, ./risedev c)

Refer to a related PR or issue link (optional)

Excuse me, what's the meaning of 'degree' in managed_state/join/mod.rs?


python311Packages.frozendict: 2.4.2 -> 2.4.3

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for python311Packages.frozendict is: Module for immutable dictionary
meta.homepage for python311Packages.frozendict is: https://github.com/Marco-Sulla/python-frozendict
meta.changelog for python311Packages.frozendict is: https://github.com/Marco-Sulla/python-frozendict/releases/tag/v2.4.3
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 2.4.3 with grep in /nix/store/i7b06mcpnpmsxhcjjg3b5dzbq2lmkm92-python3.11-frozendict-2.4.3
found 2.4.3 in filename of file in /nix/store/i7b06mcpnpmsxhcjjg3b5dzbq2lmkm92-python3.11-frozendict-2.4.3

Rebuild report (if merged into master) (click to expand)

16 total rebuild path(s)

16 package rebuild(s)

First fifty rebuilds by attrpath

markdown-anki-decks
octoprint
opshin
python311Packages.bsuite
python311Packages.frozendict
python311Packages.genanki
python311Packages.pluthon
python311Packages.pycardano
python311Packages.uplc
python311Packages.yfinance
python312Packages.bsuite
python312Packages.frozendict
python312Packages.genanki
python312Packages.pycardano
python312Packages.yfinance

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/i7b06mcpnpmsxhcjjg3b5dzbq2lmkm92-python3.11-frozendict-2.4.3 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A python311Packages.frozendict https://github.com/r-ryantm/nixpkgs/archive/1527801914cbbd6c124784334604678bc2180d99.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/1527801914cbbd6c124784334604678bc2180d99#python311Packages.frozendict

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/i7b06mcpnpmsxhcjjg3b5dzbq2lmkm92-python3.11-frozendict-2.4.3
ls -la /nix/store/i7b06mcpnpmsxhcjjg3b5dzbq2lmkm92-python3.11-frozendict-2.4.3/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review --extra-nixpkgs-config '{ allowInsecurePredicate = x: true; }' run on x86_64-linux 1

2 packages failed to build:

octoprint
octoprint.dist

28 packages built:

markdown-anki-decks
markdown-anki-decks.dist
opshin
opshin.dist
python311Packages.bsuite
python311Packages.bsuite.dist
python311Packages.frozendict
python311Packages.frozendict.dist
python311Packages.genanki
python311Packages.genanki.dist
python311Packages.pluthon
python311Packages.pluthon.dist
python311Packages.pycardano
python311Packages.pycardano.dist
python311Packages.uplc
python311Packages.uplc.dist
python311Packages.yfinance
python311Packages.yfinance.dist
python312Packages.bsuite
python312Packages.bsuite.dist
python312Packages.frozendict
python312Packages.frozendict.dist
python312Packages.genanki
python312Packages.genanki.dist
python312Packages.pycardano
python312Packages.pycardano.dist
python312Packages.yfinance
python312Packages.yfinance.dist

Maintainer pings
cc @pbsds for testing.

octoprint fails on hydra, LGTM


Allow closures to take by reference

Motivation
Currently the following fails to compile:
#[wasm_bindgen]
struct S
{
    x: X,
}

Closure::<dyn Fn(&S)>::new(|s| f(&s.x))

To work around this, one can do this:
#[wasm_bindgen]
struct S
{
    #[wasm_bindgen(getter_with_clone)]
    pub inner: SInner,
}

#[derive(Clone)]
#[wasm_bindgen]
struct SInner
{
    x: Rc<X>,
}

Closure::<dyn Fn(SInner)>::new(|s_inner| f(&s_inner.x))

which is less efficient and requires the caller (JavaScript) to access the inner field before calling the closure.
Proposed Solution
Allow closures to take by reference, just like global functions can.
Alternatives
Prohibit closures taking by reference, requiring workarounds such as additional indirections or possibly inefficient cloning.
Allow closures to take by clone. JavaScript would clone the value before passing it to the closure instead of consuming it. This would be like the above workaround but remove the need for an additional class and field access.

It appears that WasmClosure is implemented for functions that take one argument by reference, but IntoWasmClosure is not. 🤔

Apparently, using Closure::wrap instead of Closure::new, this works!


How to get users to join streams in rooms automatically but only share their media on request in RTCMultiConnection?

Currently I have video conferencing rooms set up with RTCMultiConnection like it is described in "Setup Video Conference using full syntax!".
What I would like to achieve now is that users in these rooms should see/hear the streams of others as soon as the other person opens the connection with connection.open() but should not start to stream their media as well instantly but only when they as will trigger connection.open() (or another function for that case). At the moment as soon as one person triggers connection.open() everybody gets all streams and starts to stream, too.
I couldn't find a way to configure this specific use case with the API (but maybe I've overlooked something).
Setting direction to "one-way" works like I want it but only as long as only one user would like to share his media. When a second user triggers connection.open() he sees his local stream as well as the remote stream of the first user but the stream seems to be ignored by the first user which is already broadcasting (so he doesn't see the second stream). "one-to-many" and "many-to-many" work like described above.
I've already got a setup like this to work with the broadcast experiment but RTCMultiConnection seems to be more powerful so I think it could be better if use that instead. I'm also sure it can be done by rewriting some functions but before I start spending time adjusting the library I thought I ask if there maybe is way doing this with the current API ;-)
Thanks a lot for any feedback (and of course this great library)!

hi
when i  switch devices multiple time video response very slow  and streaming very slow  and delay
my code below
connection.selectDevices(audioInputDevices.value);
connection.selectDevices(videoOutputDevices.value);
connection.removeStream({
local: true,
}, true);
connection.addStream({video : true, audio: true})
please sugest to me


Correct example file name & readme code tags

The Readme file contained a reference to non-existing file lstm_master.py. I also formatted file and methods in order to increase readability of the document.

thanks


Use Mainnet profile in mainnet builds

Specify mainnet profile in mainnet CI jobs to use DUNE_PROFILE=mainnet when building the executables.
Explain how you tested your changes:

[ ] CI logs reveal that the mainnet builds used mainnet dune profile

Checklist:

[x] Dependency versions are unchanged

Notify Velocity team if dependencies must change in CI

[ ] Modified the current draft of release notes with details on what is completed or incomplete within this project
[x] Document code purpose, how to use it

Mention expected invariants, implicit constraints

[x] Tests were added for the new behavior

Document test purpose, significance of failures
Test names should reflect their purpose

[x] All tests pass (CI will check this if you didn't)
[x] Serialized types are in stable-versioned modules
[x] Does this close issues?

mainnet dockers use executable built with devnet profile

!ci-nightly-me

!ci-build-me

!ci-nightly-me


Skip private repository check for AbstractResultEvent

Fixes #1942
RELEASE NOTES BEGIN
N/A
RELEASE NOTES END

regate


Marker onPress not triggered - touchable area is different than marker itself

Summary
https://user-images.githubusercontent.com/15350199/193890085-8c9140f4-6135-4bda-a173-fc584dc46c23.mov
Reproducible sample code
const Markers = useMemo(() => markers?.map(marker => {
  const { coordinate: { latitude, longitude } } = marker;
  return (
    <Marker
      key={`marker-${latitude}-${longitude}`}
      tracksViewChanges={false}
      coordinate={marker.coordinate}
      onPress={() => onMarkerPress(marker)}
    >
      <View style={styles.markerTextWrapper} >
        <Text style={styles.markerText}>{marker.count}</Text>
      </View>
    </Marker>
  );
}), [markers]);

<MapView
  ref={mapRef}
  mapType='hybrid'
  initialRegion={region}
  style={styles.mapView}
  loadingEnabled
  showsBuildings={false}
  showsMyLocationButton={false}
  showsPointsOfInterest={false}
  showsCompass={false}
  showsScale={false}
  showsIndoors={false}
>
  {Markers}
</MapView>

Steps to reproduce

Build on Android using google maps provider

Expected result
Marker is clickable whenever I click on the rendered marker.
Actual result
The marker touchable area is somewhere around (above) the actual marker. The marker is sometimes not clickable or only part of it is.
React Native Maps Version
1.1.0
What platforms are you seeing the problem on?
Android
React Native Version
0.63.4
What version of Expo are you using?
Not using Expo
Device(s)
Android
Additional information
No response

I'm far from an expert but heres my code that works:
Ive shared a link of an article with the repo link where I got solution to work!
        <ClusteredMapView
        provider={PROVIDER_GOOGLE}
        clusterColor="red"
        ref={map}
        customMapStyle={MAP_LIGHT_STYLE}
        style={styles.mapView}
        initialRegion={region}
        onRegionChangeComplete={onRegionChangeComplete}>
        {markers.map((marker, index) => (
          <Marker
            ref={markerRef}
            key={index}
            tracksInfoWindowChanges={false}
            tracksViewChanges={Platform.OS === 'android' ? false : true}

            coordinate={{
              latitude: marker.coordinate.latitude,
              longitude: marker.coordinate.longitude,
            }}
            onPress={(e) => onMarkerPress(index)}
          >
            <Animated.View style={[styles.markerWrap]}>
                <Image
                  fadeDuration={0}
                  resizeMode="contain"
                  onLoadEnd={doRedraw}
                  style={styles.markerLogo}
                  source={require("../../../image.png")}
                />
            </Animated.View>

          </Marker>
        ))}
      </ClusteredMapView>

on marker press:
const onMarkerPress = (index) => {
   console.log("Marker : ", index)

   setVisible(true)
   LayoutAnimation.configureNext(LayoutAnimation.Presets.linear);
   setCurrent(index);
 };

most help came from here:
https://dev.to/upsilon_it/how-to-do-map-clustering-with-react-native-10ih

Hi @mishkeTz 👋
My guess is that this is caused by the new renderer on android.
The touchable area is the same as always, but the labels beneath your markers are intercepting the taps/clicks (both the markers you are pressing are above city labels). Check out my comment regarding changed behaviour on the new renderer.
You are able to trigger the markers onclick "around" it because of this.
If you aren't using the POI click listener, you should be able to "fix" this by not registrering the listener (e.g. commenting out): https://github.com/react-native-maps/react-native-maps/blob/c447dea5eb4551440b131e3003ac50e0c5709fa9/android/src/main/java/com/airbnb/android/react/maps/AirMapView.java#L220
Could you try to patch that line and report back if that's the case for you as well?

@Simon-TechForm
That was the issue for me. Changing that fixed this weird behaviour.
I forgot to mention that I do use the new renderer.
I created a patch for this, if anyone finds himself in similar situation:
`diff --git a/node_modules/react-native-maps/android/src/main/java/com/airbnb/android/react/maps/AirMapView.java b/node_modules/react-native-maps/android/src/main/java/com/airbnb/android/react/maps/AirMapView.java
index 38755bb..c05a08b 100644
--- a/node_modules/react-native-maps/android/src/main/java/com/airbnb/android/react/maps/AirMapView.java
+++ b/node_modules/react-native-maps/android/src/main/java/com/airbnb/android/react/maps/AirMapView.java
@@ -221,7 +221,7 @@ public class AirMapView extends MapView implements GoogleMap.InfoWindowAdapter,
this.map = map;
this.map.setInfoWindowAdapter(this);
this.map.setOnMarkerDragListener(this);

this.map.setOnPoiClickListener(this);

// this.map.setOnPoiClickListener(this);
this.map.setOnIndoorStateChangeListener(this);
applyBridgedProps();`

I'm having a similar issue.
I have multiple markers and clusters.
I am not able to onPress any marker or cluster if over a POI. It always calls onPoiClick instead.
I am not willing to disable all onPoiClick as I want to be able to do so. Just when marker or cluster is over it.
Any idea how to do so?

Hi, I've created a repository based on the solution I'm using in my current project. I hope you'd find it useful:
https://github.com/GoktuqCan/react-native-maps-touchables

Hello, was this addressed in any recent stable release? I struggle to find more discussion about this topic, but at the same time i don't see any viable solution. I tracked mentioned this.map.setOnPoiClickListener(this); in my MapView.java but even this workaround did not work.
I am on 1.7.1 version and run into this issue once i started to use enableLatestRenderer().

I had this same issue (unable to click marker on top of a city name) and the patch for recent releases is slightly different as AirMapView.java has been renamed to MapView.java:
diff --git a/node_modules/react-native-maps/android/src/main/java/com/rnmaps/maps/MapView.java b/node_modules/react-native-maps/android/src/main/java/com/rnmaps/maps/MapView.java
--- a/node_modules/react-native-maps/android/src/main/java/com/rnmaps/maps/MapView.java
+++ b/node_modules/react-native-maps/android/src/main/java/com/rnmaps/maps/MapView.java
@@ -242,7 +242,7 @@ public class MapView extends com.google.android.gms.maps.MapView implements Goog

     markerCollection.setInfoWindowAdapter(this);
     markerCollection.setOnMarkerDragListener(this);
-    this.map.setOnPoiClickListener(this);
+    //this.map.setOnPoiClickListener(this);
     this.map.setOnIndoorStateChangeListener(this);

     applyBridgedProps();

Thank you @findhumane ! I confirm this fixed my issue

This also fixed the issue @findhumane.
I wonder how to make this perm change?

Issue is still there. Custom marker has unreliable touchable area. Even without POI underneath

Hi, I've created a repository based on the solution I'm using in my current project. I hope you'd find it useful: https://github.com/GoktuqCan/react-native-maps-touchables

The issue is still there i have used you forked version of react native maps. Any updates how to solve it ?

@Prazitstha @MariuzM I just added support to disable PoI click disabling, this should improve click handling
https://github.com/react-native-maps/react-native-maps/pull/5210
as for having a specific clickable area around a marker, I don't think that's natively possible with googleMaps ... it should be doable with apple because native views are used on the map.

@salah-ghanim @MariuzM @Prazitstha
The red circle places are not pressable on the Android map. In iOS, it works fine. in Android, only those places are selectable, which places have default markers and which have green text colour. What’s the solution to this?


V: optimize tagged_post_count array to reset instead of allocating new

This PR optimizes allocations of tagged_post_count array to make it do the same (probably) what Go does under the hood.

Hey, thanks for the PR but I'm not inclined to accept unsafe code as that opens Pandora's box for the other languages. I don't want to have a situation where others are submitting raw assembly to get ahead.

So if I introduce a PR into V language to implement reset() function for an array in std, that wouldn't be marked as unsafe, but will have exactly this implementation under the hood - this will be ok for you?
Because right now V code in this using a ton of unsafe, they are just hidden from the end user in the std. V requires unsafe block for every code that touches pointers, while Go, for example, is not.
The main disadvantage of V in this case is that the compiler is not smart enough to convert loop that doing zeros into memset call, like Go does, so it's need to be done manually.

The implementation is not the issue, I know go does the same. But I don't want to get into a situation where I have to review technically safe code written inside an unsafe block for other languages. We'll stick to language constructs for now.

Ok, I see, I will discuss that with the community and we will decide how to handle this not in the hacky way

Sounds good, I will close this PR for now.


Fix utils.center_mass_exp and added a test code

@lcnature, @QihongL, will you implement Javier's suggestion? If not, I will merge this PR as is.

I will try that today! Seems to be a good one to get familiarized with the contribution process!

Superseded by PR #288. Thanks for the prompt replies, @lcnature.


Email confirmation link redirects to a 404

Sign up for email alerts
Click the "Confirm Registration" link
After going to vote.citizenlabs.org/login, you get redirected to vote.citizenlabs.org/registration-verified which says "Sorry, that page does not exist."

That generated link was leftover from an older prototype. Thanks for the report!


Command line is wrong

as is in documentation
--devcenter-id
as is in an extension
"the following arguments are required: --dev-center-id"
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 3673e146-e302-0af6-3a07-621af33092c7
Version Independent ID: 46f091d5-36d3-48cd-647f-71ae6ab6c7cf
Content: Install the Microsoft Dev Box Preview Azure CLI extension - Microsoft Dev Box Preview
Content Source: articles/dev-box/how-to-install-dev-box-cli.md
Service: dev-box
GitHub Login: @RoseHJM
Microsoft Alias: rosemalcolm

@SychevIgor
Thank you for bringing this to our attention. I've assigned this issue to the author who will investigate and update as appropriate.

@SychevIgor
Thank you for your feedback. I can't find either --devcenter-id or --dev-center-id in the Install the Microsoft Dev Box Preview Azure CLI extension article.
Could you confirm that this is still an issue?
Thank you!

I'm not able to locate the issue.
#please-close


Cant Create Listing - Translator Token Error

Q
A

Bug report?
[X]

Feature request?
[ ]

Support request?
[ ]

I have tried deploying Cocorico myself as well as again with another developer, both did fresh Ubuntu 16.04 installs following all steps. The issue is that its not possible to create a listing  - the create listing screen hangs on submission and I see the following error in the app logs:
request.CRITICAL: Uncaught PHP Exception UnexpectedValueException: "Token for translator is
missing" at /var/www/cocorico/src/Cocorico/CoreBundle/Model/Manager/TranslateManager.php line
43 {"exception":"[object] (UnexpectedValueException(code: 0): Token for translator is missing at
/var/www/cocorico/src/Cocorico/CoreBundle/Model/Manager/TranslateManager.php:43)"} []

Please advise

Hello @tzvimoshe how exactly do you managed to get this error resolved ? i ran into this same error, what parameters do you fill in parameters.yml ?


Incorrect link in warning for outdated package when package has been moved

Searching google for elm window leads me to:
http://package.elm-lang.org/packages/elm-lang/core/2.1.0/Window
With a header warning saying: "Warning! The latest version of this package is 4.0.5". This link is broken. - The correct link is to the moved package http://package.elm-lang.org/packages/elm-lang/window/1.0.0/
I see this works fine for http://package.elm-lang.org/packages/evancz/elm-html/4.0.2 - the link to 5.00 where a "deprecated" info is displayed.

There's another instance of the bug here:
http://package.elm-lang.org/packages/elm-lang/core/3.0.0/Graphics-Element

Problem is also in: Html.App and Signal docs

On a related note, the warning is completely missing from List.Extra 3.10.0, which is sometimes first on Google search ranking for "elm list extra"
http://package.elm-lang.org/packages/circuithub/elm-list-extra/3.10.0/List-Extra


Pod view is showing two containers per pod on Kubernetes 1.10

On GKE 1.10 the Pod view is wrongly displaying POD containers:

Same on the Containers view:

Are you sure you haven't got the filter (bottom left) set to 'All' instead of 'Application Containers'?
If it is set correctly, try toggling it back and forth.

Hmm, given that the POD containers also show up in the Pod view, I wonder whether something has changed in k8s 1.10 that breaks our detection of these special containers. Scope looks for containers with an image of google_containers/pause. @stefanprodan please check that. PRs welcome.

The image name changed to k8s.gcr.io/pause-amd64


Reveal all epk

Pull request checklist
Please check if your PR fulfills the following requirements:

[x] Tests for the changes have been added (for bug fixes / features)
[x] Docs have been reviewed and added / updated if needed (for bug fixes / features)
[x] Build (yarn build) was run locally and any changes were pushed
[x] Lint (yarn lint --check) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

[x] Bugfix
[x] Feature
[ ] Code style update (formatting, renaming)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] Documentation content changes
[ ] Other (please describe):

What is the current behavior?

Closes #361
What is the new behavior?

Does this introduce a breaking change?

[x] Yes
[ ] No

Other information

Some benchmarks showing UST size for different configurations
[INFO]  snarkJS: # of Constraints: 29332

    STATE_TREE_DEPTH: 20,
    EPOCH_TREE_DEPTH: 20,
    EPOCH_TREE_ARITY: 2,
    NUM_EPOCH_KEY_NONCE_PER_EPOCH: 3,
    FIELD_COUNT: 6,
    SUM_FIELD_COUNT: 4,

[INFO]  snarkJS: # of Constraints: 24472

    STATE_TREE_DEPTH: 15,
    EPOCH_TREE_DEPTH: 15,
    EPOCH_TREE_ARITY: 2,
    NUM_EPOCH_KEY_NONCE_PER_EPOCH: 3,
    FIELD_COUNT: 6,
    SUM_FIELD_COUNT: 4,

[INFO]  snarkJS: # of Constraints: 34546

    STATE_TREE_DEPTH: 15,
    EPOCH_TREE_DEPTH: 15,
    EPOCH_TREE_ARITY: 2,
    NUM_EPOCH_KEY_NONCE_PER_EPOCH: 3,
    FIELD_COUNT: 14,
    SUM_FIELD_COUNT: 8,


Error: UserFacingError or Error querying the database: db error: ERROR: must be owner of view pg_stat_statements for specific database

Bug description
Whenever I try to deploy migrations to any remote database that isn't localhost, I get this error:
➜ pnpx prisma migrate deploy
Environment variables loaded from .env
Prisma schema loaded from schema.prisma
Datasource "db": PostgreSQL database "***", schema "public" at "***:5432"
Response: Can't reach database server at `***`:`5432`

Please make sure your database server is running at `***`:`5432`.
Error: UserFacingError

I also tried running this:
➜ pnpx prisma db push --force-reset  --accept-data-loss
Environment variables loaded from .env
Prisma schema loaded from schema.prisma
Datasource "db": PostgreSQL database "***", schema "public" at "***:5432"

Error: P3016

The fallback method for database resets failed, meaning Migrate could not clean up the database entirely. Original error:
Database error
Error querying the database: db error: ERROR: must be owner of view pg_stat_statements
   0: sql_migration_connector::best_effort_reset
           with connection=Connection(Postgres(PostgresUrl { url: Url { scheme: "postgres", username: "***", password: Some("***"), host: Some(Domain("***")), port: None, path: "/doxjeowf", query: Some("statement_cache_size=0"), fragment: None }, query_params: PostgresUrlQueryParams { ssl_params: SslParams { certificate_file: None, identity_file: None, identity_password: <HIDDEN>, ssl_accept_mode: AcceptInvalidCerts }, connection_limit: None, schema: "public", ssl_mode: Prefer, pg_bouncer: false, host: None, socket_timeout: None, connect_timeout: Some(5s), pool_timeout: Some(10s), statement_cache_size: 0, max_connection_lifetime: None, max_idle_connection_lifetime: Some(300s) } }))
             at migration-engine/connectors/sql-migration-connector/src/lib.rs:99
   1: migration_core::api::Reset
             at migration-engine/core/src/api.rs:157

...so it connected somehow? but refuses to connect on deploy command... weird
How to reproduce

Install<EMAIL_ADDRESS>and<EMAIL_ADDRESS>Create a new database on Render.com / ElephantSQL
Run prisma migrate deploy

Expected behavior
It should deploy migrations with no issues. It works fine on localhost though, which is weird...
Prisma information
generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "postgresql"
  url      = env("DB_URL")
}

model Account {
  id                 Int       @id @default(autoincrement())
  compoundId         String    @unique @map("compound_id")
  userId             Int       @map("user_id")
  providerType       String    @map("provider_type")
  providerId         String    @map("provider_id")
  providerAccountId  String    @map("provider_account_id")
  refreshToken       String?   @map("refresh_token")
  accessToken        String?   @map("access_token")
  accessTokenExpires DateTime? @map("access_token_expires")
  createdAt          DateTime  @default(now()) @map("created_at")
  updatedAt          DateTime  @default(now()) @map("updated_at")

  @@index([providerAccountId], name: "providerAccountId")
  @@index([providerId], name: "providerId")
  @@index([userId], name: "userId")
  @@map("accounts")
}

model Session {
  id           Int      @id @default(autoincrement())
  userId       Int      @map("user_id")
  expires      DateTime
  sessionToken String   @unique @map("session_token")
  accessToken  String   @unique @map("access_token")
  createdAt    DateTime @default(now()) @map("created_at")
  updatedAt    DateTime @default(now()) @map("updated_at")

  @@map("sessions")
}

model User {
  id                     Int       @id @default(autoincrement())
  name                   String    @unique
  email                  String?   @unique
  emailVerified          DateTime? @map("email_verified")
  image                  String?
  createdAt              DateTime  @default(now()) @map("created_at")
  updatedAt              DateTime  @default(now()) @map("updated_at")
  Post                   Post[]
  twitterApiKey          String?   @unique
  twitterApiSecret       String?   @unique
  twitterApiAccessToken  String?   @unique
  twitterApiAccessSecret String?   @unique
  slug                   String    @unique @default(uuid())

  @@map("users")
}

model VerificationRequest {
  id         Int      @id @default(autoincrement())
  identifier String
  token      String   @unique
  expires    DateTime
  createdAt  DateTime @default(now()) @map("created_at")
  updatedAt  DateTime @default(now()) @map("updated_at")

  @@map("verification_requests")
}

model Source {
  id       Int    @id @default(autoincrement())
  httpLink String
  assetId  String

  Post Post[]
}

model Post {
  id        Int      @id @default(autoincrement())
  createdAt DateTime @default(now()) @map("created_at")
  title     String
  published Boolean  @default(false)
  authorId  Int      @map("author_id")
  author    User     @relation(fields: [authorId], references: [id])
  content   Source   @relation(fields: [sourceId], references: [id])

  sourceId Int
  @@map("post")
}

Environment & setup

OS: 5.10.42-1-MANJARO
Database: PostgreSQL
Node.js version: 14.17.2

Prisma Version
risma               : 2.23.0
@prisma/client       : 2.23.0
Current platform     : debian-openssl-1.1.x
Query Engine         : query-engine adf5e8cba3daf12d456d911d72b6e9418681b28b (at node_modules/.pnpm/@prisma+engines<EMAIL_ADDRESS>Migration Engine     : migration-engine-cli adf5e8cba3daf12d456d911d72b6e9418681b28b (at node_modules/.pnpm/@prisma+engines<EMAIL_ADDRESS>Introspection Engine : introspection-core adf5e8cba3daf12d456d911d72b6e9418681b28b (at node_modules/.pnpm/@prisma+engines<EMAIL_ADDRESS>Format Binary        : prisma-fmt adf5e8cba3daf12d456d911d72b6e9418681b28b (at node_modules/.pnpm/@prisma+engines<EMAIL_ADDRESS>Default Engines Hash : adf5e8cba3daf12d456d911d72b6e9418681b28b
Studio               : 0.393.0

Create a new database on Render.com / ElephantSQL

Seems this database has the permissions set up in a way that we do no expect and like.

Error querying the database: db error: ERROR: must be owner of view pg_stat_statements

Can you tell us a bit more how exactly to create such a database  so we can reproduce this please? Thanks.

@janpio
Ok I'll show this step by step

Sign Up on render.com
Create a new database

After creating the database, open it in the dashboard and scroll down.
Copy Internal connection string

Create a new Node.js project with prisma 2.23
Create an .env file with this:

DB_URL=<connection string>

Download my Prisma schema from the issue
Run pnpx prisma migrate deploy (or pnpx prisma db push with those flags mentioned above)
See error

Thanks for the repro steps, we will take a look and see what is going on there. I am pretty sure the deploy error is actually the same as the db push one, just not surfaced properly (which might be its own bug).
Can you try this with a 2.26.0 project just to make sure this is not already fixed?

@janpio checked on Prisma 2.26 on 2 different instances. Same stuff
errors are different though :thinking:
on  master [⇡!] is 📦 v1.0.0 via ⬢ v16.4.2
➜ pnpx prisma migrate deploy
Environment variables loaded from .env
Prisma schema loaded from schema.prisma
Datasource "db": PostgreSQL database "***", schema "public" at "***"
Error: P1001: Can't reach database server at `***`:`5432`

Please make sure your database server is running at `***`:`5432`.

on  master [⇡!] is 📦 v1.0.0 via ⬢ v16.4.2
➜ pnpx prisma migrate deploy # using a new fresh db instance here
Environment variables loaded from .env
Prisma schema loaded from schema.prisma
Datasource "db": PostgreSQL database "***", schema "public" at "***:5432"
Error: Error in migration engine: Starting migration engine RPC server
Can't reach database server at `***`:`5432`

Please make sure your database server is running at `***`:`5432`.

errors for pnpx prisma db push --force-reset  --accept-data-loss (same for both instances):
Error: P3016

The fallback method for database resets failed, meaning Migrate could not clean up the database entirely. Original error:
Database error
Error querying the database: db error: ERROR: cannot drop view pg_stat_statements because extension pg_stat_statements requires it
HINT: You can drop extension pg_stat_statements instead.
   0: sql_migration_connector::best_effort_reset
           with connection=Connection(Postgres((PostgreSql { client: PostgresClient, pg_bouncer: false, socket_timeout: None, statement_cache: Mutex { is_locked: false, has_waiters: false }, is_healthy: true }, PostgresUrl { url: Url { scheme: "postgres", username: "***", password: Some("***"), host: Some(Domain("***")), port: None, path: "/urdb_upbr", query: Some("statement_cache_size=0"), fragment: None }, query_params: PostgresUrlQueryParams { ssl_params: SslParams { certificate_file: None, identity_file: None, identity_password: <HIDDEN>, ssl_accept_mode: AcceptInvalidCerts }, connection_limit: None, schema: None, ssl_mode: Prefer, pg_bouncer: false, host: None, socket_timeout: None, connect_timeout: Some(5s), pool_timeout: Some(10s), statement_cache_size: 0, max_connection_lifetime: None, max_idle_connection_lifetime: Some(300s) } })))
             at migration-engine/connectors/sql-migration-connector/src/lib.rs:115
   1: migration_core::api::Reset
             at migration-engine/core/src/api.rs:155

Interesting, so during our reproduction we definitely have to look at both versions to get the full picture.
We'll do that as soon as possible, until then seems that our Migrate tooling unfortunately does not like this database setup :(

Took a quick look already, using the External Connection String I could run db push fine with your schema.
When using migrate dev I got this error message:
C:\Users\Jan\Documents\throwaway\repro8212>npx prisma migrate dev
Environment variables loaded from .env
Prisma schema loaded from prisma\schema.prisma
Datasource "db": PostgreSQL database "reproduction8212", schema "public" at "frankfurt-postgres.render.com:5432"

Error: P3014

Prisma Migrate could not create the shadow database. Please make sure the database user has permission to create databases. Read more about the shadow database (and workarounds) at https://pris.ly/d/migrate-shadow

Original error:
Database error
Error querying the database: db error: ERROR: permission denied to create database
   0: sql_migration_connector::flavour::postgres::sql_schema_from_migration_history
             at migration-engine\connectors\sql-migration-connector\src\flavour\postgres.rs:367
   1: migration_core::api::DevDiagnostic
             at migration-engine\core\src\api.rs:89

But that is expected with Cloud databases, and the solution is explained behind the link. Unfortunately even if the shadow database is set and not hosted at render.com, this problem persists:
 C:\Users\Jan\Documents\throwaway\repro8212>npx prisma migrate dev
Environment variables loaded from .env
Prisma schema loaded from prisma\schema.prisma
Datasource "db": PostgreSQL database "reproduction8212", schema "public" at "frankfurt-postgres.render.com:5432"

Error: P3016

The fallback method for database resets failed, meaning Migrate could not clean up the database entirely. Original error:
Database error
Error querying the database: db error: ERROR: cannot drop view pg_buffercache because extension pg_buffercache requires it
HINT: You can drop extension pg_buffercache instead.
   0: sql_migration_connector::best_effort_reset
           with connection=Connection(Postgres((PostgreSql { client: PostgresClient, pg_bouncer: false, socket_timeout: None, statement_cache: Mutex { is_locked: false, has_waiters: false }, is_healthy: true }, PostgresUrl { url: Url { scheme: "postgres", username: "shadow", password: Some("..."), host: Some(Domain("frankfurt-postgres.render.com")), port: None, path: "/reproduction8212shadow", query: None, fragment: None }, query_params: PostgresUrlQueryParams { ssl_params: SslParams { certificate_file: None, identity_file: None, identity_password: <HIDDEN>, ssl_accept_mode: AcceptInvalidCerts }, connection_limit: None, schema: None, ssl_mode: Prefer, pg_bouncer: false, host: None, socket_timeout: None, connect_timeout: Some(5s), pool_timeout: Some(10s), statement_cache_size: 500, max_connection_lifetime: None, max_idle_connection_lifetime: Some(300s) } })))
             at migration-engine\connectors\sql-migration-connector\src\lib.rs:115
   1: sql_migration_connector::flavour::postgres::sql_schema_from_migration_history
             at migration-engine\connectors\sql-migration-connector\src\flavour\postgres.rs:367
   2: migration_core::api::DevDiagnostic
             at migration-engine\core\src\api.rs:89

I created a separate issue for this: https://github.com/prisma/prisma/issues/8217

Hm, with an existing migration file, I could cleanly apply it with prisma migrate deploy:
C:\Users\Jan\Documents\throwaway\repro8212>npx prisma migrate deploy
Environment variables loaded from .env
Prisma schema loaded from prisma\schema.prisma
Datasource "db": PostgreSQL database "reproduction8212", schema "public" at "frankfurt-postgres.render.com:5432"

1 migration found in prisma/migrations

The following migration have been applied:

migrations/
  └─<PHONE_NUMBER>2035_init/
    └─ migration.sql

All migrations have been successfully applied.

Can you please double check that you are using the External Connection String from the Render UI? You wrote "Internal" above, but added a screenshot with "External".

@janpio ah sorry in my comment i mean external conn string
and I tried erasing all the migrations and running deploy command, same stuff:
➜ pnpx prisma migrate deploy
Environment variables loaded from .env
Prisma schema loaded from schema.prisma
Datasource "db": PostgreSQL database "***", schema "public" at "oregon-postgres.render.com:5432"
Error: P1001: Can't reach database server at `oregon-postgres.render.com`:`5432`

Please make sure your database server is running at `oregon-postgres.render.com`:`5432`.

Can you set the DEBUG=* env var and run these commands again and then post the output here?
Although both of these commands should not use it (only migrate dev), how did you configure your shadow database?

@janpio
same stuff:

also tried on ElephantSQL

That is super weird.
I just signed up to elephantsql.com and created a free database:

With DEBUG=* set, this is what my db push output looks like in Prisma 2.26.0:
C:\Users\Jan\Documents\throwaway\repro8212>npx prisma db push
  prisma:loadEnv project root found at C:\Users\Jan\Documents\throwaway\repro8212\package.json +0ms
  prisma:tryLoadEnv Environment variables loaded from C:\Users\Jan\Documents\throwaway\repro8212\.env +0ms
[dotenv][DEBUG] did not match key and value when parsing line 1: # Environment variables declared in this file are automatically made available to Prisma.
[dotenv][DEBUG] did not match key and value when parsing line 2: # See the documentation for more detail: https://pris.ly/d/prisma-schema#using-environment-variables
[dotenv][DEBUG] did not match key and value when parsing line 3:
[dotenv][DEBUG] did not match key and value when parsing line 4: # Prisma supports the native connection string format for PostgreSQL, MySQL, SQL Server and SQLite.
[dotenv][DEBUG] did not match key and value when parsing line 5: # See the documentation for all the connection string options: https://pris.ly/d/connection-strings
[dotenv][DEBUG] did not match key and value when parsing line 6:
[dotenv][DEBUG] did not match key and value when parsing line 9:
Environment variables loaded from .env
  prisma:engines using NAPI: false +0ms
  prisma:engines binaries to download query-engine, migration-engine, introspection-engine, prisma-fmt +1ms
Prisma schema loaded from prisma\schema.prisma
  prisma:getConfig Using Query Engine Binary at<EMAIL_ADDRESS>+0ms
Datasource "db": PostgreSQL database "phywcbqh", schema "public" at "batyr.db.elephantsql.com:5432"
  prisma:getConfig Using Query Engine Binary at<EMAIL_ADDRESS>+477ms
  prisma:getConfig Using Query Engine Binary at<EMAIL_ADDRESS>+471ms
  prisma:migrateEngine:rpc starting migration engine with binary<EMAIL_ADDRESS>+0ms
  prisma:migrateEngine:rpc SENDING RPC CALL {"id":1,"jsonrpc":"2.0","method":"schemaPush","params":{"force":false,"schema":"generator client {\n  provider = \"prisma-client-js\"\n}\n\ndatasource db {\n  provider          = \"postgresql\"\n  url               = env(\"DATABASE_URL\")\n  shadowDatabaseUrl = env(\"SHADOW_DATABASE_URL\")\n}\n\nmodel Account {\n  id                 Int       @id @default(autoincrement())\n  compoundId         String    @unique @map(\"compound_id\")\n  userId             Int       @map(\"user_id\")\n  providerType       String    @map(\"provider_type\")\n  providerId         String    @map(\"provider_id\")\n  providerAccountId  String    @map(\"provider_account_id\")\n  refreshToken       String?   @map(\"refresh_token\")\n  accessToken        String?   @map(\"access_token\")\n  accessTokenExpires DateTime? @map(\"access_token_expires\")\n  createdAt          DateTime  @default(now()) @map(\"created_at\")\n  updatedAt          DateTime  @default(now()) @map(\"updated_at\")\n\n  @@index([providerAccountId], name: \"providerAccountId\")\n  @@index([providerId], name: \"providerId\")\n  @@index([userId], name: \"userId\")\n  @@map(\"accounts\")\n}\n\nmodel Session {\n  id           Int      @id @default(autoincrement())\n  userId       Int      @map(\"user_id\")\n  expires
   DateTime\n  sessionToken String   @unique @map(\"session_token\")\n  accessToken  String   @unique @map(\"access_token\")\n  createdAt    DateTime @default(now()) @map(\"created_at\")\n  updatedAt    DateTime @default(now()) @map(\"updated_at\")\n\n  @@map(\"sessions\")\n}\n\nmodel User {\n  id                     Int       @id @default(autoincrement())\n  name                   String    @unique\n  email                  String?   @unique\n  emailVerified          DateTime? @map(\"email_verified\")\n  image
      String?\n  createdAt              DateTime  @default(now()) @map(\"created_at\")\n  updatedAt              DateTime  @default(now()) @map(\"updated_at\")\n  twitterApiKey          String?   @unique\n  twitterApiSecret       String?   @unique\n  twitterApiAccessToken  String?   @unique\n  twitterApiAccessSecret String?   @unique\n  slug                   String    @unique @default(uuid())\n  Post                   Post[]\n\n  @@map(\"users\")\n}\n\nmodel VerificationRequest {\n  id         Int      @id @default(autoincrement())\n  identifier String\n  token      String   @unique\n  expires    DateTime\n  createdAt  DateTime @default(now()) @map(\"created_at\")\n  updatedAt  DateTime @default(now()) @map(\"updated_at\")\n\n  @@map(\"verification_requests\")\n}\n\nmodel Source {\n  id       Int    @id @default(autoincrement())\n  httpLink String\n  assetId  String\n  Post     Post[]\n}\n\nmodel Post {\n  id        Int      @id @default(autoincrement())\n  createdAt DateTime @default(now()) @map(\"created_at\")\n  title     String\n  published Boolean  @default(false)\n  authorId  Int      @map(\"author_id\")\n  sourceId  Int\n  author    User     @relation(fields: [authorId], references: [id])\n  content   Source   @relation(fields: [sourceId], references: [id])\n\n  @@map(\"post\")\n}\n\nmodel spatial_ref_sys {\n  srid      Int     @id\n  auth_name String? @db.VarChar(256)\n  auth_srid Int?\n  srtext    String? @db.VarChar(2048)\n  proj4text String? @db.VarChar(2048)\n}\n"}} +5ms
  prisma:migrateEngine:stderr {"timestamp":"2021-07-11T13:34:39.919542800+00:00","level":"INFO","fields":{"message":"Starting migration engine RPC server","git_hash":"9b816b3aa13cc270074f172f30d6eda8a8ce867d"},"target":"migration_engine"} +0ms

Your database is now in sync with your schema. Done in 6.03s

Running generate... (Use --skip-generate to skip the generators)
  prisma:download file C:\Users\Jan\Documents\throwaway\repro8212\node_modules\prisma\query-engine-windows.exe does not exist and must be downloaded +0ms
  prisma:download Downloading https://binaries.prisma.sh/all_commits/9b816b3aa13cc270074f172f30d6eda8a8ce867d/windows/query-engine.exe.gz to C:\Users\Jan\Documents\throwaway\repro8212\node_modules\prisma\query-engine-windows.exe +1ms
  prisma:getConfig Using Query Engine Binary at: C:\Users\Jan\Documents\throwaway\repro8212\node_modules\prisma\query-engine-windows.exe +10s
  prisma:getDMMF Using Query Engine Binary at: C:\Users\Jan\Documents\throwaway\repro8212\node_modules\prisma\query-engine-windows.exe +0ms
  prisma:generator baseDir C:\Users\Jan\Documents\throwaway\repro8212\prisma +0ms
  prisma:generator prismaClientDir undefined +0ms

><EMAIL_ADDRESS>preinstall C:\Users\Jan\Documents\throwaway\repro8212\node_modules\prisma
> node scripts/preinstall-entry.js

><EMAIL_ADDRESS>install C:\Users\Jan\Documents\throwaway\repro8212\node_modules\prisma
> node scripts/install-entry.js

npm WARN<EMAIL_ADDRESS>No description
npm WARN<EMAIL_ADDRESS>No repository field.

+<EMAIL_ADDRESS>updated 1 package and audited 2 packages in 1.598s
found 0 vulnerabilities

><EMAIL_ADDRESS>postinstall C:\Users\Jan\Documents\throwaway\repro8212\node_modules\@prisma\client
> node scripts/postinstall.js

npm WARN<EMAIL_ADDRESS>No description
npm WARN<EMAIL_ADDRESS>No repository field.

+<EMAIL_ADDRESS>added 2 packages from 1 contributor and audited 4 packages in 1.54s
found 0 vulnerabilities

✔ Installed the @prisma/client and prisma packages in your project
  prisma:GeneratorProcess 2021-07-11T13:34:54.760Z prisma:client:generator requiredEngine: queryEngine +0ms
  prisma:getGenerators neededVersions {
  "9b816b3aa13cc270074f172f30d6eda8a8ce867d": {
    "engines": [
      "queryEngine"
    ],
    "binaryTargets": []
  }
} +0ms
  prisma:download copying C:\Users\Jan\Documents\throwaway\repro8212\node_modules\.cache\prisma\master\9b816b3aa13cc270074f172f30d6eda8a8ce867d\windows\query-engine to C:\Users\Jan\Documents\throwaway\repro8212\node_modules\prisma\query-engine-windows.exe +9s
  prisma:getGenerators {
  prisma:getGenerators   generatorBinaryPaths: {
  prisma:getGenerators     queryEngine: {
  prisma:getGenerators       windows: 'C:\\Users\\Jan\\Documents\\throwaway\\repro8212\\node_modules\\prisma\\query-engine-windows.exe'
  prisma:getGenerators     }
  prisma:getGenerators   }
Running generate... - Prisma Client
  prisma:GeneratorProcess 2021-07-11T13:34:55.182Z prisma:loadEnv skipping package.json at C:\Users\Jan\Documents\throwaway\repro8212\node_modules\.prisma\client\package.json +422ms
  prisma:GeneratorProcess 2021-07-11T13:34:55.183Z prisma:loadEnv skipping package.json at C:\Users\Jan\Documents\throwaway\repro8212\node_modules\.prisma\package.json +1ms
  prisma:GeneratorProcess 2021-07-11T13:34:55.183Z prisma:loadEnv skipping package.json at C:\Users\Jan\Documents\throwaway\repro8212\node_modules\package.json +0ms
✔ Generated Prisma Client (2.26.0) to .\node_modules\@prisma\client in 202ms

  prisma:getConfig Using Query Engine Binary at<EMAIL_ADDRESS>+8s

@janpio my bad I forgot that in fish shell i must use env command for env vars...
so here we go with db pull:
➜ env DEBUG="*" pnpx prisma db pull
  prisma:loadEnv project root found at /home/v1rtl/Coding/brandname/ur-db/package.json +0ms
  prisma:tryLoadEnv Environment variables loaded from /home/v1rtl/Coding/brandname/ur-db/.env +0ms
[dotenv][DEBUG] "DEBUG" is already defined in `process.env` and will not be overwritten
Environment variables loaded from .env
  prisma:engines using NAPI: false +0ms
  prisma:engines binaries to download query-engine, migration-engine, introspection-engine, prisma-fmt +1ms
Prisma schema loaded from schema.prisma
  prisma:getConfig Using Query Engine Binary at: /home/v1rtl/Coding/brandname/ur-db/node_modules/.pnpm/@prisma+engines<EMAIL_ADDRESS>+0ms
Datasource "db": PostgreSQL database "doxjeowf", schema "public" at "hattie.db.elephantsql.com:5432"

Introspecting based on datasource defined in schema.prisma …
  prisma:introspectionEngine:rpc starting introspection engine with binary: /home/v1rtl/Coding/brandname/ur-db/node_modules/.pnpm/@prisma+engines<EMAIL_ADDRESS>+0ms
  prisma:introspectionEngine:rpc SENDING RPC CALL {"id":1,"jsonrpc":"2.0","method":"introspect","params":[{"schema":"generator client {\n  provider = \"prisma-client-js\"\n}\n\ndatasource db {\n  provider = \"postgresql\"\n  url      = env(\"DB_URL\")\n}\n\nmodel Account {\n  id                 Int       @id @default(autoincrement())\n  compoundId         String    @unique @map(\"compound_id\")\n  userId             Int       @map(\"user_id\")\n  providerType       String    @map(\"provider_type\")\n  providerId         String    @map(\"provider_id\")\n  providerAccountId  String    @map(\"provider_account_id\")\n  refreshToken       String?   @map(\"refresh_token\")\n  accessToken        String?   @map(\"access_token\")\n  accessTokenExpires DateTime? @map(\"access_token_expires\")\n  createdAt          DateTime  @default(now()) @map(\"created_at\")\n  updatedAt          DateTime  @default(now()) @map(\"updated_at\")\n\n  @@index([providerAccountId], name: \"providerAccountId\")\n  @@index([providerId], name: \"providerId\")\n  @@index([userId], name: \"userId\")\n  @@map(\"accounts\")\n}\n\nmodel Session {\n  id           Int      @id @default(autoincrement())\n  userId       Int      @map(\"user_id\")\n  expires      DateTime\n  sessionToken String   @unique @map(\"session_token\")\n  accessToken  String   @unique @map(\"access_token\")\n  createdAt    DateTime @default(now()) @map(\"created_at\")\n  updatedAt    DateTime @default(now()) @map(\"updated_at\")\n\n  @@map(\"sessions\")\n}\n\nmodel User {\n  id                     Int       @id @default(autoincrement())\n  name                   String    @unique\n  email                  String?   @unique\n  emailVerified          DateTime? @map(\"email_verified\")\n  image                  String?\n  createdAt              DateTime  @default(now()) @map(\"created_at\")\n  updatedAt              DateTime  @default(now()) @map(\"updated_at\")\n  Post                   Post[]\n  twitterApiKey          String?   @unique\n  twitterApiSecret       String?   @unique\n  twitterApiAccessToken  String?   @unique\n  twitterApiAccessSecret String?   @unique\n  slug                   String    @unique @default(uuid())\n\n  @@map(\"users\")\n}\n\nmodel VerificationRequest {\n  id         Int      @id @default(autoincrement())\n  identifier String\n  token      String   @unique\n  expires    DateTime\n  createdAt  DateTime @default(now()) @map(\"created_at\")\n  updatedAt  DateTime @default(now()) @map(\"updated_at\")\n\n  @@map(\"verification_requests\")\n}\n\nmodel Source {\n  id       Int    @id @default(autoincrement())\n  httpLink String\n  assetId  String\n\n  Post Post[]\n}\n\nmodel Post {\n  id        Int      @id @default(autoincrement())\n  createdAt DateTime @default(now()) @map(\"created_at\")\n  title     String\n  published Boolean  @default(false)\n  authorId  Int      @map(\"author_id\")\n  author    User     @relation(fields: [authorId], references: [id])\n  content   Source   @relation(fields: [sourceId], references: [id])\n\n  sourceId Int\n  @@map(\"post\")\n}\n"}]} +8ms
  prisma:introspectionEngine:rpc {
  prisma:introspectionEngine:rpc   jsonrpc: '2.0',
  prisma:introspectionEngine:rpc   error: {
  prisma:introspectionEngine:rpc     code: 4466,
  prisma:introspectionEngine:rpc     message: 'An error happened. Check the data field for details.',
  prisma:introspectionEngine:rpc     data: {
  prisma:introspectionEngine:rpc       is_panic: false,
  prisma:introspectionEngine:rpc       message: "Can't reach database server at `hattie.db.elephantsql.com`:`5432`\n" +
  prisma:introspectionEngine:rpc         '\n' +
  prisma:introspectionEngine:rpc         'Please make sure your database server is running at `hattie.db.elephantsql.com`:`5432`.',
  prisma:introspectionEngine:rpc       meta: [Object],
  prisma:introspectionEngine:rpc       error_code: 'P1001'
  prisma:introspectionEngine:rpc     }
  prisma:introspectionEngine:rpc   },
  prisma:introspectionEngine:rpc   id: 1
  prisma:introspectionEngine:rpc } +5s
Error: Error: P1001

Can't reach database server at `hattie.db.elephantsql.com`:`5432`

Please make sure your database server is running at `hattie.db.elephantsql.com`:`5432`.

    at Object.<anonymous> (/home/v1rtl/Coding/brandname/ur-db/node_modules/.pnpm/prisma@2.26.0/node_modules/prisma/build/index.js:40087:26)
    at IntrospectionEngine2.handleResponse (/home/v1rtl/Coding/brandname/ur-db/node_modules/.pnpm/prisma@2.26.0/node_modules/prisma/build/index.js:39967:36)
    at LineStream.<anonymous> (/home/v1rtl/Coding/brandname/ur-db/node_modules/.pnpm/prisma@2.26.0/node_modules/prisma/build/index.js:40045:18)
    at LineStream.emit (node:events:394:28)
    at LineStream.emit (node:domain:470:12)
    at addChunk (node:internal/streams/readable:312:12)
    at readableAddChunk (node:internal/streams/readable:287:9)
    at LineStream.Readable.push (node:internal/streams/readable:226:10)
    at LineStream._pushBuffer (/home/v1rtl/Coding/brandname/ur-db/node_modules/.pnpm/prisma@2.26.0/node_modules/prisma/build/index.js:39839:19)
    at LineStream._transform (/home/v1rtl/Coding/brandname/ur-db/node_modules/.pnpm/prisma@2.26.0/node_modules/prisma/build/index.js:39833:10)

db push:
➜ env DEBUG="*" pnpx prisma db push
  prisma:loadEnv project root found at /home/v1rtl/Coding/brandname/ur-db/package.json +0ms
  prisma:tryLoadEnv Environment variables loaded from /home/v1rtl/Coding/brandname/ur-db/.env +0ms
Environment variables loaded from .env
  prisma:engines using NAPI: false +0ms
  prisma:engines binaries to download query-engine, migration-engine, introspection-engine, prisma-fmt +0ms
Prisma schema loaded from schema.prisma
  prisma:getConfig Using Query Engine Binary at: /home/v1rtl/Coding/brandname/ur-db/node_modules/.pnpm/@prisma+engines<EMAIL_ADDRESS>+0ms
Datasource "db": PostgreSQL database "doxjeowf", schema "public" at "hattie.db.elephantsql.com:5432"
  prisma:getConfig Using Query Engine Binary at: /home/v1rtl/Coding/brandname/ur-db/node_modules/.pnpm/@prisma+engines<EMAIL_ADDRESS>+47ms
  prisma:getConfig Using Query Engine Binary at: /home/v1rtl/Coding/brandname/ur-db/node_modules/.pnpm/@prisma+engines<EMAIL_ADDRESS>+50ms
Error: Error: P1001: Can't reach database server at `hattie.db.elephantsql.com`:`5432`

Please make sure your database server is running at `hattie.db.elephantsql.com`:`5432`.
    at Object.ensureDatabaseExists (/home/v1rtl/Coding/brandname/ur-db/node_modules/.pnpm/prisma@2.26.0/node_modules/prisma/build/index.js:61492:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async DbPush2.parse (/home/v1rtl/Coding/brandname/ur-db/node_modules/.pnpm/prisma@2.26.0/node_modules/prisma/build/index.js:64392:28)
    at async main (/home/v1rtl/Coding/brandname/ur-db/node_modules/.pnpm/prisma@2.26.0/node_modules/prisma/build/index.js:110797:18)

and migrate deploy:
➜ env DEBUG="*" pnpx prisma migrate deploy
  prisma:loadEnv project root found at /home/v1rtl/Coding/brandname/ur-db/package.json +0ms
  prisma:tryLoadEnv Environment variables loaded from /home/v1rtl/Coding/brandname/ur-db/.env +0ms
Environment variables loaded from .env
  prisma:engines using NAPI: false +0ms
  prisma:engines binaries to download query-engine, migration-engine, introspection-engine, prisma-fmt +1ms
Prisma schema loaded from schema.prisma
  prisma:getConfig Using Query Engine Binary at: /home/v1rtl/Coding/brandname/ur-db/node_modules/.pnpm/@prisma+engines<EMAIL_ADDRESS>+0ms
Datasource "db": PostgreSQL database "doxjeowf", schema "public" at "hattie.db.elephantsql.com:5432"
  prisma:getConfig Using Query Engine Binary at: /home/v1rtl/Coding/brandname/ur-db/node_modules/.pnpm/@prisma+engines<EMAIL_ADDRESS>+45ms
Error: Error: P1001: Can't reach database server at `hattie.db.elephantsql.com`:`5432`

Please make sure your database server is running at `hattie.db.elephantsql.com`:`5432`.
    at Object.ensureDatabaseExists (/home/v1rtl/Coding/brandname/ur-db/node_modules/.pnpm/prisma@2.26.0/node_modules/prisma/build/index.js:61492:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async MigrateDeploy2.parse (/home/v1rtl/Coding/brandname/ur-db/node_modules/.pnpm/prisma@2.26.0/node_modules/prisma/build/index.js:63876:28)
    at async main (/home/v1rtl/Coding/brandname/ur-db/node_modules/.pnpm/prisma@2.26.0/node_modules/prisma/build/index.js:110797:18)

tried re-installing with npm
same issue
so it's not about pnpm

The database server not being reachable sounds much more like a firewall or connection problem - if even db pull is failing with this error message, the server is indeed not reachable for Prisma.
Can you connect to these database servers with a database UI like DBeaver or similar from your machine?

@janpio good, I contacted you on Slack
most likely you're right, for some reason every database provider blocks me? or I am blocking them? Commands work when I run them with a socks proxy (e.g. proxychains) so I guess the whole issue is just that I was getting firewall-ed

That makes a lot of sense for the error message you are getting right now.
The original one though, might still be a bug on our side:

Error: P3016
The fallback method for database resets failed, meaning Migrate could not clean up the database entirely. Original error:
Database error
Error querying the database: db error: ERROR: must be owner of view pg_stat_statements
0: sql_migration_connector::best_effort_reset
with connection=Connection(Postgres(PostgresUrl { url: Url { scheme: "postgres", username: "", password: Some(""), host: Some(Domain("***")), port: None, path: "/doxjeowf", query: Some("statement_cache_size=0"), fragment: None }, query_params: PostgresUrlQueryParams { ssl_params: SslParams { certificate_file: None, identity_file: None, identity_password: , ssl_accept_mode: AcceptInvalidCerts }, connection_limit: None, schema: "public", ssl_mode: Prefer, pg_bouncer: false, host: None, socket_timeout: None, connect_timeout: Some(5s), pool_timeout: Some(10s), statement_cache_size: 0, max_connection_lifetime: None, max_idle_connection_lifetime: Some(300s) } }))
at migration-engine/connectors/sql-migration-connector/src/lib.rs:99
1: migration_core::api::Reset
at migration-engine/core/src/api.rs:157

If you ever get to reproduce this one, let us know in a new issue and I can take another look. I bet it is similar to https://github.com/prisma/prisma/issues/8217 - but as I can not reproduce it, having a reproduction would be nice.

add ?connect_timeout=300 to the end of DB_URL, sometimes 5s is not enough

Maybe we can improve the error message here a bit: https://github.com/prisma/prisma/issues/8223
I also create an issue for that weird "UserFacingError" message you got: https://github.com/prisma/prisma/issues/8222

I have the same error. I'm also trying to use elephantSQL
pull works, actually push also works.
migrate and reset do not
I think there's another issue related to this.
https://github.com/prisma/prisma/issues/4571
to repro this just try and setup any cloud provider. it's a bit of a major issue that prisma doesn't work with dedicated PG DB hosting companies?
➜  server git:(main) npx prisma migrate dev
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "nfmjdhuk", schema "public" at "castor.db.elephantsql.com:5432"

Error: P3014

Prisma Migrate could not create the shadow database. Please make sure the database user has permission to create databases. Read more about the shadow database (and workarounds) at https://pris.ly/d/migrate-shadow

Original error:
db error: ERROR: permission denied to create database
   0: sql_migration_connector::flavour::postgres::sql_schema_from_migration_history
             at migration-engine/connectors/sql-migration-connector/src/flavour/postgres.rs:340
   1: migration_core::state::DevDiagnostic
             at migration-engine/core/src/state.rs:178

➜  server git:(main) ✗ npx prisma migrate reset
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "nfmjdhuk", schema "public" at "castor.db.elephantsql.com:5432"

✔ Are you sure you want to reset your database? All data will be lost. … yes

Error: P3016

The fallback method for database resets failed, meaning Migrate could not clean up the database entirely. Original error:
db error: ERROR: must be owner of view pg_stat_statements
   0: sql_migration_connector::best_effort_reset
           with connection=Connection(Postgres((PostgreSql { client: PostgresClient, pg_bouncer: false, socket_timeout: None, statement_cache: Mutex { is_locked: false, has_waiters: false }, is_healthy: true }, PostgresUrl { url: Url { scheme: "postgres", cannot_be_a_base: false, username: "nfmjdhuk", password: Some("OabXNInqc3SKQEmFQNF4nS0nHX2RBmpn"), host: Some(Domain("castor.db.elephantsql.com")), port: None, path: "/nfmjdhuk", query: Some("statement_cache_size=0"), fragment: None }, query_params: PostgresUrlQueryParams { ssl_params: SslParams { certificate_file: None, identity_file: None, identity_password: <HIDDEN>, ssl_accept_mode: AcceptInvalidCerts }, connection_limit: None, schema: None, ssl_mode: Prefer, pg_bouncer: false, host: None, socket_timeout: None, connect_timeout: Some(5s), pool_timeout: Some(10s), statement_cache_size: 0, max_connection_lifetime: None, max_idle_connection_lifetime: Some(300s), application_name: None, options: None } })), Postgres(PostgresUrl { url: Url { scheme: "postgres", cannot_be_a_base: false, username: "nfmjdhuk", password: Some("OabXNInqc3SKQEmFQNF4nS0nHX2RBmpn"), host: Some(Domain("castor.db.elephantsql.com")), port: None, path: "/nfmjdhuk", query: Some("statement_cache_size=0"), fragment: None }, query_params: PostgresUrlQueryParams { ssl_params: SslParams { certificate_file: None, identity_file: None, identity_password: <HIDDEN>, ssl_accept_mode: AcceptInvalidCerts }, connection_limit: None, schema: None, ssl_mode: Prefer, pg_bouncer: false, host: None, socket_timeout: None, connect_timeout: Some(5s), pool_timeout: Some(10s), statement_cache_size: 0, max_connection_lifetime: None, max_idle_connection_lifetime: Some(300s), application_name: None, options: None } }))
             at migration-engine/connectors/sql-migration-connector/src/lib.rs:91
   1: migration_core::state::Reset
             at migration-engine/core/src/state.rs:266

Does the instructions given in the error message not work for you? It is unfortunate that some providers do not let Prisma create additional temporary databases on demand, as most other providers do - but that is why that workaround was implemented and usually is enough to prevent the problem.

@janpio you mean this stuff?
https://www.prisma.io/docs/concepts/components/prisma-migrate/shadow-database#cloud-hosted-shadow-databases-must-be-created-manually
No, it doesn't work with the provider I listed. I tried using specific shadow database as a separate DB, no joy on that either.
I also tried your own service, but then i need to sign up for another third party account to support it, its not self-contained.
maybe you can list some pgsql saas that prisma does actually work with, that might be quicker?
I'm wondering if this is a lockin strategy, making stuff incompatible with other saas pgsql providers, as your future roadmap is to monetize via hosting? like a mongoatlas /vercel kind of plan?

alternately I can dev with a local DB. it says the shadow thing is just for development.
so it's not needed for "production"? Can i just switch to "production mode"?

i was seeing if i can just migrate deploy after working on everything locally, to get to a schema state that is working.
but reset also fails on elephantsql saas
➜  server git:(buyer) ✗ npx prisma migrate reset
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "xpkkewve", schema "public" at "kashin.db.elephantsql.com:5432"

✔ Are you sure you want to reset your database? All data will be lost. … yes

Error: P3016

The fallback method for database resets failed, meaning Migrate could not clean up the database entirely.  That is just broken and we need to find a way around that.

I switched to supabase, which has a pretty good PG offering, that seems to work fine.

For anyone in the future using elephantsql, this is simply the way they've gone about partitioning the hardware they have.
You don't have full access to the database RDBMS, but rather, they use one system to create dozens of databases within the same Postgres management system.
I'm not sure at the moment if this is something that's really possible or easy to work around. I'm sure there could be some adjustments within prisma's own code to assist in this type of situation (whether that type of change is justified or not is a whole different game), but more often than not, you may need access to the full db management system.


VIsibility of showing papers while approval

The paper details are showing on the top of the page, user have to scroll up the page to see the papers for approval. Fixing its visibility so that its easy to see the paper details is necessary

@Harshdev098 please assign me this issue.


feat(#163): Add DecoratorCompositionName class

Add DecoratorCompositionName that will replace newname() method in ImprovementDistilledObjects.
Simply say, that class generates a new name for a class that will be generated from Decorators.
Closes: #163.

History:

feat(#163): Add DecoratorCompositionName class and corresponding test
feat(#163): add more tests
feat(#163): fix all qulice suggestions
feat(#163): generate new puzzles

PR-Codex overview
This PR focuses on implementing name generation for a combined representation in the ImprovementDistilledObjects class.
Detailed summary

Added DecoratorCompositionName class to generate names for decorator compositions.
Added tests for DecoratorCompositionName class.
Updated ImprovementDistilledObjects class to use DecoratorCompositionName for name generation.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@levBagryansky Could you take a look, please?

@levBagryansky It's a highly rare case, but I agree, it might happen. So, I added $ between class names. So, we will get the following:

"AB" "C" -> "AB$C"
"A" "BC" -> "A$BC"

Thank you!

@rultor merge

@volodya-lombrozo OK, I'll try to merge now. You can check the progress of the merge here

@rultor merge

@volodya-lombrozo Done! FYI, the full log is here (took me 3min)


Future of google_ml_kit plugin

Firstly, I really appreciate work that you guys put in developing this plugin 👏.
However, it seems, that lately, you have been struggling to find time to reply to some issues and add corresponding solutions.
So, I just want to ask, if this lack of time is something temporary or it can last a little bit longer?

@bharat-biradar Thank you for your reply. Good luck in your search for a new iOS contributor!

I am willing to contribute with some money for anyone that can fix the current iOS problem, where it crashes or requires Firebase (issue #172 and others).
Would that be helpful, @bharat-biradar?

@LZZZZ: I am working on updating the iOS plugin. What is the specific issue you are facing?
I can take Venmo or PayPal.

Try the latest version.
Also note that google_ml_kit has been split in multiples plugins, to avoid adding unnecessary dependencies to your project.
More details here:

https://github.com/bharat-biradar/Google-Ml-Kit-plugin/tree/master/packages/google_ml_kit
https://github.com/bharat-biradar/Google-Ml-Kit-plugin