Event Hubs Client Library for .NET - February Milestone

For general summary and goals, please see: Release Event Hubs Track 2 Library (#442).  The work items linked to this issue herein represent the tasks needed to produce the .NET Event Hubs client library for the current milestone.
Design, Review, and Planning

[x] Design Proposal for a Generic Event Processor Base (#9064)
[x] Design Proposal for the Partition Receiver Client (#9045)
[x] Create issues and perform resource planning for the next milestone

Implementation
Stress and Stability

[ ] 🏃 Make Event Processor Client Tests more deterministic (#7458)
[ ] Address gaps in Event Processor test coverage (#9227)
[ ] Event Processor Client should surface exceptions thrown by the Process Event handler (#9228)
[x] Collaborate with the Event Hubs service team on their stress client, incorporating the track two client into runs.
[x] Create an informal client for sustained runs to test the different core scenarios for the track two library in advance of GA.

@jsquire Please move the pending items to the next milestone or backlog and close this issue now that the Feb milestone is over

Already in process; waiting on status for the items still open pending discussion with those working on them.

The final story on this milestone was a lot of unplanned work around stress test platforms, test results, production readiness, and release activities.


[3.0] Blaze AI is broken

Quoting Battosay: "blaze AI seems busted, they don't come after you when aggroed, they just hover in one place ?"

Apparently entities that have isAIEnabled false get their base speed set to 0.1F in EntityLivingBase.applyEntityAttributes.
have to override that. I'll check the other entities as well

Seems weird. Would probably need a check against vanilla 1.6 source on both ends

so uhh. i just launched a vanilla 1.6.4 and seems blazes are actually just bugged there. i think my fix is the actual fix


Optimize native contacts

Description
Adding a function for optimizing the native contact cutoff (distance cutoff for native structure to determine what the native contact pairs are) and cutoff ratio (distance cutoff for trajectory scan) to minimize the sigmoid width parameter. This seems to work for a few example foldamer systems so far.
Example 1: helix foldamer with sigma=2.25A, bond_eq=2A, k_bond=1000 kJ/mol, theta=140, alpha=-40:

Optimal native contact cutoff: 3.1091 A
Optimal native contact cutoff ratio: 1.8295
Example 2: double helix foldamer with sigma=2.25A, bond_eq=2A, k_bond=1000 kJ/mol, theta=170, alpha=-80:

Optimal native contact cutoff: 1.5820 A
Optimal native contact cutoff ratio: 2.6344
The high native contact cutoff ratios here make sense since the bonds are shrinking from roughly 2A to 1A during the transition. The native contact distances for the native structure will be much smaller than what the high temperature system can reach.
The optimization with scipy minimize using 'Nelder-mead' algorithm takes about 60 function evaluations - not great for speed but still only takes a few minutes.

Some more updates to native contact optimization are going into the trajectory revamp PR #100 , merging this one.


Cannot Recreate Dataset After Hard Delete

Hi all,
during development I tried to delete and recreate a dataset. But when executing the code below again after the delete I cannot find the dataset in the UI.
I would expect DataHub to recreate the dataset or at least give some sort of feedback.
However in the database the entry remains {"removed":true} as you can see at the bottom.
import datahub.emitter.mce_builder as builder
from datahub.emitter.rest_emitter import DatahubRestEmitter

def datasetUrn(tbl):
    return builder.make_dataset_urn("bigquery", tbl, "DEV")

# Construct a lineage object.
lineage_mce = builder.make_lineage_mce(
    [
        datasetUrn("bar2"),
        datasetUrn("bar4")
    ],
    datasetUrn("bar"),
)

# Create an emitter to the GMS REST API.
emitter = DatahubRestEmitter("http://localhost:8080")

# Emit metadata!
emitter.emit_mce(lineage_mce)

datahub delete --env DEV --entity_type dataset --platform bigquery -f
-> Execute Python code again.
MySQL [datahub]> select * from metadata_aspect_v2 where urn = "urn:li:dataset:(urn:li:dataPlatform:bigquery,bar,DEV)" and metadata = "{\"removed\":true}";
+-------------------------------------------------------+--------+---------+------------------+-------------------------------------------------------------------------------------------------------------------------+----------------------------+-------------------------+------------+
| urn                                                   | aspect | version | metadata         | systemmetadata                                                                                | createdon                  | createdby               | createdfor |
+-------------------------------------------------------+--------+---------+------------------+-------------------------------------------------------------------------------------------------------------------------+----------------------------+-------------------------+------------+
| urn:li:dataset:(urn:li:dataPlatform:bigquery,bar,DEV) | status |       0 | {"removed":true} | {"registryVersion":"<IP_ADDRESS>-dev","runId":"delete-run-id","registryName":"unknownRegistry","lastObserved":1647336916742} | 2022-03-15 09:35:17.403000 | urn:li:corpuser:UNKNOWN | NULL       |
+-------------------------------------------------------+--------+---------+------------------+-------------------------------------------------------------------------------------------------------------------------+----------------------------+-------------------------+------------+

DataHub Frontend v0.8.28
DataHub CLI v. 0.8.29
MySQL v 5.7.37

Also when trying in ingest to a different environment (e.g. TST) I run into the error Caused by: java.net.URISyntaxException: Invalid URN Parameter: 'No enum constant com.linkedin.common.FabricType.TST: urn:li:dataset:(urn:li:dataPlatform:bigquery,bar,TST).
Is there documented which environments are accepted? (I would find it more user centric to be able to choose this freely)

Hello @eeepmb!
Thank you submitting this issue!
First of all, this looks like a bug. Did you run this code on a clean deployment?
Second...
The reason why your ingested dataset is not appearing in the UI is because of the {"removed":true}.
This is called a soft-deleted entity which you can learn more about in our docs on deleting metadata.
What you are seeing in MySQL is all aspects for urn "urn:li:dataset:(urn:li:dataPlatform:bigquery,bar,DEV)" that have the removed:true. Only the Status aspect has that property. It is a special aspect in DataHub to mark entities (i.e: Dataset, Dashboard, User, DataJob, etc...) that have been deleted.
Looking at your code I would suggest using MCPs (MetadataChangeProposal) and not MCEs (MetadataChangeEvent) as the latter is deprecated as of v0.8.7. See this doc on MCEs & MAEs vs MCP & MCLs.
About the supported environments, they are defined in the FabricType.pdl file so you can see there which ones are available. About defining your own environments, I suggest you take a look at how to extend the metadata model in particular step 3.

Hi @pedro93,
thanks for the feedback and background info.
We ran this code on a clean deployment in the first place but now we have a few of those entries in the DB..
I must admit that I fogot to do a hard delete in this example but we experienced this behaviour with hard deletes too:
$ datahub delete --env DEV --entity_type dataset --platform bigquery -f --hard

...

MySQL [datahub]> select * from metadata_aspect_v2 where urn = "urn:li:dataset:(urn:li:dataPlatform:bigquery,bar,DEV)" and metadata = "{\"removed\":true}";
+-------------------------------------------------------+--------+---------+------------------+-------------------------------------------------------------------------------------------------------------------------+----------------------------+-------------------------+------------+
| urn                                                   | aspect | version | metadata         | systemmetadata                                                                                | createdon                  | createdby               | createdfor |
+-------------------------------------------------------+--------+---------+------------------+-------------------------------------------------------------------------------------------------------------------------+----------------------------+-------------------------+------------+
| urn:li:dataset:(urn:li:dataPlatform:bigquery,bar,DEV) | status |       0 | {"removed":true} | {"registryVersion":"<IP_ADDRESS>-dev","runId":"delete-run-id","registryName":"unknownRegistry","lastObserved":1647336916742} | 2022-03-15 09:35:17.403000 | urn:li:corpuser:UNKNOWN | NULL       |
+-------------------------------------------------------+--------+---------+------------------+-------------------------------------------------------------------------------------------------------------------------+----------------------------+-------------------------+------------+
1 row in set (0.00 sec)

For this example I grabbed lineage_emitter_rest.py from the samples with slight changes. You might mentioned it is depreciated or update the code accordingly.
Looking forward to hear from you about your findings.

Hey @eeepmb
I've run your code locally on the master branch (commit id: ad039aab6) and I was not able to reproduce your error.
This may be a bug that has since been fixed. We are looking to do a release today or tomorrow so could you wait for that?
These are the steps I took to reproduce your issue:
1.) Run python script that ingests a dataset with lineage info.
2.) Go to DataHub UI and validate that dataset is present.
3.) Dry-run soft delete of dataset to see what would be deleted: datahub delete --env DEV --entity_type dataset --platform bigquery --dry-run => Got correct info, would delete urn:li:dataset:(urn:li:dataPlatform:bigquery,bar,DEV).
4.) Using ElasticVue chrome plugin, investigate elastic search index of datasets to confirm dataset is there. It should be since we use Elasticsearch as ou searching index, if it's not there we would not be able to search for it in the UI.
5.) Perform a hard delete of the dataset:  datahub delete --env DEV --entity_type dataset --platform bigquery --hard
6.) Check Elasticsearch, dataset is no longer in dataset index.
7.) Re-run script to ingest dataset.
8.) Check Elastic, dataset is present.
9.) Soft delete the dataset: datahub delete --env DEV --entity_type dataset --platform bigquery --soft
10.) Check Elastic, dataset is present with a new field (removed: true) which marks the entity as soft deleted and so unsearchable in the UI.
11.) Re-run script to ingest dataset.
12.) Check Elastic, dataset is present without removed property. Document is now searchable in the UI, as expected.
About the code samples you mentioned, they are indeed outdated.
I've opened a ticket internally to update them, a GitHub issue will follow soon. In the meantime I suggest you look at https://datahubproject.io/docs/metadata-ingestion/as-a-library/ for inspiration.
Thanks!

Hi @pedro93,
I migrated our cluster to v.0.8.31 and everything is working as expect now.
However removing leftovers from before in the DB and Elasticsearch wasn't possible by using the DataHub CLI.
So for now I deleted the entries in the DB manually.
Can you guide me to delete left references in Elasticsearch? I want to avoid redeploying everything.
I'll close the issue afterwards.
Thanks in advance.

Hello @eeepmb
What do you mean by?
However removing leftovers from before in the DB and Elasticsearch wasn't possible by using the DataHub CLI
If you manually deleted the entity from the DB you know need to delete it in elasticsearch.
We have 1 index in elastic per entity, so if you ingested a dataset that you want to delete, then delete the corresponding record in the dataset_index.
If you can access the elasticsearch cluster from your machine, I would suggest using something like: https://chrome.google.com/webstore/detail/elasticvue/hkedbapjpblbodpgbajblpnlpenaebaa to interact with elastic and see exactly what you are deleting.

Hi @pedro93,
after hard deleting other datasets with DataHub CLI I still found those entries from above in our DB since from DataHub POV these datasets did not exist anymore.
So I deleted those entries in the DB and was hoping that Elasticsearch would update data accordingly. But I still find references in the DataHub UI.
However it seems to be quicker for me to set up a fresh deployment than getting into Elasticsearch for now.
Closing this for now. Thanks for the help!
PS: I noticed that after [hard] deleting datasets you still find references in the UI (e.g. under recently viewed). Would be great if those references will be removed too as a feature soon.

after hard deleting other datasets with DataHub CLI I still found those entries from above in our DB since from DataHub POV these datasets did not exist anymore.
Was this delete done after upgrading both the cli & datahub server deployment using the --hard parameter in the delete command? That is unexpected.
So I deleted those entries in the DB and was hoping that Elasticsearch would update data accordingly. But I still find references in the DataHub UI.
Unfortunately if you delete manually in the DB, there is no reconciliation logic in datahub to delete stuff in elastic. Even if we did have that logic, what database should be considered the ground truth? The relational DB or Elastic? Each serve different purposes so it would be non-trivial to re-create one against the other.

@pedro93
1.) yes, both CLI & DataHub containers were updated. I tried deleting the entries by the commands below. But the entries remaind.
datahub delete --env dev --entity_type dataset --hard -f
datahub delete --platform bigquery --hard -f
datahub delete --entity_type dataset --hard -f

2.) I must admit that I had a misunderstanding here then. I supposed the relational DB to be the ground truth and Elastic being used to do additional tasks with the data in the DB. But I agree your argument.


Why unneeded data packaged within chart? Works as designed?

I am not sure, if this is working as designed. I thought, once all data has been rendered by helm / helm3, that only that rendered data is then packaged and installed within k8s.
But what we found out is that everything (that it not excluded via .helmignore) within the chart directory and also everything that has been passed via --set or --set-file or --set-string is also - in the end - stored and packaged within the final chart (even if this information is not needed anymore, after the data has been rendered).
Not only that the size of the resulting chart increases....this could lead to a security issue, in case you pass sensitive data via --set or --set-file that is just needed to render the templates (to create k8s secrets) but - in the end - should NOT make it into the final package.
Everybody with access to the chart secret (created by helm3) could then view this data.
See this comment https://github.com/helm/helm/issues/3050#issuecomment-341576612
Output of helm version:
version.BuildInfo{Version:"v3.3.0", GitCommit:"8a4aeec08d67a7b84472007529e8097ec3742105", GitTreeState:"dirty", GoVersion:"go1.14.7"}
Cloud Provider/Platform (AKS, GKE, Minikube etc.):

GKE

I'm not entirely sure of your use case and situation. So, I'm going to provide some context and ask some questions to try and narrow it down.
Helm is a package manager. As part of that there is a step to take directories and turn them into archives that can be shared. There is also the ability to install archives or directories.
When you talk about packaged and final chart are you talking about directories or something generated from helm package?
Or, are you talking about what's stored just in the secret in the cluster?
If you are just talking about the secret, and I will assume you are, there are some things going on here. Note, I would be curious to learn about your setup to better understand the situation.
First, Helm has some commands that need to know the previous values in order to work. The set family of flags are designed to set values right from the console app. An example is helm upgrade with the --reuse-values flag. It needs to old values which are, in part, set by the set family of flags in order to work.
So, Helm stores this data in a secret because a secret is the place to store sensitive information in Kubernetes. Helm does this by default but there are other storage back-ends (e.g., PostgreSQL). A secret can be tied to encryption setups that store the sensitive information securely.
This still does not solve the problem of access control, as you note. This is where things get harder. If an application has sensitive information the Kubernetes way to store that is a secret. It can then be exposed through a filesystem mount or an environment variable to an application running in a container. Access controls work around RBAC and namespaces to limit who and what can see the information (e.g., secrets). This is why the helm secret is stored in the same namespace as the application and its secrets. If someone can access the applications secrets they can get the same information as the information in Helm's secrets.
Helm needs a way to store information in a cluster without installing anything to the cluster. This is a hard requirement which has pushed us to secrets. But, we know people want to store this data in different ways which is why the storage mechanism is pluggable and we are open to more and new plugins.
I imagine you have some more context you can share based on your situation. This is a bit of the context on why things work they way they do now.

Hi @mattfarina,
thank you for your feedback. I'll try to explain, how we might have misused helm so far.
We are deploying many components with helm in many regions. So far, we have stored all our credentials within a separated, encrypted git repo. Just before doing a helm upgrade --install ... we placed that file somewhere within the chart directory. Within a template file, we are parsing this file and - in the end - are generating k8s secrets.
We gained access to the contents of that file via the Files.Get function. And for this to work, that file (with all our credentials) could not be added to the .helmignore file, because then, the Files.Get does not work anymore.
Until a few weeks, we truly didn't know, that everything that is lying around within the chart directory is also packaged and stored within k8s. We thought, that only the finally rendered data would be packaged and put into k8s.
Now that you also pointed me to the --reuse-values option, I now know, why the values are also somewhere needed.
However, since we recognized this, we are heavily redesigning our setup. But maybe, you could also tell, if there is a way to cleanup the chart directory after the chart has been rendered but before it is packaged and then loaded into k8s. That way, we could at least make sure, that unneccessary files could be removed (and not packaged) into the helm chart release.
Would that be possible?
Thanks for any hints.

So my - personal, and maybe pretty mad - idea how to maybe fix this, would be to implement another ignore file...maybe something like .helmdonotpackage. Files matching this pattern should then be removed from the Chart.Files section, after all resources have been rendered within the install and upgrade phase.
So files not listed in .helmignore BUT listed in that new .helmdonotpackage files, could still be used within template files (loaded with Files.Get) but once the data is rendered, remove it from the Chart (and also from the release) just before it gets stored.
If I read the code correctly (I'm a golang beginner), the 2 points are within the install.go (https://github.com/helm/helm/blob/213a7df2dcd07e8d49fc6acf8a53a540c661ed53/pkg/action/install.go#L251) to remove the files from the rel.Chart.Files map and within the upgrade.go (https://github.com/helm/helm/blob/213a7df2dcd07e8d49fc6acf8a53a540c661ed53/pkg/action/upgrade.go#L219) to modify chart.Files before that is put into upgradeRelease.
As mentioned....just an idea (and maybe a bad one)


chore: update Django to 4.2.14 for Redwood - Security Patch

See: https://github.com/openedx/wg-build-test-release/issues/383

Thanks for the pull request, @magajh! Please note that it may take us up to several weeks or months to complete a review and merge your PR.
Feel free to add as much of the following information to the ticket as you can:

supporting documentation
Open edX discussion forum threads
timeline information ("this must be merged by XX date", and why that is)
partner information ("this is a course on edx.org")
any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.
Please let us know once your PR is ready for our review and all tests are green.


Comparison with AirGradient?

Can you elaborate a bit more (also maybe adding to the README) about how this compares with the Airgradient solution, especially their most recent release?
Looks like many of the same sensors, though I didn't check them all.

Yep, it's mostly following their reccomondations. However, I wanted full control over the firmware and some add-on capabilities. And I liked the challenge to learn how to build this from scratch.


Drop libnm-gtk

Motivation for this change
It is not used for anything any more (it was used by GNOME 2 control center).
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[x] Fits CONTRIBUTING.md.

No attempt on x86_64-darwin (full log)
The following builds were skipped because they don't evaluate on x86_64-darwin: networkmanager-fortisslvpn, networkmanager-iodine, networkmanager-l2tp, networkmanager-openvpn, networkmanager-vpnc, networkmanager_strongswan, networkmanagerapplet
Partial log (click to expand)

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.

Success on x86_64-linux (full log)
Attempted: networkmanager-fortisslvpn, networkmanager-iodine, networkmanager-l2tp, networkmanager-openvpn, networkmanager-vpnc, networkmanager_strongswan, networkmanagerapplet
Partial log (click to expand)
stripping (with command strip and flags -S) in /nix/store/ybdsb07clqb05889hndrv9pdyx6j5xv7-NetworkManager-vpnc-gnome-1.2.6/lib  /nix/store/ybdsb07clqb05889hndrv9pdyx6j5xv7-NetworkManager-vpnc-gnome-1.2.6/libexec
patching script interpreter paths in /nix/store/ybdsb07clqb05889hndrv9pdyx6j5xv7-NetworkManager-vpnc-gnome-1.2.6
/nix/store/ppm4k22lxnrz0k2jcxi0fgd24r9l3nbi-NetworkManager-fortisslvpn-gnome-1.2.8
checking for references to /build in /nix/store/ybdsb07clqb05889hndrv9pdyx6j5xv7-NetworkManager-vpnc-gnome-1.2.6...
/nix/store/knz30hkv7ia791cfff378cbh0m0sfg07-NetworkManager-iodine-gnome-1.2.0
/nix/store/8g0ilyrb3jyg1r8klxqxvk5labikfd39-NetworkManager-l2tp-gnome-1.2.10
/nix/store/166lwi12brx9paplz6787ywzri8qayf0-NetworkManager-openvpn-gnome-1.8.4
/nix/store/ybdsb07clqb05889hndrv9pdyx6j5xv7-NetworkManager-vpnc-gnome-1.2.6
/nix/store/00v72m72vqranbnbp4pkkjngx5hw8ln2-NetworkManager-strongswan-1.4.4
/nix/store/bxfqxkknsadrzxvxq7xvxcj5jv2jbrxb-network-manager-applet-1.8.16

Success on aarch64-linux (full log)
Attempted: networkmanager-fortisslvpn, networkmanager-iodine, networkmanager-l2tp, networkmanager-openvpn, networkmanager-vpnc, networkmanager_strongswan, networkmanagerapplet
Partial log (click to expand)
stripping (with command strip and flags -S) in /nix/store/44b1md65ggdxldysyxy9gqvjjji2233v-NetworkManager-openvpn-gnome-1.8.4/lib  /nix/store/44b1md65ggdxldysyxy9gqvjjji2233v-NetworkManager-openvpn-gnome-1.8.4/libexec
patching script interpreter paths in /nix/store/44b1md65ggdxldysyxy9gqvjjji2233v-NetworkManager-openvpn-gnome-1.8.4
checking for references to /build in /nix/store/44b1md65ggdxldysyxy9gqvjjji2233v-NetworkManager-openvpn-gnome-1.8.4...
/nix/store/g9xx5zpfj635rl75rnwmjvjra372dgrb-NetworkManager-fortisslvpn-gnome-1.2.8
/nix/store/rj12xlg88k91i2n6wxj54hasslsrf4yp-NetworkManager-iodine-gnome-1.2.0
/nix/store/xmkxagvvypkpylh32z72acy94211b0vk-NetworkManager-l2tp-gnome-1.2.10
/nix/store/44b1md65ggdxldysyxy9gqvjjji2233v-NetworkManager-openvpn-gnome-1.8.4
/nix/store/k2df8jmq6sfhfgmgqyq8a340qbbc3vf7-NetworkManager-vpnc-gnome-1.2.6
/nix/store/1q3m3zhsz89pc7a19f746bzp4mrx7xj9-NetworkManager-strongswan-1.4.4
/nix/store/cksfqvk7pqqi0mfldihmlk86nmhs1pzi-network-manager-applet-1.8.16

I suppose mate also does not use this?

This wouldn't affect nm-connection-editor right?

Nope, nm-connection-editor uses libnma (modern version of libnm-gtk not using libnm-glib).

@Mic92 mate does not seem to depend on networkmanagerapplet. If it requires nm-gtk optionally, it is not currently enabled, so removing nm-gtk should not matter. And if mate maintainers wanted to enable it, it would break with next nm-applet release which will likely remove nm-gtk.

I just updated from 083220867c7 to ca2ba44cab4 and my vpnc-based vpn stopped working.  The error was: Error: Connection activation failed: The VPN service 'org.freedesktop.NetworkManager.vpnc' was not installed.
I reverted this merge and also 9efc9b5d9154e05767485dc4707e360bf0633eee, and it went back to working.

@jerith666 try https://github.com/NixOS/nixpkgs/pull/46201

Yes, I just found that too!  Thanks!  :)


Primary key not counted as identity for magic link

Primary keys aren't currently being counted as an identity for magic_link creation. I've gotten around it by adding the primary key as an identity, which creates an extra unique index on it:
identities do
  identity :id, [:id]
end

My use case was that I wanted a single-click unsubscribe link for a Subscription resource that used the magic_link functionality (which works great!).

Thanks for the report!


Request：关于PG的支持特性相关文档丢失

你好，期待答复。
文档目前有大量的无效网页，根据搜索有如下结果，

页面跳转后发现缺少相关的一个内容，请问目前有相关的文档支持吗？

跳转相关的url为：https://docs.featureprobe.com/reference/support-postgresql/

如果没有相关文档，望答复PG部署的相关配置及对PG支持情况。谢谢

看起来这是你安装的某个大模型插件的幻觉，我们并没有提供类似网页url。 项目本身是PG数据库兼容的，虽然默认配置是mysql。

看起来这是你安装的某个大模型插件的幻觉

@FengShang seems that it could be attributed to not properly configuring the docs site's built in algolia search (one possible reason is that the docs site's domain has been changed), maybe an update of algolia config in their dashboard can fix it

ref: https://docusaurus.io/docs/search

Thank you for your response. It appears to be an issue with the documentation's search engine.I have now found the relevant configuration for PG support by reviewing the code repository.Much appreciated.

你好，期待答复。
文档目前有大量的无效网页，根据搜索有如下结果，
页面跳转后发现缺少相关的一个内容，请问目前有相关的文档支持吗？

跳转相关的url为：https://docs.featureprobe.com/reference/support-postgresql/

如果没有相关文档，望答复PG部署的相关配置及对PG支持情况。谢谢

Actually, we did write a reference article for PostgreSQL. However, during the migration process, this article got lost. Thank you for bringing it to our attention, and we will work to restore it as soon as possible.

Reference here: https://docs.featureprobe.com/zh-CN/reference/support-postgresql

Reference here: https://docs.featureprobe.com/zh-CN/reference/support-postgresql/

I apperciate you reply,however,when attempting to open the relevant webpage,it encountered a 502 error.


Minor docs fix, indent in JSON

Properly indent Fields.Mappers.Max field in example JSON.

 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.

Wow, the indent thing just jumped out at me, but I totally missed the whole "should be valid JSON" thing.
:neutral_face:


Trader Joe - FIxed MasterChef indexing like sushiswap

Don't forget to run prettier

Actually, maybe see if you can set up prettier with git commit hook


fromEventPattern signal missing

RxJS version: 5.0.0-beta.11
In v4, there was a way to take the signal (the thing returned from addHandler) and use it in removeHandler for proper disposal. See v4 docs for fromEventPattern, under the Dojo toolkit example. I think this functionality is still useful and it appears to be missing.
I can attempt to submit a PR, but I was wondering if there was a reason for its removal.

cc @trxcllnt

@blesh was I responsible for fromEventPattern? If so, I apologize, and this should definitely be fixed.

@trxcllnt no worries, it was an add you made very very early on in development. I can look at it too, I was just traveling when this crossed my screen.

Closing via #2224.


Bug - Releases does not work, unless project has also been built locally.

If someone downloads any of the (recent) releases, without at some stage having built the project from source locally, then the release will throw an exception.

@redbearsam please provide an example of the exception that is presented in this case.

Strange, I've been able to run releases 2.2.1 and 2.2.2 without building them locally.


I've searched for stage, gitsigns and which-key but couldn't find anything. I've looked at this keybinding.lua file but couldn't find anything about this as well.
I've tried using this in my own config.lua
lvim.builtin.which_key.mappings["g"]["s"] = {
    "<cmd>lua require 'gitsigns'.stage_hunk()<cr>", "Stage Hunk", mode="v"
}

this works in visual mode, but unfortunately this makes the keymap in normal mode disappear, and which-key doesn't support specifying multiple mode at the moment I think? (issue)
Thanks in advance!

can you try
  lvim.builtin.which_key.vmappings["g"] = {
    name = "+Git",
    s = { "<cmd>lua require 'gitsigns'.stage_hunk()<cr>", "Stage Hunk" },
  }

notice the use of vmpaggins instead of mappings

It works, thanks a lot!


Added the Spotify Clone [GSSOC'23]

Title and Issue number
Spotify Clone
Issue #3839
Close #3839
Checklist:

[X] I have mentioned the issue number in my Pull Request.
[X] I have commented my code, particularly in hard-to-understand areas
[X] I have created a helpful and easy to understand README.md

@MohitGupta121 @TusharKesarwani @pranjay-poddar
Please review and merge the PR.
And add the gssoc23 label and level label.


"Extending at-rules cannot occur at the root level"

The console throws the error Extending at-rules cannot occur at the root level while processing the following markup:
@define-placeholder smallCaps {
  text-transform: lowercase;
  font-variant: small-caps;
  font-family: var(--type-primaryFontFamily);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.12em;
}

th {
  @extend smallCaps;
}

Shouldn't this work? The @extend is inside the th {} block, not the root level.

Are you using postcss-nested before this plugin?

I figured out why the error was occurring. postcss-nested must be loaded after postcss-simple-extend.

@davidtheclark Aha, yes! :+1:

cf. #1 and #4 --- seems to be people's biggest problem with this plugin so far!

What do you think of putting a note about it in the README?

Good idea. Will do.


Replace f0 type suffix with f and rename Rect types

Switch to new GeometryBasics type names from https://github.com/JuliaGeometry/GeometryBasics.jl/pull/97
Rename similar suffixes defined by Makie itself: Quaternionf0->Quaternionf, RGBf0->RGBf, RGBAf0->RGBAf, with deprecation warnings for the old names.

If these changes are OK with you, I'll continue with PRs for MathTeXEngine, Animations, AlgebraOfGraphics and FreeTypeAbstraction.

Oh boi, this PR is of course super sensitive to any other PR getting merged :-O I hope you have a replace regex to run again, instead of running a nasty resolve conflict?

Yes I have a script with regexes :) I'll post it tomorrow morning (don't have access to the computer right now).

I've posted the script in the PR description at https://github.com/JuliaGeometry/GeometryBasics.jl/pull/97.
I'll update this PR whenever another PR is merged, it's no trouble at all.

@SimonDanisch this should be ready now (the relevant dependents have upgraded to GeometryBasics 0.4.1).

I guess this still needs GridLayoutBase to get an upgrade?

It should work with GridLayoutBase 0.6.0 which was released earlier today. I guess it's a registry update/cache issue: the checks that started a few minutes later were successful. Maybe try again?

Replaced by https://github.com/JuliaPlots/Makie.jl/pull/1252


QR code

requested icon
qr-code
category suggestion
UI
search synonyms
bar-code, barcode, scan

released


Window from extension is very small and difficult to use

Hey @RobertDaleSmith -- first and foremost, thank you so much for your development on this project! The Freckle extension has been wonderfully helpful.
However, since upgrading to Chrome Version 50.0.2661.102 m (with version 1.0.7 of the extension installed), the drop-down window from the extension has become small and nearly unusable when time tracking is active.
The gif below shows the window as it appears in Chrome on my Win 10 machine.
Am I doing something wrong?

Thanks for the heads up. I will take a look at this over the weekend and see if I can get it cleaned up. Although I still love Freckle, I no longer work for a company that uses it. So it has been a little off my radar.
If any developers out there want to take a stab at it before I get to it, then feel free to submit a pull request.
Thanks!

Should be resolved by commit: b302f80
Ver 1.0.8 rolling out now.

Thank you so much for your help on this and have a great day!

NICE!  👍  Thanks so much for letting me know both that it was broke and that it now works! 😄


JDA repeading every action endlessly

When i try to execue a command (such as send direct message ONE time), it will send 8 messages. This issue began in 3.2.0_XXX and is still a thing. It's very annoying, since i have to use outdated versions (3.1.0_XXX)
Code i use for sending direct messages is:
PrivateChannel dm = targetUser.openPrivateChannel().complete();
dm.sendMessage("Message content").queue();
dm.close();

Not sure, but is it possible that this happens due to you closing the PrivateChannel before the message was sent? You queued the Message Send Action, and then closed the channel. Maybe the message wasn't sent before you closed the channel as queue() doesn't block the current thread and close() gets called directly after it.

@kijube It doesn't happen only with direct messages (i stated it just as an example), it also happens with regular chat messages in a guild.
And it's probably not because of me closing the channel because in older version (more specifically 3.1.0_204), it doesn't happen. Not with direct messages nor with chat messages.

Closing a channel has nothing to do with sending messages.

I really don't think this is a JDA problem. A common mistake is that your bot listens to it's own message or that you just have multiple instances of your bot running.

or the event listener added multiple times

As you stated, it'll send messages 8 times, so you probably forgot to close those seven tabs down there in IntelliJ ;)

For all of you saying that that isn't JDA's bug, i have one question:
Why is THE SAME program in THE SAME environment working just great in JDA 3.1.0_204, but having that issue since JDA 3.2.0_226??
Also, i checked all methods and none is deprecated/missing.

When exactly are you writing out that message? on what event?

The thing is: 205 (the first build that breaks for you i guess) is pretty old (may 24th). And the fact that we didn't hear anything like this since then (with a huge user base) strongly suggests that its not JDA's error.
That's why we first went with the "Its probably a user error" response first.
We are still trying to help you fix this. We just wanted to make sure that its not your code producing this. (which I am still not sure about)
Could you find out on which exact build your program starts to act like this? Is it 205 or is it later? That would help enormously in finding out what causes that (looking at what changed in JDAin that version)

You are not actually closing the channel in that example as close() is returning a ResAction. I don't believe this a JDA error and advise you to check and debug your code first. Closing a channel does not make a real difference for bots FYI.

@kantenkugel As far as the downloads go, last build without that issue was 3.1.0_204, it began behaving so in 3.2.0_226, still behaves so in the latest build (3.2.0_241). Hope that helps.
And if you really want to make sure it's not my code, you can check it out there.
(I'm new to Git stuff, and still don't know how to use it pretty much, so I'm just giving you the mediafire link)

@iAreas in which class is the affected code?

@MinnDevelopment i know that closing private channels doesn't make a big diffierence, but i still do it. And also I'm sure that doesn't cause the user to recieve 8 private messages when they should recieve only one FIY.

@Almighty-Alpaca in every class that sends private/public messages.

You guys should also stop bothering about the private message code and start bothering about the issue. I don't open issues if I'm not 100% sure that it's not my fault.

As far as i am aware there is no issue in JDA that could cause this. Unless you can find and prove it I am certain this is your issue which is why i told you to debug.

After reinstalling JVM & Eclipse, the issue disappeared. Kinda weird.
But at least it wasn't mistake in my code.

After reinstalling JVM & Eclipse, the issue disappeared. Kinda weird.
But at least it wasn't mistake in my code.

I thought this was the issue when I first read about your problem as it happened to me too, but I was unsure and preferred not to respond. It is likely that you had more than one running instances of your bot because you hadn't closed the previous ones properly.(all were listening and respoinding to events.)

I had the same issue but I had to close and reopen eclipse because I had some java processes running in the background of eclipse.

2017


oscarotero/env v2.1.0 Class 'Env' not found

[X] I've read the guidelines for Contributing to Roots Projects
[X] This request isn't a duplicate of an existing issue
[X] I've read the docs and followed them (if applicable)
[X] This is not a personal support request that should be posted on the Roots Discourse community

Description
I have recently updated composer and got the oscarotero/env v2.1.0 package. Since then I keep getting this error:
Fatal error: Uncaught Error: Class 'Env' not found in /myproject/config/application.php:6
Steps to reproduce

Update composer to v2.1.0 on package oscarotero/env
Check your local repository

Expected behavior: [What you expect to happen]
Expected to run site normally.
Actual behavior: [What actually happens]
Throws error Fatal error: Uncaught Error: Class 'Env' not found in /myproject/config/application.php:6
Reproduces how often: [What percentage of the time does it reproduce?]
100%
Versions
oscarotero/env v2.1.0
Additional information
This is the content of the referenced file, where Env::init() corresponds to line 6:
<?php

$root_dir = dirname(__DIR__);
$webroot_dir = $root_dir . '/public';

Env::init();

// Use Dotenv to set required environment variables and load .env file in root
$dotenv = new Dotenv\Dotenv($root_dir);
if (file_exists($root_dir . '/.env')) {
    $dotenv->load();
    try {
      $dotenv->required('DATABASE_URL')->notEmpty();
    } catch (Exception $e) {
      $dotenv->required(['DB_NAME', 'DB_USER', 'DB_PASSWORD', 'WP_HOME', 'WP_SITEURL']);
    }
}

It seems as if the package were not loaded since the Env Class doesn't load. Ideas?

Patch Bedrock with the https://github.com/roots/bedrock/tree/master/ branch, https://github.com/roots/bedrock/pull/530/ to be specific.

Patch Bedrock with the master branch, #530 to be specific.

Sounds good! How can I do that?

Download https://patch-diff.githubusercontent.com/raw/roots/bedrock/pull/530.diff and $ git apply it.
However, depends on how much change you made and how "out of sync" your code is, it might not work.
For a small patch like #530, manually copy and paste the changes might be easier.
Props to @austinpray

Thanks, that was helpful. I have indeed manually added the missing parts. This is how the edited file looks like now:
<?php

use function Env\env;

// Directory containing all of the site's files
$root_dir = dirname(__DIR__);
$webroot_dir = $root_dir . '/public';

// Use Dotenv to set required environment variables and load .env file in root
$dotenv = Dotenv\Dotenv::createImmutable($root_dir);

if (file_exists($root_dir . '/.env')) {
    $dotenv->load();
    **var_dump(env('DB_USER'));exit;**
    try {
      $dotenv->required('DATABASE_URL')->notEmpty();
    } catch (Exception $e) {
      $dotenv->required(['DB_NAME', 'DB_USER', 'DB_PASSWORD', 'WP_HOME', 'WP_SITEURL']);
    }
}

The problem I am facing is that if I var_dump the env variables I get empty values. Because of that, my msqli is not connecting to the database. Any idea?

@albertonieto What version of vlucas/phpdotenv are you using? I have to update the bootstrap code when I've upgraded from version 4 to 5.
Also see this issue: https://github.com/oscarotero/env/issues/8
I ended adding this to the top of the bootstrap file:
\Env\Env::$options |= \Env\Env::USE_ENV_ARRAY;

I am using the latest version "vlucas/phpdotenv": "^5.2",
Sorry, when you mention the bootstrap file, which file are you referring to? I would like to try that as well.

Sorry, I meant config/application.php - it now looks like this in my Bedrock-based project (the top part):
<?php

/**
 * Expose global env() function from oscarotero/env
 */
use function Env\env;

/**
 * Instruct Env\Env to read environment variables via $_ENV instead of getenv().
 * The latter does not work with DotEnv 5 by default, see: https://github.com/oscarotero/env/issues/8
 */
\Env\Env::$options |= \Env\Env::USE_ENV_ARRAY;

/** @var string Directory containing all of the site's files */
$root_dir = dirname(__DIR__);

/** @var string Document Root */
$webroot_dir = $root_dir . '/web';

/**
 * Use Dotenv to set required environment variables and load .env file in root
 */
$dotenv = \Dotenv\Dotenv::createImmutable($root_dir);
if (file_exists($root_dir . '/.env')) {
    $dotenv->load();
    $dotenv->required(['DB_NAME', 'DB_USER', 'DB_PASSWORD', 'WP_HOME', 'WP_SITEURL']);
}

...

Thanks. I have added the instruction as you referred. I am able to see the env variables when I var_dump them, however my mysqli is still not connecting:
<?php

use Roots\WPConfig\Config;
use function Env\env;

\Env\Env::$options |= \Env\Env::USE_ENV_ARRAY;

$root_dir = dirname(__DIR__);
$webroot_dir = $root_dir . '/public';

$dotenv = \Dotenv\Dotenv::createImmutable($root_dir);
if (file_exists($root_dir . '/.env')) {
    $dotenv->load();

    Config::define('DB_NAME', env('DB_NAME'));
    Config::define('DB_USER', env('DB_USER'));
    Config::define('DB_PASSWORD', env('DB_PASSWORD'));
    Config::define('WP_HOME', env('WP_HOME'));
    Config::define('WP_SITEURL', env('WP_SITEURL'));
    var_dump(env('DB_NAME'));
    var_dump(env('DB_USER'));
    var_dump(env('DB_PASSWORD'));
    var_dump(env('WP_HOME'));
    var_dump(env('WP_SITEURL'));

    $dotenv->required(['DB_NAME', 'DB_USER', 'DB_PASSWORD', 'WP_HOME', 'WP_SITEURL']);
}

I still get the:
Warning: mysqli_real_connect(): (HY000/2002): No such file or directory in /myproject/public/cms/wp-includes/wp-db.php on line 1635
No such file or directory
Error establishing a database connection

I am very confused.

@albertonieto Are you sure you have Config::apply(); at the end of the file as well? See: https://github.com/roots/bedrock/blob/master/config/application.php#L123 AFAIK, this is where the actual constants are defined. Config::define(...); calls are just part of internal setup, but do not actually define any constants.

Sorry about that, I was missing the apply at the end of the file. I have managed to actually connect via mysli now. I noticed however that our theme is using a /public/content/themes/mytheme/inc/assets.php file that reads as follows:
<?php

  define('ASSETS_REVISION_FILE', dirname(dirname(ABSPATH)) . '/REVISION');
  define('ASSETS_REVISION', substr(trim(@file_get_contents(ASSETS_REVISION_FILE)), 0, 12));
  define('ASSETS_PATH', dirname(dirname(ABSPATH)) . DIRECTORY_SEPARATOR . env('ASSETS_COMPILE'));
  define('ASSETS_DIRECTORY', str_replace(dirname(ABSPATH), '', ASSETS_PATH));
  define('ASSETS_HOST', env('ASSETS_HOST') ? env('ASSETS_HOST') : '//' . $_SERVER['SERVER_NAME']);
  //define('ASSETS_VERSION', ASSETS_REVISION ? ASSETS_REVISION : time('U'));
  define('ASSETS_VERSION', ASSETS_REVISION ? ASSETS_REVISION : time());

  function asset_path($path) {
    return ASSETS_HOST . ASSETS_DIRECTORY . '/' . $path . '?v=' . ASSETS_VERSION;
  }

I am getting a Call to undefined function env() for line 5. Any idea for that fix?

I am getting a Call to undefined function env() for line 5. Any idea for that fix?

You have to add use function Env\env; to this file as well - the use statements must be defined per file, see the docs.

@chesio
Nice touch about vlucas/phpdotenv v5!
Do you mind make a PR for it?

@TangRufus Sure, I'll try to get a PR ready over the coming weekend.

SO how do we fix this ? I am stuck here aswell..

SO how do we fix this ? I am stuck here aswell..

Run composer require vlucas/phpdotenv:^5.2 oscarotero/env:^2.1
Update your application.php to reflect https://github.com/roots/bedrock/blob/master/config/application.php#L31


Change favicon (docker wiki?)

Hi and thanks a lot for this great app, it's working great !
I'm not submitting a bug but, as I wanted to change the site favicon, I've spent a bit of time to find where the icon was stored in the  container and how to replace it.
I found the icon with : docker export %your container id%| tar tf - | grep icon.png
Then, I replaced it using docker-compose volumes:
    volumes:
      - "/YOUR OWN PATH TO/config:/app/data/config"
      - "/YOUR OWN PATH TO/db-data:/app/data/db" #to make db persistent (instead of "db-data" only)
      - "/YOUR OWN PATH TO/photo:/app/data/images"
      - "/YOUR OWN PATH TO/tmp:/app/data/tmp"
      #to change favicon for english and french locale
      - "/storage/dockers/pigallery2/icon.png:/app/dist/en/assets/icon.png"
      - "/storage/dockers/pigallery2/icon.png:/app/dist/fr/assets/icon.png"
      #to change icon next to title for english and french locale
      - "/storage/dockers/pigallery2/icon.png:/app/dist/en/assets/icon_inv.png"
      - "/storage/dockers/pigallery2/icon.png:/app/dist/fr/assets/icon_inv.png"

I hope this could help others trying to achieve the same thing! If you think it's usefull I'd be glad to create a wiki section.
Let me know if there is any problem related to the changes I made ! (icon or db-data related)

Feels a bit of a hack to be honest.
I would not mind making it possible to change the icon from settings. Let me know if you would like to take a look, i can give some pointers.
Also "db-data:/app/data/db" should already persist the db in a volume. Even if you delete a container that should remain intact.

Yes, hacky it is! But it's also a clever way to change ressources inside a container (I guess I like this kind of hack...)
I'd love to help with making the icon change as a setting option and I'll need some guidance/pointers to have a quick start.
About db-data, I kept looking into it and it seems to be a problem related to the docker-compose library used in Portainer. It forces me to remove the db-data volume each time I change a setting in the docker yaml, which I did a few time for my hack to work.

Great!
What you can do is to create a new icon url (or path) in the config:
https://github.com/bpatrik/pigallery2/blob/41975f72a18f985cae27b1bdb6b31c7379b0d87c/src/common/config/public/ClientConfig.ts#L174-L180
(same for the icon_inv)
Then you can do multiple things:
One option would be just to override the /assets/icon.png middleware here to server the configured icon, instead of the one under /assets/icon.png:
https://github.com/bpatrik/pigallery2/blob/41975f72a18f985cae27b1bdb6b31c7379b0d87c/src/backend/routes/PublicRouter.ts#L132-L139
This way you do not need to change the front-end.
An other would be to change all link in the UI to point to what it was given in the config:
https://github.com/bpatrik/pigallery2/search?q=icon.png
But this is more hassle and I think the previous option would be better.

optionally you can also put the setting on the UI:
For that you would need to:

map to UI config:
https://github.com/bpatrik/pigallery2/blob/41975f72a18f985cae27b1bdb6b31c7379b0d87c/src/frontend/app/ui/settings/basic/basic.settings.component.ts#L26-L34
show on the UI:
https://github.com/bpatrik/pigallery2/blob/41975f72a18f985cae27b1bdb6b31c7379b0d87c/src/frontend/app/ui/settings/basic/basic.settings.component.html#L10-L27
Implement the backend part on config save (do the mapping backwards):
https://github.com/bpatrik/pigallery2/blob/41975f72a18f985cae27b1bdb6b31c7379b0d87c/src/backend/middlewares/admin/SettingsMWs.ts#L391-L398

Thanks a lot for your help, I think I should be able to handle most of it.
There is just this part where I'm not sure about how to do it:

Then you can do multiple things:
One option would be just to override the /assets/icon.png middleware here to server the configured icon, instead of the one under /assets/icon.png:
https://github.com/bpatrik/pigallery2/blob/41975f72a18f985cae27b1bdb6b31c7379b0d87c/src/backend/routes/PublicRouter.ts#L132-L139

Should I add an if statement in both app.get functions ? Somtehing like
if ('file' == 'icon.png') {//change file to Config.Client.icon}
else //normal behaviour
OR
edit renderFile and check the file to render, if it's icon.png change file to Config.Client.icon
How can we add our own icons? If it's a URL it's simple but if someone wants to serve the icon locally, can we add an icon in config and serve it from there or should we make the assets folder as a docker volume?

you can also do something like:

    app.get('/assets/icon.png',
      setLocale,
 (req: Request, res: Response, next: NextFunction)=>{
//maybe some checks here? OR when the config is set ( see Diagnostic class)
 res.sendFile(<path to the icon>);
});

If the icon is an URL that is actually the more tricky one, because you will need to change the fontend where the icon is referenced.
If its a local file, you can use the code above.
What would also be a nice solution is:

if there is an icon file in eg the /config folder as you also suggested, then the app would use that icon, otherwise the default.
Create an upload filed in the configs that would save the icon to that config folder.

With this solution you would not need to create a new config field.

Hey, I like the KISS solution with an icon file in the config folder, I'll try it as soon as possible!
I may start with step 1 that will bring the major functionnality (changing icons) then step 2.

Here is a first attempt at a pull request: https://github.com/bpatrik/pigallery2/pull/331


Add NIST Special Publication 800-208 parameter sets

This PR adds support for the parameter sets in the draft version of NIST Special Publication 800-208. Since IANA has not yet assigned numeric identifiers for these parameter sets, numeric identifiers randomly chosen from the "Reserved for Private Use" range have been chosen, with the idea that these will be changed once IANA has made assignments.

I'm somewhat hesitant to set random identifiers in the reference code and then create inconsistency when IANA does assign identifiers.. Is there a practical reason for wanting these identifiers in the reference code before publication of SP 800-208?

Hi @joostrijneveld,
My interpretation of the IANA considerations section of RFC 8391 was that one of the requirements for having a new entry added to the registry was to have a reference implementation available. If possible, we would like to include the final numeric identifiers for the new parameter sets in final version of SP 800-208. Even if my understanding is correct, though, it is probably enough for the PR to be available even if it hasn't been merged.
I'll update this PR once numeric identifiers for the new parameter sets appear at https://www.iana.org/assignments/xmss-extended-hash-based-signatures/xmss-extended-hash-based-signatures.xhtml. In the meantime, please let me know if you notice any other problems with the PR.

Hi @joostrijneveld,
The numeric identifiers for the new parameter sets have been posted to https://www.iana.org/assignments/xmss-extended-hash-based-signatures/xmss-extended-hash-based-signatures.xhtml, and I have updated this PR to use the assigned numbers.

Thanks! It's great to have these numbers fixed.
Looks good to me!


Nancy not responding when run from a service

Running Nancy in a Windows service.  All the Nancy modules and stuff are in a project I changed from a console to a library.
For now I'm running the service project as LocalSystem.  Adapting from the default code for the server, I have:
protected override void OnStart(string[] args)
{
    SetStatus(ServiceState.SERVICE_START_PENDING, 5000);

    eventLog.WriteEntry("Dust service starting");

    var uri =
        new Uri("http://localhost:8080");

    var config = new HostConfiguration() { UrlReservations = new UrlReservations() { CreateAutomatically = true, User = "LocalSystem" } };

    #if DEBUG
    StaticConfiguration.Caching.EnableRuntimeViewDiscovery = true;
    StaticConfiguration.Caching.EnableRuntimeViewUpdates = true;
    #endif

    using (var host = new NancyHost(uri, new Bootstrapper(), config))
    {
        host.Start();
    }
}

Now I just converted over, so this has never actually worked.  I've also abutted the start() with extraneous logs.  They were getting printed, so I know host.Start(); is being executed.
however, port 8080 isn't open.  Could this have something to do with the urlreservations?  I would assume that an error would be thrown if that were the case.
This DID work when it was part of a standalone program.
P.S. I know it's dangerous to run as localsystem but for now we have to until we can figure a way to get regular Windows 7 users to be allowed to start a process.  This is just a temporary solution.

P.S. A freenode channel would be super awesome

try with a https://jabbr.net/#/rooms/nancyfx

Thanks!

I hope this helps someone else.  https://github.com/dealproc had the answer.  Said he's had this issue before, too.  It's obviously not specific to running a service so it must be an answer to problems others are having and is probably already answered somewhere.
The problem is
using (var host = new NancyHost(uri, new Bootstrapper(), config))

This is going to go out of the code block and call dispose on the NancyHost object.

That is correct, if you're using in a windows service you want to manage the creation / disposing of the host in the service start/stop, and not use a using block.
In a console app you want to add a read-key or similar after host.start() before the using block closes so it holds the host open and disposes after losing scope. OR you need to manage it yourself. :)

Suggest that you might want to put an actual comment explaining that in the base code.

Try with this.
using (var host = new NancyHost(uri))             {                 host.Start();                 Console.ReadKey();             }
ReadKey will block then your host remains active until focus console and type something.

My project doesn't have a console.

Then this should give you idea.
`public partial class MyWinService : ServiceBase
{
private IDisposable host;
    public MyWinService()
    {
        InitializeComponent();
    }

    protected override void OnStart(string[] args)
    {
        var uri = new Uri("http://localhost:3579");
        this.host = new NancyHost(uri).Start();
    }

    protected override void OnStop()
    {
        this.host.Dispose();
    }
}`

Yup.  That's almost exactly how I did it.

Using Topshelf.

Glad you got it sorted, but this is a standard .net "thing" rather than a Nancy issue - it's clear from your original code that the host will be disposed, and the behaviour around the host being disposed is also covered in detail in the documentation:

NancyHost implements the IDisposable interface and will automatically call the Stop method on the host when the application is closing. If you need more control over when the host is started and stopped, simply create an instance, without the using-statement, and explicitly call Start() and Stop() as needed.

https://github.com/NancyFx/Nancy/wiki/Self-Hosting-Nancy
In an ideal world we would throw an object disposed exception if you tried to use the host after it was dipsosed, but as disposing it closes the actual listener there's no way for us to do that as the request will never get through.

Oh I totally agree this is a standard .Net thing but I've found that others have had the same issue so a quick comment in the code might not hurt.

You could make it a pull request @bluebaroncanada ? :)

I think i'm having the same problem, but frankly i don't see what im doing wrong
I have a Service inherited by service base
partial class LinkService : ServiceBase
{
    public LinkService()
    {
        InitializeComponent();
    }
    public LinkService(RouterSystem router)
        : this()
    {
        MyRouter = router;
    }

    RouterSystem MyRouter;

    protected override void OnStart(string[] args)
    {
        MyRouter.Start();
    }

}
On That Routersystem i have on Start.
public void Start()
{
HostConfiguration config = new HostConfiguration();
config.UrlReservations.CreateAutomatically = true;
        MyNancyHost = new NancyHost(new Uri("http://localhost:80/"), new JotlinkBootstrapper(marshaler, routerListener), config);
        MyNancyHost.Start();
}

 public void Stop()
 {
     MyNancyHost.Stop();
 }

When i run this as a normal application it works perfect, but if i run this as service it will crash automatically without even get to this line, if I comment the lines before everything works ok.

Hi
After trying debugging this issue i notice that actually the exception was through inside the TinyIoC, the reason was I was using
public class SelfHostRootPathProvider : IRootPathProvider
{
    public string GetRootPath()
    {
        return Directory.GetCurrentDirectory() + @"\www";
    }
}

To determine the root path, and when running as a service the current directory is windows/system32 in windows. This happens even before start nancy. Totally my mistake.


tests/kernel/threads/thread_apis failure on lpcxpresso55s16_ns

Describe the bug
tests/kernel/threads/thread_apis failure on lpcxpresso55s16_ns
To Reproduce
Steps to reproduce the behavior:

mkdir build; cd build
cmake -DBOARD=lpcxpresso55s16_ns ..
make flash
See error

Expected behavior
test PASS
Impact
thread function
Logs and console output
  [... truncated '22' lines log ...]
    ===================================================================
    START - test_threads_priority_set
     PASS - test_threads_priority_set
    ===================================================================
    START - test_threads_abort_self
     PASS - test_threads_abort_self
    ===================================================================
    START - test_threads_abort_others
     PASS - test_threads_abort_others
    ===================================================================
    START - test_threads_abort_repeat
     PASS - test_threads_abort_repeat
    ===================================================================
    START - test_abort_handler
    Child threadCalling abort of child from parent
    Child thread's abort handler called
     PASS - test_abort_handler
    ===================================================================
    START - test_delayed_thread_abort
     PASS - test_delayed_thread_abort
    ===================================================================
    START - test_essential_thread_operation
     PASS - test_essential_thread_operation
    ===================================================================
    START - test_systhreads_main
     PASS - test_systhreads_main
    ===================================================================
    START - test_systhreads_idle
     PASS - test_systhreads_idle
    ===================================================================
    START - test_customdata_get_set_coop
     PASS - test_customdata_get_set_coop
    ===================================================================
    START - test_customdata_get_set_preempt
     PASS - test_customdata_get_set_preempt
    ===================================================================
    START - test_k_thread_foreach
    TEST: Newly added thread found
    TEST: tid: 0x200005e0, prio: 0
     PASS - test_k_thread_foreach
    ===================================================================
    START - test_thread_name_get_set
     PASS - test_thread_name_get_set
    ===================================================================
    START - test_thread_name_user_get_set
    ASSERTION FAIL [esf != ((void *)0)] @ WEST_TOPDIR/zephyr/arch/arm/core/aarch32/cortex_m/fault.c:953
    	ESF could not be retrieved successfully. Shall never occur.
    ASSERTION FAIL [esf != ((void *)0)] @ WEST_TOPDIR/zephyr/arch/arm/core/aarch32/cortex_m/fault.c:953
    	ESF could not be retrieved successfully. Shall never occur.

Environment (please complete the following information):

OS: (e.g. Linux)
Toolchain (e.g Zephyr SDK, ...)
Commit SHA:  ab3e778f47d

@MaureenHelm @dleach02

@henrikbrixandersen could you please have a look at this? I don't currently have this board

@hakehuang just to verify are you running the "non-secure" board variant, and if so what is running as the trusted firmware side?

@hakehuang just to verify are you running the "non-secure" board variant, and if so what is running as the trusted firmware side?

The Zephyr board definition for this board only support NS for now.

@hakehuang just to verify are you running the "non-secure" board variant, and if so what is running as the trusted firmware side?

nothing, I leave the trusted firmware blank.

@hakehuang I can reproduce the error here.

@hakehuang @henrikbrixandersen I guess, then, this should not be supported; running a firmware built with the _ns version of the board requires a trusted firmware counterpart be present. If not the _ns should have never been used.
Note that if you would simply want to ignore TrustZone then you need to use the default board name (without the _ns).

close this issue, and document this . thanks @ioannisg


Inconsistency in XLA Compiled Models with Distributed Multiplications, tf.abs, and tf.clip_by_value

Issue type
Bug
Have you reproduced the bug with TensorFlow Nightly?
Yes
Source
source
TensorFlow version
2.15.0
Custom code
Yes
OS platform and distribution
Ubuntu 22.04.3 LTS
Mobile device
No response
Python version
3.10.0
Bazel version
No response
GCC/compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current behavior?
In TensorFlow 2.15.0, I've encountered an inconsistency where models involving distributed multiplications combined with tf.abs and tf.clip_by_value yield different results under XLA compilation. This behavior only seen on cpu.
You can reproduce this bug on colab
Standalone code to reproduce the issue
## Model overview
## refer colab link to reproduce the error
class Model1(tf.keras.Model):
    def __init__(self):
        super().__init__()
        self.p0 = tf.constant(params[0]) # [] int8
    @tf.function(jit_compile=True)
    def __call__(self, inp1, inp2):
        add = tf.add(inp2, inp1)
        mul = tf.multiply(add, add)
        abs = tf.abs(mul)
        print(abs)
        clipped = tf.clip_by_value(abs, -1, 1)
        return abs, clipped,

class Model2(tf.keras.Model):
    def __init__(self):
        super().__init__()
        self.p0 = tf.constant(params[0]) # [] int8
    @tf.function(jit_compile=True)
    def __call__(self, inp1, inp2):
        add = tf.add(inp1, inp2)
        mul1_1 = tf.multiply(inp1, add)
        mul1_2 = tf.multiply(inp2, add)
        mul = tf.add(mul1_1, mul1_2)
        abs = tf.abs(mul)
        clipped = tf.clip_by_value(abs, -1, 1)
        return abs, clipped ,#, v4_0,

Relevant log output
# On colab
=========RUNNING WITH PICKLE FILES===========
=========eager_output(version:2.14.0, cpu:Intel(R) Xeon(R) CPU @ 2.20GHz)================
XLA_eager does not trigger assertion
=========compiled_output(version:2.14.0, cpu:Intel(R) Xeon(R) CPU @ 2.20GHz)================
XLA_complie triggers assertion

Not equal to tolerance rtol=0.001, atol=0.001
at checking 0th
Mismatched elements: 1 / 1 (100%)
Max absolute difference: 18
Max relative difference: 0.1512605
 x: array(-119, dtype=int8)
 y: array(119, dtype=int8)

Not equal to tolerance rtol=0.001, atol=0.001
at checking 0th
Mismatched elements: 1 / 1 (100%)
Max absolute difference: 18
Max relative difference: 0.1512605
 x: array(-119, dtype=int8)
 y: array(119, dtype=int8)

Hi @GwiHwan-Go ,
I have replicated the reported behaviour with colab using TF v2.14, 2.15 and nightly. Please find the gist here for reference.
Thank you!

Since it is not an implementation bug, I will close this issue.


Unable to Run Locally

Howdy, folks!
Awesome resource. I'd love to help with the site and start a meetup.
Have a couple of things I wanted to fix but am still unable to run the site locally with yarn start.

ENTIRE LOG (CLICK TO EXPAND!)
success open and validate gatsby-configs — 0.189 s
success load plugins — 0.284 s
success onPreInit — 0.948 s
success initialize cache — 0.017 s
success copy gatsby files — 0.103 s
success onPreBootstrap — 0.014 s
success source and transform nodes — 0.577 s
success building schema — 0.417 s
success createPages — 0.100 s
success createPagesStatefully — 0.029 s
success onPreExtractQueries — 0.003 s
success update schema — 0.054 s
warning The GraphQL query in the non-page component "/Users/ahmadawais/Documents/Web/Sandbox/awsamplify/src/templates/Event.js" will not be run.
warning The GraphQL query in the non-page component "/Users/ahmadawais/Documents/Web/Sandbox/awsamplify/src/templates/Post.js" will not be run.
Exported queries are only executed for Page components. It's possible you're
trying to create pages in your gatsby-node.js and that's failing for some
reason.

If the failing component(s) is a regular component and not intended to be a page
component, you generally want to use a <StaticQuery> (https://gatsbyjs.org/docs/static-query)
instead of exporting a page query.

If you're more experienced with GraphQL, you can also export GraphQL
fragments from components and compose the fragments in the Page component
query and pass data down into the child component — http://graphql.org/learn/queries/#fragments
success extract queries from components — 0.184 s
success run graphql queries — 7.802 s — 43/43 5.51 queries/second
success write out page data — 0.005 s
success write out redirect data — 0.001 s
Generating image thumbnails [==============================] 422/422 80.6 secs 100%
warning The icon(/Users/ahmadawais/Documents/Web/Sandbox/awsamplify/src/assets/images/icon.png) you provided to 'gatsby-plugin-manifest' is not square.
The icons we generate will be square and for the best results we recommend you provide a square icon.

success onPostBootstrap — 0.431 s

info bootstrap finished - 87.426 s

 ERROR  Failed to compile with 1 errors                                                                                8:41:23 PM

This relative module was not found:

* ../aws-exports in ./src/utilities/track.js
✖ ｢wdm｣:
ERROR in ./src/utilities/track.js
Module not found: Error: Can't resolve '../aws-exports' in '/Users/ahmadawais/Documents/Web/Sandbox/awsamplify/src/utilities'
 @ ./src/utilities/track.js 9:0-39 15:22-31
 @ ./src/utilities/index.js
 @ ./src/templates/Contributor.js
 @ ./.cache/sync-requires.js
 @ ./.cache/app.js
 @ multi event-source-polyfill (webpack)-hot-middleware/client.js?path=/__webpack_hmr&reload=true&overlay=false ./.cache/app
ℹ ｢wdm｣: Failed to compile.

Send halp :)

It the track.js file!

import Amplify, {Analytics} from 'aws-amplify';
- import awsmobile from '~/aws-exports'; // ← This is missing!
import {curry} from 'ramda';

// wiped on page refresh / non-pwa redirects
let configured = false;

const track = curry((name, attributes) => {
  if (!configured) {
    Amplify.configure(awsmobile);
    configured = true;
  }

  Analytics.record({name, attributes});
});

export const internalPageView = props =>
  track('internal page view', {href: props.location.href});
export const externalPageView = href => track('external page view', {href});

This project works using the Amplify CLI. To run a local copy you have to make a copy of the backend. So after cloning the repo you can run these commands:
amplify env add
? Do you want to use an existing environment? No
? Enter a name for the environment mysandbox
// Rest of init steps (around your AWS account)
$ amplify push

This setups up your own backend in AWS and also creates the aws-exports file when it is complete. You can read more about how multi-env works here.

So to work on a simple PR I'll have to create an entire backend in AWS in my personal account? That doesn't feel very nice. Is there a possibility of avoiding all that?

Hi @ahmadawais –– thank you for filing this issue. It’s been fixed. Please let us know if you run into any more trouble.

I can confirm, I am able to run locally without any changes now.
Thank you! 👌


Suppress console.log & others inside the TS Server runtime so that language service plugins don't accidentally use them and kill the server

Fixes #31209 (where most of the discussion is)
This should probably hold till 3.7

@RyanCavanaugh would it be possible to just use a private fd (spawning a process with extra pipes established is pretty easy in node) rather than stdout in most tsserver environments? We already use a socket for events... it should be a change to server.ts to not always make the readline instance from process.stdin and process.stdout.

We chatted about this and the idea of using a private file descriptor for tsserver comms would be a good move, but that requires all tsserver editors making changes to handle that instead of stdin/stdout - so this should be a good enough for now.


ActivityResultLauncher not run when i switch from other fragment

Description of the problem:
This app is for Attendance using barcode. I use firebase on this app.
The app work as intended, i can scan the barcode and save data to firebase.
But the problem is that when i open another Fragment or Activity then back to this Fragment, the scanner dont work as intended. It does open the camera but anything inside ActivityResultLauncher not working.
Closing and reopening the app will fix this until i change to other Fragment or Activity again.
Which library version are you using?
4.3.0
Does the same happen on other devices or an emulator?
Yes, bot emulator and my device.
Can you reproduce the issue in the sample project included with the library? If not, can you
provide your own sample project or sample code that produces this error?
This is the code on my fragment: https://pastebin.com/e7XZN08i
In the case of an error do you have a stack trace or adb logs?
I made some Logs to check on where the progress at.

The same thing is working on the sample application:
https://github.com/journeyapps/zxing-android-embedded/blob/2324a5403e8b89b66631977b357d1b998f1caf7e/sample/src/main/java/example/zxing/MainActivity.java
I'd recommend creating a minimal application that can still reproduce the issue - remove the database and firebase logic, as well as any views not directly relevant to this. Then compare it to the sample application and see where it's different to isolate the cause.

I'd recommend creating a minimal application that can still reproduce the issue - remove the database and firebase logic, as well as any views not directly relevant to this. Then compare it to the sample application and see where it's different to isolate the cause.

It still happen with the minimal application.
ActivityResultLauncher still not running.
I use the same code as above and put some Logs, this is my code: https://pastebin.com/ke9BJkmu
The Logs result is same as before.

My guess is it's something related to the Activity instead of the Fragment. Are you overriding the onActivityResult method in the Activity? That can prevent results from being passed on to the Fragment if it's not done correctly.

You're right about the error in the activity.
There was a code about onActivityResult, i delete it but i still got the error.
So i just do many thing and ended up find what i should do.
 switch (item.getItemId()) {

    case R.id.nav_event:
        fragmentEvent = new FragmentEvent(); //i just need to add this on all case for some reason, the tutorial i use dont do this
        getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, fragmentEvent).commit();
        return true;

Thanks