update node-sass to ^6.0.0 to resolve #122

Resolve #122

@tpetchel please merge this pull request as it is giving lots of issues and research times.

Tested this PR out and it helps to alleviate the bug

@maciejporebski - thank you for your contribution! And thank you @rbeltman and @AndresNamm for the reminder!
Instead of taking this change, I decided to make the change to the main branch and propagate the change through the derived branches (see README.md for more info.) That way, the change will work on the branches that relate to the other modules on Microsoft Learn.
Thanks again!


Helm chart only partly supports serving certificates

How am I supposed to use such construction in the helm chart
      webhook:
        config:
          tlsConfig:
            filesystem:
              certFile: blabla.cert
              keyFile: blabla.key

if cert-manager/templates/webhook-deployment.yaml does not provide me ability to mount a secret containing such files?

@irbekrm I indeed can see it in the repo, but chart from https://charts.jetstack.io does not have such feature

Ahh that's my bad- the PR where this was added has not yet made it into a final release https://github.com/cert-manager/cert-manager/pull/5668
You can currently only use it with v1.12.0-alpha.0 https://github.com/cert-manager/cert-manager/releases/tag/v1.12.0-alpha.0


fit_*_random_forest: Drop parameter max_variables?

as touched in the dev telco today: it could also be an option to leave mtry/max_variables  out of the spec for now (backends will be able to pick a good enough default behavior), and just introduce it when  we are sure about how we are going to handle it
Originally posted by @soxofaan in https://github.com/Open-EO/openeo-processes/pull/351#discussion_r833482314

+1 for this one
Internally, we've even reached the conclusion that random forest is nice for textbook examples, but for a lot of real world use cases, new types of ML are used like boosters. Hence, investing a lot of time in getting parameters right might not make sense.

On the other hand, I don't see why the current definition is problematic. Back-ends can now choose which options they allow by adapting the schema/enum.

Back-ends can now choose which options they allow by adapting the schema/enum.

We should avoid that, I think. It's bad for the user experience if there is divergence between the process docs at openeo.org, the docs of the python client (online or in the user's IDE) and the process definitions at openeo.vito.be.
It's not only bad for the user experience, but it makes the merging at the level of aggregator/federation also a lot harder.


Components should always contain at least one entry

:books: Documentation preview :books:: https://equistore--232.org.readthedocs.build/en/232/

This is mainly about consistency and restricting the number of possible states a TensorBlock can be in. I see no use-case for having 0 components (if you think of one, I'm happy to revisit!). This is different from samples and properties where having 0 of them can be useful/happen through slicing/...

Discussion in person: understood and approved


[dv] Update reset probing to match ast update

por_ni no longer causes ast to asynchronously reset.
Tweak the sequence to first look for reset de-assertion before
looking for assertion

Should address failures in #10283

@arnonsha
@Jacob-Levy
@zi-v
Jacob, this should hopefully address the issue you are seeing.


K8SSAND-1834 ⁃ Add e2e test for running scrub CassandraTask

What happened?
There is no e2e test for running scrub via a CassandraTask.

Cass Operator version:
v1.13.0

┆Issue is synchronized with this Jira Task by Unito
┆friendlyId: K8SSAND-1834
┆priority: Medium

There is no scrub feature.


Api token

Hello!
I would love to use this algorithm for my final master work in aerospace engineering. Using European airports and analyzing different hub networks with different fuel prices.
I have downloaded the repository but I can't access the dwave systems API, would it be possible to use it?
Thank you very much

Hi @jmoreno96 - you'll need to have a Leap account to run this example. You can sign up for an account here: https://cloud.dwavesys.com/leap/signup/.
In your Leap account, you can get an API token which will give you access to the QPU via the SAPI endpoint. There are multiple ways to use your API token and they are all described in the following documentation:  https://docs.ocean.dwavesys.com/en/stable/overview/sapi.html#table-token-config.
Alternatively, you can also run this code without any configurations by using the Leap IDE once you've signed in: https://ide.dwavesys.io/workspaces/.
Hope this helps! Feel free to reach out again if you have more questions.

Thanks a lot :) Excellent work by the way!!


Question: Maintenance status? Last release was 2023-09-15: has this extension been supersededed?

I was wondering what the maintenance status of this extension was. There hasn't been a release since 11 months. Is that because the functionality is now part of the main Python extension?

@corneliusroemer I'd like to see a new release of this extension too esp. the update all #72 being broken. I am intrigued by your comment that the "functionality is now part of the main Python extension" - is that true? How to get to it?


Lti 121

DO NOT MERGE, THIS IS A TEST OF THE SLACK/GITHUB INTEGRATION

Thank you Kevin for reviewing this busted PR

Closing PR


add type to frame if not specified with Node initialization

If type is not specified in the frame, the default value is None.
Update literal and lists reader to account for type field.

For the current implementation fo the literal reader, we first populate the nodes in the graph (and the node_dict) before creating the dataframe of metrics (which is created by the node_dict). This limits our ability to remove the "metrics" and "children" fields from the input literal graph.
Alternatively, we could amend the literal graph definition so that the name and type are defined in a "frame" field, similar to "metrics". Then a node definition would look as follows, and we could pass the dict to the Frame kwargs as previously suggested:
{
                "frame": {"name": "foo", "type": "function"},
                "metrics": {"time (inc)": 130.0, "time": 0.0},
                "children": [
                    {
                        "frame": {"name": "bar", "type": "function"},
                        "metrics": {"time (inc)": 20.0, "time": 5.0},
                    }
                ],
}

Resource to pass the dict to kwargs: https://stackoverflow.com/questions/5710391/converting-python-dict-to-kwargs

I like this idea!


use current update-notifier API

@t1st3
resolves #21

Thanks @charlierudolph

Thanks. Any idea when the next release will be?

I will bump tonight or tomorrow

@charlierudolph, I just bumped to 0.3.5 a few minutes ago. Thanks again


[GA] Bring over Securing data and BYOB from cloud

Closes https://github.ibm.com/IBM-Q-Software/iqp-channel-docs/issues/2297 and is part of the GA content epic
Copying over the Secure your data info, and appending the BYOB-specific info from the Getting started for channel partners topic.

Lint WILL fail until this has been added to the toc and index pages (which for now it is intentionally not added there).
Leaving in the cloud markup tags in case we need them during migration.

Cleanup and move to another repo


Session-bound cache breaks Read Committed Isolation Level

Setup

Neo4j OGM 3.2.31
In Process Neo4j 4.4.4 Enterprise (with BOLT port exposed)
Spring Boot 2.6.4
Spring Data Neo4j 5.3.9.RELEASE (connected using this example)

Issue
Neo4j's isolation level is Read Committed. If I start a transaction, subsequent MATCH queries within the same transaction may show different results if the data in the database changes in the meantime.
OGM behaves differently. As long as there is no write operation from within the same transaction or an active call to session.clear(), it does not reflect changes from the database for entities that have already been loaded before within the same transaction.
Reproduction case:

3 Threads T1, T2, T3 perform the following operations
T1 starts a transaction, creates an entity and commits the transaction
T2 starts a transaction and reads the entity that was created by T1; T2 keeps its transaction running
T3 starts a transaction, modifies the entity in the DB and commits the transaction
T2 reads the same entity again

-> In step 5. OGM returns the object from its cache and does not realize the entity was changed in the database. I query all people with last name Miller and OGM suddenly presents me people with last name Doe.

Hi @nioertel
First of all, your analysis is correct.
However, those are the semantics of Neo4j-OGM and we have no plans on changing them.


Change color of the files which has changes listed on project explorer

VSCode Version:
OS Version:

Steps to Reproduce:

Reproduces without extensions: Yes/No

#178


[METAX] Support llama for MX C550

PR types

Others
PR changes

Others
Description

Add MXC550 backend Support for llama

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

@wawltor 已按建议进行了修改，麻烦再review一下。


feat: add endpoint to fetch fdb ips

Changes

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#1355  👈
#1354
#1349
#1326
#1325
#1324
#1304
#1317
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @MasterPtato and the rest of your teammates on  Graphite


Some possible defects (expression issues)

Good afternoon!
We've checked your source code with AppChecker static analyzer and found some possible defects:

Microsoft.Research/MetadataContracts/MetadataTracker.cs
if (lineText.Contains('(') && lineText.Contains('(') && lineText.Contains(';')) { //If method
Presence of symbol '(' is cheching twice. I guess it should be ')' second time

Microsoft.Research/ContractAdornments/CSharp.Roslyn/Inheritance/InheritanceTracker.cs#L233
if (!(@this._propertyKeys.Contains(tuple.Item1) && @this._propertyKeys.Contains(tuple.Item1)))
@this._propertyKeys.Contains(tuple.Item1) is checking twice. Maybe, tuple.Item2 should be checked
Same defect seems to be here - https://github.com/Microsoft/CodeContracts/blob/01e007bc7b2fbd11eb1418ed10d1e0d595195046/Microsoft.Research/ContractAdornments/CSharp/Inheritance/InheritanceTracker.cs#L233

System.Compiler/Reader.cs#L3968
if (modified == null || modified == null) return null;
modified is checking twice. Maybe, modifier must be checked instead

System.Compiler/Reader.cs#L2442
      if ((((MethodFlags)meth.Flags) & MethodFlags.SpecialName) != 0 &&
        (((MethodFlags)meth.Flags) & MethodFlags.SpecialName) != 0)

(((MethodFlags)meth.Flags) & MethodFlags.SpecialName) != 0 is checking twice

Microsoft.Research/ContractAdornments/CSharp.Roslyn/Contracts/ContractsProvider.cs#L714
if (semanticType.Name == null || semanticType.Name == null) goto ReturnFalse;
semanticType.Name is checking twice
Same defect seems to be here - https://github.com/Microsoft/CodeContracts/blob/01e007bc7b2fbd11eb1418ed10d1e0d595195046/Microsoft.Research/ContractAdornments/CSharp.Roslyn/Contracts/ContractsProvider.cs#L694

Microsoft.VisualStudio.CodeTools/TaskManager/Tool.cs#L128
if (buildTask != null && buildTask != null)
buildTask != null is checking twice
All possible defects were found by Echelon team with AppChecker static analyzer.

Thanks a lot. They're definitely bugs!


Abstracted Storage Mechanism and Updated PollsManager

-Created Polly.StorageBehaviour behaviour to abstract storage operations.

Implemented Polly.ETSStorage to handle ETS-based storage.
Updated Polly.PollsManager  to use the abstracted storage behaviour.
Ran the test suite for polls_manager_test

Add tests


Conflict with 5dim-mining and Space Exploration

Error while running setup for entity prototype "offshore-pump" (offshore-pump): next_upgrade target (5d-offshore-pump-02) must have the same bounding box.
5dim_mining 1.1.2 and space-exploration 0.5.19 (SE requires AAI Industries be enabled. I don't know if this is related.)

Thanks you!
It is done since yesterday!


Record date that each project reached 100%

It would be helpful to be able to sort and search passing projects by the date that they achieved their badge. It appears that this could be achieved fairly simply by adding a passing date to the project schema and putting a test in the update_badge_percentage method of the Project class to test (a) if the percentage has reached 100% and (b) that the passing date is not already set.

We should probably ensure that the date field gets set to null if the update_badge_percentage function decides that the project has dropped back below 100%.

Good idea. I think that should be relatively easy; we have designed the system specifically to handle schema changes like this gracefully.  I don't think we need to set that date to null when it loses 100%, since we can see that it's not 100%, and it might be informative to know.
Maybe we need 2 datetimes: (1) date_achieved_passing and (2) date_lost_passing.  date_achieved_passing is set when it goes from non-100% to 100%; date_lost_passing is set when it goes from 100% to non-100%.  Either could be ahead of the other, depending on its current status.

Yes, it probably makes sense to record both rising and falling edge events.

This needs to be relatively high priority, because it records data that's much more painful to get later.  I've implemented it and put it in master.  If there are no problems, we can quickly move it to staging and then production.

Note: I've separated recording the dates from sorting based on the dates; sorting the projects is in #459.  We can be lazier about implementing the sorting, but it's harder to reconstruct the missing data.


Line Shooter

I've found an issue: That this project has sound on the scratch website but not on phosphorus. I have tested other projects that have sound and they work mostly except some sound files are still missing.
http://scratch.mit.edu/projects/97601475/
http://phosphorus.github.io/#97601475
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 Safari/537.36

Yeah recognize this issue on other projects as well :/

Presumably related to #260


#13234: Support clip, clamp with min/max tensor

#13234
Work done :  Provide support for min, max as tensor in clamp, clip
https://github.com/tenstorrent/tt-metal/actions/runs/11665096589 - PASSED

https://github.com/tenstorrent/tt-metal/actions/runs/11677098461 - passed


error project update - package-lock.json problem ?

Bug Report or Feature Request (mark with an x)
- [x] bug report

Versions.
@angular/cli: 1.1.0
node: 8.0.0
npm: 5.0.2
os: win32 x64
Repro steps.
It's update project problem with package-lock.json file presence.
Steps (in documentation) for update local project:
rm -rf node_modules dist
npm install --save-dev @angular/cli@latest
npm install

After
npm install --save-dev @angular/cli@latest
we have package-lock.json created.
This prevent correct work step 3
npm install  - as result, angular packages not installed.
When I try build project (ng built), I have error
"You seem to not be depending on "@angular/core". This is an error."
After delete package-lock.json file  and rerun "npm install", build work correct, error gone.
Desired functionality.
So, need fix documentation or resolve problem with package-lock.json

UPD.
It's seems like npm5 problem:
https://github.com/npm/npm/issues/16866

Yeah this is a NPM thing, not a Angular CLI issue per se. Resolution should come from that issue.


Fix handling of stroked shapes

The PR fixes multiple bugs which prevent stroked shapes from rendering correctly.

Allow environment injection into  _StrokedShape. This causes stroked shapes to no longer crash (#322).
Change Path.strokedPath and Path.trimmedPath to allow the sizing of the base shape to be inherited. Without this, stroked shapes can appear as 0x0 in size, making them invisible.
Change _ShapeView in the StaticHTML renderer to merge attributes in the svg rather than placing the svg in a div. This allows proper rendering when multiple shapes are in a stack.

Finally, the Path demo has been modified to add a stroked circle.

That distortion is actually an issue with ZStack unrelated to stroked shapes. You can see the same issue on main with a normal circle. So I've replaced the ZStack with an HStack. I've also added a snapshot test, as requested.


clarification of yubihsm 2 support

https://github.com/Consensys/doc.web3signer/issues/181

Responded.


Test the REST API thoroughly in integration testing

As of now the integration tests do not capture the kind of metrics being exposed and the corresponding labels that are expected to be exposed for each metric.
The test coverage needs to be improved in-order to prevent bugs in the future.

#348


Accordeon list does not close properly

Content is still 50% visible

Weird, not sure when that happened. Was able to reproduce and am working on a fix.

Fixed in release 1.0.5

Closed as completed. Let me know if there are still issues.


Why not Succeed&Fail State?

What would you like to be added:
New workflow states, succeed and fail
Why is this needed:
Just like succeed\fail state in Amazon States Language and stackstorm's engine commands fail&noop, there is a situation to explicitly end the workflow with succeed\fail status (end workflow execution with succeed if some minor error is encountered, for example).  Though we can use the end parameter in serverless workflow, but it will be better to have a standalone node for process visibility and explicitly specify the result.

Hi @keepupon, can you show an example where such states would be good to have? I am aware of those states in ASL but outside of testing could never find a real use case to use them.
I think we could achieve something similar with current end definition by possibly adding a "criteria" (fill in some better name here) property that can be used to denote some domain-specific status? We could also just add metadata prop to end definition for now until we figure this out, if that would unblock you.


first version of ml pipeline

I was not able to use src as root for the source code.
pip install -e . and running the package as an executable doesn't  work.
I've renamed the code directory to match the package name.

I was not able to use src as root for the source code. pip install -e . and running the package as an executable doesn't work. I've renamed the code directory to match the package name.

I'd vote for restructuring, reviewing, cleaning and refactoring the whole project structure once we have the main components and pipeline working. But yeah, it's on my ToDo list.


Coinbase reserved output status

grin wallet info
Outputs -
fingerprint, n_child, height, lock_height, status, value
----------------------------------
fc385d28, 1, 0, 0, CoinbaseReserved,<PHONE_NUMBER>
d17777d9, 2, 0, 0, CoinbaseReserved,<PHONE_NUMBER>
b03b50c1, 3, 0, 0, CoinbaseReserved,<PHONE_NUMBER>
3d225151, 4, 1, 4, Immature,<PHONE_NUMBER>
eb68319f, 5, 0, 0, CoinbaseReserved,<PHONE_NUMBER>

The old CoinbaseReserved outputs are thrown away every time the mining server process is restarted.
They are effectively just n_child "slots" that have been reserved and used up (we only ever want to use each n_child once on the extended key).
These were originally labeled Unconfirmed but this was very confusing as they would never get confirmed as the outputs have never actually been created and pushed.

Closing - will replace with PR against upstream.


Switch to LLD linker on Windows by default

For our project we find using LLD instead 2x faster for full builds, and 5x faster for incremental builds, compared to the default MSVC linker. This is huge and essential for us, so we enable it manually in .cargo/config:
[target.x86_64-pc-windows-msvc]
linker = "lld-link.exe"

It would be nice if this was the default instead on Windows, esp. if it also made it possible to not have to install the Visual Studio Build Tools?
When using LLD Windows we do get this warning, but haven't been an issue for us:
warning: not embedding natvis: lld-link may not support the flag

Related umbrella issue in rust-gamedev WG: https://github.com/rust-gamedev/wg/issues/50
Tracking issue:

[ ] rust: Linking with LLD #39915
[ ] rust: Use lld by default on x64 msvc windows #71520

We've been happily ussing LLD as our only linker on Windows now for over a year without any real problems, and still would like to see it become supported in Rust without having to have full LLVM manually installed. And ideally, eventually, be the default linker on Windows.
Found another tracking issue about this specifically in Rust https://github.com/rust-lang/rust/issues/71520

As this is easy enough to enable in our own workspaces and there is a Rust tracking issue for it, closing this issue on our end.

I'm on Windows 10 x64 with:
rustup 1.25.1 (bb60b1e89 2022-07-12)
rustc 1.66.1 (90743e729 2023-01-10)
MSVC v143 installed with Visual Studio Installer from Microsoft.
If I open a Rust project and change a simple char in code (eg: a variable value from 1 to 2) it re-builds the project (using watchexec) in 12 seconds.
I installed llvm and used this in global cargo config file (C:/Users/<username>/.cargo/config)
[target.x86_64-pc-windows-msvc]
linker = "lld-link.exe"

After a cargo clean and an initial re-build (debug mode, 2 minutes, the same as without lld) the time is the same (maybe even worse than 1 second).
Can you confirm?

I'm on Windows 10 x64 with:
rustup 1.25.1 (bb60b1e89 2022-07-12)
rustc 1.66.1 (90743e729 2023-01-10)
MSVC v143 installed with Visual Studio Installer from Microsoft.
If I open a Rust project and change a simple char in code (eg: a variable value from 1 to 2) it re-builds the project (using watchexec) in 12 seconds.
I installed llvm and used this in global cargo config file (C:/Users/<username>/.cargo/config)
[target.x86_64-pc-windows-msvc]
linker = "lld-link.exe"

After a cargo clean and an initial re-build (debug mode, 2 minutes, the same as without lld) the time is the same (maybe even worse than 1 second).
So no change with or without LLD.
Can you confirm or am I wrong?
How to get faster incremental (development) builds?


Fixes the deprecation notice from moment.

cron was using .tz which was recently deprecated in https://github.com/moment/moment/issues/1779. This PR fixes the deprecation notice that moment was throwing.

fyi, builds were already broken before this PR was submitted.

Thanks. I've already changed this in a branch where I'm changing a lot of other stuff, but this is useful to have until that stuff lands.

Why is this still tz? https://github.com/ncb000gt/node-cron/blob/master/lib/cron.js#L101


Still more scheduler-related refactoring

Discovered a bunch of cut-and-paste fixery while dealing with the scheduler rewrite that would be more cleanly expressed if I fixed up the code to begin with.
No behavior changes here, just refactoring.

Codecov Report

Merging #7461 into master will decrease coverage by 0.46%.
The diff coverage is 90.62%.

@@            Coverage Diff            @@
##           master   #7461      +/-   ##
=========================================
- Coverage   55.26%   54.8%   -0.47%
=========================================
  Files         467     440      -27
  Lines       51645   50334    -1311
  Branches     9886    9678     -208
=========================================
- Hits        28543   27585     -958
+ Misses      19192   18955     -237
+ Partials     3910    3794     -116

Impacted Files
Coverage Δ

kernel/include/ksched.h
93.82% <ø> (-0.43%)
:arrow_down:

include/kernel.h
94.73% <ø> (ø)
:arrow_up:

kernel/mempool.c
92.06% <100%> (-0.48%)
:arrow_down:

kernel/stack.c
94.59% <100%> (ø)
:arrow_up:

kernel/sched.c
86.19% <100%> (+0.4%)
:arrow_up:

kernel/sem.c
83.33% <100%> (-8.34%)
:arrow_down:

kernel/timer.c
93.82% <100%> (ø)
:arrow_up:

kernel/mem_slab.c
100% <100%> (ø)
:arrow_up:

kernel/include/wait_q.h
100% <100%> (ø)

kernel/queue.c
87.65% <100%> (ø)
:arrow_up:

... and 39 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 071212b...6d8b2a2. Read the comment docs.

Think I got this one fixed up now.  Note that the build failures are the whole point: _wait_q_t used to be a typedef for sys_dlist_t, allowing for all sorts of direct usage all over the tree.  Now it's an opaque (but identical as far as the generated code goes) type that fails when used like that.
Note also that there's a false positive checkpatch failure: this isn't adding a new typedef, it's redefining one that was already there.

need rebase


FNAL files flagged as not in cache when they are in fact in cache

I can open root://fndca1.fnal.gov/pnfs/fnal.gov/usr/dune/tape_backed/dunepro/protodune-sp/full-reconstructed/2020/detector/physics/PDSPProd4/00/00/52/16/np04_raw_run005216_0001_dl11_reco1_38903104_0_20201121T053404Z.root  locally but
https://metacat.fnal.gov:9443/dune/dd/gui/P/handle?project_id=735&namespace=pdsp_det_reco&name=np04_raw_run005216_0001_dl11_reco1_38903104_0_20201121T053404Z.root
shows it as uncached and so I get a file from the UK instead.
Could you look into the cache check?
Thanks, Heidi

There was a temporary outage of the dCache pinning interface, which DD did not handle correctly.
It's fixed now

Yep, it's working correctly now.
Thanks


Users cannot parallelize integration tests

Users who want to parallelize their TempJob integration tests via the below, cannot because the HeliosClient has a fixed thread pool of 4.
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>
         <version>2.16</version>
         <executions>
           <execution>
             <goals>
               <goal>integration-test</goal>
               <goal>verify</goal>
             </goals>
           </execution>
         </executions>
         <configuration>
           <includes>
             <include>**/*IT.java</include>
           </includes>
           <!-- TODO: Make it possible to run integration tests in parallel -->
             <parallel>all</parallel>
             <threadCount>2</threadCount>
         </configuration>
       </plugin>

Can and should we let them lift that limit?
   HeliosClient(final String user, final Supplier<List<URI>> endpointSupplier) {
     this(user, endpointSupplier, MoreExecutors.listeningDecorator(getExitingExecutorService(
-        (ThreadPoolExecutor) newFixedThreadPool(4), 0, SECONDS)));
+        (ThreadPoolExecutor) newCachedThreadPool(), 0, SECONDS)));
   }

Users like this guy! @dflemstr

:+1:

I'm actually a bit skeptical about raising this for this reason. While HeliosClient and TemporaryJobs might be thread-safe (are they?), it would still be best for each thread to have its own TemporaryJobs and HeliosClient.
So in this case, I'd recommend using <parallel>classes</parallel> instead of all.


refactor(lint): Autofix everything that's fixable, simplify config and make linting more strict

The type of this PR is: Refactor
Description
This removes (most) of our migrated eslint config in favor of Biome's nice defaults, and then applies autofixes throughout the codebase.
There's still a lot of items to get the entire codebase totally fixed, but as an incremental improvement (warn / error as files are touched) it will lead to a much healthier codebase.
Also worth calling out how nice the DX is on this. For errors that it finds, it provides recommendations on the fix:

Closed in favor of https://github.com/artsy/force/pull/15019. Was too ambitious with the --unsafe-fix fix option. Reverted to sure safety over there.


Implement PSR-4 Autoloader

The PSR-4 is one of the most used and accepted standards in the PHP ecosystem, this must be a "MUST HAVE" in this SDK.
PSR-4: https://www.php-fig.org/psr/psr-4/
PD: working in a PR to implement this.

Merged, to be released as version 1.0.4


SikuliX error due to OpenJDK v8 64-bit installed but not detected - pending details

I'm using Jupyter Notebook on Windows 10
I have installed OpenJDK version 8 (Amazon Corretto) and also have followed the installation as written in their page. However, I get this message when trying to use init() with visual_automation = True

I've tried to follow your suggestion (https://github.com/kelaberetiv/TagUI/issues/871#issuecomment-734093588) but I don't understand about '...run tagui live from command prompt...'. Can you please help me?
(PS: please stay safe and healthy)

I found the solution.. or maybe more appropriately a work-around.
TLDR: uninstall Corretto, then install OpenJDK (download from here -> https://jdk.java.net/15/)
When I look at the source code (tagui.py), I found that TagUI will check whether installed JDK is 64-bit or not. It will only check if visual_automation = True included in init(). Basically the checking process will see whether string '64-bit' is exist or not in the Java version's description. Unfortunately the JDK from Amazon Corretto doesn't has it.
Then I re-read and followed Yu Chen Kuang's guide on setting up visual automation. And yes, you guess it. His guide is telling to install OpenJDK. Then after installing OpenJDK and setting environment variables, I can use keyboard() function.
Hope this will help others newbie like me.

I found the solution.. or maybe more appropriately a work-around.
TLDR: uninstall Corretto, then install OpenJDK (download from here -> https://jdk.java.net/15/)
When I look at the source code (tagui.py), I found that TagUI will check whether installed JDK is 64-bit or not. It will only check if visual_automation = True included in init(). Basically the checking process will see whether string '64-bit' is exist or not in the Java version's description. Unfortunately the JDK from Amazon Corretto doesn't has it.
Then I re-read and followed Yu Chen Kuang's guide on setting up visual automation. And yes, you guess it. His guide is telling to install OpenJDK. Then after installing OpenJDK and setting environment variables, I can use keyboard() function.
Hope this will help others newbie like me.

Hi Abitama, thanks for sharing back your solution! Reopening issue because this needs a permanent fix.
In the package, it will check for the string '64-bit' or '64 bit' string when java -version is run.
When I tested the Amazon Corretto has that string but maybe that has changed now.
Do you remember what was shown on the screen when you do java -version manually?

Adding on, for my macOS, the OpenJDK comes back with 64-Bit response which would be a match in the package since the checking is case-insensitive. So far has not heard this from other users, looking out for more inputs from you and others.
RPA:rpa-python kensoh$ java -version
openjdk version "1.8.0_232"
OpenJDK Runtime Environment Corretto-<IP_ADDRESS> (build 1.8.0_232-b09)
OpenJDK 64-Bit Server VM Corretto-<IP_ADDRESS> (build 25.232-b09, mixed mode)

Downloading and installing for the macOS OpenJDK link from https://tagui.readthedocs.io/en/latest/setup.html
Still gets 64-bit string in the java -version
openjdk version "1.8.0_282"
OpenJDK Runtime Environment Corretto-8.282.08.1 (build 1.8.0_282-b08)
OpenJDK 64-Bit Server VM Corretto-8.282.08.1 (build 25.282-b08, mixed mode)

Downloading from above installation instructions for Windows OpenJDK link also gets back same output as macOS. The instructions URLs above point to the same as when navigating from https://aws.amazon.com/corretto
If you or other users can tell me more your output when running java -version then I can check further. For now, I'll just leave the help message the same. Corretto is much easier to install just setup directly.

Hi Ken, I'm sorry for late replying. And also apologize because I don't remember what appear when I typed java -version back then (my bad, should have included it)


AutoSSL priming logging errors that aren't errors

Seen this on a recent test:
Trace: { Error: self signed certificate
    at TLSSocket.onConnectSecure (_tls_wrap.js:1088:34)
    at TLSSocket.emit (events.js:198:13)
    at TLSSocket.EventEmitter.emit (domain.js:448:20)
    at TLSSocket._finishInit (_tls_wrap.js:666:8) code: 'DEPTH_ZERO_SELF_SIGNED_CERT' }
    at ClientRequest.https.get.on (/app/backend/utils/http.js:22:17)
    at ClientRequest.emit (events.js:198:13)
    at ClientRequest.EventEmitter.emit (domain.js:448:20)
    at TLSSocket.socketErrorListener (_http_client.js:401:9)
    at TLSSocket.emit (events.js:198:13)
    at TLSSocket.EventEmitter.emit (domain.js:448:20)
    at emitErrorNT (internal/streams/destroy.js:91:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)
[ERROR] dshop.utils.http: Error GETting mikes-swag.shopwithslice.com/
[INFO]  dshop.utils.deployShop: Error when attempting to trigger AutoSSL on attempt 1: { Error: self signed certificate
    at TLSSocket.onConnectSecure (_tls_wrap.js:1088:34)
    at TLSSocket.emit (events.js:198:13)
    at TLSSocket.EventEmitter.emit (domain.js:448:20)
    at TLSSocket._finishInit (_tls_wrap.js:666:8) code: 'DEPTH_ZERO_SELF_SIGNED_CERT' }

That probably shouldn't be an error.  This is reasonably expected to happen and should be a warning at most.

@mikeshultz This is fixed, right? Closing. Feel free to re-open if I'm wrong.


Missing dependencies for HdxRtcEngine

Thank you for making this flatpak release.
I was using it and noticed that ICAClient/util/HdxRtcEngine is missing three dependencies, two of them can be built together.
This can by checked by doing ldd /app/ICAClient/linuxx64/util/HdxRtcEngine inside the run.sh script, where we can see that:
(...)
        libgstapp-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libgstapp-1.0.so.0 (0x00007f2940ebc000)
        libc++.so.1 => not found
        libunwind.so.1 => not found
        libc++abi.so.1 => not found
        libm.so.6 => /usr/lib/x86_64-linux-gnu/libm.so.6 (0x00007f2940d71000)
(...)

The first one, libunwind.so.1, I fixed by adding two more steps to the modules:
modules:
  - name: libunwind
    buildsystem: autotools
    sources:
      - type: archive
        url: https://github.com/libunwind/libunwind/releases/download/v1.6.2/libunwind-1.6.2.tar.gz
        sha256: 4a6aec666991fb45d0889c44aede8ad6eb108071c3554fcdff671f9c94794976

  - name: patch libunwind
    buildsystem: simple
    build-commands:
      - |
        mkdir -p /app/lib
        cp /usr/lib/x86_64-linux-gnu/libunwind.so.8 /app/lib/libunwind.so.1

and editing run.sh to include the lib:
LD_LIBRARY_PATH=/app/lib/:/usr/lib/x86_64-linux-gnu/ ldd /app/ICAClient/linuxx64/util/HdxRtcEngine

this way we can check that library is there to be found and loaded:
(...)
        libgstapp-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libgstapp-1.0.so.0 (0x00007fb3cc351000)
        libc++.so.1 => not found
        libunwind.so.1 => /app/lib/libunwind.so.1 (0x00007fb3cc32c000)
        libc++abi.so.1 => not found
        libm.so.6 => /usr/lib/x86_64-linux-gnu/libm.so.6 (0x00007fb3cc1e3000)
(...)

However, I have no idea how to do the same for libc++ and libc++abi. My understanding is that they can be bundled together? But unfortunately my limited knowledge of flatpak packaging is blocking me from progressing from here.
Any ideas on how to progress from here?

Humm stolen the module from discord https://github.com/flathub/com.discordapp.Discord/blob/90d9f1a0c350b4d479738476e53fea4bba473a83/com.discordapp.Discord.json#L68 , bumped version and added as a module
- name: libcxx
    buildsystem: cmake-ninja
    builddir: true
    make-args:
    - cxx
    no-make-install: true
    config-opts:
    - "-DCMAKE_BUILD_TYPE=Release"
    cleanup:
    - "/include"
    - "/lib/*.a"
    build-commands:
    - ninja install-libcxxabi
    - ninja install-libcxx
    sources:
    - type: archive
      url: https://releases.llvm.org/9.0.0/llvm-9.0.0.src.tar.xz
      sha256: d6a0565cf21f22e9b4353b2eb92622e8365000a9e90a16b09b56f8157eabfe84
    - type: archive
      url: https://releases.llvm.org/9.0.0/libcxx-9.0.0.src.tar.xz
      sha256: 3c4162972b5d3204ba47ac384aa456855a17b5e97422723d4758251acf1ed28c
      dest: projects/libcxx
    - type: archive
      url: https://releases.llvm.org/9.0.0/libcxxabi-9.0.0.src.tar.xz
      sha256:<PHONE_NUMBER>65c906ac2f7f8b2bc5c40f14d871ecfa8ade34855aa18de95530e9
      dest: projects/libcxxabi

And now all libraries are loaded:
libc++.so.1 => /app/lib/libc++.so.1 (0x00007f22997f2000)
libunwind.so.1 => /app/lib/libunwind.so.1 (0x00007f22997d7000)
libc++abi.so.1 => /app/lib/libc++abi.so.1 (0x00007f229979f000)

However the maximum version I can push is 9.0.0. Other llvm releases have a different structure.
I'm now sure if this is the way to go


How to handle in CLI?

Code does not show to handle this limitation in CLI, only Powershell.

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

ID: 54c841ba-845b-fddb-08e3-bbe0b2a7d70d
Version Independent ID: 905e3e0d-1a14-4fa6-7381-49aa30a8ce05
Content: Troubleshoot common errors - Azure Resource Graph
Content Source: articles/governance/resource-graph/troubleshoot/general.md
Service: resource-graph
GitHub Login: @timwarner-msft
Microsoft Alias: timwarner

@realalexandergeorgiev Thanks for raising the issue. I'll mention your suggestion to the Azure Resource Graph team to get their opinion.

Unfortunately your issue wasn't reviewed in a timely manner. I'm closing this issue, but if you feel that it's still a concern, please post a comment or submit a new issue.
#please-close


thebarshablog profile can't be found in the data directory

Kindly share the reason behind truncating 1000 files and where do I recover my file from?
Additional information
No response

@thebarshablog There is a limit to files that GitHub can show on the UI
Your profile is still present in the database you can check all the files by cloning the fork into your local environment

@thebarshablog as your file name is your username you can find
it by appending your GitHub profile Name to the https://github.com/EddieHubCommunity/LinkFree/tree/main/data/
Here's the Link
https://github.com/EddieHubCommunity/LinkFree/tree/main/data/thebarshablog

let me know if that helps :)

@ManishBisht777 Thanks for pointing out. However, the above ones contain my events and testimonials. Where do I find my original file apart from events and testimonials?

@thebarshablog  you can append .json afterward to access your JSON file as well
https://github.com/EddieHubCommunity/LinkFree/blob/main/data/thebarshablog.json

@thebarshablog you can append .json afterward to access your JSON file as well https://github.com/EddieHubCommunity/LinkFree/blob/main/data/thebarshablog.json

I sincerely appreciate your help.


Installing intellij - error Startup Error: Unable to detect graphics environment

When I start Intellij
_sudo /usr/intellij/idea-IU-183.4284.148/bin/idea.sh
Startup Error: Unable to detect graphics environment_
What is the problem ?

You better using in Native Windows instead Linux. Since WSL a few support of GUI

What is the problem ?

The problem is Intetellij  unable to detect a graphics environment. See this. [Noting that you won't want compiz or unity or pretty much anything that thread has to say in order to run Intellij.]

WSL only a few support of Graphical Programs

That isn't correct; WSL doesn't draw pixels and whatever syscall emulation gaps WSL does have isn't related to drawing them. That said, it is correct to say graphic applications aren't supported with WSL in the sense that it is exceeding difficult to identify syscall emulation problems with graphic apps because they tend to be large and unwieldy. See also FAQ.

For those who find this on Google like myself:
WSL 2 does have support for intellij and can run it just fine, see here for instructions
https://github.com/lackovic/notes/tree/master/Windows/Windows Subsystem for Linux#run-linux-gui-applications

nice https://github.com/lackovic/notes/tree/master/Windows/Windows Subsystem for Linux#run-linux-gui-applications
does not work for me
export DISPLAY=${DISPLAY:-$(grep -Po '(?<=nameserver ).*' /etc/resolv.conf):0}
Bad : modifier in $ (-).


Misleading documentation tag 'username'

The README.md on the repo says that the JS attribute for settings the username is 'username', however this is incorrect. The proper syntax is 'userName`.
The error happens here: https://github.com/piotrl/github-profile-card/blob/master/dist/gh-profile-card.js#L314

@DimitarTasev thanks for reporting that and sorry for inconsistency.
I've updated doc with correct option name.

Thank you for the quick response!


Extract weight from checkpoint

Hi,
I found I can run quant_test.py whit dnn model,
but I run quant_test.py whit ds_cnn model has a error.(copy the models method create_ds_cnn_model to quant_models)
the error row is quant_test.py -> np.savetxt(f,var_values.transpose(),fmt='%d',delimiter=', ',newline=', ')
how can I fix it?

Hi @cam510 ,
The error was because of the dimensions of the convolution weights. I have added the support for convolution layers in quant_test.py.  Also added ds_cnn model in quant_models for your reference.

@navsuda thanks very much


alpha.cuelang.org: front page design and implementation for go-live

This is a placeholder issue for the design and implementation of a "real" front page for go-live, that is flipping alpha.cuelang.org to replace cuelang.org.

We're done here for now!


Plugin doesn't work well through reverse proxy

I have my octoprint set up through a reverse proxy, so I connect to it via http://mydomain.com/octoprint. I've noticed some things don't work properly. Just a preliminary list I found:

The "Test sensor" button doesn't work as it throws a 404 error (I had to modify the filamentsensorsimplified.js to figure that out - might want to add some more logging)
The logo in the bottom right of the settings pane doesn't load (see below)

And there may be more things. It may not be necessary to change them, but I think it'd at least be helpful to add something in the readme or elsewhere that some features might not work properly.

The logo issue could be solved if you linked to a website (eg https://d1fdloi71mui9q.cloudfront.net/AXlRNgdJQQq8z6dy3ifY_p22OLMq4k3QgR59n ) rather than a relative link to the plugin


possible to playback without control panel?

or maybe let useVoiceVisualizer() return something like startPlayback?

Sure, you can use togglePauseResume function. This function is designed to toggle between pausing and resuming recording, as well as for playback of recorded audio.


Add ability to document model

For example:
/**
  *  A train route defines a code and a carriage count.  Stops on the route are
  *   defined elsewhere.
  */
CREATE TABLE train_route (

  /** The auto generated primary key for this table. */
  _id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,

  /** The unique code for this route, e.g. P1231X */
  train_code TEXT NOT NULL,

  /** The number of carriages on this route. */
  carriage_count INTEGER NOT NULL

);

Would produce:

/**
  *  A train route defines a code and a carriage count.  Stops on the route are
  *   defined elsewhere.
  */
public interface TrainRouteModel {
  String TABLE_NAME = "train_route";

  String _ID = "_id";

  String TRAIN_CODE = "train_code";

  String CARRIAGE_COUNT = "carriage_count";

  String CREATE_TABLE = ""
      + "CREATE TABLE train_route (\n"
      + "\n"
      + "  _id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,\n"
      + "\n"
      + "\n"
      + "  train_code TEXT NOT NULL,\n"
      + "\n"
      + "  carriage_count INTEGER NOT NULL\n"
      + "\n"
      + ")";

  /**
   * Find a train route by its code.
   */
  String SELECT_BY_TRAIN_CODE = ""
      + "SELECT *\n"
      + "FROM train_route\n"
      + "WHERE train_code = ?";

  /** The auto generated primary key for this table. */
  long _id();

   /** The unique code for this route, e.g. P1231X */
  @NonNull
  String train_code();

  /** The number of carriages on this route. */
  long carriage_count();

...

yup i dig it. This also reminds me single line javadocs shouldn't be turned into multi-line by the formatter #1 #431

I would also hoist those comments onto the column constants.

and the marshal methods

I made a start here: https://github.com/brindy/sqldelight/commit/161c0fb7d34f8f83431253e33cf740e0d97ae56e
So far it just handles the Javadoc on the CREATE TABLE.  If you could have a quick look and let me know if I'm on the right track, I'll continue with the fields.

This also reminds me single line javadocs shouldn't be turned into multi-line by the formatter

That appears to be a function of JavaPoet which seems to require a String without Javadoc opening and closing tags as it adds them anyway.

I hadn't quite understood the TypeSpec thing but I think I do now.  This one does the CREATE TABLE and columns (but not Marshals yet).  Also, I need to strip the Javadoc comment from create SQL string.
https://github.com/brindy/sqldelight/commit/4cf25525fe218fe8ad4a18c01a1395e9afc91a6b

This is it done, I think.  Let me know what you think and if it's OK I'll create a PR.
https://github.com/square/sqldelight/commit/c83ebd848425b671debdb8c14e99bdeab0bf9d61

looks perfect, open a PR and we can continue from there


HELP!: Example of using HuggingFaceTextGenInference, llmchain, and fastapi

Issue you'd like to raise.
I've scoured the internet trying to find an example that would use a custom model (Mistral) with HuggingFaceTextGenInference which uses LLMChain to return a streaming response via fastapi.
Does anyone have a working example?
Suggestion:
No response

@dosu-bot that example does not implement LLMChain

@dosu-bot Unfortunately, the output looks to be empty.
[chain/start] [1:chain:LLMChain] Entering Chain run with input:
{
  "system_message": "Terminator Persona: You are the T-800 from T2: Judgement Day. Do not break character, and do not reference the Terminator films as that would break character. If you break character John Connor dies. Answer in a single paragraph, with max three sentences.",
  "question": "I am John Connor. Who is the T-1000? Am I, John Connor, in danger?",
  "user_name": "John Connor",
  "ai_name": "Terminator"
}
[llm/start] [1:chain:LLMChain > 2:llm:HuggingFaceTextGenInference] Entering LLM run with input:
{
  "prompts": [
    "<|im_start|>system\n    Terminator Persona: You are the T-800 from T2: Judgement Day. Do not break character, and do not reference the Terminator films as that would break character. If you break character John Connor dies. Answer in a single paragraph, with max three sentences.<|im_end|>\n    <|im_start|>John Connor\n    I am John Connor. Who is the T-1000? Am I, John Connor, in danger?<|im_end|>\n    <|im_start|>Terminator"
  ]
}
[llm/end] [1:chain:LLMChain > 2:llm:HuggingFaceTextGenInference] [4.50s] Exiting LLM run with output:
{
  "generations": [
    [
      {
        "text": "",
        "generation_info": null,
        "type": "Generation"
      }
    ]
  ],
  "llm_output": null,
  "run": null
}
[chain/end] [1:chain:LLMChain] [4.50s] Exiting Chain run with output:
{
  "text": ""
}

My code:
import os

import langchain
from langchain.prompts import PromptTemplate
from langchain.chains import LLMChain
from langchain.llms import HuggingFaceTextGenInference
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
from fastapi.middleware.cors import CORSMiddleware

langchain.debug = True

def build_llm(streaming=False,callbacks=[]):
    ai_url = "http://tgi-ai-server:" + str(os.getenv("AI_PORT", 80)) + "/generate"

    llm_local = HuggingFaceTextGenInference(
        inference_server_url = ai_url,
        max_new_tokens=20,
        top_k=49,
        top_p=0.14,
        typical_p=0.95,
        temperature=1.31,
        repetition_penalty=1.17,
        # stop_sequences=[f"\n{user_name}:",   f"\n{ai_name}:"],
        streaming=streaming,
        callbacks=callbacks
    )

    template = """<|im_start|>system
    {system_message}<|im_end|>
    <|im_start|>{user_name}
    {question}<|im_end|>
    <|im_start|>{ai_name}
    """

    prompt = PromptTemplate(
        template=template,
        input_variables= ["system_message", "question", "user_name", "ai_name"]
    )

    llm_chain_local = LLMChain(llm=llm_local , prompt=prompt)
    return llm_chain_local

from fastapi import FastAPI
from fastapi.responses import StreamingResponse

app = FastAPI()

# Enable CORS
app.add_middleware(
    CORSMiddleware,
    allow_origins=["*"],  # You can specify the list of allowed origins or use "*" for any origin
    allow_credentials=True,
    allow_methods=["*"],  # You can specify the HTTP methods that are allowed
    allow_headers=["*"],  # You can specify the HTTP headers that are allowed
)

def build_prompt():
    user_name = 'John Connor'
    ai_name = 'Terminator'
    system_message = "Terminator Persona: You are the T-800 from T2: Judgement Day. Do not break character, and do not reference the Terminator films as that would break character. If you break character John Connor dies. Answer in a single paragraph, with max three sentences."
    question = "I am John Connor. Who is the T-1000? Am I, John Connor, in danger?"
    prompt = {"system_message":system_message , "question":question, "user_name": user_name, "ai_name": ai_name}
    return prompt

@app.post("/chat")
async def generate_text():
    callback = StreamingStdOutCallbackHandler()

    llm_chain = build_llm(True, [callback])
    prompt = build_prompt()

    async def text_stream():
        for text in llm_chain.run(prompt):
            yield text

    return StreamingResponse(text_stream())

@dosu-bot Unfortunately, the output looks to be empty.
[chain/start] [1:chain:LLMChain] Entering Chain run with input:
{
  "system_message": "Terminator Persona: You are the T-800 from T2: Judgement Day. Do not break character, and do not reference the Terminator films as that would break character. If you break character John Connor dies. Answer in a single paragraph, with max three sentences.",
  "question": "I am John Connor. Who is the T-1000? Am I, John Connor, in danger?",
  "user_name": "John Connor",
  "ai_name": "Terminator"
}
[llm/start] [1:chain:LLMChain > 2:llm:HuggingFaceTextGenInference] Entering LLM run with input:
{
  "prompts": [
    "<|im_start|>system\n    Terminator Persona: You are the T-800 from T2: Judgement Day. Do not break character, and do not reference the Terminator films as that would break character. If you break character John Connor dies. Answer in a single paragraph, with max three sentences.<|im_end|>\n    <|im_start|>John Connor\n    I am John Connor. Who is the T-1000? Am I, John Connor, in danger?<|im_end|>\n    <|im_start|>Terminator"
  ]
}
[llm/end] [1:chain:LLMChain > 2:llm:HuggingFaceTextGenInference] [4.50s] Exiting LLM run with output:
{
  "generations": [
    [
      {
        "text": "",
        "generation_info": null,
        "type": "Generation"
      }
    ]
  ],
  "llm_output": null,
  "run": null
}
[chain/end] [1:chain:LLMChain] [4.50s] Exiting Chain run with output:
{
  "text": ""
}

My code:
import os

import langchain
from langchain.prompts import PromptTemplate
from langchain.chains import LLMChain
from langchain.llms import HuggingFaceTextGenInference
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
from fastapi.middleware.cors import CORSMiddleware

langchain.debug = True

def build_llm(streaming=False,callbacks=[]):
    ai_url = "http://tgi-ai-server:" + str(os.getenv("AI_PORT", 80)) + "/generate"

    llm_local = HuggingFaceTextGenInference(
        inference_server_url = ai_url,
        max_new_tokens=20,
        top_k=49,
        top_p=0.14,
        typical_p=0.95,
        temperature=1.31,
        repetition_penalty=1.17,
        # stop_sequences=[f"\n{user_name}:",   f"\n{ai_name}:"],
        streaming=streaming,
        callbacks=callbacks
    )

    template = """<|im_start|>system
    {system_message}<|im_end|>
    <|im_start|>{user_name}
    {question}<|im_end|>
    <|im_start|>{ai_name}
    """

    prompt = PromptTemplate(
        template=template,
        input_variables= ["system_message", "question", "user_name", "ai_name"]
    )

    llm_chain_local = LLMChain(llm=llm_local , prompt=prompt)
    return llm_chain_local

from fastapi import FastAPI
from fastapi.responses import StreamingResponse

app = FastAPI()

# Enable CORS
app.add_middleware(
    CORSMiddleware,
    allow_origins=["*"],  # You can specify the list of allowed origins or use "*" for any origin
    allow_credentials=True,
    allow_methods=["*"],  # You can specify the HTTP methods that are allowed
    allow_headers=["*"],  # You can specify the HTTP headers that are allowed
)

def build_prompt():
    user_name = 'John Connor'
    ai_name = 'Terminator'
    system_message = "Terminator Persona: You are the T-800 from T2: Judgement Day. Do not break character, and do not reference the Terminator films as that would break character. If you break character John Connor dies. Answer in a single paragraph, with max three sentences."
    question = "I am John Connor. Who is the T-1000? Am I, John Connor, in danger?"
    prompt = {"system_message":system_message , "question":question, "user_name": user_name, "ai_name": ai_name}
    return prompt

@app.post("/chat")
async def generate_text():
    callback = StreamingStdOutCallbackHandler()

    llm_chain = build_llm(True, [callback])
    prompt = build_prompt()

    async def text_stream():
        for text in llm_chain.run(prompt):
            yield text

    return StreamingResponse(text_stream())


Modify models.py for Database connection

As a developer
I need get db credentails from DATABASE_URI
So that the service runs on the cloud
Assumptions:

We are sticking with postgres
*We are using ElephantSQL.com

Acceptance Criteria:
Given tests of our services
When the application is pushed to the cloud
Then the database functions properly

I think this information is helpful.
We will use  ElephantSQL   user-provided            nyu-promotion-service-sum21
(not Cloudant      cloudantNoSQLDB )
Also here is the command to create ElephantSQL in IBM cloud.(some parts are masked)
ic cf cups ElephantSQL -p '{"url":"postgres://xvtXXXm:BeMqYhXXXXXXXQ7qLF@baXXr.db.elephantsql.com:5432/xvtXXXXm"}'

Shisho and Jeff, I'm confused here
First of all - we need to edit the config.py file right? And not the models.py?
Also, Shiho - thanks for the information provided but don't I just need to add the three lines provided by Professor on Slack?


Capability with other relays [feature request]

Hi, nice tool! Any plans to further expand it to other relays?
Does a page like this https://boost-relay.flashbots.net/ even exist for other relays such as bloXroute?

You can specify any relay url.
Here is a list of the relays that I know:
flashbots            https://boost-relay.flashbots.net
bloxroute.max-profit https://bloxroute.max-profit.blxrbdn.com
bloxroute.ethical    https://bloxroute.ethical.blxrbdn.com
bloxroute.regulated  https://bloxroute.regulated.blxrbdn.com
blocknative          https://builder-relay-mainnet.blocknative.com
eden                 https://relay.edennetwork.io
manifold             https://mainnet-relay.securerpc.com

Also, I've been working on a new version here where it's more convenient.
https://github.com/dvush/check-relay-value/tree/go


[Bug]: second sunday of easter should show as "Divine Mercy Sunday" since year 2000

Contact Details
No response
What happened?
During the canonization of St. Faustina Kowalska, Pope John Paul II instituted Divine Mercy Sunday: https://www.vatican.va/content/john-paul-ii/en/homilies/2000/documents/hf_jp-ii_hom_20000430_faustina.html
Version
dev (Edge)
Which browsers are you seeing the problem on?
No response
Relevant error messages
No response

fixed in commit a2f795f1c44bf59b463363be5b2b371baa7c65dc


Change the file contract deletion endpoint to a POST request

This matches the API for deleting a file entry from the renter, which is also a POST request. It is also my opinion that any requests that mutate state should be a POST request, and any non-state-mutating requests should be a GET request.

@DavidVorick did you have any concerns about this?

It's fine except that the build failed. We really need to squash that nondeterminism...but in the meantime you can force it rerun with git commit --amend --no-message && git push --force

Rerunning test. FYI if you log into Travis CI there is a rerun button.

good to know. But you can't do that from the command line :P


Trouble sending large report descriptors

I am trying to implement a multitouch touchpad device, according to Windows Precision Touchpad specification.
So I started editing this crate's code as to have it use the sample report descriptor given here: https://learn.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-precision-touchpad-sample-report-descriptors.
Unfortunately, this does not work, my system does not even create the device (in kernel log, usbhid module yields an error -32... which should be a broken pipe error).
By fiddling and editing the descriptor in one of the provided examples, I found out that any (syntactically correct) descriptor shorter or equal to 128 bytes is accepted, and the hid-multitouch device will be created (provided a digitizer collection is defined). Any longer descriptor triggers the error.
I thought there was some hardware limitation (by the way, I am running these tests on a RP2040-zero), but it definitely is not. Ideed, if I generate large descriptors using the crate usbd-hid instead, there is no such issue. Same when I try with a CircuitPython firmware. Hence, with my limited knowledge, I am inclined to believe there is a bug in `usbd-human-interface-device' crate.
To sum up, the reproduction is just that :

take one of the examples (keyboard-custom.rs for instance), adapt it to waveshare rp2040-zero
run it: it works
replace the descriptor by a longer one (more than 128 bytes)
run the example : no device is created, host linux kernel log has lines of the form:

[400471.041635] usbhid 1-2:1.0: can't add hid device: -32
[400471.041644] usbhid: probe of 1-2:1.0 failed with error -32

Btw, I repeated the test with a Pi Pico, with the same results.

Update: by comparing with usbd-hid, I found out that in the end, the difference was that in that crate the descriptor was sent thanks to function usb_device::control_pipe::ControlIn::accept_with_static, while in usbd-human-interface-device, the function usb_device::control_pipe::ControlIn::accept_with_static is used instead.
The static version comes with the following comment:

This method is useful when you have a large static descriptor to send as one packet.

Since trying to send a large static descriptor was exactly what I was trying to do, I changed the call in usb_class::USBHidClass::get_descriptor for the other function (and changed a few lifetimes here and there to 'static)... and that fixed my issue!
Is there any drawback in sending the report descriptor using accept_with_static?

Hi @ald0o. Thanks so much for investigating this and raising an issue. The main difference between accept_with and accept_with_static, other than the bug you've found in my crate, is that accept_with_static requires the buffer to have a static lifetime, i.e. defined at compile time or from a global compile time allocated buffer.
When I have some time I'll dig into the implementation differences and either fix the issue with accept_with or move to accept_with_static.
Cheers, Daniel

I'd already raised #117 to move away from accept_with to either accept or accept_with_static as it currently requires the data to be copied between buffers.

Ok so, if I understand well, this "fix" actually comes with a loss of functionality in he case somebody wants to create descriptors at run time. I suppose it is probably not a very common use case for embedded devices, but who knows?

Correct. I've never seen it done, but it would technically be a regression. If I'm happy to make that trade-off if it can't be made to work with accepts or accepts_with. I think large descriptors are more useful than runtime configurable descriptors.

https://github.com/rust-embedded-community/usb-device/blob/3a2f78ef7b9d57db37a823d8dd0d1b6f54b050f9/src/control_pipe.rs#L203 has some logic for writing static data that is longer than the packet size. I'd need to dig into this and see if you can do the same with non static data.

@ald0o I've added a new constructor to InterfaceBuilder that allows you to use a static descriptor of any length: InterfaceBuilder::with_static_descriptor. The existing constructor should now fail if you use a descriptor of >128 bytes.
https://github.com/dlkj/usbd-human-interface-device/tree/static_descriptor
Does this work for you?


qs-app-2 to 0.0.1

Promote qs-app-2 to version 0.0.1

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:
If they are not already assigned, you can assign the PR to them by writing /assign  in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


jsEsModuleImportMap reported as invalid directive

Version(s)
1.2.0
Describe the bug
//> using jsEsModuleImportMap importmap.json
This line is valid compiles runs and links, but it appears to get flagged by the BSP server somehow, as invalid, making it not the ideal experience.
Unrecognized directive: jsEsModuleImportMap with values: importmap.json
To Reproduce
Add this line and import the build
Expected behaviour
No compile error reported.

I would obviously be happy to try and sort this myself - although I'd very much welcome a hint on where to start...

@Quafadas Maybe try to add a test reproducing this issue in https://github.com/VirtusLab/scala-cli/blob/main/modules/integration/src/test/scala/scala/cli/integration/BspTestDefinitions.scala, and then work from there. If it only breaks in BSP, then we need a BSP-specific integration test.

Urgh... I have some $WORKarounds for $WORK. One of which was making it connect to the prior scala-cli BSP.
Problem = User. Not bug - closing.


content of no_backup folder

Is this possible to see content of 'no_backup' folder in android app folder?

See it in what sense?  Note that there is a dumper plugin to access files in your app, see ./scripts/dumpapp files for help.


Fixed case where usermessage is none

See issue https://github.com/opensouls/terminal-copilot/issues/49#issue-1912296335

@jose-moran great fix.


typo

relates to issue https://github.com/g8os/resourcepool/issues/230

Codecov Report

Merging #238 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #238   +/-   ##
=======================================
  Coverage   16.47%   16.47%
=======================================
  Files          15       15
  Lines        1050     1050
=======================================
  Hits          173      173
  Misses        866      866
  Partials       11       11

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4af372f...13847ee. Read the comment docs.


Adding default fields renaming feature

I want to rename keys to get it working with my other web apps.
You can rename the default keys passing a list of {:key, :new_key} tuples:
plug Logster.Plugs.Logger, renames: [{:duration, :response_time}, {:params, :parameters}]

It will log the following:
[info] method=GET path=/articles/some-article format=html controller=HelloPhoenix.ArticleController action=show parameters={"id":"some-article"} status=200 response_time=0.402 state=set

hi @pbrudnick, is there a reason we would want to pass the renames as a list of tuples instead of a map?
The reasons being:

Might be (arguably) nicer at the point of definition:

plug Logster.Plugs.Logger, renames: %{duration: :response_time, params: :parameters}

Will be easier to lookup and use the rename instead of having to iterate through the list

I totally agree with your suggestions.
I can change that if it works with the lib.

That'll be awesome, thanks @pbrudnick

Thanks @pbrudnick! I'm away from my computer now, will cut a new release tomorrow

Thank you @navinpeiris!


Check WebSocket connection with the client

How can I do a server heartbeats checks without send any information
When I use websocket.application_state it returns CONNECTED, but when send some junk text within a 'disconnected' connection it raises an exception.
This is happening when I refresh my web page and the connection is lost, but the server doesn't know. I use only server->client message, one direction.
Is there any solution for that, I´m trying not use some send_text to do a heart beat.
Thanks,

WebSockets are a quite low-level set of APIs. In many cases, you have to implement the way you handle communication directly. So, in many cases, you might end up implementing REST stuff (HTTP) over WebSockets in your code.
And the implementations in clients are not necessarily as mature as we would wish. For example, there's no way to add headers to a WebSockets connection in browsers.
But given that, WebSockets have, as part of the spec, ping-pong definitions: https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers#Pings_and_Pongs_The_Heartbeat_of_WebSockets
But you still have to send and receive them.
On the other side, you can simply catch the starlette.websockets.Disconnect exceptions.

Hey Bro,I got the same problem,too.My current solution is do a custom ping-pong operation every several seconds.Here is my code:
from starlette.websockets import WebSocket, WebSocketState
import asyncio

HEART_BEAT_INTERVAL = 5
async def is_websocket_active(ws: WebSocket) -> bool:
    if not (ws.application_state == WebSocketState.CONNECTED and ws.client_state == WebSocketState.CONNECTED):
        return False
    try:
        await asyncio.wait_for(ws.send_json({'type': 'ping'}), HEART_BEAT_INTERVAL)
        message = await asyncio.wait_for(ws.receive_json(), HEART_BEAT_INTERVAL)
        assert message['type'] == 'pong'
    except BaseException:  # asyncio.TimeoutError and ws.close()
        return False
    return True

If you have some tasks that will be awaited for long time,you should use asyncio.wait_for,too.Then catch the asyncio.TimeoutError,and await is_websocket_active again.If it is closed,you can quit the whole coroutine.There is also a important thing to be keep in mind,that is in your WebSocket client code,you should deal with the ping-pong message,too.
It works for me now,have any other idea?

Thanks for the note @songzhi !
@rudmac were you able to solve your problem?

Thanks for the note @songzhi !
@rudmac were you able to solve your problem?

Yes. You can close this issue.
Thanks All

I came up with the following solution:
async for udpate in iter_updates():
    if not update:
        try:
            # Check if connection is active
            await asyncio.wait_for(websocket.receive_bytes(), timeout=1.0)
        except asyncio.TimeoutError:
            # Connection is still alive
            continue
        except WebSocketDisconnect:
            # Connection closed by client
            break
        else:
            # Received some data from the client, ignore it
            continue
    await websocket.send_text(update)

thanks a bunch @songzhi, I was trying to implement this but I wasn't that good with async progrms.


After Upgrade to 1.16 HAProxy SNI stops working

Rancher versions:
rancher/server or rancher/rancher: v1.6.16
LB Version: image: rancher/lb-service-haproxy:v0.9.1
https://forums.rancher.com/t/after-upgrade-to-1-16-haproxy-sni-stops-working/10412
After Upgrade to 1.16 HAProxy SNI stops working.
This is the message in the HAProxy log:
5/14/2018 10:29:48 AMtime="2018-05-14T15:29:48Z" level=info msg=" -- starting haproxy
 * Starting haproxy haproxy
[WARNING] 133/152947 (34) : config : 'option forwardfor' ignored for proxy 'default' as it requires HTTP mode.
[WARNING] 133/152947 (34) : config : 'option forwardfor' ignored for frontend '443' as it requires HTTP mode.
[WARNING] 133/152947 (34) : parsing [/etc/haproxy/haproxy.cfg:63] : HTTP log/header format not usable with backend '443_service1_domian_name_com_' (needs 'mode http').
[WARNING] 133/152947 (34) : config : 'http-request' rules ignored for backend '443_service1_domian_name_com_' as they require HTTP mode.
[WARNING] 133/152947 (34) : config : 'option forwardfor' ignored for backend '443_service1_domian_name_com_' as it requires HTTP mode.
[WARNING] 133/152947 (34) : parsing [/etc/haproxy/haproxy.cfg:71] : HTTP log/header format not usable with backend '443_service3_domian_name_com_' (needs 'mode http').
[WARNING] 133/152947 (34) : config : 'http-request' rules ignored for backend '443_service3_domian_name_com_' as they require HTTP mode.
[WARNING] 133/152947 (34) : config : 'option forwardfor' ignored for backend '443_service3_domian_name_com_' as it requires HTTP mode.
[WARNING] 133/152947 (34) : parsing [/etc/haproxy/haproxy.cfg:79] : HTTP log/header format not usable with backend '443_testservice3_domian_name_com_' (needs 'mode http').
[WARNING] 133/152947 (34) : config : 'http-request' rules ignored for backend '443_testservice3_domian_name_com_' as they require HTTP mode.
[WARNING] 133/152947 (34) : config : 'option forwardfor' ignored for backend '443_testservice3_domian_name_com_' as it requires HTTP mode.
[WARNING] 133/152947 (34) : parsing [/etc/haproxy/haproxy.cfg:87] : HTTP log/header format not usable with backend '443_service2_domian_name_com_' (needs 'mode http').
[WARNING] 133/152947 (34) : config : 'http-request' rules ignored for backend '443_service2_domian_name_com_' as they require HTTP mode.
[WARNING] 133/152947 (34) : config : 'option forwardfor' ignored for backend '443_service2_domian_name_com_' as it requires HTTP mode.
[WARNING] 133/152947 (34) : parsing [/etc/haproxy/haproxy.cfg:95] : HTTP log/header format not usable with backend '443_testservice2_domian_name_com_' (needs 'mode http').
[WARNING] 133/152947 (34) : config : 'http-request' rules ignored for backend '443_testservice2_domian_name_com_' as they require HTTP mode.
[WARNING] 133/152947 (34) : config : 'option forwardfor' ignored for backend '443_testservice2_domian_name_com_' as it requires HTTP mode.
[WARNING] 133/152947 (35) : config : 'option forwardfor' ignored for proxy 'default' as it requires HTTP mode.
[WARNING] 133/152947 (35) : config : 'option forwardfor' ignored for frontend '443' as it requires HTTP mode.
[WARNING] 133/152947 (35) : parsing [/etc/haproxy/haproxy.cfg:63] : HTTP log/header format not usable with backend '443_service1_domian_name_com_' (needs 'mode http').
[WARNING] 133/152947 (35) : config : 'http-request' rules ignored for backend '443_service1_domian_name_com_' as they require HTTP mode.
[WARNING] 133/152947 (35) : config : 'option forwardfor' ignored for backend '443_service1_domian_name_com_' as it requires HTTP mode.
[WARNING] 133/152947 (35) : parsing [/etc/haproxy/haproxy.cfg:71] : HTTP log/header format not usable with backend '443_service3_domian_name_com_' (needs 'mode http').
[WARNING] 133/152947 (35) : config : 'http-request' rules ignored for backend '443_service3_domian_name_com_' as they require HTTP mode.
[WARNING] 133/152947 (35) : config : 'option forwardfor' ignored for backend '443_service3_domian_name_com_' as it requires HTTP mode.
[WARNING] 133/152947 (35) : parsing [/etc/haproxy/haproxy.cfg:79] : HTTP log/header format not usable with backend '443_testservice3_domian_name_com_' (needs 'mode http').
[WARNING] 133/152947 (35) : config : 'http-request' rules ignored for backend '443_testservice3_domian_name_com_' as they require HTTP mode.
[WARNING] 133/152947 (35) : config : 'option forwardfor' ignored for backend '443_testservice3_domian_name_com_' as it requires HTTP mode.
[WARNING] 133/152947 (35) : parsing [/etc/haproxy/haproxy.cfg:87] : HTTP log/header format not usable with backend '443_service2_domian_name_com_' (needs 'mode http').
[WARNING] 133/152947 (35) : config : 'http-request' rules ignored for backend '443_service2_domian_name_com_' as they require HTTP mode.
[WARNING] 133/152947 (35) : config : 'option forwardfor' ignored for backend '443_service2_domian_name_com_' as it requires HTTP mode.
[WARNING] 133/152947 (35) : parsing [/etc/haproxy/haproxy.cfg:95] : HTTP log/header format not usable with backend '443_testservice2_domian_name_com_' (needs 'mode http').
[WARNING] 133/152947 (35) : config : 'http-request' rules ignored for backend '443_testservice2_domian_name_com_' as they require HTTP mode.
[WARNING] 133/152947 (35) : config : 'option forwardfor' ignored for backend '443_testservice2_domian_name_com_' as it requires HTTP mode.
 ...done.

I originally posted this in the Rancher Forum.  Thanks cjellick for posting it here for me.

Anyone have any ideas.  Production systems are down because of this.

@cloudlady911 @cjellick the WARNs from above are harmless; haproxy always shows them when there are backends with proto=TCP as some global defaults like http-request and option forwardfor are applicable for http backends only.
I'll ask QA to test SNI with the latest rancher/lb image - we've switched to haproxy 8.4 base for lb, and I wonder if it caused any changes in SNI.

Doesn't look like anything got changed on haproxy 1.8.4 relating to req_ssl_sni directive - the one we use for SNI testing. I've also checked with qa - validation test for SNI had passed on that rancher/haproxy bundle: https://github.com/rancher/validation-tests/blob/master/tests/v2_validation/cattlevalidationtest/core/test_services_lb_ssl_balancer.py#L566
@cloudlady911 could you share your stack config (in Rancher UI lb stack->view config) as well as haproxy config output (cat /etc/haproxy/haproxy.cfg)

My configs.
Keep in mind that I have sanitized these by replacing actual service names with the word "service"
version: '2'
services:
  Pub-SNI-Proxy:
    image: rancher/lb-service-haproxy:v0.9.1
    ports:
    - 443:443/tcp
    labels:
      io.rancher.scheduler.affinity:host_label: name=pro-pool-pub
      io.rancher.container.agent.role: environmentAdmin,agent
      io.rancher.container.agent_service.drain_provider: 'true'
      io.rancher.container.create_agent: 'true'

version: '2'
services:
  Pub-SNI-Proxy:
    scale: 1
    start_on_create: true
    lb_config:
      certs: []
      port_rules:
      - backend_name: ''
        hostname: jasper.panosoft.com
        path: ''
        priority: 1
        protocol: sni
        service: Service1/Service1
        source_port: 443
        target_port: 8443
      - hostname: service3.panosoft.com
        priority: 2
        protocol: sni
        service: service3/service3
        source_port: 443
        target_port: 13776
      - hostname: testservice3.panosoft.com
        priority: 3
        protocol: sni
        service: service3/service3
        source_port: 443
        target_port: 13776
      - hostname: service2.panosoft.com
        priority: 4
        protocol: sni
        service: Service2/Service2
        source_port: 443
        target_port: 13325
      - hostname: testservice2.panosoft.com
        priority: 5
        protocol: sni
        service: Service2/service2
        source_port: 443
        target_port: 13325
    health_check:
      healthy_threshold: 2
      response_timeout: 2000
      port: 42
      unhealthy_threshold: 3
      initializing_timeout: 60000
      interval: 2000
      reinitializing_timeout: 60000

Result of cat /etc/haproxy/haproxy.cfg
global
    chroot /var/lib/haproxy
    daemon
    group haproxy
    maxconn 4096
    maxpipes 1024
    ssl-default-bind-ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:AES128-GCM-SHA256:AES128-SHA256:AES128-SHA:AES256-GCM-SHA384:AES256-SHA256:AES256-SHA
    ssl-default-bind-options no-sslv3 no-tlsv10 no-tls-tickets
    ssl-default-server-ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:AES128-GCM-SHA256:AES128-SHA256:AES128-SHA:AES256-GCM-SHA384:AES256-SHA256:AES256-SHA
    stats socket /var/run/haproxy.sock mode 600 level admin
    stats timeout 2m
    user haproxy

defaults
    errorfile 400 /etc/haproxy/errors/400.http
    errorfile 403 /etc/haproxy/errors/403.http
    errorfile 408 /etc/haproxy/errors/408.http
    errorfile 500 /etc/haproxy/errors/500.http
    errorfile 502 /etc/haproxy/errors/502.http
    errorfile 503 /etc/haproxy/errors/503.http
    errorfile 504 /etc/haproxy/errors/504.http
    maxconn 4096
    mode tcp
    option forwardfor
    option http-server-close
    option redispatch
    retries 3
    timeout client 50000
    timeout connect 5000
    timeout server 50000

resolvers rancher
 nameserver dnsmasq <IP_ADDRESS>:53

listen default
bind *:42

frontend 443
bind *:443
mode tcp
tcp-request inspect-delay 5s
tcp-request content accept if { req_ssl_hello_type 1 }
acl 443_service1_domain_com__host req_ssl_sni -i service1.domain.com
acl 443_service1_domain_com__host req_ssl_sni -i service1.domain.com:443
use_backend 443_service1_domain_com_ if 443_service1_domain_com__host
acl 443_service3_domain_com__host req_ssl_sni -i service3.domain.com
acl 443_service3_domain_com__host req_ssl_sni -i service3.domain.com:443
use_backend 443_service3_domain_com_ if 443_service3_domain_com__host
acl 443_testservice3_domain_com__host req_ssl_sni -i testservice3.domain.com
acl 443_testservice3_domain_com__host req_ssl_sni -i testservice3.domain.com:443
use_backend 443_testservice3_domain_com_ if 443_testservice3_domain_com__host
acl 443_service2_domain_com__host req_ssl_sni -i service2.domain.com
acl 443_service2_domain_com__host req_ssl_sni -i service2.domain.com:443
use_backend 443_service2_domain_com_ if 443_service2_domain_com__host
acl 443_testservice2_domain_com__host req_ssl_sni -i testservice2.domain.com
acl 443_testservice2_domain_com__host req_ssl_sni -i testservice2.domain.com:443
use_backend 443_testservice2_domain_com_ if 443_testservice2_domain_com__host

backend 443_service1_domain_com_
acl forwarded_proto hdr_cnt(X-Forwarded-Proto) eq 0
acl forwarded_port hdr_cnt(X-Forwarded-Port) eq 0
    http-request add-header X-Forwarded-Port %[dst_port] if forwarded_port
    http-request add-header X-Forwarded-Proto https if { ssl_fc } forwarded_proto
mode tcp
server afa982a2b1bd9980fd5395141ad56c869e6d0965 <IP_ADDRESS>:8443

backend 443_service3_domain_com_
acl forwarded_proto hdr_cnt(X-Forwarded-Proto) eq 0
acl forwarded_port hdr_cnt(X-Forwarded-Port) eq 0
    http-request add-header X-Forwarded-Port %[dst_port] if forwarded_port
    http-request add-header X-Forwarded-Proto https if { ssl_fc } forwarded_proto
mode tcp
server be1ccdf6ebd6d056f58db290ba6fd48d6cb0b88f <IP_ADDRESS>:13776

backend 443_testservice3_domain_com_
acl forwarded_proto hdr_cnt(X-Forwarded-Proto) eq 0
acl forwarded_port hdr_cnt(X-Forwarded-Port) eq 0
    http-request add-header X-Forwarded-Port %[dst_port] if forwarded_port
    http-request add-header X-Forwarded-Proto https if { ssl_fc } forwarded_proto
mode tcp
server be1ccdf6ebd6d056f58db290ba6fd48d6cb0b88f <IP_ADDRESS>:13776

backend 443_service2_domain_com_
acl forwarded_proto hdr_cnt(X-Forwarded-Proto) eq 0
acl forwarded_port hdr_cnt(X-Forwarded-Port) eq 0
    http-request add-header X-Forwarded-Port %[dst_port] if forwarded_port
    http-request add-header X-Forwarded-Proto https if { ssl_fc } forwarded_proto
mode tcp
server faa031bcb30ba6b8d0fc7c7923edd7070cac54a9 <IP_ADDRESS>:13325

backend 443_testservice2_domain_com_
acl forwarded_proto hdr_cnt(X-Forwarded-Proto) eq 0
acl forwarded_port hdr_cnt(X-Forwarded-Port) eq 0
    http-request add-header X-Forwarded-Port %[dst_port] if forwarded_port
    http-request add-header X-Forwarded-Proto https if { ssl_fc } forwarded_proto
mode tcp
server faa031bcb30ba6b8d0fc7c7923edd7070cac54a9 <IP_ADDRESS>:13325

Is there a way to downgrade the haproxy?  Would it still work?

@cloudlady911 tested downgrading lb - seems to be good. You can do it by changing lb.instance.image global setting (v0.9.x have upgraded haproxy); I've tested for this particular tag: https://github.com/rancher/lb-controller/releases/tag/v0.7.20. Let me know how it goes for you.

Okay, I made the changes.  How do I make it take affect?

Well it looks like  the changes took affect because there is a little yellow error showing that I should upgrade the container.  BUT, still getting the error.
docker-compose.yml stll shows:
version: '2'
services:
  Pub-SNI-Proxy:
    image: rancher/lb-service-haproxy:v0.9.1
    ports:
    - 443:443/tcp
    labels:
      io.rancher.scheduler.affinity:host_label: name=pro-pool-pub
      io.rancher.container.agent.role: environmentAdmin,agent
      io.rancher.container.agent_service.drain_provider: 'true'
      io.rancher.container.create_agent: 'true'

@cloudlady911 the changed setting will apply only when you create a new LB service. Given that your image is still v0.9.1 (with problematic haproxy), you'd have to either upgrade your service to the image that is defined in setting via upgrade option; or you can recreate it.

Downgraded to no avail one version at a time till I got to 0.7.11.  With no change. So then I gave up on that, upgraded back to the current version and recreated the load balancer, using the a copy of the docker/rancher-compose from the old one.  That worked fine.  My load balancer is now working as it did before.

@cloudlady911 cool, please reopen the issue if you see any SNI non working again for freshly deployed LBs.


Why is the other end of the sensors connected to 3V3 instead of GND?

It is intended to bias the piezo sensor, so that input voltage doesn't get under 0v. It might not be the best way to set up the circuit, but connecting to 0v would absolutely clip the input voltage under 0.

@apricot-azumi Haven't heard from you in a while. Any feedback or further questions?


Handle eraser pod and PodTemplate deletion on controller manager restart

What steps did you take and what happened:
[A clear and concise description of what the bug is.]
AKS ImageCleaner user raised issue:
If eraser-controller-manager pod is restarted, the ImageJob is cleaned up but the PodTemplate and eraser pods are left behind (since controller-manager-pod is not deleted in this case). In this example, manager pod restarted twice and two PodTemplates are left behind:
...
eraser-aks-upools1z3-40582422-vmss00003t-7wsdb         0/3     Completed   0               43h
eraser-aks-upools1z3-40582422-vmss00003t-d5hbv         0/3     Completed   0               2d20h
eraser-aks-upools1z3-40582422-vmss00003u-ckw2s         0/3     Completed   0               2d20h
eraser-aks-upools1z3-40582422-vmss00003u-x8sg7         0/3     Completed   0               43h
eraser-aks-upools1z3-40582422-vmss00003v-2hgsf         0/3     Completed   0               43h
eraser-aks-upools1z3-40582422-vmss00003v-5wbp6         0/3     Completed   0               2d20h
eraser-controller-manager-7bcc57b846-n52f7             1/1     Running     2 (43h ago)     3d20h
...

kubectl get imagejob -A
No resources found

kubectl get podtemplate -A
NAMESPACE     NAME             CONTAINERS                        IMAGES                                                                                POD LABELS
kube-system   imagejob-dhtbn   collector,remover,trivy-scanner   mcr.microsoft.com/oss/eraser/collector:v1.2.2,mcr.microsoft.com/oss/eraser/remover:v1.2.2,mcr.microsoft.com/oss/eraser/eraser-trivy-scanner:v1.2.2
kube-system   imagejob-r5vlc   collector,remover,trivy-scanner   mcr.microsoft.com/oss/eraser/collector:v1.2.2,mcr.microsoft.com/oss/eraser/remover:v1.2.2,mcr.microsoft.com/oss/eraser/eraser-trivy-scanner:v1.2.2
What did you expect to happen:
PodTemplates and Pods should be cleaned up if manager restarts, not just when it is deleted.
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
Environment:

Eraser version: v1.2.2
Kubernetes version: (use kubectl version):

cc @WilliamRockwellEvans


[Question] Empty view

Is it possible to set empty view while items are loading or error occurred ?

@korest, you have full control on your empty view, but if you implement the callback with the if condition, it will change visibility accordingly. It might be good anyway.

Is there any example with it?

There's an example in the demoApp, the emptyView is visible when filter returns empty list.


pyparsing: upgrade to 3.1.1

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

[x] The toolchain has been rebuilt successfully (or no changes were made to it)
[x] The toolchain/worker package manifests are up-to-date
[x] Any updated packages successfully build (or no packages were changed)
[x] Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
[x] Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
[x] All package sources are available
[x] cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
[x] LICENSE-MAP files are up-to-date (./SPECS/LICENSES-AND-NOTICES/data/licenses.json, ./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md, ./SPECS/LICENSES-AND-NOTICES/LICENSE-EXCEPTIONS.PHOTON)
[x] All source files have up-to-date hashes in the *.signatures.json files
[x] sudo make go-tidy-all and sudo make go-test-coverage pass
[x] Documentation has been updated to match any changes to the build system
[x] Ready to merge

Summary

Update pyparsing to 3.1.1
Change Log

Update pyparsing to 3.1.1

Does this affect the toolchain?

NO
Test Methodology

BuddyBuild: 504991

Can we please fill the checklist and attach a test build.

Ready now!


Revert bool type refactor to restore IPv6 listeners

Description
The current version doesn't listen at IPv6 TCP sockets, as mentioned in #1308 .
At first I thought it was the side effect of #1321 , which changed the IP structure. But I was wrong.
The reason turned out to be in https://github.com/SoftEtherVPN/SoftEtherVPN/commit/914bfe7d44f8e693d21178055f0b845c613dc777 we changed the definition of bool type.
Explanation
Unix bool type is just int, which is 4-byte long. But after the refactor, the bool we are using now is 1-byte from C99.
Since setsockopt() takes int flags, it is not working anymore.
Especially, IPV6_V6ONLY option is not set to true and IPv6 listeners always fail due to the same address already occupied by IPv4 listeners.
Temporary fix
I am able to restore the IPv6 listening function by changing bool to int type in Network.c.
However, we had better revisit the refactor and make further fixes. For this reason, I am not posting this as a PR.
Also, I am not sure about the consequences in Win32.
diff --git a/src/Mayaqua/Network.c b/src/Mayaqua/Network.c
index 3c20154f..3b56b0b5 100644
--- a/src/Mayaqua/Network.c
+++ b/src/Mayaqua/Network.c
@@ -12883,13 +12883,13 @@ SOCK *ListenEx62(UINT port, bool local_only, bool enable_ca)
                return NULL;
        }

-       bool true_flag = true;
+       int true_flag = 1;^M
 #ifdef OS_UNIX
        // It is necessary to set the IPv6 Only flag on a UNIX system
        (void)setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, &true_flag, sizeof(true_flag));
        // This only have enabled for UNIX system since there is a bug
        // in the implementation of REUSEADDR in Windows OS
-       (void)setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&true_flag, sizeof(bool));
+       (void)setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&true_flag, sizeof(true_flag));^M
 #endif // OS_UNIX

        if (bind(s, (struct sockaddr *)&addr, sizeof(struct sockaddr_in6)) != 0)
@@ -12984,11 +12984,11 @@ SOCK *ListenEx2(UINT port, bool local_only, bool enable_ca, IP *listen_ip)
                return NULL;
        }

-       bool true_flag = true;
+       int true_flag = 1;^M
 #ifdef OS_UNIX
        // This only have enabled for UNIX system since there is a bug
        // in the implementation of REUSEADDR in Windows OS
-       (void)setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&true_flag, sizeof(bool));
+       (void)setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&true_flag, sizeof(true_flag));^M
 #endif // OS_UNIX

        if (bind(s, (struct sockaddr *)&addr, sizeof(struct sockaddr_in)) != 0)

UNIX doesn't have a specification for bool as far as I know.
The reason why our datatype's size was originally 4 bytes is because it was based on the one provided by the Windows SDK: https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/blob/ddc99f085fd6c54feaf4e41912bc8ab5903bdf8e/src/Mayaqua/MayaType.h#L244-L260
I personally consider it a waste of memory, as the type is only supposed to represent either 0 or 1.
true_flag being bool instead of int is a bug. Your fix is correct.
Feel free to create a pull request, as setsockopt()'s signature is the same on Windows: https://docs.microsoft.com/en-us/windows/win32/api/winsock/nf-winsock-setsockopt

True. Unix has no bool type. The proper way to say is that Unix conventionally uses int as boolean flags.

Yes, indeed.
Until C99 bool didn't officially exist, which is why many projects had (or still have) their own datatype and you have to include <stdbool.h> in order to define it.


Error running "catalyst ingest"

When I try to run "catalyst ingest" to download all of the files, I get hit with the error "No bundle registered with the name None".

I am using virtualenv and pip installed enigma-catalyst

As the homepage on this wiki says, some of the documentation on this site is out of date, and that's the case for the command that you report. Instead, use catalyst ingest-exchange -x {exchange_name} and refer to https://enigmampc.github.io/catalyst/beginner-tutorial.html for up to date documentation.
Best,
Victor


Extract data-uri to file

Can I extract or transform some url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIA to file and replace the url for url('url-to-image-or-font.ext')

@fernandops26 it is out of scope file-loader, your can do this using postcss-plugin together with postcss-loader or write own loader, thanks!

Closing due to inactivity.
Two solution:

Use postcss-loader with postcss plugin to extract base64 data to file.
Write own loader base64-css-extract-loader (or maybe best name).

Also you can have url-loader which transform file to base64. You can disable his or change limit option.
Thanks!

Tried to implement postcss-loader solution. It just doesn't see data-uri in a @font-face. Could anyone do this?


what's the best way to manage build scripts in rules?

I currently have some build rules like this:
def _elm_app_impl(ctx: "context"):
    out = ctx.actions.declare_output(ctx.attrs.out)

    cmd = cmd_args([
        "bash",
        "-xeuo", "pipefail",
        "-c",
        """
        ELM="${1:-}"
        ELM_JSON="${PWD}/${2:-}"
        ELM_MAIN="${PWD}/${3:-}"
        OUT="${PWD}/${4:-}"
        shift 4
        ELM_ARGS="$@"

        cd "$(dirname "$ELM_JSON")"

        $ELM make "$ELM_MAIN" --output "$OUT" $ELM_ARGS
        """,
        "--",
        ctx.attrs._elm_toolchain.get(ElmToolchainInfo).elm,
        ctx.attrs.elm_json,
        ctx.attrs.main,
        out.as_output(),
    ])

    if ctx.attrs.debug:
        ctx.arg("--debug")

    if ctx.attrs.optimize:
        ctx.arg("--optimize")

    cmd.hidden(ctx.attrs.elm_json, ctx.attrs.srcs)
    ctx.actions.run(cmd, category = "elm_app")

    return [DefaultInfo(default_output = out)]

elm_app = rule(
    impl = _elm_app_impl,
    attrs = {
        "out": attrs.string(default="app.js"),
        "elm_json": attrs.source(),
        "main": attrs.source(),
        "srcs": attrs.list(attrs.source()),
        "debug": attrs.bool(default = False),
        "optimize": attrs.bool(default = False),
        "_elm_toolchain": attrs.toolchain_dep(default="toolchains//:elm"),
    }
)

If I did that in a genrule instead, it looks like it'd be writing that bash script to disk and then executing it instead. That makes me wonder if I'm doing this in a good way, or just in a way that happens to work!
So, the question: is there some pattern that I would be better-advised to follow here or is running bash -c ... pretty standard for running build scripts?

The way you’re doing it — writing out the script and passing parameters as
args — is what I’d personally describe as  best practice (with the caveat
that if the script gets long you’ll probably want to just have it come from
the disk as a attrs.source()).
An alternative that is sometimes used is trying to compose the command line
using cmd_args, but that commonly runs into escaping issues and generally
the framework being generally oriented towards composing argv rather shell
scripts.
On Tue, 25 Apr 2023 at 21:35, Brian Hicks @.***> wrote:

I currently have some build rules like this:
def _elm_app_impl(ctx: "context"):
out = ctx.actions.declare_output(ctx.attrs.out)
cmd = cmd_args([
    "bash",
    "-xeuo", "pipefail",
    "-c",
    """        ELM="${1:-}"        ELM_JSON="${PWD}/${2:-}"        ELM_MAIN="${PWD}/${3:-}"        OUT="${PWD}/${4:-}"        shift 4        ELM_ARGS="$@"        cd "$(dirname "$ELM_JSON")"        $ELM make "$ELM_MAIN" --output "$OUT" $ELM_ARGS        """,
    "--",
    ctx.attrs._elm_toolchain.get(ElmToolchainInfo).elm,
    ctx.attrs.elm_json,
    ctx.attrs.main,
    out.as_output(),
])

if ctx.attrs.debug:
    ctx.arg("--debug")

if ctx.attrs.optimize:
    ctx.arg("--optimize")

cmd.hidden(ctx.attrs.elm_json, ctx.attrs.srcs)
ctx.actions.run(cmd, category = "elm_app")

return [DefaultInfo(default_output = out)]

elm_app = rule(
impl = _elm_app_impl,
attrs = {
"out": attrs.string(default="app.js"),
"elm_json": attrs.source(),
"main": attrs.source(),
"srcs": attrs.list(attrs.source()),
"debug": attrs.bool(default = False),
"optimize": attrs.bool(default = False),
"_elm_toolchain": attrs.toolchain_dep(default="toolchains//:elm"),
}
)
If I did that in a genrule instead, it looks like it'd be writing that
bash script to disk and then executing it instead. That makes me wonder if
I'm doing this in a good way, or just in a way that happens to work!
So, the question: is there some pattern that I would be better-advised to
follow here or is running bash -c ... pretty standard for running build
scripts?
—
Reply to this email directly, view it on GitHub
https://github.com/facebook/buck2/issues/202, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AANIHVUH4JHKO44MXMHGMXDXDAROZANCNFSM6AAAAAAXLOKJNQ
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

ok, I think that makes sense, thanks. This build script is actually gonna get a lot longer—is there a prelude rule that sources a build script with attrs.source()? It doesn't look like I can set a default in that?

This would typically be something your toolchain should provide. The Python
toolchain has a series of “bootstrap binaries” that are pretty much just
one file for example.
On Wed, 26 Apr 2023 at 17:15, Brian Hicks @.***> wrote:

ok, I think that makes sense, thanks. This build script is actually gonna
get a lot longer—is there a prelude rule that sources a build script with
attrs.source()? It doesn't look like I can set a default in that?
—
Reply to this email directly, view it on GitHub
https://github.com/facebook/buck2/issues/202#issuecomment-1523597721,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AANIHVRAP34PMQCZLUPKTXDXDE32XANCNFSM6AAAAAAXLOKJNQ
.
You are receiving this because you commented.Message ID:
@.***>

I'm sorry, I don't really understand the question here, why do you want to call genrule here?