Postgres JDBC 42.0.0 produces tons of error logs on container startup

2017-03-24 18:56:50.647 ERROR --- [      pool-3-thread-2] o.p.Driver                               : Connection error:
org.postgresql.util.PSQLException: The connection attempt failed.
	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:275) ~[postgresql-42.0.0.jar:42.0.0]
	at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49) ~[postgresql-42.0.0.jar:42.0.0]
	at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:194) ~[postgresql-42.0.0.jar:42.0.0]
	at org.postgresql.Driver.makeConnection(Driver.java:431) ~[postgresql-42.0.0.jar:42.0.0]
	at org.postgresql.Driver.connect(Driver.java:247) ~[postgresql-42.0.0.jar:42.0.0]
	at org.testcontainers.containers.JdbcDatabaseContainer.lambda$createConnection$2(JdbcDatabaseContainer.java:123) ~[jdbc-1.2.0.jar:?]
	at org.rnorth.ducttape.unreliables.Unreliables.lambda$retryUntilSuccess$0(Unreliables.java:41) ~[duct-tape-1.0.6.jar:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_121]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
Caused by: java.io.EOFException
	at org.postgresql.core.PGStream.receiveChar(PGStream.java:284) ~[postgresql-42.0.0.jar:42.0.0]
	at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:418) ~[postgresql-42.0.0.jar:42.0.0]
	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:222) ~[postgresql-42.0.0.jar:42.0.0]
	... 10 more

With 9.4.1212 they are produced as well, but not logged.
Probably this change made them appear by default with some logging configurations:
https://www.postgresql.org/about/news/1736/

java.util.logging is now used for logging: logging documentation

Is it something that could be fixed on your side or I should just disable all logging for PG driver?
Feels, like a bad idea...

Hi @mihhail-lapushkin
That sounds unfortunate - logging is always more difficult than it should be :(
Part of the problem is that testcontainers tries to establish a connection pretty aggressively during container startup. We could reduce the frequency of retries, but you're still going to receive some of these error logs.
I think you're probably going to need to adjust the logging, really, but it's not exactly good that your only option seems to be to disable all driver logging... I wonder if anybody else has any ideas?
Richard

Could the aggressive connection retries be replaced by a more specific "up and running" check? I'm thinking of the Docker healthcheck feature, though it alone won't really fix anything. The actual fix would be to use a PostgreSQL specific check. Does it provide some built in feature?

I've recently talked with rhuss, one of the authors of the docker-maven-plugin, since they of course face similar problems, in checking the up state of a container. He said they've gotten the best results by checking the containers's log output for a message, indicating a successful startup.
This of course very much depends on container's implementation, but maybe we could simply allow the usage of a LogOutputWaitStrategy?
@gesellix Postgres distributes a pg_isready client executable, we could launch a different container containing this executable and connect it to the postgres container. I wonder how I generic approach would look in this case, something like ExternalContainerWaitStrategy maybe?

@kiview how does pg_isready work? I assume it also somehow needs to perform requests to the PG server and handle potential connectivity errors gracefully.
Either way: one needs to decide whether a more generic approach (watching log output) vs. highly specific solutions (using or simulating pg_isready) is preferred. Maybe both options should be possible and the user needs to decide?

pg_isready simply returns different exit codes. So we'd have to loop the call until 0 is returned. It also need network connectivity to the database. https://www.postgresql.org/docs/9.3/static/app-pg-isready.html
I think we already planned to refactor the JdbcContainers to favor composition over inheritance, which would allow us, to specify the WaitStrategy for these specialized containers in a more decoupled way I've think. I already did some prototype work to extract the current wait behavior into a JdbcWaitStrategy:
https://github.com/testcontainers/testcontainers-spock/blob/jdbc-wait/src/main/groovy/com/groovycoder/spockdockerextension/wait/JdbcWaitStrategy.groovy
However this implementation would of course throw the same exceptions.
Currently I'd prefer to implement a LogOutputWaitStrategy based solution and also make this available for GenericContainer.

I would also start with a generic/log based solution - specific ones can always be built on top.

I'll start working on LogWaitStrategy we can use for GenericContainers then. Afterwards we have to look into PostgresContainer how to be incorperate the new wait strategy. We wanted to refactor this after all, so I assume this approach is fine?

@kiview This sounds good to me, though we're really aiming to make the inheritance->composition transition at the same time as general breaking API changes for v2.0. If it can be done and make things better without changing the API for users right now, that'd be great!
We collectively need to discuss the v2.0 API changes and composition model, and I'd really appreciate your input on that - it's something we should all talk about soon.
For the LogWaitStrategy I hope you might get some value/reuse out of WaitingConsumer, if you've not already come across that!

WaitingConsumer looks like a good match for this task, it's currently only used for internal testing, right?
I'll start with the LogWaitStrategy for GenericContainer and see if I can incorporate it into JdbcDatabaseContainer or PostgreSQLContainer without breaking anything.

One idea is to use HikariCP. Loop on getting a connection from the pool.
Behind the scenes it checks the connection is ok by doing a ping using the
binary protocol. Any exception can be caught. Thus no logging. I know this
works for MySQL. Haven't researched in PG
Just an idea
On Sun, 2 Apr 2017 at 23:59 Kevin Wittek<EMAIL_ADDRESS>wrote:

WaitingConsumer looks like a good match for this task, it's currently
only used for internal testing, right?
I'll start with the LogWaitStrategy for GenericContainer and see if I can
incorporate it into JdbcDatabaseContainer or PostgreSQLContainer without
breaking anything.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/testcontainers/testcontainers-java/issues/317#issuecomment-291014684,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA8Y8dyo8RrnsS2N_iGq_oS-RK8yCGXIks5rsAwogaJpZM4MoiHn
.

I assume we don't want to add a production scope HikariCP dependency to testcontainers-postgres.

Seems they've discovered the same problem in the docker-maven plugin and added multiline log matching:
https://github.com/fabric8io/docker-maven-plugin/issues/628
https://github.com/fabric8io/docker-maven-plugin/pull/743

@kiview thanks for the hint.
We had similar long standing issue with Postgres image in our own code base.  We are using TCP probe for waiting strategy - with sensible timeouts trying to open connection to expected service port. Once successful service is considered up and running. Only problem we have seen so far was with Postgres container while running on Linux. At the same time it was working fine on MacOS and Windows.
I didn't realise the root cause was inside the container before seeing your comment above. Fix was quite simple. Wait bit more for Postgres - until n successful probes in a row.
Btw. we would like to migrate to testcontainers once TestNG is supported.

Hey @laurikimmel, great that this information could help.
Please see this commentin #132, you can already use Testcontainers in TestNG (and in general even outside of any test frameworks) if you start and stop containers manually (and still benefit from additional Testcontainers features such as WaitStrategies).


EXCEPTION_ACCESS_VIOLATION

Using the latest version got this error after several days of use:
=== REDIS BUG REPORT START: Cut & paste starting from here ===
[11852] 17 Jul 13:44:28.326 # --- EXCEPTION_ACCESS_VIOLATION
[11852] 17 Jul 13:44:28.326 # --- STACK TRACE
redis-server.exe!LogStackTrace(c:\release\redis\src\win32_interop\win32_stacktra
ce.cpp:95)(0x0013E7C0, 0x0013FF90, 0x00000001, 0x40105AA8)
redis-server.exe!UnhandledExceptiontHandler(c:\release\redis\src\win32_interop\w
in32_stacktrace.cpp:185)(0x00000000, 0x00000000, 0x00000000, 0x00000008)
KERNELBASE.dll!UnhandledExceptionFilter(c:\release\redis\src\win32_interop\win32
_stacktrace.cpp:185)(0x00000000, 0x51A1AD74, 0x00000000, 0x00000000)
ntdll.dll!memset(c:\release\redis\src\win32_interop\win32_stacktrace.cpp:185)(0x
40016A27, 0x00000000, 0x0013EF00, 0x4005503F)
ntdll.dll!_C_specific_handler(c:\release\redis\src\win32_interop\win32_stacktrac
e.cpp:185)(0x00000000, 0x0013E930, 0x0013F3F0, 0x0013F3F0)
ntdll.dll!_chkstk(c:\release\redis\src\win32_interop\win32_stacktrace.cpp:185)(0
x00000001, 0x51910000, 0x00000000, 0x51A41178)
ntdll.dll!RtlRaiseException(c:\release\redis\src\win32_interop\win32_stacktrace.
cpp:185)(0x002B002B, 0x00000000, 0x14A12A00, 0x00000000)
ntdll.dll!KiUserExceptionDispatcher(c:\release\redis\src\win32_interop\win32_sta
cktrace.cpp:185)(0x14A12A10, 0x40092E7E, 0x00000552, 0x00000552)
redis-server.exe!dlfree(c:\release\redis\src\win32_interop\win32_dlmalloc.c:4822
)(0x00000004, 0x000016D8, 0x0013F6F1, 0x0013F8A0)
redis-server.exe!zfree(c:\release\redis\src\zmalloc.c:222)(0x00000005, 0x0013F6F
1, 0x00000000, 0x0013F6F1)
redis-server.exe!rdbSaveLzfStringObject(c:\release\redis\src\rdb.c:249)(0x000000
42, 0x0C6F81A8, 0x000000C3, 0x0995E298)
redis-server.exe!rdbSaveRawString(c:\release\redis\src\rdb.c:295)(0x0013F8A0, 0x
0000003C, 0x4003EF00, 0x0D67A890)
redis-server.exe!rdbSaveObject(c:\release\redis\src\rdb.c:605)(0x0013F8A0, 0x000
00001, 0x17203C50, 0x17203C50)
redis-server.exe!rdbSaveRio(c:\release\redis\src\rdb.c:692)(0x4012C210, 0x000000
F8, 0x00000000, 0x047B275C)
redis-server.exe!rdbSave(c:\release\redis\src\rdb.c:760)(0x000000F8, 0x00000000,
0x000000F8, 0x000000F8)
redis-server.exe!QForkChildInit(c:\release\redis\src\win32_interop\win32_qfork.c
pp:305)(0xFFFFFFFF, 0x00000000, 0x037B0000, 0x00000108)
redis-server.exe!QForkStartup(c:\release\redis\src\win32_interop\win32_qfork.cpp
:747)(0x00207F90, 0x00000000, 0x00000000, 0x00000000)
redis-server.exe!main(c:\release\redis\src\win32_interop\win32_qfork.cpp:1348)(0
x00000000, 0x00000000, 0x00000000, 0x00000000)
redis-server.exe!__tmainCRTStartup(f:\dd\vctools\crt\crtw32\startup\crt0.c:255)(
0x00000000, 0x00000000, 0x00000000, 0x00000000)
KERNEL32.DLL!BaseThreadInitThunk(f:\dd\vctools\crt\crtw32\startup\crt0.c:255)(0x
00000000, 0x00000000, 0x00000000, 0x00000000)
ntdll.dll!RtlUserThreadStart(f:\dd\vctools\crt\crtw32\startup\crt0.c:255)(0x0000
0000, 0x00000000, 0x00000000, 0x00000000)
ntdll.dll!RtlUserThreadStart(f:\dd\vctools\crt\crtw32\startup\crt0.c:255)(0x0000
0000, 0x00000000, 0x00000000, 0x00000000)
[11852] 17 Jul 13:44:28.353 # --- INFO OUTPUT
[13360] 18 Jul 09:35:23.011 # User requested shutdown...
[13360] 18 Jul 09:35:23.011 # There is a child saving an .rdb. Killing it!
[13360] 18 Jul 09:35:23.011 # AbortForkOperation(): 0x00000005 - EndForkOperatio
n: Killing forked process failed.: permission denied

Hi @bladefist
thank you for the report, we'll look into it.

@bladefist,
the crash happened in the child process while saving the RDB file.
Did the server stop responding after that?
If not, it would be useful to see the rest of the log after the crash to know if there are any successful saves afterward, you can search for "Background saving terminated with success" or as an alternative feel free to send me a copy of the log to<EMAIL_ADDRESS>Thank you.

@enricogior  emailed you

@enricogior Is this something that I can fix by doing something different or changing up my configuration? Or is this a bug in the app.  Excited to get my redis cache back up.
Thanks!

@bladefist,
did the same crash happen again?
I haven't found a way to reproduce the crash so the investigation is not easy.
What I can tell from the crash report is what happened but not what has caused it.
The crash occurred in the child process while saving the rdb file to the disk.
It's Redis code wrapped in Windows specific code, I don't think it's a bug in the Redis code, it's rather a problem of the Windows wrapper that interferes with the Redis code: a valid pointer suddenly became invalid causing the access violation (memory corruption).
Without a way to reproduce it, it's really difficult to figure out what exactly is causing it.

@bladefist
since July we have released several updates to fix various crashes.
I'm closing the issue since there hasn't been any activity on it for a while.
Please feel free to reopen it if the problem still persists using the latest release.
Thank you.

@enricogior  thanks! I've been using a version that was released around sept or oct and it has been stable so far. Thank you.


Test current behaviour of cipher suite ordering

First PR to confirm ordering of existing functionality.  Relates to https://github.com/square/okhttp/issues/6390

Good start but this should call out that it’s asserting what we do, not necessarily what we want.

Consider this a toehold test.
I think two follow up streams

Refine our current and general expectations -> TODO in follow ups
Fix the bug -> https://github.com/yschimke/okhttp/pull/6/files


Mark EUS base image as directly affected

Now EUS base image will be marked as directly affected, despite it's unpublished, so botas could
file an advisory.
RESOLVE: CWFHEALTH-24
Signed-off-by: Andrei Paplauski<EMAIL_ADDRESS>

Additionally, it'd be nice if _filter_out_already_fixed_published_images was adjusted to handle the case of ELS images. Right now it only works with published images.

Additionally, it'd be nice if _filter_out_already_fixed_published_images was adjusted to handle the case of ELS images. Right now it only works with published images.

Optional: It'd be nice if this was made more generic so that it was a configuration option (regex strings perhaps) of the repositories that have unpublished images that must be handled specially rather than making the logic specific to ELS images.

Optional: It'd be nice if this was made more generic so that it was a configuration option (regex strings perhaps) of the repositories that have unpublished images that must be handled specially rather than making the logic specific to ELS images.

Additionally, it'd be nice if _filter_out_already_fixed_published_images was adjusted to handle the case of ELS images. Right now it only works with published images.

But this method ignores 'directly_affected' images. So if EUS images will be marked as such, they will be ignored. If I understood its logic right.

Additionally, it'd be nice if _filter_out_already_fixed_published_images was adjusted to handle the case of ELS images. Right now it only works with published images.

But this method ignores 'directly_affected' images. So if EUS images will be marked as such, they will be ignored. If I understood its logic right.

Optional: It'd be nice if this was made more generic so that it was a configuration option (regex strings perhaps) of the repositories that have unpublished images that must be handled specially rather than making the logic specific to ELS images.

But for now we should have this special logic only for EUS images. I think when there will be other requests, we could think of something like filters for those cases.

Optional: It'd be nice if this was made more generic so that it was a configuration option (regex strings perhaps) of the repositories that have unpublished images that must be handled specially rather than making the logic specific to ELS images.

But for now we should have this special logic only for EUS images. I think when there will be other requests, we could think of something like filters for those cases.

@mprahl I've made a little change, but not sure if it's enough just to check for 'latest' tag in image tags. What do you think, should I do it in some other way?

@mprahl I've made a little change, but not sure if it's enough just to check for 'latest' tag in image tags. What do you think, should I do it in some other way?

@apaplaus, you are on the right track. The idea here is if you see an EUS base image, check what the auto-rebuild tags are on the repository for that EUS base image. If the EUS base image is tagged with one of those auto-rebuild tags, then it should be marked as directly affected.

@apaplaus, you are on the right track. The idea here is if you see an EUS base image, check what the auto-rebuild tags are on the repository for that EUS base image. If the EUS base image is tagged with one of those auto-rebuild tags, then it should be marked as directly affected.

@mprahl So now I am checking all the auto_rebuild tagged repos, is it fine now?

@mprahl So now I am checking all the auto_rebuild tagged repos, is it fine now?

@mprahl so here is a new batch of changes

@apaplaus this looks really good. I just left a few comments.


Why is log pinned to 0.4.18 ?

Is there a specific reason why the log dependeny ein esp-hal-common is "=0.4.18" instead of "0.4.18"?
I wanted to create a workspace in which one module uses this crate, but it is not possible because it creates a version conflict with a crate that uses the current log version "0.4.19"

https://github.com/esp-rs/esp-hal/pull/600 it was mainly to fix CI. We need to find a way to use a stable compiler to check msrv, but a nightly cargo to use build-std. Maybe this might work.


[DO NOT MERGE]4690 add tests

Description
Replace this text with a summary of the changes in this PR. Include why the changes are needed and context about the changes. List required dependencies. If there is a Git issue for the change, please link to it.
Types of changes in this PR
Changes that affect the core Terraform module or submodules

[ ] Bug fix
[ ] New feature
[ ] Dependency update

Changes that don't affect the core Terraform module or submodules

[ ] Examples or tests (addition or updates of examples or tests)
[ ] Documentation update
[ ] CI-related update (pipeline, etc.)
[ ] Other

Release required?
Identify the type of release. For information about the changes in a semantic versioning release, see Release versioning.

[ ] No release
[ ] Patch release (x.x.X)
[ ] Minor release (x.X.x)
[ ] Major release (X.x.x)

Release notes content
If a release is required, replace this text with information that users need to know about the release. Write the release notes to help users understand the changes, and include information about how to update from the previous version.
Your notes help the merger write the commit message for the PR that is published in the release notes for the module.
Run the pipeline
If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.
Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:
/run pipeline

Checklist for reviewers

[ ] If relevant, a test for the change is included or updated with this PR.
[ ] If relevant, documentation for the change is included or updated with this PR.

Merge actions for mergers

Use a relevant conventional commit message that is based on the PR contents and any release notes provided by the PR author. The commit message determines whether a new version of the module is needed, and if so, which semver increment to use (major, minor, or patch).
Merge by using "Squash and merge".

Status: This is not complete yet, only the basic test case is written.
What is pending:  I am making change to add config output which will be used to compare.
I was initially not sure, what is the config output we are referring to. Rechecking this.
Also I was not able to find the deep dive video link. The change is done as per the comment given by Todd.

@imprateeksh Is this something you plan to return to?

@imprateeksh Is this something you plan to return to?

Hi @ocofaigh - @Aayush-Abhyarthi is working on this issue(4690)

Closing this so that another PR can be raised for the same issue.


Make it clear on how to create an new worktree without a remote branch (new branch)

Hey, as I understand it, for now when creating a new worktree without tracking an existing branch, you need to :

Command Palette -> Worktree Add.
Set a name for the worktree.
When the prompt asks for a branch to track, press ESCAPE.
Then you'll have a new worktree with a new branch to push on the origin.

This is somewhat confusing. I would prefer to have a top level option in the branch list like "create new branch". What's your opinion ?

Yeah, exactly, but I normally select my main or master as my tracking branch

Command Palette -> 'Worktree Add'
Select 'Create new worktree'
Set a name for the worktree
Set your tracking branch
Done 🚀

Just thinking about it, I get why it's confusing / feels overly complex, but I wanted to make it easier to create / add a worktree in one place
Example:
I have 2 branches, main and my-feature, my-feature is 2 commits behind main.
I'm currently on my-feature worktree and I create a new worktree called my-bug-fixwith your workflow above, you will end up creating a new worktree based on your my-feature branch (2 commits behind)
To bring this inline with main you would have set your tracking to my-bug-fix and then pull in changes from main
Now you may want this, but a lot of the time you may want to just switch and fix something
--
Couple of ways to improve this:

I could try to resolve your tracking branch automatically (What happens if you want to branch off a feature branch, so we would lose the flexibility) or maybe an setting?

Flow Change

Command Palette -> 'Worktree Add'
Select remote branch
Prompt for worktree name (defaulted to whatever you picked) but if you change the name it will create a new worktree based on the remote branch
Done 🚀

Make separate commands for adding remote and creating new worktree (Going to be a little annoying imo)

Update the docs to make it easier for people to understand

Thanks for explaining your reasoning, it makes a lot more sense now that I'm thinking about it. I was not particularly familiar with the term "tracking branch", (we are calling it "the base branch") so it all got mixed up in my head with the remote branch.
A more detailed explanation in the readme file should resolve the misunderstanding of what is (and what is not) the tracking branch.

Yeah I guess you could think of it as the base branch as the tracking branch gets changed to the one you create when its pushed to the remote
I'll add an explanation to the add worktree command in the readme 👍

I don't know what's possible or not with prompts from the command palette in VS Code, but I'll probably try to notify the user in some way that creating a worktree from another worktree is not advisable, but still let them go through.

The more I think about it, the more it makes sense to abort the creation of a new worktree if you didn't select a tracking branch

I'll update the docs for the add worktree command
I'll sort the tracking branch's so that main or master is always the first branch

Well, I've got a clearer picture in mind regarding new worktrees. When I want to develop a new feature in a new worktree, I expect it to create a new branch (which it does) based on another branch of my choice. What I expect next is that it would create a new remote branch, not setting the remote branch to the tracked branch I choosed beforehand.
See this example:

Here, I would expect my local refactor/database-layer branch to have a new remote branch origin/refactor/database-layer that I need to push, not origin/staging.
What do you think?

Great 👍
Regarding your issue, do you have the setting shouldPushBranchAutomatically turned on?
If not then that's more than likely your issue here, you can use the publish command to publish that branch later on when needed and that should correct your tracking branch
This is due to needing the created branch on remote before we set the tracking to origin/your-branch


Issues with the latest version.

The latest version added support for the build description which is a welcome change but very bad for us here. We use the build description to display certain information of what happened during the build and as you can imagine the description can contain quite a lot of text. As a result the build name is now a huge mess containing tons of text we don't want to display on the list.
Any option available to avoid that? workaround? I reinstalled the previous version but my build names are messed up still so I hope all my build names aren't screwed.

Then how about checking if provided description is missing/empty and if so - skip update?

Not quite sure what you mean as I have no real control over what's displayed under the history build page except for what I set with the setter plugin. I checked the build history page and noticed there is a div used there to display the description. As a workaround I just forced that div to be hidden in the style.css under the "#buildHistory -desc" section.
The plugin worked fine with previous versions and never had an issue as the description was never displayed. I obviously updated to the latest version which then caused the issue.

Then the requirements for the change is not completed

What do you mean??? not sure what you mean about the change not being completed.

If you are requesting a change we need to agree about the requirements which are not clear now

All I wish is to have a option to determine whatever the description should be displayed or not as that may affect people like us here. Having a option at least we can decide whatever to use that feature or not.

I was trying to reproduce the problem but looks like it is already supported https://github.com/jenkinsci/build-name-setter-plugin/blob/master/src/main/java/org/jenkinsci/plugins/buildnamesetter/Executor.java#L45 like you wish: for empty description updating is not processed.
Then I need more details to reproduce

Sorry for the late reply and thank you for testing it out. After several tests I think is also related to the changes made to the latest Jenkins version. To reproduce the issue install the altest Jenkins version, create a job and add a very long description and using the plugin.

I have made a test and all I did was add HTML support to the description and added a long HTML for testing porpuses. Am not sure if is a issue with the plugin or just a change in Jenkins but if you look the attachment you can see what's going on.
Hope it helps and if you know a workaround is going to be appreciated.

Looks like Jenkins feature


report of copyright illegal

Your program has been forked and is being released as an extension to others by others without your permission.
He has published your extension under his own name.
I encourage you to file a protest complaint.
Forked: https://github.com/subdiox/youtube-live-chat-flow
Store url: https://chrome.google.com/webstore/detail/flow-chat-for-youtube-liv/elfdpkmfllnhhgnicaaeacbilcallpbd
PS: I saw your past Issue. I support having it removed as it is also against your original intention.

I have only mirrored this repository at the minimum level (I don't have the resources or motivation to improve the code), but considering that subdiox is maintaining the code, I don't think there's an issue with them releasing extensions.


#846: fix version shortopt (-v)

fixes #846
also support alias of first keyword property in CommandletManager.getCommandletByFirstKeyword

Pull Request Test Coverage Report for Build<PHONE_NUMBER>7
Details

0 of 0   changed or added relevant lines in 0 files are covered.
14 unchanged lines in 3 files lost coverage.
Overall coverage increased (+0.06%) to 66.953%

Files with Coverage Reduction
New Missed Lines
%

com/devonfw/tools/ide/commandlet/HelpCommandlet.java
2
94.22%

com/devonfw/tools/ide/commandlet/Commandlet.java
4
87.5%

com/devonfw/tools/ide/commandlet/CommandletManagerImpl.java
8
87.86%

Totals

Change from base Build<PHONE_NUMBER>1:
0.06%

Covered Lines:
6587

Relevant Lines:
9486

💛  - Coveralls


Catches exception and Post comment for venue request process functions

I've added full error stack trace here but it looks weird on UI,

is this okay? should I remove the stack trace?

I've added full error stack trace here but it looks weird on UI,
is this okay? should I remove the stack trace?

I believe this is happening because the stack string contains \n. I'm not sure how those can be handled though.

There are \n in the first 3 lines as well. Why are those 3 in a separate box?

There are \n in the first 3 lines as well. Why are those 3 in a separate box?

I'm not sure how you are parsing the error, but  it's a JSON that looks like this:
"error": {
  "name": "Error",
  "message": "ValueError: unconverted data remains:  11:59",
  "status": 500,
  "stack": "Error: ValueError: unconverted data remains:  11:59\n    at convertToOpenReviewError (/home/openreview/deploy/openreview/helpers/errors.js:20:14)\n    at formatProcessError (/home/openreview/deploy/openreview/helpers/errors.js:647:12)\n    at Process.executeProcessFunction (/home/openreview/deploy/openreview/helpers/entityProcess.js:176:22)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)"
}

So I am not sure how you are getting the first 3 \n. The \n should only appear in the stack property

I'm adding those myself, this is the content.comment string that I pass to the note:
f'''                 {invitation_type} Process failed due to the following error: \n                  {repr(e)} \n                  {traceback.format_exc()}                 '''

Ah, I see, my bad. I thought you were reading the logs.  Have you tried formatting it manually instead of using repr(e)? Perhaps that way works.

I think we need to save the stack trace somewhere, if we catch the error then the process logs don't save it so I think we should show it in the comment. @carlosmondra ideas?

I think we need to save the stack trace somewhere, if we catch the error then the process logs don't save it so I think we should show it in the comment. @carlosmondra ideas?

The process logs do save the stack of the error, but it's only visible by us.
I think it's fine that a comment is posted with the error and the stacktrace is there, we just need to figure out how to post it correctly right? Or am I misunderstanding the question?

Purujit is catching the exception so the process function won't fail. The API won't know there was an exception. There are two options:

Post the stack trace in the comment note so it can help us to know why it failed: PCs entered the wrong configuration or there was an error in our code.
Don't post the stack trace in the comment note, catch the exception and raise it again. So the process function will fail and we can use the process logs to see what happening. In this case we need to check all the emails from errors where in most of the cases the PCs entered the wrong configuration.

Is there a way to get the process logs id? we can add it to the comment and raise the exception after posting the comment. This way we won't have to go through all the emails.

OK, so if we want to reduce the number of emails with failed process functions then we need to catch and NOT raise an exception. So in that case we should POST the stack trace in the comment. The process function will not appear as failed in the backend, like you said, but we could still add a print statement that will log that there was an error and was POSTed as a comment.
The problem with using the log id is that it requires special reader permissions. I would need to change the backend to add readers to those logs so that PCs can see it.

In that case, since we are not going to receive an email, perhaps we should still add the jobId to the comment for us (the Super User) to check. What do you think?

The comment is visible to the PCs too. What if we add more context in the comment?
I see that you are putting as title the invitation name. We should add the link to the reference that triggered the process function. This way we can know the reference id and look into the process logs.

Do you mean something like this?

I've added note ID in the title, to add a link to the note, I believe we will have to make changes in the UI?

Yes, I like that, in the comment text you can add the link to the reference, it should be https://api.openreview/references?id=3-wG5H7QY

Seems like this doesn't catch exceptions for the /Revision invitation (besides trying to update the activation date of the paper matching invitation).
I did a test where I put in a wrong JSON for Additional Submission Options but there was an error that was not caught. This is because this is happening not in the try-catch but before in
conference = openreview.helpers.get_conference(client, note.forum, SUPPORT_GROUP)
This is one of the most common errors I think from the request form, so it would be nice to catch as well?

Yeah, @purujitgoyal can you add a test that tries to add additional submissions options with typos?


Test step flakes are not surfaced on Engine V2 builders

Test step flakes are reported in https://github.com/flutter/flutter/issues/137947 for Linux linux_android_emulator_tests, however these flakes are not captured in the flake dashboard.
Now only the whole build rerun flake is surfaced.

This used to work before engine v2. Say earlier reported bugs: https://github.com/flutter/flutter/issues/106589

The issue is due to a mis-named step name for the retry/flake logic. Fix is merged: https://flutter-review.googlesource.com/c/recipes/+/52180


Spark version changed from 2.2.0 to 2.2.1

I assume 2.2.1 is more stable

Thanks for the PR, but we can't accept it because the images and the references in your commits are not longer part of our organization. We will update our image ASAP

Ahh, yep. Sorry for that. Please, accept what you can and cancel all the other stuff.


Issue with folder path in amazon_athena_bedrock_query.py

In the amazon_athena_bedrock_query.py file of the repository, at line 77, the folder path containing the moma_examples.yaml file is specified as "Sampledata," but the actual folder in the repository is named "SampleData" with a capital 'D.' This leads to a file not found error on case-sensitive operating systems such as Linux.
Error Message:
d2024-02-02 09:14:12.918 Uncaught app exception
Traceback (most recent call last):
  File "/root/bedrock/Amazon-Bedrock-Amazon-Athena-POC/venv/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 535, in _run_script
    exec(code, module.__dict__)
  File "/root/bedrock/Amazon-Bedrock-Amazon-Athena-POC/app.py", line 31, in <module>
    answer = athena_answer(question)
  File "/root/bedrock/Amazon-Bedrock-Amazon-Athena-POC/amazon_athena_bedrock_query.py", line 41, in athena_answer
    examples = load_samples()
  File "/root/bedrock/Amazon-Bedrock-Amazon-Athena-POC/amazon_athena_bedrock_query.py", line 77, in load_samples
    with open("Sampledata/moma_examples.yaml", "r") as stream:
FileNotFoundError: [Errno 2] No such file or directory: 'Sampledata/moma_examples.yaml'

Incorrect code:
with open("Sampledata/moma_examples.yaml", "r") as stream:
Corrected code:
with open("SampleData/moma_examples.yaml", "r") as stream:

Fixed! thank you!!!!


Netdata needs a lil Version Bump again

Heho
Netdata complaining again because of the old version. Could you please make lil Version Bump again? :D

+1 please! :)

+1

+1 too !!

+1 ... now it is even listed as critical to update to v.1.37.1

+1
Critical
host is below the recommend agent version v1.37.1

+1


Failed to load kernal module: 0x8002d003

Install again after uninstall
Failed to load kernal module: 0x8002d003
Press any key to exit this application

I have the same issue.
Procedure done 03.12.18:
0. PCH-1000 with 3.60 henkaku + enso + sd2vita

Uninstalled enso via enso app, removed plugin (except henkaku and netcheck_bypass) from ur0:, removed all plugins from ux0: and updated vita via QCMA to 3.65
Connected via USB transfered h-encore app to device
Run h-encore, installed enso + vitashell
Device reboot - database rebuild? - vita loaded all apps from sony mem card
(This was stupid) Reintroduced all plugins at once
After reboot vita stuck in boot loop on enso logo
Booted with L1 (no plugins)
All plugins (except henkaku and netcheck) commented in config - database rebuild(not sure what text was saying)?
Introducing single plugin at once then device reboot - shellbat plugin was outdated for 3.65
Instead of gamesd plugin i have used storagemgr with config for a PCH-1000 and sd2vita setup
After a reboot my h-encore and vita shell were gone; Reinstalled h-encore and then enso and vitashell
After a reboot (another db rebuild), my vitashell was broken - so via molecural shell i removed it from app/ folder and manualy unpaced there fresh vitashell.vpk
After everything was running correct I have tried to run every up for 2-3 min and check if it works.
Few of my apps were broken?, error on loading screen -these were uninstalled via build-in uninstall from desktop; One app was corrupted, could not enter into theirs apps/ subfolder
Then I decided to enter enso and reinstall it, and I got this error

Read some tips to remove enso config from tai - but someone was saing that caused more problems.
That is my config (before update), after storagemgr i have changed all ux0 to ur0


namespace/subsystem are not taken into consideration in multiproc mode

The namespace and subsystem kwargs add prefixes to metric name when running normally. However, when using the multiprocess mode of the library, those prefixes are ignored.
Here is a small program to reproduce this problem:
from prometheus_client import Counter, CollectorRegistry, start_http_server, generate_latest, multiprocess
import time

registry = CollectorRegistry()
c = Counter('test', 'Test', namespace='foo', subsystem='bar', registry=registry)
c.inc()

multiprocess.MultiProcessCollector(registry)
print(generate_latest(registry).decode())

Running this program prints:
# HELP foo_bar_test Test
# TYPE foo_bar_test counter
foo_bar_test 1.0
# HELP test Multiprocess metric
# TYPE test counter
test 1.0

@brian-brazil full_name could simply be passed instead of just name at https://github.com/prometheus/client_python/blob/master/prometheus_client/core.py#L537 and https://github.com/prometheus/client_python/blob/master/prometheus_client/core.py#L539, but it's not obvious to me that it is the right fix.
I'll be happy to make this change or another if you think that it is reasonable.

That sounds like the right fix, and a PR would be great.


What does this line of code do

in mysql-operator/pkg/controller/mysqlcluster/mysqlcluster_controller.go
 var _ reconcile.Reconciler = &ReconcileMysqlCluster{}

I don't understand

Hi @usernameisnull, This line is there only to ensure that struct ReconcileMysqlCluster implements the reconcile.Reconciler interface.

thank you,I get it


Cyclic dependencies

Currently, cyclic dependencies raise a recursion error. It might be nice to obtain a more user friendly error message
def test_detects_circular_dependency_and_raises(registry, container):
    """
    If a factory causes a circular dependency lookup, a friendly error is raised
    showing the dependency cycle
    """

    def int_factory(svcs_container):
        svcs_container.get(str)
        return 42

    def str_factory(svcs_container):
        svcs_container.get(int)
        return "42"

    registry.register_factory(int, int_factory)
    registry.register_factory(str, str_factory)

    with pytest.raises(Exception) as e:
        container.get(int)

    assert 'cyclic dependency detected:  int -> str -> int'  in str(e.value)

This might be more complicated than it sounds – in attrs we had to use thread locals for recursive reprs. 🤔

yes I see, concurrency makes this tricky, Also async factories complicate things. Nothing a contextvar can't fix, but I guess you'd want a contextvar per container.
If you want I could whip up a PR to discuss things.  Although the effort/added complexity might outweigh the benefit for now :)

to be clear: I've skipped a step here. In svcs's case there's no hidden DAG, so get() would have to keep track of what it already got. So it could be global variable, where concurrency comes into play.
But as you say, this is complexity and this also would have an impact on performance. Given the SOP, it should only happen if you misconfigure something and you should be able to find the culprit quite quick.

but I'm happy to leave it open and wait what others have to say


Indentation of Python Code in Examples

I think it would be better to use four spaces for the indentation of Python code. It makes copy+paste (from the examples) much easier.
Of course the project owner can make this decision. I raised this, since I could not find an explicit statement like "we use three spaces for indentation".
If you really prefer three spaces, ok, tell us, and close this issue.

@oberstet It looks like the project switched to 4 space indentation in 2015 and this is now specified in the coding style guide. Would you be open to a MR that updates the docs to be consistent with the new style? I think it would make copying and pasting code from the docs easier.


Add 'skip' configuration option

Sometimes it is useful to just skip a Maven plugin's execution, hence this plugin might add a configuration item like as follows:
      <plugin>
        <groupId>us.hebi.sass</groupId>
        <artifactId>sass-cli-maven-plugin</artifactId>
        <configuration>
           ...
           <skip>${sass.skip}</skip>
        </configuration>
      </plugin>

as many other Maven plugins are doing.

Good idea. I released 1.0.2 with <skip> and ${sass.skip}


JobId Sometimes Incorrect

Describe the bug
When a character does not have a job unlocked (i.e. has CNJ but not WHM), the JobId returned in the ClassJob object is the ClassId, not the JobId.
To Reproduce
Parse a character that does not have all jobs unlocked.  Example character (15002867)
Expected behavior
JobId for Marauder should be 21, Lancer should be 22. etc.
Additional context
Data returned is correct if the job is unlocked

Should be fixed with godestone v2.4.1 + bingode v1.5.1.

Updated my GCFs and all is good!


BUG: Kaiser accepts non-integer size

and outputs nans:
kaiser(1845.5, 14)
Out[55]:
array([  7.72686684e-06,   8.56954025e-06,   9.45636923e-06, ...,
         9.00734538e-06,   8.14277352e-06,              nan])

should probably raise an exception?  should check if other window functions do the same

I agree it should be an exception if it isn

...t an int-like > 0

@Eric89GXL You can edit comments, you know. :D
Currently it explicitly outputs an empty array for N <= 0.
Probably empty output for N = 0 is expected in some degenerate cases?  But I think an error for negative N would be ok to add.
Otherwise I mostly fixed this in https://github.com/scipy/scipy/compare/master...endolith:window_int
Should add tests though

Oh wait I'm dumb, you can't do an early return from within the helper function.  What's the most elegant way to do this?

I like that this makes it more DRY, but you're right to get the early return you'll have to add something like:
if isinstance(M, np.ndarray):
    return M

after the _check_* calls.

Yeah I don't see any cleaner way to do it.   http://stackoverflow.com/q/38517374/125507


Complete basic layout animation support

Please select one of the following

[ ] I am removing an existing difference between facebook/react-native and microsoft/react-native-macos :thumbsup:
[ ] I am cherry-picking a change from Facebook's react-native into microsoft/react-native-macos :thumbsup:
[x] I am making a fix / change for the macOS implementation of react-native
[ ] I am making a change required for Microsoft usage of react-native

Summary
(Kinda) Fixes #277
I decided to take a look at the LayoutAnimation implementation and found that it was 99% of the way there already — only needing a single line change in order to opt into implicit CAAnimations. It was so close to working previously that I'm inclined to believe that this was intentional, but without any comments explaining why and the file's history being kind of a mess, I'm submitting this PR so that we can hopefully at the very least get the reasoning documented.
The MacOS implementation of LayoutAnimation uses the closest analog to UIView's animateWithDuration API (what RN on iOS uses) but unfortunately the MacOS API doesn't provide any mechanisms to provide a spring timing function like iOS does. Adding support for the spring timing functions will likely require a rewrite with a lower level animation API.
Changelog

[MacOS] [Added] - Completed basic LayoutAnimation support
Test Plan

Before
After

Microsoft Reviewers: Open in CodeFlow

A fix for the CI failures is incoming, I’ll update this PR when it’s in.

:shipit:


Editing documentation

Is the documentation also in a git? I wanted to propose an edit to a page:
https://lcdmenu.forntoh.dev/examples/submenu
This page fails to mention that #include <ItemSubMenu.h> needs to be, well..., included!

Another thing to add somewhere is that users need to install<EMAIL_ADDRESS>for it to work

@hapiel See the docs branch https://github.com/forntoh/LcdMenu/tree/docs


Update errors.dd

I don't understand how the entire section of error handling never mentions try-catch or how to throw exceptions.

This is not much better. It would be nice if somebody could fill in more about try/catch/finally, and maybe some examples using assert().

Well it already cross-references http://dlang.org/statement.html#TryStatement, so you just need to find a nice transition to redirect people there.

At best you expand the existing paragraph.
The solution is to use exception handling to report errors. All errors are objects derived from abstract class Error. Error has a pure virtual function called toString() which produces a char[] with a human readable description of the error.

I don't understand how the entire section of error handling never mentions try-catch or how to throw exceptions.

The page is pretty old already.

@smcmurray ping

@andralex ?

I'll close this because it doesn't fix the larger issues; created https://issues.dlang.org/show_bug.cgi?id=15521.


add pool to improve performance

This commit with go1.9.3 .for older go version the sync.Poll package could coursed error.


2018 Update

#To Be Removed:
✔ PassCard
◯ https://canarywatch.org (they failed to update their SSL certificate)
◯
To Be Updated/Changed:
✔ Mullvad / IVPN / Cryptostorm
◯ Wire Audit & Changes
◯ Signal Changes
◯ VPN Anonymity Link (2018) https://torrentfreak.com/vpn-services-keep-anonymous-2018/
◯ Creating Strong Passwords Link
✔ Move Bitmessage to Chat Section
✔ Cleanup Bitmessage Paragraph & More Information
To Be Added:
✔ Add LastPass back (still a strong option for those with less tech abilities)
✔ Consider addition of MasterPassword
◯ https://njal.la
◯ Consider addition of ProtectedText.com

Remove KeePassX, it's been abandoned, use KeePassXC.

Nice to see some action here!

Bitwarden instead of LastPass maybe? Haven't used either of them but if it's a good FOSS alternative it might be worth mentioning
etesync (etesync.com) is basically Cal/CardDAV with End-to-End encryption
cryptpad.fr
Recommendations for wrappers instead of the standard page/app (e.g. YouTube: Hooktube, NewPipe. Facebook: FaceSlim) Basically give some advice on how to use some services the most private way if you can't get away from it
Resources: Maybe check out the Complete Privacy & Security Podcast?

What about some self-hosted stuff? You mentioned ownCloud, that could be replaced by NextCloud, Syncthing is also awesome.
Maybe that could be a chapter on it's own, commonly used software and it's alternatives (Google-Startpage, GDrive-Nextcloud, Windows-Linux)

Bitwarden instead of LastPass maybe? Haven't used either of them but if it's a good FOSS alternative it might be worth mentioning

I have been looking into Bitwarden over the last 24hrs since a recommendation was made on Twitter. My biggest concern with it right now is that it only has 1 developer as far as I can tell. It seems solid, and if the code checks out, then great. But the reason I am still pushing LastPass is because it is a very good solution for those individuals in the first 1/2 of the paper. Even for business people, it does what it is meant to do ie: keep them from reusing passwords. The paper was never designed to adhere to just the 2% of the population who can l use only FOSS, encrypt all their drives, only communicate via secure channels, etc. It is meant for every Internet Individual and thus needs to cater to a wider audience :)

etesync (etesync.com) is basically Cal/CardDAV with End-to-End encryption
This looks really awesome. I will definitely check it out

cryptpad.fr
As does this. I will be adding this too.

What about some self-hosted stuff? You mentioned ownCloud, that could be replaced by NextCloud, Syncthing is also awesome.
Maybe that could be a chapter on it's own, commonly used software and it's alternatives (Google-Startpage, GDrive-Nextcloud, Windows-Linux)
Do you want to start writing? If you can find a place for this new "section" to fit in, then by all means.

https://mic.com/articles/188563/who-cares-i-have-nothing-to-hide-why-the-popular-response-to-online-privacy-is-so-flawed#.eLnnUeGBZ

I have recently been working on my own privacy paper. I am currently in my rough draft faze and am currently 16 pages in. Finding your data has been very helpful to my paper. I have been researching for the past month or so on this subject and feel as I might be able to help update your paper.
One thing that I would add to you paper are some tools that you should avoid completely. Things like Kaspersky because they have a backdoor in their product. I have a few more that are worth adding and im sure that there are a lot more that I am missing in my paper. If you would like to get in contact with me I would like to talk to you about this more and how I might be able to help you and your cause.


[Question]: Where to download the model weights 模型文件在哪里下载

Description
I am attempting to download model weights from huggingface :https://huggingface.co/BAAI/AquilaChat-7B,  but it seems that the model is no longer open to download.
Alternatives
No response

you can manually download model by visiting https://model.baai.ac.cn/models  and searching by Aquila.
By running example, models will downloaded automatically.
huggingface usage is coming soon.

thanks!

We will close this issue. You can reopen this issue if you still have questions.


"WARNING:  deviceID not provided" log

After new release the #151 resolved this issue with .env variables to prevent login issues.
Warning log showing even when .env or option.deviceID is passed to the constructor.
WARNING: deviceID not provided, automatically generating device id 'android-".env THREADS_DEVICE_ID value" Please save this device id and use it for future uses to prevent login issues. You can provide this device id by passing it to the constructor or setting the THREADS_DEVICE_ID environment variable (.env file)
On commit for #151  this was added
 + if (options?.deviceID ?? process.env.THREADS_DEVICE_ID) {
      console.warn(
        `⚠ WARNING: deviceID not provided, automatically generating device id '${this.deviceID}'`,
     )

Shouldn't this only be triggered if no value is present on .env or constructor  like this ?
 + if (!options?.deviceID ?? !process.env.THREADS_DEVICE_ID) {
    console.warn(
      `⚠ WARNING: deviceID not provided, automatically generating device id '${this.deviceID}'`,
   )

@Aerglonus code was written a bit complicated, so I cleaned it up entirely in #168 🚀

@Aerglonus Sorry I was late, just deployed https://github.com/junhoyeo/threads-api/releases/tag/v1.4.4!

Is there any way to save or return the Device ID that threads-api generates

Is there any way to save or return the Device ID that threads-api generates

If you didn't pass a device-id it should output the generated one with the warning message  in your console. Then you can use pass that.
Recommended:  If you happen to have an android phone you can get its deviceID and pass it along with the device indentifiers(os_release, android version, etc)


[RHCLOUD-21109] Constant ParsedIdentity refactor

after discussion in #562 I decided to create PR for each constant from middleware/headers/headers.go

to have smaller PRs and
to not have chaos in repo commit history

this PR contains changes related with constant PARSED_IDENTITY
all PRs related with this constant refactor will be registered in #570
JIRA: RHCLOUD-21109

rebased & conflict solved

rebased & conflict solved


Fix CLI info regarding Springboot quickstart

What type of PR is this:

/kind documentation
What does this PR do / why we need it:
An incorrect rebase messed up the quickstart guide, as well as feedback
from users reccomended to remove the CLI portion of the springboot
guide.
Which issue(s) this PR fixes:

PR acceptance criteria:

[X] Documentation

How to test changes / Special notes to the reviewer:
Signed-off-by: Charlie Drage<EMAIL_ADDRESS>

/approve
/lgtm


Fix - Flutter is not returning values to iOS

As a developer , I need to receive the answer from Flutter in iOS.
With async processing, Flutter is executing the code and returning it, but iOS cannot get this back in the main thread.
Acceptance criteria:
1 - iOS unit tests receive values back from Flutter

This issue was fixed in Flutter and now needs to be updated in iOS.

Done! Build returns the sdk address


Possible conflicts with pushwoosh plugin?

We use Pushy as our primary provider of push notifications. We're considering using the segmentation features provided by pushwoosh, so I'm curious to know if there are any potential pitfalls when using both Pushy and pushwoosh and their plugins in the same app bundle (on Android or iOS). Have attempted something like this before, or are there obvious sources of conflict that would need to be resolved? Thanks in advance. :)

Battery performance is one thing I have in mind, but maybe there are other concerns too that you may have thought of.

Hi @CodeWithOz,
Nice to connect with you. Thanks for reaching out.
Since this question is not directly related to the Pushy Cordova SDK, I would like to kindly ask you to reach out to us through our website instead, and we will be glad to provide a detailed response there.


Supply Mule stops working after one Trade Run

Good Evening,
set up Supply Mules to serve a station and only use Player Stations (All Wares)
After some time they finish their first job (deliver from Player Station to Building Site) and then they will just sit there searching for trades :-/
Same goes for Distribution Mule.
Station Mule working fine, going to set those up now.
Thanks for your work

The original author had completely replaced one of the vanilla move orders, which might end up causing some of the mules not to undock. Wookie was working on that earlier today but I don't think a fix ever went through.
I'm poking around with distrib mule this evening, I'll take a look.
In the release versions of the mod on steam and nexus there's a bug in station mule regarding certain wares. Basically it will tend not to move your end products to the warehouse. i.e. hull parts, claytronics, etc. That's fixed in public. I assume wookie will put out a release tomorrow.

Supply Mule seems to be seriously broken.
If i tell them to use Player Stations only they will kinda just sit there searching for trades.
If i allow them to trade with other factions they will start supplying the building sites, but once that is done they will again just sit there searching for trades.
If i tell it to only trade a few wares it seems to be working, but only if allowed to trade with other factions. (but thats exactly what i dont want)
Station Mule is working fine, but while my Wharf wants 800 k ECells they will not go and buy from my Source Station. (Probably because thats only a secondary trading item for them, and because the Source Station doesnt have anything else to trade for that Wharf they will instead not Trade at all)
Set up a Distribution Mule for ECells, Food and Meds now, first trade run looking good, going to see if it keeps going or goes into slumber again.
Really happy with Station Mule, working just as i want it to. They will sometimes Search for Trades, but after some research thats really because the Source Station doesnt have Supplys ready yet or the Target Stations storage is as close as full.
If the supply mule would just work as a dedicated Building Site Supply Mule that would actually be much more appreciated. (Because if i tell them to supply anything they will work on those Building Sites, but once thats done they will start buying expensive Goods for my Wharf, and i am not sure thats what i want at this time. //Money Wise)

Correct in one the key locations -
`

<do_if value="$object.isclass.ship and ($object.dock or $object.parkedat) and ($object.order.id != 'Undock')">
<debug_text text="'docked? %1. parked? %2. present order: %3. next order: %4'.[$object.dock, $object.parkedat, @$object.order.id, @$object.nextorder.id]" chance="0"/>
			<!-- NB: remove releasesignal params in Undock calls if we remove the undock-specific requirement to tell a ship to proceed. -->
			<do_if value="$object.order.trade or $object.order.build or ($object.order.id == 'StationMule') or ($object.order.id == 'TravelMule') or ($object.order.id == 'DistriMule') or ($object.order.id == 'DockAt') or ($object.order.id == 'DockAndWait') or ((($object.order.id == 'Wait') or ($object.order.id == 'WaitForSignal')) and $object.order.$allowdocked and not $object.iscapitalship) or (($object.order.id == 'WaitForSignal') and $object.order.$allowparked) or ($object.order.id == 'Repair') or ($object.order.id == 'Equip') or ($object.order.id == 'Escort') or ($object.order.id == 'Resupply' or $object.order.id == 'Player_DockToTrade') or ($object.order.id == 'AssignCommander') or ($object.order.id == 'DepositInventory')">`

Straight out of the orders.base XML file  the same file which made all ships not able to undock during the beta for update 3.0 as  prev stated I know why it screwed up in beta as the script is using

  entire script

Replacing the whole script and thus loosing a good 30 + lines of updated code in the newer files whole sections are just missing the new file the script does not work the same way as this old one.

I haven't looked very closely at supply mule yet, but all of my testing indicates that station, distribution, and travel mules are working as intended. There are some gotchas for travel and distribution mule though.
Most of the time for distribution mule, if it seems like it's not doing anything but it should, it's due to the ratio sliders in the UI.
Min target ratio: if the ware on the target distribution center is above this no trade will happen. i.e., make the value higher and stuff might start moving.
static ratio: if the ware on the source station is below this no trade will happen. i.e. make the value lower and stuff might start moving.
The default values for distribution mule seem to be best for when you have one major warehouse pushing out wares to 5+ other ones.
Haven't noticed any issues with the max ratio slider yet because I haven't yet been able to full up a bunch of warehouses.
Travel Mule takes the warehouses buy order into account to estimate a profit and attempts to fill the cargo more than 75%. So while it seems like there should be trades, my poking around with stations in the area seemed to indicate that the warehouse had high sell prices which was stopping the mule from finding a "profitable" trade. I'm thinking perhaps a slider parameter or even a total rethink may be in order for what is a valid trade for the travel mule.
I hope to get to supply mule soon, sorry, this is a lot of work.

Travel Mule doesnt sound so dump to me.
I was getting really furious when i saw trades of the vanilla trader running around with 40 silicon wafers.
Its much more "logistical" to make sure we have at least 75% Cargo Space used.
Maybe set a own minimum price treshold like 110% of base price, instead of having to wait for the factory to allocate enough storage for it to reach this price treshold.
Other way our traders would only start working once NPC traders find our deals lucrative too, stealing us those extra credits. Profitsssssss
On the Supply Mule.
It does seem to be working fine if i am telling him to trade for certain wares and make it only Supply Source. i.E. i set up 10 M and 5 L Traders for my Wharf now buying needed goods from NPC Stations. The L's will only buy Hullparts.
But i had to set up a Warelist manually and make it Supply Source only, just click OK it will take all wares from the universe and instead of working only supplies own building sites. (in a certain distance, it wont supply my Build Defence Station Missions Building Site that are a few Sectors away.)
I feel ya mate. Playing around with other ppls scripts sorting errors out and so on isnt always the easiest way. Sometimes its much easier to just start from scratch.
Have been modding in Rebirth working out a way to turn the magical resource sink into a real economy / war like situation. Just like its in X4 Vanilla now :-D

That's good info on the supply mule, thanks. Another thing worth mentioning is that the supply mule was written by a totally different author. Wookie combined it in with the original ones for convenience.
One thing I'm wondering.... have you seen any AI ships trading with the warehouses? I'm not sure yet if they're trading.
Another thing to watch for: if you open the "plan build" menu, a lot of times you can see that every build order for materials is already filled by a planned trade with an AI ship. In that case your suppliers wouldn't have anything to do.

Dont have any Warehouses, so cant tell you anything about that.
Rather Sell the Ship directly, as that will raise the final sell price for the intermediate goods to about 300% :-D
Yes i know about the planned trades in Plan Build Menu.
It seems that Supply Mules that are set to Supply Source will ignore Building Sites once they have done their initial Trade Run.
If they are not set to Supply Source they will not Supply the Source though :-/

ok thanks for narrowing it down, I'll try to look at the supply mule this evening after work

I do not know if this is related or even helps but here is an error code i find in my debug log when the supply mule stops working for me.
`[=ERROR=] 380553.52 Error in AI script supplymule on entity 0x366a4: Division by zero! 0f / 0f

Expression: ($needs.{$vy}.desiredamount)f / ($needs.{$vy}.owner.cargo.{$needs.{$vy}.ware}.target)f * 1000
Action: <append_to_list>, line 366
[General] 380553.52 ======================================
[General] 380553.52 ======================================
[=ERROR=] 380553.52 Error in AI script supplymule on entity 0x366a4: Unreliable comparison of non-numeric script values! 0 < [ware.claytronics,ware.energycells,ware.foodrations,ware.hullparts,ware.medicalsupplies]
Expression: $Supplier.count gt 0 and $wareBasket gt 0
Action: <do_if>, line 447
[General] 380553.52 ======================================`

also it seems to supply the build as long as it is the first time it builds the station but any changes or additions it seems to hang.

I suspect $wareBasket gt 0 should be $wareBasket.count gt 0.
not sure if the divide by zero is breaking anything.
I could see both of these being major issues, not sure yet.

it also looks like supply mule is the only one using the custom quicksort script

yes the line 447 is easy fix.
for line 366 i dont really get whats the 'f' doing behind the ( )
($needs.{$vy}.desiredamount)f / ($needs.{$vy}.owner.cargo.{$needs.{$vy}.ware}.target)f * 1000
this is pretty much the same as for StationMule trying to find out how many % if allocated storage is empty. my guess would be, that the 'f' is breaking the math.
And its probably breaking for the Mule to know which goods to search for first.
This is how station mule does priorizing what to serve first:
That way you would also get rid of the quicksort
 						<do_all exact="$needs.count" counter="$nSort"> 							<set_value name="$someTrade" exact="$needs.{$nSort}" /> 							<set_value name="$isMadeAndUsed" exact="$someTrade.owner.products.{$someTrade.ware}.exists" /> 							<set_value name="$isTradeWare" exact="$someTrade.owner.tradewares.{$someTrade.ware}.exists" /> 							<set_value name="$cargoRatio" exact="($someTrade.owner.cargo.{$someTrade.ware}.count * 100 / [$someTrade.owner.cargo.{$someTrade.ware}.target, 1].max)" /> 							<do_if value="(not $isMadeAndUsed) and (not $isTradeWare) and $cargoRatio lt 10"> 								<append_to_list name="$outerList" exact="$someTrade" /> 							</do_if> 							<do_elseif value="(not $isMadeAndUsed) and (not $isTradeWare) and $cargoRatio lt 25"> 								<append_to_list name="$prio2" exact="$someTrade" /> 							</do_elseif> 							<do_elseif value="(not $isTradeWare) and $cargoRatio lt 50"> 								<append_to_list name="$prio3" exact="$someTrade" /> 							</do_elseif> 							<do_elseif value="(not $isTradeWare) and $cargoRatio lt 75"> 								<append_to_list name="$prio4" exact="$someTrade" /> 							</do_elseif> 							<do_else> 								<append_to_list name="$prio5" exact="$someTrade" /> 							</do_else> 						</do_all>

I fixed both of these issues and it doesnt fix the mule stopping after one run, unfortunately.
The f at the end is an explicit float typecasting.
Now I have to dig way deeper.

I suspect the problem is related to some sort of variable persistence across supply runs, I'm just trying to print debug everything and find it

so I assigned a supply mule to a station and it added ore and methane to it's warelist? Those can only be supplied by miners. And anyway the station isn't even built yet.
I need to go through this line by line, this mule is in a bad place.

I am suspecting that the warelist is the problem, after one trip the only ware in the warelist that's actually needed in build storage is energy cells, and the build storage is already full for that, so there's nothing for the mule to do. I have a list that's energy cells, graphene, ore, methane, and refined metals. For a station that has no modules completed.

There should be a fix rolling out for this soon. The logic used to construct the ware list was messy and not working correctly. My fix greatly simplifies it, but the supply mule can no longer create trade orders on a player warehouse, if you ever relied on it for that.
I will try to get the trade order creation back into a future release, but for now I wanted it back to being functional.
main fix is in cf6aa10a8a25239e844147119ff887b130cc4c19 with minor bug fixes in later commits

I started getting this when my supply mule suddenly got stuck on the last delivery. Looking in the orders it does not show the Dock command but has the Execute Trade and ends up spamming fund transfer.
[=ERROR=] 404283.60 Error in AI script supplymule on entity 0x8bae57: Property lookup failed: $needs
* Expression: $needs.count == 0
* Action: <do_if>, line 269

Re-Open until further debug is done.

Once the ship has arrived there I think the dock command goes away? Anyway none of that is handled at all in this script. All we do is make the trade order, vanilla scripts handle how it is then actually executed.
needs is set when the "give builders priority" box is on, and is the result of a search for buy orders on the station that is assigned. Can you check what settings you had on the mule? I've only tested with that box turned on. The needs error should be solved by having it checked, for now.
I really have no idea what would cause the behavior you describe.

the only thing I can think of is that somehow between the time we got the trade and the time the ship got there, the trade was no longer valid. If you can, please provide more context for what the ship was doing.

the dock command was never added. I cleared and gave the mule back it's setup with the wares added the execute trade but somehow does not add the dock and dock and wait commands. I should also note i did not have enough credits to complete the full trade. Whether that has any effect to it or not...shrug. The ship was flying next to the build site, not anywhere near where the ship would be going to buy the wares. Will see if I can re-create the problem.

I found the bug with the needs object not existing. It was not introduced by me, it's been in the code since we got it. No idea whether it solves your problem.
I'm also introducing explicit checking that the trade is available just before making the trade order. It's unlikely to be the problem but good practice since there is always the potential for a race condition.
If you're launching in debug, can you also generate the script log files i.e. with -scriptlogfiles ? It will have a name starting with supplymule

addressed the needs issue here 9a2982d7fd15ed29c6a0739d0e176f706164d047
Do continue to report any funny business with supply mule.

I somehow got similar bug on 5.1.7 version, everything was fine for more than 24h of playtime, then all supply mules just stopped working.  Same goes for removing the command and setting it back - everything is fine in old save, not working at all in new save.
Uprading to 5.1.8 didn't solve the issue.

Supply mule will soon be replaced by a new script that has been written from scratch. So unfortunately, I don't want to sink any of my time into debugging the old script.
What I will say is that I added a fairly long wait at the end of the script, 3 to 5 minutes. If the mule finds nothing to do, it will wait to check again. So they may appear to sit in searching for trades for a long time.
The first thing to do is to look really carefully into whether or not trades actually exist that the mule should be fulfilling. 95% of the time that I've thought something was wrong with the mules, when I looked into the debug logs, it was working as intended, there was just nothing to do.

Even more reason I want to look into getting all the mules to have a idle
max before docking on the assigned station and giving up instead continue
to pursue a non existent trade.
On Tue, 21 Apr 2020, 2:10 am Brian Hayden<EMAIL_ADDRESS>wrote:

Supply mule will soon be replaced by a new script that has been written
from scratch. So unfortunately, I don't want to sink any of my time into
debugging the old script.
What I will say is that I added a fairly long wait at the end of the
script, 3 to 5 minutes. If the mule finds nothing to do, it will wait to
check again. So they may appear to sit in searching for trades for a long
time.
The first thing to do is to look really carefully into whether or not
trades actually exist that the mule should be fulfilling. 95% of the time
that I've thought something was wrong with the mules, when I looked into
the debug logs, it was working as intended, there was just nothing to do.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/Misunderstood-Wookiee/Mules-and-Warehouses-Extended/issues/12#issuecomment-616653868,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFH3SZZ7BCGX3WHUMDVGVP3RNRXYTANCNFSM4MGFL5KQ
.


about libwebkit2gtk-4.0-dev:arm64

When I try to upgrade the image to version 2.9.2, it fails with the following error:
33.36 Errors were encountered while processing:
33.36  /tmp/apt-dpkg-install-H2jjIf/113-libunwind-16_1%3a16.0.6-15~deb11u2_arm64.deb
33.36  /tmp/apt-dpkg-install-H2jjIf/114-libc++abi1-16_1%3a16.0.6-15~deb11u2_arm64.deb
33.36  /tmp/apt-dpkg-install-H2jjIf/115-libc++1-16_1%3a16.0.6-15~deb11u2_arm64.deb
33.44 E: Sub-process /usr/bin/dpkg returned an error code (1)
Dockerfile:65
64 |
65 | >>> RUN dpkg --add-architecture arm64
66 | >>>   && apt-get -qq update
67 | >>>   && apt-get -qq install -y libgtk-3-dev:arm64 libwebkit2gtk-4.0-dev:arm64

68

ERROR: failed to solve: process "/bin/bash -c dpkg --add-architecture arm64   && apt-get -qq update   && apt-get -qq install -y libgtk-3-dev:arm64 libwebkit2gtk-4.0-dev:arm64" did not complete successfully: exit code: 100    when

I had a chance to look into this and I am afraid there is no (easy) solution that I can find.
I managed to get things to install and build the docker image but it turned out that libwebkit2gtk-4.0-dev is no longer allowing the installation of both arm64 and amd64 libs concurrently. apt is automatically removing one of the versions when installing the other.
This requires, as far as I can tell, fundamentally changing the approach used to do cross-compilation. This is time consuming and I am not actively using the project anymore so contributions are welcome
I think the more appropriate approach for the long term is to actually build using the target architecture and OS instead of cross compiling. I think it is easier these days as most CI services have ARM64 and Windows support. It is also probably faster


Same dependency in different vendor paths cannot be substituted for each other

go version: go version go1.12.5 linux/amd64
dep version: v0.5.3
I have 2 projects, mainProject and commonModules. mainProject uses commonModules for stuff like common interfaces and like. Using dep, it does not allow me to useinterfaces from commonModules in mainProject if the interface recieves a vendor type as parameter
// mainProject
package requesttypes

import "github.com/aws/aws-lambda-go/events"

type MyRequest struct {
}

// BuildFromRequest populates the packet from the API request
func (s *MyRequest) BuildFromRequest(e events.APIGatewayProxyRequest) error {
	return nil
}

// MyMiddleware for API
package processors

import "commonModules/interfaces"
import "github.com/aws/aws-lambda-go/events"

func MyMiddleware(e events.APIGatewayProxyRequest,
	req interfaces.RequestWithBodies)  {
    // my logic
    return
}

// commonModules
package interfaces

import "github.com/aws/aws-lambda-go/events"

type RequestWithBodies interface {
	BuildFromRequest(events.APIGatewayProxyRequest) error
}

Now, when I try to invoke MyMiddleware with &MyRequest{}, and try to build I get the error:
cannot use request (type *requesttypes.MyRequest) as type interfaces.RequestWithBodies in argument to processors.MyMiddleware:
	*requesttypes.MyRequest does not implement interfaces.RequestWithBodies (wrong type for BuildFromRequest method)
		have BuildFromRequest("mainProject/vendor/github.com/aws/aws-lambda-go/events".APIGatewayProxyRequest) error
		want BuildFromRequest("commonModules/vendor/github.com/aws/aws-lambda-go/events".APIGatewayProxyRequest) error

I'm also running into this issue
go 1.12.6 on darwin/amd64
dep v0.5.3

I ended up just deleting the vendor/ dir and the Gopkg.* files and rerunning dep init. This cleaned everything up.

Dep was officially deprecated earlier this year, and the proposal to archive this repository was accepted. As such, I'm closing outstanding issues before archiving the repository. For any further comments, please use the proposal thread on the Go issue tracker. Thanks!


prefetch-yarn-deps: add cacert to provide certificates during fetches

Description of changes
Fixes fetchYarnDeps FODs that currently cannot be reproduced due to TLS certificate failures stemming apparently from #257513
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[x] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Priorities
Add a :+1: reaction to pull requests you find important.

thanks @lilyinstarlight for the fast fixes.

fyi: @cu1ch3n this should fix v2raya for you.

Result of nixpkgs-review pr 269061 run on x86_64-linux 1

11 packages built:

akkoma-frontends.admin-fe
akkoma-frontends.akkoma-fe
aws-azure-login
gitmoji-cli
marp-cli
matrix-appservice-irc
mermaid-cli
prefetch-yarn-deps
pxder
shepherd
vercel-pkg


Custom Request Header

Describe the feature
Support ability for customers to add headers to requests. See here for an example of a service that provides functionality via custom (unmodeled) headers: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Embedded_Metric_Format_Generation_PutLogEvents.html
Use Case
None
Proposed Solution
No response
Other Information
https://github.com/awslabs/aws-sdk-kotlin/issues/255
Acknowledgements

[ ] I may be able to implement this feature request
[ ] This feature might incur a breaking change

Removing the GA requirement based on cross-SDK feature matrix

This can now be done with interceptors. Closing ticket now.


How to remove old response statements

When a new response for an existing  user-query is given in the training process, how can I delete the old response and replace it with the new one?

I think this will address your question https://github.com/gunthercox/ChatterBot/blob/master/tests/conversation_tests/test_statements.py#L35

@HelloJyo did i answer your question?


Add force-update to release update docs

Sometimes --force-reinstall is needed to upgrade patch release in a current installation
https://github.com/rdmorganiser/rdmo/pull/886#issuecomment-2225338552

Most of the dependencies in the pyproject.toml (like "django>=4.2,<5.0",) don't have the patch version specified and will require an extra  pip install -U django to be upgraded for new patch releases.
The pip install -U rdmo --force-reinstall command will upgrade those dependencies as well.
Help text for --force-reinstall, from https://pip.pypa.io/en/stable/ux-research-design/research-results/pip-force-reinstall/#recommendations:

Reinstall package(s), and their dependencies, even if they are already up-to-date. Where package(s) are not up-to-date, upgrade these to the latest version (unless version specifiers are used).


Button Issues

I plan on going through each component and comparing it the materials implementation to see if anything is missing.
If you rather me do this elsewhere please let me know, I will modify this issue as I find more things.

[ ] Eplicitly setting onPressed to null doesn't give a disabled button look. This is a really neat part from Materials button & would be nice to have here.
[ ] Long press is not implemented
[ ] No way to listen to MaterialStates. I hate the states controller as much as the next guy, but listening to hover could be helpful.

Thanks for this @dickermoshe 🙏
1:  I don't find it neat. Let me explain why IMHO enabled is better.
onPressed: a ? doA() : null,

In the example above you have to use a ternary operator and it doesn't become very readable when the function is large.
enabled: a,
onPressed: doA,

While in this example, you don't have to change the onPressed, but just change the enabled state.
This is the same behaviour you have on HTML fields, and it's way more readable.
Another reason is when I have a callback, something like onChanged<T>, when you pass null to disable it, Dart cannot automatically find what is T, which would become Object?, this happens in the select component for example.
I just want to be consisted and I think this is the best approach. Let me know what you think
2 and 3: Will implement them


Wrong docker and path override placeholder in joint-discovery inputs file

I noticed that the commented docker and path override parameters in joint-discovery input file are wrong. They should be JointGenotyping instead of PreProcessingForVariantDiscovery_GATK4.

Docker override
Path override

It also happens in joint-discovery-gatk4.hg38.wgs.inputs.json

ahh, thanks.


The initial/selected item on popup menu should always be visible

Fixes #142895
With the change of #143121, this PR is to add auto scroll to PopupMenuButton so when we open the menu, it will automatically scroll to the selected item.
https://github.com/flutter/flutter/assets/36861262/c2bc0395-0641-4e7a-a54d-57a8e62ee26f
Pre-launch Checklist

[x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
[x] I read the [Tree Hygiene] wiki page, which explains my responsibilities.
[x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
[x] I signed the [CLA].
[x] I listed at least one issue that this PR fixes in the description above.
[x] I updated/added relevant documentation (doc comments with ///).
[x] I added new tests to check the change I am making, or this PR is [test-exempt].
[x] All existing and new tests are passing.

Does this keep the behavior that the selected item will appear over the button when a PopupMenuButton is used?

Yes, the selected item will still appear over the button but the menu position would be different. With this PR's change, the selected item will always on the top of the menu and the menu is aligned with the button. The difference is the top of the menu is always the same as the button top unless there is not enough space for menu, then the menu would be pushed up like the original way.
This demo below is shown in previous PR comment
video demo
https://github.com/flutter/flutter/assets/36861262/0782ed76-0616-4892-925f-520073984e3a


Property "close" was accessed during render but is not defined on instance

After your update for inline date picker, I see warn in console - Property "close" was accessed during render but is not defined on instance
I fixed it, but I can't push my branch and make PR

@alexsyvolap thank you. Fixed in the 1.2.1 version


API to hide parts of the code

Hi,
we use the monaco editor for a project and we need to hide some parts of the code from the user, because there is a Header and a Footer generated, and only a part between which should be editable by the user. We need the whole file in the background, to have a running code completion.
export class GeneratedClass {
     public GeneratedProperty1: string;
     public GeneratedProperty2: string;

    construcor() {}

    // User Code starts here
    public Property1ByUser: string;
    public Property2ByUser: srting;

    public MethodByUser() {}
    // User Code ends here
}

The user should only be able to edit the code between the two comments.
Is it possible to hide the other parts from the user, or disable them in any way?
Thanks,
Achim

Sorry for the late reply, there is a non-API way (might get removed in the future):
editor.getMode().setEditableRange(myRange).
interface IModel {
...
	/**
	 * Set an editable range on the model.
	 * @internal
	 */
	setEditableRange(range:IRange): void;
...
}

Thank you,
this helps a lot.
In addition i solved to hide parts of the code by calling:
editor.setHiddenArea(myRange)
But for that to work I had to overwrite the FoldingController, it also handles the hidden Areas and was overriding mine.
Would be great to have a build in way to hide Areas in combination with the Folding controller.

:+1: we plan at one point to make setHiddenArea more cooperative. Today the FoldingController thinks it owns those.

The function setEditableRange doesn't seem to exist in the source code anymore?

any update on this issue?
I'm making a 'code-playground' and I'd really like to have monaco hide some import statements.
(I couldn't get typescript to 'globalize' modules)

Any update on this issue ?

now it's called setHiddenAreas however it doesn't honor the startColumn or endColumn :(
So it hides whole lines! Can we add support to hide specific columns please!

Never mind, I can do this :)
const matches = contentModel.findMatches("someregex", false, true, false, null, true);
 contentModel.applyEdits(matches.map(x => {
                    return {
                        text: "",
                        range: x.range
                    }
                }));

I noticed that, although being a user feature request, setEditableRange seems to be removed from vscode as "unused code" as part of this issue
Please consider re-including a setEditableRange into the supported API.
It is useful in education and/or alongside code-generation; use cases where the user isn't intended to edit all of the source file.

+1 on including setEditableRange and setHiddenAreas.

If you are using typescript, you can use
monaco.languages.typescript.typescriptDefaults.addExtraLib('const arr = [];')

to achieve similar effect. Now arr variable will appear in intellisense.

If you are using typescript, you can use
monaco.languages.typescript.typescriptDefaults.addExtraLib('const arr = [];')

to achieve similar effect. Now arr variable will appear in intellisense.

If you are using typescript, you can use
monaco.languages.typescript.typescriptDefaults.addExtraLib('const arr = [];')

to achieve similar effect. Now arr variable will appear in intellisense.

it cannot use import from, only basic types. anybody knows how to add extra code not visible in code editor (for context) ?

Can we hide parts of the code instead of folding it or making it read only?

Any update on this one ?

Any update?

So I made a solution, at least for some cases. I've made the first and last line uneditable.
If what you want to achieve is doable with addExtraLib, do use it. This is a nice official way to add typings and stuff. My solution handles the case where it was not enough, mainly to change the context  of functions (change to what this points).

For my game editor ct.js, I ended up with tons of hacks that establish hidden and uneditable lines around the code: https://github.com/ct-js/ct-js/blob/develop/src/js/codeEditorHelpers.js#L74
Beware: it uses several unofficial APIs and this is not a solution to the original issue, but a collection of hacks due to the absence of better alternatives.
The hacks block direct editing from a keyboard, manage cursors and selectors, handle "Replace all" command, and hide the first and the last lines. Some constants are hard-coded, so you will need to improve the code for multiple hidden lines. The known issue is that you can view and delete the hidden code in the peek view, as it creates additional editors.

Is there any update on this API?

I have the same requirement, where ideally I would have a few lines hidden before and after the user code, this way the user wouldn't have to worry about boilerplate code and at the same time VSCode would still validate the code as if the boilerplate was wrapping the user code.
For instance on my case i would like the user to edit:
myEvent: (data) => {
  //  do something
},
anotherEvent: (data) => {
  //  do something
},

And before validating I would like to wrap it all in events = { ${code} } basically making a simplification for my user to edit a javascript object.

Would be greatt for my case, too. I would like the user to write code that contains the await keyword without exposing him to the async function around. So basically I would like to wrap the user code inside this:
(async () => {
 //user code goes here
})()

Without exposing this wrapper function to my user.

I need this functionality also. I'm currently working out a way to approximate the behaviour perhaps by intercepting and cancelling edits in "read only" ranges.

Ideas:

onDidChangeCursorPosition and onDidChangeCursorSelection, then force the cursor away from read-only ranges
deltaDecorations to make read-only appear in grey

I would like to add one more idea, if we undo the values entered in the areas which we marked as read-only, then user wont feel like that area is editable, and we can show it as a boilerplate code for the users
Actually i tried implementing this idea and for me it is working pretty well.
If you are interested to see the demo please check this link
If anyone wants to know more about the implementation read this article
For the code , see the github repo

Any update on this?

The internal ICodeEditor.setHiddenAreas(IRange[]) works well for this. It's an internal API but its used heavily in the newer notebooks stuff, so I'm willing to take the risk. I'm using the editor to view logs, and I wanted to be able to filter them in a way that hides anything that doesn't match and it works well.
editor.setHiddenAreas([]) will show them again, and editor.setHiddenAreas([new Range(1,0,10,0), new Range(20,0,30,0)]); will hide the first 10 and last 10 of a 30 line file. Line numbers stay correct for the areas shown.
I'd like to propose to maintainers that this api become public, this is a useful feature.

The internal ICodeEditor.setHiddenAreas(IRange[]) works well for this. It's an internal API but its used heavily in the newer notebooks stuff, so I'm willing to take the risk. I'm using the editor to view logs, and I wanted to be able to filter them in a way that hides anything that doesn't match and it works well.
editor.setHiddenAreas([]) will show them again, and editor.setHiddenAreas([new Range(1,0,10,0), new Range(20,0,30,0)]); will hide the first 10 and last 10 of a 30 line file. Line numbers stay correct for the areas shown.
I'd like to propose to maintainers that this api become public, this is a useful feature.

How do you expose the API?

Looking for this as well.

How do you expose the API?

One way is to extend the interface and then cast your instance to that interface and call the method:
interface IMyStandaloneCodeEditor extends monaco.editor.IStandaloneCodeEditor {
  setHiddenAreas(range: monaco.IRange[]): void;
}

...

const casted = editor as IMyStandaloneCodeEditor;
const range = new monaco.Range(1, 0, 1, 0);
casted.setHiddenAreas([range]);

Hi @alexdima.
It looks like setEditableRange and setHiddenAreas are no longer a part of the API. I would really appreciate it if you could suggest a workaround for this if you're aware of any.

It looks like setEditableRange and setHiddenAreas are no longer a part of the API. I would really appreciate it if you could suggest a workaround for this if you're aware of any.

setHiddenAreas still seems to be there, but setEditableRange does appear to be gone.
Current vscode/main/src/vs/editor/editorBrowser.ts

it will appear as though its not there, you just have to @ts-ignore or cast to any when using it in ts (editor as any).setHiddenAreas(...) you won't get any code completion for it, but it will work.
The current published version 0.34.1 this still works. here it is in the playground

Thanks, @RickeyWard. I've been doing it wrong. I was trying to .setHiddenAreas on a model instance.
The editor I'm trying to modify its values is not created by me, I am making use of window.editor to get the model instance. I've snooped around and can't seem to find an elegant way of getting the current editor's instance since I'm not creating the editor myself and window.editor.setHiddenAreas() wouldn't work.  Is there a way to navigate around that?

The editor I'm trying to modify its values is not created by me, I am making use of window.editor to get the model instance. I've snooped around and can't seem to find an elegant way of getting the current editor's instance since I'm not creating the editor myself and window.editor.setHiddenAreas() wouldn't work. Is there a way to navigate around that?

@Gbahdeyboh monaco.editor.getEditors() returns an array of editor instances, if you have access to the global monaco object you can get access to the editor instance I'm guessing window.editor is that but I'm not sure. If you're not driving monaco, then the more advanced things you try to do the harder it's going to be. GL!

In case of using setHiddenAreas content still searchable... is there a way to also limit searching for visible areas?
In case I use something like
      (editor as any).setHiddenAreas([new Range(1, 0, 1, 0), new Range(4, 0, 4, 0), new Range(8, 0, 8, 0)]);

content from lines 1, 4, 8 still searchable :thinking:
Many thanks!

All this is useless shit as there are tons of drawbacks besides just search issues and content being editable outside of the currently visible lines.
A fresh approach I've discovered is inspired on Civet's VSCode extension, basically you create a custom language that uses TS tokenizer, and steals QuickInfo, model markers, and completions from a regular TS Model that has your wrappers added, and you adjust positions according to your wrappers.
This loses Ctrl+Click discoverability across files, but is fine in my case. (A game engine.) Inline error checks, documentation and completions are all working.
I don't have a ready-made example for TypeScript yet, but I do have a working implementation of Civet language in Monaco, with custom wrappers. A seeking mind will be able to simplify it back to be just TypeScript but with wrappers. Civet compiles to TypeScript so I additionally use sourcemaps to go from TypeScript back to user's Civet code.
HoverProvider, diagnostics conversion, and completions converter: https://github.com/ct-js/ct-js/blob/16e926544192ce334953e1fdbefe119a7f6ab194/src/node_requires/civetLanguageFeatures.ts
I then use this to init the language features:
const coffeescriptTokenizer = require('src/node_requires/coffeescriptTokenizer.js').language;
const {CivetHoverProvider, completionsProvider, provideMarkers} = require('src/node_requires/civetLanguageFeatures.ts/');

const ts = monaco.languages.typescript;

monaco.languages.register({
    id: 'civet'
});

// Workaround for an ancient bug that ignores custom providers
monaco.editor.create(document.createElement('textarea'), {
    language: 'civet',
    value: ':)'
});
setTimeout(() => {
    monaco.languages.setMonarchTokensProvider('civet', coffeescriptTokenizer);
    monaco.languages.registerCompletionItemProvider('civet', completionsProvider);
    ts.getTypeScriptWorker()
    .then(client => {
        monaco.languages.registerHoverProvider('civet', new CivetHoverProvider(client));
    });
}, 1000);

And on your custom languages' editors, call provideMarkers(codeEditor); to retrieve diagnostics markers (these are errors and warnings in code).


fix4 phase agg may lost parameter in some case

Proposed changes
The last param of AggregateExpression's constructor should be agg function in phase 3 or 4-phase agg

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall


Different spacing between two atoms if create the same elements with the different zoom

Steps to Reproduce
Select N from right pallet
Click on Canvas.
Click the arrow for the drop-down list and minimize zoom to 20 % value.
Click on Canvas.
Click the arrow for the drop-down list and maximize zoom to 100 % value.
Expected behavior
Both molecules are displayed identically on 100% scale (have identical character spacing).
Actual behavior
Second molecule have other spacing between atoms then the first
Screenshots

Desktop (please complete the following information):

OS: Windows 10
Browser Chrome Version 93.0.4577.63, Firefox Version 94.0.1, Microsoft Edge Version 93.0.961.47

We've already tried to fix the issue (#180 ) by decreasing margins between letters based in zoom. Here's the commit.
That fix works for most users on Windows, but breaks it for some other Windows users and Mac users (letters can get squashed together).
I think I’ve identified the problem, but I’m not yet sure how we should deal with it. Here’s a description for the record and for further discussion.
Description
When we put N on a canvas, we add H and 3 next to it as separate <text> elements. We calculate margins between letters based on N’s width which we get by calling getBBox() on it. (reatom class at ketcher-core)
The problem is, on Windows, with certain resolutions and/or zoom, width property returned by getBBox() is different at different scales.
Example
Here’s a reduced example on codepen that lets you see width of a letter at 1 and 0.2 scales: https://codepen.io/itwasnotme/pen/poWzYVj
This is how it behaves on my Windows 10, display resolution at 2560x1600, scale 175% set in system preferences:

The width of a symbol calculated by getBBox increases significantly on scale down.
You can play with it and see how on Windows your results will be different on different browsers and in-browser zoom. If width doesn't change significantly for you on toggle, in ketcher you will see atom labels rendered at 20% scale looking fine on versions 2.3.x, but squashig together on branch release/2.4.
For discussion
In ketcher, margins are not recalculated upon canvas rescaling, so NH3 rendered at 20% zoom can have weird apparent margins when we zoom back to 100%. (Rerendering atom by undo/redo fixes it.)
As long as we rely on width returned by getBBox for label letter positioning, it seems impossible to get consistent look of atom labels at different scales without having to introduce some changes into rendering logic.