Putting metrics fails when POWERTOOLS_METRICS_NAMESPACE is not set

Putting metrics will fail with an software.amazon.cloudwatchlogs.emf.exception.InvalidNamespaceException when environment POWERTOOLS_METRICS_NAMESPACE is not set.
What were you trying to accomplish?
After updating cloudwatchlogs-aws-embedded-metrics to 4.1.1 I started to get InvalidNamespaceException when I try to put a metric for example using
MetricsUtils.withSingleMetric("MyMetric, 1.0, Unit.COUNT, metric ->
...
});

Expected Behavior
Possible behaviors I would expect are:

metric is put with a default namespace
no exception is thrown (maybe some internal logging). I would not expect a call to a metrics helper to fail my application with an unchecked exception

Current Behavior
software.amazon.cloudwatchlogs.emf.exception.InvalidNamespaceException is thrown which is an unchecked expception.
The reason is that MetricsUtils sets the namespace to an empty string when the environment variable is not set:
    private static String defaultNameSpace() {
        MetricsContext context = MetricsLoggerHelper.metricsContext();
        return "aws-embedded-metrics".equals(context.getNamespace()) ?
                SystemWrapper.getenv("POWERTOOLS_METRICS_NAMESPACE") : context.getNamespace();
    }

Possible Solution

Keep the original default namespace (aws-embedded-metrics) if POWERTOOLS_METRICS_NAMESPACE is not set
Choose another "default" namespace if POWERTOOLS_METRICS_NAMESPACE is not set

Steps to Reproduce (for bugs)

Call MetricsUtils.withSingleMetric() whithout providing a namespace in POWERTOOLS_METRICS_NAMESPACE

Environment

Powertools for AWS Lambda (Java) version used: 1.17.0
Packaging format (Layers, Maven/Gradle): Gradle
AWS Lambda function runtime: Java 17 (actually discovered in a unit test)
Debugging logs

Hey @roamingthings , thanks for the report! The requirement for the variable [is documented[(https://docs.powertools.aws.dev/lambda/java/core/metrics/), but it does seem a bit odd to explicitly 1/ check if the default hasn't been overriden, and then 2/ override it with an empty string. Inverting the whole thing as you suggest so we override if we have the env var, or use the default otherwise, seems more sensible, and wouldn't be a breaking change.
What do you think @jeromevdl  - ?

First, I didn't really understand this code:
private static String defaultNameSpace() {
        MetricsContext context = MetricsLoggerHelper.metricsContext();
        return "aws-embedded-metrics".equals(context.getNamespace()) ?
                SystemWrapper.getenv("POWERTOOLS_METRICS_NAMESPACE") : context.getNamespace();
}

Looks to me that we should do the contrary: if the env var is empty, set a default, as you suggest.
But I'm not sure how the context namespace is actually set. I've found this which makes me think that "aws-embedded-metrics" is the default. So if it is the default, we try to replace it with the env var, otherwise, it means the user already changed the default somehow (how?) and we should use that.
What is missing here is the check on SystemWrapper.getenv("POWERTOOLS_METRICS_NAMESPACE". If null or empty, we should come back to the default.


[Question] untrusted code and protection against side-channel attacks?

(Premise: these topics are way out of my comfort zone so please forgive me in advance if what I'm saying is complete crap)
As I've been doing some research on V8 Isolates, it seems that one potential risk with them is about side-channel attacks, such as Spectre.
Cloudlfare, which uses V8 Isolates for their Workers, seems to acknowledge this by listing the mitigation they put in place, including limiting the capabilities of the Date method, disallowing multi-threading, etc. Source: https://developers.cloudflare.com/workers/learning/security-model
Given this, how much do you think these concerns apply to v8go?
Or, to put it in other terms: would you trust running untrusted code in this sandbox?

(Not an expert nor repo-contributor yet, but working on similar problems. this is my 2 cents)

No, you can't run untrusted code without some serious mitigations.
As far as I understand,  the driver, your code that uses this library or another library can potentially control what methods are available to the Javascript. For example, the node-js equivalent of performance.Now() wouldn't be available here, because your code wouldn't make such a method available for the guest isolate.
You will need to manage "grouping" of your untrusted code and separating OS processes yourself. For example if you intent do run same untrusted code X1.js 10 times, you are better of reusing the same process, but not if you run 10 independent X1 to X10.js ... if one code is not supposed to see after effects of another code (assuming there is a break-in)
You will need to control network access (both inbound and outbound), filesystem access (if any is given)

May be a better way to think is

If you had to run untrusted "C/native" code, what would you do? Do all that - For example, imagine university shared unix systems used to work, new eBPF filters in recent kernels - That CF article talks about this a lot.
On top of it, v8 would give you additional sandboxing and controlling what the JS can call so you limit the chance of it ever hitting the layer above


[10.x] Fix visibility for Model::incrementQuietly() and Model::decrementQuietly()

A small bug fix where incrementQuietly() and decrementQuietly() can't be used outside the model since they are defined as protected.
The following code is currently failing;
$post = Post::first();

$post->incrementQuietly('views'); // Call to undefined method App\Models\Post::incrementQuietly().

Should be added to the array check in __call.

@taylorotwell thanks your for feedback.
I see that the array check in __call is kept that way because the Eloquent\Builder also has the increment and decrement methods, so invoking User::increment(...) forwards the call to the Builder.
However, the Builder doesn't have the incrementQuietly/decrementQuietly methods, so it may feel a bit less intuitive to use __call, since simply changing protected to public has no side effects, and feels like a better approach.
However, if you believe a check needs to be added in __call, I can go ahead to make the change.


[HW] Partha Sarathi Chowdhury

Name: Partha Sarathi Chowdhury
Email<EMAIL_ADDRESS>Linkedin Profile: http://www.linkedin.com/in/partha-sarathi-chowdhury-72535459

Attach the homework screenshots below for both step II and step III:

Looks good Partha, thank you.

Well done! https://api.badgr.io/public/assertions/7uFkmfXEQaK7z9GG0jShDA?identity__email=pcpschow1%40gmail.com


soroban-rpc: Audit and standardize logging

What problem does your feature solve?
Currently the logging in soroban-rpc is a bit ad-hoc. We should audit what we have, and standardize it for better ingestion by people & other tools.
What would you like to see?

Standardize the logging output format
Standardize the logging severity we use for different info/warnings/errors
Add a --log-level flag so operators can use what level of logging output they want.
Add clear logging during startup so we have tools in-place to debug any potential issues there, and can understand where the service is in the startup process.
Log all incoming jsonrpc method requests and their resolution.

Note, this should be two log entries, one when the request is received, and another one when it is completed, tied together with a request id. (Paul's opinion)

Log all incoming http requests and their response with duration, etc.
Add support for json log formatting (should this be a flag? default?)
Audit to make sure the log outputs do not include any avoidable identifying information, or secrets.

What alternatives are there?

Closing, I think I've covered everything in this ticket. @paulbellamy please reopen if you think otherwise.


Bug: CI 4.2 - running CLI command with csrf enabled causes error

PHP Version
8.0
CodeIgniter4 Version
4.2
CodeIgniter4 Installation Method
Composer (using codeigniter4/appstarter)
Which operating systems have you tested for this bug?
Linux
Which server did you use?
cli
Database
No response
What happened?
After updating to version 4.2 I'm having errors running cli. If I disable csrf filter in App/Config/Filters then I don't get the error.
Steps to Reproduce
Create a controller App\cron\test\run().
Ensure csrf filter enabled.
diff --git a/app/Config/Cookie.php b/app/Config/Cookie.php
index 8ee01c71b..37a24299c 100644
--- a/app/Config/Cookie.php
+++ b/app/Config/Cookie.php
@@ -62,7 +62,7 @@ class Cookie extends BaseConfig
      *
      * @var bool
      */
-    public $secure = false;
+    public $secure = true;

     /**
      * --------------------------------------------------------------------------
diff --git a/app/Config/Filters.php b/app/Config/Filters.php
index d0a97238b..960ae2358 100644
--- a/app/Config/Filters.php
+++ b/app/Config/Filters.php
@@ -34,7 +34,7 @@ class Filters extends BaseConfig
     public $globals = [
         'before' => [
             // 'honeypot',
-            // 'csrf',
+            'csrf',
             // 'invalidchars',
         ],
         'after' => [

Run command: php8.0 /var/www/portal/public/index.php cron/test/run
Response:
[CodeIgniter\Security\Exceptions\SecurityException]
The action you requested is not allowed.
at SYSTEMPATH/HTTP/ResponseTrait.php:711
And in the logs:
CRITICAL - 2022-06-06 09:54:01 --> The action you requested is not allowed.
in SYSTEMPATH/HTTP/ResponseTrait.php on line 711
1 SYSTEMPATH/HTTP/ResponseTrait.php(711): CodeIgniter\Security\Exceptions\SecurityException::forDisallowedAction()
2 SYSTEMPATH/HTTP/ResponseTrait.php(701): CodeIgniter\HTTP\Response->dispatchCookies()
3 SYSTEMPATH/HTTP/ResponseTrait.php(445): CodeIgniter\HTTP\Response->sendCookies()
4 SYSTEMPATH/CodeIgniter.php(1078): CodeIgniter\HTTP\Response->send()
5 SYSTEMPATH/CodeIgniter.php(507): CodeIgniter\CodeIgniter->sendResponse()
6 SYSTEMPATH/CodeIgniter.php(351): CodeIgniter\CodeIgniter->handleRequest()
7 FCPATH/index.php(103): CodeIgniter\CodeIgniter->run()
The error is thrown here:
    private function dispatchCookies(): void
    {
        /** @var IncomingRequest $request */
        $request = Services::request();

        foreach ($this->cookieStore->display() as $cookie) {
            if ($cookie->isSecure() && ! $request->isSecure()) {
                throw SecurityException::forDisallowedAction();
            }

Expected Output
Expected to return without error.
Anything else?
I'm not exactly sure of everything going on here but I've found a way to get rid of the error.
In vendor/codeigniter4/framework/system/HTTP/IncommingRequest Line 348:
    public function isCLI(): bool
    {
        return false;
    }

Replace with the method in version 4.1.8
    public function isCLI(): bool
    {
        return is_cli();
    }

Then everything runs fine.
I'm still trying to find the issue.
Any ideas?

I've confirmed this bug. Thank you for reporting.

@sclubricants
Yes, as a workaround, the following change solves the error.
    public function isCLI(): bool
    {
        return is_cli();
    }

For console call, use spark commands instead of controllers.
https://codeigniter.com/user_guide/cli/cli_commands.html
Using the controller you are loading the Request, Response, Filter classes, which don't make sense for the CLI.

@kenjis @MGatner
https://github.com/codeigniter4/CodeIgniter4/issues/6086#issuecomment-1148006449 makes it work again but it looks like you made that change here https://github.com/codeigniter4/CodeIgniter4/pull/5653 a while ago
Running $this->request->isCLI() from a controller always returns false now. Maybe consider reverting this until your other pull (https://github.com/codeigniter4/CodeIgniter4/pull/6089) goes through?

I reverted https://github.com/codeigniter4/CodeIgniter4/pull/5653 for now.

v4.2.1 has been released with revert #5653, which temporarily fixes this bug.
But the root cause is still there, and we need to fix it.
See #6089


[For Review] Menu/Popover/IconMenu/Dialog Portal updates

This PR
a) currently breaks dialogs
b) introduces a component Popover which is an arbitrary control that shows a popup menu, either onClick or on props.open = true.
c) Popover component wraps menu in IconMenu - nearly transparently.
d) Popover renders to a new DOM Tree, and in theory context should transfer for<EMAIL_ADDRESS>e) Dialog renders into new tree, but has issues that I'll sort shortly...

Updated PR:

Dialog is fixed via a wrapper
I'm having a problem with the DatePickerDialog/TimePickerDialog and contexts - any suggestions welcome @hai-cea @shaurya947
I think there is some scope to simplify menu's now that animation/positioning is delegated to the popover component

I've updated this PR - lots of changes....

New component "Popover"
New mixin "Render to layer"
React 14 support

Updated the following components to use it

Dropdown menu
Icon Menu
Dialog
SelectField
Menu (menus/menu-item.jsx) when it has nested items

It'd be great if review + merge process could start?

@chrismcv are you still having the warnings regarding context? I was hoping they would go away with React v14 as context moves from being owner-based to parent-based.
@oliviertassinari seems like you have reviewed this a little. Is it merge-ready?

v14 has sorted context issues happily.  I removed the initial context hacks that I had in for v13.
I think the changes here are significant, and technically, they are just about there now.
There are a few more docs changes I think we should put in. (And at least one fix to docs site "customisation section").
I've made dialog have an open property which controls visibility and depreciates show and hide.  There is a manual override that allows show and hide but this is defaulted to false which means a breaking change.
The Dropdown/Icon Menu transitions are subtly different from previous.
The bit I'd like you to look at is the interface for position the popover.  I've introduced anchorEl and targetEl positions.  So you can say that the top left of the popover should show originating at the bottom right of the target element.  (see icon menu docs for examples).
My nested menu support is a little rudimentary, its currently missing some keyboard support - but this seems partly true of the new menus stuff in general.

@chrismcv look at #1996 regarding props for Dialog.

@shaurya947 not yet

@shaurya947 I've landed on something very similar to #1996, bar my property is called open rather than isOpen and I haven't removed the imperative API, though am happy to do that?  Was that the final agreement for #1996?

@chrismcv we're slightly short of a final agreement on that. Should reach a conclusion soon hopefully! :-)

@chrismcv There is a lot in this PR. Can't we split this with independent bit?

@oliviertassinari - yes I agree.
Happy to split - and can do so this evening I think.
Does the following make sense (1+2 being dependencies for 3+4)

Render to Layer component
Popover component
Dialog to use render to layer (and fix other dialogs + docs)
IconMenu/NestedMenus

@chrismcv is this PR stale then? Are you going to close it?

closing for now - more to follow


new name?

maybe NeuroImageViz or NeuroDataViz?

I decided to keep ocpviz until we either (1) change the name of the open-connectome software / repo (if we change the name) or (2) ocpviz works standalone w/out the open connectome stack on the same server.

ok, close this.
On Tue, Oct 6, 2015 at 11:40 AM, Alex Baden<EMAIL_ADDRESS>wrote:

I decided to keep ocpviz until we either (1) change the name of the
open-connectome software / repo (if we change the name) or (2) ocpviz works
standalone w/out the open connectome stack on the same server.
—
Reply to this email directly or view it on GitHub
https://github.com/openconnectome/open-connectome/issues/120#issuecomment-145904582
.

--
the glass is all full:  half water, half air.
openconnecto.me, medhacks http://medhacks.org/, calendar
https://www.google.com/calendar/embed?src=afr9t36kknt629jh4omun20n90%40group.calendar.google.com&ctz=America/New_York


close connections created by DialAddr when the session is closed

Fixes #1457. Depends on #1466.

Codecov Report

Merging #1467 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #1467      +/-   ##
==========================================
+ Coverage   89.19%   89.19%   +<.01%
==========================================
  Files         121      121
  Lines        8491     8494       +3
==========================================
+ Hits         7573     7576       +3
  Misses        615      615
  Partials      303      303

Impacted Files
Coverage Δ

client.go
83.73% <100%> (+0.17%)
:arrow_up:

Continue to review full report at Codecov.

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


Default fp16 inference and potentially missing arguments

Hi, thank you for releasing the code. I have a few issues encountered during testing.
One is that, could you please cast the model weight and input to fp16 by default so the model will work on consumer GPUs with around 20 GB memory? It will be more friendly for users without NV AI cards.
Another thing is that seems that some arguments are not set when running paint_it.py, such as objaverse_id (is it the same thing as obj_id), and the learn_lights argument. May I ask if you have tested your program by purely installing from the git repo, especially when some files are excluded from uploading.

Hi, thanks for your interest in our work, and for pointing out some missing arguments.
We have modified and checked our codebase again (by installing from the git repo). It should work now.
Regarding fp16 model weight & input, we'll consider it as our to-do.
Please let me know if you have remaining issues :)
Thanks.

Thank you for fixing.
I will open separate issue if further issues exist.


Error from One wallet not cleaned up when switching to other wallet

If any error happens while using ledger connector, after disconnecting that error shows up when the modal is re opened for other wallets.
It should be cleared on disconnect

Talk to Ledgerwallet Support on the Live support chat so that your issue can be looked into.

Talk to Ledgerwallet Support on the Live support chat so that your issue can be looked into.


Someday: Return generator that makes Event Documents from mongo Cursor

When there are huge numbers of Events:
(Document(e) for e in Cursor)

How did I close this?

No idea.
On Mon, Mar 23, 2015 at 1:55 PM Thomas A Caswell<EMAIL_ADDRESS>wrote:

How did I close this?
—
Reply to this email directly or view it on GitHub
https://github.com/NSLS-II/metadatastore/issues/102#issuecomment-85123340
.

@tacaswell had no @tacaswell to oversee his actions. Open loop lol

When @tacaswell errs, Zeus himself strikes down the offending commit. :zap:

This conversation is why people tell this sort of stuff about us: http://rs2img.memecdn.com/engineers-personality_o_198312.webp


[FLINK-32234][table] Support execute truncate table statement

What is the purpose of the change
To make Flink support to execute truncate table statement
Brief change log

The first commit convert SQLTruncateTable to TruncateTableOperation
The second commit allow to execute TruncateTableOperation
The third commit add test in sql-client for truncate table statement

Verifying this change
UT & IT
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): (yes / no)
The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no)
The serializers: (yes / no / don't know)
The runtime per-record code paths (performance sensitive): (yes / no / don't know)
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / no / don't know)
The S3 file system connector: (yes / no / don't know)

Documentation

Does this pull request introduce a new feature? (yes / no)
If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

@Tartarus0zm Thanks for your review. I have addressed your comments. PTAL.

@flinkbot run azure

@Tartarus0zm Thanks for reviewing...


Add support for when: source

The idea is to skip steps if a source boolean parameter value specified in when: source: step/output is false (prior to really implementing expressions in the GUI and evaluation on the backend / as a tool-ish alternative). Experimenting with this for now, but maybe we can go with a regular hard-coded expression instead (return $job.when_source ?) ... we need to provide the possibility to let workflow authors provide "non-consumed" (as in not mapped to a tool / subworkflow parameter) step inputs for CWL anyway.

Codecov Report
Base: 40.41% // Head: 40.41% // No change to project coverage :thumbsup:

Coverage data is based on head (5788c11) compared to base (13456ce).
 Consider uploading reports for the commit d29c310 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #85   +/-   ##
=======================================
  Coverage   40.41%   40.41%
=======================================
  Files          48       48
  Lines        1915     1915
  Branches      433      433
=======================================
  Hits          774      774
  Misses       1025     1025
  Partials      116      116

Flag
Coverage Δ

unittests
40.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

Not needed, can be expressed with
class: GalaxyWorkflow
inputs:
  should_run:
    type: boolean
  some_file:
    type: data
steps:
  cat1:
    tool_id: cat1
    in:
      input1: some_file
      should_run: should_run
    when: $(inputs.should_run)


[DDW 622] Remove legacy npm references

There were a few legacy references to npm in the build scripts. These have been removed in favour of yarn.
Electron was moved to dependencies instead of devDependencies to manage differences in build process between Windows, OS X, and Linux.

Review Checklist
Basics

[ ] PR has been assigned and has appropriate labels (feature/bug/chore, release-x.x.x)
[ ] PR is updated to the most recent version of the target branch (and there are no conflicts)
[ ] PR has a good description that summarizes all changes and shows some screenshots or animated GIFs of important UI changes
[ ] CHANGELOG entry has been added to the top of the appropriate section (Features, Fixes, Chores) and is linked to the correct PR on GitHub
[ ] Automated tests: All acceptance and unit tests are passing (yarn test)
[ ] Manual tests (minimum tests should cover newly added feature/fix): App works correctly in development build (yarn dev)
[ ] Manual tests (minimum tests should cover newly added feature/fix): App works correctly in production build (yarn package / CI builds)
[ ] There are no flow errors or warnings (yarn flow:test)
[ ] There are no lint errors or warnings (yarn lint)
[ ] There are no prettier errors or warnings (yarn prettier:check)
[ ] There are no missing translations (running yarn manage:translations produces no changes)
[ ] Text changes are proofread and approved (Jane Wild / Amy Reeve)
[ ] Japanese text changes are proofread and approved (Junko Oda)
[ ] UI changes look good in all themes (Alexander Rukin)
[ ] Storybook works and no stories are broken (yarn storybook)
[ ] In case of dependency changes yarn.lock file is updated

Code Quality

[ ] Important parts of the code are properly commented and documented
[ ] Code is properly typed with flow
[ ] React components are split-up enough to avoid unnecessary re-renderings
[ ] Any code that only works in main process is neatly separated from components

Testing

[ ] New feature/change is covered by acceptance tests
[ ] New feature/change is manually tested and approved by QA team
[ ] All existing acceptance tests are still up-to-date
[ ] New feature/change is covered by Daedalus Testing scenario
[ ] All existing Daedalus Testing scenarios are still up-to-date

After Review

[ ] Merge the PR
[ ] Delete the source branch
[ ] Move the ticket to done column on the YouTrack board
[ ] Update Slack QA thread by marking it with a green checkmark

@Sam-Jeston @cleverca22 @disassembler any clue why hydra lint check is failing? I see no lint issues when I run it locally...

This one should NOT be merged without @IuliaDolishniak and @DmitriiGaico running smoke tests on the installers first.

@nikolaglumac apologies I needed to re-write the nix definition for the Hydra linting job, as it did not include yarn as a dependency. Agree these installers should be smoke tested.


Capabilities control in yml

Resolves #505
Sample yml config here: https://github.com/one-two-test/one/blob/main/.github/ubiquibot-config.yml
Disabling Test: https://github.com/one-two-test/one/issues/1#issuecomment-1655711155

Huge conflict here as well :(

Took me an hour to resolve this conflict, QA should be started @Draeieg

Took me an hour to resolve this conflict, QA should be started @Draeieg

Thank you for resolving conflicts. If @Draeieg has no bandwidth, @wannacfuture would you please confirm the QA?

https://github.com/ubiquity/ubiquibot/pull/561
The above PR requires renaming assign -> start, unassign -> stop.

https://github.com/ubiquity/ubiquibot/pull/561
The above PR requires renaming assign -> start, unassign -> stop.

Isn't it supposed to change automatically on merge or show up if there's a conflict?

@0xcodercrane resolved

@0xcodercrane resolved, tested too
I see /assign and /unassign was renamed, fixed that too

@0xcodercrane This json implementation you made just introduced an issue
https://stackoverflow.com/a/58941798/11664341
typescript now copies the /src folder into the /lib instead of just copying the files because you required a file outside the src folder (the json config)

Here is how it looks like now

Which error did you have @devpanther with the current implementation?

typescript now copies the /src folder into the /lib instead of just copying the files because you required a file outside the src > folder (the json config)

I don't catch any hints about the issue in your words.

Read the stackoverflow and try running it locally yourself by deleting lib and running tsc again

@0xcodercrane does the QA code update on code pushes, cause I just did a series of test and it seems to not respond to the changes I made

I think I understand what you're saying. That error happens when you try to run locally, but not in staging/production. because it works a little bit differently. Its a serverless function on staging/production while a local bot is a nodejs app.
ok let me refactor to make it in both mode.

Can this PR be checked?, the QA seems unresponsive too.. Looks like there's something wrong, it is not running this branch's code

I think this would work, just wanted @0xcodercrane to understand the issue and approve its use

Lets do that! @devpanther @wannacfuture

I think this would work, just wanted @0xcodercrane to understand the issue and approve its use

Lets do that! @devpanther @wannacfuture

Added the fix

Waiting for QA approval.

Waiting for QA approval.

I think the QA needs to be set up again, looks broken


Enrollment feature code?

In the "Provision and enroll SIP devices as common area phones" section, step 4 mentions dialling an enrollment feature code. This is the first mention of such a feature code in the document - can you clarify where this code comes from?

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

ID: 05173ea8-db7c-a20d-3783-178b3d649190
Version Independent ID: 05173ea8-db7c-a20d-3783-178b3d649190
Content: Configure SIP Gateway - Microsoft Teams
Content Source: Teams/sip-gateway-configure.md
Service: msteams
GitHub Login: @CarolynRowe
Microsoft Alias: crowe

Adding @danny-levin to this conversation.

Agree. "feature code", is well know term in telephony to invoke features, such as 411 to get local time in USA.  I believe that it self-explanatory, but the text   should be:  "On the SIP device, dial the enrollment feature code 55 , (used by SIP Gateway for code validation),  followed by the verification code that is generated in Teams Admin Center for this particular device. For example, if the verification code is 123456, dial 55123456 to enroll the device."

Minor edit to Danny's comment above, the feature code is <55>. So we should make sure to add the <*> before and after <55>.
So the text should read  as follows -
"On the SIP device, dial the enrollment feature code shown within angular brackets <55> (used by SIP Gateway for enrollment one-time-verification code validation), followed by the verification code that is generated in Teams Admin Center for this particular device. For example, if the verification code is 123456, dial 55123456 to enroll the device."

Not sure why Github removes the "*"


fix: make entire post clickable

Scope
Before only the titles of each post were clickable
With this update the entire post is clickable
Changes made

Wrapped the post component with a <Link /> instead of just the title
Added hover:opacity-75 to the styling on the entire div (same hover style update that is applied to the title)

block text-white no-underline

Implemented


chore(cicd): add pull-request permission

add pull-request permission for update_dict.yml workflow

:tada: This PR is included in version 1.2.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


fix: correct type argument for cast method during socket initialisation

What kind of change does this PR introduce?
Bug fix that corrects the type argument provided to the cast method during Socket initialisation
What is the current behavior?
Documented in #58
What is the new behavior?
Correctly initialises the Socket class
Additional context
NA

Sorry for the delay, thanks for the PR


Add crossOrigin via props to _document Head and NextScript

This alternative implementation of https://github.com/zeit/next.js/pull/5150 follows @timneutkens suggestion of using props.
Fixes #5150
Fixes #3630

You can add this test to test/integration/app-document by checking the HTML response

Ah yes, good idea.  Thanks for telling me which one, that was very helpful.  Tests do not seem to work on windows for me but I was able to WSL them following this: https://github.com/zeit/next.js/blob/canary/contributing.md

Thanks for your help.  I will spend some time figuring out how to get my tests working right.

Great PR @Enalmada!

@jclem didn't know you were running into this at GitHub 😄 Feel free to DM me on spectrum/twitter if you run into specific issues.


triangle: Add JSON test data

Pursuant to dicussion in #202, we won't have cases where a + b = c.
Examples are (2, 4, 2, Isosceles), (1, 3, 4, Scalene), (0, 0, 0, Illegal).
As of this writing, 21 tracks implemented triangle:

https://github.com/exercism/xcsharp/blob/master/exercises/triangle/TriangleTest.cs
https://github.com/exercism/xcpp/blob/master/triangle/triangle_test.cpp
https://github.com/exercism/xclojure/blob/master/exercises/triangle/test/triangle_test.clj
https://github.com/exercism/xcoffeescript/blob/master/exercises/triangle/triangle_test.spec.coffee
https://github.com/exercism/xlisp/blob/master/exercises/triangle/triangle-test.lisp
https://github.com/exercism/xecmascript/blob/master/exercises/triangle/triangle.spec.js
https://github.com/exercism/xelixir/blob/master/exercises/triangle/triangle_test.exs
https://github.com/exercism/xelm/blob/master/exercises/triangle/TriangleTests.elm
https://github.com/exercism/xerlang/blob/master/exercises/triangle/triangle_tests.erl
https://github.com/exercism/xfsharp/blob/master/exercises/triangle/TriangleTest.fs
https://github.com/exercism/xgo/blob/master/exercises/triangle/triangle_test.go
https://github.com/exercism/xhaskell/blob/master/exercises/triangle/test/Tests.hs
https://github.com/exercism/xjava/blob/master/exercises/triangle/src/test/java/TriangleTest.java
https://github.com/exercism/xjavascript/blob/master/exercises/triangle/triangle.spec.js
https://github.com/exercism/xlua/blob/master/exercises/triangle/triangle_spec.lua
https://github.com/exercism/xnim/blob/master/triangle/triangle_test.nim
https://github.com/exercism/xperl5/blob/master/triangle/cases.json
https://github.com/exercism/xpython/blob/master/exercises/triangle/triangle_test.py
https://github.com/exercism/xruby/blob/master/exercises/triangle/triangle_test.rb
https://github.com/exercism/xscala/blob/master/exercises/triangle/src/test/scala/triangle_test.scala
https://github.com/exercism/xswift/blob/master/exercises/triangle/TriangleTest.swift

This JSON file contains the combination of all their tests.
Most tracks have the same set of tests.
Haskell has a case specific to itself added in
exercism/xhaskell#142
This case is added to the common set.
The Go and Nim tracks have tests with +/- Infinity and NaN.
These cases are not added.
Closes #264
Closes exercism/todo#157

I just solved this in the Ruby track, and noticed that at first we test for 0's, then we test for "Triangle Equality" which provides the standard, simple, definition of a Triangle, mathematically.  Once the tests for Triangle Equality happen, the tests for zero can go away.

I agree with @petertseng. The function should receive the side's lengths, so they have to be positive.
I don't understand what would be the interpretation of a negative size, because a vector length cannot be negative:
https://en.wikipedia.org/wiki/Triangle_inequality

In Euclidean geometry and some other geometries, the triangle inequality is a theorem about distances, and it is written using vectors and vector lengths (norms):
∥ x + y ∥ ≤ ∥ x ∥ + ∥ y ∥

https://en.wikipedia.org/wiki/Norm_(mathematics)

In linear algebra, functional analysis, and related areas of mathematics, a norm is a function that assigns a strictly positive length or size to each vector in a vector space—save for the zero vector, which is assigned a length of zero. A seminorm, on the other hand, is allowed to assign zero length to some non-zero vectors (in addition to the zero vector).

Those symbols (The double pipes) indicate absolute values, correct?  This indicates that a "negative" distance is simply a  distance with perspective (or direction), the "length" is absolute.  The choice to normalize or not can be made in the method/function or required to be normalized outside of said function.  Which suggests that the values for those vectors could have been negative, but are normalized in that function.  Hence my view that taking a negative value may not be inappropriate.  But we are free to choose.
The formula you link to using absolute function on the given lengths, suggests that we could go either way, enforcing that we are given "absolute" values.
Given the links you provide and that you understand the formulas, I would challenge your feign of non-mathyness... to use a technical term.

The formula you link to using absolute function on the given lengths...

I think that this is where we disagree. I may be wrong but I think that - in that formula - x, y are vectors in a space.

... This indicates that a "negative" distance is simply a distance with perspective (or direction)...

Isn't signed real number just a 1-dimensional vector? If we treat the values in the exercise as 1-dimensional vectors, only degenerated triangles where a + b = c would be possible, right?

Given the links you provide and that you understand the formulas, I would challenge your feign of non-mathyness... to use a technical term.

I like math, but my knowledge is too shallow to allow me any confidence! :smile:

The inspiration for this exercise is the triangle project from rubykoans.
The second part of that problem includes uses the following test cases:

assert_raise(TriangleError) do triangle(0, 0, 0) end
assert_raise(TriangleError) do triangle(3, 4, -5) end
assert_raise(TriangleError) do triangle(1, 1, 3) end
assert_raise(TriangleError) do triangle(2, 4, 2) end

I think, we should include degenerate triangles (above: 1, 3 & 4) in the test cases.
I think, we should not include triangles with negative edge lengths (above: 2).

I think, we should include degenerate triangles (above: 1, 3 & 4) in the test cases.

I do not care either way about (0, 0, 0) or the related case (10, 10, 0). I will gladly add (0, 0, 0) back in if all interested are agreed.
(1, 1, 3) is not a degenerate triangle; it is a violation of the triangle inequality. I say we have to include this one no matter what (and luckily it is already included).
I also do not care about (2, 4, 2), but many other people in #202 do. I only see myself as enacting the will of the people. I am happy to add it if that is what people want.
Corollary question: If we add (2, 4, 2), should we expect it to be illegal or isosceles? Note for historical context that we asked this question of all tracks in January and also recently merged https://github.com/exercism/x-common/pull/298.

I think, we should not include triangles with negative edge lengths (above: 2).

My current inclination is to keep a case such as (3, 4, -5). If we do not, we may see submitted solutions that would say (3, 4, -100) is a valid scalene triangle, if they were posed such a question.
I can be peruaded that we should not include such caes. For example, in https://github.com/exercism/x-common/pull/287#issuecomment-231602657 there was a concern about tests having edge-itis. If we think that's what's happening here, very glad to drop the test instead.

If 2, 4, 2 is degenerative it should be illegal.  (and it is degenerative).

Here is my understanding of all test cases that require a decision, and what I have done with them in the current state of this PR:

(0, 0, 0): https://github.com/exercism/x-common/pull/311#issuecomment-236503092 indicates support, and most tracks already have. Include.

(3, 4, -5): Exclude because https://github.com/exercism/x-common/pull/311#issuecomment-236503092 shows two votes of support for Exclude.  I will speak briefly about alternatives:

For Include, Illegal: I do think some tracks want to test this, for prevention of code that would declare (3, 4, -100) a legal Scalene triangle, but I am happy to remove the test case to avoid edge-itis!
For Include, Legal: If we make it a legal triangle in this JSON file as https://github.com/exercism/x-common/pull/311#discussion_r72902254 reasonably suggests, tracks will be in direct opposition to what the JSON file says until all tracks update. I will not be the person to submit the PR that puts the file into such a state. I leave that to an interested party, because I'm not interested one bit in making that change.

(2, 4, 2), (1, 3, 4), etc.: Exclude. All right, I know that https://github.com/exercism/x-common/pull/311#issuecomment-236508127 supports Include, Illegal and probably https://github.com/exercism/x-common/pull/311#issuecomment-236503092 supports Include, Illegal as well, but I can't in good conscience include it in light of #202. Once again I think I have to leave it to an interested party.

However, one thing I will do is look through the existing tracks and see how they treat such cases.

 Nevertheless, that's moot if the case is to be removed.

(3, 4, -5): Exclude

I would vote to Exclude, and support the suggestion that if it gets included later we should update the README.

(2, 4, 2), (1, 3, 4), etc.: Exclude

I would also vote to Exclude here, with the reasoning being that the difference between "not a triangle" and "triangle but degenerate" is more about the math than about the interesting part of the programming challenge. I do tend to get pulled into "yes but it's WRONG" discussions, because I am a hopeless pedant (at least when I've had enough sleep to pay attention to the discussion), but I think that it is not helpful to the exercise itself to focus on this issue.

Thanks, everyone.


to_categorical error

it can be resolved by
nb_classes =>num_classes

nb_classes->num_classes. keras changed the vars name.Done


AWS: remove finalizer from deleted awsmachines if lost STS

What this PR does / why we need it:
When the OIDC provider is no longer valid, we should remove the finalizer from deleted AWSMachines given that they cannot be cleaned up by the CAPI provider.
Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes #HOSTEDCP-709
Checklist

[x] Subject and description added to both, commit and PR.
[x] Relevant issues have been referenced.

/lgtm

/cherry-pick release-4.12


Testing

Created rspec for all models, features and requests.

Hello @SaneMyburg
Your project is complete! There is nothing else to say other than... congratulations! 🎉
Status: APPROVED 🔥 🔥
Optional suggestions
Every comment with the [OPTIONAL] prefix won't stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better. Some of them were simply missed by the previous reviewer and addressing them will really improve your application.
Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification.


Update published-odata-resource.md

Proofreading - first edit of Odata Document for review

Please fix conflict

Comments incorporated. Meaningful names given to images used and the attatchements folder also re-named to that of the document.


Game Mode

Description of the new feature / enhancement
My game inputs are kinda wonky while powertoys is running - jumping + moving/strafing is weird in titanfall 2 and is fixed when powertoys is disabled. Would love a global gamemode that pauses everything
Scenario when this would be used?
Avoid misinputs while gaming
Supporting information
It would be nice :)

I too would like this feature to be implemented. Most games nowadays require you to press multiple keys at once and the most common combination is "Space" + "A" which triggers the quick accent overlay and doesn't register my input.

As a workaround, you can add the process name to the excluded apps list in quick accents. However I would love to see this feature implemented as well, as it is very boring to manually add each game to the list.

/dup https://github.com/microsoft/PowerToys/issues/20615


Derive release notes file name from only eng/Versions.props

Re-opening this PR as it's applicable again. With the recent problems calculating build numbers for internal builds, I'm in favor of simplifying our release notes file name to not depend on the build version. This would fix the above scenario, as well as allowing this action to be ran before the final build is completed.

Summary
As mentioned in https://github.com/dotnet/dotnet-monitor/pull/4139, nupkgs are no longer published to blob storage so the aka.ms links that release notes generation relied on are no longer updated.
Instead of using the aka.ms links to generate a file name, use only the information from eng/Versions.props.  As a result the Test option is no longer needed either.
NOTE: Before this PR is merged in, the release pipeline will need to be updated to also use the new file names.
Example PRs (with intentionally blank changelogs):

Preview release: https://github.com/schmittjoseph/dotnet-monitor/pull/302
RTM/Servicing release: https://github.com/schmittjoseph/dotnet-monitor/pull/304

Release Notes Entry

FYI, this script looks up the release version in the release pipeline: https://github.com/dotnet/dotnet-monitor/blob/main/eng/release/Scripts/GetReleaseVersion.ps1

Re-opening this PR as it's applicable again. With the recent problems calculating build numbers for internal builds, I'm in favor of simplifying our release notes file name to not depend on the build version. This would fix the above scenario, as well as allowing this action to be ran before the final build is completed.

This does not fix the ability to generate release notes for internal release builds. Internal releases have commits that are not publicly available at the time of release. Release note generation will not know of the commit nor have access to the version file (since it's in an authenticated blob storage account).
The only way I see the current generation scheme to work for internal builds is to actually generate the release notes on the most-nearly corresponding public release branch. I suppose this is why you want to generate based on the version.props file rather than the actual version. This would generate the same content, except for any release-note-worthy fixes that were made internally.


custom.weights and custom-416

Hello, please help
So
python save_model.py --weights ./data/custom.weights --output ./checkpoints/custom-416 --input_size 416 --model yolov4
I get error
 File "C:\Users\va\Documents\Arduino\yolov4-custom-functions-master\core\utils.py", line 143, in load_weights     conv_weights = conv_weights.reshape(conv_shape).transpose([2, 3, 1, 0]) ValueError: cannot reshape array of size 4554552 into shape (1024,512,3,3)
Where custom.names file?
Please help

Ooook :)
custom.names contain one row "car" its work fine

Ooook :)
custom.names contain one row "car" its work fine

close the issue if it is solved @iabesadze

I'm having same issue
python save_model.py --weights ./data/custom.weights --output ./checkpoints/custom-416 --input_size 416 --model yolov4
results in
File "\third_party_repos\yolov4-custom-functions-master\core\utils.py", line 143, in load_weights
conv_weights = conv_weights.reshape(conv_shape).transpose([2, 3, 1, 0])
ValueError: cannot reshape array of size 4554552 into shape (1024,512,3,3)

Ooook :)
custom.names contain one row "car" its work fine

Can you please explain how this solves the issue?

@GiorgosBetsos Create and fill a text file named custom.names with string car
Then, write it's path on line 14 of 'core/config.py' file.

Any other idea what can be a problem here? My custom model throws same error despite the line 14 in config.py is set correctly. My model has 1 class and there is just one line in custom.names file.

same error tried the above solutions but did not work for the script: python save_model.py --weights ./data/custom.weights --output ./checkpoints/custom-416 --input_size 416 --model yolov4
Output:-
File "/content/yolov4-custom-functions/core/utils.py", line 143, in load_weights
conv_weights = conv_weights.reshape(conv_shape).transpose([2, 3, 1, 0])
ValueError: cannot reshape array of size 84123 into shape (512,1024,1,1)


Bind CTRL-D to Cmd::EndOfFile on Windows

Return Cmd::EndOfFile when there is no input (nothing to kill in emacs mode).
Fix invalid cfg! macro argument.

Fixes #586.

Thanks for the PR.
But I was wrong. Only @thomcc is right.
Could you please fix only cfg!(windows) and keep !wrt.line().is_empty() untouched.


Nearest 99s xp left calculation wrong

Xp calculations for "Nearest 99s" on user pages use level 98 instead of 99 as the target. Indexing issue perhaps?

Thanks @Kedoodle, fixed


New Brew from Local file

This adds a functionality to create a new brew in the new page using contents from a local txt file.
Like the cloning, this erases the previous contents of a new brew.
ToDo

[x] fix nav styling to fit everything
~- [ ] change alert for a nice popup error message~

You were right, that was over-complicating stuff, went for a more traditional approach for the simulated click.

Should be all done and fixed!

Looks good! Merging now!


Print position info when can't find next valid position.

Motivation
When the user reset the cursor and does not find the next valid one, the original log does'nt print position info.
12:13:36.676 [pulsar-web-67-14] INFO  org.apache.pulsar.broker.service.persistent.PersistentSubscription - [persistent://public/default/test][sub] Successfully disconnected consumers from subscription, proceeding with cursor reset
12:13:36.676 [bookkeeper-ml-workers-OrderedExecutor-2-0] ERROR org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl - [public/default/persistent/test] Can't find next valid position, fail back to the next position of the last position.
java.lang.NullPointerException: null
	at org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl.getNextValidPositionInternal(ManagedLedgerImpl.java:3031) ~[io.streamnative-managed-ledger-<IP_ADDRESS>.jar:<IP_ADDRESS>]
	at org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl.getNextValidPosition(ManagedLedgerImpl.java:3018) ~[io.streamnative-managed-ledger-<IP_ADDRESS>.jar:<IP_ADDRESS>]
	at org.apache.bookkeeper.mledger.impl.ManagedCursorImpl.lambda$asyncResetCursor$6(ManagedCursorImpl.java:1086) ~[io.streamnative-managed-ledger-<IP_ADDRESS>.jar:<IP_ADDRESS>]
	at org.apache.bookkeeper.mledger.util.SafeRun$1.safeRun(SafeRun.java:32) [io.streamnative-managed-ledger-<IP_ADDRESS>.jar:<IP_ADDRESS>]
	at org.apache.bookkeeper.common.util.SafeRunnable.run(SafeRunnable.java:36) [org.apache.bookkeeper-bookkeeper-common-4.12.0.jar:4.12.0]
	at org.apache.bookkeeper.common.util.OrderedExecutor$TimedRunnable.run(OrderedExecutor.java:203) [org.apache.bookkeeper-bookkeeper-common-4.12.0.jar:4.12.0]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_281]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_281]
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [io.netty-netty-common-4.1.60.Final.jar:4.1.60.Final]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_281]

So it's better to add position info to the log.

@Technoboy- Thanks for your contribution. For this PR, do we need to update docs?
(The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)


Last online peoples

Hi, is possible to make script with last seen peoples but for last hour, last 12 hours etc? with specific time. thanks lot!

Hi, is possible to make script with last seen peoples but for last hour, last 12 hours etc? with specific time. thanks lot!

Yeah! It's possible, you just need to filter recently active members, all recently seen members will be scrapped and added to the group.


What would the (soon) new Anti-Cheat do to users of this custom launcher?

I am kind of afraid that the (soon) new Anti-Cheat could false detect this launcher as a Cheat yes I am acting like a conspiracy theorist since the source code is right here and it’s nothing bad but worrying about a issue never hurts

i dont think it would have to do anything with this since the anti cheat should be strapped onto robloxplayerbeta and not robloxplayerlauncher, it would make sense if they strapped the anticheat from the robloxplayer though, but the smart decision would be robloxplayerbeta. and if roblox decides ever to stop file replacements then they would have to do something called file integrity verification

I am kind of afraid that the (soon) new Anti-Cheat could false detect this launcher as a Cheat yes I am acting like a conspiracy theorist since the source code is right here and it’s nothing bad but worrying about a issue never hurts

Likely nothing. We're at far less anti-cheat risk than rbxfpsunlocker is, though this might be an unfair comparison, though my point still stands.

i dont think it would have to do anything with this since the anti cheat should be strapped onto robloxplayerbeta and not robloxplayerlauncher

Exactly what I would've said had you not commented before me.


Ensure thread safety of AllOfPromise

What was changed
Replaced the internal AllOfPromise int notReadyCount counter with a thread-safe final AtomicInteger
Why?
AllOfPromise registers multiple Promise instances that were created outside of its scope and uses the handle() method to schedule counter decrements. When the counter reaches zero, it means that all futures completed.
However, handle() method can be executed by different threads, and the internal counter in the current form:

doesn't guarantee that new value will be immediately visible for other threads due to the lack of volatile
doesn't guarantee atomicity of the increment/decrement operations, which can result in lost updates

 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.

 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.

@pivovarit all threads in a workflow are managed and coordinated by the SDK, no external threads not managed by the SDK are allowed to be created inside a workflow, so no two threads are ever running concurrently so this should not be necessary .

Does it mean that those consequent handle() callbacks are effectively executed serially by the same thread?

They  are  executed serially, potentially by different threads, all with all threads using a common lock for serialization


Linux Russian layout input bug

Description
When you connect to game with Russian layout selected, backspace has no effect in any of input boxes (regardless of layout)
I'm sure it's Linux only bug as I encountered it before in another game (but it was related to CEF, never fixed in game) only on Linux (as other people)
Reproduction

Switch to Russian layout in Space Station 14 Launcher
Connect to any server
Try to delete something in input boxes

Additional context
Report about something similar in SDL repo (for reasons unknown closed)
I use Arch btw

not only russian, any not-englush layout when launching client, and boom, you need to restart

Duplicate of #3486


Edit mode for geographic feature does not recognize point coverage in composite resource

If I create a geographic feature in a composite resource that is a point (e.g. from
CubOutlet.zip) this is recognized as a point in the resource level coverage and content metadata in view mode

but in edit mode spatial coverage is indicated to be box and required fields are empty and not able to be edited.  What should be shown is the filled in point required fields (and still not editable)

@dtarb I think this can be closed.


Fix typo in resource-group-create-service-principal-portal.md

Hi @pshelton-skype, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no contribution license agreement is required at this point. Real humans will now evaluate your PR.

TTYL, AZPRBOT;

@pshelton-skype - thanks for making this correction.
@tysonn - this change in the public repo can be merged.


Is there a way to prevent the video from buffering when autoPlay is false?

Hey everyone!
I'm displaying videos in a list with this plugin using the YoutubePlayer, and I'd like to know if it was possible not to load the video until the Play button is pressed, but still show the thumbnail. I could not find any way to do it, and right now this slows the app quite a lot.
I hope you can help me on that, thank you.

The new plugin resolved this issue: https://github.com/sarbagyastha/youtube_player_flutter


17.03's nixStable can't be used to build 17.03

Issue description
Looks like the latest Nix (1.11.10) has security improvements that limit various permissions/ownership actions during a build.
While some of these have been fixed (https://github.com/NixOS/nixpkgs-channels/commit/ad413fdb584736e7db1dc7a17bd6d5384de95904), many remain.
Being able to build packages from source, instead of using the binary cache, is a pretty important requirement for the release channel!
Examples (incomplete list, only one of my builders is using the latest "nix"):

[ ] at
[ ] cron
[ ] logcheck
[ ] logkeys
[ ] udevil
[ ] uucp
[ ] super
[ ] xconq

Steps to reproduce

nix-build '<nixos>' -A at --check
error:

install flags: install SHELL=/nix/store/fi3mbd2ml4pbgzyasrlnp0wyy6qi48fh-bash-4.4-p5/bin/bash
/nix/store/k8dyhz9hrjydl23ny3131am6cws1rc07-coreutils-8.26/bin/install -c -m 755 -d /nix/store/2s9vbmdr7h5mmw5yqf6s78mva0n8mx60-at-3.1.16/bin
/nix/store/k8dyhz9hrjydl23ny3131am6cws1rc07-coreutils-8.26/bin/install -c -m 755 -d /nix/store/2s9vbmdr7h5mmw5yqf6s78mva0n8mx60-at-3.1.16/sbin
/nix/store/k8dyhz9hrjydl23ny3131am6cws1rc07-coreutils-8.26/bin/install -c -m 755 -d /nix/store/2s9vbmdr7h5mmw5yqf6s78mva0n8mx60-at-3.1.16/doc
/nix/store/k8dyhz9hrjydl23ny3131am6cws1rc07-coreutils-8.26/bin/install -c -m 755 -d /nix/store/2s9vbmdr7h5mmw5yqf6s78mva0n8mx60-at-3.1.16/doc/at
/nix/store/k8dyhz9hrjydl23ny3131am6cws1rc07-coreutils-8.26/bin/install -c -m 6755 -s at /nix/store/2s9vbmdr7h5mmw5yqf6s78mva0n8mx60-at-3.1.16/bin
/nix/store/k8dyhz9hrjydl23ny3131am6cws1rc07-coreutils-8.26/bin/install: cannot change permissions of '/nix/store/2s9vbmdr7h5mmw5yqf6s78mva0n8mx60-at-3.1.16/bin/at': Operation not permitted
make: *** [Makefile:98: install] Error 1

Technical details

System: (NixOS: nixos-version, Ubuntu/Fedora: lsb_release -a, ...)
17.03.1316.412b0a17aa (Gorilla)
Nix version: (run nix-env --version)
nix-env (Nix) 1.11.10
Nixpkgs version: (run nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion)
17.03.1316.412b0a17aa
Sandboxing enabled: (run grep build-use-sandbox /etc/nix/nix.conf)
build-use-sandbox = true

Solutions

Address the failing packages, as has been done already with openssl and others.
Revert the Nix version bump (if these issues can't be resolved in a timely fashion, but I'm optimistic)
Throw Hydra-powered builder goodness at rebuilding the channel from scratch

Possibly automate this when a Nix version change is introduced (?)

Even util-linux fails (mount wants to be setuid).

A few more from release-17.03:

xsokoban
unnethack
torque
rewritefs
rssh
hiawatha

Yes, these security fixes caused possibly dozens of failures.  I mainly fixed the channel blockers, except for ova #25901 (which isn't exactly the same problem, I think).  A possible general workaround for much of this would be to create wrappers for chmod and install that disregard those fancy bits, but it might be in the end better to simply patch all the individual packages.

Can the seccomp filter in nix just mask unallowed bits?

SECCOMP_RET_TRACE + ptrace could do the job.

seccomp itself can probably do it, but not on Darwin (as Eelco wrote), which is why I was thinking of the wrappers.  (Though parsing the arguments in all edge cases probably wouldn't be trivial in the wrappers.)  Still, I don't think the Darwin sandbox disallows the bits ATM :-)

See the security advisory:

On macOS, the restriction is implemented using the existing sandbox
mechanism, which now uses a minimal "allow all except the creation of
setuid/setgid binaries" profile when regular sandboxing is disabled.

On darwin builds will now always run in a sandbox that disallows setuid, but that will just silently ignore it instead of killing the process IIRC.

Thanks @lheckemann I somehow missed the security advisory, which explains the urgency for fixing these issues despite the fallout. :+1:
@vcunat patching the individual packages seems the way to go, especially if the number of package listed in this issue are at all indicative.

(Will stop cc'ing this and move to a new PR fixing mentioned packages)

@LnL7 IIRC, the Darwin sandbox causes chmod +s to fail with EPERM, just as on Linux. (We don't kill the process on Linux, though seccomp does allow that.)

All packages mentioned in this issue have been fixed in #26628.  I need to get to other things, but if someone has a more complete list (hydra evaluation comparison, maybe?) that'd be useful so they can get handled as well.

[ ] sudo

@vcunat done!

Is this issue resolved at this point, or are there more to do?

Well, let's close until we find more of them.

Actually, the fixes need picking to 17.03.  I'd wait for a couple of days before that, even though the changes seem relatively safe.

[ ] glusterfs

There's been a stdenv rebuild on staging, so more are creeping up:

[ ] libcgroup
[ ] libutemper
[ ] irods
[ ] firejail

There's probably some more, as there was a transient fail of go build, drowning the real failures.  Let me merge master to staging to clear errors that we've fixed already.

Thanks @vcunat! That would be great.
Updating the issue with a combined list, added thttpd which I stumbled upon.

Looks like coreutils-8.27 fails to build due to the install tests too due to this.
FAIL: tests/install/install-C
=============================

ginstall: the --compare (-C) option is ignored when you specify a mode with non-permission bits
ginstall: cannot change permissions of 'b': Operation not permitted
ginstall: the --compare (-C) option is ignored when you specify a mode with non-permission bits
ginstall: cannot change permissions of 'b': Operation not permitted
ginstall: options --compare (-C) and --preserve-timestamps are mutually exclusive
Try 'ginstall --help' for more information.
ginstall: options --compare (-C) and --strip are mutually exclusive
Try 'ginstall --help' for more information.
FAIL tests/install/install-C.sh (exit status: 1)

Fixing some of these, WIP:
https://github.com/dtzWill/nixpkgs/tree/fix/perms-fallout-misc-2

@dtzWill have you looked at the fixes which are already in staging (coreutils tests for example).

Couldn't reproduce mtr, and I think the qtsvg will need a separate issue--due to scope but also for testing reasons.
I did not know things were being fixed on staging, thanks for letting me know! I'll take a look.

@joachifm hmm it looks there are some fixes on master that aren't on staging (yet?), and AFAICT from a quick look only coreutils has been fixed on staging but not master.  LMK if you know of any others, I'll look a bit further myself :).

rssh is broken due to a suid issue. I did see rssh in one of the lists, but are you also aware of that issue?

@0xABAB rssh should have been fixed with https://github.com/NixOS/nixpkgs/commit/7eaa7adf4e7f3e32be85dcf3bd34ffd6b4cf23be which is now on master.  I'm not sure what plans there are, or might be, regarding cherry-picking these onto the 17.03 branch.

That PR is pushed to 17.03 now, too.

Awesome, TYVM for taking care of that! :+1:

I actually had an idea regarding the whole sticky bit thing, which you might consider to be gross, but we could compile chmod in such a way that it does a noop for all the things that we don't want it to do. That would eliminate a ton of 'sed' commands.
For cp a similar thing could be done. The disadvantage is that a huge combination of these things would confuse someone reading and executing the code on their machine, although we could also add a debug mode in which it would print out something like Not setting sticky bit here, because of Nix security issue documented at <url>.
The assumption here is that tools like chmod and cp don't change a lot and patching a single branch is unlikely to break.

I'm uncomfortable patching our "core" utilities to do non-standard things silently.  Giving them a name like "fake-suid-coreutils" or something would help IMO but I think addressing these in all of our derivations is the right answer, even if it's a bit of a chore and noisy.  Let's see if you folks agree with my reasoning:
Every instance that is patched is a divergence from the build system's normal behavior, and for that reason deserves an explicit mention in the derivation expression IMO.  Just how patches aren't taken from a global patch lookup table (usually :P), the explicit and local specification of what is being changed is IMHO more important than refactoring all these into a magical coreutils that hides these changes.
While all the changes made as part of this issue /appear/ to be nothing but tedious fixes, every one of them signifies that the resulting output will not behave as the upstream author intended regarding special permission bits or application of user/groups that don't exist.  Many of these had to be dealt with elsewhere, perhaps after a confused user wondered why a packaged piece of software didn't act as expected (since a suid wrapper wasn't created for it, maybe).
Basically I think making these fail immediately is actually a good thing as it forces someone to sit down and determine how to handle this behavior.  Silently squashing the problems seems appealing (elegant even) for the set of software we already support since for the most part we've already addressed how to handle them re:wrappers and whatnot, but for new software that won't be the case.  Furthermore mentioning it in the derivation has an important locality property that helps when updating packages.
Thoughts? :)

Fully agreed, @dtzWill.

I considered that approach, but only as wrappers used exclusively during nix builds (i.e. injected by stdenv) and not in the user-visible utilities.  One advantage would be portability, unlike seccomp, and we wouldn't need to patch individual packages (but that part is mostly done now :).

@vcunat The injected via stdenv approach was also how I envisioned it.
Let's say I have a program named sui which on Debian would have the suid bit set in /usr/bin/sui. How can I replicate the same end user behaviour for a user named bob on NixOS who could just execute sui in their shell before this change? (I can think of some terrible hacks, but I just would like to know how this was envisioned.)

On NixOS we do this via the setuid wrappers.

As @vcunat said, the setuid wrappers provide this on NixOS through the security.wrappers option.
setuid is deliberately not supported by Nix itself because it would more or less break one of nix's loveliest practical advantages — unprivileged package management — or come with a great deal of security headaches. I don't think there's a recommended approach for non-NixOS systems but I'd suggest using sudo to gain the necessary privileges.

AFAICS all occurences mentioned here have been fixed => closing

Agreed, thanks!

Hello, I am new to nixpkgs. Installing ripgrep-0.5.2 failed for me when build-use-chroot = true is set  in my nix.conf. I am running nix on debian stretch. I am pretty sure this issue belongs here, but let me know if I am wrong or any more info is needed!

Hi @david-varela , is this specifically because it's trying to install binaries with setuid? I don't think ripgrep should ever need setuid. If it's not doing so, it's not this issue and you should open a new one.

@lheckemann, you are correct. Sorry about that, I had a temporary mind lapse from lack of sleep. I'll dig around a little more and open a seperate issue if necessary, thanks


HDDS-9405. Make PipelineStateMap thread-safe

What changes were proposed in this pull request?
Proposal:
Change PipelineStateMap implementation to thread-safe using ConcurrentHashMap in order to improve performance of SCM.
Reason:
As we can see from performance testing, there is a bottleneck in SCM when operating large amount of files, regardless of cluster size. This is a first part of resolving the issue.
Detailed description:
In order to solve the problem and avoid waiting for one synchronisation point by the whole cluster, the task was divided into several parts. It is proposed to solve the problem layer by layer, starting from the lowest one.

The core of the pipeline management is PipelineStateMap, which is now implemented as a non thread-safe storage container for active pipelines. To reliably implement multithread execution, it is necessary to make the class concurrent and thread-safe, through the use of ConcurrentHashMap.

Layer two is PipelineStateManager which uses PipelineStateMap. Its implementation has single ReadWriteLock for all operations. Due to the thread-safe PipelineStateMap, the lock can be removed, or at least weakened, as many operations can be concurrently performed.

The next layer is the PipelineManager, here also a single ReadWriteLock is used, and some methods can be executed through the capture of the read lock, by supporting competitive execution in the PipelineStateManager and PipelineStateMap.

As a result, a performance increase is expected when processing a large number of files/pipelines, since after all the changes we will move away from a single synchronisation point in SCM, the bottle neck expected to be gone.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-9405
How was this patch tested?
Public interface of PipelineStateMap covered with unit tests.

In the PR description, can you provide some details of the problems you saw which this re-write solves?
Also, there are many changes which are just formatting changes, eg at the start of methods. Please avoid making format only changes as it makes the PRs more difficult to review and to backport to other branches if needed.

@sodonnel, I extended description and rollbacked formatting changes where it was possible

I checked the linked Jira, and the problem you have mentioned is around EC pipelines. I am not sure we need to re-write the entire pipeline manager due to this. More, we need to consider how the EC pipelines are allocated, and perhaps close EC pipelines as soon as the container is closed. I had an earlier attempt to do this, but I had to revert it as it caused some problem with locking around Ratis - https://issues.apache.org/jira/browse/HDDS-9151 . That is one problem that is slowing down the EC pipeline selection as it starts iterating the list and potentially finds many pipelines to be closed.
Allocating new pipelines should be a very fast operation, even under a single lock.
Were the performance tests run against a recent apache master version?

I think we have a problem with EC for sure, but Ratis pre-creates all its pipelines up front, so it should not have a "pipeline creation" or "pipeline closing" problem at run time. It might have a container allocation problem, but I am not sure.
If we are having to allocate containers too quickly, it also suggest we have too few pipelines and too few containers per pipeline (for Ratis).
If the slowest part is the call to Ratis, and we can only send one thing to Ratis at a time, then making pipeline manager lock free is not going to help, as it will all stack up at the Ratis call. So if your profiles are showing the call to Ratis to replicate the SCM changes across the SCM, then perhaps we should focus on Ratis to see if it can be made faster.
It would be interesting to see how the throughput looks for Ratis writes with a sufficient number of pipelines as it should have a different profile than EC.

The solution to the problem you are seeing, which is stalled container selection on SCM, is likely to be moving pipeline creation into the background, and probably pipeline closing too.
Ratis pipelines tend to not close, as they are long lived, but for EC we are creating pipelines on demand. We probably need to create the EC pipelines in the background too, and then handle closing then out of the hot read path.
Reworking how EC pipelines get created and allocated is a safer and hopefully small change that re-writing much of SCM to introduced stripped locking.

/pending conflicts


Preemptive PR on GPU'less compile

I am posting this PR preemptively so Tuna people can see my changes.
The idea is:

Set env var to compile only (for desired arch/num_cu) - through Precompile kernels and dump blobs into kern_db
Move kern cache to machine where the kernels will execute
Run through regular invokers code which will compile (if kernel not already present in kern_db) and execute. Note: the kernel will already be in kern_db from the compile step.

The following steps need to happen:
build with MIOPEN_SQLITE_KERN_CACHE=ON
To compile we need to set the following env vars:
export MIOPEN_DEBUG_CONV_GEMM=0  (GEMM code path has not been implemented for this)
export MIOPEN_CUSTOM_CACHE_DIR=test (this will be appended to ~/.cache)
export MIOPEN_FIND_ENFORCE=4
export MIOPEN_COMPILE_AND_RUN=0 (compile only, escape generic search early)
export MIOPEN_DEVICE_ARCH=gfx906 (or whatever other supported arch)
export MIOPEN_DEVICE_CU=60 (or any other num_cu)
Ro run:
export MIOPEN_DEBUG_CONV_GEMM=0 (this can also be left out and invokers will actually compile and run as well)
export MIOPEN_CUSTOM_CACHE_DIR=test (must be same location as compile so it can find compiled kernels)
export MIOPEN_FIND_ENFORCE=4
export MIOPEN_COMPILE_AND_RUN=2 (anything but 0, can also be left unset)
I have tested as such:

compile only(for arch/num_cu different than my own machine) and check kern_db to make sure its populated with compiled kernels.
moved ukdb to machine with arch/num_cu for which it was compiled for.
set appropriate env vars to pick up custom cache location and run.
executed above steps for both hip and opencl
tested with rocm 3.5

Feel free to propose some actual utest I can add.
Blocked by: https://github.com/ROCmSoftwarePlatform/MIOpen/pull/203

@alexandraBara This change affects +989 −1,791 lines. Are all of these changes really required?

@alexandraBara This change affects +989 −1,791 lines. Are all of these changes really required?

remember this branched off ddu/invoker-tune. most of the changes are his until he merges his branch the diff will be quite big.

@alexandraBara This change affects +989 −1,791 lines. Are all of these changes really required?

remember this is branched of ddu/invoker-tune. most of the changes are his until he merges his branch the diff will be quite big.

In this case could you please change base branch of this PR to ddu/invoker-tune? Please see https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/changing-the-base-branch-of-a-pull-request. This would greatly simplify reviewing.
I also recommend marking PR as a Draft to prevent it from merging into ddu/invoker-tune. Thanks.

@alexandraBara I've merged @DrizztDoUrden latest PR. Please update this PR with the latest develop and resolve conflicts.

@DrizztDoUrden Please review this PR.

@alexandraBara This change affects +989 −1,791 lines. Are all of these changes really required?

remember this is branched of ddu/invoker-tune. most of the changes are his until he merges his branch the diff will be quite big.

In this case could you please change base branch of this PR to ddu/invoker-tune? Please see https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/changing-the-base-branch-of-a-pull-request. This would greatly simplify reviewing.
I also recommend marking PR as a Draft to prevent it from merging into ddu/invoker-tune. Thanks.

Vasili's branch went in, so now its a PR from develop. Is this ok?


Failed to open TCP connection to stager.service.cf.internal:8888

When trying to push a docker app to CF, i'm getting the folowing error:
Server error, status code: 500, error code: 170011, message: Stager error: Failed to open TCP connection to stager.service.cf.internal:8888 (getaddrinfo: Name or service not known)

Thanks for the report, @IvanAR. What versions of the CF and Diego BOSH releases are you running, and on what infrastructure?
That error message indicates that the Cloud Controller is unable to look up the stager component on the CC-Bridge via stager.service.cf.internal in Consul DNS. Does it occur only for Docker-image based apps, or also for buildpack-based apps? If you have any existing apps running, are you able to run cf apps or cf app APP_NAME successfully, or do you get a similar error?
Also, could you please run bosh instances --ps against your CF and Diego deployments and share the output? It would be helpful to verify that the consul_agent job is co-located with both the Cloud Controller and the CC-Bridge jobs and that everything is reporting as running.
Thanks,
Eric, CF Runtime Diego PM

Hi @ematpl,
I'm running a BOSH Lite inside Virtual Box with CF version 6.21.1+6fd3c9f-2016-08-10
For the releases, I used the tarball in this link http://bosh.io/releases/github.com/cloudfoundry/cf-release
I tried only with docker, no buildpack-based.
When i run cf apps, it returns me the deployed app (and no errors):
name      requested state   instances   memory   disk   urls
midgard   stopped           ?/1         256M     1G     midgard.bosh-lite.com

I think something strange hapenned with command bosh instances --ps:
vagrant@agent-id-bosh-0:~$ bosh instances --ps
RSA 1024 bit CA certificates are loaded due to old openssl compatibility
Please choose deployment first

If i run bosh vms, i get:
vagrant@agent-id-bosh-0:~$ bosh vms
RSA 1024 bit CA certificates are loaded due to old openssl compatibility
Acting as user 'admin' on 'Bosh Lite Director'
Deployment 'cf-warden'

Director task 39

Task 39 done

+---------------------------------------------------------------------------+---------+-----+-----------+--------------+
| VM                                                                        | State   | AZ  | VM Type   | IPs          |
+---------------------------------------------------------------------------+---------+-----+-----------+--------------+
| api_z1/0 (ce6cf8fc-ee3e-4bd9-9859-334d5dc39c5c)                           | running | n/a | large_z1  | <IP_ADDRESS> |
| blobstore_z1/0 (9a52cb43-5cc8-40df-bc31-20de6f59030c)                     | running | n/a | medium_z1 | <IP_ADDRESS> |
| consul_z1/0 (77550e2c-8f21-421a-a838-ade9fafc0f35)                        | running | n/a | small_z1  | <IP_ADDRESS>  |
| doppler_z1/0 (333b62ef-9e7e-49c8-a501-fd1d947f6e00)                       | running | n/a | medium_z1 | <IP_ADDRESS> |
| etcd_z1/0 (cd2550ca-6a53-4a79-9bb5-24f84df07aa7)                          | running | n/a | medium_z1 | <IP_ADDRESS>  |
| ha_proxy_z1/0 (7966058e-86e7-4fe7-9c9c-772776fa38b8)                      | running | n/a | router_z1 | <IP_ADDRESS>  |
| hm9000_z1/0 (5c536380-4d97-4b39-8fe3-2f9e0556ef9f)                        | running | n/a | medium_z1 | <IP_ADDRESS> |
| loggregator_trafficcontroller_z1/0 (cbebf626-1877-4e7b-84dc-0919966abfb1) | running | n/a | small_z1  | <IP_ADDRESS> |
| nats_z1/0 (2661d4f1-e16e-45a8-a819-16e8c800048d)                          | running | n/a | medium_z1 | <IP_ADDRESS>   |
| postgres_z1/0 (7433d519-12b7-41fd-abeb-cc3d2d51ff58)                      | running | n/a | medium_z1 | <IP_ADDRESS>  |
| router_z1/0 (320c6019-5b34-4d8a-ac33-ab405ee21d9f)                        | running | n/a | router_z1 | <IP_ADDRESS>  |
| runner_z1/0 (efdf8423-a1dd-49d4-9d2e-3c7cfd02a168)                        | running | n/a | runner_z1 | <IP_ADDRESS>  |
| uaa_z1/0 (00d9db65-8a2d-49a3-9aa4-8b360a251d9d)                           | running | n/a | medium_z1 | <IP_ADDRESS> |
+---------------------------------------------------------------------------+---------+-----+-----------+--------------+

VMs total: 13

Thanks for the help!
Att,
Ivan A. Reffatti

Hi, @IvanAR,
From your bosh vms output, you don't seem to have Diego deployed. With the current manifest-generation templates in cf-release, it's still a separate deployment from the CF deployment, but you can find instructions at https://github.com/cloudfoundry/diego-release/tree/develop/examples/bosh-lite. If you're interested in running Docker images as CF apps, you'll also have to make sure to enable the Docker feature flag via cf enable-feature-flag diego_docker. Please let us know if you have questions!
Thanks,
Eric

Hi @ematpl ,
Thanks for the help, now it's working! But I'm worried about this point in the documentation:

Diego does not currently support fetching images from private repositories.

Is private repositories going to be supported? If yes, do you have a deadline?
Thanks,
Ivan

Hi, @IvanAR,
We intend CF at some point to support fetching images from Docker registries or repositories that require authentication, but there aren't yet stories in the appropriate team trackers, so no clear estimate on when it will be implemented.
Thanks,
Eric

Also, since your original issue is resolved, I'll close out this issue.
Best,
Eric

Yes, thank you very much!

link is broken for  https://github.com/cloudfoundry/diego-release/tree/develop/examples/bosh-lite. can any one point me to the correct link

Link is broken for https://github.com/cloudfoundry/diego-release/tree/develop/examples/bosh-lite. Can you share the correct link...
I am also getting "Error restarting application: Server error, status code: 503, error code: 170010, message: Stager is unavailable: getaddrinfo: Name or service not known (bbs.service.cf.internal:8889)" after fresh cf-deployment using cf-release and Bosh Lite.
+---------------------------------------------------------------------------+---------+-----+-----------+--------------+
| VM                                                                        | State   | AZ  | VM Type   | IPs          |
+---------------------------------------------------------------------------+---------+-----+-----------+--------------+
| api_z1/0 (667e6b9a-7f3e-4146-914c-49077b7c1014)                           | running | n/a | large_z1  | <IP_ADDRESS> |
| blobstore_z1/0 (23839845-71ce-4c6e-8ef8-a8c06c00f9e5)                     | running | n/a | medium_z1 | <IP_ADDRESS> |
| consul_z1/0 (120bc488-3e04-42b1-b96e-94423c5cedd3)                        | running | n/a | small_z1  | <IP_ADDRESS>  |
| doppler_z1/0 (187e4ac6-1cb6-476a-89ac-07e67efa0a79)                       | running | n/a | medium_z1 | <IP_ADDRESS> |
| etcd_z1/0 (a99e21e6-5ff3-4c34-8be3-c57182ebd74c)                          | running | n/a | large_z1  | <IP_ADDRESS>  |
| ha_proxy_z1/0 (793ca126-f998-49ba-bfd7-a68f5e793f90)                      | running | n/a | router_z1 | <IP_ADDRESS>  |
| loggregator_trafficcontroller_z1/0 (3f3a4b21-d3d5-44e6-b4e2-7074fd5c5dbd) | running | n/a | small_z1  | <IP_ADDRESS> |
| nats_z1/0 (2083351e-3809-461e-b289-61f0c13b157f)                          | running | n/a | medium_z1 | <IP_ADDRESS>   |
| postgres_z1/0 (fee5b174-d535-4e1f-9ac0-0de3b87b09b0)                      | running | n/a | medium_z1 | <IP_ADDRESS>  |
| router_z1/0 (63fd4873-5e6e-44c4-b0ec-9ac5d2abc66b)                        | running | n/a | router_z1 | <IP_ADDRESS>  |
| uaa_z1/0 (245fb373-4af6-4361-a162-50a49dd74a48)                           | running | n/a | medium_z1 | <IP_ADDRESS> |
+---------------------------------------------------------------------------+---------+-----+-----------+--------------+
VMs total: 11

@parthasarathi204 @sukhdeepsinghkohli Please use the cf-deployment repository to deploy a recent version of CF to BOSH-Lite. The instructions at https://github.com/cloudfoundry/diego-release/tree/develop/examples/bosh-lite have been deprecated and subsequently removed now that cf-release is no longer supported.
Also, in general it is not a recommended practice to request help on GitHub issues that are already closed. In the future, if you would like to request help via GitHub issues, create a new issue on the repository with a clear statement of your problem and, if appropriate, refer to earlier issues for context.
Best,
Eric, CF Diego PM


Fix assert message in assert API

Fixes #2118 .
Did you remember to?

[x] Add test case(s)
[x] Update CHANGES.txt

We encourage pull requests that:

Add new features to TestNG (or)
Fix bugs in TestNG

If your pull request involves fixing SonarQube issues then we would suggest that you please discuss this with the
TestNG-dev before you spend time working on it.

It has been tricky somehow because of the default assert message. Hope I have got it right with this pull request.

@jiong-fu
From your dev branch, can you please share the output of the following tests here as a comment. That would add a bit more clarity. I would like to compare and contrast the two outputs
import org.testng.Assert;
import org.testng.annotations.Test;

public class AssertSamples {

  @Test
  public void f1() {
    Assert.assertEquals(true, false);
  }

  @Test
  public void f2() {
    Assert.assertNotEquals(true, true);
  }

  @Test
  public void f3() {
    Object object = new Object();
    Assert.assertNotSame(object, object);
  }

  @Test
  public void f4() {
    Assert.fail();
  }

  @Test
  public void f5() {
    Assert.assertTrue(false);
  }

  @Test
  public void f6() {
    Assert.assertFalse(true);
  }

}

Here's the surefire execution output from 7.0.0
[INFO] Running com.rationaleemotions.AssertSamples
[ERROR] Tests run: 6, Failures: 6, Errors: 0, Skipped: 0, Time elapsed: 0.399 s <<< FAILURE! - in com.rationaleemotions.AssertSamples
[ERROR] f1(com.rationaleemotions.AssertSamples)  Time elapsed: 0.015 s  <<< FAILURE!
java.lang.AssertionError: expected [false] but found [true]
        at com.rationaleemotions.AssertSamples.f1(AssertSamples.java:10)

[ERROR] f2(com.rationaleemotions.AssertSamples)  Time elapsed: 0 s  <<< FAILURE!
java.lang.AssertionError: did not expect to find [true] but found [true]
        at com.rationaleemotions.AssertSamples.f2(AssertSamples.java:15)

[ERROR] f3(com.rationaleemotions.AssertSamples)  Time elapsed: 0 s  <<< FAILURE!
java.lang.AssertionError: expected not same [java.lang.Object@185d8b6] but found [java.lang.Object@185d8b6]
        at com.rationaleemotions.AssertSamples.f3(AssertSamples.java:21)

[ERROR] f4(com.rationaleemotions.AssertSamples)  Time elapsed: 0 s  <<< FAILURE!
java.lang.AssertionError: null
        at com.rationaleemotions.AssertSamples.f4(AssertSamples.java:26)

[ERROR] f5(com.rationaleemotions.AssertSamples)  Time elapsed: 0 s  <<< FAILURE!
java.lang.AssertionError: did not expect to find [true] but found [false]
        at com.rationaleemotions.AssertSamples.f5(AssertSamples.java:31)

[ERROR] f6(com.rationaleemotions.AssertSamples)  Time elapsed: 0 s  <<< FAILURE!
java.lang.AssertionError: did not expect to find [false] but found [true]
        at com.rationaleemotions.AssertSamples.f6(AssertSamples.java:36)

[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR]   AssertSamples.f1:10 expected [false] but found [true]
[ERROR]   AssertSamples.f2:15 did not expect to find [true] but found [true]
[ERROR]   AssertSamples.f3:21 expected not same [java.lang.Object@185d8b6] but found [java.lang.Object@185d8b6]
[ERROR]   AssertSamples.f4:26 null
[ERROR]   AssertSamples.f5:31 did not expect to find [true] but found [false]
[ERROR]   AssertSamples.f6:36 did not expect to find [false] but found [true]
[INFO]
[ERROR] Tests run: 6, Failures: 6, Errors: 0, Skipped: 0

@jiong-fu
From your dev branch, can you please share the output of the following tests here as a comment. That would add a bit more clarity. I would like to compare and contrast the two outputs
import org.testng.Assert;
import org.testng.annotations.Test;

public class AssertSamples {

  @Test
  public void f1() {
    Assert.assertEquals(true, false);
  }

  @Test
  public void f2() {
    Assert.assertNotEquals(true, true);
  }

  @Test
  public void f3() {
    Object object = new Object();
    Assert.assertNotSame(object, object);
  }

  @Test
  public void f4() {
    Assert.fail();
  }

  @Test
  public void f5() {
    Assert.assertTrue(false);
  }

  @Test
  public void f6() {
    Assert.assertFalse(true);
  }

}

Here's the surefire execution output from 7.0.0
[INFO] Running com.rationaleemotions.AssertSamples
[ERROR] Tests run: 6, Failures: 6, Errors: 0, Skipped: 0, Time elapsed: 0.399 s <<< FAILURE! - in com.rationaleemotions.AssertSamples
[ERROR] f1(com.rationaleemotions.AssertSamples)  Time elapsed: 0.015 s  <<< FAILURE!
java.lang.AssertionError: expected [false] but found [true]
        at com.rationaleemotions.AssertSamples.f1(AssertSamples.java:10)

[ERROR] f2(com.rationaleemotions.AssertSamples)  Time elapsed: 0 s  <<< FAILURE!
java.lang.AssertionError: did not expect to find [true] but found [true]
        at com.rationaleemotions.AssertSamples.f2(AssertSamples.java:15)

[ERROR] f3(com.rationaleemotions.AssertSamples)  Time elapsed: 0 s  <<< FAILURE!
java.lang.AssertionError: expected not same [java.lang.Object@185d8b6] but found [java.lang.Object@185d8b6]
        at com.rationaleemotions.AssertSamples.f3(AssertSamples.java:21)

[ERROR] f4(com.rationaleemotions.AssertSamples)  Time elapsed: 0 s  <<< FAILURE!
java.lang.AssertionError: null
        at com.rationaleemotions.AssertSamples.f4(AssertSamples.java:26)

[ERROR] f5(com.rationaleemotions.AssertSamples)  Time elapsed: 0 s  <<< FAILURE!
java.lang.AssertionError: did not expect to find [true] but found [false]
        at com.rationaleemotions.AssertSamples.f5(AssertSamples.java:31)

[ERROR] f6(com.rationaleemotions.AssertSamples)  Time elapsed: 0 s  <<< FAILURE!
java.lang.AssertionError: did not expect to find [false] but found [true]
        at com.rationaleemotions.AssertSamples.f6(AssertSamples.java:36)

[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR]   AssertSamples.f1:10 expected [false] but found [true]
[ERROR]   AssertSamples.f2:15 did not expect to find [true] but found [true]
[ERROR]   AssertSamples.f3:21 expected not same [java.lang.Object@185d8b6] but found [java.lang.Object@185d8b6]
[ERROR]   AssertSamples.f4:26 null
[ERROR]   AssertSamples.f5:31 did not expect to find [true] but found [false]
[ERROR]   AssertSamples.f6:36 did not expect to find [false] but found [true]
[INFO]
[ERROR] Tests run: 6, Failures: 6, Errors: 0, Skipped: 0

@krmahadevan I'm not sure how to generate the surefire report, therefore I just copy paste the shortened execution output from IntelliJ console.
java.lang.AssertionError: expected [false] but found [true]

java.lang.AssertionError: did not expect [true] but found [true]

java.lang.AssertionError: expected not same [java.lang.Object@72d818d1] but found [java.lang.Object@72d818d1]

java.lang.AssertionError: null

java.lang.AssertionError: expected [true] but found [false]

java.lang.AssertionError: expected [false] but found [true]

===============================================
My_Suite
Total tests run: 6, Passes: 0, Failures: 6, Skips: 0
===============================================

@jiong-fu - The output from both the runs look the same. So I am trying to understand what changed. Can you please me understand that

@krmahadevan to resolve the issue #2080, I replaced the beginning message 'did not expect to find' with 'did expect', so that the assertion message in assertTrue / assertFalse works correctly. However, the change affected also assertNotEquals, since it uses the beginning message internally. Consequentlly, with the actual master branch the default message would be for example 'did expect [true] but found [true]' which is misleading.

@krmahadevan The most important part in the pull request is
https://github.com/cbeust/testng/pull/2133/files#diff-079c4701a6752e4bec03337f0aeb8ba9R969
There are two cases to consider -

asserted equal but the actual outcome is not equal -> true should be passed to the format method -> the assert message should be the form 'expected A but found B'
asserted not equal but the actual outcome is equal -> false should be passed to the format method -> the assert message should be the form 'did not expect A but found A'

@jiong-fu Which issue are we fixing with this PR ?
Is it #2118 ( which talks about adding a default message for assertions ) or #2080 ?
If it's #2118 then I don't think we fixed the ask in the bug in this PR no ( that's why I asked for a comparative output )

@krmahadevan Good question, it is my fault. With this pull request still only the old problem can be fixed. So I now start working on the real issue, may I then put everything together in one pull request?

@jiong-fu - Sure. Please feel free to close this PR, and open it back when you are ready.

With this pull request still only the old problem can be fixed. So I now start working on the real issue,

So does it mean you would be fixing #2118  (or) #2080 ? Please do clarify that when you open up a new PR, because your updates to CHANGES.txt says its fixing #2118 I am just trying to ensure that I have a good understanding of what we are fixing.

@krmahadevan Thanks for the tips. With the changes in this pull request the #2080 should be fixed and it remains to open another pull request to track the changes. What I am going to fix is the #2118.


Update references in old BCO releases to Github

...from Google Code so that they function correctly.

The release from 2014-05-27 has all imports merged, so when the partial redirect was fixed at purl.org, it fixed this one. However, this was not the correct format to follow for a release.

The IRI of BFO 1.1 (http://www.ifomis/org/bfo/1.1) in the BCO release for 2013-10-01 no longer works. Changed it to https://raw.githubusercontent.com/IFOMIS/BFO/1.1.1/bfo.owl/

For the 2013 release, updated IRIs for obi_bco_imports.owl, ontology_metadata_bco_imports.owl, and ro_bco_imports.owl, and they import correctly, but if you look at the raw file for these, they still reference google code:
<rdf:RDF xmlns="http://bco.googlecode.com/git/src/ontology/iao_bco_imports.owl#"
xml:base="http://bco.googlecode.com/git/src/ontology/iao_bco_imports.owl"

Steps to fix 2013 imports:

Edit each (IAO, OBI, Ontology-metadata, RO)  import file to change IRI to http://purl.obolibrary.org/obo/bco/import.owl.
Make sure version IRI is of the formhttp://purl.obolibrary.org/obo/bco/releases/2013-10-01/import.owl. Save and commit.
For IAO and OBI imports, hand edit ontology file to change reference to google code to purl. Save each ontology and commit.
For each import file, while in bco-non-classified.owl, remove (x out) current direct import and re-import from purl of the form http://purl.obolibrary.org/obo/bco/releases/2013-10-01/import.owl. Save bco-non-classified.owl and commit.

Note that this does not work for ontologies stored in src/ontology.


parse date as %F (YYYY-MM-DD)

Raising this PR as the dates at https://nixos.org/channels/ has changed
Running master without this results to parseTimeM: no parse of "2016-03-27 12:53"
This might also fix #6

Awesome, thanks!
Since the logs contain the error you mention, that should indeed fix #6 :)


Some problems with UnitSystem

ver: 0.0.8370.36583

[ ] Expressions containing unit doesn't respect Max length of decimal place to display settings

[ ] [degC] is not converted to [K] properly

[ ] Dimension units like m² cannot be solved with [m2], but output text is [m2]

[ ] It would be good if we can select/convert the output ScaledUnit

also, thank you for developing!!

Thank you for pointing this out.
The unit system functionality has not been tested and has many bugs.
I may remove the unit system feature as it may conflict with features that will be added in the future.

Unit system functionality has been removed.


chore(main): release 0.71.9

:robot: I have created a release beep boop
0.71.9 (2024-08-20)
Full Changelog: https://github.com/BLSQ/openhexa-app/compare/0.71.8...0.71.9

This PR was generated with Release Please. See documentation.

:robot: Created releases:

0.71.9
:sunflower:


Update: latest Cargo.lock version

This PR is to trigger a release, after learning about the semantics of our semantic-release automation. However, it will also act as a test to see if the automation updates & adds Cargo.lock to a commit prior to release (effectively making the same kind of change in this PR).

For posterity, the change to the semantic-release automation has successfully included the Cargo.lock changes into the list of files committed.


make decl_storage better with 2018 and impl it for contract

related to https://github.com/paritytech/substrate/issues/1509
it actually uses a trick: it uses $crate syntax from macro_rules to be able to
use a renamed crate in procedural.
A wrapper named decl_storage in srml-support is made. this wrapper import srml-support by creating a module with the correct name. Then the procedural macro have access to srml-support with this name.
This allow renamed srml-support to work with the procedural macro. As an example, this use it in contract.
also it solve #1569 as a side effect

(also procedural macro import of renamed crate might be solved in a near future)

I worked on something similar today, see: https://crates.io/crates/proc-macro-crate
I'm preparing a pr currently as well.