Optional unwrapping bug when using Release build configuration

I'm having a problem with optionals that only happens when I  run the app using a release configuration. I have two models, Sale and CoreSale, and a Sale contains a CoreSale
class Sale: Object
{
    dynamic var id: String?
    dynamic var coreSale: CoreSale?
    ......
}

class CoreSale: Object
{
    ......
    var soldPrice: RealmOptional<Double> = RealmOptional<Double>()
    ......
}

At a certain point in the code, I fetch a Sale from the database and store the result in a property called _item:
var _item: Sale
However, when I print the following expressions I get very strange results:
print("Sold price: \(_item.coreSale?.soldPrice)")
print("Sold price: \(_item.coreSale!.soldPrice)")
print("Sold price: \(_item.coreSale?.soldPrice.value)")
print("Sold price: \(_item.coreSale!.soldPrice.value)")
print("Sold price: \(_item.coreSale!.soldPrice.value!)")

Results:
Sold price: Optional(RealmSwift.RealmOptional<Swift.Double>)
Sold price: RealmSwift.RealmOptional<Swift.Double>
Sold price: nil
Sold price: Optional(200000.0)
Sold price: 200000.0

The first, second, fourth and fifth prints seem ok to me but the third one should be exactly the same as the fourth. When I run the code using a debug configuration it prints the correct values, but as soon as I change it to release this strange behaviour shows up again. Am I missing something here? Please let me know if any further information is required to figure this out.
Realm framework version: 3.1.1
Realm Object Server version: Not using ROS
Xcode version: Version 9.2 (9C40b)
iOS/OSX version: Simulator running iOS 11.2 (15C107), iPad running iOS 11.2.6 (15D100)
Dependency manager + version: Cocoapods version 1.3.1

Can you please share a complete code snippet that reproduces the problem? It will be difficult for us to investigate this unless we can reproduce it.

Hi @bdash , thanks for the quick response. I created a project that replicates the issue, please clone this repo:
https://github.com/gnrcampos/realmOptionalBug
To replicate it, run the project with a release profile using XCode 9.2. After the first run, the database url will be printed to XCode's console. Open the database using Realm Studio, add a CoreSale with a soldPrice and a Sale that has that CoreSale. Run the app again and observe the console.

Also, I have just downloaded XCode 8 to test it and it works over there.

The problem appears to be that Swift has gotten more aggressive about releasing references to objects mid-statement.
In a release build, the expression _item.coreSale?.soldPrice.value is decomposing to something conceptually like the following:
var soldPrice: RealmOptional<Double>? = nil
autoreleasepool {
    if let coreSale = _item.coreSale {
        soldPrice = coreSale.soldPrice
    }
}
print("\(soldPrice?.value")

The problem with this is that _item.coreSale creates and returns a brand new object which is deallocated at the end of the autoreleasepool block. RealmOptional holds a weak reference to the object which owns it and uses that to obtain the current value on each call to value. This only works if the RealmOptional never outlives the containing object, and if it does it starts to just return nil.
Fixing this will unfortunately have a bit of a performance impact.


Suggestion: Move @angular/* from devDependencies to peerDependencies

I'm submitting a ...
[ ] bug report
[x] feature request
[x] question about the decisions made in the repository

Do you want to request a feature or report a bug?
Feature/improvement

What is the current behavior?
Currently, we're installing multiple versions of angular (when testing with angular 5).

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://plnkr.co or similar.

What is the expected behavior?
We should rely on the @angular/* versions installed in the app.
However, we could and should leave the @angular/cli, @angular/compiler, @angular/compiler-cli,  and @angular/language-service in devDependencies still.

What is the motivation / use case for changing the behavior?
be able to test any @angular@next avoiding conflict issues, such as

ERROR in Error: Metadata version mismatch for module

Please tell us about your environment:

@angular/cli: 1.4.4
node: 8.6.0
os: darwin x64
@angular/animations: 5.0.0-rc.0
@angular/cdk: 2.0.0-beta.11
@angular/common: 5.0.0-rc.0
@angular/compiler: 5.0.0-rc.0
@angular/core: 5.0.0-rc.0
@angular/flex-layout: 2.0.0-beta.9
@angular/forms: 5.0.0-rc.0
@angular/http: 5.0.0-rc.0
@angular/material: 2.0.0-beta.11
@angular/platform-browser: 5.0.0-rc.0
@angular/platform-browser-dynamic: 5.0.0-rc.0
@angular/router: 5.0.0-rc.0
@angular/cli: 1.4.4
@angular/compiler-cli: 4.4.4
@angular/language-service: 4.4.4
typescript: 2.5.3

Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

https://stackoverflow.com/questions/18875674/whats-the-difference-between-dependencies-devdependencies-and-peerdependencies

Implemented in 5.0.1


Fix travis deployment for feature branches

It turns out, changes from feature branches are deployed to master gh pages. This fix should prevent this.

lgtm :shipit:

:+1:

@dehora I think our current zappr configuration only accepts 👍 or :+1:, not other emoticons.

:+1:


Change source of blocks and price from blockchain info

Hi guys,
Since umbrel basically runs all over Tor, would be great if you could use sources via Tor instead of clearnet.
Also I would not use blockchain dot info as it's a hostile bitcoin service, probably infected by chain analysis companies.
I would use the blockstream API instead to fetch information via Tor (https://github.com/Blockstream/esplora/blob/master/API.md). Even better to use the own node bitcoind for blockheight and other blockchain related information. Using another source of truth defeats the purpose to run the own node.

Hi Bitcoinheiro,
Thanks for your feedback, we will start working on this.

I would use the node command: bitcoin-cli getblockchaininfo every 2 minutes to get the blockheight
and bitcoin-cli gettxoutsetinfo every 2 hours to update the supply (since it consumes way more resources to execute)
And use these json for all the blockchain related information to be displayed.
One example of how the raspiblitz project uses this can be found at: https://github.com/rootzoll/raspiblitz/blob/v1.6/home.admin/00infoBlitz.sh
`# Bitcoin blockchain
btc_path=$(command -v ${network}-cli)
if [ -n ${btc_path} ]; then
btc_title=$network
blockchaininfo="$(${network}-cli -datadir=${bitcoin_dir} getblockchaininfo 2>/dev/null)"
if [ ${#blockchaininfo} -gt 0 ]; then
btc_title="${btc_title} (${chain}net)"
# get sync status
block_chain="$(${network}-cli -datadir=${bitcoin_dir} getblockcount 2>/dev/null)"
block_verified="$(echo "${blockchaininfo}" | jq -r '.blocks')"
block_diff=$(expr ${block_chain} - ${block_verified})

progress="$(echo "${blockchaininfo}" | jq -r '.verificationprogress')"
sync_percentage=$(echo $progress | awk '{printf( "%.2f%%", 100 * $1)}')

if [ ${block_diff} -eq 0 ]; then    # fully synced
  sync="OK"
  sync_color="${color_green}"
  sync_behind=" "
elif [ ${block_diff} -eq 1 ]; then   # fully synced
  sync="OK"
  sync_color="${color_green}"
  sync_behind="-1 block"
elif [ ${block_diff} -le 10 ]; then   # <= 2 blocks behind
  sync=""
  sync_color="${color_red}"
  sync_behind="-${block_diff} blocks"
else
  sync=""
  sync_color="${color_red}"
  sync_behind="${sync_percentage}"
fi

# get last known block
last_block="$(${network}-cli -datadir=${bitcoin_dir} getblockcount 2>/dev/null)"
if [ ! -z "${last_block}" ]; then
  btc_line2="${btc_line2} ${color_gray}(block ${last_block})"
fi

# get mem pool transactions
mempool="$(${network}-cli -datadir=${bitcoin_dir} getmempoolinfo 2>/dev/null | jq -r '.size')"

else
btc_line2="${color_red}NOT RUNNING\t\t"
fi
fi`


<color-swatch> Demo link broken

It currently points to https://colorjs.io/elements/color-swatch/, but this 404s.

Thanks!


Bootstrap Select Command Fixes.

Requires https://github.com/ba-st/Willow/pull/35 to be merged on upstream

Coverage remained the same at 100.0% when pulling c20777b6217f52d8979350c633cb5788d600e162 on bselect_fixes into 8a1524542de9d5d9813d9fb9a82efa2198632c46 on master.


python312Packages.vt-py: 0.18.2 -> 0.18.3

Changelog: https://github.com/VirusTotal/vt-py/releases/tag//0.18.3
Description of changes

Things done

Built on platform(s)

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

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

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

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

[ ] Fits CONTRIBUTING.md.

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

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

6 packages built:

ioccheck
ioccheck.dist
python311Packages.vt-py
python311Packages.vt-py.dist
python312Packages.vt-py
python312Packages.vt-py.dist


Unwanted panning when using Touch to define area selection, move/alter area selection, move unanchored items

Version: 0.5.9
ScrollBox seems to steal the pan gesture even when some other control handled (via "mouse" events) the action.

Disabled "Pan" TouchInteraction at ScrollBox GestureManager for now


Error failed to bundle project: error running candle.exe

Describe the bug
Hello. I recently started learning Tauri and ran into a problem. I created a project with "npm create tauri-app@latest" , but for some unknown reason Tauri does not build the project. Here are the logs:
Compiling tauri-app v0.0.0 (C:\Users\xxx\Desktop\test\src-tauri)
 Finished release [optimized] target(s) in 10.36s
     Info Target: x64
  Running candle for "main.wxs"
    Error failed to bundle project: error running candle.exe

Reproduction
GitHub: https://github.com/ManucherKM/tauribuilderror
Expected behavior
Tauri is building the project.
Full tauri info output
[✔] Environment
    - OS: Windows 10.0.19045 X64
    ✔ WebView2: 120.0.2210.133
    ✔ MSVC:
        - Visual Studio Build Tools 2022
        - Visual Studio Community 2022
    ✔ rustc: 1.75.0 (82e1608df 2023-12-21)
    ✔ cargo: 1.75.0 (1d8b05cdd 2023-11-20)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 20.11.0
    - npm: 10.2.4

[-] Packages
    - tauri [RUST]: 1.5.4
    - tauri-build [RUST]: 1.5.1
    - wry [RUST]: 0.24.7
    - tao [RUST]: 0.16.6
    - @tauri-apps/api [NPM]: 1.5.3
    - @tauri-apps/cli [NPM]: 1.5.9

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../dist
    - devPath: http://localhost:1420/
    - framework: React
    - bundler: Vite

Stack trace
No response
Additional context
No response

Hi, could you please re-run the build command with the verbose flag and post the new logs?
npm run tauri build -- --verbose

ah actually no need, i think WiX doesn't like your productName https://github.com/ManucherKM/tauribuilderror/blob/master/src-tauri/tauri.conf.json#L9 - try an actual name instead of a simple dot.

Thank you, it worked for me. It looks like I was trying to name the project according to the directory name by specifying a point when creating the Tauri project, but Tauri didn't understand it.


Factor out AffinityChange#removeWorker

Catches a missing delete this.connectedPeers[worker]; that was causing stale
logs (but not provoking turnip connections) for the even churn peers that do a
graceful unadvertise shutdown.

lgtm.


Conflicting The message has a conflict and will not be included in the ledger.

Great library 👍
Anyone have an idea why that is?
https://explorer.iota.org/mainnet/message/57ccda55ca0f4f0e4ba90c9469cdb4606fc7d829cc92671b036428f4365a35f3

Thx,
Error: "The dust allowance for the address is invalid"
You are trying to send 100i, the dust protection means it must be at least 1mi (1000i)
Join our Discord, if you need some help ;-)
https://github.com/iota-community/iota.php/blob/main/help/100_Troubleshooting.md


[Bug]: Getting error when getting the symbol for a class definition which is defined in a separate module

Description
When I call SemanticModel.symbol(ClassDefinitionNode) I am getting a Bad Sad error. This is happening only when the class is defined in a separate module.
ballerina: Oh no, something really went wrong. Bad. Sad.

We appreciate it if you can report the code that broke Ballerina in
https://github.com/ballerina-platform/ballerina-lang/issues with the
log you get below and your sample code.

We thank you for helping make us better.

[2024-02-14 17:01:36,200] SEVERE {b7a.log.crash} - No value present
java.util.NoSuchElementException: No value present
        at java.base/java.util.Optional.get(Optional.java:143)
        at io.ballerina.compiler.api.impl.BallerinaSemanticModel.getCompilationUnit(BallerinaSemanticModel.java:495)
        at io.ballerina.compiler.api.impl.BallerinaSemanticModel.symbol(BallerinaSemanticModel.java:181)

Steps to Reproduce

Create a Ballerina project
Add a module in the project
Define a simple Ballerina class inside the new module

class Client {}

Try to get the symbol related to this ClassDefinitionNode using the semantic model

Affected Version(s)
Ballerina SwanLake 2201.8.4
OS, DB, other environment details and versions
No response
Related area
-> Compilation
Related issue(s) (optional)
No response
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response

Adding more context to this issue:

I am writing a compiler plugin which visit the syntax tree and when I find a class definition node, I call SemanticModel.symbol(ClassDefinitionNode).
This is happening for both public and non-public class definitions in the modules

After proper investigation to this, I found that: The way we access the semantic model is not correct in the openapi-tools:  https://github.com/ballerina-platform/openapi-tools/blob/e84b6a9f6eaecf7f628fc9ab0a89578f2b5c6c42/ballerina-to-openapi/src/main/java/io/ballerina/openapi/service/mapper/ServiceToOpenAPIMapper.java#L259,
The correct way to find the compiler symbol for the given node is as follows.
Module module = project.currentPackage().module(project.currentPackage().moduleIds().stream().toList().get(1)); // get the `representations` module
DocumentId documentId = module.documentIds().stream().findFirst().get();    // contains only `representations.bal` document
SyntaxTree syntaxTree = module.document(documentId).syntaxTree();   // get the syntax tree of the `representations.bal` document
ModuleMemberDeclarationNode classDefNode = ((ModulePartNode) syntaxTree.rootNode()).members().get(0); // get the class-def node

SemanticModel semanticModel_1 = project.currentPackage().getCompilation().getSemanticModel(module.moduleId());   // initialize semantic model
semanticModel_1.symbol(classDefNode).get();

The reason for this is. The semantic Model is a per-module construct and we should not access semantic APIs using nodes or locations from unmatching modules. @TharmiganK Please check.

However, we are sending a bad sad error since we have let semantic API throw an error if incorrect usage.

Ack. Thanks for the help. I will correct this from openapi-tool side.
Please close this issue once you fix throwing the bad sad error for such scenarios. Better to throw a proper error in this case


add: support G$ single tx

Allow users to join/makedeposit using erc677 transferAndCall

data supplied to transferAndCall should be abi encoded (uint256 minAmount, bool isJoin)
added the onTokenTransfer method which

verify transfer was from inBoundToken
parses the data for minAmount and isJoin
calls _join/_makeDeposit respectively

refactored makeDeposit to use internal _makeDeposit similar to _join

Pinging @fodisi to review


[SPARK-35060][SQL] Group exception messages in sql/types

What changes were proposed in this pull request?
This PR group exception messages in sql/catalyst/src/main/scala/org/apache/spark/sql/types.
Why are the changes needed?
It will largely help with standardization of error messages and its maintenance.
Does this PR introduce any user-facing change?
No. Error messages remain unchanged.
How was this patch tested?
No new tests - pass all original tests to make sure it doesn't break any existing behavior.

Test build #137659 has started for PR 32244 at commit ee008f4.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/42188/

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/42188/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/42188/

Test build #137659 has finished for PR 32244 at commit ee008f4.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/137659/

ping @allisonwang-db

Test build #137759 has started for PR 32244 at commit 9d35442.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/42286/

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/42286/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/42286/

Test build #137759 has finished for PR 32244 at commit 9d35442.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/137759/

Test build #137807 has started for PR 32244 at commit 0513677.

Kubernetes integration test unable to build dist.
exiting with code: 1
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/42337/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/42337/

Test build #137807 has finished for PR 32244 at commit 0513677.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

cc @cloud-fan

thanks, merging to master!

@allisonwang-db Thanks for you review. @cloud-fan Thanks for you work.


Email alias - retype @ removes last .

Type<EMAIL_ADDRESS>set caret before @ and type @ => some.body@mailcom_

Fixed

I still have this issue.


Help

Hello.
how to upload 10.000 nft on opensea, without adding them manually?

Write a smart contract using Solidaty

Off topic, please do some research yourself :)


Series.to_list

Resolves #362

@HyukjinKwon I'm wondering if we add tolist in series.rst because it's not there in pandas doc.

Codecov Report

Merging #379 into master will decrease coverage by 0.08%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #379      +/-   ##
==========================================
- Coverage   94.64%   94.55%   -0.09%
==========================================
  Files          41       41
  Lines        4405     4408       +3
==========================================
- Hits         4169     4168       -1
- Misses        236      240       +4

Impacted Files
Coverage Δ

databricks/koalas/missing/series.py
100% <ø> (ø)
:arrow_up:

databricks/koalas/series.py
93.25% <100%> (+0.05%)
:arrow_up:

databricks/koalas/tests/test_series.py
100% <100%> (ø)
:arrow_up:

databricks/koalas/__init__.py
89.28% <0%> (-3.58%)
:arrow_down:

databricks/koalas/tests/test_indexes.py
93.39% <0%> (-2.84%)
:arrow_down:

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 03304e0...bab14ef. Read the comment docs.

Hm, this one and to_records are actually closer to violate https://github.com/databricks/koalas#guardrails-to-prevent-users-from-shooting-themselves-in-the-foot
Maybe we have to deprecate them or remove in the future. Let me add it for now since we already have to_records

Thanks, @garawalid


Inputs Overhaul

Description

This PR changes the way that inputs work under the hood to allow for finer grained dependency tracking and reactivity based on a 1st party DAG, rather than continuing to leverage Svelte reactivity for input / query updates.
Checklist

[ ] For UI or styling changes, I have added a screenshot or gif showing before & after
[ ] I have added a changeset
[ ] I have added to the docs where applicable
[ ] I have added to the VS Code extension where applicable

Would this PR allow {#each ... to act as sql input? See https://github.com/evidence-dev/evidence/discussions/2636


not support delimeter setting problem

Hi Vive,
Thanks for your sw it is the fastest one i have tried when operate huge around 10million rows xlsx(from stupid datasupplier).
but i noticed it is not suitable for the xlsx file with txt columns, because the default delimeter is ",".
When there is txt with “.”, it brings problems and noticed this from my data handling.
Do you still maintain the project and have time to add the delimeter setting supported like \t?
Thanks!
see here is my comparison:

also when i check the source code.
seems like here is the define for delimeter, but i did not fully understand the code,don't know how to change and use in python-pandas. I am data analyzer, not professional programmer.


Create maricopa.edu

https://www2.maricopa.edu/

please excuse my delay with replying you - the domain is already added, you can apply.


WIP: Automate review app building via Circle

Still work in progress, but PRing for visibility and early feedback.
TODO

[ ] Remove commented out build steps / rebase away 82f1373
[ ] Detect existence of existing review app and update it instead of creating

Warnings

:warning:
The staging version of Metaphysics has breaking changes, this might not affect your build, but could mean your queries don't work the way you expect. See below for breaking changes:

:warning: Field 'artworksByInternalID' was removed from object type 'Query'
:warning: Field 'artworksByInternalID' was removed from object type 'Viewer'

  Generated by :no_entry_sign: dangerJS against 87c1695cc0f0124e2c85a9e11be9f6d5cfe025ce

@izakp Looks like we're running into a permissioning issue with the kubernetes-ci user. Looks like it can't create namespaces:
# Provision the review app
hokusai review_app create $NAME --verbose
Error from server (Forbidden): error when creating "/root/project/hokusai/building-on-circle.yml": namespaces is forbidden: User "kubernetes-ci" cannot create namespaces at the cluster scope
Error from server (NotFound): error when creating "/root/project/hokusai/building-on-circle.yml": namespaces "building-on-circle" not found
Error from server (NotFound): error when creating "/root/project/hokusai/building-on-circle.yml": namespaces "building-on-circle" not found
Error from server (NotFound): error when creating "/root/project/hokusai/building-on-circle.yml": namespaces "building-on-circle" not found
ERROR: Command 'kubectl --context staging --namespace building-on-circle create --save-config -f /root/project/hokusai/building-on-circle.yml' returned non-zero exit status 1

(https://app.circleci.com/pipelines/github/artsy/force/5821/workflows/f73e0681-b889-4dda-9048-0d1351efefff/jobs/42771/parallel-runs/0/steps/0-107)
Would it be possible to allow this user to create namespaces? Thoughts?

cc @damassi for his context

Would it be possible to allow this user to create namespaces? Thoughts?

When we last chatted about this, we were thinking of adjusting how review apps are created so that they all share a common "review-apps" namespace. If that were the case, the kubernetes-ci user could be given access to manage that specific namespace.
In the short-term, we could consider broader namespace access to get over this hurdle.

So cool, this built a Force review app at https://a47e161eb79c611ea976f123b14b93be-1668184118.us-east-1.elb.amazonaws.com/!

Gonna fix the jq error and delete the namespace to see if we can get a totally fresh build

next blocker:
Looks like something about the upgrade to using jinja vars in hokusai/staging.yml broke hokusai review_app setup. I'm able to replicate the error on the circle build locally:
$ hokusai review_app setup foobar
Cannot read source yaml file hokusai/staging.yml.
dl@ip-192-168-1-226:~/src/force (master)
$ git checkout 3ac469c1f33bb3d1c767b9e5d65cfef4268e094a -- hokusai/staging.yml
dl@ip-192-168-1-226:~/src/force * (master)
$ git st
On branch master
Your branch is up to date with 'upstream/master'.

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

	modified:   hokusai/staging.yml

dl@ip-192-168-1-226:~/src/force * (master)
$ git diff
dl@ip-192-168-1-226:~/src/force * (master)
$ git diff --staged
diff --git a/hokusai/staging.yml b/hokusai/staging.yml
index b504dd813..79586db9f 100644
--- a/hokusai/staging.yml
+++ b/hokusai/staging.yml
@@ -121,7 +121,7 @@ metadata:
   name: force-web
   namespace: default
   annotations:
-    service.beta.kubernetes.io/aws-load-balancer-ssl-cert: {{ artsyNetWildcardSSLCert }}
+    service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:iam::585031190124:server-certificate/2018-01-17_artsy-net-wildcard"
     service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "http"
     service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "443"
     service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: "true"
dl@ip-192-168-1-226:~/src/force * (master)
$ hokusai review_app setup foobar
Created hokusai/foobar.yml
dl@ip-192-168-1-226:~/src/force * (master)
$ hokusai version
0.5.8
dl@ip-192-168-1-226:~/src/force * (master)
$ git status
On branch master
Your branch is up to date with 'upstream/master'.

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

	modified:   hokusai/staging.yml

Untracked files:
  (use "git add <file>..." to include in what will be committed)

	hokusai/foobar.yml

dl@ip-192-168-1-226:~/src/force * (master)

TL;DR of the above – soft reverting https://github.com/artsy/force/commit/b25dad646090a2ca7b12bbcc5a87267f6c9908a1#diff-9af8dd47d98e3e7912dadcf50c599d06 results in the review app being set-up able again. Seems like a side-effect of the 0.5.8 upgrade?
cc @eessex @izakp

16 minutes to update an existing review app on Circle:

Duration 16m 20s

https://app.circleci.com/pipelines/github/artsy/force/6320/workflows/fb66b446-66b8-448e-99c6-3e7d4b2e628c/jobs/45512/steps
Gonna delete the review app name and then hopefully time how long it takes to build from scratch.

This is ready for review! Naturally, there is some build flakiness due to I think a Github availability issue (we've seen it before), but previous comments on this PR attest to this working (with links to CircleCI builds).
Assigned myself so that I can handle the rebase and merge, but would love 2+ approved reviews!

Security: I wanted to make sure that this didn't expose any staging infra vectors into our cluster. I opened up this PR as evidence that it does not:
https://github.com/artsy/force/pull/5535
Note: Circle seems to set the branch of a forked PR to pull/#{pr_number}, so no branch triggers get fired:
https://app.circleci.com/pipelines/github/artsy/force/6342/workflows/16384db8-99eb-434b-b2c1-8c3df39225dd
With that said, I might have not exactly replicated this vector and would love some review on that. @joeyAghion as the defacto security DRI, can I have your sign off here?

@dleve123 — i might be a dense here, but how does one see the review app that they created? Noticed there’s no mention of a "check out x url" step anywhere in description above.

Did you consider using a label instead? Haven't thought about it much but that would free this functionality to work on forked PRs and as an after-thought to existing branches. (Now that I think about it, maybe that's too dangerous.)

We discussed labels, but wanted to get any working automation first. And yeah, def don't want to build on forks (see my previous comment). I think having a push for a commit trigger a build results in a nice and easy to see correlation between source code revision <-> docker image <-> running review app as well. Easy to connect the dots.

A follow-up question to this should be: how can we automatically clean up these review apps. If this is successful (and I expect it will be), review apps will be easier to use and we'll tend to have more of them. We're already running into some limitations (that are fixable but still hurdles) like excessive server resources needed in staging and default ELB limits.

I think @izakp discussed some form of a cron job that maybe deletes namspaces (in the staging cluster that haven't been updated) within N number of days). I believe there's an operations cluster that could be used for this? Happy to help think through this!

@dleve123 — i might be a bit dense here, but how does one see the review app that they created? Noticed there’s no mention of a "check out x url" step in description above.

@damassi not dense at all and you raise a good point. When create_or_update_review_app runs so that a review app is created, the last line of the bash script uses jq and interrogates our k8s cluster to output the external hostname of the new review app:
# yeah, I'm talking to you

# you need to configure a CNAME record so that $NAME.artsy.net resolves to" \

# the service's external IP:

#

echo $(kubectl get service force-web --namespace $NAME --context staging -o json \

  | jq .status.loadBalancer.ingress[].hostname)

"aa7f919f090af11ea976f123b14b93be-560250530.us-east-1.elb.amazonaws.com"

#

# you may do this in the Cloudflare interface. Credentials are in 1pass

echo "[build_review_app.sh] SUCCESS"

[build_review_app.sh] SUCCESS

(https://app.circleci.com/pipelines/github/artsy/force/6322/workflows/b81f0c8a-8175-4686-9996-6d933b346fe9/jobs/45522/steps)
It's def a bit burried though, would be cool to have that string surfaced directly in the build. Seems like CircleCI isn't quite yet there yet, but this is something that perhaps we can work into Peril or a Github action? Either way good q.

I see 👍 So in that case, mind updating the shell-script comments that we see in the CI output to instead point at something canonical like our review app docs? Being less familiar with the devops side of things I've gotten hung up on last steps a few times. If the script pointed at these docs, then we would only have to point at one spot as things change through time.

@damassi @anandaroop @dblandin – I believe I addressed all your comments! Gonna merge in a couple of hours unless I hear from ya otherwise.
@damassi Also took the liberty to add to/update the review app docs in https://github.com/artsy/force/pull/5370/commits/6c513b30220bb5d90115dbed04bd7fef61d252b6

Looks great -- thanks again for all your work on this! I feel like the work carved out here around the branching pattern may set us up well for future automation ideas 👍


ensure ui for compliance suggestions is displaying all 100 results

:nut_and_bolt: Description
in https://github.com/chef/automate/pull/1065 we did some work to bump the results returned from the compliance api from 10 -> 100, which worked beautifully.
but when testing the change later, i noticed i was only getting 25 results in the ui, despite the api returning 100.
this fixes that!
:+1: Definition of Done
100 (or as many as available if less than 100) suggestion results returned
:athletic_shoe: Demo Script / Repro Steps
build components/automate-ui
load 100 compliance nodes (or more than 25)
suggest on node name, expect to see more than 25 nodes


Problem with splitChannels

I try to set splitChannels = true to see both channels in my audio files, but I only see flat lines. This example shows what I am after: https://wavesurfer-js.org/examples/
How do I go about to achieve this?
Here is what I've tried:

render() {
	const waveOptions = {
	   splitChannels: true,
           height: 256,
           waveColor: 'darkorange',
	   progressColor: 'purple',
    };
    return (
		<div>
			<button onClick={this.handleTogglePlay} className="btn btn-primary btn-block">
					toggle play
		       </button>
			<Wavesurfer
				  audioFile={"https://wavesurfer-js.org/example/split-channels/stereo.mp3"}
				  pos={this.state.pos}
				  options={waveOptions}
				  onPosChange={this.handlePosChange}
				  playing={this.state.playing}
			/>
		</div>
      );
  }

Have you tried it with version 1.3.1?

I have now, and it has solved the problem, - thanks!
Is there a way to mute one of the channels?

Fixed in 1.3.1.


Zoom to location on mapReady

Status
Pending
Description
Added common code for finding the last known current location of the device.
Handled the passing of the location information into the TweetFeedActivity.
Changelog

Added file LocationFinder.java for aid determining last known location
Refactoring of code in SearchActivity.java to use LocationFinder code
Handling of location finding logic added to TweetFeedActivity

Addresses Issues
Closes #51

Let's maintain a status to each PR. Is this good to go for review?

@srowhani That last commit wasn't supposed to make it in... forgot that I had a PR open when I pushed to my master branch. If that last commit makes it in the map zoom will not work. Gonna get that commit out of here

@srowhani Now we're good

@ermel272, you haven't made any changes after that comment...

@srowhani There was a commit I removed pertaining to the navigation drawer. You may not have seen it


Fixed Italian localization

Fixed Italian localization for the legacy branch.

Will be in next update, if there is one 😁

Just to catch up, it’s also on main?

Just to catch up, it’s also on main?

Yes it is: I updated first the main branch... I thought that was enough but I saw that the recent updates didn't have the new localization for the Italian language so I updated the legacy branch too. I'm not sure this was needed. Do I have to update both branches next time?

So legacy branch is the one used for the App Store until iOS 14 come out of beta. So yeah will need to keep both branches updated for now :)

Ok! No problem! From now on I'll update both branches! Thank you for the clarification!


Proxy more properties

[x] playbackRate (supported in iOS 9+, maybe)
[x] src
[x] currentTime
[x] loop
...

Perhaps I could do a blanket search-and-proxy with Object.keys() but this only works when it's not muted

The most important ones above have been implemented. Suggestions are welcome as new issues


Use klog for logging

There are probably better options, but this works for now (it logs the filename without a path).
Also cleans up go.mod.

@dhaiducek what was the reason for moving to klog?

@dhaiducek what was the reason for moving to klog?

There were other logging statements using klog and when I was doing some testing I ran into a panic because SetLogger() had never been set up with the way we're trying to log currently. klog was the low bar that worked rather than trying to figure out how to wire up controller-runtime with logger, especially since it looked like it was already being used elsewhere, for instance:
https://github.com/open-cluster-management-io/governance-policy-addon-controller/blob/cad8f85d7d49809a718433b96b80421325609ab9/pkg/controllers/complianceapi/reconciler.go#L62
Of course, I could try to implement the same logging flows as our other controllers. I'm not actually sure why that hadn't been done previously though...


Migration 2.2 -> 3.0 document Authorization using IAuthorizationPolicyProvider

I didn't find anyhting in the migration docs for doing Authorization using IAuthorizationPolicyProvider. This interface has a new member now:
public Task<AuthorizationPolicy> GetFallbackPolicyAsync()

I'd be nice to provide a default implementation in the docs that would mimic the 2.2 behaviour of
allowing requests that haven't been matched by MVC or static files:
public Task<AuthorizationPolicy> GetFallbackPolicyAsync()
{
  var bp = new AuthorizationPolicyBuilder();
  bp.RequireAssertion(_ => true);
  return Task.FromResult(bp.Build());
}

Moving to P3, since it's too late for P2.

@blowdart we should move this to a different milestone since this is a doc issue, and not tied to a release

Actually we should probably just close this, since there's a docs issue tracking: https://github.com/aspnet/AspNetCore.Docs/issues/14232


Site coding progress main issue

This issue serves as the main summary reference that holds a list of TO-DOs for big sections or pages in The Coding Train site. It also holds references to internal and external references that relate to the project.
References

Current The Coding Train site
Current content repo for site
Wireframes Figma file
Data Taxonomy
Current visual designs

Language
To be completed by Coding Train team

[x] #56
[x] #72

Content
To be completed by Coding Train team

[x] #88
[x] #87
[ ] #128
[ ] #131
[x] #122
[x] #50
[x] #51
[x] #55
[x] #77
[x] #92
[x] #79
[x] #80

Pages
To be completed by DSI team

[ ] #44
[x] #121
[x] #112
[x] #111
[x] #84
[x] #27
[x] #29
[x] #31
[x] Create tag element in back-end for topics and languages
[x] #26
[x] #28
[x] #30
[x] #109
[x] #76

Other functionality
To be completed by both DSI team and Coding train team

[x] #78
[x] #85
[x] #120
[x] Content structure guide for Coding Train Team
[x] #61
[x] #57
[x] #63
[x] MD/MDX guide loading and page creation
[x] #46
[x] Add share video functionality

After launch

#52
#69
Time of day changes on homepage scene
Sorting tracks
Sorting challenges
Showing multiple featured challenges in challenges/
Passenger Showcase/Contributions gallery
#81
#86

Hi @runemadsen @bravomartin and @fdoflorenzano! As you can see I'm going through all the issues and pull requests today for the website. Nothing here is urgent but I thought I would comment on some of the remaining items on the list here that @fdoflorenzano put together. I'm happy to this "summary" issue be closed and move to specific issue threads to discuss each item if that is preferable.
Tracked in separate issues:

[ ] #128
[ ] #131

Completed?

[ ] #44

For discussion (open new issue?)

Time of day changes on homepage scene
This would be fun to do still! CT team could take it over if you prefer?

Sorting tracks
Discuss in #417?

Sorting challenges
Discuss in #283?

Showing multiple featured challenges in challenges/
I don't feel this is necessary, but happy to discuss!

Passenger Showcase/Contributions gallery
I would LOVE to have a dedicated showcase page for all submissions. How realistic is this to develop? Shall I open a new issue to discuss?

Agree. lets close this issue, and add a new issue for your last item: Creating a showcase page for all submissions.
The rest in your list seem to be reflected in other issues.
In general I think it would be great if CT team takes over, and we will be happy to provide support and help out as needed.


[Enhancement]: To Remove Text-Overlapping

Do you want to have the enhancement of existing game ? 😀 Describe yourself..
Hello, my name is A.A.D.Sailaja. I am a Tech Enthusiastic and i'm looking forward to contribute in open source projects. Here in this project i would like to modify the text that appears on the screen like this as you can see this in the image it is overlapping

Can you please assign me this issue under gssoc'24
Describe the solution you'd like
Solution steps
Select program in which you are contributing
No response
Code of Conduct

[X] I follow CONTRIBUTING GUIDELINE of this project.

I want to work on it .Please assign me


Changes to Livelabs: DB Security - Unified Auditing

WMS ID: 3261
General requirements

Information in the workshop is adequate and updated
Code is correct and working
Links are correct
Make sure you enter the help email link in your manifest.json
Please make sure WMS URLs are updated as needed after your PR is approved

Checklist - Refer to the QA document for the complete list
Please confirm that the following is completed before submitting your PR

[x ] All filenames are lower case (including folders, images, files, etc.)
[ x] Filenames are descriptive
[ x] Your workshop folder structure should be similar to the one used in the sample workshop (https://github.com/oracle-livelabs/common/tree/main/sample-livelabs-templates/sample-workshop)
[x ] Are you using multiple versions (desktop/, sandbox/, tenancy/)? Make sure that each of them contains a manifest.json and an index.html
[x ] Image references in markdown contain an alternate text

These are changes to the DB Security-Unified Auditing Livelab


Add support for Silex framework

Was this fixed by creating https://github.com/bugsnag/bugsnag-silex ?

Looks like it :smile:

Yay :+1:


numpy error while parsing

I'm getting the following error when parsing some PDFs, but not with others. Unfortunately I cannot share the files, but I can share some metadata upon request.
nlm-ingestor  | /usr/local/lib/python3.11/site-packages/numpy/core/fromnumeric.py:3464: RuntimeWarning: Mean of empty slice.
nlm-ingestor  |   return _methods._mean(a, axis=axis, dtype=dtype,
nlm-ingestor  | /usr/local/lib/python3.11/site-packages/numpy/core/_methods.py:192: RuntimeWarning: invalid value encountered in scalar divide
nlm-ingestor  |   ret = ret.dtype.type(ret / rcount)
nlm-ingestor  | /usr/local/lib/python3.11/site-packages/numpy/core/_methods.py:269: RuntimeWarning: Degrees of freedom <= 0 for slice
nlm-ingestor  |   ret = _var(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
nlm-ingestor  | /usr/local/lib/python3.11/site-packages/numpy/core/_methods.py:226: RuntimeWarning: invalid value encountered in divide
nlm-ingestor  |   arrmean = um.true_divide(arrmean, div, out=arrmean,
nlm-ingestor  | /usr/local/lib/python3.11/site-packages/numpy/core/_methods.py:261: RuntimeWarning: invalid value encountered in scalar divide
nlm-ingestor  |   ret = ret.dtype.type(ret / rcount)

Endpoint: http://nlm-ingestor:5001/api/parseDocument?renderFormat=all called through LLMSherpa library
Any suggestion?

This is most likely happening due to some error in the tika side. Is there OCR content in your PDF? If yes, then use applyOCR=yes in arguments. If not, you will need to run the tika server by itself and then use this notebook to https://github.com/nlmatics/nlm-ingestor/blob/main/notebooks/pdf_visual_ingestor_step_by_step.ipynb to debug. Most errors in tika happen due to some issue in character encodings and it will need you to go through the java code in https://github.com/nlmatics/nlm-tika/tree/2.4.1-nlm.
To build tika use:
``` apache-maven-3.9.5/bin/mvn package -Dmaven.test.skip=true -Dcheckstyle.skip

This is most likely happening due to some error in the tika side. Is there OCR content in your PDF? If yes, then use applyOCR=yes in arguments. If not, you will need to run the tika server by itself and then use this notebook to https://github.com/nlmatics/nlm-ingestor/blob/main/notebooks/pdf_visual_ingestor_step_by_step.ipynb to debug. Most errors in tika happen due to some issue in character encodings and it will need you to go through the java code in https://github.com/nlmatics/nlm-tika/tree/2.4.1-nlm.
To build tika use:
``` apache-maven-3.9.5/bin/mvn package -Dmaven.test.skip=true -Dcheckstyle.skip

After some tests I figured out that the problem is becouse of particular fonts used inside the PDF files. What approach could I follow to bypass/solve this?

You will need to setup the java project for nlm-tika and modify this file: https://github.com/nlmatics/nlm-tika/blob/2.4.1-nlm/tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-pdf-module/src/main/java/org/apache/tika/parser/pdf/PDF2XHTML.java
I'd go to line 393 and see what particular character results in this issue. Then find some way to handle that character in sanitizeText. After this you can rebuild and test the jar file generated under tika-server:
/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/bin/java -jar tika-server/tika-server-standard/target/tika-server-standard-2.4.1.jar
Hope this helps, this takes a while to debug. It is rare but does happen every once in a while.

@ansukla thank you so much! Definitely a boring job but it will be useful

Hope this helps, this takes a while to debug. It is rare but does happen every once in a while.

I just noticed that the bug is very frequent. I was having problem even with the Azure hosted version. I don't know what or if something changed over time, but I have very frequent parsing error

@ansukla I did more tests and what I discovered is that

with Figma exported PDFs it doesn't work even if they have just simple text at the center.
tried with particular font (Inter) and Times New Roman and both doesn't work
tried with file with emojis and: (1) it works if created with Google Docs and (2) it doesn't work if exported with Figma
Figma doesn't embed fonts. So I tried to process a Figma-exported with Ghostscript (running gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dEmbedAllFonts=true -sOutputFile=output.pdf -f input.pdf) but it doesn't work either
I also checked that files exported with Figma have a corrupted Xref table. I tried to open the Figma PDF file with Adobe Acrobat and then save the file (so Xref appear to be ok) but it doesn't work

I wasn't able to debug tika-parser but I did all the test that came to my mind. I hope these information could help you fix this problem
Let me know if I can help


Ensure Alby Hub cannot be run twice

@reneaaron do you think a check should be implemented on the same device first with some sort of file lock? this would solve the chance a user runs two desktop versions of Alby Hub. For server versions, this would not happen due to failing to use the same port.
For cross-device, it might need to be something on the Alby account

I was more thinking of a file lock that prevents multiple instances running in the same data dir (which could mess up quite some things iirc)
i was also wondering if that has any implications for the encrypted backups in the account. do we actually know which node id this backup is for? how could a user otherwise know which backup to restore if he has multiple instances running?

Our backup channels event has the hub node ID in it, so this should be ok.
But yeah, there is no file lock at the moment to stop 2 nodes running and using the same data directory.
The problem is if we do not clean up the lock properly (e.g. after some sort of ungraceful shutdown) it could cause the app to never start.

We could implement a file lock just for wails for now - i believe it's only possible here.


react-native link does not link android project dependencies in version 1.4.0.

react-native link does not link android project dependencies in version 1.4.0. Only ios project is linked. In command line:
$ react-native link react-native-maps
rnpm-install info iOS module react-native-maps is already linked

0.14.0 Version... Same problem here. There is no link for Android and i can't make it work =/

when I revert back to react-native-maps: 0.13.1 it works on Android, but not 0.14.0

Same issue. react-native link does not link android project dependencies in version 1.4.0. Only ios project is linked.

Same here, react-native: 0.43 react-native-maps: 0.14

I found the source of the issue and submitted a PR https://github.com/airbnb/react-native-maps/pull/1200 for the fix. Until this gets merged, you can use my fork or update your package.json file in your projects node_modules/react-native-maps/package.json.

I am facing same issue using react-native(0.43.2) and "react-native-maps": "^0.14.0"

@uxman-sherwani  its working

Not working with version 0.15.
@uxman-sherwani your fix made it... Thanks..

Fixed in airbnb#1313


Running into an error on my first attempted use

Good Evening, could you assist me with this error? Hugging face issue?
File "/usr/local/lib/python3.8/dist-packages/diffusers/pipeline_utils.py", line 454, in from_pretrained
config_dict = cls.load_config(
File "/usr/local/lib/python3.8/dist-packages/diffusers/configuration_utils.py", line 363, in load_config
raise EnvironmentError(
OSError: We couldn't connect to 'https://huggingface.co/' to load this model, couldn't find it in the cached files and it looks like  is not the path to a directory containing a model_index.json file.
Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/diffusers/installation#offline-mode'.
Traceback (most recent call last):
File "/usr/local/bin/accelerate", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.8/dist-packages/accelerate/commands/accelerate_cli.py", line 45, in main
args.func(args)
File "/usr/local/lib/python3.8/dist-packages/accelerate/commands/launch.py", line 1104, in launch_command
simple_launcher(args)
File "/usr/local/lib/python3.8/dist-packages/accelerate/commands/launch.py", line 567, in simple_launcher
raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', 'train_network.py', '--v2', '--v_parameterization', '--network_dim=128', '--network_alpha=128',

greetings,
I think you forget to define pretrained model path

greetings,
I think you forget to define pretrained model path

I see, I am not fine tuning but looking to create the first model.  Is the lora dream booth notebook not the correct place to start?

which model? full model or small model like LoRA?
I think you can start with Kohya Trainer, the basic one

Notebook Name
Description
Link

Kohya LoRA Dreambooth
LoRA Training (Dreambooth method)

Kohya LoRA Fine-Tuning
LoRA Training (Fine-tune method)

Kohya Trainer
Native Training

Kohya Dreambooth
Dreambooth Training

Kohya Textual Inversion
Textual Inversion Training
SOON

I was using the top one.  Lora dreambooth.


fix logging (#42)

there was a bug in the library. I added a test and fix.
see #42

@longstone thanks for taking care of that. I revved the version numbers and updated the readme, so I will push the changes in another PR. 👍


examples: Restructure, standardize, and add more

WIP, more to come

Gonna go ahead and rebase/mark this ready to go. We can add more examples as we think of specific cases.

Let's avoid any dependencies except the standard library. Replace log15 with Printf statements, replace spew with Printf statements as well, probably.
Avoid any 'common' library for examples and just copy/paste that code or functions into the relevant examples. We want developers to be able to copy paste our examples anywhere and import our library and go.
Let's get some much simpler examples to start with. Many examples which each highlight one specific feature are often preferable to one kitchen sink example.

here's the simplest example i'm using currently:
package main

import (
	"context"
	"log"
	"net/http"
	"os"

	ngrok "github.com/ngrok/libngrok-go"
)

func main() {
	if err := run(context.Background()); err != nil {
		log.Fatal(err)
	}
}

func run(ctx context.Context) error {
	_, tun, err := ngrok.ConnectAndStartTunnel(ctx,
		ngrok.ConnectOptions().
			WithAuthtoken(os.Getenv("NGROK_AUTHTOKEN")),
		ngrok.HTTPOptions().
			WithDomain("golang-demo.ngrok.io"),
	)
	if err != nil {
		return err
	}
	return http.Serve(tun.AsListener(), http.HandlerFunc(handler))
}

func handler(w http.ResponseWriter, r *http.Request) {
	w.Write([]byte("Hello from ngrok-go!\n"))
}

@inconshreveable

Done! Just a golang.org/x/sync dependency left, but I figure those are "std++" and fairly well accepted.
Aaaand it's gone
There are now four examples: http (your demo more or less), tcp, logging, and ngrok-lite

I rebased it on the "rebrand" branch for now to avoid more name thrashing until more decisions get made.

we discussed further improvements offline, but approved for now and @russorat will take over the next phase of example work


Client keys need to be removed on restart

When a server restart occurs, the keys for the currently connected clients must be deleted

This is happening now.


fix: empty contract data

updates contract data block when there is no greeting
before:

after:

Thanks!


Cody Gray: Watch dreamcast.in

Cody Gray requests the watch of the watch_keyword dreamcast\.in. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

dreamcast\.in has been seen in 0 true positives, 0 false positives, and 0 NAAs.

Approved by Spevacus in Charcoal HQ


incompatibility with shadow copying

the current approach doesn't support shadow copying out of the box, i.e. the native binaries aren't copied to the temporary location and/or aren't discovered.

It would be really awesome if there was a way in PinDllImportLibrary for the user to specify the exact path of the dll when running on windows.
In my environment, I run thick-client windows apps on .Net framework and I use ILMerge to collapse all the assemblies into a single windows exe.
I would like to be able to deploy the libsodium.dll to any path I want on my system, name them whatever they want (like libsodium-x64.dll), and then be able to specify the exact full filename of the proper native dll somewhere before I call the static SodiumLibrary constructor.  I would be good with a new static class with one property for the full filename.  If it is set, then PinDllImportLibrary and LoadLibraryEx would use that, otherwise it would fall back to the existing logic.
Under the right circumstances, this could also be used for shadowcopy on .Net Framework.

While it is trivial to add the capability to provide a custom dll path through an external static property, the dll file name must not differ from what was specified for the DllImport attributes. If the file name differs the only solution will be to copy the given file to a temporary folder with the correct file name and load it from there.

Regarding the core shadow copying issue I just found a blog post about discovering application config files in shadow copying scenarios which probably will yield a usable solution for most cases...
I will attempt to solve this tomorrow...

memo to myself: if we really start copying dlls to temporary locations, we should deeply think about what happens with any transitive dependencies.

Because there is a wide range of deployment variants on windows, I propose to use sane defaults unless the application tells us to do something else. Sane defaults means using the package defaults of copying the binaries to x86 and x64 directories and loading them from there.
Every other scenario (including shadow copying) requires knowledge about the application which is obviously not intrinsically available to the library. Therefore I propose the following "configuration" API which enables application authors to satisfy advanced use cases:
namespace Sodium.Interop
{
  ///
  /// This class can be used on full .net framework on Windows to modify the path
  /// which is used to load the native sodium library. On any other platform or
  /// runtime every method and property of this class will throw a <see cref="System.PlatformNotSupportedException"/>.
  ///
  public static class SodiumRuntimeConfig
  {
    ///
    /// Definitions of different native library load strategies.
    ///
    [Flags]
    public enum LoadStrategyFlags
    {
      /// Use default behaviour.
      None = 0,

      ///
      /// Copy the library from the given path to a temporary directory
      /// and load it from there.
      ///
      CopyToTemporaryDirectory = 1,

      ///
      /// Notifies the loader about the fact that shadow copying took place.
      /// Includes <see cref="CopyToTemporaryDirectory"/>.
      ///
      ShadowCopyWorkaround = 3,

      ///
      /// Instructs the loader to insert the directory "x86" or "x64" as parent of
      /// the filename into the path.
      ///
      InsertArchitectureDirectory = 4,
    }

    ///
    /// The library name used for the dll import attributes.
    ///
    public const string LibraryName = "libsodium";

    /// Returns the path used to load the native sodium library
    /// <exception cref="System.PlatformNotSupportedException">
    /// Thrown when the library was compiled for netstandard or when not on Windows.
    /// </exception>
    public static string LibraryPath { get; }

    ///
    /// Configures the path used to load the native sodium library and locks the specified
    /// file until it is loaded. It is advised to thoroughly read the remarks section.
    ///
    /// <param name="libraryPath">
    /// The path to the library; if the resolved path points to a directory <see cref="LibraryName"/><c> + ".dll"</c> will be appended.
    /// </param>
    /// <param name="flags"></param>
    /// <exception cref="System.ArgumentException">
    /// Thrown when <see cref="LoadStrategyFlags.ShadowCopyWorkaround"/> was specified and
    /// <paramref name="libraryPath"/> is an absolute path.
    /// </exception>
    /// <exception cref="System.ArgumentException">
    /// Thrown when the resolved path points to a file with a different name than <see cref="LibraryName"/>
    /// and <see cref="LoadStrategyFlags.CopyToTemporaryDirectory"/> wasn't specified.
    /// </exception>
    /// <exception cref="System.ArgumentNullException">
    /// Thrown when <paramref name="libraryPath"/> is null.
    /// </exception>
    /// <exception cref="System.ArgumentOutOfRangeException">
    /// Thrown when <paramref name="flags"/> is set to a value not specified in <see cref="LoadStrategyFlags"/>.
    /// </exception>
    /// <exception cref="System.IO.FileNotFoundException">
    /// If the system could not find the library. The inner exception will be set to
    /// whatever <see cref="System.IO.File.Open(string, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare)"/>
    /// initially threw.
    /// </exception>
    /// <exception cref="System.PlatformNotSupportedException">
    /// Thrown when the library was compiled for netstandard or when not on Windows.
    /// </exception>
    /// <remarks>
    /// If a relative path is specified, it will be appended to <see cref="System.AppDomain.BaseDirectory"/>.
    /// If <see cref="LoadStrategyFlags.ShadowCopyWorkaround"/> is specified, reflection will be used to
    /// determine the "original" <c>BaseDirectory</c>.
    ///
    /// If <see cref="LoadStrategyFlags.CopyToTemporaryDirectory"/> is specified, the resolved library
    /// will be copied to a temporary location and the original file will be unlocked immediately after
    /// copying succeeded.
    ///
    /// The usual call in a shadow copying environment would be:
    ///
    /// SodiumRuntimeConfig.ConfiguraLibraryPath(null,
    ///   LoadStrategyFlags.ShadowCopyWorkaround | LoadStrategyFlags.InsertArchitectureDirectory);
    ///
    /// </remarks>
    /// <seealso cref="LoadStrategyFlags"/>
    public static void ConfigureLibraryPath(string libraryPath, LoadStrategyFlags flags);
  }
}

Please note that I deliberately put this class into the Sodium.Interop namespace, so that it doesn't pollute the default library namespace with something that is only useful to a minority of consumers.
Is this a "good" approach?
/cc @adamcaudill
/cc @bitbeans
/cc @ektrah (because you might want to do something similiar)

It's a huge red flag if an Internet-facing process has the privilege to write executable binaries to the file system. It's outright dangerous if the process proceeds to run those binaries. I wouldn't put convenience over security here.

in the read-only scenario, this will definitely work in my use case.
Does this also mean that the 32 and 64-bit libraries will both be called libsodium.dll and will be differentiated by path, rather than the existing libsodium-64.dll convention in libsodium-net once your new native nuget package is deployed?

Is there any update on this?


Adding folder in Workspace can not work with forward slash path

When I use Add folder in Workspace, if I use a forward slash path, LightTable does not open the correct folder.
For example, it works fine with C:\path\to\folder but not with C:/path/to/folder.
I'm using LightTable 0.7.2 with binary version 0.8.6 on Windows 7 64 bit.

We rely on nodejs for file operations and its libraries use backslashes so this behavior is expected


can't find non-host targets?

pipdeptree --version = 2.2.0
I'm trying to make use of this very helpful utility, to
compare/contrast various "non-host" environments i've built using
conda.  i have this simple script:
	condaBase=".../miniconda3/"
	envs="scipy sp2 py39 cvsim"
	for e in scipy sp2 py39 cvsim; do
	# graphviz functionality is not supported when querying non-host python
	# pipdeptree --graph-output png --python $condaBase$e > $e-dep.png
	pipdeptree --json-tree --python $condaBase$e/bin/python > $e-dep.json
	echo $e done
	done

but for some reason pipdeptree doesn't find the python path:
	Traceback (most recent call last):
	File "/Library/Frameworks/Python.framework/Versions/3.10/bin/pipdeptree", line 8, in <module>
	sys.exit(main())
	File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pipdeptree.py", line 833, in main
	result = handle_non_host_target(args)
	File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pipdeptree.py", line 825, in handle_non_host_target
	return subprocess.call(cmd, cwd=cwd)
	File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 345, in call
	with Popen(*popenargs, **kwargs) as p:
	File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 966, in __init__
	self._execute_child(args, executable, preexec_fn, close_fds,
	File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 1842, in _execute_child
	raise child_exception_type(errno_num, err_msg, err_filename)
	FileNotFoundError: [Errno 2] No such file or directory: '.../miniconda3/scipy/bin/python'

This path does exist, i can execute the python using this path, ... Any ideas what's up?

The path printed in the stacktrace looks like a relative path .../miniconda3/scipy/bin/python. May be it's because pipdeptree is trying to resolve the relative path from its own location. Can you please try providing absolute path of the conda environment?

thanks for your help@naiquevin!  pipdeptree is a very handy tool, thanks for your work!
And apologies, my use of the ... ellipsis was just to hide details (user, machine name, etc.).  the script and the trace both do give absolute paths.

That's strange. I am not familiar with conda as such but could it be a permissions issue? Does the user running the script has permissions to execute /fullPathTo/miniconda3/scipy/bin/python?

Closing as no further information was provided.


"ping app"

ping app resolves in ALL containers (on the same host) across stacks to <IP_ADDRESS> (in my setup)
This is true even though, they have no link at all.
Consequently, when trying to link a service by the name app to another service, it fails like a miracle, without warning.
If this is intended behavior, it should be:
a) (prominently) documented
b) blocked in the UI as a protected name
Remember that linking by the generic token app is quite common style.

Rancher	           v0.47.0
Cattle	           v0.115.0
User Interface	   v0.68.0
Rancher Compose	   v0.5.3

Oh, this was such a nasty one. :-1:

Are you on Google Cloud or using their DNS?  We're not actually doing anything, it's not found and sent to the recur see server.  But app. is a TLD (and owned by them) and resolves on their DNS.

My system is:
Rancher Server on Virtualbox with boot2docker on my laptop
Host is RancherOS on bare metal
All is on my local network at home.

I think you are right: I can ping with the same results from RancherOS host. Moving to RancherOS repo...

Google DNS is commonly used at home, and I'm not near a computer but I think it's the default in RancherOS too.

It's just on the rancherOS, the home router has an ISP NS. Nice catch!  wouldn't have been able to identify that in ages... :+1:  Thanks!

However, I wonder if with the recent inflation of TLDs this can arise to an issue of Rancher Server concern as well... just for the record.


test: fix browser tests

#692 broke karma+mocha magic, here is the fix.
(also, no idea why we have it.only in browser tests, it's not supposed to be there, so removing it)

One test still fails, but for unrelated reason (to be fixed in a separate PR).


Helm operator does not create pods for new CR instance after I switch helm-operator from v1.33.0 to v1.34.0

Bug Report

What did you do?

Deploying helm chart CR failed with helm-operator v1.34.0, that CR's pods did not get created at all.
I defined a CRD kong for helm chart Kong, and use helm operator to deploy it, and a watches.yaml is also defined to watch kong.
When deploying, first the helm operator pod is deployed, and then a new CR instance kong/gateway is created so kong CR instance pods should be created accordingly.
In helm operator with v1.33.0, those CR pods are created as expected while in new v1.34.0, those CR pods are NOT created at all. What's more, no new text are logged in helm operator pod log since new CR instance is created.
What did you expect to see?

Those CR's pods are created and running as in helm-operator v1.33.0, and helm operator pod log echo this like below:
kong CR:
# oc get kong
NAME      STATUS
gateway   Deployed

pod list:
# oc get pod
gateway-kong-69dbd4-ffbs8                                     2/2     Running     0             60m
gateway-kong-post-install-resources-n6w9j                     0/1     Completed   0             60m
kong-operator-7c5788dfbc-2hql7                                1/1     Running     0             60m

helm-operator pod log:
{"level":"info","ts":"2024-03-05T05:15:02Z","logger":"cmd","msg":"Version","Go Version":"go1.21.5","GOOS":"linux","GOARCH":"amd64","helm-operator":"v1.33.0-dirty","commit":"542966812906456a8d67cf7284fc6410b104e118"}
{"level":"info","ts":"2024-03-05T05:15:02Z","logger":"cmd","msg":"Environment variable OPERATOR_NAME has been deprecated, use --leader-election-id instead."}
{"level":"info","ts":"2024-03-05T05:15:02Z","logger":"cmd","msg":"Watching single namespace.","Namespace":"katamari"}
2024/03/05 05:15:02 Warning: Dependencies are handled in Chart.yaml since apiVersion "v2". We recommend migrating dependencies to Chart.yaml.
{"level":"info","ts":"2024-03-05T05:15:02Z","logger":"controller-runtime.metrics","msg":"Metrics server is starting to listen","addr":":8080"}
{"level":"info","ts":"2024-03-05T05:15:02Z","logger":"helm.controller","msg":"Watching resource","apiVersion":"management.example.com/v1alpha1","kind":"Kong","reconcilePeriod":"1m0s"}
{"level":"info","ts":"2024-03-05T05:15:02Z","msg":"Starting server","kind":"health probe","addr":"[::]:8081"}
{"level":"info","ts":"2024-03-05T05:15:02Z","msg":"starting server","path":"/metrics","kind":"metrics","addr":"[::]:8080"}
{"level":"info","ts":"2024-03-05T05:15:02Z","msg":"Starting EventSource","controller":"kong-controller","source":"kind source: *unstructured.Unstructured"}
{"level":"info","ts":"2024-03-05T05:15:02Z","msg":"Starting Controller","controller":"kong-controller"}
{"level":"info","ts":"2024-03-05T05:15:02Z","msg":"Starting workers","controller":"kong-controller","worker count":16}
2024/03/05 05:15:05 Warning: Dependencies are handled in Chart.yaml since apiVersion "v2". We recommend migrating dependencies to Chart.yaml.
2024/03/05 05:15:05 warning: cannot overwrite table with non table for kong.proxy.stream (map[])
2024/03/05 05:15:05 warning: cannot overwrite table with non table for kong.proxy.stream (map[])
{"level":"info","ts":"2024-03-05T05:16:55Z","msg":"Starting EventSource","controller":"kong-controller","source":"kind source: *unstructured.Unstructured"}
{"level":"info","ts":"2024-03-05T05:16:55Z","logger":"helm.controller","msg":"Watching dependent resource","ownerApiVersion":"management.example.com/v1alpha1","ownerKind":"Kong","apiVersion":"v1","kind":"ServiceAccount"}
{"level":"info","ts":"2024-03-05T05:16:55Z","msg":"Starting EventSource","controller":"kong-controller","source":"kind source: *unstructured.Unstructured"}
{"level":"info","ts":"2024-03-05T05:16:55Z","logger":"helm.controller","msg":"Watching dependent resource","ownerApiVersion":"management.example.com/v1alpha1","ownerKind":"Kong","apiVersion":"v1","kind":"ConfigMap"}
{"level":"info","ts":"2024-03-05T05:16:55Z","msg":"Starting EventSource","controller":"kong-controller","source":"kind source: *unstructured.Unstructured"}
{"level":"info","ts":"2024-03-05T05:16:55Z","logger":"helm.controller","msg":"Watching dependent resource","ownerApiVersion":"management.example.com/v1alpha1","ownerKind":"Kong","apiVersion":"batch/v1","kind":"CronJob"}
{"level":"info","ts":"2024-03-05T05:16:55Z","msg":"Starting EventSource","controller":"kong-controller","source":"kind source: *unstructured.Unstructured"}
{"level":"info","ts":"2024-03-05T05:16:55Z","logger":"helm.controller","msg":"Watching dependent resource","ownerApiVersion":"management.example.com/v1alpha1","ownerKind":"Kong","apiVersion":"networking.k8s.io/v1","kind":"NetworkPolicy"}
{"level":"info","ts":"2024-03-05T05:16:55Z","msg":"Starting EventSource","controller":"kong-controller","source":"kind source: *unstructured.Unstructured"}
{"level":"info","ts":"2024-03-05T05:16:55Z","logger":"helm.controller","msg":"Watching dependent resource","ownerApiVersion":"management.example.com/v1alpha1","ownerKind":"Kong","apiVersion":"rbac.authorization.k8s.io/v1","kind":"ClusterRole"}
......
......

What did you see instead? Under which circumstances?

No CR pods are created and no new log are dump in helm operator pod log.
kong CR:
# oc get kong
NAME      STATUS
gateway

pod list:
# oc get pod
kong-operator-7c5bc-2hql7                                1/1     Running     0             60m

helm-operator pod log:
{"level":"info","ts":"2024-03-05T06:40:07Z","logger":"cmd","msg":"Version","Go Version":"go1.21.5","GOOS":"linux","GOARCH":"amd64","helm-operator":"v1.34.0-dirty","commit":"4e01bcd726aa8b0e092fcd3ab874961e276f3db3"}
{"level":"info","ts":"2024-03-05T06:40:07Z","logger":"cmd","msg":"Environment variable OPERATOR_NAME has been deprecated, use --leader-election-id instead."}
{"level":"info","ts":"2024-03-05T06:40:07Z","logger":"cmd","msg":"Watching namespaces","namespaces":["kong"]}
2024/03/05 06:40:07 Warning: Dependencies are handled in Chart.yaml since apiVersion "v2". We recommend migrating dependencies to Chart.yaml.
{"level":"info","ts":"2024-03-05T06:40:07Z","logger":"helm.controller","msg":"Watching resource","apiVersion":"management.example.com/v1alpha1","kind":"Kong","reconcilePeriod":"1m0s"}
{"level":"info","ts":"2024-03-05T06:40:07Z","logger":"controller-runtime.metrics","msg":"Starting metrics server"}
{"level":"info","ts":"2024-03-05T06:40:07Z","msg":"starting server","kind":"health probe","addr":"[::]:8081"}
{"level":"info","ts":"2024-03-05T06:40:07Z","logger":"controller-runtime.metrics","msg":"Serving metrics server","bindAddress":":8080","secure":false}
{"level":"info","ts":"2024-03-05T06:40:07Z","msg":"Starting EventSource","controller":"kong-controller","source":"kind source: *unstructured.Unstructured"}
{"level":"info","ts":"2024-03-05T06:40:07Z","msg":"Starting Controller","controller":"kong-controller"}
{"level":"info","ts":"2024-03-05T06:40:07Z","msg":"Starting workers","controller":"kong-controller","worker count":16}

Environment
Operator type:

Kubernetes cluster type:

$ operator-sdk version

$ go version (if language is Go)
go: 1.21.5.

$ kubectl version

oc $v
Client Version: 4.12.18
Kustomize Version: v4.5.7
Server Version: 4.12.47
Kubernetes Version: v1.25.16+5c97f5b

Possible Solution

Additional context

Relates: #6689

@lihongbj 1.34.0's release did not complete fully. Can you try updating to 1.34.1 to see if this resolves your issue?

@acornett21 ,  I have tried with v1.34.1 and the issue is still reproduced with same symptom.

related #6651

relates #6651