[FEA] Refactor how arguments are added to scripts

I have noticed that the code used to parse the scripts is repeated in multiple places.
I think it would beneficial to refactor the different parser.add_argument calls, grouping them in a single file, and exposing it somehow to the different scripts.
I will work on this feature request.

Fixed via #102


reqlite not behaving the same as rethinkdbdash with query

Seeing reqlite not behaving the same as rethinkdbdash with a query:
rethinkdbdash
r.table('accounts').get('nonsense-here').ne(null).run((error, exists) => {
     console.log(exists); // false
});

reqlite
r.table('accounts').get('nonsense-here').ne(null).run((error, exists) => {
     console.log(exists); // true
});

Does this seem right, or am I doing something wrong?

That's probably a bug
On Sun, Oct 16, 2016, 14:13 Justin Keller<EMAIL_ADDRESS>wrote:

Does this seem right, or am I doing something wrong?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/neumino/reqlite/issues/88#issuecomment-254075376, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABZOu9OHyVAjZfcRl8Epp-HJTcncgvtMks5q0pN0gaJpZM4KVT8A
.

I would really appreciate it if we could work out a fix. I know RethinkDB officially shut down, but this issue is causing my tests to fail. Thanks.

I guess there's no special handling to compare DocNotFound and null.
Also this project has never been  officially sponsored by RethinkDB

@neumino I understand that reqlite and thinky are not officially supported. I really appreciate the amazing work you've put into both projects. I am building my new project using Thinky in fact.
This bug, and https://github.com/neumino/thinky/issues/581 are currently blocking me though. Is there anyway you could take a look at these? I know you're in the bay area, and if it's ok, I am willing to come up and meet you for lunch or something (on me) and we can fix them.

Just ran into the same. As a work-around, you can try:
r.table('accounts').get('nonsense-here').default(null).ne(null).run((error, exists) => {
  console.log(exists); // false
});

If you are ok with the result being truthy/falsy and not necessarily a boolean, you can skip the ne(null).


How to execute cassandra query using where clause.

Hi,
I am trying to execute the select query using the where clause on the user_name field.
CREATE TABLE insta2.tbl_jobseeker (
id int PRIMARY KEY,
user_name text
) WITH bloom_filter_fp_chance = 0.01
AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
CREATE INDEX username ON insta2.tbl_jobseeker (user_name);
But it is throwing the exception as:
Traceback (most recent call last):
File "/usr/local/bin/cqlsh", line 1258, in perform_simple_statement
result = future.result()
File "cassandra/cluster.py", line 3629, in cassandra.cluster.ResponseFuture.result (cassandra/cluster.c:69380)
raise self._final_exception
ReadFailure: Error from server: code=1300 [Replica(s) failed to execute read] message="Operation failed - received 0 responses and 1 failures" info={'failures': 1, 'received_responses': 0, 'required_responses': 1, 'consistency': 'ONE'}

Hi,
With CQL, you cannot use a WHERE clause to search in your cassandra table. You should use the elasticsearch API https://www.elastic.co/guide/en/elasticsearch/reference/current/docs.html#docs or the JDBC driver for elasticsearch sql4es.
Thanks.

Hi,
Can we create the cassandra index instead of elasticsearch index on the user_name so that I can perform the simple CQL query ?

Hi,
Yes, you should be able to do it for a column indexed with a cassandra index, but i just found a bug in elassandra by checking it. It is fixed and i will release a new version Thursday.
Thanks for your request.
Vincent.

Hi,
Thanks.Will wait for the Thursday release.

Fixed with release 2.1.1-16.


Make Project.logCategory appends project.name to project.path with a delimiter

Pull Request Details
In a nested multi module project, if the name and the path are not equal, they are appended however they are appended without any separator or delimiter. This change propose to insert a space before the name.
So
[gradle-intellij-plugin :modules:corecore] ...
Becomes
[gradle-intellij-plugin :modules:core core] ...
Motivation and Context
This not a big fix, but this makes logs easier to read.
How Has This Been Tested

Types of changes

[ ] Docs change / refactoring / dependency upgrade
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

I don't think listing this change in the changelog noteworthy.

[x] I have read the CONTRIBUTING document.
[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] I have included my change in the CHANGELOG.
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

Thanks!

You're welcome thanks !


IRGen: Weak-link opaque type entry points.

When backward deploying to an OS that may not have these entry points, weak-link them so that they
can be used conditionally in availability contexts that check for them.
rdar://problem/50731151

@swift-ci Please test


Unable to remove notifications for a Pokemon.

Tested receiving notifications using a pidgey but now can't remove the notification.  So every refresh I get pidgey notifications.

This does seem like a bug.  Meanwhile, you can go to stats and uncheck the notification.

I can +1 this, unchecking notification in stats made no difference for me, had to clearly my cache and cookies to get it to stop.

That's a limitation of the browser notifications. If you get several dozen notifications at once and they will all appear as you close the previous notifications. There's afaik no way to mass-dismiss notifications.


Could drafts be saved and shared between login instances?

This is a feature I really miss from Slack.  I could be on one machine typing up a post, then switch machines and my draft would appear there too.  Often I will be starting a post on my Mac, then realize I want to include a screenshot from my Windows box.  In Slack I just switched machines, screenshotted, then pasted it into the draft on Windows.  Can't do that with Zulip but it sure would be nice!

@vanclute thanks for the feedback!
This is being worked on here: https://github.com/zulip/zulip/issues/3775.
@Hypro999 FYI -- I think if you open a new PR, I should have the capacity to review it this coming week.

@timabbott: opened at https://github.com/zulip/zulip/pull/18074


Remoting using Azure Active Directory (AAD) credentials fails with "access is denied"

Summary
I'm trying to specify an AzureAD credential to connect to a PowerShell Remoting session. I can connect locally (loopback) without specifying any credentials successfully. However, when I specify the exact same account information explicitly, it fails.
https://stackoverflow.com/questions/62235382/powershell-throws-access-is-denied-exception-when-using-azure-active-directory
https://www.reddit.com/r/sysadmin/comments/drkq67/remote_powershell_session_using_azuread/
https://powershell.org/forums/topic/problem-with-remote-session-using-azure-ad-credentials/
https://powershell.org/forums/topic/azure-ad-connection-credential/
Steps to reproduce
C:\Users\TrevorSullivan> etsn localhost -UseSSL -SessionOption (New-PSSessionOption -SkipCACheck -SkipCNCheck) -Credential azuread\trevorsullivan

PowerShell credential request
Enter your credentials.
Password for user azuread\trevorsullivan: **********

Enter-PSSession: Connecting to remote server localhost failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic.
C:\Users\TrevorSullivan> etsn localhost -UseSSL -SessionOption (New-PSSessionOption -SkipCACheck -SkipCNCheck)
[localhost]: PS C:\Users\TrevorSullivan\Documents>

Expected behavior
PowerShell uses the Azure AD credential to establish a remoting session.
Actual behavior
Access is denied.
Environment data
Name                           Value
----                           -----
PSVersion                      7.0.3
PSEdition                      Core
GitCommitId                    7.0.3
OS                             Microsoft Windows 10.0.19041
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

Is the Azure AD user a member of the local Administrators group or the Remote Management Users group? Can you use something like PSExec to run psexec.exe -u azuread\trevorsullivan -p password whoami.exe /all?

Yes, I am the only user of this computer, and I am in the Administrators group.
PS C:\Users\TrevorSullivan> psexec -u azuread\trevorsullivan whoami /all

PsExec v2.2 - Execute processes remotely
Copyright (C) 2001-2016 Mark Russinovich
Sysinternals - www.sysinternals.com

Password:
PsExec could not start whoami:
The user name or password is incorrect.

I'm pretty sure this is a bug with Windows and Azure Active Directory authentication, just like Task Scheduler.

Ah ok I didn't realise your current user was the same as the credentials you specified. It's interesting that the example without an explicit -Credential works just fine as that means the implicit token that Windows has stored for your current logon will work against a network logon whereas when you specify it explicitly it does not. I do not fully understand how AzureAD works but I believe Windows uses the CloudAP Negotiate provider to facilitate the logon for those accounts so that might be a place to start looking into.

I was very curious at this situation and I'm not able to replicate the problem in my test environment. I'm able to RDP to the Azure VM and auth with my Azure AD account. I'm able to create an run a scheduled task using that same account. I'm also able to connect to over PSRemoting with the implicit and explicit credentials for my Azure AD account. I was able to do so with both the Netlogon (DOMAIN\username) and UPN form (username@DOMAIN.COM).

The PSRemoting tests I tried

When looking through the Wireshark captures I found that it is using Kerberos authentication which is expected. This is a completely vanilla setup of Azure AD that I used https://docs.microsoft.com/en-us/azure/active-directory-domain-services/tutorial-create-instance to complete.
One thing I did notice is that the PowerShell instance needs to already be running as an Administrator. Without that the underlying WinRM library is set to always fail with that error based on a recentish update. Although that blog post doesn't actually describe this particular scenario, that CVE fix also affected this setup. This check is to stop a limited process from elevating itself to an Administrator without going through a UAC prompt. I can definitely rule out PowerShell adding that check by running
winrs -r:http://localhost:5985/wsman -u:jborean93\testazad whoami.exe

On an elevated shell this works just fine but on a limited shell it will fail due to that new check I mentioned above.

@jborean93 Do you have Multi-Factor Authentication (MFA) configured on your Azure Active Directory (AAD) user account? I do.

I did not but that would indicate why yours fails and mine does not. It also explain how it works when you omit the credentials as it will be using the existing PRT that Windows had received during the logon process compared to getting a new one.
When you RDP into the box, do you just use the normal password? How does the MFA part come into that?

I'm not RDP'ing into anything. This is my local development system.
Here's what I see in the Windows Event Log (Security) when I run the above command.
- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
  <Provider Name="Microsoft-Windows-Security-Auditing" Guid="{54849625-5478-4994-a5ba-3e3b0328c30d}" />
  <EventID>4625</EventID>
  <Version>0</Version>
  <Level>0</Level>
  <Task>12544</Task>
  <Opcode>0</Opcode>
  <Keywords>0x8010000000000000</Keywords>
  <TimeCreated SystemTime="2020-09-23T20:07:16.1450560Z" />
  <EventRecordID>680302</EventRecordID>
  <Correlation ActivityID="{40d705d0-91e4-0010-0306-d740e491d601}" />
  <Execution ProcessID="1716" ThreadID="15940" />
  <Channel>Security</Channel>
  <Computer>artemis</Computer>
  <Security />
  </System>
- <EventData>
  <Data Name="SubjectUserSid">S-1-0-0</Data>
  <Data Name="SubjectUserName">-</Data>
  <Data Name="SubjectDomainName">-</Data>
  <Data Name="SubjectLogonId">0x0</Data>
  <Data Name="TargetUserSid">S-1-0-0</Data>
  <Data Name="TargetUserName">trevorsullivan</Data>
  <Data Name="TargetDomainName">azuread</Data>
  <Data Name="Status">0xc000006d</Data>
  <Data Name="FailureReason">%%2313</Data>
  <Data Name="SubStatus">0xc0000064</Data>
  <Data Name="LogonType">3</Data>
  <Data Name="LogonProcessName">NtLmSsp</Data>
  <Data Name="AuthenticationPackageName">NTLM</Data>
  <Data Name="WorkstationName">ARTEMIS</Data>
  <Data Name="TransmittedServices">-</Data>
  <Data Name="LmPackageName">-</Data>
  <Data Name="KeyLength">0</Data>
  <Data Name="ProcessId">0x0</Data>
  <Data Name="ProcessName">-</Data>
  <Data Name="IpAddress">-</Data>
  <Data Name="IpPort">-</Data>
  </EventData>
  </Event>

By the way, I do not need to be running PowerShell as Administrator, in order to establish a loopback PowerShell Remoting session. See screenshot below.

NOTE: The substatus code in the Event Log entry indicates
0xC0000064 | User logon with misspelled or bad user account

When I run whoami, I get literally the exact same output. How is it that this could be an invalid username?

So is your local machine joined to the Azure AD domain?
Is your running running user the Azure AD user?
Does whoami output azuread\trevorsullivan?

By the way, I do not need to be running PowerShell as Administrator, in order to establish a loopback PowerShell Remoting session. See screenshot below.

That's weird as I definitely have to do so and have had to do so for a while now. Does the Medium or High mandatory label appear when you run whoami.exe /groups?

Here is the output from whoami /groups

And yes, whoami outputs azuread\trevorsullivan.

Ok so you either have UAC disabled or your account is the builtin admin account (renamed). Because you have the High Mandatory Label the process is elevated and running like it would when you right click -> Run as administrator. This explains why you are able to do the loopback connection.
My test domain and VM is now online, I've enabled MFA so I'm going to test out a few things right now.

Sorry, that was from the admin session. This one is from the non-admin session. You can see Medium Mandatory Level here.

Also, I have disabled MFA on my AzureAD user account, and still receive the same error. Clearly, due to the earlier substatus code, there is some kind of account name resolution issue going on. It doesn't think that azuread\trevorsullivan is a valid username, but the operating system is the one telling me that, that's my username. 🤷🏻♂

By the way, I also tried configuring CredSSP on the WinRM service, and enabling credential delegation through local GPO. Using CredSSP didn't get me anywhere. It only introduced more roadblocks with the SPN configuration.

Well then I don't know why the loopback works :(
Yea the error code is clearly Windows saying that the username cannot be resolved. In either case with MFA I'm still able to connect but I didn't have to do anything special so I have no idea if I even set it up properly.
Ultimately the error is happening outside of PowerShell and Windows is unable to process the authentication for that user. It could be that there's enough info cached to allow you to log on interactively using your Azure AD account but subsequent network logons are relying on an active connection to the Azure AD domain itself which isn't there. The fact that it tried to logon using NTLM is suspicious as for me it's using Kerberos.
You could also see if Windows is able to lookup the SID based on the name with
[Security.Principal.NTAccount]::new('username@DOMAIN.COM').Translate([Security.Principal.SecurityIdentifier])
[Security.Principal.WindowsIdentity]::GetCurrent().User

Sorry I couldn't help anymore, it seems like it is possible but there's something specific with your environment setup that I cannot replicate that is causing an issue with Windows trying to resolve the username. I would potentially try to use the UPN in your credential to see if that works but I have my doubts it will.

I tried using UPN syntax as well, same issue.
Good idea to test resolving the account SID. All of these properly resolve my SID.
[Security.Principal.NTAccount]::new('trevor@trevorsullivan.net').Translate([Security.Principal.SecurityIdentifier])
[Security.Principal.NTAccount]::new('azuread\trevorsullivan').Translate([Security.Principal.SecurityIdentifier])
[Security.Principal.WindowsIdentity]::GetCurrent().User

The fact that it tried to logon using NTLM is suspicious as for me it's using Kerberos.

I agree. I noticed that when you posted earlier.

I think the next thing I'll try is to create another Azure AD user, and attempt to login with that one. I will avoid putting a space in the name (ie. azuread\joe), and omit the last name.

Anyone get this working I am experiencing the same thing.

facing the same issue ,
win 11  :
Name                           Value

PSVersion                      5.1.22000.282
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.22000.282
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>

Have you tried using a local account? With the local account, the only requirement would be that the machines can talk to each other over the network & you could use Negotiate authentication via HTTPS, for some extra security/encryption.

Have you tried using a local account? With the local account, the only requirement would be that the machines can talk to each other over the network & you could use Negotiate authentication via HTTPS, for some extra security/encryption.

This does work but I think it's besides the point, I don't want to rewrite my entire library of scripts to have every command authenticate with lanadmin... Unless you've got a clever way to wrap it in to make things run remotely under that context?

Have you tried using a local account? With the local account, the only requirement would be that the machines can talk to each other over the network & you could use Negotiate authentication via HTTPS, for some extra security/encryption.

Why would someone want to create a whole bunch of local user accounts and compromise the secure configuration of an enterprise network? That doesn't make any sense.

@SteveL-MSFT SOS.
This really is a broader question too as I know some things use RPC, others use WinRM, etc. I've been wracking my brain around this for a while now and have had very limited success, even with Azure Connect Seamless SSO going from hybrid joined domain machine to pure AAD joined that has line-of-sight via VPN.


Test failure under pytest 7.3.0

Hi, pytest dev here. We've recently released version 7.3.0. We've had a report that the click test suite fails under 7.3.0. See https://github.com/pytest-dev/pytest/issues/10897 for my analysis. Would love to have your thoughts there.

Click version: main (1de080b90a82c0ae4e34ba187bc3e945e8a85563)

I'm fine with fixing Click. In general, there are a number of issues with how Click's test runner interacts/conflicts with Pytest output handling, PDB, etc. However, I'm not really clear what the issue is, so if you can point to a more self-contained example that demonstrates the issue, or otherwise make a suggestion for a fix, that would be helpful.

The problem is in this line:
https://github.com/pallets/click/blob/1de080b90a82c0ae4e34ba187bc3e945e8a85563/tests/test_arguments.py#L89
which tries to temporarily patch sys.stdin.encoding to utf-8, but sys.stdin.encoding is readonly so it fails.
pytest output capturing (activate by default, turned off with -s switch) replaces sys.stdin with its own class. Before 7.3.0, that class allowed sys.stdin.encoding to be changed, but in 7.3.0 it was changed to match the real sys.stdin.encoding to be readonly.
As for fixing the test, I'm didn't try to understand what exactly it's testing, but if it really does want to patch sys.stdin.encoding, it's always possible to "force" it like this:
diff --git a/tests/test_arguments.py b/tests/test_arguments.py
index 735df4b..3395c55 100644
--- a/tests/test_arguments.py
+++ b/tests/test_arguments.py
@@ -1,4 +1,5 @@
 import sys
+from unittest import mock

 import pytest

@@ -86,9 +87,12 @@ def test_bytes_args(runner, monkeypatch):
         ), "UTF-8 encoded argument should be implicitly converted to Unicode"

     # Simulate empty locale environment variables
-    monkeypatch.setattr(sys.stdin, "encoding", "utf-8")
     monkeypatch.setattr(sys, "getfilesystemencoding", lambda: "utf-8")
     monkeypatch.setattr(sys, "getdefaultencoding", lambda: "utf-8")
+    # sys.stdin.encoding is readonly, needs some extra effort to patch.
+    stdin = mock.Mock(wraps=sys.stdin)
+    stdin.encoding = "utf-8"
+    monkeypatch.setattr(sys, "stdin", stdin)

     runner.invoke(
         from_bytes,

This issue as solved in #2508


[VS Code] Could not connect to the server. Check that you are connected to the internet.

Error:
Could not connect to the server. Check that you are connected to the internet.
Steps to Reproduce:

Version Data

extensionName
VSLS

extensionVersion
0.3.834

protocolVersion
2.2

applicationName
VSCode

applicationVersion
1.28.0

platformName
Linux

platformVersion
4.13.0-46-generic

@XiaolinDeng Can you specify whether this error occurred just once or it happens persistently?

I tried many time,but all fail,and i can't share successful

oh,and every time i click share it open broser,i finish all things in broser,vscode live share don't update any thing

Sorry to hear that. To help us investigate this problem, can you please run the command "Live Share: Export Logs" and drag-and-drop the zip here or send it to<EMAIL_ADDRESS>

@XiaolinDeng Do you have proxy configured?

i had find why it happened, if i use proxy,it work correct,so it must be GFW or our school's Operator isolate connection with live share

@alpaix @IlyaBiryukov
thank you guys,
i had find why it happened, if i use proxy,it work correct,so it must be GFW or our school's Operator isolate connection with live share


[TASK] Include vtk.js in Django server.

The most likely approach here will be to build from source within static/.

Branched https://github.com/RuiFilipeCampos/MontyCarlo/tree/feature/task-42-include-vtk-in-server from develop.


impl(storage): add XML parser implementation

I split it into many member functions mainly for avoiding cognitive complexity warning. I'm not sure if it matters, but I made them all inline function to avoid function call overhead.

This change is

Closing for now.

Let's merge as-is, and deal with any would-be review comments in follow-up PRs.


Some test classes do not have open source instructions

Why you need it?
Is your feature request related to a problem? Please describe in details
How it could be?
A clear and concise description of what you want to happen. You can explain more about input of the feature, and output of it.
Other related information
Add any other context or screenshots about the feature request here.

please assign it to me


Bump Dependencies #10833492784

Bumps dependencies for product-is. Link : https://github.com/wso2/product-is/actions/runs/10833492784

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Sort bookmarks to minimize diff on changes

When showing different tags, bookmarks are reordered in the file.
When making changes and saving then, resulting diff actually contains some lines moved in the file without any use of this reordering.
I suggest adding one line to saveDataFile() function:
...
// beautify text
text = text.trim().replace(/[\n\r]+/g, "").replace(/<\/li><li/g, "</li>\n<li");
text = text.split('\n').sort().join('\n');
...

Last line will actually minimize diff after changes.
If this feature is desired, I can create a pull request on it.

If this feature is desired, I can create a pull request on it.

Will result in massive-churn the first time, but the end result is probably worth it.
Please do create your pull request, and I'll merge immediately.

Ok, thank you.
Right after finishing with previous pull request I will suggest this one!

Great - should be easier for me to apply that one.  Obviously the first time they'll be sorted it'll be a big change, but after that it'll be incremental and simple.


Add docker compose and change containerized setup instructions to use it

Self-explanatory, probably. Quality of life improvement. Mostly because I was tired of typing out long docker commands.
I neglected to explain why to build locally instead of pulling from remote, which is because remote might be on a different commit, with different dependencies. Only way to guarantee matched versions is to run a script to check current commit and populate a variable with that when pulling, which seems excessive. I figure since it's not the primary way listed to do it, anyone doing that knows what they are doing and matching the commit is for them to do.

I should probably make separate "checkpoints" and "data" directories, actually, so let me see if I can get to that before this gets considered too seriously.

Great work! I just brought down your docker config to only include the relevant changes (data/ckpt paths) to avoid config bloat and to make its inclusion clear. I also applied the pre-commit.

@Quentin-Anthony I tried that and it didn't work but looking at the config now I can't see why that would be, I am guessing I messed something else up when doing it. I will test it from current main when I get the chance later, will probably try to add a separate readme for the repro in configs/docker. It turns out the pythia 19m will run on 2x 3090, by the way. ;)


Fix broken link to IntegerUtilities in README.md

Fixes a broken link to the README.md  of IntegerUtilities in the Modules section of the project README.md

@swift-ci test


Implement --backend-args

As explained in https://github.com/instructlab/dev-docs/pull/81. Once the introduction of vLLm (https://github.com/instructlab/instructlab/pull/1442) is merged, we need to rework the backend arguments.

This won't be implemented given that we now pass extra argument like this:
ilab model serve --backend vllm -- --max-model-len=4096


Add files via upload

Thanks for the submission, but "Ans" is not a good variable name. please change it to "ans" as python suggests


Flow in returning a promise

What happens in the following code,
@Post("/session")
@NullResultCode(401)
login( @Body({ required: true }) credentials: Object): Promise<Object> {
    return AuthService.getToken(credentials["username"], credentials["password"]);
}

when,

Promise rejects
Promise resolves

Does 401 occur only if I return null?
Is there a way to specify error message for a 401 using promises?

I haven't attempted the code above, but you could create a MiddlewareGlobalAfter and check your error status' and change the response that way, you could even just create a Middleware and use the MiddlewareAfter decorator on each method you want to check.

I did try this some time ago. It did not return the status code that was set in decorator, so I did this:
    @Get("/login")
    login(@Req() req : any, @Res() res : Response) {
        this.log.debug('login()');
        let credentials = auth(req);
        if(credentials){
            return this.userStorage.validateLogin(credentials).then(user => {
                req.user = user;
                req.session.user = user;
                req.session.save();
                return user;
            }).catch(() => {
                res.statusCode = 401;
                return 'Unauthorized';
            });
        }else{
            res.statusCode = 401;
            return 'Unauthorized'
        }
    }

@joshualawson @ddevcodes these could work for my use case 😃
In general though, wouldn't it be a hackish way to solve the problem? Aren't we adding extra complexity through  middleware or touching the response objects?
Would it be fair to have a @PromiseRejectedResultCode(401) or something similar where the promise rejects with the error message to be sent in the response body?

I tried with @UndefinedResultCode, and the results were,

Promise rejects with or without a value - 500
Promise resolves without any data - 401
Promise resolves with data - 200 and all is well!

Could someone confirm if this is indeed the behaviour? If yes, the README could use this info. 😄

sorry guys for the delayed answer.

@NullResultCode(401)
Does 401 occur only if I return null?

Yes it is.

Is there a way to specify error message for a 401 using promises?

You can do throw new UnauthorizedError("your message"); in your code if you want customized messages. Thats quite convenient!

you can also throw new HttpError(444, "any message!") where 444 is any http code.


Absorb command response handlers into command request senders

Contributions: We are not currently taking public contributions - see our contributions policy. However, we are accepting issues and we do want your feedback.

Tests
Tested locally
Primary reviewers
If your change will take a long time to review, you can name at most two primary reviewers who are ultimately responsible for reviewing this request. @ mention them.

Closing, will be reconsidered after more discussions and consensus with team


Adds a proof for s2n_stuffer_read_expected_str

Please note that while we are transitioning from travis-ci to AWS CodeBuild, some tests are run on each platform. Non-AWS contributors will temporarily be unable to see CodeBuild results. We apologize for the inconvenience.
Resolved issues:
N/A.
Description of changes:

Adds a proof harness for the s2n_stuffer_read_expected_str function;
Adds a pre- and post-conditions to the s2n_stuffer_read_expected_str function;

Call-outs:
N/A.
Testing:
N/A.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Codecov Report

Merging #2042 into master will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #2042      +/-   ##
==========================================
- Coverage   81.06%   81.05%   -0.01%
==========================================
  Files         247      247
  Lines       18385    18391       +6
==========================================
+ Hits        14903    14907       +4
- Misses       3482     3484       +2


Refactored code from using momentjs to date-fns.

Removed moment and @date-io/moment (this one is for
Material-UI pickers) from the codebase.
date-fns isn't too bad to use : )

if you're looking to reduce build bundle size we should fix treeshaking for mui and see where all the other stupid stuff is coming from

How do we go about fixing treeshaking for mui? I don't think we do the treeshaking on our own, right?

dw about it - we can tackle that later

Okay reverted version of react-scripts to 3.4.0 from ^3.4.2 and circleci works again. This should be good to go.

next time tag me so i get a notif

Will do, mbmb


Possible to access reactives in arguments of render functions?

In R-Shiny, a plot can have a dynamic width, for example:
library(shiny)

ui <- fluidPage(
  numericInput("size", "size", 500),
  plotOutput("plot")
)

server <- function(input, output, session) {
  output$plot <- renderPlot(plot(rnorm(50)), width = function() input$size)
}

shinyApp(ui, server)

Is an equivalent of this supported in py-Shiny?

Looks like it's currently coded to be pulled from the session
https://github.com/rstudio/py-shiny/blob/main/shiny/render/_render.py#L220

Not currently but definitely doable, we just haven't yet.


Stop Auto Query submit

The auto query submit becomes a real pain when using Grafana's "Explore" or even when writing complex queries while creating panels. Constantly throws up errors - is very ugly when creating alerts as well.
The BigQuery Plugin solves this by having a "Run query" button. See the screen shot below,

Can we introduce something like this here as well please?
@jbguerraz I'll be happy to make the change and submit a PR if you can help me out a little with where the changes for this might go in.

Hello @MohammadGhazanfar
You can already configure the debouncing either at datasource level ( https://github.com/grafadruid/druid-grafana#datasource---default-settings ) and/or at query level ( https://github.com/grafadruid/druid-grafana#query-builder---settings ). A high value will basically "disable" it (like if you enter one hour).
I'm fine with a run query button contribution (despite we can already click the reload icon to fire a query).

@jbguerraz are you okay with totally removing the "debouncing feature"? I don't think it is useful. No one in my team likes it either.

Also, @jbguerraz, setting the debouncing at the datasource level doesn't seem to be working 🐛

Hello @MohammadGhazanfar
I don't think removing the debouncing is a great thing, some ppl may actually be using it (it'll kill the backward compatibility).
We may change the default value to something higher may be but really you can deploy it with a big value and it'll looks like it's disabled for you if you don't like it.
Do you have a value set at query level ? it uses the datasource level one when there is no override at query level. The only known "issue" (actually, feature request) around the query settings is that one https://github.com/grafadruid/druid-grafana/issues/87

I don't think removing the debouncing is a great thing, some ppl may actually be using it (it'll kill the backward compatibility).

Sounds good!

We may change the default value to something higher may be but really you can deploy it with a big value and it'll looks like it's disabled for you if you don't like it.

Yeah, I am planning on doing that - but the value specified at the datasource level seems to be ignored. Value specified at the query level still works.

Do you have a value set at query level ? it uses the datasource level one when there is no override at query level. The only known "issue" (actually, feature request) around the query settings is that one https://github.com/grafadruid/druid-grafana/issues/87

I only specified a value of 10000 at the datasource level - tried it both from the UI and file provisioning. Neither worked. The value shows up in the datasource settings. I had nothing set at the query level. If you don't have the time or aren't able to repro this, I can get back to you with a short video showing what's happening.

@MohammadGhazanfar a fix is on its way :) see #149
if you will to contribute by reviewing the code (and why not by working on the proper merging - see TODO in code) then you're more than welcome!

Thank you @jbguerraz!
I will surely have a look at it, but I know very little TypeScript. Really needed this. It's been very annoying.

Hello @jbguerraz :wave:
I will work on it if it's still available.


Make llm-foundry optional dependency

llm-foundry install seems to cause some issues for our ray scripts; making it optional since we only need it for eval, and added a pointer to README to install it.

I guess our tests rely on composer right now, so this will need to be a bit more involved. closing for now.


Make sure the site works in all browsers

The site have not really been tested in all browsers. We should make sure that it looks ok in all browsers (yes, including some older versions of IE).

Known issues for IE11:

[ ] News images doesn't line up correctly
[ ] Person images doesn't line up corrently
[ ] Icons in the offer boxes are not centered


HTTP ERROR 403 No valid crumb was included in the request when run by Harbormaster

Describe the bug
I'm trying to understand the Harbormaster build failure on my patch (https://reviews.llvm.org/D78390).
Here is the build failure link: https://reviews.llvm.org/harbormaster/build/61415/1/?l=0
It appears the failure is unrelated to my patch since it looks like there were no builds or tests kicked off in the logs due to an HTTP request error. Am I misinterpreting this? Am I reading the wrong logs?
This seems like it may be an error with the set up of this repo.
Relevant links:
To Reproduce
Steps to reproduce the behavior:
I don't know how to reproduce this as this was due to a run by Phabricator.
Expected behavior
I expected the error log for the failed build to show a failed test or a failed build command that could have been caused by my patch rather than an HTTP error.
Screenshots
NA

Additional info before I restart the build:

1 | HTTP 403
-- | --
Server: openresty/<IP_ADDRESS>
Date: Fri, 17 Apr 2020 18:53:57 GMT
Content-Type: text/html;charset=iso-8859-1
Content-Length: 593
Connection: keep-alive
Vary: Accept-Encoding
Strict-Transport-Security: max-age=15724800; includeSubDomains
X-Content-Type-Options: nosniff
Cache-Control: must-revalidate,no-cache,no-store

Seen here on a different patch: https://reviews.llvm.org/harbormaster/build/61462/

I'm seeing the same here: https://reviews.llvm.org/harbormaster/build/61575/

Thank you for finding and debugging this!
Jenkins seems to have installed some updates, increasing API security:
https://wiki.jenkins.io/display/JENKINS/CSRF+Protection
The solution is to use an API token instead of the password to trigger builds:
https://wiki.jenkins.io/display/JENKINS/Authenticating+scripted+clients

When debugging this I noticed a delay between hitting the button and a build actually being started:  #164

To trigger a build locally (with your username and password):
curl -d '' "https://<user>:<password>@jenkins.llvm-merge-guard.org/job/amd64_debian_testing_clang8/buildWithParameters\?DIFF_ID\=258716\&PHID\=PHID-HMBT-wfa6cjatlpmona3gthky\&token\=kWJuaWIIZVqaX367vZIM61KLbyqOXBgIN2Xg9"
Produces the exact same error message

The new version requires some more effort in triggering builds via the API call:
https://support.cloudbees.com/hc/en-us/articles/219257077-CSRF-Protection-Explained
However Harbormaster does not support that...

Found it:
We were referencing the container jenkins/jenkins:lts in our kubernetes deployment. For whatever reason, Kubernetes decided to restart (and pull) that container from the registry. This lead to an upgrade from version 2.190 to 2.222, as the lts tag was updated in the mean time in the repository.
In version 2.190 the CSRF was optional and could be disabled, in 2.222 it's always on and can't (easily) be disabled. In combination with the nginx reverse proxy used for authentication this leads to a situation where Phabricator can no longer user plain HTTP requests to trigger builds.
The short-term solution was to fix the Jenkins version to the tag 2.190.3 and to avoid automatic updates that way until we have found another solution (e.g. #161).
I just re-enabled the builds for the BETA testers. If that keeps working, I'll enable the builds for everyone tomorrow.

Builds are triggered again, re-enabled it for everyone. Also re-opened #50 to look into a better solution for the Phabricator triggers.


Architect starter favicon.png gives 404

Using the default Architect starter, favicon.png does not load, giving a 404 error.

I came across this issue while trying to figure out how to display the favicon and figured out that Architect doesn't include existing public files like favicon.ico in its built assets, all of which come from the app directory. I'm not sure if it's the best way to do it, but I was able to include the favicon in the built assets and get it to show up in the browser tab by doing the following:

Move favicon.ico to the app directory (I put it in app/images/, but it's up to you), and change its name to favicon.png (this might only be necessary if you're using Typescript; I haven't tried it on vanilla JS).
Add the following code snippet to app/root.tsx (be sure to import LinksFunction from remix):

import favicon from "./images/favicon.png";

export const links: LinksFunction = () => {
  return [
    {
      rel: "icon",
      href: favicon,
      type: "image/png",
    },
  ];
};

When you refresh the page, you should see the favicon appear.
I'm not sure what implication this has for the Remix/Architect starter, as in whether this should be added to the boilerplate or the @remix-run/architect package changed to include public files in the build.

I hit this also. I managed to get it to work by prepending /_static - but not entirely sure if this was going to work when arc deployed.
Instead, I took a similar approach to @cfranklin11.
Documented here: https://remix.run/docs/en/v1/api/conventions#asset-url-imports

hey all, architect uploads the /public folder to an s3 bucket during the deployment and rewrites requests to /_static to the s3 bucket. in development arc sandbox will load them from public directory prefixed with /_static
https://arc.codes/docs/en/guides/frontend/static-assets


Passthrough for force control

It would be nice if there were pass through controllers in ROS for the UR e-series to move the robot using force control.
Currently, I am trying to do force control using this repo here: https://github.com/fzi-forschungszentrum-informatik/cartesian_controllers
However, when I use the controller, I have some issues with the arm drifting and I feel it isn't too reliable.
It would be really nice instead to be able to control the robot using ROS utilizing the existing force control program on the UR.
Perhaps one cartesian force controller that implements the motion command that takes in a wrench and another cartesian compliance controller that takes in a point
Would implementing something like this be difficult?

@ian-chuang Agree and we are working on this. See the merged PR on the Client Library: https://github.com/UniversalRobots/Universal_Robots_Client_Library/pull/138
Though it is not yet added to ROS and ROS2 drivers
See https://github.com/UniversalRobots/Universal_Robots_ROS_Driver/issues/677 and https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/issues/771
Close it here as I have addressed it in the driver repo


Update sbt runner to latest release from sbt-extras.

Happy to merge as soon as tests pass.

@sellout These tests also passed in my parallel universe. It's the identical commit in both cases, I'm just restarting jobs everywhere to double my odds of winning at travis bingo.


use computeIfAbsent

What is the purpose of the change
use computeIfAbsent
Brief changelog
use computeIfAbsent

Coverage decreased (-0.05%) to 51.994% when pulling 06ffa06300d8baa021e3973e6e7671f6bb2471ab on xyj1209:develop into 844dabfb2f0d3c4e36005b5b632ce96e64465800 on apache:develop.

Coverage decreased (-0.05%) to 51.994% when pulling 06ffa06300d8baa021e3973e6e7671f6bb2471ab on xyj1209:develop into 844dabfb2f0d3c4e36005b5b632ce96e64465800 on apache:develop.


Skip execution when receiving empty input

It would be nice to have an option that tells fzy to exit if there is no data being piped to it. I am using fzy for a menu completion system that presents new menus and when there is no option left it will produce an empty list and then there is nothing to do.
With fzf you kind of can do this with the option:
 -0, --exit-0          Exit immediately when there's no match

However, I see it rather as exit immediately if no input was given to fzy.

Can you use grep . for this? e.g.
$ echo | grep .
$ echo $?
1

$ echo 'a' | grep .
a
$ echo $?
0

I was already thinking of that and thought that might solve the problem, but the fzy will still execute. E.g.
echo | grep . | fzy
* empty menu appears *

@maximbaz thanks for the input, that works, only downside is that I have to install another tool, but it is fine for my use case.

I was thinking you already had a script prepared that you could integrate something like:
MENU_ITEMS='one\ntwo\nthree\n'
printf "${MENU_ITEMS}" | grep . >/dev/null
VALID_MENU=$?
if [ $VALID_MENU -eq 0 ]; then
    CHOICE=$(printf "${MENU_ITEMS}" | fzy)
fi
# do something with CHOICE...

Indeed, but that is in my opinion something overly complicated for something that should be quite simple. Bash + capture multi-line strings from commands is not great in my experience. If it is out of scope, the ifne tool solves it much nicer IMO. Thanks for the tips though.


could not find internal in regex

I don't know what is going on please help

This should have been fixed in https://github.com/alexliesenfeld/httpmock/issues/84 with v0.6.8.

@alexliesenfeld You are completely right, upgrading the version solved the problem
Thank you!


Secp256k1 support PR rebased

Motivation
Rebased version of #810
Description
Adds support for secp256k1 curve
Checklist

[x] Read the contributing guidelines
[ ] Commit messages follow the conventional commits spec
[ ] Performed a self-review of the PR
[ ] Added automated tests
[ ] Manually tested the change

We'll also need a .changeset file 😄

Sorry misclick

@gtsonevv Oh, I missed your message, sorry for the delay. I believe you are in a better position to judge if it is ready to merge. To be honest, I have never used secp256k1 keys on NEAR.


Rename Microsoft.AspNet.Http.Interfaces => Microsoft.AspNet.Http

merged https://github.com/aspnet/Hosting/commit/eeda8e3d7398e882d931ddefb55a7a4e16f5a2e4


Add CODEOWNERS for rules_proto

Initial list of owners derived from https://docs.google.com/document/d/1Wai_okIK_NnhNJZai5nkTUvZVHdV5pp1YwNLFtWwpC4/edit?disco=AAAADI3o84E

@laurentlb @lberki Can you review?

I'd rather not be in this owners file.


fix for escape sequence issue in python 3.7

Python3.7 escape sequence issue fix.
Fixed in scikit-learn in https://github.com/scikit-learn/scikit-learn/pull/12064
Python3.7 raises an exception with a message like "invalid escape sequence %".

@mfeurer
The change seems correct to me. This might be useful to merge it.


Make cert install controlable in helm

This add a helm value that allows for the default certificate not be installed. We have a use case in terms of how we are doing deployments and want to decouple releasing istio-csr from certificate creation for our mesh(s).

/assign @sgtcodfish

/ok-to-test

/marcingy

/assign @SgtCoDFish

/lgtm


⚠ Bofrost.de has degraded performance

In 7c8c318, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1446 ms

Resolved: Bofrost.de performance has improved in d5f3aab.


Update position independent run script

Seems simple enough. Tests run and pass on my system except for "Goto String" and "Hash Function", which we're aware of


Fix Column Set wakeup

Fix #5663

This also appears to resolve an issue I was having when using the file manager advanced search. I was receiving an error about trying to load columns on a null value. (I've not been able to replicate it) but applying this patch has resolved it. (https://www.concrete5.org/developers/bugs/8-1-0/running-an-advanced-search-returns-an-exception/)


Doesn't account for differing port numbers in URLs

www.foo.com:8000 isn't recognised as being a subdomain of foo.com:9000.
I ran into this problem when using port-forwarding on a Vagrant machine in which I was running a project with subdomains. The problematic code is in this method and is easily resolved by disregarding the port number.
I'd be more than happy to submit a PR for this if you think this issue is valid.

Current implementation of django-subdomains is very tightly coupled with django sites framework. This is brings a lot of problems (e.g. you should explicitly create additional site in db even for local hosted sites). You can try to make a fork with fix from there:
https://github.com/tkaemming/django-subdomains/pull/23


How to set loss weight in chainer?

I have already submit this issue to https://stackoverflow.com/questions/46647044/how-to-set-loss-weight-in-chainer but still can't wait for reply( I am hurry for my research paper submit)
First of all I narrate you about my question and situation. I want to do multi-label classification in chainer and my class imbalance problem is very serious.
In this cases I must slice the vector inorder to calculate loss function, For example, In multi-label classification, ground truth label vector most elements is 0, only few of them is 1, In this situation, directly use F.sigmoid_cross_entropy to apply all the 0/1 elements may cause training not convergence, So I decide to use a[[xx,xxx,...,xxx]] slice( a is chainer.Variable output by last FC layer) to slice specific elements to calculate loss function. In this case, because of label imbalance may cause rare class low classification performance, so I want to set rare gt-label variable high loss weight during back propagation, but set major label(occur too many in gt) variable low weight during back propagation.
How should I do it? What is your suggestion about multi-label imbalance class problem training in chainer?

How about using F.sigmoid_cross_entropy with reduce='no'?
It returns elementwise losses shaped (batchsize, labels) rather than scalar values as sum of losses. Then, you can weight each loss by multiplying weight arrays you prepare.


Fix ISO kickstart to check if firewall is active, not enabled

During the installation, firewall is enabled, but not active - thus "firewall-cmd --reload" is returning an error.
Closes USHIFT-253

/assign @jogeo

/assign @mangelajo


Optional cookie validation

Q
A

Bug?
yes

New Feature?
no

Version
69e47233956fdbba8c32a18ecd35ee454626e6ea

Actual Behavior
I'm writing a proxy script where I have to parse the set-cookie headers sent back by the upstream servers. Sometimes the upstream server (out of my control) send a cookie with invalid characters in name and/or value and when I try to parse it the library throws an \InvalidArgumentException
Expected Behavior
I'd like to make this validation optional
Steps to Reproduce
use Http\Discovery\HttpClientDiscovery;
use Http\Message\CookieJar;
use Http\Client\Common\PluginClient;
use Http\Client\Common\Plugin\CookiePlugin;
use Http\Client\Curl\Client;
use Http\Message\MessageFactory\DiactorosMessageFactory;
use Http\Message\StreamFactory\DiactorosStreamFactory;

$messageFactory = new DiactorosMessageFactory();

$pluginClient = new PluginClient(
    new Client($messageFactory, new DiactorosStreamFactory()),
    [new CookiePlugin(new CookieJar())]
);

$response = $pluginClient->sendRequest(
    $messageFactory->createRequest('GET', 'http://www.micromedexsolutions.com/home/dispatch')
);

Possible solution (Borrowed from guzzle implementation)
A new 'isValid' method could be added to the Cookie class, and then, control in the CookieJar if invalid cookies are allowed.
What do you think?

What does "valid" mean in our case? Given that we have 3 different kind of validations.
Also, would this be a BC break (not doing validation)? Sounds like one to me.
What I would do is a static constructor createWithoutValidation bypassing the validation, but that's problematic from the plugin POV which creates the cookie.

For me, "valid" means that the cookie passes all 3 validations.
If the createWithoutValidation constructor is added, it wouldn't be a BC. Then, in the plugin a flag can control if cookie validation is required (true by default). When false it would use the new constructor.

Sounds like an acceptable solution to me, but I have to say, the Guzzle way is probably better, so in a possible v2 package I would rather remove the validation from the constructor.
Also, regardless of having a separate constructor I think adding an isValid method makes sense, since other code might want to be sure that the cookie is valid.
Are you willing to provide a PR?

Yes, but how to avoid current validation in the original constructor?
I see these options:

To add a flag parameter $requireValidation = true to the class constructor, and setting it to false in createWithoutValidation.
To create a new instance in createWithoutValidation with the help of ReflectionClass::newInstanceWithoutConstructor

If we choose the first option, the static method can be avoided too.


Support parallel fitting to GradientBoostingQuantileRegressor

I attempted to fix #141.

Thanks a lot for the PR. I will take a look at it now.
@MechCoder @glouppe should we have our own externals or just use the sklearn one or ...? Not sure what is the normal thing to do.

I think for joblib it is all right to use sklearn.externals

looks ok to me

I think we can use the threading backend with GBT which is more lightweight than multiprocessing.
Can you add a parameter to gbrt_minimize (and forest_minimize for ET and RF) that allows the user to control the number of jobs?

Thanks for the comments! I'll fix these.

I made some fixes.
Due to the change of handling random_state, the test_tree_based_minimize test failed.
So, I increased n_call of the test. Do you have a better idea than this?

Why do you think we need different seeds for each of the regressors?
The thinking behind using the same was to try and ensure that the quantiles will always be sorted. The predictions for different quantiles (here the Xth quantile and the X+eps'th quantile) should be sorted: q(X) < quantile(X+epsilon) which if the two regressors are "independent" (because they have different seeds) might not be true. I never benchmarked this to see how big a problem this is in practice.

I may misunderstand it. So let me ask you some questions.
If it is necessary to use the same seed for each of the regressors, the master branch wrong?
Should the following code output the same integer values?
> cat a.py
from sklearn.utils import check_random_state
from sklearn.ensemble import GradientBoostingRegressor
from sklearn.base import clone
import numpy as np

random_state = np.random.RandomState(1)
rng = check_random_state(random_state)

base_estimator = GradientBoostingRegressor(loss='quantile')
quantiles=[0.16, 0.5, 0.84]

for q in quantiles:
    regressor = clone(base_estimator)
    regressor.set_params(alpha=q, random_state=rng)
    print(regressor.random_state.randint(10))
> python a.py
5
8
9

If it is necessary to output same integer values, I think that the following code is required.
> cat b.py
from sklearn.utils import check_random_state
from sklearn.ensemble import GradientBoostingRegressor
from sklearn.base import clone
import numpy as np

random_state = np.random.RandomState(1)
rng = check_random_state(random_state)

base_estimator = GradientBoostingRegressor(loss='quantile')
quantiles=[0.16, 0.5, 0.84]

base_estimator.set_params(random_state=rng)
for q in quantiles:
    regressor = clone(base_estimator)
    regressor.set_params(alpha=q)
    print(regressor.random_state.randint(10))
> python a.py
5
5
5

Is this correct?

Yes indeed master is wrong in this case! Good catch. My intention was definitely to have regressor.random_state.randint(10) print the same number for each regressor.
When you change the code to do that, can you add a comment that summarizes our discussion so that in the future people reading the code know why we want each regressor to produce the same random numbers.

Ok. I'll fix it.

I fixed.

Thanks a lot for your contribution @nel215, this looks good to me! What do you think @betatim ?

Merged! Thanks for the contribution and thanks for spotting&squashing that bug.
I added you to AUTHORS.md and 'CHANGELOG.md`

Thanks for the review :)


Fix job image override

Fixes #76
Proposed Changes

Fix image override for jobs (eg. 0.14 upgrade job for eventing)

Release Note

Fixed image override for Knative Eventing 0.14 upgrade job

/retest

/retest


Error:  "Unable to find the chunk requested because its a super chunk" on quokka file loading.

Hi !
I am encountering an issue when load quokka files generated from kernel modules. The export seems to be performed correctly but the loading fails with the exception:

Unable to find the chunk requested because its a super chunk

Here is a simple modules to reproduce: pktflow.ko.zip
from quokka import Program

p = Program("pktflow.ko.Quokka", "pktflow.ko")

Tested with:

IDA Pro 8.2
Quokka: 0.5.4

It seems that the very first chunk that we encounter is always treated as a fake chunk. Nobody has ever noticed probably because in normal conditions Quokka is still able to export the function correctly and from the python api everything is still accessible (call graph, instructions, etc...).
In this case IDA for some unexplainable reasons creates different blocks for the fcacheStatus function (that is the function at address 0) without having jumps between the blocks. Quokka identifies two blocks (even though IDA shows 3) but fails to resolve the edge between them (because there is no code reference from one to the other), this leads the python API to believe that the function is in fact a SuperChunk that ultimately causes a chain reaction making impossible to access the attributes of the function fcacheStatus.
I will fix it asap


fix bug when update with setexpr

Codecov Report

Merging #1446 into master will increase coverage by 0.03%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #1446      +/-   ##
==========================================
+ Coverage   56.88%   56.91%   +0.03%
==========================================
  Files          48       48
  Lines        8190     8196       +6
==========================================
+ Hits         4659     4665       +6
  Misses       2915     2915
  Partials      616      616

Impacted Files
Coverage Δ

statement.go
67.72% <100%> (+0.24%)
:arrow_up:

Continue to review full report at Codecov.

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


Remove local typeNames map, use dns.TypeToString

This removes the partial map and relies on the one from miekg's dns
package.

Fixes #212

Thank you!


Error on Build

`../../.pub-cache/hosted/pub.dartlang.org/camerawesome-0.3.0+1/lib/camerapreview.dart:146:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.

'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Tools/flutter/packages/flutter/lib/src/widgets/binding.dart').
WidgetsBinding.instance!.addObserver(this);
^
../../.pub-cache/hosted/pub.dartlang.org/camerawesome-0.3.0+1/lib/camerapreview.dart:168:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Tools/flutter/packages/flutter/lib/src/widgets/binding.dart').
WidgetsBinding.instance!.removeObserver(this);`

Is it possible for the developer to update this awesome plugin please?

This should be now ok thanks to @dim-apparence work.
Recreate another issue if you have anything.


Blade pass Collection as String instead of Array

Laravel Version: 5.8.26
PHP Version: 7.3.4
Vue Version: 2.6.10
Laravel Mix: 4.0.13

Description:
Passing Collection to Vue through Blade, will be received as String instead of Array. In the past, it will be received as Array. Now it's received as String.
Some old Vue files will still receive as Array.
Sample code:
view.blade.php
@section('content')
  <div id="todos_view">
    <vue-component-here
      :todos="{{ $todosCollection }}"
    />
  </div>

  <script src="{{ mix('/js/test.js') }}"></script>
@endsection

TodoView.vue
<template>
</template>

<script>
    export default {
        props: {
            todos: {
                type: Array, //This one should work. But instead, it will receive JSON-encoded String
                required: false
            }, ...
        }
    }
</script>

Hey there,
Can you first please try one of the support channels below? If you can actually identify this as a bug, feel free to report back and I'll gladly help you out and re-open this issue.

Laracasts Forums
Laravel.io Forums
StackOverflow
Discord
Larachat
IRC

Thanks!


Provide a Docker composer file as well

In addition to Vagrant Virtualbox image, we should consider also providing a Docker image for an identical use case but as a lighter option, as Docker images are much faster to spin up.
https://docs.docker.com/compose/reference/up/

This has been provided since https://github.com/Seravo/wordpress/commit/54b867da64991451487fee23fbef0f41d6ffbd19#diff-4e5e90c6228fd48698d074241c2ba760 and is pretty mature now. We have also got external testing and feedback e.g. in https://github.com/Seravo/wordpress/issues/113.


Add data

The bot has run out of data to tweet. If any one wants to volunteer and contribute to adding data feel free to ping either me or @kumbhakaran on this thread and we can help you get started and things to take care of while adding data.

Steps to add a file:

Copy data from CAD archives into a new file
Run the following regex replace for fixing the spacing for line headers: %s/^3\./\n3./g (3 will need to be changed to appropriate headline)
Run the following regex to trim spaces from lines at the beginning: %s/^ *//g
Manually review any issues that are visible. (document them here)
Append the data in this file to data.txt (in case the chapter is ending, truncate the file and move it to data-2.txt and so on and add the work done above to data.txt)

I used the above steps to add the following commits:
57924f480e2aa8b5549e6965e287175bc9592373, cd3a347fb596a52d074c62d2f6e445ddc2b0ee06

curl https://www.constitutionofindia.net/constitution_assembly_debates/volume/7/1948-11-26 | htmlq '.ckeditor-content .row' -p  | htmlq -r .tooltiptext -r .summary-block -r .support-text -r .social-block -r .abt-events -t | sed -e 's/^ *//g' |sed -e 's/\s\s\+/ /g' | sed '/^$/d' | awk -i inplace '!seen[$0]++' | sed 's/^7\./\n7./g' >> data.txt

Added Volume 8 - 3944ede7f1009dbade98a046626dd441a57df541
This commit also automates generating the file with a bash script.


Rank is not always displayed

Hi :-)
When I start a map, the rank is displayed. After a short while it disappears, is then displayed again shortly afterwards, disappears again etc. That was not the case at the beginning when I installed counter +, it has only recently been the case.
I have no idea why I have that problem now but perhaps there is a solution?
Here the latest log:
2<IP_ADDRESS>.07.56.log
Thanks in advance
Sabine

I found out the rank is always displayed when not using custom colors.


Model and dataset Zoo design

Type of Issue
Select the type of issue:

[ ] Bug report (to report a bug)
[ ] Feature request (to request an additional feature)
[ ] Tracker (I am just using this as a tracker)
[ ] Refactor request
[ ] Documentation Ask

Description
We need to design our models and datasets folders so we can host Zoos of models/datasets under a common structure that all supported agents can use (compared to having these folders under agent specific directories like : craftassist/agent/models or locobot/agent/datasets).
Current Behavior
Currently we have the structure as :

droidlet/craftassist/agent/datasets
droidlet/craftassist/agent/models
droidlet/locobot/agent/datasets
droidlet/locobot/agent/models

Expected Behavior
Perhaps, something like:

droidlet/artifacts/models
droidlet/artifacts/datasets

Checklist
Use this checklist if you are using this issue as a tracker:

[ ] Understand craftassist models and datasets directory structure
[ ] Understand craftassist models and datasets directory structure
[ ] Propose refactor with a new directory structure keeping in mind that all agents use the same directory
[ ] Fix respective agent code
[ ] Fix unit tests
[ ] Fix all data and model fetch scripts

The only difference between the two datasets directories is additional files: datasets_checksum.txt and checksum.txt in craftassist. Do we need these at all with the new setup ?

Models:

locobot has :

perception
semantic_parser
locobot_checksum.txt

craftassist has:

perception
semantic_parser
vision
backtranslation

Go over current models:
current model + API/parameters
upload/add a new one


Fastly cli

Platform or tool
Fastly
Relevant links

https://fastly.com

Goal or desired behavior
Personal Access Token
Contribution

[X] I'd be up for building the plugin myself.

Additional information
No response

I started a PR here:

https://github.com/1Password/shell-plugins/pull/169

Hope that's okay with you, @shyim, and I welcome any feedback you may have!


REMINDER: PA2 AND PROJECT IS DUE TODAY!!!

Did you submit PA2? Did you submit the Project? Did you submit Exercise 6?
NO?
THEN DO IT NOW!!!

Also as a reminder...
It is good to try out some past papers but take breaks and don't overdo it.

Thank you for the reminders! :D

Thank you for the timely reminder!

thanks for the reminders haodong

you're so upz!

Thank you for the reminder!

thanks for the reminder!

It's over.


Download list items visual style, timestamp and clear all option.

Download list have no option to delete all, like normal history have, also timestamp is missing. And clicking the item does nothing. Maybe download list should use same style, options, etc like history is using?

Another issue with downloads, sometimes it hangs or drags behind.
Older state is shown, you have to close it and open it to show new state.
When this happens interacting with downloads/notifications does not work, like pause download, etc.

Downloads also fails if wifi temporarily disconnects.
Something that might be interesting: https://github.com/novoda/download-manager/

Another issue with download,
wrong download canceled from notifications.
With two downloads, clicked cancel on one and the other one got canceled

Download still does not resume, starts from beginning.
I am not sure if losing wifi for a moment stops download or not.
Also, clear all downloads is useful instead of one by one


SOVRN - Video parameters and examples

Not ready for review yet.

This is ready for review now.

Hi, if you make the edits @bretg requested I can merge your PR.

@cpabst ping

Sorry this took so long. Ready for re-review.

@bretg Thank you. Sorry this took so long.


Add a "share" button to the active tab

It should be more obvious to end users that it is possible to pass
around URLs for particular analyses.
This takes the form of a small button with a modal dropdown that shows
the URL that can be copied (plus the ability to copy by clicking a
button).
Another option would have been to use "social sharing" buttons, but it's
not clear yet if this would be the main form of sharing, as opposed to
sending things around in emails.
The button is positioned in the active tab because it was difficult to
find a place we could consistently place it within the visualisation,
because the visualisation layouts vary quite a lot (e.g. between a chart
and a map).

Note that this branch is based off sticky-search-view-urls-seb, so should be merged to master from the command line (as apparently it's not possible to change the base for an existing PR).
As of the time of this comment, it should merge cleanly with master.

Er, slightly confused, sorry... do you want me to merge to master, and then push, before reviewing?

No, it is reviewable as it is, but when you're happy, merge to master from the command line, rather than via github (which will merge it to a now-closed branch).

Think we are missing JS build artefacts. NB I would include these in the same commit as the base file changes, rather than making separate commits for them.

Re merge - ok, so when happy, I should merge to master at command line, run tests, check everything looks OK in browser, force-push to master, and then close PR without merging? that the plan?

Re artefacts, I think they're in ef94d2141d9854e3fda377fd791f02839605f4fc ?
Re merge - yes, that's right, except you won't need to force push, just a normal push, and assuming the merge is clean, testing is a bit redundant (we don't test after every merge to master normally do we?)

Is there not some compiled JS too?
Re merge - ah ok, I was thinking rebase so the commits from this branch would be below other commits from master (hence need to test etc) - but I guess if I merge rather than rebase that won't be the case.

Ah, sorry, I've now squashed the missing JS into that commit.

Don't forget unminified files too...
Looks gorgeous in Chrome, but not in Safari / IE11 I'm afraid:

Also copy button seems not to work in Safari.
Degrades below 600px but I'm not sure if that's a problem (Analytics might tell us this).

Browserstack is free for open source ❤ so we can do that if necessary

Getting a running ie10 on my computer is the best next step. Progressing slowly due to enormously slow downloads.

WFM in IE11 and Safari 8 (using BrowserStack -- painful experience but managed in the end! See screenshot)

Can you pop it on staging and I'll try it out on Safari/iOS?
On 5 July 2016 at 08:36, Seb Bacon<EMAIL_ADDRESS>wrote:

WFM in IE11 and Safari 8 (using BrowserStack -- painful experience but
managed in the end! See screenshot)
[image: bs_macyos_safari_8 0]
https://cloud.githubusercontent.com/assets/211271/16577183/87c6240a-428b-11e6-9c5f-a85f0b3fe352.jpg
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/ebmdatalab/openprescribing/pull/32#issuecomment-230407202,
or mute the thread
https://github.com/notifications/unsubscribe/AAExTImWQtrGPfpXRAkFxIHvDDeBxbHtks5qSglwgaJpZM4Imda_
.

--
Anna Powell-Smith MA MPhil
07812 357037
<EMAIL_ADDRESS>Honorary Research Fellow
Centre for Evidence-Based Medicine
Department of Primary Care Health Sciences
University of Oxford
Woodstock Road
Oxford OX2 6GG
www.ebmDataLab.net http://www.ebmdatalab.net/

Deployed to staging

Nice one getting Browserstack working!
The good news: this now looks perfect on Safari / OSX.
The bad news is that I now see a JS error on staging on IE8 (production is ok):

These are typically just syntax and easy to fix, once you've found the offending line, which seems to be somewhere around here (bit difficult to tell with minified JS and IE doesn't do sourcemaps - would it be easy to set a flag on staging not to use minified JS?):

If you have an IE10 VM set up then you could try setting compatibility mode and debugging that way.
Finally, sorry to be a pain, but could we get rid of the superfluous commits on this PR? The easiest solution may be to create a new branch and cherry-pick them in.

Compatibility mode doesn't reproduce the error. Downloading new virtualbox now.


Width of source view should respect screen size

Presently, the source code view does not respect screen size. This is a nuisance that appears to be alleviated by disabling the nav element's .container-lg style max-width setting from the browser's DOM inspector (/html/body/div[4]/div/main/div[1]/nav). Consequently, why is it enabled in the first place?

Hi @gdennie, which source code view are you talking about ?  Do you mean the one source code view within Github ?

Hi David,
the following demonstrates the problem at lines 147, 154, and 157 for example. However, it is a recurring issue:
https://github.com/fsprojects/Fabulous/blob/master/samples/AllControls/AllControls/AllControls.fs

I believe this is a limitation of how Github works, rather than anything that is special to this particular repository, sorry.

It is their default template for presenting source code that unreasonably restricts the width for some reason. As a result, it does not properly utilize available screen real estate. Disabling the aforementioned style's max_width property resolves the issue though resulting in a width that both maximizes to the screen usage and display even more text when the font size is further reduced, as one would expect.

Maybe its worth raising to Github themselves ? It's not something that can be resolved in this repository.

I thought I was doing that ... woops. :)

No worries, would you mind shutting the issue please ?   Thanks.


Git: Command to Close All working-tree files

There should be an option to close all working-tree files , but leaves the other files open.
Note: this feature had been requested in #45133 by @ipochi and mistakenly marked as duplicate of #18651 and closed.

I started looking into this.  I am curious if the git extension should be responsible for this action or the workbench.  I don't yet see a close editor(s) function from vscode.d.ts.  It could be implemented in editorCommands.ts in the workbench.  Looking for some thoughts or guidance.

Merging into #18651


Guest Checkout Order Details are empty after order is completed

Complete the order process as via guest checkout and navigate to the following url with the order number indicated on the order confirmation page (eg. http://localhost:4200/electronics-spa/en/USD/guest/order/00008364).
Order Details page show no information:

Note: Occured on dev-12

This issue needs to be caught by e2e tests.
It seems function  verifyOrderConfirmationPageWithCheapProduct() in  /projects/storefrontapp-e2e-cypress/cypress/helpers/checkout-flow.ts is not doing what it must.
Perhaps the "should" ought to be removed from:
cy.get('cx-cart-item .cx-code').should('contain', cheapProduct.code);

I just discussed with the team.

Viewing orders as guest is not supported. If the guest would like to see his orders, he has to create an account.
Downgrading this ticket to P2. This route should be protected. We will redirect order details to the homepage if the user is not logged in.

I see. I was a bit confused. Agree with @hackergil . Redirect to homepage as done with old accelerator.

PR #6915

✅ QA passed on branch release/1.5.x - guest order details redirects anonymous user to the login page
It still should me merged to release/2.0.x and develop (and to be QAd there).


Update http4s-circe, http4s-dsl, ... to 1.0.0-M42

About this PR
📦 Updates

org.http4s:http4s-circe
org.http4s:http4s-dsl
org.http4s:http4s-ember-server

from 1.0.0-M41 to 1.0.0-M42
📜 GitHub Release Notes - Version Diff
Usage
✅ Please merge!
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

⚙ Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.http4s" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "org.http4s" }
}]

labels: library-update, early-semver-pre-release, semver-spec-pre-release, version-scheme:early-semver, commit-count:1

Superseded by #383.


JavaScript allowing users to view and edit their info

[t:60]
Trying to get docker to work and hosting the database

[t:80]
Created a new view and allows the user to switch between a form and just a plain text view of their information, also added an edit and a save button


found 21 vulnerabilities (15 moderate, 6 high)

fixed 0 of 21 vulnerabilities in 863967 scanned packages
  13 vulnerabilities required manual review and could not be updated
  2 package updates for 8 vulnerabilities involved breaking changes
  (use `npm audit fix --force` to install breaking changes; or refer to `npm audit` for steps to fix these manually)

As of today, 12 vulnerabilities (2 moderate, 10 high).
Steps to reproduce: 1. npm audit
Denial of Service - https://npmjs.com/advisories/1168
Denial of Service - https://npmjs.com/advisories/1478
bulletproof-nodejs but not proof to denial of service, lol.

Mind to submit a pr ?

Fixed


ActionView::Template::Error (undefined method `closed_pourcent'

Started GET "/projects" for <IP_ADDRESS> at 2016-03-19 20:44:52 +0000
Processing by ProjectsController#index as HTML
Current user: admin (id=1)
Rendered projects/index.html.erb within layouts/base (211.9ms)
Completed 500 Internal Server Error in 243ms (ActiveRecord: 70.5ms)
ActionView::Template::Error (undefined method closed_pourcent' for #<Version:0x007fdd6c77bf90>):      9:
<%= l(:label_project_plural) %>
     10:     11:
     12: <%= render_project_hierarchy(@projects) %>     13:
     14:     15: <% if User.current.logged? %>   plugins/progressive_projects_list/lib/progressive/projects_helper_patch.rb:60:in block in render_project_progress_bars'
plugins/progressive_projects_list/lib/progressive/projects_helper_patch.rb:53:in render_project_progress_bars'   plugins/progressive_projects_list/lib/progressive/projects_helper_patch.rb:31:in block in render_project_hierarchy_with_progress_bars'
app/helpers/application_helper.rb:282:in block in render_project_nested_lists'   app/helpers/application_helper.rb:267:in each'
app/helpers/application_helper.rb:267:in render_project_nested_lists'   plugins/progressive_projects_list/lib/progressive/projects_helper_patch.rb:21:in render_project_hierarchy_with_progress_bars'
app/views/projects/index.html.erb:12:in _app_views_projects_index_html_erb__3813236679964995269_11550680'   lib/redmine/sudo_mode.rb:63:in sudo_mode'
I am using redmine 3.2.1
Could you help me to fix this issue.
Thank so much

I believe you are using the outdated version of the plugin. Please upgrade it to the latest version.

Hello,
I have install the last version on redmine 3.1.0 but the problem persist:
F, [2016-06-10T17:45:24.329137 #10055] FATAL -- :
ActionView::Template::Error (undefined method closed_pourcent' for #<Version:0x000000074934d0>):      9:
<%= l(:label_project_plural) %>
     10:     11:
     12: <%= render_project_hierarchy(@projects) %>     13:
     14:     15: <% if User.current.logged? %>   app/helpers/application_helper.rb:280:in block in render_project_nested_lists'
app/helpers/application_helper.rb:265:in each'   app/helpers/application_helper.rb:265:in render_project_nested_lists'
app/views/projects/index.html.erb:12:in _app_views_projects_index_html_erb___389564863150617922_55182460'   lib/redmine/sudo_mode.rb:63:in sudo_mode'
Regards,

@benoitlm please ensure that you use latest version of the plugin. To to Administration -> Plugins and ensure you have Progressive Projects List version 3.0.1.

Effectively, I used 1.0.0 when I donwloaded the last package from : https://github.com/stgeneral/redmine-progressive-projects-list/archive/latest.zip
Now, I use last source from git and it's work fine.
Thanks.


chore: #16 add icon wrapper and make icons as reference

What does it do?
It adds an Icon wrapper and makes icons as references.
Why is it needed?
Icon wrapper saves time when adding new icons,  reference improves the performance.
How to test it?
Go to the editor and see the icons.
Notes

It requires merging the prior PR.

TODO:

[ ] Add support for link to other content-type entities.


Remove logs when registering magic headers of file extensions

These logs appear to be informational in nature and are visible in the console when using Cesium for Unity. I've also noticed these in the unit tests output for Cesium for Unreal.
Ultimately, I decided to remove these completely. In the context our official releases, I didn't see much use. Our supported magic headers and file extensions are not configurable by a user. So really it's just verifying the call to Cesium3DTilesSelection::registerAllTileContentTypes(), which is informative, but isn't particularly complicated. For example, in the Cesium for Unreal plugin, this call only happens once, and always during plugin startup.
Fixes #679

@csciguy8 looks fine to me, thanks!


Svelte Yup form validation

Hey guys, not sure with is allowed, but, recently I saw a post in a blog about form validation, so, since this recipe is empty, I think this may help as a resource.
Codechips Article

that's great! it does help. PR welcome by you or anyone else to fill it out :)


[Improve][Connector-V2][WeChat] Unified exception for WeChat sink connector

sub-task of #2930

please assign WeChat connector to me; thx

please assign WeChat connector to me; thx

Good job! Looking forward your contribution.

closed because of no exception to handle.


helpers.js?cd8a:247 Uncaught TypeError: gax.GoogleProtoFilesRoot is not a constructor

I try to implement Google Vision Api in Vuejs but I getting this error:
helpers.js?cd8a:247 Uncaught TypeError: gax.GoogleProtoFilesRoot is not a constructor
this code is in my ocr.vue file
<script>
export default {
name: "ocr"
};
 // Imports the Google Cloud client library
const vision = require("@google-cloud/vision");
// Creates a client
const client = new vision.ImageAnnotatorClient();
// Performs label detection on the image file
client
 .textDetection('./resources/maybank2u.png')
.then(result => {
 const labels = result[0].textAnnotations;
console.log("Text:");
labels.forEach(text => console.log(text));
})
.catch(err => {
console.error("ERROR:", err);
});
</script>
Any idea how to solve this?

👋 @ChoyCheeWei are you trying to use this on the front end? Currently this library doesn't support it, but I think we'll have a release out soon that will.

@callmehiphop I'm trying to get all the text from an image and store some of the text into database, but I already face some errors during my first step lol

@ChoyCheeWei the latest release should have browser support if you'd like to try updating the client version and testing again.

This piece of code needs to be changed to use JSON protos. I will work on this.
https://github.com/googleapis/nodejs-vision/blob/4b8f23b3aec216c69f444c802dbeaf5fd8be665a/src/helpers.js#L247-L259


UAR Quiz Block Initial Commit

Not at all ready for the main branch

First commit towards the quiz block
Basic styling
Includes handling of questions.xlsx, strings.xlsx, and results.xlsx

Resolves: Multiple stories
Test URLs:
Before - https://main--milo--adobecom.hlx.page/drafts/sabya/quiz-2/?martech=off
After - https://uarq--milo--sabyamon.hlx.page/drafts/sabya/quiz-2/?martech=off

Merging this into the uar-integration so we can have a central place to work from and improve this before a PR to main.


Add alias command

Add alias command base on this discussion #364 but I change from the last comment a bit by adding function name as the last argument instead of version name

apex alias  for adding alias all functions with the name
apex alias   for adding alias on specific function
apex alias -v   for adding alias on specific version
apex alias -v    for adding alias on specific version and specific function

Awesome! Thanks :D


Fix mixed content errors

Use protocol relative URLs
Makes examples work.  Since GH pages is served over HTTPs the examples are broken as they reference scripts and stylesheets over HTTP.

thanks!


Code Generation: Non-Required Open Api 3.0 scalar properties are non nullable

I defined an Open API 3.0 spec with optional parameters. Optional parameters mean in my understanding, that they are nullable in C# and omitted in JSON serialization if they are null in C#.
But when I generate C# code, now the generated properties are never nullable, and I have no idea how to specify now not to serialize them. Am I doing something wrong or is this a major issue?
If I set the same spec to Open API 2.0, it behaves like I expect. The integers get generated as int? as I expect.
See this spec:
openapi: "3.0.0"
servers:
  - url: //petstore.swagger.io/v2
    description: Default server

components:
  schemas:

    Pet:
      type: object
      required:
        - id

      properties:
        id:
          type: integer

        id2:
          type: integer

Generated code:
//----------------------
// <auto-generated>
//     Generated using the NSwag toolchain v<IP_ADDRESS> (NJsonSchema v<IP_ADDRESS> (Newtonsoft.Json v<IP_ADDRESS>)) (http://NSwag.org)
// </auto-generated>
//----------------------

    [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "<IP_ADDRESS> (Newtonsoft.Json v<IP_ADDRESS>)")]
    public partial class Pet
    {
        [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Always)]
        public int Id { get; set; }

        [Newtonsoft.Json.JsonProperty("id2", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
        public int Id2 { get; set; }

        private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();

        [Newtonsoft.Json.JsonExtensionData]
        public System.Collections.Generic.IDictionary<string, object> AdditionalProperties
        {
            get { return _additionalProperties; }
            set { _additionalProperties = value; }
        }

    }

I would like to send this Json as a response (set required id and leave out id2)
{
  "id" : 20
}

We currently face the same problem. Is there some setting we need to tweak?

We’d need to set defaultvaluehandling to ignore, correct?

We’d need to set defaultvaluehandling to ignore, correct?

The problem is that the generated property is not nullable.
If the generated property is an object, it can be set to null. If it is a number (int) it can't be set to null. It would need to be generated as int?, then it can be set to null

The reason it is not nullable is because it is not specified as nullable in the spec, you'd need:
    id2:
      type: integer
      nullable: true

But yes you could argue that non-required properties also should be nullable and just ignored when null whereas nullable properties should serialize "null", right?

But yes you could argue that non-required properties also should be nullable and just ignored when null whereas nullable properties should serialize "null", right?

That's what I mean. It's easy to deal with nullable and required properties (null is serialized as null) and for nun-nullable and non-required properties (null is left out/ignored).
This is already handled very well by the generated Json.NET attributes. But just not for value types. Just change int to int? and it works!
It only get's difficult for nullable and non-required properties; should null result in null or in a missing property. But those combination is anyway a bit useless ;)

So if I am not mistaken, the DTO classes are generated in this piece of code:
protected override IEnumerable<CodeArtifact> GenerateDtoTypes()
{
  var generator = new CSharpGenerator(_document, _settings.CSharpGeneratorSettings, _resolver);
  return generator.GenerateTypes();
}

in the class CSharpGeneratorBase (NSwag.CodeGeneration.CSharp), which seems fine.
I suppose that the "required" option is not correctly read when deserializing the OpenApiDocument object.

I figured out where the problem is. Namely, the code in the NJsonSchema project needs to be updated, specifically the IsNullable method of the JsonSchemaProperty class, see https://github.com/RicoSuter/NJsonSchema/blob/master/src/NJsonSchema/JsonSchemaProperty.cs
The relevant snippet currently reads:
        public override bool IsNullable(SchemaType schemaType)
        {
            if (schemaType == SchemaType.Swagger2 && IsRequired == false)
            {
                return true;
            }

            return base.IsNullable(schemaType);
        }

It should read:
        public override bool IsNullable(SchemaType schemaType)
        {
            if ((schemaType == SchemaType.Swagger2 || schemaType == SchemaType.OpenApi3) && IsRequired == false)
            {
                return true;
            }

            return base.IsNullable(schemaType);
        }

The problem here is that this is a huge breaking change for some...
Wouldnt it be possible to generate DefaultValueHandling
[Newtonsoft.Json.JsonProperty("id2",
Required = Newtonsoft.Json.Required.DisallowNull,
NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
DefaultValueHandling = DefaultValueHandling.Ignore)]
public int Id2 { get; set; }

And then leaving it to the default (0) would ignore it in the JSON?

My proposal:
https://github.com/RicoSuter/NJsonSchema/pull/1044
We should not fix JsonSchemaProperty class (because the schema is not really nullable) but just enhance the C# generator with an additional setting (to avoid breaking changes).

@RicoSuter: I think you‘re right. The property is optional and not nullable. That’s a difference C# can’t make.
Making it configurable makes sense (not breaking other people’s code), although I think the defaulting to enabled would be the correct behaviour.

Making it configurable makes sense (not breaking other people’s code), although I think the defaulting to enabled would be the correct behaviour.

It makes sense to change this default for the C# generator - but only in the next major version (breaking change) => https://github.com/RicoSuter/NJsonSchema/issues/1045

Do you think GenerateNullableOptionalProperties is a good name? Any ideas? Can you review the PR?

I'll try to review it until Friday 👍

Okay, that looks like a good solution. Maybe GenerateOptionalPropertiesAsNullable is a better name for the setting?


GCP port

This should remain compatible with any clusters made with version 3 of the Terraform scripts so we will merge against 3. If this ends up not being the case, we should change the merge target.

This branch now works for Oracle and the automated test passes. There are some changes in this branch which are not compatible with an existing version 3 cluster so we need to decide what we want to make compatible or if we just want to label this version 4.

Changes which are incompatible between a version 3 mgmt node and gcp-port compute node:

roles/filesystem/tasks/main.yml: fileserver IP comes from an ansible_local fact which will not be placed there by the mgmt node
roles/users/tasks/main.yml: refers to the ansible_local facts too

If we could smooth over these then we could keep this on  the 3 branch.

Of those two places where there was a potential incompatibility, the fileserver ip check has been changed so that it only runs of the ansible_local.citc variable is defined. This is a proxy check for backwards compatibility by assuming that if that fact is not set then you must be running on Oracle.
The use of the fact in users is a non-issue since that role is not run on the compute nodes.
With this, the PR keeps compatibility with version 3.


Feat: pop up of a healthy quote/consequences of smoking and drinking

Describe the feature
Starting any journey with a positive quote or reading about the consequences of such habits will help the user in their journey pf quitting smoking and drinking.
Add ScreenShots

adding such types of images as a pop-up every time a user signs in!
Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC'23 contributor
[X] I want to work on this issue

@MonalikaPatnaik


7.3 will crash

7.3 will crash .

I’m sorry to hear that you are experiencing problems with what I’m assuming is Xcode.
Or did you mean that you believe the plug-in is the source of the crashes? Well, since you are using Xcode then you are most likely a developer and then you should know to provide a better bug report than “it doesn’t work”.
So until you actually provide some details as to what you are doing and your environment then there is nothing that I can do to help you. For you so I did not take the mind reading course at university and I’m not going to hack into your computer to get the information that I need.
 Include such information as your OS version, the version of the application (which you did here sort of), steps to create the problem in detail, and any other information that you think may be helpful. For example have you added Swift 3 to your setup, do you have other plug-ins installed? Screenshots are good if they are relevant. The important parts from logs and stacks are always good but don’t just send everything because we aren’t going to wade through it all. (For example don’t just attach the system.log file. At least extract out the content relevant to Xcode and around the time of the crash if you are reporting a crash.) Too much good information is not a problem. It allows me to find the problem faster and test easier.
Don’t say that Xcode crashes but say that when I put the cursor in the code for creating a colour using HSB in Swift Xcode crashes before the preview of the colour appears and it doesn’t matter what values for the colour are used.  That gives me something very specific to test and I am able to try to recreate the problem on my computer.  Saying 7.3 will crash doesn’t allow this.  I have no starting point with this type of report.
Reid.

On May 31, 2016, at 10:45 PM, Afer<EMAIL_ADDRESS>wrote:
7.3 will crash .
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/NorthernRealities/ColorSenseRainbow/issues/25, or mute the thread https://github.com/notifications/unsubscribe/AK5YQtm6g8o4EzAW6JqneOt71ifvycn9ks5qHPJGgaJpZM4IrIz-.


Failing mix igniter.new app_name --install ash --with phx.new

Running mix igniter.new pinecone --install ash --with phx.new results in the following exception.
** (ArgumentError) construction of binary failed: segment 1 of type 'binary': expected a binary but got: #Igniter<rewrite: #Rewrite<2 source(s)>>
    (igniter 0.3.58) lib/igniter/util/io.ex:6: Igniter.Util.IO.yes?/1
    (igniter 0.3.58) lib/igniter.ex:806: Igniter.do_or_dry_run/2
    (igniter 0.3.58) lib/igniter/util/install.ex:140: Igniter.Util.Install.run_installers/5
    (igniter 0.3.58) lib/igniter/util/install.ex:103: Igniter.Util.Install.install/4
    (mix 1.17.2) lib/mix/task.ex:495: anonymous fn/3 in Mix.Task.run_task/5
    lib/mix/tasks/igniter.new.ex:178: Mix.Tasks.Igniter.New.run/1
    (mix 1.17.2) lib/mix/task.ex:495: anonymous fn/3 in Mix.Task.run_task/5
    (mix 1.17.2) lib/mix/cli.ex:96: Mix.CLI.run_task/2

To Reproduce:

run mix igniter.new pinecone --install ash --with phx.new

Continue with either "Yes" or "No" when prompted Fetch and install dependencies? [Yn]

Continue with "Yes" when prompted with:
            ...|
 34 34    |  defp deps do
 35 35    |    [
      36 + |      {:ash, "~> 3.0"},
 36 37    |      {:igniter, "~> 0.3"},
 37 38    |      {:phoenix, "~> 1.7.14"},
           ...|

 These dependencies should be installed before continuing. Modify mix.exs and install? [y/n]

After that last step the following output is visible in your CLI.
running mix deps.get
    warning: redefining module Pinecone.MixProject (current version defined in memory)
    │
  1 │ defmodule Pinecone.MixProject do
    │ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    │
    └─ mix.exs:1: Pinecone.MixProject (module)

==> stream_data
Compiling 3 files (.ex)
Generated stream_data app
==> libgraph
Compiling 15 files (.ex)
Generated libgraph app
===> Analyzing applications...
===> Compiling telemetry
===> Analyzing applications...
===> Compiling telemetry_poller
==> splode
Compiling 5 files (.ex)
Generated splode app
==> ets
Compiling 7 files (.ex)
Generated ets app
==> iterex
Compiling 48 files (.ex)
Generated iterex app
==> spark
Compiling 36 files (.ex)
Generated spark app
==> reactor
Compiling 86 files (.ex)
Generated reactor app
==> owl
Compiling 19 files (.ex)
Generated owl app
==> ash
Compiling 499 files (.ex)
Generated ash app
==> phoenix_live_view
Compiling 39 files (.ex)
==> pinecone

The following installer was found and executed: `ash`:
Update: .formatter.exs

1 1   |[
2   - |  import_deps: [:ecto, :ecto_sql, :phoenix],
  2 + |  import_deps: [:ash, :ecto, :ecto_sql, :phoenix],
3 3   |  subdirectories: ["priv/*/migrations"],
4   - |  plugins: [Phoenix.LiveView.HTMLFormatter],
  4 + |  plugins: [Spark.Formatter, Phoenix.LiveView.HTMLFormatter],
5 5   |  inputs: ["*.{heex,ex,exs}", "{config,lib,test}/**/*.{heex,ex,exs}", "priv/*/seeds.exs"]
6 6   |]
   ...|

Update: config/config.exs

     ...|
 8  8   |import Config
 9  9   |
   10 + |config :ash,
   11 + |  include_embedded_source_by_default?: false,
   12 + |  default_page_type: :keyset,
   13 + |  policies: [no_filter_static_forbidden_reads?: false]
   14 + |
   15 + |config :spark,
   16 + |  formatter: [
   17 + |    remove_parens?: true,
   18 + |    "Ash.Resource": [
   19 + |      section_order: [
   20 + |        :resource,
   21 + |        :code_interface,
   22 + |        :actions,
   23 + |        :policies,
   24 + |        :pub_sub,
   25 + |        :preparations,
   26 + |        :changes,
   27 + |        :validations,
   28 + |        :multitenancy,
   29 + |        :attributes,
   30 + |        :relationships,
   31 + |        :calculations,
   32 + |        :aggregates,
   33 + |        :identities
   34 + |      ]
   35 + |    ],
   36 + |    "Ash.Domain": [section_order: [:resources, :policies, :authorization, :domain, :execution]]
   37 + |  ]
   38 + |
10 39   |config :pinecone,
11 40   |  ecto_repos: [Pinecone.Repo],
     ...|

** (ArgumentError) construction of binary failed: segment 1 of type 'binary': expected a binary but got: #Igniter<rewrite: #Rewrite<2 source(s)>>
    (igniter 0.3.58) lib/igniter/util/io.ex:6: Igniter.Util.IO.yes?/1
    (igniter 0.3.58) lib/igniter.ex:806: Igniter.do_or_dry_run/2
    (igniter 0.3.58) lib/igniter/util/install.ex:140: Igniter.Util.Install.run_installers/5
    (igniter 0.3.58) lib/igniter/util/install.ex:103: Igniter.Util.Install.install/4
    (mix 1.17.2) lib/mix/task.ex:495: anonymous fn/3 in Mix.Task.run_task/5
    lib/mix/tasks/igniter.new.ex:178: Mix.Tasks.Igniter.New.run/1
    (mix 1.17.2) lib/mix/task.ex:495: anonymous fn/3 in Mix.Task.run_task/5
    (mix 1.17.2) lib/mix/cli.ex:96: Mix.CLI.run_task/2

Runtime

Elixir v1.17.3
Erlang v27.1.1
MacOS v15.0.1
igniter_new v0.4.2

Thank you for letting me know! This is fixed in the latest release 🙇