Try.testSucceed() does not fail on a fail

V Try.testSucceed(Assignment<V>, String, Class<T extends Throwable>) is used to check whether an assignment runs. For example, we have a constructor that may throw a NullPointerException. We can check that new ClassName("argument"); indeed runs. The method accepts a throwable class. As the constructor can throw a NullPointerException, we give that class. Should the assignment throw e.g. an IllegalArgumentException, the test should neither succeed or fail, but throw an exception. The test is then improper.
The code reads:
    public static <V, T extends Throwable> V testSucceed(final Assignment<V> assignment, final String message,
            final Class<T> throwableClass)
    {
        V value;
        try
        {
            value = assignment.assign();
        }
        catch (Throwable cause)
        {
            if (throwableClass.isAssignableFrom(cause.getClass()))
            {
                value = null;
            }
            else
            {
                throw new AssertionError("Assignment failed on unexpected Throwable, expected ("
                        + throwableClass.getSimpleName() + "), but got (" + cause.getClass().getSimpleName() + ").");
            }
        }
        return value;
    }

Problem 1
The assignment should run successfully for the test. If the test gets in to the catch, the test has either failed or behaved unexpectedly. If, however, the thrown cause is of an expected type, we just have value = null; and the test succeeds. Instead, it should throw new AssertionError(message); (note that message is not even used in the method).
Problem 2
In the else-block, a normal exception should be thrown, rather than an AssertionError, as the test behaved unexpectedly with a wrong type of cause.
There is a similar method without a return type, and where the first argument is an execution: void Try.testSucceed(Execution, String, Class<T extends Throwable>). This method also suffers from problem 2.
Both methods also have a testFail(...) counterpart, which also suffer from problem 2. In all 4 cases where the message contains failed on unexpected Throwable, AssertionError can simply be replaced with RuntimeException.

I can see that testSucceed indeed does not show the correct behavior. The simplest case:
        Double dn = null;
        Double d1 = Double.valueOf(1.0);
        Try.testSucceed(() -> d1.toString());
        Try.testSucceed(() -> dn.toString());

does work fine, and of course it shouldn't...
On the other hand, testFail does seem to show the correct behavior. See the following code:
        Double dn = null;
        Double d1 = Double.valueOf(1.0);
        Try.testFail(() -> dn.toString());
        try
        {
            Try.testFail(() -> d1.toString());
            System.err.println("NOT ok");
        }
        catch (Throwable e)
        {
            System.out.println("ok");
        }

This prints ok. I tested with Try.testFail(() -> dn.toString()); whether the null pointer assignment indeed throws an exception, and it does. I tested with Try.testFail(() -> d1.toString()); whether it throws and exception, and it does not, so the testFail throws an AssertionError, which is to be expected -- the assertion was that the method call would throw an exception, and it didn't, so it should throw an AssertionError -- the same error that the assert (or assertTrue(), assertEquals()) throws on the failure of an assertion.

testFail shows the wrong behavior if you use the version with 3 arguments, where you explicitly give the exception type that an assignment/execution should fail on. If another exception pops up, the test neither failed nor succeeded, but is improperly defined. I think it should throw an exception to indicate to the programmer that the test is not correctly defined.

By the way, I never understood the necessity of the testSucceed(() -> someExecution()) method for unit tests. When you expect something to succeed, just put the execution() in the unit test, and when it does not succeed because of an error or exception, the unit test fails, as it should.
The use case for testFail(() -> someExecution()), on the other hand, is very compelling. Instead of writing:
try
{
    someExecution();
    fail("this execution should have thrown an exception");
}
catch (Exception e)
{
  // expected
}

we can write the one-liner:
testFail(() -> someExecution(), "this execution should have thrown an exception");

So, what is the use-case for testSucceed? The javadoc doesn't give a clue. Actually, now that I look at it, the javadoc does not give any clue about any of the method parameters for testFail and testSucceed... Another opportunity for improvement!

testFail shows the wrong behavior if you use the version with 3 arguments

Ok -- clear! I will check that and make improvements. The expected behavior for testFail in that case is that when it fails with the CORRECT exception, testFail succeeds, and when it either DOES NOT fail, or fails with the WRONG EXCEPTION, testFail should throw an AssertionError`. Did I understood correctly?

By the way, I will also raise this bug in djunits. djunits has a copy of the Try and Throw classes, to not make djunits dependent on external packages.

The expected behavior for testFail in that case is that when it fails with the CORRECT exception, testFail succeeds, and when it either DOES NOT fail, or fails with the WRONG EXCEPTION, testFail should throw an AssertionError`. Did I understood correctly?

Almost:

No exception pops up: the test fails throw AssertionError
The right exception pops up: test succeeds, return null for an assignment, do nothing for an execution
A wrong exception pops up: test itself is improper throw RuntimeException

By the way, I never understood the necessity of the testSucceed(() -> someExecution()) method for unit tests. When you expect something to succeed, just put the execution() in the unit test, and when it does not succeed because of an error or exception, the unit test fails, as it should.

True. The only reason I imagine is that if it fails you get an AssertionError as a proper test result, rather than some random Exception. I think tests should fail with an AssertionError, while other exceptions indicate that some code in the test itself is wrong. But I'm not sure about this, and the testSucceed methods are confusing, and I can find only 1 usage.

A wrong exception pops up: test itself is improper throw RuntimeException

This one I don't understand. It should, in my opinion, also throw an AssertionError, but maybe with a more extensive explanation. Note that an Error is more severe than an Exception, so even when there is a try...catch(Exception e) around the testFail() code, the AssertionError will still make the unit test fail (as it should).
Would it be an idea to precede or append the error message (as an AssertionError) with a string "unexpected exception thrown: XxxException instead of YyyException" instead of throwing a RuntimeException?

The only reason I imagine is that if it fails you get an AssertionError as a proper test result, rather than some random exception.

I disagree. When you expect a method call or assignment to succeed in your unit test, ANY deviation from that should throw an AssertionError in the end. Period. When you just execute the code as someMethod() and it throws any exception, JUnit will turn that into an AssertionError and fail the unit test. The explanation of the unit test failure provides you with the stack trace, which contains all the information you need. The RuntimeError just adds a layer of obfuscation IMHO.
The more I think about it, the more I am in favor of scrapping the testSucceed()...

Perhaps in the end an AssertionError results, but in the JUnit pane you have 3 results for a test:

success (green check)
failure (blue cross)
error (red cross)

To me the latter two categories mean:

failure; the tested code is not correct
error; the test code itself is not correct

But I realize both may happen due to faulty code either in the test code, or tested code. So an AssertionError with additional description is fine.

Agree.

Let's update the javadoc as well. It is too brief for coders to understand.
And, of course, the unit tests of the Try class should be updated. Without using Try itself, so in the old fashioned way. Apparently we have not been complete in our tests, since especially the 2-line incorrect testSucceed() code should have been caught...

Javadoc has been extensively updated. It now states, e.g.:
<V, T extends Throwable> V org.djutils.exceptions.Try.testFail(Assignment assignment, String message, Class expectedThrowableClass)
Method for unit tests to test if an expected exception is thrown on an assignment. This method provides an explanation message, and it is checking for a specific type of exception to be thrown. The testFail() method throws an AssertionError when the assignment does not throw an exception, or when it throws a different exception than expectedThrowableClass. A way to use the method is, for instance:
   Try.testFail(() -> methodFailsOnNull(null), "call should have thrown an NPE", NullPointerException.class);

or
   Try.testFail(new Try.Assignment<Double>()
   {
       @Override
       public Double assign() throws Throwable
       {
           return methodFailsOnNull(null);
       }
   }, "call should have thrown an NPE", NullPointerException.class);

Type Parameters:
   <V> value type, which is the return type of the assignment
   <T> throwable type, which ensures that we provide a throwable class as the argument
Parameters:
   assignment Assignment; functional interface to assign value
   message String; message to use in the AssertionError when the test fails
   expectedThrowableClass Class; the class of the exception we expect the assignment to throw
Returns:
    V; assigned value

Unit tests for testFail() have been severely extended. There are now around 800 lines of test code for testFail().

testSucceed() has been removed from the code and from the unit tests. Issue solved.


feat(ide): added support for zed ide

Zed ide support
Description
Added support for Zed IDE

[] This change requires a documentation update
[] I have made corresponding changes to the documentatio

This PR addresses issue #1002
/claim #1002

@akhill10 thanks for raising the PR!
Before we review, please make sure you read our CONTRIBUTING guidelines and that the commit is signed with your name and email.


objects/variables passed into Class constructor falsely marked unused

Bug Report

TSLint version: 5.5.0
TypeScript version: 2.3.4
Running TSLint via: (pick one) Ionic cli

TypeScript code being linted
export class SearchFiltersPage {
gameFilter: any[];
typeFilter: any[];
constructor(
     private propertyService: PropertyService,
  ) {
    this.typeFilter = propertyService.getPropertyTypesList();
    this.gameFilter = propertyService.getGameTypesList();
   }
}

with tslint.json configuration:
{
  "rules": {
    "no-duplicate-variable": true,
    "no-unused-variable": [
      true
    ]
  },
  "rulesDirectory": [
    "node_modules/tslint-eslint-rules/dist/rules"
  ]
}

Actual behavior
tslint reports:
[16:54:29]  tslint: src/pages/search-filters/search-filters.ts, line: 51
       Property 'propertyService' is declared but never used.
       L51:  private propertyService: PropertyService,

Expected behavior
tslint understands that propertyService is a variable that was passed into the constructor function, so it is able to be used without this. being pre-pended
If I add this. to propertyService in the constructor, tslint stops complaining

If you remove the private modifier, everything works as expected.
In typescript adding a modifier (private, protected, public or readonly) to a constructor parameter creates a parameter and a property (called "parameter property"). You only use the parameter while the property is never used. That's why you get an error.


Generate temporary credentials (Links to #52) #112

Changes required for #112.
Description
Task Executor generating credentials for plugins.
Status
In Progress
Types of changes

[ ] Non-breaking change (fix or new feature that would not break existing functionality).
[ ] Breaking change (fix or new feature that would cause existing functionality to change).
[ ] New tests added to cover the changes.
[ ] All tests passed locally.
[ ] Documentation comments included/updated.
[ ] User guide updated.
[ ] I have updated the changelog
[ ] Any new files have copyright headers
[ ] Code coverage above 70%
[ ] TODO items resolved

just some notes...
found out Admin module responsible for create users is not S3 Compliant

Minio don't have a C# SDK for admin module.
Minios REST api docs for admin module seem to be non-existent
https://documenter.getpostman.com/view/1747463/SzzheJEs#c7acdaa9-87e8-411c-b704-01f4faec0eb9 <- this appears to be a user generated bit of documentation.
https://github.com/minio/minio/issues/7539 <- this thread asking about it recommends using MC tool or GO Admin SDK.
I'm going to look into creating a wrapper for the GO SDK.

Closing this as pull request I was working on I was not happy with what I've created on this branch needing to implement many work arounds to be able to test task manager. I have created a new branch and pullrequest here:
https://github.com/Project-MONAI/monai-deploy-workflow-manager/pull/149


one fix per comment

Create a CommentLineGroup type to represent either the lines of one block comment or the individual lines of several line comments. Next, refactor the comment iteration. We want to iterate over the comments one at a time. Each time we encounter a comment, if it is a block comment, then we first check if there are buffered line comments, process those, and then process the block comment. Otherwise, if it is a line comment, we check if the buffer is empty. if the buffer is empty, we append the line to the buffer and continue. If it is not empty, we check if the new line is subsequent to the last line of the buffer. If it is subsequent, then we append it to the buffer and continue. If it is not subsequent, then we process the lines in the buffer as group, clear the buffer, append the new line to the buffer, and continue. Once we reach the end of the comments, we do one extra check for whether the buffer is empty and then process it.
To process a line buffer, we will call a helper function that processes a CommentLineGroup object. That one object will check for splits and merges. It will generate replacement text for the comment line group. If there is no work to be done, then there is no fix. Otherwise, the helper function returns a single fix that replaces the CommentLineGroup. That single fix may perform several merges/splits at once. It may replace multiple lines of text at once. It may affect multiple line comments at once.
As we complete the processing of each line group, we call context.report to notify eslint of the fix and continue. We do not wait until all processing has completed.

since eslint does not provide access to the line breaks, we might have to add them back into the text of each line for all lines other than the last line of a comment line group

since eslint does not provide access to the line breaks, we might have to add them back into the text of each line for all lines other than the last line of a comment line group

i am way too busy


Excel addin for Mac OS

Hello
Is Editing to Excel on Mac OS is in the roadmap of Business Central ? We have some customers who wants to use it in their environment.
Thanks

Détails du document
⚠ Ne pas modifier cette section. C’est obligatoire pour docs.microsoft.com ➟ Liaison des problèmes GitHub.

ID: 5d8fc6f4-3264-8336-038c-6c5ba7aa22df
Version Independent ID: 56f76b91-51c4-98d5-ce6a-15cd52dea2d2
Content: Affichage et édition dans Excel depuis Business Central - Business Central
Content Source: business-central/across-work-with-excel.md
Service: dynamics365-business-central
GitHub Login: @jswymer
Microsoft Alias: jswymer

Hello,
Thank you for your feedback. Since your question is not about the Help, we suggest that you submit a feature request here: https://aka.ms/businesscentralfeedback


How to save webui configuration?

Every time I close the page (index.html) I lost my connection settings.
I run it through docs/index.html. Have I run a node server instead?

Every time I close the page (index.html) I lost my connection settings.
I run it through docs/index.html. Have I run a node server instead?

go to docs/app.js and open it with text editor
find first localhost and change it to your ip address you want (it on line 171)
than save it
close and reopen index.html


util(dm): auto split the transaction when it's too large

What problem does this PR solve?

Issue Number: ref #5010
What is changed and how it works?
Check List
Tests

Unit test

Questions
Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?
Release note
`None`.

added a simplt util function
/cc @buchuitoudegou @D3Hunter @GMHDBJD

Codecov Report

Merging #7208 (9ee5bb3) into master (b6afb5b) will increase coverage by 5.9957%.
The diff coverage is 76.1220%.

Additional details and impacted files

Flag
Coverage Δ

cdc
67.1860% <78.3251%> (-0.0045%)
:arrow_down:

dm
?

engine
60.7856% <74.8587%> (+0.1924%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.
@@               Coverage Diff                @@
##             master      #7208        +/-   ##
================================================
+ Coverage   59.5911%   65.5869%   +5.9957%
================================================
  Files           795        552       -243
  Lines         91532      51248     -40284
================================================
- Hits          54545      33612     -20933
+ Misses        32204      15022     -17182
+ Partials       4783       2614      -2169

ptal @D3Hunter @GMHDBJD

/merge


jersey-pound icon actually represents Japanese Yen

Expected: There is no jersey-pound icon; it's redundant vs the pound-sterling icon. The ¥ symbol is referred to as japanese-yen.
Actual: The ¥ symbol is called jersey-pound.

fixed in #444


Shady DOM optimizations: (1) fast path distribution when no insertion po...

...ints exist in a root, (2) avoid tree walking root for insertion points by keeping an ordered list of them.

lgtm


Add Colobot 0.1.12

Part of https://github.com/MarNicGit/winget-pkgs/issues/4
Microsoft Reviewers: Open in CodeFlow

Runner says that it timed out during install. Works fine on my machine?

Sitting Idle.  Kicking it again.
/AzurePipelines run

/AzurePipelines run

@KevinLaMS Welp, still not working :/

@KevinLaMS


Not compatible with iOS devices

Created audio file is not playing in iOS devices whereas it plays in android and web browsers. Can you please help why it is happening?

Hmm, I would suggest to try different MediaRecorderConfig params.


Adding a check to not show the "Page #" title when there is only one.

Motivation:
Currently when showing a forms app that only has one page, and does not
have a custom pageName, a title for the view is shown as 'Page 1'. When
there is only one page then we should not show this page name at all.
Modifications:
Added checks to see if there is a pageName set but
Result:
All test pass:
$ cd src/appforms
$ grunt testServer

Open StepsView Test in a browser.
JIRA:
https://issues.jboss.org/browse/RHMAP-4762

@nialldonnellyfh Would you mind reviewing this PR?

Having some issues with my cluster at the moment but I'll update it as soon as I have it running again so that this can be verified there.

Reviewed, small comment above.

@nialldonnellyfh I've finally got my cluster up and running again and got the following app deployed.
I created it using danbev/appforms-project-client.git and the RHMAP-4762-appforms-page-numbers branch:

@danbev Verified the app in your cluster. The changes look fine.
Feel free to merge this back to master.
There needs to be a fh-ngui and template updates as per https://github.com/fheng/help/blob/master/developer_guides/appforms_feature_development/appforms_development.md#generated-files


More kast <-> kore conversions

This PR makes a few changes:

The default sort for symbols in prelude.ml is changed from K to GENERATED_TOP_CELL, which is more frequently what we want.
Conversions for ML symbols #And and #Equals are added, which enables us to begin dealing with constrained terms passed from CTerm class.
When retrieving productions from the definition by KLabel, we only compare the klabel name and not the sorts. This should still be safe, because we're still asserting that only one production is returned. So if the same symbol has different signatures, this method will die horribly and the user can make it smarter or submit a bug report. So far it hasn't caused me problems.

What Radu says is actually incorrect. Overloaded productions like he describes will have different symbols in both kast and kore despite having the same klabel attribute.


Linux container on ROCm

Hello, thank you to read this issue.
How can I use ROCm in a Linux container, called LXC?
If you know any about this topic, please tell me.

There are docker images for ROCm Tensorflow upstream. Do these work for you?

Thank you for replying.
I have not tried Docker image of ROCm Tensorflow yet because it is not in my interest.
I would like to use ROCm in my original program with C++. Using Tensorflow is not my purpose. So although there might be docker images other than for Tensorflow, even in the case, I would like to use LXC for system container, not Docker.

Hi @smithakihide , does the following rocm dev docker work for you:
https://hub.docker.com/r/rocm/dev-ubuntu-18.04

Hello, thank you to read this issue.
How can I use ROCm in a Linux container, called LXC?
If you know any about this topic, please tell me.

Hi! I've tried setting up rocm in a lxd container.
Here's the needed setup if anyone is interested.
After setting up rocm the way would've done on the host, assumed the following:

you are in the video group
you've allow /dev/kfd to be access by video group.

We can now use lxd's config device option to expose the host's devices with the correct permission so that the guest container can access it as a non-root user.
lxc config device add $container_name $kfd_device_name_you_want unix-char gid=${gid_of_group_video} source=/dev/kfd mode=666
lxc config device add $container_name $gpu_name gid=${gid_of_group_video}

So for example my config would have these two devices:
devices:
  gpu:
    gid: "44"
    type: gpu
  kfd:
    gid: "44"
    mode: "666"
    source: /dev/kfd
    type: unix-char

really? thank you very much to tell me your trial!.
I' ll try it too.

I can't make kfd work in lcx container...
root@ollama:~# rocminfo
ROCk module is loaded
Unable to open /dev/kfd read-write: Operation not permitted
root is member of render group


Please add BraintreePaymentFlow module for iOS. Error: dyld: Library not loaded: @rpath/BraintreePaymentFlow.framework/BraintreePaymentFlow Reason: image not found

@Taracque
Can you please include BraintreePaymentFlow module for iOS, it will not let publish for IOS until this module included.
dyld: Library not loaded: @rpath/BraintreePaymentFlow.framework/BraintreePaymentFlow Reason: image not found

@Taracque I have rebuild frameworks and it works. Can you also rebuild framework and add BraintreePaymentFlow module to plugin.xml as well.
Also can you please add option to capture device data.

Rebuild framework using Carthage and update frameworks in lib/ios
Steps:
mkdir /tmp/braintree-sdk
cd /tmp/braintree-sdk
echo 'github "braintree/braintree_ios"' > Cartfile
echo 'github "braintree/braintree-ios-drop-in"' >> Cartfile
carthage update


Autocomplete: migrate to bfg/contextForIdentifiers

Context

DRAFT: Migrate to the new bfg/contextForIdentifiers BFG request, where clients are responsible for specifying the list of identifiers. More context https://github.com/sourcegraph/bfg-private/pull/171

Test plan

In progress

Tagging @philipp-spiess for early 👀

Please take a look, folks! @umpox, @philipp-spiess


fix(REACH-914): wrong overlapping settings in live embed

https://github.com/Typeform/embed/pull/621 introduced a bug in which, when loading a live embed code, boolean settings will always be set to false unless they are set to true in the element containing the data-tf-live.
This PR reverts that by enforcing that boolean settings should default to undefined if not found in the DOM element.

[BOT] Preview available with hash fbb3f1eb04d536cf91a4e0f9bd0eadb702b35c2d here.

[BOT] Preview available with hash baa54c08c4898e61e5e33baafe971bc10a1f78fc here.

:tada: This PR is included in version @typeform/embed-v4.1.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


reflect: Value's == behavior changed between 1.3 and 1.4

the following code snippet has different behavior when I run it on 1.3 and 1.4 respectively.
code are in https://play.golang.org/p/yfy7ZKqU1Y
when I run on 1.3, we have the following response:
false
0
0x0
true

while, It report false in the last println in golang 1.4
false
0
0x0
false

not sure whether it is a bug or something

I don't think you should use == on a reflect.Value.  Perhaps that just needs to be documented.
/cc @robpike, @randall77

ok, then how to test the equality of reflect.Value instead of using "=="?
any suggestion?

It's not a bug.
You shouldn't use == to compare two reflect.Value for equality.
The reason it's different is that starting from Go 1.4, interface values
will always
store a pointer, so is reflect.Value. Thus, although the two
reflect.Value's are
indeed storing the same integer, the struct itself are not equal (the ptr
field
are different)

I think v1.Interface() == v2.Interface() will probably do what you want.

And even on Go 1.3, types that can't be stored into interfaces inline will
exhibit the similar behavior (two reflect.Value's representing two equal
values are not equal).
https://play.golang.org/p/Dhe5Qm_vtH

@minux you are right.
golang 1.4 always stores interface values into a pointer
https://github.com/golang/go/blob/release-branch.go1.4/src/reflect/value.go#L138
, whereas golang 1.3 does the separated things.
@adg thanks, Interface() can test this.


Ticket Caching Failing With Visual Studio 2017

The TL;DR is that when running a CAS-enabled application in Visual Studio 2017 (IIS Express), the .NET cache provider (System.Web.Caching.Cache) is immediately expiring the new service tickets as soon as they are added to the cache. Thus, no service ticket is ever able to be validated. Below is how I arrived at this conclusion.
Recently my development computer at work bit the dust, prompting me to reformat and re-install Windows 10. I took that opportunity to also upgrade to Visual Studio 2017 Enterprise (from 2015 Enterprise). When I began working on one of my CAS-enabled applications in VS2017, I immediately got the problem of a redirect cycle between my application and the CAS server.
First thing I checked was that it wasn't another timing problem with the tolerance level for the SAML tickets, which it wasn't. No matter what value I set for ticketTimeTolerance, the redirects still occurred. I debugged about all I could think of in my application with no indication of why the SAML ticket validation was failing and thus redirecting back to the CAS server. Even turning on the tracing per the instructions in this project's README didn't shine light on the source of the problem.
I finally broke down and added the DotNetCasClient project to my solution so that I could step through the code as the process was happening. Eventually I noticed that the service ticket was being added to the cache, but in a subsequent call to retrieve the ticket from the cache, null was returned. I added some code for debugging to InsertTicket(). I was able to see that, immediately after inserting the ticket into the cache the cache item count increased by one. However, after a few debugging steps, the cache count decreased by one. I read in the comments for RemoveExpiredTickets() that the cache will automatically remove any expired items, so this got me thinking that the problem was with the expiration date for the cache item being inserted. By pure luck I was able to notice that the dates for the forms authentication ticket were using UTC while the expiration date for the cache item was in local time. Furthermore, I noticed the comments for the Insert() method of System.Web.Caching.Cache recommend to always use UTC dates as issues can occur with daylight savings time. The particular problem I am having wasn't related to DST, but on a whim I changed the insert statement from:
HttpContext.Current.Cache.Insert(GetTicketKey(casAuthenticationTicket.ServiceTicket), casAuthenticationTicket, null, expiration, Cache.NoSlidingExpiration);
to:
HttpContext.Current.Cache.Insert(GetTicketKey(casAuthenticationTicket.ServiceTicket), casAuthenticationTicket, null, expiration.ToUniversalTime(), Cache.NoSlidingExpiration);
Immediately my application worked again. To double-check that the fix was correct I have created another dummy web application that consumes CAS in Visual Studio 2017. Using the local date/time, the redirect loop occurs. Modify it to use UTC date/time, the application works as expected.
I created the same dummy application in a copy of Visual Studio 2015 I have, targeting the same version of the .NET framework (v4.5.2). Using the same configuration settings for the client in web.config, I did the same tests, except this time the caching of the service tickets works regardless of using local or UTC time for expiration. As best as I can tell, the only difference between the projects is Visual Studio 2015 versus 2017. They target the same framework version, have all the same NuGet packages/versions, and use the same web.config settings.
Using those same dummy projects (one in 2015, the other in 2017) I basically copied the code from ContainsTicket() to list the contents of the cache on each page load. Using a special query string parameter, I could instruct the page load code to add a simple string value as an object to the cache with a +1 minute expiration date. In VS2017, using the local date for expiration, the string would be gone from the cache on the next load, even though the second request was only a few seconds after adding the object to the cache. Using the UTC date, the string would stay in the cache for a minute, then be removed. Switching to VS2015 yielded the expected result that it did not matter which form of the date/time was used for expiration. The string value would stay in cache for 1 minute, then expire.
According to the MSDN Documentation for the Insert() method, the recommendation for the absoluteExpiration parameter value is for it to be a UTC date/time, not a local one. It is laughable, though, that the examples on the same page use DateTime.Now, against their own recommendation. In any case, I think it would be a good thing to change the expiration to a UTC date/time regardless of it being the absolute root cause of the problem I am experiencing.
I believe the change would need to be made at the point where the expiration date is set, which is when the forms authentication ticket is being created in CreateFormsAuthenticationTicket() of CasAuthentication.cs. The fromDate and toDate variables can be set as UTC dates, and the client has no problem in VS2017. I will create a pull request soon with the suggested changes along with documentation as to why UTC dates are needed. In the meantime, if anyone wants to weigh in on why this is happening between VS2015 (and earlier) and VS2017, it would be appreciated!

Another thing that I am curious about testing is whether or not the client, as is, experiences any issues on IIS on Windows Server 2016. I have only been using the client on up to Windows Server 2012 R2 without issue. But I wonder if whatever changed in VS2017 also changed in Windows Server 2016/IIS. When I can get my hands on IIS on 2012 I'll try it out. If anyone else is able to test this, I'd love to hear the results.

We're seeing the same thing with Windows 10 Creator update (1703) in all versions of Visual Studio. Creating a pull request with this fix ...

Thank you! I've been looking for this solution for days. This really needs to be done. For now, I've found that a quick fix is changing the time zone on your computer to UTC. If you don't mind your clock being off by a couple of hours while you're testing, it works okay.

@hokiecoder do you work at Virginia Tech?

So here are my thoughts for this issue after discussing with my team.

This bug, problem if you will, is introduced when .NET 4.7 is installed on the machine that this code (your web application) runs on.
.NET 2.0 and 3.x applications are unaffected.  The only impact is on .NET 4.x applications.

The following thoughts are in preparation of planning for the future of this project...

The nuget package will have two assemblies in it for this bug fix.
When you install the nuget package, if your application targets the .NET 2.0/3.x framework, then you get the assembly compiled for that version of the framework and will contain the same code as today to maintain backwards compatibility.
If you install the nuget package in an application that targets the .NET 4.x framework, you get this assembly compiled for that version of the framework.  Herein lies the reason:  I think it's easiest to swap out the cache provider with System.Runtime.Caching and not muck with the expiration date.
This single nuget package, multiple targeted assemblies is a common thing in the .NET landscape.  This can be seen in many packages, including the most downloaded which is JSON.NET.
This way there is no need to add/change web.config settings and things will just work out of the box without developer intervention.  Think of it as an "under the hood" change.

One of our future goals would be to introduce the concept of a plugable cache provider interface where you could use the default standard in-memory cache provider, the two described above, or a third party of your choosing.  One use case would be to allow for a distributed cache provider such as memcached or redis.  This will make it easier to move CAS enabled .NET applications to a load balanced environment, especially if "sticky sessions" are not enough.

@phantomtypist Yes, I do work at Virginia Tech. Also, to your last comment, I am not sure we need to go through all the work of building for two different .NET targets. At least with my testing, fixing the ticket expiration date to be a UTC date does not cause any problems with earlier versions of .NET. It seems that the System.Web.Caching.Cache class previously could handle dates in either formats, but now has more strict requirements. I may be wrong about this, so testing the patch provided by danransom in pull request #55 against multiple .NET targets should be done.
As far as a pluggable model for the service ticket manager (aka dependency injection), the client is already set up for that using the IServiceTicketManager interface. The CacheServiceTicketManager implements this interface. It would be possible, and fairly easy, to write your own implementation for System.Runtime.Caching, using your own example. I am not very familiar with the Reflection technique that is used in the Initialize() method of CasAuthentication to create an instance of the service ticket manager you specify in the configuration, but it looks like it could load any class available at runtime to the assembly as the service ticket manager, provided it implements IServiceTicketManager.

Just to clarify... did you test this fix against an application compiled in .NET 2/3.x?

Ok, found out we probably don't need to change anything in the long term, maybe just temporarily... it's an actual bug in .NET 4.7's implementation of Cache.Insert.  I'll have to ask my contacts at MS if they can track down the status of this.
Ref: https://forums.asp.net/p/2123507/6145985.aspx

But IMHO, we should switch out to the System.Runtime.Caching provider for the .NET 4.x targets (it's not in .NET 2/3.x because it was part of Enterprise Library at that point.)
I'm suggesting the dual compilation targets because if you keep it all a single target, then you can't add new features when you need them because you are being held back by the lowest framework you support.
We have plans to build a target for .NET Core and as a result, the nuget package will have more than one assembly in it.  Otherwise it's just not possible to have one assembly that fits .NET and .NET Core.

I think this change works in .NET 2/3.x, but only by coincidence.  I'd have to do some testing, but I think because the .NET 2/3.x runtime doesn't have this new bug introduced in the .NET 4.x runtime, the cache expiration is just getting pushed out further... but not as obvious.

Docs on System.Runtime.Caching: https://msdn.microsoft.com/en-us/library/system.runtime.caching(v=vs.110).aspx
See remarks at the bottom of the doc page.

MS suggests that applications targeting .NET 4.x use System.Runtime.Caching instead of System.Web.Caching.  System.Web.Caching should be used in .NET 2/3.x applications.
https://docs.microsoft.com/en-us/dotnet/framework/performance/caching-in-net-framework-applications

@phantomtypist No, I have not tested against .NET 2/3, in all honesty because I have no use cases that require those older framework versions. I had (rather naively) assumed that if it worked in version 4.X (not 4.7) then all was well. The proposed patch in pull request #55 needs to be checked against all versions of the framework that are supported by this project. If I can find some free time, I'll do that.
Regarding the dual targets, I think I misread what your purpose was. I thought you wanted two targets for the issue at hand: the caching expiration problem. But since that can be fixed easily by using UTC dates, it would be overkill. I now see that you want to do it for the System.Web.Caching vs System.Runtime.Caching idea. That makes sense to me. That being said, I think a new issue needs to be created to discuss and tackle since it is not directly related to this issue. If you want to create an issue for it and include all of the details you've mentioned here, mention me in the issue and I'll be happy to add my own thoughts!

@phantomtypist I think you made a clear and compelling argument for multiple framework targets in the Nuget packages. +1 to that approach.

Please see my comments in issue https://github.com/apereo/dotnet-cas-client/issues/56

I'm in agreement with the multi-platform approach.

As a note, this issue manifested for me because .NET 4.7 was pushed as a critical update last week so was automatically added to production servers (yay!). So I imagine this will quickly become an issue for others as well. Thanks to @hokiecoder/@danransom for the fix. I was able to roll my own version and fix the issue for at least one of my apps.

Heads up everyone!
We now have a pre-release NuGet package feed for alpha/beta/unstable versions of the DotNetCasClient package.  It can be found here: https://www.myget.org/gallery/dotnetcasclient-prerelease
Can you guys/gals please connect to the new feed and test the 1.1.0-beta0001 version of the package to see if this resolves the problem for you?  Report back if you have any problems or if the issue was resolved for you.
There were some other changes in this pre-release version, those can be found in the ReleaseNotes.md file found in the release/1.1.0 branch right now.
Thanks!
@hokiecoder @danransom @webMan1 @serac @sbubaron @nicswan @scottt732 @mmoayyed

Hi Jason, this works for us at campus residences. Thanks.

@phantomtypist This is working for me on a 4.0.3 app on a server with .NET 4.7.

@phantomtypist This does not work for me. I couldn't get the logging to work either. I had to go back to the stable version to get the log to work again.
According to the log from the stable version, the cache was not stored and the assertion expiration time is not correct.

@MeliDreamingSand a few questions:

What version of the "stable" NuGet package did you revert back to?
Could you provide code on how you had the logging wired up when it wasn't working?
What version of the .NET framework is your application targeting?
What flavor of ASP.NET (and version) is your application using?

@phantomtypist thanks for the reply!

I reverted back to the one that is currently on the master branch.
I copied-paste the logging directly from the release README. I was able to have the logging using that same code for the stable version.
4.5
I'm using MVC 5 for the apps.

Please let me know if I need to provide more information. Thanks again!

@MeliDreamingSand
Still confused with one item.  When you say "I reverted back to the one that is currently on the master branch" did you mean:

You cloned the repo (master branch) and manually referenced the code/project in your project,
You referenced the nuget package version 1.0.2 from here (https://www.nuget.org/packages/DotNetCasClient/), or
You manually downloaded the release from here (https://github.com/apereo/dotnet-cas-client/releases/tag/v1.0.2) and manually referenced the DLL files in your project.

I only ask because there are no nuget packages stored in the repo nor master branch.

@phantomtypist
Sorry for not making it clear. I manually downloaded the release from here (https://github.com/apereo/dotnet-cas-client/tree/master) and manually referenced the DLL files for debugging.
Currently all of our apps that's using the nuget package version 1.0.2 have the redirecting issue.

@MeliDreamingSand have you tried the pre-release version at https://www.myget.org/gallery/dotnetcasclient-prerelease ?

@sbubaron
Yes I have tried that; it also didn't work.

Is this issue happening on your dev machines? Are you running Windows 10 with Creators Update?
Or are you running .net 4.7?

This issue is happening on both dev machine and production server. My dev machine is windows 10 with the .net 4.7 update while production server is windows 2008 with the .net 4.7 update as well.

@phantomtypist and @sbubaron
Thank you all for helping! I am able to get the apps to work after deleting the .net 4.7 update, re-update it, and re-download the pre-release version.
Still can't get the logging to work, but at least the apps are working.
Thanks again!

The individual critical 4.7 update caused this behavior for us also on a production server.  However, on a staging server that update was applied via ".NET Framework July 2017 Preview of Quality Rollup" with other patches, and that server did not exhibit the same behavior (presuming that it later applied something that fixed it).
Regardless, the 1.1.0-beta0001 branch fixed the issue.  Thank you to those that identified this and worked on it.

Hi, anyone try this on Windows Server 2012 + .Net Framework 4.7? I still had such problem after getting NuGet package from https://www.myget.org/gallery/dotnetcasclient-prerelease.
Not sure if need more configuration? I just copied the components under net45 folder to website bin folder.

@MeliDreamingSand
I want to follow-up on the logging issue you are having.  Nothing was changed between 1.0.2 and the current beta for 1.1.0 with regards to logging.
Just to double check things... you have it configured like stated on the readme file in the repo (towards the bottom) and also took note of this note:

The application pool in which the CAS-enabled .NET application runs must execute under a user with permission to create and write the trace log file.

If the application pool does have access to where you are writing the log file to, but your configuration is different, would you mind providing your logging configuration section so I can reproduce?  Alternatively, if you can make a sample application that fully reproduces the "no logging" and then share the repo so I can clone it and run it... that would be great.
Otherwise, I am not able to reproduce the "no logging" problem from my end on multiple machines :-/

@MeliDreamingSand
Just to add on to @phantomtypist thoughts, my trace files aren't being written where I expected them to be, I used the default config specified so I was looking for them under C:\inetpub\logs\LogFiles
However, on IISExpress (my local dev box) they are instead being written to: C:\Users\USERNAME\Documents\IISExpress\TraceLogFiles\PROJECTNAME
Unsure what is causing this

@MeliDreamingSand
I believe I have fixed the logging issue.  Can you update your nuget package reference to the new 1.1.0-beta0004 release and let me know if that fixes logging for you?
https://www.myget.org/feed/dotnetcasclient-prerelease/package/nuget/DotNetCasClient

version 1.1.0-beta0004 worked for me, a dotnetcasclient.log is now being written to the file specified in web.config as expected. The files previously mentioned by me that are in the iisexpress\tracelogfiles\project are different (though contain some references to dotnetcas)
thanks @phantomtypist

@phantomtypist
Version 1.1.0-beta0004 worked for me too.
Thank you!

Great.  I think this rounds out all the issues people discussed during the beta testing so far.
I will be releasing the full 1.1.0 release shortly both on here as a binary release and also on NuGet.org (the production nuget feed for this package.)

Version 1.1.0 released to nuget.org


Loginprofileanalytics

@SrijDude3416
Planning on commiting profile, java signup to main.

/signup creates users
/duallogin logs in java users
Users can currently login, logout, input stats, change name, uid, and password with running backend. Profile picture and sections are still in progress (Mort is OKAY with me making a pull request to him later--> this shouldn't stop integration)

I might add graphs later for exercise/sleep data, but those are additional.

@iKAN2025 thank you, I will merge this into main.


"Pure" annotation to support flow-sensitive typing

Problem
When using attr_reader :foo to hold a nilable type, flow-sensitive typing can't tell that (eg) obj.foo.strip! unless obj.foo.nil? is valid.
Proposed solution
Mark methods generated by attr_reader as Pure.
When a method is marked Pure, flow-sensitive typing can narrow the type until any non-Pure method is called.
For instance:
unless obj.foo.nil?
  1 + 1
  obj.foo.strip!
end

would be valid, but not
unless obj.foo.nil?
  obj.foo.strip!
  obj.foo = "hi"
  obj.foo.strip! # <- #foo= is impure, so `obj.foo` is no longer narrowed
end

I’ve written a little bit about why this is at least hard and maybe not possible without a complete rewrite of the type system here:
https://blog.jez.io/syntactic-control-flow/
going to close as “not planned” for the time being.
in the mean time, we recommend assigning the intermediate result to a variable

I'm familiar with the problem space, and that is a good writeup of it :)
It may well be that the internals of sorbet aren't amenable to it (or that you don't think it's a good fit), but I'd like to clarify to make sure.
I'm not familiar with sorbet specifically, but this approach should work for flow-typing systems in general.
In essence:
Add a Pure annotation which can apply to nullary call signatures. This is part of the signature, so (eg) subclasses can't be impure.
At each conditional, create an additional "flow control" context.
Instead of lasting to the end of the if..end block, this additional context would last until the next operation which is not statically Pure typed.
Type constraints discovered via Pure calls inside a conditional can be used for type narrowing within the new/additional context.
If I understand correctly, this should mostly re-use the existing infrastructure for flow control contexts.


Add prettier

Let's add prettier. Would be nice to have consistent styling across the project using prettier/lint-staged/husky, without having to think about it too much.

@moaazsidat could you 'teach' me how to configure prettier/link in my project ?

@luanfelipecosta sure thing,
Here's an outline for configuring pre-commit hooks for prettier:
https://prettier.io/docs/en/precommit.html, the lint-staged/husky approach is something I've used in the past, and has worked out well.
This requires you to have prettier installed, installation instructions here - installing locally is probably the best approach to take here since global installation may run into stale versions after a certain period of time.
Let me know if you have any questions!


ci: add Go 1.14.x to Travis builds

Codecov Report

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

@@           Coverage Diff           @@
##           master      #17   +/-   ##
=======================================
  Coverage   58.87%   58.87%
=======================================
  Files           7        7
  Lines        1347     1347
=======================================
  Hits          793      793
  Misses        384      384
  Partials      170      170

Flag
Coverage Δ

#go111x
?

#go112x
?

#go113x
58.87% <ø> (ø)

#linux
58.87% <ø> (ø)

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 d99642d...0d5a7cd. Read the comment docs.


The tool doesn't handle line comments

Hi!
When the input file has commented out attributes, the file gets messed up after using ini-file.
Input file:
[Global]
;proxy_client_headers[] = HTTP_X_FORWARDED_FOR

Command:
ini-file set --section "General" --key "proxy_client_headers[]" --value "HTTP_X_FORWARDED_FOR" /path/to/file

Expected result (either this):
[Global]
proxy_client_headers[] = HTTP_X_FORWARDED_FOR

Expected result (or something like this):
[Global]
;proxy_client_headers[] = HTTP_X_FORWARDED_FOR
proxy_client_headers[] = HTTP_X_FORWARDED_FOR

Actual result:
; ;proxy_client_headers[] = HTTP_X_FORWARDED_FOR

Background info and use case
I came in contact with this tool in my efforts to create a custom image based on bitnami/matomo and found a potential bug/feature request.
I wanted to do this:

I needed to create a custom image based on bitnami/matomo with a custom Matomo configuration, since the configuration changes I desire cannot be configured using evironment variables (which are parsed by libmatomo.sh).

This is how I did it:

Use the ini-file tool to manipulate global.ini.php while building a custom image based on bitnami/matomo.

Dockerfile:
FROM bitnami/matomo:4-debian-10 AS build-env
USER 0
RUN ini-file set --section "General" --key "proxy_client_headers[]" --value "HTTP_X_FORWARDED_FOR" /opt/bitnami/matomo/config/global.ini.php
USER 1001
EXPOSE 8080 8443

Hi, @olipo186.
Thanks for reporting this, we will take a look. Just to be sure, running your commands I also get the line correctly printed, apart from the one you mentioned with two semicolons.
; ;proxy_client_headers[] = HTTP_X_FORWARDED_FOR
...
proxy_client_headers[] = HTTP_X_FORWARDED_FOR

Is this your case as well?

Hi all, I'm going to close this issue due to inactivity but feel free to send a contribution if are open to contribute any related feature.


Feature/add change area overlay - ticket#135

What
I have added the logic to toggle the header on Explore by Location (Walsall) and Explore by Category & Location screens when a user wants to search for a different location.
I haven't added the styling, I leave this with you @designorant because when I am trying to use a position on the header everything moves around the page...
Note: The js does not load on the <ONSAutosuggest/> component on an on:click event because at the moment we can only load the ons DS js at a page level not at a component level and we hope that this will go away once the  issue is fixed by the design system team.

Blocked by #1761.

Fix incoming in https://github.com/ONSdigital/design-system/pull/1798

Now unblocked.


Print count of prime numbers in given range a and b for test cases Q.

🚀 Feature
Count prime numbers between given range using Prime Sieve.
Have you read the Contributing Guidelines on Pull Requests?
Yes.
Motivation
The solution can be implemented using cumulative count of prime numbers up to a large range.
An optimized approach to return prime numbers as it don't call prime sieve function for each test case. Therefore, solution is of complexity O( Q + (n log log n).
Pitch
This solution works for large test cases (up to 1000) and range up to 10^5.

I would like to contribute in C++ for HakinCodes 2020 @SKAUL05 @Kajol-Kumari

This issue is not the part of HakinCodes Contributors' Hack 2020

Code is correct and can be merged as it do not affect other files of master branch, so can't you add CH20 label to it. @SKAUL05 @Kajol-Kumari @siddharth25pandey @Abhijit2505

Code is correct and can be merged as it do not affect other files of master branch, so can't you add CH20 label to it. @SKAUL05 @Kajol-Kumari @siddharth25pandey @Abhijit2505

@akanksha-saini Every issue, which is created here cannot be the part of Contributor's Hack 2020. It should follow some guidelines. it's not like that you just created an issue, send the PR and we will merge it.


feat: Fixed file structure

Hello,
I added files into their respective folders, so this way the codebase looks much more cleaner, and then these files can be divided sub-modules and placed in the same folder in future.
POINT TO NOTE
On running example, I came across an issue
import 'sphere/dist/index.css' // This file doesn't exist.

I've commented out the import for now.

@Souvikns , can you have a look on this PR please

I guess this fixes #10

Yes, please have a look on it.

Yeah, it is fine. I am merging this pr.


Cleanup python environment

Why is this PR needed?
This PR is necessary to have developers work with a simpler environment, supporting python3.8.
What does this PR do?
This PR cleans up all our practices: packaging (and fixes a bug in our packaging that wasn't caught before), tox, documentation, code formatting (it's easier to have a code formatter) to map to a more "modern" development environment.
Anything else a reviewer needs to know?
For review, there is no need of something special:

The backwards compatibility of the check commands have been guaranteed (tox environment names, make commands)
The documentation to follow is cleaned, and easier to reproduce
The more recent python version need only to be installed on the host's OS to get tested.

Info for QA
Nothing to be noted, this cleans up mostly tech-debt.
Related info
None
Status BEFORE applying the patch

skuba-update --version returns incorrectly 0.0.0 (cosmetic issue)
make install inside skuba-update incorrectly installs python files on the host
make test inside skuba-update cannot run on a python3.8 machine
The other make  commands inside skuba-update fail.
black would reformat the file completely.

Status AFTER applying the patch

Fixed skuba-update version
Unecessary make commands removed
make test works on python3.8 node

Docs
No update required
Merge restrictions
(Please do not edit this)
We are in v4-maintenance phase, so we will restrict what can be merged to prevent unexpected surprises:
What can be merged (merge criteria):
    2 approvals:
        1 developer: code is fine
        1 QA: QA is fine
    there is a PR for updating documentation (or a statement that this is not needed)

Well, it seems skuba-update-acceptance has started to fail for an unrelated issue.
I suppose it's not regularly tested, so we missed it in periodics?:
+ make -f skuba/skuba-update/test/os/suse/Makefile test

pushd /home/jenkins/workspace/_v4_pr_update-acceptance_PR-1064/skuba/skuba-update/test/os/suse/ >/dev/null

docker build -t opensuse/tumbleweed:build-rpm -f /home/jenkins/workspace/_v4_pr_update-acceptance_PR-1064/skuba/skuba-update/test/os/suse//Dockerfile.builder /home/jenkins/workspace/_v4_pr_update-acceptance_PR-1064/skuba/skuba-update/test/os/suse/

Sending build context to Docker daemon  53.25kB

Step 1/3 : FROM registry.opensuse.org/opensuse/tumbleweed

 ---> 4882d840ccfd

Step 2/3 : RUN zypper ref && zypper -n in rpm-build rpmdevtools createrepo libcreaterepo_c-devel

 ---> Running in 28d53fd09fa1

Retrieving repository 'openSUSE-Tumbleweed-Non-Oss' metadata [....done]

Building repository 'openSUSE-Tumbleweed-Non-Oss' cache [....done]

Retrieving repository 'openSUSE-Tumbleweed-Oss' metadata [.....done]

Building repository 'openSUSE-Tumbleweed-Oss' cache [....done]

Retrieving repository 'openSUSE-Tumbleweed-Update' metadata [.....done]

Building repository 'openSUSE-Tumbleweed-Update' cache [....done]

All repositories have been refreshed.

Loading repository data...

Reading installed packages...

'createrepo' not found in package names. Trying capabilities.

Resolving package dependencies...

Problem: nothing provides python2-rpm needed by rpmdevtools-8.10-5.1.noarch

 Solution 1: do not install rpmdevtools-8.10-5.1.noarch

 Solution 2: break rpmdevtools-8.10-5.1.noarch by ignoring some of its dependencies

Choose from above solutions by number or cancel [1/2/c/d/?] (c): c

The command '/bin/sh -c zypper ref && zypper -n in rpm-build rpmdevtools createrepo libcreaterepo_c-devel' returned a non-zero code: 4

make: *** [skuba/skuba-update/test/os/suse/Makefile:27: rpm-builder-image] Error 4

I have no stake in that game. I just realise that we need to clear up tech debt, and that I needed something very simple to get my work done. Sadly.
If you want, I can propose all of those into single PRs. It doesn't like the best way to use the CI time.

I will abandon this PR, and make each of the fixes their own PR, as I don't think we'll get a consensus on all of them in one go (no pun intended).
I think cleanup of skuba-update is necessary to make it easier to maintain, and not let it rot. Who knows what CaaSP5 will contain, and I think a long running / regularily running process could be useful.

This PR has been superseded by:

https://github.com/SUSE/skuba/pull/1069 for the version file
https://github.com/SUSE/skuba/pull/1068 for the cleanup of the tox
https://github.com/SUSE/skuba/pull/1070 for the cleanup of some methods.


Accessibility improvements to toggle, and search.

I want to do more for the search, but I need to sit down and review how it all works first.

Thank you for this.
About search, there is a lot of duplication going on right now and I want to change how we pull icons entirely (i.e. not import them as Vue components but use a sprite.)
I'll try to remove the duplication (for now) today, but key things are:

We append outline- solid- to icons because icons are imported as Vue comps and some of them have HTML element names which error out. (see https://github.com/teenyicons/teenyicons.com/blob/master/plugins/icons.js#L20)
We remove those prefixes while displaying the icons using replace in computed properties also used to filter by the search input while lowercasing everything to match. (See https://github.com/teenyicons/teenyicons.com/blob/master/pages/index.vue#L107-L124)

If you have any other questions, feel free to ask. I will try to comment things as they are now.
Again, I appreciate the PR :raised_hands:

Updated.


possible issue with latest release

I just did a fresh synthesize install on Digital Ocean and got the following when attempting to render any graph:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 101, in get_response
    request.path_info)
  File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 300, in resolve
    sub_match = pattern.resolve(new_path)
  File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 300, in resolve
    sub_match = pattern.resolve(new_path)
  File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 209, in resolve
    return ResolverMatch(self.callback, args, kwargs, self.name)
  File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 216, in callback
    self._callback = get_callable(self._callback_str)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 27, in wrapper
    result = func(*args)
  File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 92, in get_callable
    lookup_view = getattr(import_module(mod_name), func_name)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/opt/graphite/webapp/graphite/render/views.py", line 37, in <module>
    from graphite.render.evaluator import evaluateTarget, extractPathExpressions
  File "/opt/graphite/webapp/graphite/render/evaluator.py", line 69, in <module>
    from graphite.render.functions import SeriesFunctions
  File "/opt/graphite/webapp/graphite/render/functions.py", line 34, in <module>
    from graphite.render.glyph import format_units
  File "/opt/graphite/webapp/graphite/render/glyph.py", line 20, in <module>
    import cairocffi as cairo
  File "/usr/local/lib/python2.7/dist-packages/cairocffi/__init__.py", line 16, in <module>
    from . import constants
ImportError: cannot import name constants

I'll do some more poking about when I have some free time later, but wanted to note this in case anyone else ran across it.

I'll take a look when I get home.
Jason Dixon
Sent from my iPhone

On Apr 21, 2015, at 7:22 PM, Michael Gorsuch<EMAIL_ADDRESS>wrote:
I just did a fresh synthesize install on Digital Ocean and got the following when attempting to render any graph:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 101, in get_response
request.path_info)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 300, in resolve
sub_match = pattern.resolve(new_path)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 300, in resolve
sub_match = pattern.resolve(new_path)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 209, in resolve
return ResolverMatch(self.callback, args, kwargs, self.name)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 216, in callback
self._callback = get_callable(self._callback_str)
File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 27, in wrapper
result = func(*args)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 92, in get_callable
lookup_view = getattr(import_module(mod_name), func_name)
File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 35, in import_module
import(name)
File "/opt/graphite/webapp/graphite/render/views.py", line 37, in
from graphite.render.evaluator import evaluateTarget, extractPathExpressions
File "/opt/graphite/webapp/graphite/render/evaluator.py", line 69, in
from graphite.render.functions import SeriesFunctions
File "/opt/graphite/webapp/graphite/render/functions.py", line 34, in
from graphite.render.glyph import format_units
File "/opt/graphite/webapp/graphite/render/glyph.py", line 20, in
import cairocffi as cairo
File "/usr/local/lib/python2.7/dist-packages/cairocffi/init.py", line 16, in
from . import constants
ImportError: cannot import name constants
I'll do some more poking about when I have some free time later, but wanted to note this in case anyone else ran across it.
—
Reply to this email directly or view it on GitHub.

Was this using the DO button or a manual install on the droplet?
Jason Dixon
Sent from my iPhone

On Apr 21, 2015, at 7:22 PM, Michael Gorsuch<EMAIL_ADDRESS>wrote:
I just did a fresh synthesize install on Digital Ocean and got the following when attempting to render any graph:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 101, in get_response
request.path_info)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 300, in resolve
sub_match = pattern.resolve(new_path)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 300, in resolve
sub_match = pattern.resolve(new_path)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 209, in resolve
return ResolverMatch(self.callback, args, kwargs, self.name)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 216, in callback
self._callback = get_callable(self._callback_str)
File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 27, in wrapper
result = func(*args)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 92, in get_callable
lookup_view = getattr(import_module(mod_name), func_name)
File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 35, in import_module
import(name)
File "/opt/graphite/webapp/graphite/render/views.py", line 37, in
from graphite.render.evaluator import evaluateTarget, extractPathExpressions
File "/opt/graphite/webapp/graphite/render/evaluator.py", line 69, in
from graphite.render.functions import SeriesFunctions
File "/opt/graphite/webapp/graphite/render/functions.py", line 34, in
from graphite.render.glyph import format_units
File "/opt/graphite/webapp/graphite/render/glyph.py", line 20, in
import cairocffi as cairo
File "/usr/local/lib/python2.7/dist-packages/cairocffi/init.py", line 16, in
from . import constants
ImportError: cannot import name constants
I'll do some more poking about when I have some free time later, but wanted to note this in case anyone else ran across it.
—
Reply to this email directly or view it on GitHub.

It was the DO button, sorry for not mentioning that.

I just ran a new install from DO button and it works fine here. It looks like possibly some sort of build error with cairocffi.

OK, great.  I'll close this out and if I run into it again, I'll try and suss out more detail.  Thanks!


nvfuser_decomp_table

Works with https://github.com/pytorch/pytorch/pull/83782
Handles lowering of _to_copy (introduced by decomposition table) to prims.convert_element_type

Upstream PR Is merged. Can we merge this one into your branch as well? @IvanYashchuk

aten._to_copy is now in the regular decomposition table and it should be handled as any other aten call inside TorchRefsNvfuserCapabilityMode.
Is something not working as expected without this change?

At this point in TorchDynamo -> AOT Autograd pipeline, we should receive an explicit graph of aten calls and I hope we don't need this special case.

In my standalone test, make_fx is still giving me an explicit aten._to_copy under autocast context.
import torch

import torch._prims as prims
from torch._prims.context import TorchRefsNvfuserCapabilityMode, TorchRefsMode, _is_func_unsupported_nvfuser
from torch.fx.experimental.proxy_tensor import make_fx
from torch._prims.executor import execute

dtype = torch.float16
x = torch.rand(5, device="cuda").to(dtype)
y = torch.rand(5, device="cuda").to(dtype)
x_fp32 = torch.rand(5, device="cuda")

def fn(x):
    x = x * 2
    x = x @ x
    x = x * 2
    return x

with TorchRefsNvfuserCapabilityMode():
    with torch.autocast("cuda"):
        nvprim_gm = make_fx(fn, decomposition_table={})(x_fp32)
        print(nvprim_gm.graph)

graph():
    %x_1 : [#users=1] = placeholder[target=x_1]
    %mul_default : [#users=2] = call_function[target=torch.ops.nvprims.mul.default](args = (%x_1, 2.0), kwargs = {})
    %_to_copy_default : [#users=1] = call_function[target=torch.ops.aten._to_copy.default](args = (%mul_default,), kwargs = {dtype: torch.float16})
    %_to_copy_default_1 : [#users=1] = call_function[target=torch.ops.aten._to_copy.default](args = (%mul_default,), kwargs = {dtype: torch.float16})
    %dot_default : [#users=1] = call_function[target=torch.ops.aten.dot.default](args = (%_to_copy_default_1, %_to_copy_default), kwargs = {})
    %convert_element_type_default : [#users=1] = call_function[target=torch.ops.nvprims.convert_element_type.default](args = (%dot_default, torch.float32), kwargs = {})
    %mul_default_1 : [#users=1] = call_function[target=torch.ops.nvprims.mul.default](args = (%convert_element_type_default, 2.0), kwargs = {})
    %convert_element_type_default_1 : [#users=1] = call_function[target=torch.ops.nvprims.convert_element_type.default](args = (%mul_default_1, torch.float16), kwargs = {})
    return convert_element_type_default_1

I thought the problem here is that our context manager kicks in at __torch_function__, which only kicks in at python dispatch. Hence the autocast happening in c++ is not handled and we need explicit use of a decomposition table to compensate that.

I thought the problem here is that our context manager kicks in at torch_function, which only kicks in at python dispatch.

That's right, but it's not a problem.

Hence the autocast happening in c++ is not handled and we need explicit use of a decomposition table to compensate that.

Similarly autograd happens in C++, but we don't use a decomposition table.
Here what we get in the prims_executor function is a graph already processed by one call to the make_fx function, so everything at this point is explicit in the graph, we don't have hidden C++ calls anymore.
The pipeline is: TorchDynamo does torch -> torch translation, then make_fx (inside AOT Autograd) records all C++ side calls (torch -> aten translation), then here we aten -> prims translation.
To emulate that try using
with TorchRefsNvfuserCapabilityMode():
    with torch.autocast("cuda"):
        nvprim_gm = make_fx(fn, decomposition_table={})(x_fp32)
        nvprim_gm = make_fx(nvprim_gm, decomposition_table={})(x_fp32)
        print(nvprim_gm.graph)


Beautifies CONTRIBUTING.md, adds pull request instructions

Fixes #323

Thank you so much! I wanted to do some things with Markdown, and still have more to learn. This is amazing! Thank you for helping!


拉到的库无法删除

Clear and concise description of the problem
错拉了一个库 然后无法删除了 面板内可以删除单个脚本 但库没办法删
Suggested solution
可以提供相关实现方法吗 目前是在arm环境内
Alternative
No response
Additional context
No response
Validations

[X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

2.14.5 修复


kubernetes dist file is big; executables in docker images are included twice

kubernetes-server-linux-amd64.tar.gz is 71 MB; that seemed bigger than I remember it being.
Focusing on kube-scheduler...
tar tzvf kubernetes-server-linux-amd64.tar.gz shows e.g.
-rwxr-xr-x root/root  17781624 2015-06-03 22:27 kubernetes/server/bin/kube-scheduler
-rw-r--r-- root/root  20449792 2015-06-03 22:27 kubernetes/server/bin/kube-scheduler.tar

Expanding kube-scheduler.tar, the big layer (for me) is one where the JSON says has
Cmd":["/bin/sh","-c","#(nop) ADD file:1921730b6a5704e5144432383579662ef9b1a97e9361f7a3cf276544f4ac349c in /usr/local/bin/kube-scheduler"]
And untaring layer.tar shows that the only file is usr/local/bin/kube-scheduler
Checksum indicates the files are identical.
I think this is repeated for kube-apiserver & kube-controller-manager.
Excluding the repeated files and re-tarring drops the size from 71MB to 54MB.
I believe we aren't using these files other than in the Docker containers (?)

We ship these for most of the CoreOS distros. Until they find another way, we need to revert the solution.

@zmerlynn Should everyone on the community side move to docker containers for master components?

@kelseyhightower we plan to run master components in containers for GCE and GKE going forward.  Unless that's a hardship for other distros, perhaps we can encourage it?
And if the tarball sizes are a problem, perhaps we could have a size-optimized tarball with just binaries?

Closing in favor of #28435 which has more up to date work


DO not merge: initial build

Initial build.  This is not intended to go on defaults.

Hi! This is the friendly automated conda-forge-linting service.
I wanted to let you know that I linted all conda-recipes in your PR (recipe) and found some lint.
Here's what I've got...
For recipe:

noarch: python recipes are required to have a lower bound on the python version. Typically this means putting python >=3.6 in both host and run but you should check upstream for the package's Python compatibility.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.


Move check list items to the end of the list if they are checked

Like the title suggests. This is the behaviour of google keep.
My wife asked my why this app does not work this way :smile:
Google keep shows the checkboxes grouped by state (unchecked at the top).

Dupticate of #680

Right, I'm closing this one as a duplicate in favour of #680.


Use tailwindcss class for dark mode

Fixes title color when system preferences is dark mode

Before:

After:

disabled dark mode for now


Handle attached TP / SL failure

The Chore
When we send a market / limit order with an attached TP / SL it is POSSIBLE for the Market / Limit to be processed successfully in the batch but the stop order to fail.
If that was to happen it would mean the user would not actually have the risk mgmt in place that they thought they would when they submitted the order, so we need to have some decent error messaging in this case.
Acceptance Criteria

[ ] Check the errors that are received on batch orders, we should have sensible errors for

[ ] Your limit / market order and your stop order both failed
[ ] Your limit / market order went through but your stop order failed so you have no TP / SL on your orde
[ ] Your limit / market order failed but the stop went through so you might want to cancel that because its pointless

[ ] These all need to be replayed to the user via the toasts and the toast should be orange in each case

Additional details / background info

Closing as dupe


odd side scroll artifact at multiple browser widths

Detailed description
Icon Library and Pictogram Library seem to have picked up an odd side scroll artifact at multiple browser widths in Chrome and Safari (not firefox)

What browser are you working in?
Chrome Version 81.0.4044.113 (Official Build) (64-bit)
Safari Version 13.1 (156<IP_ADDRESS>.8)

Steps to reproduce the issue

got to https://www.carbondesignsystem.com/guidelines/icons/library
start to narrow the window
observe side scroll artifact

Additional information

Screenshots or code
https://ibm.enterprise.slack.com/files/W4BSKD8RK/F01280S449J/screen_recording_2020-04-17_at_11.16.20_am.mov

use firefox

jk

This seems to be addressed in latest, closing this out. Let me know if you are still observing this behavior!


Support reading and setting own Away status

This should be in our next release.
The back-end supports most of that, but there are more changes upcoming.
That work will evolve with it.
We should be able to:

display other users' away status
set own status
fetch user_status on initial fetch
be able to set textual 'busy/away' statuses like 'On vacation'
display these statuses on the user's account page

This was implemented a while ago, by #3263.


Ensured that actions are properly ordered.

Description
Please include a summary of the change and which issue is fixed if applicable. Please also include relevant motivation and context.
Fixes # (issue)
Checklist

[ ] I have performed a self-review of my own code
[ ] I have made corresponding changes to the documentation (if applicable)
[ ] I have added tests that prove my fix is effective or that my feature works (if applicable)

coverage: 98.223%. remained the same
when pulling 515163bfc51e595410dbdd1a65cf845ced4a3a5a on 407-bugs-in-cicd-workflow
into 45eb7fc24d1d20c112f440a70a879076a7647961 on main.


MQTT Gateway for Server

Hey,
I really love the idea to include MQTT into the server. I created a seperate gateway script which passes status of devices from the Server to a MQTT Broker and subscribes to a "set" topic and passes the payload back to the set API call of the Server.
The script polls the status of all known devices (in seperate threads, 20 at the same time currently) every x seconds. Polling is not the best solution here of course, I would really love to have a persist socket to each device and get status changes immediately. But I think this needs a complete rewrite of the server. So maybe polling is "better than nothing" here.
Code needs definetly some clean up and documentation is still missing.

MQTT topic structure:

So, I'm currently in the middle of a server rewrite that does all this and more.  It currently makes persistent connections to all devices and does this with a single thread via non-blocking sockets, supports HTTP, WebSockets, plain TCP, and all of the above wrapped in SSL/TLS.  It also has hooks for native MQTT but I have not yet had a chance to hook them up yet https://github.com/uzlonewolf/tinytuya/blob/socket-server/multiserver/multiserver.py#L963 .  I'm currently out of town and have not had much time to work on it, but should be able to get back to it next week.

Fully agree - best option is to have persist socket connections. Maybe it's a good idea to include the mqtt_gateway into the existing server until your new rewrite is ready for production. If you leave the MQTT structure the same, users can easily upgrade.

Thanks @mschlenstedt !  I agee, this is a good incremental feature for our current server.
I know @uzlonewolf 's multiserver is going to be amazing!  Safe travel, LW!


Array of files request example

Hi, I'am triying to validate an array of files but I don't know how the request must be made.
This is my DTO:
import { ApiProperty } from '@nestjs/swagger';
import { IsBooleanString, IsNotEmpty, IsNumberString, IsString } from 'class-validator';
import { HasMimeType, IsFiles, MemoryStoredFile } from 'nestjs-form-data';
import { BaseDto } from 'src/modules/base/dto/base-dto';

export class createDto extends BaseDto {
  @ApiProperty({ type: 'number' })
  @IsNumberString()
  @IsNotEmpty()
  readonly companyBranch;

  @ApiProperty({ type: 'number' })
  @IsNumberString()
  @IsNotEmpty()
  readonly entryUser;

  @ApiProperty({ type: 'number' })
  @IsNumberString()
  @IsNotEmpty()
  readonly sinisterType;

  @ApiProperty({ type: 'number' })
  @IsNumberString()
  @IsNotEmpty()
  readonly sinisterNumber;

  @ApiProperty({ type: 'string' })
  @IsNotEmpty()
  @IsString()
  readonly formType;

  @ApiProperty({ type: 'boolean' })
  @IsBooleanString()
  readonly isCanceled;

  @ApiProperty({ type: 'files' })
  @IsFiles({ each: true })
  @HasMimeType(['image/jpeg', 'image/png'], { each: true })
  readonly photos: MemoryStoredFile[];
}

And this is my request with postman:

But still asking me for an array of photos.
Thanks in advance!

Hey! To validate an array of files, you can use the decorator @IsFile({ each: true }) or @IsFiles()
IsFiles decorator does not need to pass each option

Hey! To validate an array of files, you can use the decorator @IsFile({ each: true }) or @IsFiles()
IsFiles decorator does not need to pass each option

Hi dmitriy! Without "each: true" in isFiles() I receive an error:

With isFile({each: true}) works, maybe is a bug with isFiles().
Other thing, the data is parsed like this:

Is strange, the property "photos" isn't an array, but has nested object with the other file.

Yes you are right, I just released version 1.4.1 which fixed the problem
Thank you :)

Yes you are right, I just released version 1.4.1 which fixed the problem
Thank you :)

Thanks you for the quickly response. Now I don't receive that eror with isFiles but, with postman still asking me for an array of photos:

Try like this

When sending an array as data, you must specify the index

But with isFile({each: true}) works great! But, then probably there is a bug with isFiles()

Try like this

When sending an array as data, you must specify the index
or like this

Amazing, thanks!

Use @IsFile({each: true}) must be paired with@IsArray() decorator
If you look closely, then when transferring an array of files without [] or [index] leads to the fact that there is only one file object in the field
For example
DTO
export class FormDataTestDto {

  @IsFile({ each: true })
  @HasMimeType(['image/jpeg', 'image/png'], { each: true })
  photos: FileSystemStoredFile[];

}

Request

Debugger

photos is not an array
These are the features of the work of the mapper from form data to object

Maybe it needs to be documented


Adds optional msg to asserts and also assertNotExists

Can you please rebase this?

| Can you please rebase this?
@mnunberg I noticed this PR overlaps with my changes in PR #7 so I've merged Itamar's commit in there and resolved the git conflicts, hopefully making a merge easier.
Doing that, I noticed those same changes were also needed in cluster.py so I made similar changes there.
cheers.

@itamarhaber @mnunberg I believe this PR can now be closed as the code was added as part of: https://github.com/RedisLabs/rmtest/pull/7


Make @Published properties public for reading in ActionCalloutContext

Hi, @danielsaidi!
Thanks for a great library!
I am working on a custom keyboard based on Keyboard Kit, but wanted to customise the visuals.
I was able to replicate SystemKeyboard() by making my own view with similar code and tweaking layout to my needs.
Next I wanted to customise callouts, but when I tried to make my own version of ActionCallout I found that I need to read properties from ActionCalloutContext:
/**
     The action that are currently active for the context.
     */
    @Published private(set) var actions: [KeyboardAction] = []

    /**
     The callout bubble alignment.
     */
    @Published private(set) var alignment: HorizontalAlignment = .leading

    /**
     The frame of the currently pressed keyboard button.
     */
    @Published private(set) var buttonFrame: CGRect = .zero

    /**
     The currently selected action index.
     */
    @Published private(set) var selectedIndex: Int = -1

Unfortunately, they are internal, so I get errors. Is it possible to mark them @Published private(set) public var ?
Or better - make them @Published public var ? That way I could really alter context logic in a subclass to suit my needs. I want to use custom logic to provide frame for callout actions other then buttonFrame because on small screens buttons are small, so are the callouts.

Found that I will also need public static let coordinateSpace = "com.keyboardkit.coordinate.ActionCallout" to provide correct analogue to helper
func actionCallout(
        context: ActionCalloutContext,
        style: ActionCalloutStyle = .standard) -> some View

Hi @OneSman7
To just customize the visuals, you could create a custom appearance and return a custom callout style, but for more customizations you probably need access to more things in the context.
I chose to keep these things internal for now, to avoid breaking changes if I wanted to change the behavior. I can look at making them public, if the style approach doesn't work for you.

It will help to make @Published properties private(set) public and coordinate space public so I can subscribe my custom callout view to context changes and integrate it into SystemKeyboard analogue.

I have fixed this in the v6 feature branch. 👍

Thank you! 🙏
Due to that I was able to build custom width action callouts!


can't install chart using user:password@repo

Hey, I'm using K3S with the HelmChart resource.
It doesn't support a dedicated user/password fields - instead I use https://:@my-piravte-erpo
It failed, so I tried to reproduce directly with helm.
running the command:
helm install --namespace default --repo https://<user>:>password>@<repo> <name> <chart>
also fails. It successfully grabs the index.yaml file, but fails to get the .tgz file. in the error message, it states:
Error: failed to fetch https://<repo>/<chart>-0.1.1.tgz : 204 No Content
It doesn't use username or password - I check the repo logs and it does show a request from me (for index.yaml) followed by anonymous request (for the .tgz).
When working manually I can use repo add and update before, or just pass the username/password flags, but I think this is a bug as Id expect helm to reuse these values.
Ill also open a ticket on the HelmController that k3s uses to run these - if they can add a username/password fields this will also solve.
Thanks a lot!!
Output of helm version:
version.BuildInfo{Version:"v3.5.4", GitCommit:"1b5edb69df3d3a08df77c9902dc17af864ff05d1", GitTreeState:"clean", GoVersion:"go1.15.11"}
Output of kubectl version:
Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.7+k3s1", GitCommit:"aa768cbdabdb44c95c5c1d9562ea7f5ded073bc0", GitTreeState:"clean", BuildDate:"2021-05-20T01:07:13Z", GoVersion:"go1.15.12", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.7+k3s1", GitCommit:"aa768cbdabdb44c95c5c1d9562ea7f5ded073bc0", GitTreeState:"clean", BuildDate:"2021-05-20T01:07:13Z", GoVersion:"go1.15.12", Compiler:"gc", Platform:"linux/amd64"}
Cloud Provider/Platform (AKS, GKE, Minikube etc.):
rancher K3S

I think this is a similar problem to #9599, if -username and -password are not specified. I think using the username and password carried in the URL is a better option (instead of going to search from local)
WDYT @bacongobbler

First, the HelmChart resource is part of k3s and not part of Kubernetes itself. It's an add-on the distribution is providing. For issues with that please contact the k3s project.
The issue here is related to #9599 but is slightly different. If there is a username and password in the URL it would need to be pulled out of the URL and passed around. A new change would be needed to fix this.
Putting the username and password in the URL isn't usually a good idea. There are places where Helm displays the URL and the username and password would then be displayed. So, this is discouraged in general. We don't want to accidentally log credentials, for example.

relevant security issue: https://github.com/helm/helm/issues/9777

Please use helm install --repo --username. The CLI will prompt for your password. To pass username/password to the chart URL, pass the --pass-credentials flag introduced in Helm 3.6.1. Thanks!


Under drop bug?

Is this expected behaviour?
⍜(↘2)∘ "ab" # => "ab"
⍜(↘3)∘ "ab" # => "b"
⍜(↘4)∘ "ab" # => ""

I think it's weird, and it forces me to always guard my ⍜↘ with a ⧻ check. I would expect ⍜↘ to be truly reversible regardless of the argument passed.
Using uiua#f97ba702.

Yes, I would say that's a bug.
I'll take a look.


[FR] Invert RX TX

Hi,
is it possible to add to configuration option to invert RX and TX or there is hardware limitation?

Hi @zbyrek,
unfortunately, it is impossible to invert RX, TX, or CTS due to the MCU hardware limitations.
What it is that you are trying to achieve? I am going to make a wild guess, but if you are connecting bluebill-serial-monster to RS-232, inverting signals is not the way to go. You need to use some RS-232 level converter circuitry.
Please keep in mind that it is still possible to change TX output type (push-pull vs open drain), and RX/CTS pull type (up, down, floating). This can be useful when designing a level conversion circuit.

I know that rs232 is another voltage levels, just simplest way to change level is using single transistor which inverts signal, also i thought about ws2812 over uart.

@zbyrek, thanks for the explanation. Since it is impossible to change signal polarity of RX/TX due to hardware limitations and the fact that this is documented in README.md, I am going to close this issue. Please use hardware solutions. As I said, keep in mind that you can configure TX as an open-drain output. If you do that and use a pull-up resistor, you will effectively invert TX. Thanks.


Enable deep copy of Cumulative global constraint

This addresses issue #167
I added a test to reproduce the error (and that it's fixed).
The changes did not break any other test.

Hi Helge,
Great, thanks a lot for catching and fixing this!
To me the fix looks fine, and idd no errors.
@IgnaceBleukx you wrote the original code (both the deepcopy and the cumulative), can you acknowledge and merge this change?


extreme clicking method

If it's applicable , I would like to ask you to support extreme clicking method for future versions.
Thanks

Implemented #1111


Documentation or Tutorial Requests！！

Dear developers, first of all I am very interested in this project, but I have some problems when I perform local deployment, I will be very grateful if the developers can reply to me.The tutorial of the reference documentation of this open source project is behind the code. If possible, the documentation can be updated in time. At present, I can start the service locally, but the ingestion module cannot connect to airflow through rest-api. The ingestion module uses the official image provided. Thank you very much.

@zhangtt9537 we are continuously improving the documentation. We encourage community participation in doing the same. Please do bring up specific issues as a lot of docs have already been updated.


[release/v1.7]  Fix: Use containerd binary from path in Flatcar

What this PR does / why we need it:
This is a manual cherry-pick of the #3040
What type of PR is this?
/kind regression
Special notes for your reviewer:
Does this PR introduce a user-facing change? Then add your Release Note here:

Fix: Use containerd binary from path in Flatcar

Documentation:

NONE

/retest

cc @kubermatic/sig-release-managers


I raised an issue 2 days ago and I haven't been assisted!!!!!

Does this issue occur when all extensions are disabled?: Yes/No

VS Code Version:
OS Version:

Steps to Reproduce:

its the weekend
you should expect a response late next week
also you should link your previous issue https://github.com/microsoft/vscode/issues/209177

I'm receiving a zero grade

This is issue tracker for VS Code editor itself, not support forum. You should contact support for your course, not maintainers of editor.

I'm receiving a zero grade

This is issue tracker for VS Code editor itself, not support forum. You should contact support for your course, not maintainers of editor.

can you please provide their contact info?

one of these

otherwise we have no idea
as VSCode does not provide your course


Better way to get the port from the request?

I'm in the process of porting an old bottle app to falcon. The first thing my app does is generate some api documentation and returns it as HTML. In the documentation I have clickable links that makes it easy to explore the api. Whether on localhost or on production I want the links to work, so I generate a "site" parameter that I prefix all links with.
In bottle this was:
site = "%s://%s" % (request.urlparts.scheme, request.urlparts.netloc)

In falcon the easiest way I can find to do this is
site = "%s://%s" % (request.protocol, request.headers["HOST"])

Having to rely on manually reading the HOST header feels very inelegant to me. Note that this is not the same as request.host which returns the host without the port number.
I see a couple of ways this can be improved:

Make request.host include the port in the response. Backwards incompatible, even though everyone that previously relied on port numbers probably didn't use request.host anyway.
Add new property request.host_with_port.
Add new property request.port and let people that need the host + port combination write their own utility that combine it with the host.

I'm willing to write a pull request for this, but would love some feedback on which of the versions you would prefer.

Hi @EmilStenstrom, thanks for bringing this up. To improve parity with other libraries/frameworks, I propose making all three of the following changes:

Add a new property, Request.port.
Add a new property, Request.netloc that will contain the host as well as the port (if present). Note that "netloc" is consistent with the standard library's urlparse(). The value can be taken directly from the WSGI variables 'HTTP_HOST', or 'SERVER_NAME' and 'SERVER_PORT' (use the latter variables when 'HTTP_HOST' is missing. See also: https://www.python.org/dev/peps/pep-3333/#url-reconstruction).
Add a new property, Request.scheme and convert Request.protocol into a deprecated alias of the new property (honestly, I don't remember why "protocol" was used in the first place, since that isn't the standard term).

Does that sound reasonable?

Hi! All your suggestions sound good to me. Thanks for listening!

Thanks! ❤


Deserialization fails when request is empty but a content-type header is present

I recently updated from 4.0.0-beta1 to 4.2.0 and an endpoint where I use EmptyRequest began to fail with a System.Text.Json.JsonException (see details below).
I believe this error is due to this commit.
I'm working on creating a test to reproduce and then I'll re-add the content-length check.
Exception:
System.Text.Json.JsonException: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
 ---> System.Text.Json.JsonReaderException: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. LineNumber: 0 | BytePositionInLine: 0.
   at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
   at System.Text.Json.Utf8JsonReader.Read()
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   --- End of inner exception stack trace ---
   at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCoreAsObject(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadCore[TValue](JsonConverter jsonConverter, Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadCore[TValue](JsonReaderState& readerState, Boolean isFinalBlock, ReadOnlySpan`1 buffer, JsonSerializerOptions options, ReadStack& state, JsonConverter converterBase)
   at System.Text.Json.JsonSerializer.ContinueDeserialize[TValue](ReadBufferState& bufferState, JsonReaderState& jsonReaderState, ReadStack& readStack, JsonConverter converter, JsonSerializerOptions options)
   at System.Text.Json.JsonSerializer.ReadAllAsync[TValue](Stream utf8Json, JsonTypeInfo jsonTypeInfo, CancellationToken cancellationToken)
   at FastEndpoints.Endpoint`2.BindToModel(HttpContext ctx, List`1 failures, JsonSerializerContext serializerCtx, Boolean dontAutoBindForm, CancellationToken cancellation)
   at FastEndpoints.Endpoint`2.ExecAsync(HttpContext ctx, EndpointDefinition endpoint, CancellationToken cancellation)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

HEADERS
=======
Accept: */*
Connection: keep-alive
Host: localhost:7167
User-Agent: PostmanRuntime/7.29.0
Accept-Encoding: gzip, deflate, br
Cache-Control: no-cache
Content-Type: application/json
Postman-Token: d7a60dcd-a9a1-4884-bfcb-12a210f708b6

we stopped relying on the content-length header because it was reported that some json clients do not set the content length reliably. infact was missing altogether in some cases. and we need to read/buffer the request body stream in order to check if there's data in the stream. this is not desirable from a performance standpoint.
so. if your client is setting "application/json" as the content-type, then there must be some valid json in the request body. even if it's just an empty json object {}. otherwise STJ will throw like you're seeing.
please see my replies in the following thread for a workaround: https://github.com/dj-nitehawk/FastEndpoints/issues/124

Sounds good. I came up with option 4 and am submitting a PR now. It's basically:
        if (isEmptyRequest)
        {
            req = new TRequest();
        }
        else if (isPlainTextRequest)
        ...

bloody hell mate!
the answer is that simple eh?
seriously...
well done!!!
will merge your PR asap...
🙏🙏🙏

fix available in v4.3.0-beta11
thanks again @CoryCharlton

Just got into this error and was really sad tryna find the solution for like 1h :(


how can I print the hypervolume for each generation？

Hello,
I want to use hypervolume to evaluate if the optimization process has been convergence. From this version of pymoo documentation:
https://www.pymoo.org/getting_started.html#Functional-Interface
It seems like I can get  hypervolume for each generation directly by turning 'verbose' true.
But now i only get the following parameters instead:
n_gen |  n_eval |   cv (min)   |   cv (avg)   |  n_nds  |     eps      |  indicator
May you explain what 'eps' and 'indicator' mean? Can I test the convergence from them? If not how can I test the convergence?
Thanks!

Find more detailed explanation about how to terminate optimization here,
https://www.pymoo.org/interface/termination.html
think I figure out this problem.

Yes, the eps and indicator values are used for termination. For me details please have a look at our paper:
https://www.egr.msu.edu/~kdeb/papers/c2020003.pdf
For an HV tutorial the getting started guide part IV might be helpful:
https://pymoo.org/getting_started/part_4.html

Thank you!

Yes, the eps and indicator values are used for termination. For me details please have a look at our paper: https://www.egr.msu.edu/~kdeb/papers/c2020003.pdf
For an HV tutorial the getting started guide part IV might be helpful: https://pymoo.org/getting_started/part_4.html


Testing CDK version to 1.101.0

Codecov Report

Merging #210 (3a27325) into master (5659a9b) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #210   +/-   ##
=======================================
  Coverage   97.29%   97.29%
=======================================
  Files           3        3
  Lines          74       74
  Branches       15       15
=======================================
  Hits           72       72
  Misses          2        2

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 1ae84c3...3a27325. Read the comment docs.


add version to tooltip

I will add the current version to the Nav.

Done in the vite branch, though it seems to be hard coded to 0.0.0.

Yes, it is ;-)

done