Update terragrunt.hcl

Ran Plan for project: main dir: . workspace: default
Show Output
time=2024-10-25T23:07:30Z level=warning msg=No double-slash (//) found in source URL /atlantis-data/repos/italorafaeltavares/Atlantis/26/default/module. Relative paths in downloaded Terraform code may not work.

Initializing the backend...

Initializing provider plugins...
- Finding latest version of hashicorp/null...
- Installing hashicorp/null v3.2.3...
- Installed hashicorp/null v3.2.3 (signed by HashiCorp)

Terraform has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that Terraform can guarantee to make the same selections by default when
you run "terraform init" in the future.

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # null_resource.example will be created
  + resource "null_resource" "example" {
      + id = (known after apply)
    }

  # null_resource.path will be created
  + resource "null_resource" "path" {
      + id = (known after apply)
    }

Plan: 2 to add, 0 to change, 0 to destroy.

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.

:arrow_forward: To apply this plan, comment:atlantis apply -p main

:put_litter_in_its_place: To delete this plan and lock, click here
:repeat: To plan this project again, comment:atlantis plan -p main

Plan: 2 to add, 0 to change, 0 to destroy.

:fast_forward: To apply all unapplied plans from this Pull Request, comment:atlantis apply

:put_litter_in_its_place: To delete all plans and locks from this Pull Request, comment:atlantis unlock

atlantis apply

Ran Apply for 0 projects:

atlantis apply

Ran Apply for 0 projects:

atlantis plan

Ran Plan for project: main dir: . workspace: default
Show Output
time=2024-10-25T23:10:35Z level=warning msg=No double-slash (//) found in source URL /atlantis-data/repos/italorafaeltavares/Atlantis/26/default/module. Relative paths in downloaded Terraform code may not work.

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # null_resource.example will be created
  + resource "null_resource" "example" {
      + id = (known after apply)
    }

  # null_resource.path will be created
  + resource "null_resource" "path" {
      + id = (known after apply)
    }

Plan: 2 to add, 0 to change, 0 to destroy.

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.

:arrow_forward: To apply this plan, comment:atlantis apply -p main

:put_litter_in_its_place: To delete this plan and lock, click here
:repeat: To plan this project again, comment:atlantis plan -p main

Plan: 2 to add, 0 to change, 0 to destroy.

:fast_forward: To apply all unapplied plans from this Pull Request, comment:atlantis apply

:put_litter_in_its_place: To delete all plans and locks from this Pull Request, comment:atlantis unlock

atlantis apply

Ran Apply for 0 projects:

atlantis apply -d . -w default

atlantis apply

Apply Error
the Atlantis working dir is currently locked by another command that is running for this pull request.
Wait until the previous command is complete and try again

Locks and plans deleted for the projects and workspaces modified in this pull request:

dir: . workspace: default

Ran Apply for project: main dir: . workspace: default
Apply Error
Show Output
running "terragrunt apply --terragrunt-working-dir=." in "/atlantis-data/repos/italorafaeltavares/Atlantis/26/default": exit status 1: running "terragrunt apply --terragrunt-working-dir=." in "/atlantis-data/repos/italorafaeltavares/Atlantis/26/default":
time=2024-10-25T23:11:45Z level=warning msg=No double-slash (//) found in source URL /atlantis-data/repos/italorafaeltavares/Atlantis/26/default/module. Relative paths in downloaded Terraform code may not work.

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # null_resource.example will be created
  + resource "null_resource" "example" {
      + id = (known after apply)
    }

  # null_resource.path will be created
  + resource "null_resource" "path" {
      + id = (known after apply)
    }

Plan: 2 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

╷
│ Error: error asking for approval: context canceled
│
│
╵
  Enter a value:
Interrupt received.
Please wait for Terraform to exit or data loss may occur.
Gracefully shutting down...

time=2024-10-25T23:17:55Z level=error msg=Terraform invocation failed in /atlantis-data/repos/italorafaeltavares/Atlantis/26/default/.terragrunt-cache/xB9AW5naicA9kyJsO9kuITtqnSw/tbQ8Vots0tUHccbxOGgFm8VTxMo prefix=[.]
time=2024-10-25T23:17:55Z level=error msg=1 error occurred:
	* [/atlantis-data/repos/italorafaeltavares/Atlantis/26/default/.terragrunt-cache/xB9AW5naicA9kyJsO9kuITtqnSw/tbQ8Vots0tUHccbxOGgFm8VTxMo] exit status 1


Migrated Properties to Single class

Adding custom fields to a modifier is not very clear with Jetpack Compose yet. Also, sending rating bar properties to composables like Row may be in violation of certain programming principles. Hence, I created a class similar to that of Modifier that encapsulates the different configurations of the RatingBar composable.

This is in reference to Issue #14

I have implemented the state hoisting pattern in the composable function

Hi @cybercoder-naj  I will be pushing a release with compose version update to 1.0.5. afterward, I will merge and plan to release this PR.

Hey @a914-gowtham I am already using compose version 1.0.5 for this project.

@cybercoder-naj this PR has breaking changes for existing library users. so, releasing a separate build for compose version update would be a good idea.

@cybercoder-naj  Thanks once again


EVP_DigestSignFinal: *siglen should not be read if sigret == NULL

This fixes small regression from #16962.
As reported by @jwalch in https://github.com/openssl/openssl/commit/182cc644b3a3690bddfecba925486fefa421d6ec#commitcomment-63342825

This pull request is ready to merge

Merged to 3.0 and master branches. Thank you for the reviews.


google_grpc: add a runtime flag to disable TLSv1.3

Change-Id: Id88723a81d4b1586bf12be6f4dc7a81ae7b0d9c4
Commit Message: Adds a temporary runtime flag to disable TLSv1.3 by gRPC SDK until a proper xDS extension can be added.
Additional Description:
Risk Level: low, default false
Testing: regression

pin myself here @stevenzzzz

@yanavlasov This is now complete. Added a test to verify that the connection is closed before the request is cancelled. There is no direct hook to check for a handshake failure:

Downstream TLS transport socket does not signal a handshake failure in any way except closing.
Google gRPC has infinite retries somewhere and does not respect the request timeout because it is translated to gRPC deadlines which only start when a request starts.

Both are valid issues, but cannot be fixed in this PR with a limited scope.

The test failure is real - it appears google_grpc calls do return failures sometimes, but I'm not sure why that doesn't happen locally to me.

/wait

The grpc TLS API usage LGTM
cc @matthewstevenson88

I think I deflaked it, since it passes bazel test --config=clang test/common/grpc:grpc_client_integration_test --test_arg="-l trace" --test_arg="--gtest_filter=SslIpVersionsClientType/GrpcSslClientIntegrationTest.BasicSslRequestHandshakeFailure/IPv4_GoogleGrpc" --runs_per_test=1000

Build failure seems legit: https://source.cloud.google.com/results/invocations/9c6a93e0-adaf-4ba6-8faa-8bbcd7a40c99
Note this is compile_time_options build.

/wait

@RyanTheOptimist Yan suggested to assign this to you since he's out this week.

@htuch We should follow-up with that. We need this for backporting - we have 5 versions of Envoy in use and cannot possibly backport xDS additions. Also, GoogleGrpcService is part of Wasm ABI - that complicates things further.

What's the game plan for flipping this?  It has no TODO / tracking issue

@alyssawilk Good question. I believe the game plan is to extend/refresh google_grpc xDS definition to capture the latest changes to gRPC SDK, such as ability to control TLS version, certificate providers, and what not. We did not do it at the time because it is difficult to pick up xDS changes.

@markdroth - since you are both xDS and gRPC shepherd.

Can you find someone willing to take this and add a TODO, or take it on yourself?  Or make it a non-feature-flag runtime opttion
As documented at the top of runtime_guards these are for transient features and it sounds like we're not sure of this one

@markdroth Can you give some guidance from xDS angle - do we need to extend google_grpc xDS stub to support full gRPC TLS configuration? How are certificate frameworks supposed to interop between gRPC and Envoy?

I discussed this with @kyessenov on slack last week.  Fleshing out what we discussed there a bit, I think we have the following options:

Configure gRPC to use xDS itself, in which case it will establish its own connection to the control plane and request its own config, just as it would if it were running outside of Envoy.  To do this, we'd need to configure the gRPC xDS bootstrap in Envoy's environment so that the gRPC xDS client can function.  The down-side of this approach is the independent communication with the control plane from the rest of Envoy.
Configure gRPC using TlsCredentials with the FileWatcherCertificateProvider.  The main thing that would be needed here would be to to represent the cert provider configuration in the GoogleGrpc config somehow.  The one significant down-side of directly configuring the cert provider here is that this nullifies the main benefit of the cert provider API, which is that details like the local paths to read the certs from are configured in the bootstrap instead of being sent by the control plane.  (In gRPC's xDS code, the cert provider configuration is in the bootstrap file under a particular instance name, and the control plane just tells the client which cert provider instance to use, which means that control plane doesn't need to know deployment-specific details like how the cert provider is configured.  But in this option, we would be encoding the cert provider config in the GoogleGrpc message that is sent from the control plane.)
Add a mechanism in Envoy GoogleGrpc that uses Envoy code to get the certs and then passes them to gRPC.  There are two main ways we could inject the certs into gRPC: we could write them to the local filesystem and then configure TlsCredentials to read those files, or we could inject them into TlsCredentials via a StaticDataCertificateProvider.  (The latter doesn't currently have the capability to update the cert dynamically after the initial creation of the gRPC channel, but we could provide an API to do that on the gRPC side if needed.)  The main down-side of this approach is that it would be tricky for this configuration to be something that gRPC itself could use if/when we need to support GoogleGrpc messages in the future.
As a variant of the option (3), we could add support for cert provider instances to Envoy's bootstrap, and then add configuration in GoogleGrpc to refer to those cert provider instances.  This would be more consistent with how cert providers are really expected to be configured in gRPC (i.e., the control plane would not need to send local paths), and it would also give us a nice path forward to eventually adding cert provider support more broadly in Envoy (i.e., supporting it in the TLS transport socket, just like gRPC does).  It would also be completely consistent with how gRPC itself would want to use the GoogleGrpc message, if/when we need to do that in the future.

I think option 4 is the most appealling of these options.

for (1) I don't know why we'd want to use the google-grpc xds fetch - it feel like as with any other envoy extension point, we could have Envoy config to do an xDS fetch of "arbitrary" (in this case bootstrap) config which would be handed to the gRPC client to do what it wills with.
For any of 1-4, do we have anyone planning to work on it or plausible line items in some team's 2025 roadmap?  If not I'd like to understand where this knob is used (I assume google3?) and suggest we replace the existing runtime guard (designed for transient features only) to a boolean runtime field (which can hang around indefinitely until the feature is handled)

@alyssawilk I will take the task to move it to the boolean field. This is used everywhere except google3 for Istio/CSM in FIPS mode, since boringssl cannot use TLSv1.3 in FIPS mode for the certified builds.

excellent thanks - I was a bit wary to move it myself as I didn't want to break whoever depended on it :-)


scalafmt: 3.7.7 -> 3.7.8

Description of changes
https://github.com/scalameta/scalafmt/releases/tag/v3.7.8

Things done

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

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

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

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

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 242770 run on aarch64-darwin 1

1 package built:

scalafmt


remove tappedInfoBubble helper

The type of this PR is: Enhancement

Description
Removing the use of tappedInfoBubble helper.

PR Checklist (tick all before merging)

[x] I have included screenshots or videos to illustrate my changes, or I have not changed anything that impacts the UI.
[x] I have tested my changes on iOS and Android.
[x] I have added tests for my changes, or my changes don't require testing, or I have included a link to a separate Jira ticket covering the tests.
[x] I have added a feature flag, or my changes don't require a feature flag. (How do I add one?)
[x] I have documented any follow-up work that this PR will require, or it does not require any.
[x] I have added an app state migration, or my changes do not require one. (What are migrations?)
[x] I have added a changelog entry below or my changes do not require one.

Changelog updates
Changelog updates

Cross-platform user-facing changes

iOS user-facing changes

Android user-facing changes

Dev changes

removing the use of a cohesion helper - pavlos

This PR contains the following changes:

Dev changes (removing the use of a cohesion helper - pavlos)

  Generated by :no_entry_sign: dangerJS against 824d71febb30b4ff4c42b8b6bfbc7cd863ed172c


Port tests from apple/swift

@rxwei This is part of the move to swift-apis discussed in tensorflow/swift-apis#109.
swift build works fine, but swift test gives the following error on my machine:
[1/1] Linking DeepLearningPackageTests
2019-05-28 11:23:47.051 xctest[14729:19108935] The bundle “DeepLearningPackageTests.xctest” couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle.
2019-05-28 11:23:47.051 xctest[14729:19108935] (dlopen_preflight(/Users/eaplatanios/Development/GitHub/swift-apis-temp/.build/x86_64-apple-macosx/debug/DeepLearningPackageTests.xctest/Contents/MacOS/DeepLearningPackageTests): Library not loaded: /usr/lib/swift/libswiftTensorFlow.dylib
  Referenced from: /Users/eaplatanios/Development/GitHub/swift-apis-temp/.build/x86_64-apple-macosx/debug/DeepLearningPackageTests.xctest/Contents/MacOS/DeepLearningPackageTests
  Reason: image not found)

Adding -Xlinker -ltensorflow does not resolve this.

I think this is because of Xcode 10.2+. The Swift runtime linker search path got changed from the toolchain directory to /usr/lib/swift since Swift got ABI stability.

That's weird because I'm not using Xcode at all for this. I'm. using swiftenv though and I'm not sure how that might affect this. I'll look into this tonight. In the meantime, could you try and run the CI tests and see if those pass?

This happens even when Xcode is not being used directly. I haven't looked into the problem yet. A workaround is to xcode-select to Xcode 10.1 before running swift test.

It seems that at some point some process copies libraries over to /usr/lib/swift, but libswiftTensorFlow.dylib and libswiftPython.dylib are not copied. Do you know when the copy is performed and by whom? This may help me figure out how to include the missing binaries. In the meantime, I will try using xcode-select as you suggested.

Using xcode-select -switch ~/Downloads/Xcode.app/Contents/Developer were ~/Downloads/Xcode.app has version 10.1 did not resolve this. I could manually copy the missing libraries to /usr/lib/swift as a temporary solution, but I would still not know if the existing ones there are updated.

I see. I'm not sure copying TensorFlow libraries is ideal because /usr/lib/swift/ is supposed to contain the system Swift runtime, not ones that come from custom toolchains.
You could also try setting the linker path manually.
swift test -Xlinker -ltensorflow -Xlinker -L<path to usr/lib in your S4TF toolchain>

I tried that, but it also doesn't work. I think it's because the path /usr/lib/swift/libswiftTensorFlow.dylib is hardcoded. The exact command I tried was:
swift test -Xlinker -ltensorflow -Xlinker -lswiftTensorFlow -Xlinker -L/Library/Developer/Toolchains/swift-tensorflow-LOCAL-2019-05-27-a.xctoolchain/usr/lib/swift/macosx

and I have verified that this directory contains the missing libraries.

Hmm I'm not sure at this point. libtensorflow.so and libtensorflow_framework.so shouldn't be treated as an ABI stable system library and thus the compile shouldn't be hard-coded to link against things in /usr/lib. @bgogul Are you able to look into this?
I'll trigger CI tests now since CI runs on Linux without the linking problem.

Sounds good. Note that this error is not about libtensorflow.so and libtensorflow_framework.so, but rather about libswiftTensorFlow.dylib and libswiftPython.dylib.

It seems that at some point some process copies libraries over to /usr/lib/swift, but libswiftTensorFlow.dylib and libswiftPython.dylib are not copied. Do you know when the copy is performed and by whom?

@eaplatanios, I believe they are done at these places:  build-script-impl:2580 and build-script-impl:3973.
IIRC, you made some changes to that part of the code as well.

@eaplatanios, I believe they are done at these places: build-script-impl:2580 and build-script-impl:3973.
IIRC, you made some changes to that part of the code as well.

This only copies libtensorflow.so and libtensorflow_framework.so to the lib directory of that toolchain, which works fine. The issue is with copying (or symlinking) libswiftTensorFlow.dylib and libswiftPython.dylib in /usr/lib/swift, but I'm not sure where that happens.
Another solution would be to link to them differently. My impression is that all stdlib shared libraries get their rpath set to /usr/lib/swift somewhere, which messes up with the S4TF libraries that are not being copied there.

I don't really understand why this is failing. It seems to not be compiling at all some of the files under the Layers subdirectory.

@rxwei This does not depend on the latest changes to apple/swift so I tried testing locally with a previously built toolchain and all tests pass. I don't know what causes the failure on the CI although it seems to be completely ignoring some of the source files in the Layers subdirectory.

Testing it locally.

I have the same problem locally. Looks like layers are not being compiled.

It's weird that this only happens for Linux and not MacOS.

It's happening on macOS when I test it locally.

I'm using a toolchain built from apple/swift#24452 (my last built toolchain), but this should not cause issues. Why do you think this happens?

I figured why. This was because #102 checked in some files that end with .Swift instead of .swift. Fixing them now.

I figured why. This was because #102 checked in some files that end with .Swift instead of .swift. Fixing them now.

Oh good catch! Thanks.

@rxwei I'm extremely sorry. I thought I had rectified all those errors.

@rxwei I'm extremely sorry. I thought I had rectified all those errors.

No worries at all!

No worries @Shashi456. @rxwei I can rename the files as part of this PR and rerun the tests if this helps.

I'm checking in a commit in a minute to fix this.

Done in https://github.com/tensorflow/swift-apis/commit/be05f0b081f6a747c016dcf97d29f233f75cf24d.

Merged. Running tests now. :)

Sigh, the APFS file system is still case-insensitive by default...

Sigh, the APFS file system is still case-insensitive by default...

That explains things. I also couldn't make a git commit for the name change actually and was wondering why that is.

This passes tests so I'll move on to fixing #137.


How to localize Placeholder text?

We have ability to translate the [DisplayName("SomeText")].
How can we translate the [Placeholder("SomeText")] text?
Is there anything I am missing?

Sorry. It works with the local text key.
[Placeholder("Some.Local.Text.Key")]


Open API to support job creation from outside system

the outside system can use these api to maintain their jobs without doing that in console
these api also can support batch job maybe

Create in 2.0.7. Batch will implement later.

API spec can be found here: https://github.com/vipshop/Saturn/wiki/Saturn-Console-Rest-Api


DIRECTORY_PATH not working with gitlab-ci and kubernetes runner // Relative path in requirements.in

I am setting up dependabot on a private gitlab instance by using dependabot-script.
It works great for some flat python project, having one module and one requirements.txt in its root.
The problem repository has some other structure, like
README.MD
frontend/
backend/
backend/requirements.in
backend/module1
backend/module2
...

When running it just llike the working scheduled pipeline, i end up with this error:
$ bundle exec ruby ./generic-update-script.rb
 NOTE: Inheriting Faraday::Error::ClientError is deprecated; use Faraday::ClientError instead. It will be removed in or after version 1.0
 Faraday::Error::ClientError.inherited called from /builds/myProjectNameSpace/dependabot-script/vendor/ruby/2.6.0/gems/octokit-4.14.0/lib/octokit/middleware/follow_redirects.rb:14.
 /builds/myProjectNameSpace/dependabot-script/vendor/ruby/2.6.0/gems/dependabot-python-0.113.28/lib/dependabot/python/file_fetcher.rb:274:in `path_setup_files': The following path based dependencies could not be retrieved: file:./module1/setup.py, file:./module2/setup.py, (Dependabot::PathDependenciesNotReachable)
 	from /builds/myProjectNameSpace/dependabot-script/vendor/ruby/2.6.0/gems/dependabot-python-0.113.28/lib/dependabot/python/file_fetcher.rb:50:in `fetch_files'
 	from /builds/myProjectNameSpace/dependabot-script/vendor/ruby/2.6.0/gems/dependabot-common-0.113.28/lib/dependabot/file_fetchers/base.rb:55:in `files'
 	from ./generic-update-script.rb:115:in `<main>'
 Fetching pip dependency files for  #myProjectNameSpace/myProject

Package manage/ecosystem
pip-compile
Manifest contents prior to update
requirements.in
-e module1[test]
-e module2[test]

Sadly usind DIRECTORY_PATH=backend/ does not work. Now there is no file found to proceed.
What am i missing out?

Update
Tried it w/ a ember.js repo, that also has the main code inside a subdirectory. DIRECTORY_PATH did the trick here, fine.

👋 Sorry for the slow reply.
Gitlab support is very much community driven. If you are able to identify a bug, we're happy to review a PR, or if it's an issue that affects all all dependabot users, not just gitlab users, we can potentially help resolve it.
Given the description, this looks like a config/setup problem, not a depenedabot-core problem. Espeically since you added an update indicating that you seemed to have figured it out. So I'm going to close this.


Custom huber loss in LightGBM

How you are using LightGBM?

LightGBM component:
Environment info

Operating System: Windows 10
CPU/GPU model: NVIDIA 1060
C++ compiler version: Visual Studio 2019
CMake version: 3.17.2
Java version:
Python version: 3.7
R version:
Other:

LightGBM version or commit hash: <IP_ADDRESS>
Error message and / or logs

Reproducible example(s)
import numpy as np
import pandas as pd
import sklearn
from sklearn import *
import lightgbm as lgbm

np.random.seed(0)

df = sklearn.datasets.make_regression(10000)

X, y = df[0], df[1]
X_train, X_valid, y_train, y_valid = sklearn.model_selection.train_test_split(X, y, test_size=.25)

X_train_lgbm = lgbm.Dataset(
    data=X_train,
    label=y_train,
    reference=None,
    weight=None,
    group=None,
    init_score=None,
    silent=False,
    feature_name='auto',
    categorical_feature='auto',
    params=None,
    free_raw_data=False,
)

X_valid_lgbm = lgbm.Dataset(
    data=X_valid,
    label=y_valid,
    reference=None,
    weight=None,
    group=None,
    init_score=None,
    silent=False,
    feature_name='auto',
    categorical_feature='auto',
    params=None,
    free_raw_data=False,
)

params = {
    'objective': 'mse',
    'metric': {''},
    'learning_rate': .1,
}

model = lgbm.train(
    params=params,
    train_set=X_train_lgbm,
    num_boost_round=1000,
    valid_sets=[X_train_lgbm, X_valid_lgbm, ],
    valid_names=None,
    fobj=None,
    feval=None,
    init_model=None,
    # feature_name='auto',
    # categorical_feature='auto',
    early_stopping_rounds=100,
    evals_result=None,
    verbose_eval=100,
    learning_rates=None,
    keep_training_booster=False,
    callbacks=None,
)

def mse_custom_train(preds, data):

    y_true = data.get_label()
    y_pred = preds
    residual = (y_true - y_pred).astype("float")

    grad = np.where(residual < 0, -1. * residual, -1. * residual)
    hess = np.where(residual < 0, 1. * 1., 1. * 1.)

    return grad, hess

def mse_custom_eval(preds, data):

    y_true = data.get_label()
    y_pred = preds
    residual = (y_true - y_pred).astype("float")
    loss = np.where(residual < 0, (residual**2) * 1., (residual ** 2) * 1.)

    return "mse_custom", np.mean(loss), False

params = {
    'objective': 'mse',
    'metric': {''},
    'learning_rate': .1,
}

model = lgbm.train(
    params=params,
    train_set=X_train_lgbm,
    num_boost_round=1000,
    valid_sets=[X_train_lgbm, X_valid_lgbm, ],
    valid_names=None,
    fobj=mse_custom_train,
    feval=mse_custom_eval,
    init_model=None,
    # feature_name='auto',
    # categorical_feature='auto',
    early_stopping_rounds=100,
    evals_result=None,
    verbose_eval=100,
    learning_rates=None,
    keep_training_booster=False,
    callbacks=None,
)

Steps to reproduce

Install any LightGBM version in your environment
Run code above
Done

I've been looking for my own train and valid loss functions based on my job task and unfortunatelly couldn't reproduce LightGBM 'huber' objective and 'huber' metric functions by my own code.
You can find that fitting LightGBM model on soure 'mse' loss function and 'mse' metric gives exactly same results as my own code in the end of script above (mse_custom_train and mse_custom_eval functions are used as argumets for fobj nad feval arguments).
I've been trying to reproduce huber objective and huber metric for evaluation and didn't get correct resulsts.
params = {
    'objective': 'huber',
    'metric': {''},
    'learning_rate': .1,
    'alpha': .9,
}

model = lgbm.train(
    params=params,
    train_set=X_train_lgbm,
    num_boost_round=1000,
    valid_sets=[X_train_lgbm, X_valid_lgbm, ],
    valid_names=None,
    fobj=None,
    feval=None,
    init_model=None,
    # feature_name='auto',
    # categorical_feature='auto',
    early_stopping_rounds=100,
    evals_result=None,
    verbose_eval=100,
    learning_rates=None,
    keep_training_booster=False,
    callbacks=None,
)

def huber_custom_train(preds, data):

    y_true = data.get_label()
    y_pred = preds
    residual = (y_true - y_pred).astype("float")

    h = .9
    scale = 1 + (residual / h) ** 2
    scale_sqrt = np.sqrt(scale)

    grad = residual / scale_sqrt
    hess = 1 / scale / scale_sqrt

    return grad, hess

def huber_custom_eval(preds, data):

    y_true = data.get_label()
    y_pred = preds
    residual = (y_true - y_pred).astype("float")
    h = .9
    loss = np.where(np.abs(residual) < h , .5 * ((residual) ** 2), h * np.abs(residual) - .5 * (h ** 2))

    return "huber_custom", np.sum(loss), False

params = {
    'objective': 'mse',
    'metric': {''},
    'learning_rate': .1,
    'alpha': .9,
}

model = lgbm.train(
    params=params,
    train_set=X_train_lgbm,
    num_boost_round=1000,
    valid_sets=[X_train_lgbm, X_valid_lgbm, ],
    valid_names=None,
    fobj=huber_custom_train,
    feval=huber_custom_eval,
    init_model=None,
    # feature_name='auto',
    # categorical_feature='auto',
    early_stopping_rounds=100,
    evals_result=None,
    verbose_eval=100,
    learning_rates=None,
    keep_training_booster=False,
    callbacks=None,
)

Main reason that I've been developing my own custom train and valid loss is finding asymetric loss function for giving more penatly to underpredicted values.
Could you please help with this?
Thank you!

It seems your implementation is different with LightGBM:
https://github.com/microsoft/LightGBM/blob/da6c6ea3c92e6c53e1bdf8f1b2bf243cad8b034d/src/objective/regression_objective.hpp#L310-L335

It seems your implementation is different with LightGBM:
https://github.com/microsoft/LightGBM/blob/da6c6ea3c92e6c53e1bdf8f1b2bf243cad8b034d/src/objective/regression_objective.hpp#L310-L335

Thanks for your reply.
I've changed code according Lightgbm c++ source.
I't getting closer to default 'huber' objective, where am I getting still wrong?
def huber_custom_train(preds, data):

    y_true = data.get_label()
    y_pred = preds
    residual = (y_true - y_pred).astype("float")

    alpha = .9

    grad = np.where(residual <= alpha, residual, residual * alpha)
    hess = np.where(residual < 0, 1. * 1., 1. * 1.)

    return grad, hess

def huber_custom_eval(preds, data):

    y_true = data.get_label()
    y_pred = preds
    residual = (y_true - y_pred).astype("float")
    alpha = .9
    loss = np.where(np.abs(residual) <= alpha , .5 * ((residual) ** 2), alpha * np.abs(residual) - .5 * (alpha ** 2))

    return "huber_custom", np.mean(loss), False

params = {
    'objective': 'huber',
    'metric': {''},
    'learning_rate': .1,
    'alpha': .9,
}

model = lgbm.train(
    params=params,
    train_set=X_train_lgbm,
    num_boost_round=1000,
    valid_sets=[X_train_lgbm, X_valid_lgbm, ],
    valid_names=None,
    fobj=huber_custom_train,
    feval=huber_custom_eval,
    init_model=None,
    # feature_name='auto',
    # categorical_feature='auto',
    early_stopping_rounds=100,
    evals_result=None,
    verbose_eval=100,
    learning_rates=None,
    keep_training_booster=False,
    callbacks=None,
)

In lgb ’diff = score[i] - label_[i]; ‘, and you seems use y_true - y_pred.

In lgb diff = score[i] - label_[i]; , and you seems use y_true - y_pred.

Tried this approach but still can't get same results.
def huber_custom_train(preds, data):

    y_true = data.get_label()
    y_pred = preds
    residual = (y_pred - y_true).astype("float")

    alpha = .9

    grad = np.where(residual <= alpha, residual, residual * alpha)
    hess = np.where(residual < 0, 1. * 1., 1. * 1.)

    return grad, hess

def huber_custom_eval(preds, data):

    y_true = data.get_label()
    y_pred = preds
    residual = (y_pred - y_true).astype("float")
    alpha = .9
    loss = np.where(np.abs(residual) <= alpha , .5 * ((residual) ** 2), alpha * np.abs(residual) - .5 * (alpha ** 2))

    return "huber_custom", np.mean(loss), False

params = {
    'objective': 'huber',
    'metric': {''},
    'learning_rate': .1,
    'alpha': .9,
}

model = lgbm.train(
    params=params,
    train_set=X_train_lgbm,
    num_boost_round=1000,
    valid_sets=[X_train_lgbm, X_valid_lgbm, ],
    valid_names=None,
    fobj=huber_custom_train,
    feval=huber_custom_eval,
    init_model=None,
    # feature_name='auto',
    # categorical_feature='auto',
    early_stopping_rounds=100,
    evals_result=None,
    verbose_eval=100,
    learning_rates=None,
    keep_training_booster=False,
    callbacks=None,
)

by default, the huber loss is boosted from average label, you can set boost_from_average=false for lightgbm built-in huber loss.

Unfortunatelly it didn't help.

I mean set  boost_from_average=false to  lightgbm built-in huber loss, not your custom loss.

It's getting closer.
params = {
    'objective': 'huber',
    'metric': {''},
    'learning_rate': .1,
    'alpha': .9,
    'boost_from_average': False,
}

model = lgbm.train(
    params=params,
    train_set=X_train_lgbm,
    num_boost_round=100000,
    valid_sets=[X_train_lgbm, X_valid_lgbm, ],
    valid_names=None,
    fobj=None,
    feval=None,
    init_model=None,
    # feature_name='auto',
    # categorical_feature='auto',
    early_stopping_rounds=100,
    evals_result=None,
    verbose_eval=100,
    learning_rates=None,
    keep_training_booster=False,
    callbacks=None,
)

What else can I do?

I think your customed eval is different with LightGBM built-in one.
https://github.com/microsoft/LightGBM/blob/e9f51698ebfa80cb32c8e6cca72fad76b3a36da5/src/metric/regression_metric.hpp#L191-L198

So what more shoud I do to get identical results with custom huber loss function and eval?

can you try to use custom huber objective + built-in huber metric, and built-in huber objective + customer huber metric?
This can debug which part has problems.

Good idea!
I found out problem is in custom loss, cause custom eval function gives same results as default huber metric.
def huber_custom_train(preds, data):

    y_true = data.get_label()
    y_pred = preds
    residual = (y_pred - y_true).astype("float")

    alpha = .9

    grad = np.where(residual <= alpha, residual, residual * alpha)
    hess = np.where(residual < 0, 1. * 1., 1. * 1.)

    return grad, hess

def huber_custom_eval(preds, data):

    y_true = data.get_label()
    y_pred = preds
    residual = (y_pred - y_true).astype("float")
    alpha = .9
    loss = np.where(np.abs(residual) <= alpha , .5 * ((residual) ** 2), alpha * np.abs(residual) - .5 * (alpha ** 2))

    return "huber_custom", np.mean(loss), False

params = {
    'objective': 'huber',
    'metric': {'huber'},
    'learning_rate': .1,
    'alpha': .9,
    'boost_from_average': False,
    'num_threads': 35,
}

model = lgbm.train(
    params=params,
    train_set=X_train_lgbm,
    num_boost_round=100000,
    valid_sets=[X_train_lgbm, X_valid_lgbm, ],
    valid_names=None,
    fobj=huber_custom_train,
    # feval=huber_custom_eval,
    init_model=None,
    # feature_name='auto',
    # categorical_feature='auto',
    early_stopping_rounds=100,
    evals_result=None,
    verbose_eval=100,
    learning_rates=None,
    keep_training_booster=False,
    callbacks=None,
)

def huber_custom_train(preds, data):

    y_true = data.get_label()
    y_pred = preds
    residual = (y_pred - y_true).astype("float")

    alpha = .9

    grad = np.where(residual <= alpha, residual, residual * alpha)
    hess = np.where(residual < 0, 1. * 1., 1. * 1.)

    return grad, hess

def huber_custom_eval(preds, data):

    y_true = data.get_label()
    y_pred = preds
    residual = (y_pred - y_true).astype("float")
    alpha = .9
    loss = np.where(np.abs(residual) <= alpha , .5 * ((residual) ** 2), alpha * np.abs(residual) - .5 * (alpha ** 2))

    return "huber_custom", np.mean(loss), False

params = {
    'objective': 'huber',
    'metric': {''},
    'learning_rate': .1,
    'alpha': .9,
    'boost_from_average': False,
    'num_threads': 35,
}

model = lgbm.train(
    params=params,
    train_set=X_train_lgbm,
    num_boost_round=100000,
    valid_sets=[X_train_lgbm, X_valid_lgbm, ],
    valid_names=None,
    # fobj=huber_custom_train,
    feval=huber_custom_eval,
    init_model=None,
    # feature_name='auto',
    # categorical_feature='auto',
    early_stopping_rounds=100,
    evals_result=None,
    verbose_eval=100,
    learning_rates=None,
    keep_training_booster=False,
    callbacks=None,
)

okay, your objective function is still different, please check following code.
       if (std::abs(diff) <= alpha_) {
         gradients[i] = static_cast<score_t>(diff);
       } else {
         gradients[i] = static_cast<score_t>(Common::Sign(diff) * alpha_);
       }

Still nothing...
params = {
    'objective': 'huber',
    'metric': {''},
    'learning_rate': .1,
    'alpha': .9,
    'boost_from_average': False,
    'num_threads': num_threads,
}

model = lgbm.train(
    params=params,
    train_set=X_train_lgbm,
    num_boost_round=100000,
    valid_sets=[X_train_lgbm, X_valid_lgbm, ],
    valid_names=None,
    fobj=None,
    feval=None,
    init_model=None,
    # feature_name='auto',
    # categorical_feature='auto',
    early_stopping_rounds=100,
    evals_result=None,
    verbose_eval=100,
    learning_rates=None,
    keep_training_booster=False,
    callbacks=None,
)

def huber_custom_train(preds, data):

    y_true = data.get_label()
    y_pred = preds
    residual = (y_pred - y_true).astype("float")

    alpha = .9

    grad = grad = np.where(residual <= alpha, residual, np.sign(residual) * alpha)
    hess = np.where(residual < 0, 1. * 1., 1. * 1.)

    return grad, hess

def huber_custom_eval(preds, data):

    y_true = data.get_label()
    y_pred = preds
    residual = (y_pred - y_true).astype("float")
    alpha = .9
    loss = np.where(np.abs(residual) <= alpha , .5 * ((residual) ** 2), alpha * np.abs(residual) - .5 * (alpha ** 2))

    return "huber_custom", np.mean(loss), False

params = {
    'objective': 'huber',
    'metric': {''},
    'learning_rate': .1,
    'alpha': .9,
    'boost_from_average': False,
    'num_threads': num_threads,
}

model = lgbm.train(
    params=params,
    train_set=X_train_lgbm,
    num_boost_round=100000,
    valid_sets=[X_train_lgbm, X_valid_lgbm, ],
    valid_names=None,
    fobj=huber_custom_train,
    feval=huber_custom_eval,
    init_model=None,
    # feature_name='auto',
    # categorical_feature='auto',
    early_stopping_rounds=100,
    evals_result=None,
    verbose_eval=100,
    learning_rates=None,
    keep_training_booster=False,
    callbacks=None,
)

did you check the type of np.sign(residual), maybe you need to convert it to float.
and you can check the grad/hess manually for debug, instead of run it end-to-end.

and you should use 'abs(residual)for comparison, refer tostd::abs(diff) <= alpha_`.
you should be more careful about your code...

@guolinke thanks for your seggestions but I've double checked code before previous comments...
There is convertation to float before getting sign of residual array - it's okay.
def huber_custom_train(preds, data):

    y_true = data.get_label()
    y_pred = preds
    residual = (y_pred - y_true).astype("float")

    alpha = .9

    grad = grad = np.where(residual <= alpha, residual, np.sign(residual) * alpha)
    hess = np.where(residual < 0, 1. * 1., 1. * 1.)

    return grad, hess

Also I've cheked difference before np.abs and default python abs functions for same array - it does not give any difference for evaluatin function.
def huber_custom_eval(preds, data):

    y_true = data.get_label()
    y_pred = preds
    residual = (y_pred - y_true).astype("float")
    alpha = .9
    loss = np.where(np.abs(residual) <= alpha , .5 * ((residual) ** 2), alpha * np.abs(residual) - .5 * (alpha ** 2))

    return "huber_custom", np.mean(loss), False

Just a few comments above we have figured out that problem is in loss function.
Sorry, I do not have C++ compilation experience and that's why I'm here asking for your help...

@dishkakrauch
I was saying for the objective, not the eval.
refer to cpp code:
       if (std::abs(diff) <= alpha_) {
         gradients[i] = static_cast<score_t>(diff);
       } else {
         gradients[i] = static_cast<score_t>(Common::Sign(diff) * alpha_);
       }
       hessians[i] = 1.0f;

So it should be like, and you missing
def huber_custom_train(preds, data):

    y_true = data.get_label()
    y_pred = preds
    residual = (y_pred - y_true).astype("float")

    alpha = .9
    # It should compare to abs(residual).
    grad = np.where(np.abs(residual) <= alpha, residual, np.sign(residual) * alpha)
    hess = np.where(residual < 0, 1. * 1., 1. * 1.)

    return grad, he's

@guolinke thanks for patience, I've read your comments, read cpp code. Now it's okay and custom objective (train loss) with custom eval metric (valid loss) gives the same results as default huber objective and huber metric.
I gonna leave here code for somebody who will face this problem too.
default:
params = {
    'objective': 'huber',
    'metric': {''},
    'learning_rate': .1,
    'alpha': .9,
    'boost_from_average': False,
    'num_threads': 35,
}

model = lgbm.train(
    params=params,
    train_set=X_train_lgbm,
    num_boost_round=100000,
    valid_sets=[X_train_lgbm, X_valid_lgbm, ],
    valid_names=None,
    fobj=None,
    feval=None,
    init_model=None,
    # feature_name='auto',
    # categorical_feature='auto',
    early_stopping_rounds=100,
    evals_result=None,
    verbose_eval=100,
    learning_rates=None,
    keep_training_booster=False,
    callbacks=None,
)

custom:
def huber_custom_train(preds, data):

    y_true = data.get_label()
    y_pred = preds
    residual = (y_pred - y_true).astype("float")

    alpha = .9

    grad = np.where(np.abs(residual) <= alpha, residual, np.sign(residual) * alpha)
    hess = np.where(residual < 0, 1. * 1., 1. * 1.)

    return grad, hess

def huber_custom_eval(preds, data):

    y_true = data.get_label()
    y_pred = preds
    residual = (y_pred - y_true).astype("float")
    alpha = .9
    loss = np.where(np.abs(residual) <= alpha , .5 * ((residual) ** 2), alpha * np.abs(residual) - .5 * (alpha ** 2))

    return "huber_custom", np.mean(loss), False

params = {
    'objective': 'huber',
    'metric': {''},
    'learning_rate': .1,
    'alpha': .9,
    'boost_from_average': False,
    'num_threads': 35,
}

model = lgbm.train(
    params=params,
    train_set=X_train_lgbm,
    num_boost_round=100000,
    valid_sets=[X_train_lgbm, X_valid_lgbm, ],
    valid_names=None,
    fobj=huber_custom_train,
    feval=huber_custom_eval,
    init_model=None,
    # feature_name='auto',
    # categorical_feature='auto',
    early_stopping_rounds=100,
    evals_result=None,
    verbose_eval=100,
    learning_rates=None,
    keep_training_booster=False,
    callbacks=None,
)

@guolinke  thanks again!

LightGBM/src/metric/regression_metric.hpp
Lines 191 to 198 in e9f5169
inline static double LossOnPoint(label_t label, double score, const Config& config) {
const double diff = score - label;
if (std::abs(diff) <= config.alpha) {
return 0.5f * diff * diff;
} else {
return config.alpha * (std::abs(diff) - 0.5f * config.alpha);
}
}

Wanna ask one more question about evaluation metric.
Looks like it's gonna be different and I misread cpp code before.
Was:
def huber_custom_eval(preds, data):

    y_true = data.get_label()
    y_pred = preds
    residual = (y_pred - y_true).astype("float")
    alpha = .9
    loss = np.where(np.abs(residual) <= alpha , .5 * ((residual) ** 2), alpha * np.abs(residual) - .5 * (alpha ** 2))

    return "huber_custom", np.mean(loss), False

Should be:
def huber_custom_eval(preds, data):

    y_true = data.get_label()
    y_pred = preds
    residual = (y_pred - y_true).astype("float")
    alpha = .9
    loss = np.where(np.abs(residual) <= alpha , .5 * ((residual) ** 2), alpha * (np.abs(residual) - .5 * alpha))

    return "huber_custom", np.mean(loss), False

Am I right?

refer to:
if (std::abs(diff) <= config.alpha) {
return 0.5f * diff * diff;
} else {
return config.alpha * (std::abs(diff) - 0.5f * config.alpha);
}
I think alpha * (np.abs(residual) - .5 * alpha) equals to alpha * np.abs(residual) - .5 * (alpha ** 2).

Look like I've overworked and didn't take into account brackets and power function.
Therefore python code is exactly following to cpp code, thanks again!


AKS module

Created terraform module for Azure Kubernetes Service

 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.

Awesome 👍

Thanks a lot for the PR, I will try to test it soon.
However, can you please clarify with @dansible  the folder naming convention. This new folder seems to use a different convention.

We agreed to merge it and rename the modules in a consistent way later


Could not find Navigator with name "BottomSheetNavigator". You must call NavController.addNavigator() for each navigation type

Hello,
This is to re-open the #532. I have the same issue I'm using
// compose
def compose_version = "1.6.7"
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.compose.foundation:foundation:$compose_version"
implementation "androidx.compose.material:material-navigation:1.7.0-beta01"

def compose_destinations_version = "1.10.2"
implementation "io.github.raamcosta.compose-destinations:animations-core:$compose_destinations_version"
ksp "io.github.raamcosta.compose-destinations:ksp:$compose_destinations_version"

I wanted to use androidx.compose.material.navigation.ModalBottomSheetLayout() because com.google.accompanist.navigation.material.ModalBottomSheetLayout is deprecated but it seems that the version 1.10.2 is still using com.google.accompanist.navigation in internal
java.lang.IllegalStateException: Could not find Navigator with name "BottomSheetNavigator". You must call NavController.addNavigator() for each navigation type.
	at androidx.navigation.NavigatorProvider.getNavigator(NavigatorProvider.kt:67)
	at androidx.navigation.NavigatorProvider.getNavigator(NavigatorProvider.kt:49)
	at com.google.accompanist.navigation.material.NavGraphBuilderKt.bottomSheet(NavGraphBuilder.kt:60)
	at com.ramcosta.composedestinations.spec.DestinationStyleBottomSheetKt.addComposable(DestinationStyleBottomSheet.kt:52)
	at com.ramcosta.composedestinations.animations.AnimatedNavHostEngineKt$lambda$1.invoke(AnimatedNavHostEngine.kt:58)
	at com.ramcosta.composedestinations.animations.AnimatedNavHostEngineKt$lambda$1.invoke(AnimatedNavHostEngine.kt:57)
	at com.ramcosta.composedestinations.spec.DestinationStyleKt.addActivityDestination(DestinationStyle.kt:220)
	at com.ramcosta.composedestinations.DefaultNavHostEngine.composable(DefaultNavHostEngine.kt:123)
	at com.ramcosta.composedestinations.DestinationsNavHostKt.addNavGraphDestinations(DestinationsNavHost.kt:115)
	at com.ramcosta.composedestinations.DestinationsNavHostKt.access$addNavGraphDestinations(DestinationsNavHost.kt:1)
	at com.ramcosta.composedestinations.DestinationsNavHostKt$DestinationsNavHost$2.invoke(DestinationsNavHost.kt:77)
	at com.ramcosta.composedestinations.DestinationsNavHostKt$DestinationsNavHost$2.invoke(DestinationsNavHost.kt:71)
	at androidx.navigation.compose.NavHostKt.NavHost(NavHost.kt:390)
	at com.ramcosta.composedestinations.DefaultNavHostEngine.NavHost(DefaultNavHostEngine.kt:79)
	at com.ramcosta.composedestinations.DestinationsNavHostKt.DestinationsNavHost(DestinationsNavHost.kt:71)

Is it possible to use androidx.compose.material.navigation instead ?

You need to update to compose 1.7 to be able to use navigation material.
Actually you should not depend on navigation material directly. It is a transitive dependency of compose destinations.
For compose 1.6 related versions, it still uses accompanist and that won’t change. But it should not be a concern of yours. Just use this library and you get the functionality you want without caring where it comes from 🙂
closing this! Let me know if there’s any additional question 👍

Hello, I've updated my compose to 1.7-beta06. I have removed all dependencies to navigation material, I'm using the transitive dependency of compose as you suggested.
I'm having issue migrating to material because androidx.compose.material.ModalBottomSheetLayout doesn't have a bottomSheetNavigator
fun androidx.compose.material.ModalBottomSheetLayout(
    sheetContent: @Composable ColumnScope.() -> Unit,
    modifier: Modifier = Modifier,
    sheetState: ModalBottomSheetState =
        rememberModalBottomSheetState(Hidden),
    sheetGesturesEnabled: Boolean = true,
    sheetShape: Shape = MaterialTheme.shapes.large,
    sheetElevation: Dp = ModalBottomSheetDefaults.Elevation,
    sheetBackgroundColor: Color = MaterialTheme.colors.surface,
    sheetContentColor: Color = contentColorFor(sheetBackgroundColor),
    scrimColor: Color = ModalBottomSheetDefaults.scrimColor,
    content: @Composable () -> Unit
)

Could you details how the migration should be done ?

So I assume all works now?

Yes it does work now after fixing some breaking change

Ok thank you 🙏


Button "Delete room" should have a confirmation button

Deleting rooms is a process that need a confirmation button. The deleting process is very fast and the button "Delete room" can be clicked by mistake.

I close this issue because the PR #27 fixed it.


Add a download inputs pre-step in the Pipeline class #410

Most of those code changes have been implemented in https://github.com/nexB/scancode.io/pull/814
What's left here to migrate:

Project.input_sources to InputSource model https://github.com/nexB/scancode.io/pull/519/files#diff-d71c8a8d98cec2c888bbf875d6a34a481041ba8a56656ec516aa53b0b7f6f194R970
Download missing inputs as a Pipeline pre-step https://github.com/nexB/scancode.io/pull/519/files#diff-2c00d080346ee955d9938724d8e54da56d4898d29f22299ddd3f2185b87cab5bR139


Error: Element 'tags' must not contain child elements

Stumbled upon an issue when putting  in
E.g.:
<tags>
    <tag>@regression</tag>
</tags>

Error output:
[ERROR] Failed to execute goal com.github.temyers:cucumber-jvm-parallel-plugin:2.2.0:generateRunners (generateRunners) on project cucumber-java-skeleton: Unable to parse configuration of mojo com.github.temyers:cucumber-jvm-parallel-plugin:2.2.0:generateRunners: Basic element 'tags' must not contain child elements

Whoops. You are looking at the documentation for an upcoming release. Please check here for the latest:
https://github.com/temyers/cucumber-jvm-parallel-plugin/tree/62d8fd252f86619f522a528af1a1d310267bd8ec


"Paket pack symbols" also puts the symbols in the non-symbol file

Hello,
I noticed the 'symbols' flag of the 'pack' command changed behavior recently (it was either created lately or used to only output a single file, I can't recall properly). Anyway, I used to add my sources files manually in the paket.template file and I'm glad this new feature is now online.
I started using 'pack symbols' and I noticed that the .pdb files were also included in the non-symbol.nupkg file.
See repro example : https://github.com/franknarf8/paket-issue-repro/tree/4f8a1ff74bebc37c1dd99270bdaa74db37349c20
A.3.0.0-release.nupkg -> contains A.pdb
A.3.0.0-release.symbols.nupkg -> contains A.pdb + *.cs
Is it intended behavior that the debug symbols (.pdb) are also added to A.3.0.0-release.nupkg?

/cc @pms1969

prior to those changes, the pdb's existed for the project that that the template was for.  This is different to nuget.  I didn't want to break existing behaviour, so for reference projects, I just made sure that the pdb's were also included, as I thought that would be the right thing to do in that situation.  If strict nuget compatability is sought, I think that the referenced project and associated pdb's shouldn't be included unless the command line include-referenced-projects option is set.
personally, I don't mind the PDB's being present, but it's not what nuget does.
Steffen...  thoughts?

I opened a bug for this issue, I saw that then pdbs are present in main nuget it impossible to get sources from symbols nuget, looks like need to fixed.

Hi @tsibelman, are you saying that because the pdb's are present in the main nuget package, VS fails to download the source package?

Yes it what I encountered during my testing.

Here is a duplicate bug #1370

@tsibelman should now be fixed as of 2.45.0

Everything works works fine now!
Some paket users may not notice the change though and expect the pdb to be in the main nupkg.

@pms1969 thank you

@franknarf8, the way I worked it, was this:  if you did not request symbols, pdbs are added if your template file has the switch "include-pdbs true"; if you did request symbols, the normal package will not include pdb's of the project file regardless of whether you have "include-pdbs" set or not, and the symols package will always include the pdbs.
might be useful if anyone goes searching for it.

@pms1969:

might be useful if anyone goes searching for it.

Very useful. Found this while trying to figure out why my packages don't include the .pdb files, as they did when I first set-up my project with paket and FAKE. Haven't had to debug a released build in a while, so I didn't realize this behavior had changed.

not a wasted comment then ;-)
Sorry if it caused you issues, but I don't think there was any easy way to resolve it.

No problem; adding include-pdbs true in my paket.template files resolves it going forward :)


Source Label match for HTTPRoute

What would you like to be added:
A source label match feature to match the request based on the source pod identification at the target service being called. This identification can be based on labels given in the source pod specification
Why this is needed:
We have a use case to identify the source pod based on the label. We have to write some rules in the target service based on this matching.
currently we use specific implementation from Istio's sourceLabel feature in the HTTPMatchRequest

Just a clarification from some outside context - this is for Mesh usage not Gateway I believe

/remove-lifecycle stale

/remove-lifecycle stale


Code Type:             X86-64 (Native)
Parent Process:        zsh [1349]
Responsible:           iTerm2 [1249]
User ID:               501

Date/Time:             2022-09-12 20:55:03.0547 +0800
OS Version:            macOS 13.0 (22A5342f)
Report Version:        12
Bridge OS Version:     7.0 (20P50376b)
Anonymous UUID:        8FD121F5-F108-A9ED-8D2A-B2B59BC7DF00

Time Awake Since Boot: 2800 seconds

System Integrity Protection: enabled

Crashed Thread:        0

Exception Type:        EXC_BAD_ACCESS (SIGBUS)
Exception Codes:       KERN_PROTECTION_FAILURE at 0x000000000572f2d0
Exception Codes:       0x0000000000000002, 0x000000000572f2d0

Termination Reason:    Namespace SIGNAL, Code 10 Bus error: 10
Terminating Process:   exc handler [14507]

VM Region Info: 0x572f2d0 is in 0x4000000-0x8700000;  bytes after start: 24310480  bytes before end: 50138415
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  __TEXT                        4000000-8700000      [ 71.0M] r-x/r-x SM=COW  ...ER/*/scan4all
      __DATA                        8700000-88d4000      [ 1872K] rw-/rw- SM=COW  ...ER/*/scan4all

Thread 0 Crashed:
0   dyld                          	    0x7ff80513de53 dyld4::fixupPage64(void*, mwl_info_hdr const*, dyld_chained_starts_in_segment const*, unsigned int, bool) + 125
1   dyld                          	    0x7ff80513dd19 dyld4::dyld_map_with_linking_np(mwl_region const*, unsigned int, mwl_info_hdr const*, unsigned int) + 369
2   dyld                          	    0x7ff80513aa7a dyld4::setUpPageInLinkingRegions(dyld4::RuntimeState&, dyld4::Loader const*, unsigned long, unsigned short, unsigned short, bool, dyld3::Array<dyld4::PageInLinkingRange> const&, dyld3::Array<void const*> const&) + 882
3   dyld                          	    0x7ff80513a336 invocation function for block in dyld4::Loader::setUpPageInLinking(Diagnostics&, dyld4::RuntimeState&, unsigned long, unsigned long long, dyld3::Array<void const*> const&) const + 273
4   dyld                          	    0x7ff80513a0ba dyld4::Loader::setUpPageInLinking(Diagnostics&, dyld4::RuntimeState&, unsigned long, unsigned long long, dyld3::Array<void const*> const&) const + 544
5   dyld                          	    0x7ff80513ab8b dyld4::Loader::applyFixupsGeneric(Diagnostics&, dyld4::RuntimeState&, unsigned long long, dyld3::Array<void const*> const&, dyld3::Array<void const*> const&, bool, dyld3::Array<dyld4::Loader::MissingFlatLazySymbol> const&) const + 129
6   dyld                          	    0x7ff80513fc51 dyld4::JustInTimeLoader::applyFixups(Diagnostics&, dyld4::RuntimeState&, dyld4::DyldCacheDataConstLazyScopedWriter&, bool) const + 573
7   dyld                          	    0x7ff805125db3 dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 2281
8   dyld                          	    0x7ff805125281 start + 2289

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000002  rbx: 0x0000000000001000  rcx: 0x00000000055c4ac0  rdx: 0x00000000055c4ac0
  rdi: 0x000000000572f2d0  rsi: 0x00007ff7bfef3700  rbp: 0x00007ff7bfef3630  rsp: 0x00007ff7bfef3630
   r8: 0x0000000fffffffff   r9: 0x00007ff7bfefaec8  r10: 0xff00000000000000  r11: 0x0000000004000000
  r12: 0x000000000000172f  r13: 0x00007ff7bfef3734  r14: 0x000000000000000c  r15: 0x000000000572f000
  rip: 0x00007ff80513de53  rfl: 0x0000000000010202  cr2: 0x000000000572f2d0

Logical CPU:     0
Error Code:      0x00000007 (invalid protections for user data write)
Trap Number:     14

Thread 0 instruction stream:
  41 0f b6 c0 4c 8b 5c c6-18 49 b8 ff ff ff ff 0f  A...L.\..A......D.F

Binary Images:
    0x7ff80511f000 -     0x7ff8051b32d7 dyld (*) <62ecbdb9-d9fa-3799-966d-c99fd955546d> /usr/lib/dyld
         0x4000000 -          0x86fffff scan4all (*) <08f7eb32-52c4-392f-b92d-b40379d6604f> /Users/USER/*/scan4all

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 2
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=342.8M resident=0K(0%) swapped_out_or_unallocated=342.8M(100%)
Writable regions: Total=16.0M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=16.0M(100%)

                                VIRTUAL   REGION
REGION TYPE                        SIZE    COUNT (non-coalesced)
===========                     =======  =======
STACK GUARD                       56.0M        1
Stack                             8192K        1
VM_ALLOCATE                          4K        1
__DATA                            12.3M      136
__DATA_CONST                      5696K       97
__DATA_DIRTY                       339K       57
__LINKEDIT                       171.0M        2
__OBJC_RO                         64.9M        1
__OBJC_RW                         1977K        2
__TEXT                           171.7M      150
dyld private memory                512K        2
shared memory                       20K        2
===========                     =======  =======
TOTAL                            492.3M      452

-----------
Full Report
-----------

{"app_name":"scan4all","timestamp":"2022-09-12 20:55:03.00 +0800","app_version":"","slice_uuid":"08f7eb32-52c4-392f-b92d-b40379d6604f","build_version":"","platform":1,"share_with_app_devs":0,"is_first_party":1,"bug_type":"309","os_version":"macOS 13.0 (22A5342f)","roots_installed":0,"incident_id":"60BC6805-5680-461B-92F8-6BAD4A48FA20","name":"scan4all"}
{
  "uptime" : 2800,
  "procRole" : "Unspecified",
  "version" : 2,
  "userID" : 501,
  "deployVersion" : 210,
  "modelCode" : "MacBookPro16,2",
  "coalitionID" : 1402,
  "osVersion" : {
    "train" : "macOS 13.0",
    "build" : "22A5342f",
    "releaseType" : "User"
  },
  "captureTime" : "2022-09-12 20:55:03.0547 +0800",
  "incident" : "60BC6805-5680-461B-92F8-6BAD4A48FA20",
  "pid" : 14507,
  "cpuType" : "X86-64",
  "roots_installed" : 0,
  "bug_type" : "309",
  "procLaunch" : "2022-09-12 20:55:03.0421 +0800",
  "procStartAbsTime" :<PHONE_NUMBER>347,
  "procExitAbsTime" :<PHONE_NUMBER>476,
  "procName" : "scan4all",
  "procPath" : "\/Users\/USER\/*\/scan4all",
  "parentProc" : "zsh",
  "parentPid" : 1349,
  "coalitionName" : "com.googlecode.iterm2",
  "crashReporterKey" : "8FD121F5-F108-A9ED-8D2A-B2B59BC7DF00",
  "responsiblePid" : 1249,
  "responsibleProc" : "iTerm2",
  "bridgeVersion" : {"build":"20P50376b","train":"7.0"},
  "sip" : "enabled",
  "vmRegionInfo" : "0x572f2d0 is in 0x4000000-0x8700000;  bytes after start: 24310480  bytes before end: 50138415\n      REGION TYPE                    START - END         [ VSIZE] PRT\/MAX SHRMOD  REGION DETAIL\n      UNUSED SPACE AT START\n--->  __TEXT                        4000000-8700000      [ 71.0M] r-x\/r-x SM=COW  ...ER\/*\/scan4all\n      __DATA                        8700000-88d4000      [ 1872K] rw-\/rw- SM=COW  ...ER\/*\/scan4all",
  "exception" : {"codes":"0x0000000000000002, 0x000000000572f2d0","rawCodes":[2,91419344],"type":"EXC_BAD_ACCESS","signal":"SIGBUS","subtype":"KERN_PROTECTION_FAILURE at 0x000000000572f2d0"},
  "termination" : {"flags":0,"code":10,"namespace":"SIGNAL","indicator":"Bus error: 10","byProc":"exc handler","byPid":14507},
  "vmregioninfo" : "0x572f2d0 is in 0x4000000-0x8700000;  bytes after start: 24310480  bytes before end: 50138415\n      REGION TYPE                    START - END         [ VSIZE] PRT\/MAX SHRMOD  REGION DETAIL\n      UNUSED SPACE AT START\n--->  __TEXT                        4000000-8700000      [ 71.0M] r-x\/r-x SM=COW  ...ER\/*\/scan4all\n      __DATA                        8700000-88d4000      [ 1872K] rw-\/rw- SM=COW  ...ER\/*\/scan4all",
  "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":2},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
  "faultingThread" : 0,
  "threads" : [{"triggered":true,"id":93049,"instructionState":{"instructionStream":{"bytes":[65,15,182,192,76,139,92,198,24,73,184,255,255,255,255,15,0,0,0,73,186,0,0,0,0,0,0,0,255,72,139,7,72,133,192,120,24,72,137,194,76,33,194,76,1,218,72,137,193,72,193,225,20,76,33,209,72,1,209,235,26,137,194,129,226,255,255,255,0,139,78,12,57,202,115,34,137,193,193,233,24,137,210,73,3,12,209,72,193,232,51,37,255,15,0,0,72,137,15,72,141,60,135,72,133,192,117,177,93,195,72,141,5,232,180,219,65,72,139,56,72,141,53,232,129,6,0,49,192,93,233,34,65,2,0,85,72,137,229,68,139,23,69,133,210,120,32,68,137,208,37,255,255,255,3,68,139,66,16,68,57,192,118,49,65,129,192,0,0,0,4,65,209,232,68,41,192,235,37,69,137,209,65,129,225,255,255,15,0,68,139,70],"offset":96}},"threadState":{"r13":{"value":140702053775156},"rax":{"value":2},"rflags":{"value":66050},"cpu":{"value":0},"r14":{"value":12},"rsi":{"value":140702053775104},"r8":{"value":68719476735},"cr2":{"value":91419344},"rdx":{"value":89934528,"symbolLocation":0,"symbol":"*\/jarm-go.JarmProbeOptions"},"r10":{"value":18374686479671623680},"r9":{"value":140702053805768},"r15":{"value":91418624,"symbolLocation":13824,"symbol":"runtime.types"},"rbx":{"value":4096},"trap":{"value":14,"description":"(invalid protections for user data write)"},"err":{"value":7},"r11":{"value":67108864},"rip":{"value":140703213805139,"matchesCrashFrame":1},"rbp":{"value":140702053774896},"rsp":{"value":140702053774896},"r12":{"value":5935},"rcx":{"value":89934528,"symbolLocation":0,"symbol":"*\/jarm-go.JarmProbeOptions"},"flavor":"x86_THREAD_STATE","rdi":{"value":91419344,"symbolLocation":14544,"symbol":"runtime.types"}},"frames":[{"imageOffset":126547,"symbol":"dyld4::fixupPage64(void*, mwl_info_hdr const*, dyld_chained_starts_in_segment const*, unsigned int, bool)","symbolLocation":125,"imageIndex":0},{"imageOffset":126233,"symbol":"dyld4::dyld_map_with_linking_np(mwl_region const*, unsigned int, mwl_info_hdr const*, unsigned int)","symbolLocation":369,"imageIndex":0},{"imageOffset":113274,"symbol":"dyld4::setUpPageInLinkingRegions(dyld4::RuntimeState&, dyld4::Loader const*, unsigned long, unsigned short, unsigned short, bool, dyld3::Array<dyld4::PageInLinkingRange> const&, dyld3::Array<void const*> const&)","symbolLocation":882,"imageIndex":0},{"imageOffset":111414,"symbol":"invocation function for block in dyld4::Loader::setUpPageInLinking(Diagnostics&, dyld4::RuntimeState&, unsigned long, unsigned long long, dyld3::Array<void const*> const&) const","symbolLocation":273,"imageIndex":0},{"imageOffset":110778,"symbol":"dyld4::Loader::setUpPageInLinking(Diagnostics&, dyld4::RuntimeState&, unsigned long, unsigned long long, dyld3::Array<void const*> const&) const","symbolLocation":544,"imageIndex":0},{"imageOffset":113547,"symbol":"dyld4::Loader::applyFixupsGeneric(Diagnostics&, dyld4::RuntimeState&, unsigned long long, dyld3::Array<void const*> const&, dyld3::Array<void const*> const&, bool, dyld3::Array<dyld4::Loader::MissingFlatLazySymbol> const&) const","symbolLocation":129,"imageIndex":0},{"imageOffset":134225,"symbol":"dyld4::JustInTimeLoader::applyFixups(Diagnostics&, dyld4::RuntimeState&, dyld4::DyldCacheDataConstLazyScopedWriter&, bool) const","symbolLocation":573,"imageIndex":0},{"imageOffset":28083,"symbol":"dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*)","symbolLocation":2281,"imageIndex":0},{"imageOffset":25217,"symbol":"start","symbolLocation":2289,"imageIndex":0}]}],
  "usedImages" : [
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" :<PHONE_NUMBER>78592,
    "size" : 606936,
    "uuid" : "62ecbdb9-d9fa-3799-966d-c99fd955546d",
    "path" : "\/usr\/lib\/dyld",
    "name" : "dyld"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 67108864,
    "size" : 74448896,
    "uuid" : "08f7eb32-52c4-392f-b92d-b40379d6604f",
    "path" : "\/Users\/USER\/*\/scan4all",
    "name" : "scan4all"
  }
],
  "sharedCache" : {
  "base" :<PHONE_NUMBER>72384,
  "size" :<PHONE_NUMBER>0,
  "uuid" : "5751bf35-23b8-300c-9ddb-c6d84abcd159"
},
  "vmSummary" : "ReadOnly portion of Libraries: Total=342.8M resident=0K(0%) swapped_out_or_unallocated=342.8M(100%)\nWritable regions: Total=16.0M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=16.0M(100%)\n\n                                VIRTUAL   REGION \nREGION TYPE                        SIZE    COUNT (non-coalesced) \n===========                     =======  ======= \nSTACK GUARD                       56.0M        1 \nStack                             8192K        1 \nVM_ALLOCATE                          4K        1 \n__DATA                            12.3M      136 \n__DATA_CONST                      5696K       97 \n__DATA_DIRTY                       339K       57 \n__LINKEDIT                       171.0M        2 \n__OBJC_RO                         64.9M        1 \n__OBJC_RW                         1977K        2 \n__TEXT                           171.7M      150 \ndyld private memory                512K        2 \nshared memory                       20K        2 \n===========                     =======  ======= \nTOTAL                            492.3M      452 \n",
  "legacyInfo" : {
  "threadTriggered" : {

  }
},
  "trialInfo" : {
  "rollouts" : [
    {
      "rolloutId" : "6112e3d2fc54bc3389840661",
      "factorPackIds" : {
        "SIRI_TEXT_TO_SPEECH" : "62f58ba9e66958407ff7b97d"
      },
      "deploymentId" : 250000130
    },
    {
      "rolloutId" : "5fb4245a1bbfe8005e33a1e1",
      "factorPackIds" : {

      },
      "deploymentId" : 250000011
    }
  ],
  "experiments" : [

  ]
}
}

Does other Go program crash? Or only this program crashes? Could you share the source code?
It looks like it is the dynamic loader crashed. Not sure if it is a Go bug.

thanks @cherrymui
update Xcode, now is ok

Had this same issue, but I'm trying to execute this:
zsh: bus error  xcrun xcodebuild -list

(Also XCode 14.2 crashes immediately upon launch)
No idea if it's related, but when I previously had this issue I ended up reinstalling mac os to solve it... Didn't help for as long as I had hoped :(

@ciriousjoker that looks like an error running XCode, which is not a Go error. Sorry I don't think we can help here.

Ye np. I "fixed it" by rebooting the machine a couple of times. I just wanted to share my story in case someone stumbles on this via Google


HDDS-6176. Ozone service WebUI is not accessible with 404 error.

What changes were proposed in this pull request?
A lot of customers were facing issues Ozone service-related WebUI not opening with a 404 error. The issue can be fixed by restarting, but during the restart, a jetty-0_0_0_0-*/webapp folder is created, and the customer noticed that such a folder does not exist on the host with access issues. The customer performed manual restarts on each node and observed that the problem was resolved by creating a new jetty-0_0_0_0-*/webapp folder.
After investigating we can confirm that the ozone code is not responsible for the deletion of the contents in the tmp directory. It appears that an external program is responsible for the deletion.
The main culprit for deletion is the Linux program called systemd-tmpfiles-clean.timer . This program is designed to clean up temporary files that are generated by the system. By default, it runs daily and removes files and directories that are older than 3 days.
To avoid this issue, it is recommended to configure Jetty to use a dedicated directory for its temporary files and directories, rather than the system's temporary directory. We can do this by changing the ozone.http.basedir property in the Ozone Service Advanced Configuration Snippet for the ozone-conf/ozone-site.xml file. It is suggested that this property should be set to a directory such as /data/ozone that already exists and has sufficient permissions in HDFS.
In case if this property is not set, then fall back to the default property.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-6176
How was this patch tested?
The Jetty directory got created in the desired location

@sadanand48 @ChenSammi @jojochuang can you please take a look!

One downside of this approach is that the directly is only cleaned up on clean exits (and if persistTempDirectory is false).
Another alternative might be to set a base dir for jetty which is cleaned up on start and populated again.

Review comments are addressed and test checks all came back green. I'll merging this PR now.


allow supports_not without a reason

Purpose or Intent
Sometimes, we don't want to explicitly say, why it's not supported. Because the reason would probably never be displayed.
Like here - In this case all CloudManagers don't support discovery by default, because it has to be implemented. And the UI would only show CloudManagers that support it.
Adding a reason like "It's not supported because it's not implemented" would just generate noise.
@miq-bot add_label darga/no
@Fryguy @chessbyte review and merge?

👍
@durandom [Just my two cents here] I suggest we start using kwargs for things like this in the future, or we're going to start running in to a long list of params that we don't know which is what. Helpful for people seeing this new DSL, too.

@miq-bot add_label darga/yes
@chessbyte this one needs backporting too

@miq-bot remove_label darga/no

Darga backport details:
commit 7fa56db7c49537f2c5396a5152e0187e46d50509
Author: Jason Frey<EMAIL_ADDRESS>Date:   Wed Jul 6 14:00:55 2016 -0400

    Merge pull request #9620 from durandom/supports_feature_allow_empty_supports_not_reason

    allow supports_not without a reason
    (cherry picked from commit 35f3d3151d754eb20596e68648e39503a61650ba)


Partial mode matching for multi-mode mappings, tests for multi-mode mappings

LGTM when you are ready @willothy


Fail to process request with sub boundaries

Proposal
Hello,
I encountered two issues when using wiremock to test a request with sub boundaries:

Wiremock is failing to parse a WebClient request with sub boundaries.
If I configure WebClient to use the same size for the main boundary and for the sub boundary then the request is parsed by wiremock, but just the first part is identified, the rest are omitted.

Please let me know if more details is needed.
Thank you,
Radu
Reproduction steps
I attached a sample app with two test: wiremock_issues.zip

callApi - it is demonstrate the first issue, fails to parse the request.
callApi_whenSameSizeBoundary - it is demonstrate the second issue, fails to parse all the parts.

References
No response

Hi @radudeliu Many thanks for taking the time to submit the issue and provide an example app demonstrating the problem.  It was really useful 👍
In the example app you provided it looks like you are setting the MediaType to MULTIPART_MIXED.
partBuilder.part("part2", subPartBuilder.build(), MULTIPART_MIXED);

Was there a specific reason for this?  If we omit the setting of the MediaType in this call, we get a multipart/form-data content type:
Content-Disposition: form-data; name="part2"
Content-Type: multipart/form-data;boundary=3DpujgWMzjn2RlaeXaOORgIjWQlsGq-zQg8jGkmG

This gives us a callClient method that looks like this:
    private Mono<String> callClient(WebClient webClient) {
        final var subPartBuilder = new MultipartBodyBuilder();
        subPartBuilder.part("part11", "part11_content").contentType(TEXT_PLAIN);
        subPartBuilder.part("part12", "part12_content").contentType(TEXT_PLAIN);

        final var partBuilder = new MultipartBodyBuilder();
        partBuilder.part("part1", "part1_content").contentType(TEXT_PLAIN);
        partBuilder.part("part2", subPartBuilder.build());

        return webClient
                .post()
                .contentType(MULTIPART_RELATED)
                .bodyValue(partBuilder.build())
                .retrieve()
                .bodyToMono(String.class);
    }

Using this all your tests pass.  Would be interested to hear your thoughts


CMake Error while trying to build polymetis: Could NOT find Boost

Once upon a time while building Polymetis... 🐛
While I am trying to setup polymetis (on one of the IRL lab computers), the build is not properly working for me.
I am already using CUDACXX=/usr/local/cuda-12.4/bin/nvcc /usr/bin/cmake .. -DCMAKE_BUILD_TYPE=Release, instead of running cmake .. -DCMAKE_BUILD_TYPE=Release due to that not working either (just like the readme instructions are telling me to do).
Stacktrace:
-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- pinocchio FOUND. pinocchio at /home/quorty/miniforge3/envs/uha_real_robot/lib/libpinocchio.so
-- boost_filesystem FOUND. boost_filesystem at /home/quorty/miniforge3/envs/uha_real_robot/lib/libboost_filesystem.so
-- boost_serialization FOUND. boost_serialization at /home/quorty/miniforge3/envs/uha_real_robot/lib/libboost_serialization.so
-- boost_system FOUND. boost_system at /home/quorty/miniforge3/envs/uha_real_robot/lib/libboost_system.so
CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Boost (missing: Boost_INCLUDE_DIR filesystem serialization
  system)
Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.22/Modules/FindBoost.cmake:2360 (find_package_handle_standard_args)
  /usr/share/cmake-3.22/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)
  /home/kkuryshev/miniforge3/envs/uha_real_robot/lib/cmake/pinocchio/pinocchioConfig.cmake:152 (find_dependency)
  torch_isolation/pinocchio_isolation/CMakeLists.txt:21 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/quorty/audio-pipeline/irl_polymetis/polymetis/build/CMakeFiles/CMakeOutput.log".

Funnily, boost seems to get found, if I do use cmake .. -DCMAKE_BUILD_TYPE=Release:
-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- pinocchio FOUND. pinocchio at /home/quorty/miniforge3/envs/uha_real_robot/lib/libpinocchio.so
-- boost_filesystem FOUND. boost_filesystem at /home/quorty/miniforge3/envs/uha_real_robot/lib/libboost_filesystem.so
-- boost_serialization FOUND. boost_serialization at /home/quorty/miniforge3/envs/uha_real_robot/lib/libboost_serialization.so
-- boost_system FOUND. boost_system at /home/quorty/miniforge3/envs/uha_real_robot/lib/libboost_system.so
-- Found Boost: /home/quorty/miniforge3/envs/uha_real_robot/include (found version "1.72.0") found components: filesystem serialization system
-- eigenpy FOUND. eigenpy at /home/quorty/miniforge3/envs/uha_real_robot/lib/libeigenpy.so
-- hpp-fcl FOUND. hpp-fcl at /home/quorty/miniforge3/envs/uha_real_robot/lib/libhpp-fcl.so
-- Found Boost: /home/quorty/miniforge3/envs/uha_real_robot/include (found version "1.72.0")
-- Found CUDA: /usr/local/cuda (found version "12.5")
-- The CUDA compiler identification is unknown
CMake Error at /home/quorty/miniforge3/envs/uha_real_robot/share/cmake-3.27/Modules/CMakeDetermineCUDACompiler.cmake:603 (message):
  Failed to detect a default CUDA architecture.

  Compiler output:

Call Stack (most recent call first):
  /home/quorty/miniforge3/envs/uha_real_robot/lib/python3.9/site-packages/torch/share/cmake/Caffe2/public/cuda.cmake:47 (enable_language)
  /home/quorty/miniforge3/envs/uha_real_robot/lib/python3.9/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake:88 (include)
  /home/quorty/miniforge3/envs/uha_real_robot/lib/python3.9/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:68 (find_package)
  torch_isolation/CMakeLists.txt:18 (find_package)

-- Configuring incomplete, errors occurred!

I already tried adding some lines to CMakeLists.txt to make it find boost (see below), but I did not manage to resolve this issue.
# Find boost (it has been making trouble)
set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "$ENV{CONDA_PREFIX}/include/boost/")
find_package(Boost)
if(Boost_FOUND)
    include_directories(${Boost_INCLUDE_DIR})
    add_definitions( "-DHAS_BOOST" )
endif()

Running CUDACXX=/usr/local/cuda-12.5/bin/nvcc cmake .. -DCMAKE_BUILD_TYPE=Release worked.
Solution summary:
Basically play around with conda's cmake (just cmake) and the system's cmake (/usr/bin/cmake). For me, conda's cmake worked completely fine, it just wasn't able to detect the CUDA architecture.
Check that the cuda version within the command CUDACXX=/usr/local/cuda-12.4/bin/nvcc is correct, so that no error (Could not find compiler set in environment variable CUDACXX) occurs.


Fix text-generation example

What does this PR do?

#1019 added the import import habana_frameworks.torch.hpu as torch_hpu at the top of optimum/habana/transformers/generation/utils.py.
The __init__.py of habana_frameworks.torch imports habana_frameworks.torch.distributed.hccl which will call initialize_distributed_hpu. I suspect this is the reason for this issue, as it must set some env variables like WORLD_SIZE.
Before submitting

[ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
[ ] Did you make sure to update the documentation with your changes?
[ ] Did you write any new necessary tests?

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.


Incorrect library name when building - glfw

It seems that glfw binding is picking up incorrect lib name as it's trying to collect glfw while on arch its named glfw3.

I'll really have to implement pkg-config-support soon to avoid these errors

Pkg-config would seriously be helpful here. Linux is uh… A wild place when it comes to naming conventions for libs. Also not to mention actually, I realised I’ve build my glfw from source so that’s the name they’ve given to it.

Unfortunetly that didn't work and I believe it's because I'm trying to link it to a static lib. Does CSpydr only accept shared libs for now?
Passing static lib results in:
Compiling  main.csp
  Optimizing (2/2) evaluate constant expressions
  Generating assembly for x86_64-linux-gnu
  Linking    a.out (glfw3, GL)
ld: /home/kenta/.cache/cspydr/a.out.o: in function `.main':
/home/kenta/Documents/Playgrounds/main.csp:5: undefined reference to `glfwInit'
ld: /home/kenta/Documents/Playgrounds/main.csp:8: undefined reference to `glfwCreateWindow'
ld: /home/kenta/Documents/Playgrounds/main.csp:10: undefined reference to `glfwTerminate'
ld: /home/kenta/Documents/Playgrounds/main.csp:14: undefined reference to `glfwMakeContextCurrent'
ld: /home/kenta/Documents/Playgrounds/main.csp:16: undefined reference to `glfwWindowShouldClose'
ld: /home/kenta/Documents/Playgrounds/main.csp:24: undefined reference to `glfwSwapBuffers'
ld: /home/kenta/Documents/Playgrounds/main.csp:25: undefined reference to `glfwPollEvents'
ld: /home/kenta/Documents/Playgrounds/main.csp:28: undefined reference to `glfwTerminate'
error linking code. (exit code 1)

I've only ever tried it with shared libraries... So yea, static libs are something I'll have to sort out too

Fixed with the implementation of pkgconf


[ENGOPS-512] pack oss license file via ivy resolve

@mbatchelor for review

Build Skipped
:white_check_mark: There was nothing to build. The changes are probably excluded by the build rules. If this is an error, please contact your system administrator.


Issues about FPS during multi tasks

I ran two tasks (both cityscapes-512x256) simultaneously on Jetson Xavier and then turned out that FPS doubled compared to running a single task. However, Then I increased the resolution to 2048x1024 and it resulted in FPS cutting down a half when I launched another task. I wonder why it happened. The screenshots are attached to this comment.

Looking forward to u reply.

I think it's because the more complex 2048x1024 model uses 100% of GPU, and hence it reduces framerate when you run multiple.
You can keep an eye on the GPU utilization using the tegrastats utility.

Thank you for your reply.
Did you mean that the function of net.GetNetworkFPS() actually means the sum of the frames of all the running tasks?

net.GetNetworkFPS() returns how long it took to process that particular model with TensorRT.   However if you have other processes running using the GPU, the GPU may do time-sharing between them, so it can slow down a model.
If you wrote a single application/script that ran the same model twice on different streams, then I believe you should see normal performance reported from net.GetNetworkFPS() because the models would be executed in serial as opposed to in parallel.


feat: adding possibility to override default selection

This is PR solve #1 issue.
Here are things I did:

renamed variable prefixes to templateName (this name is better for understanding IMHO);
removed the need to install the telescope.nvim plugin to reach a wide audience and set vim.ui.select as default;
moved the code part of generating ignoreLines to the createGititnoreBuffer method;
added the possibility to override the generate method with the following contract;

Also users who use telescope can use it continuously, because the plugin telescope.nvim is not needed, but it enables multiple selection.
Contract of the overriding generate method:

plugin provides list of templateNames and two methods generate and createGititnoreBuffer;
method generate must get list of opts like path and list can be empty but not null;
pass only list of selected template names to `createGitignoreBuffer';

An example of overriding can be found in README.md.
UPD: I'm sorry if you're confused about block functions instead of ternary operators because of my code formatter.

Thank you for your contribution, and sorry it took a bit! :)
I like your solution to this problem, and have already made some changes to the README (0d4cef6) to keep it in line with the my usual style.
However there appears to be a small bug that needs your review before I can merge (see here: r1295777353)

Before pushing my solution, I thought to ask you.
My solution is changing this if statement to more logic, but strange number can stump someone. The problem in logic of method createGitignore that I commented in the review. This method returns the ignoreLines table with two elements if a program pass an empty table to the method.
So it turn out that part of the code will look:
if #ignoreLines < 3 then
    removeBufIfHasTelescope(prompt_bufnr)
    vim.schedule(function () print('Nothing selected, creation of .gitignore cancelled!') end)
    return
end

I also can put new if statement, which check the selectionList table. The method createGitignore must return nil value if the passed table is empty.
How you feel about it?

Oh right, nice find!
I think the best way to solve this is to move the "is selection empty" check upwards, and make it check for the actual selection, not the generated lines (as done in 08a0046).
A selection causing an empty list of lines should never happen anyways, so we can safely do that i believe.
In my eyes, this is ready to merge, if you don't have any objections, I will do so :)

It's very good! But after thinking about this I have a thought – if other user use this command in custom picker, they can write word with mistake. Then selectionList is non-empy, but it is wrong, because generated Gitignore is empty.
For better understanding, see steps:

user write in lua code string

gitignore.createGitignoreBuffer("", {"Jaba"}) -- wrong word "Java"

in the method createGitignoreBuffer the if statement check the selectionList argument and pass, because it is non-empy
it calls createGititnoge and returns the ignoreLines table with two elements (it is also like empty).
creates a buffer with two lines.

For me, it is not expect behavior of the method. Maybe need add additional if statement or you can check my fork in dev branch.

That is true, thank you for catching that! I would like to keep the differentiation between an empty selection, and an invalid selection. I think that in the case of an invalid selection, the creation should fail loudly, ergo alert the user and not create a .gitignore at all. The process for no selection at all should remain as it is since 08a00465174082c5ba58d85a817b710313d9773e
please see my latest commit that implements this behavior da0caab040a08305a69e6a13fc2695342d539072, and tell me if you think this is ready to merge.

I like it!
Thank you for work!

No, thank you for your work!
I'll merge this in a couple of days when I have access to a computer again :)


Devise cannot create new sessions with correct credentials

Hi ,I cannot sign in with email and password. It always return invalid email and password. Didn't even query the use from db to compare. In the log it says:
Started POST "/users/sign_in" for <IP_ADDRESS> at 2016-05-03 09:24:51 +0800
Processing by SessionsController#create as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"rqUvgDQBUY+Syj6vi1qq07bhC+opQIa0xeXFS45Dprmyb4lQ4c1uuUwBdG0ZXDxwqA+EhdyYmXfIFfbs4MBwqw=="<EMAIL_ADDRESS>"password"=>"[FILTERED]", "user"=>{"remember_me"=>"0"}, "commit"=>"Log in"}
Completed 401 Unauthorized in 14ms (ActiveRecord: 0.0ms)
Processing by SessionsController#new as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"rqUvgDQBUY+Syj6vi1qq07bhC+opQIa0xeXFS45Dprmyb4lQ4c1uuUwBdG0ZXDxwqA+EhdyYmXfIFfbs4MBwqw=="<EMAIL_ADDRESS>"password"=>"[FILTERED]", "user"=>{"remember_me"=>"0"}, "commit"=>"Log in"}
  Rendered devise/shared/_links.html.erb (17.5ms)
  Rendered devise/sessions/new.html.erb within layouts/application (35.2ms)
  Rendered shared/_flash_messages.html.slim (2.7ms)
Completed 200 OK in 677ms (Views: 660.4ms | ActiveRecord: 3.1ms)
source=rack-timeout id=a6f5ba304bc8155f65f8d350f545ad9c timeout=2000000ms service=781ms state=completed

I create a sessions controller inherited from devise sessions controller and put a binding.pry before self.resource = warden.authenticate!(auth_options), and when I call self.resource = warden.authenticate!(auth_options) in the pry, it says unauthorize and print out something as shown below:
Completed 401 Unauthorized in 14ms (ActiveRecord: 0.0ms)
Processing by SessionsController#new as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"rqUvgDQBUY+Syj6vi1qq07bhC+opQIa0xeXFS45Dprmyb4lQ4c1uuUwBdG0ZXDxwqA+EhdyYmXfIFfbs4MBwqw=="<EMAIL_ADDRESS>"password"=>"[FILTERED]", "user"=>{"remember_me"=>"0"}, "commit"=>"Log in"}
Rendered devise/shared/_links.html.erb (17.5ms)
Rendered devise/sessions/new.html.erb within layouts/application (35.2ms)
Rendered shared/_flash_messages.html.slim (2.7ms)

Here is the routes:
devise_for :users, :controllers => { omniauth_callbacks: "callbacks", registrations: 'registrations', sessions: 'sessions'}

Registration controller:
class RegistrationsController < Devise::RegistrationsController
def create
super
end
def after_sign_in_path_for(resource)
request.env['omniauth.origin'] || stored_location_for(resource) || root_path
end
protected
def after_update_path_for(resource)
user_path(resource)
end
def update_resource(resource, params)
resource.update_without_password(params)
end
def sign_up_params
params.require(:user).permit(:name, :email, :password, :password_confirmation, :avatar)
end
def account_update_params
params.require(:user).permit(:name, :email, :password, :password_confirmation, :current_password, :avatar)
end
end

Sessions controller:
class SessionsController < Devise::SessionsController
def create
self.resource = warden.authenticate!(auth_options)
set_flash_message!(:notice, :signed_in)
sign_in(resource_name, resource)
yield resource if block_given?
respond_with resource, location: after_sign_in_path_for(resource)
end
end

Found the problem. it is the form with email field with name="email"  that make the params include email into user's hash value instead of outside user's hash value.

Thanks for sharing!

Hi andychong1996 Can you please elaborate on the solution?

@Wynandstolp name="email" in the html means that the params hash will have email as a top level key instead of inside the "user" key.
Example:
params: {"email":"foo@bar.com","user":{"password":["FILTERED"]}}
vs
params: {"user":{"email":"foo@bar.com","password":["FILTERED"]}}
email needs to be inside of the user hash of the params. So on the html side the email input needs a name like name="user[email]"

@jpamarohorta ^^

its is getting authenticated for this params:
{"utf8"=>"✓", "authenticity_token"=>"5BMAUoZLUEgPZBVOAcQ8lFD4+pumP9kEvvXyelbnjeO36AZJQt2oRlraicQ6quvh/dccS0ELUkxjACgFcWFYAg=="<EMAIL_ADDRESS>"password"=>"voonik", "phone"=>"9443429932"}, "action"=>"create", "controller"=>"sessions", "format"=>"json"<EMAIL_ADDRESS>"password"=>"voonik", "phone"=>"9443429932"}}}
but failing for this:
{"utf8"=>"✓", "authenticity_token"=>"/ly2phwfsD3HEVkHK39ajYQGv6R4uj2z3B+3eiZEU0qtp7C92IlIM5KvxY0QEY34KSlZdJ+OtvsB6m0FAcKGqw==", "user"=>{"phone"=>"9443429932", "password"=>"voonik"<EMAIL_ADDRESS>"action"=>"create", "controller"=>"sessions", "format"=>"json", "session"=>{"user"=>{"phone"=>"9443429932", "password"=>"voonik"<EMAIL_ADDRESS>Only the order of the data has changed, everything else is the same.
Don't know what is causing the trouble, stuck with this issue for long.

Some times is the orther in the routes file, change the order of the devise routes, thats how I fixed an error that told me to delete the cookies

Had the same issue, turned out, my first model (User) used username attr to authenticate the user, so it was enabled in devise.rb:
config.authentication_keys = [:username, :email]

The second model (Author) didn't utilize the same parameter and it prevented me from authenticating as an Author. I removed :username from authentication_keys option in devise.rb and it fixed the problem.


STORM-2279: Unable to open bolt page of storm ui

I have added logic to wrap the negative indexes around effectively giving it a python like behaviour.
Same as pull #1866

+1


how to make opponent's notes visible as shown here?


TLS Support for Bacula

Add support for TLS in the Bacula module
This PR adds support to configure TLS in Bacula.
Sorry for the mass ping in #245923

Things done

Built on platform(s)

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

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

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] 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

[x] 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.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

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

[x] Fits CONTRIBUTING.md.

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

Pinging @therealr5  @JulianFP since they contributed  before the mass ping

I asked on matrix about multiline module descriptions, and while there is no official convention, it is recommended to use at most one sentence per line, and semantic line feeds on long sentences. This is what the documentation team uses. So maybe reformat that accordingly.

Just asking if I should fix the formatting also in the existing documentation or only in the new?
Also should I run nixpkgs-fmt on evrything?

I'd say just the new, and no, don't run nixpkgs-fmt. Nixpkgs does not yet have an official formatter. There currently is https://github.com/nixos/rfcs/pull/166 trying to establish an official format also creating a formatter implementation, but that can take another while.

Can I keep the commits like they are right now? Because otherwise I would risk a new mass ping.

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-already-reviewed/2617/1351

LGTM, have you ever tested a bacula config using your new tls options?

As you can see at https://github.com/RaHoni/nixos-conf I use it for my Desktop in Production.

you gave up?

No I actualy didn't notice I simply renamed the branch since I want'ed to do another PR and this being master was kinda unfortuned.


Optimize the Min Heap

I made a naive implementation to test out my idea for building dynamic text in order, a minified heap would work much better for fetching min values (log(n) vs o(n)).

Closing this issue since I moved away from a min heap in favor of sorting.

Closing this issue since I moved away from a min heap in favor of sorting.


Document All Capability Atoms and Profiles

Fixes: #4125
Unimplemented Considerations:

This PR does not add support to query all capability-atom's from a command-line option. It is understood that this might be desired, due to this, the logic to generate docs\user-guide\a3-02-reference-capability-atoms.md was made to be "command-line friendly" so minimal changes are needed to pipe our documentation into a command-line option if this change is to be added.

Changes:

Added a way to document atoms inside .capdef. Method to document is described under source\slang\slang-capabilities.capdef. The goal is to error if a public atom does not have any form of documentation to ensure we always have up-to-date documentation to guide user on what an atom is/does. * The following .capdef file syntax was added * /// [HEADER_GROUP] * /// regular comment
When capability generator runs it auto-generates docs\user-guide\a3-02-reference-capability-atoms.md
Added to the user-guide 3 sections: Reference, Reference -> Capability Profiles, Reference -> Capability atoms section

Note: I need to remake this PR, this one will be closed as is.