Look further at:  MissingScriptWitnessesUTXOW (fromList [])

In https://github.com/input-output-hk/cardano-ledger/pull/3039 we fixed the seemingly random
MissingScriptWitnessesUTXOW (fromList []) failure, by discarding traces where there was an unnecessary script witness.
It would be better to not generate transactions with these extra script witnesses. But this seems quite difficult to do, as generating
witnesses is intricately tied up with the fix-point calculation.   Here are some notes that might be useful.
There is some evidence that this arises because the script hash appears as the PolicyId in a Value. At least that is the case in
one failing trace.  In that trace here is the transaction
ValidatedTx {
body = TxBodyConstr TxBodyRaw {
   _inputs = fromList
     [TxIn (TxId {_unTxId = SafeHash "7887389959cd0b37c21116c1658b195112605df6e1e7165921192b416eccaf32"}) (TxIx 1),
      TxIn (TxId {_unTxId = SafeHash "87a0cb55e115848fc0486f17a3d7c68d3fe2f3b24fc0c3cd32dae24459b8526e"}) (TxIx 0)],
   _collateral = fromList
     [TxIn (TxId {_unTxId = SafeHash "87a0cb55e115848fc0486f17a3d7c68d3fe2f3b24fc0c3cd32dae24459b8526e"}) (TxIx 0)],
   _outputs = StrictSeq {fromStrict = fromList
      [(Addr Testnet (KeyHashObj (KeyHash "963f3c80fd6cb6104d6cd5e114661fc0d7e9dcb9385acb996986c71c"))
                     (StakeRefBase (KeyHashObj (KeyHash "bd455eb0e7847df7c1e5552cad84621355b94f69cb3999832b54af10"))),
                     Value 4342 (fromList
                          [(PolicyID {policyID = ScriptHash "42c7a014a4cd5537f64e5ae8ec7349db3d8603e16765dc37f8fb6e67"},  ####### Note PolicyID is the extra script
                                             fromList [(79656c6c6f7730,560729),(79656c6c6f7733,477818),(79656c6c6f7735,276901)])]),SNothing),
      (Addr Testnet (KeyHashObj (KeyHash "094d78230eb61aaf1ff09f43ff9d3ce63b7932d499d5131757ee62dd"))
                    (StakeRefBase (KeyHashObj (KeyHash "3bd2ccfdb4fec76fc4f35a6da648a5ffcc4082c6642c64f38de2ea22"))),
                    Value 4537741 (fromList []),SNothing)]},
   _certs = StrictSeq {fromStrict = fromList
       [DCertDeleg (RegKey (KeyHashObj (KeyHash "e459931b2628c08350543b7e5202acd8cee0941d51ee1b08b42e6d70"))),
        DCertDeleg (Delegate (Delegation {_delegator = KeyHashObj (KeyHash "d840b13dcfcb99c5ad3fb54f0d007c335ed050c17f07b995458b2827"),
                                          _delegatee = KeyHash "15b7af45e7293a42b8eabb19bb0fd568116581a8b99fceaffb3e4bab"}))]},
  _wdrls = Wdrl {unWdrl = fromList
      [(RewardAcnt {getRwdNetwork = Testnet, getRwdCred = ScriptHashObj
                     (ScriptHash "395e0b6c308dbdfd6e41354b68f833b96990ecd93721699ed90a2113")},Coin 0),
       (RewardAcnt {getRwdNetwork = Testnet, getRwdCred = ScriptHashObj
                     (ScriptHash "504fca9befba2683bcf5797db908b891ff8e9aacfb3ce633fe495b45")},Coin 0),
       (RewardAcnt {getRwdNetwork = Testnet, getRwdCred = ScriptHashObj
                     (ScriptHash "5c0a02a40d0b72ea023a6628116c3fd7ca00e853dde5f7c90606aeff")},Coin 0),
       (RewardAcnt {getRwdNetwork = Testnet, getRwdCred = ScriptHashObj
                     (ScriptHash "64abdacc0e1cc6b7dcbcf601c28f3e882f5453dca4eb713591635f90")},Coin 0),
       (RewardAcnt {getRwdNetwork = Testnet, getRwdCred = ScriptHashObj
                     (ScriptHash "7c06fcc873546a676c9b83947385ccf5101d2320456ec3f2dd8179f9")},Coin 0),
       (RewardAcnt {getRwdNetwork = Testnet, getRwdCred = ScriptHashObj
                     (ScriptHash "9573fdfbcf7e2fdec139e2fcf7215883855933c9628928d5e5c0f3b4")},Coin 0)]},
  _txfee = Coin 1561575,
  _vldt = ValidityInterval {invalidBefore = SJust (SlotNo 536), invalidHereafter = SJust (SlotNo 537)},
  _update = SNothing,
  _reqSignerHashes = fromList [],
  _mint = Value 0 (fromList []),
  _scriptIntegrityHash = SNothing,
  _adHash = SNothing,
  _txnetworkid = SNothing},

  wits = TxWitnessRaw {
    _txwitsVKey = fromList [...]
    _txwitsBoot = fromList [],
    _txscripts = fromList
      [(ScriptHash "395e0b6c308dbdfd6e41354b68f833b96990ecd93721699ed90a2113",
          TimelockScript TimelockConstr Signature (KeyHash "380f0d3b9106f8e7e0ee50572044da97257a9d1c55f858f0ae1c9e33")),
       EXTRANEOUS  Comes from PolicyID of a Value with (Coin 4342) ...
       (ScriptHash "42c7a014a4cd5537f64e5ae8ec7349db3d8603e16765dc37f8fb6e67",
          TimelockScript TimelockConstr AllOf (StrictSeq {fromStrict = fromList
            [TimelockConstr AllOf (StrictSeq {fromStrict = fromList [TimelockConstr AllOf (StrictSeq {fromStrict = fromList []})]})]})),
       (ScriptHash "504fca9befba2683bcf5797db908b891ff8e9aacfb3ce633fe495b45",
          TimelockScript TimelockConstr MOfN 3 (StrictSeq {fromStrict = fromList
             [TimelockConstr AnyOf (StrictSeq {fromStrict = fromList
                    [TimelockConstr TimeStart (SlotNo 26),
                     TimelockConstr TimeExpire (SlotNo 26)]}),
                     TimelockConstr Signature (KeyHash "3a3c9207e9d6a4f55c9be45e2279d3d9826845e01573d8248fcde754"),
                     TimelockConstr Signature (KeyHash "2508e7e5b012b1af2b9942dc6837d68d38ac6f7fcd0261c08b444d4d")]})),
       (ScriptHash "5c0a02a40d0b72ea023a6628116c3fd7ca00e853dde5f7c90606aeff",
           TimelockScript TimelockConstr AnyOf (StrictSeq {fromStrict = fromList
              [TimelockConstr TimeStart (SlotNo 26),
              TimelockConstr TimeExpire (SlotNo 26)]})),
       (ScriptHash "64abdacc0e1cc6b7dcbcf601c28f3e882f5453dca4eb713591635f90",
           TimelockScript TimelockConstr AnyOf (StrictSeq {fromStrict = fromList
              [TimelockConstr Signature (KeyHash "2508e7e5b012b1af2b9942dc6837d68d38ac6f7fcd0261c08b444d4d"),
               TimelockConstr Signature (KeyHash "3a3c9207e9d6a4f55c9be45e2279d3d9826845e01573d8248fcde754"),
               TimelockConstr AnyOf (StrictSeq {fromStrict = fromList
                  [TimelockConstr TimeStart (SlotNo 26),
                   TimelockConstr TimeExpire (SlotNo 26)]})]})),
       (ScriptHash "7c06fcc873546a676c9b83947385ccf5101d2320456ec3f2dd8179f9",
           TimelockScript TimelockConstr Signature (KeyHash "d3b51656ce61098c59bef02b99529e3b16d9165951cf0c030f915602")),
       (ScriptHash "9573fdfbcf7e2fdec139e2fcf7215883855933c9628928d5e5c0f3b4",
           TimelockScript TimelockConstr Signature (KeyHash "7006429f96d5a5775d9bca2e69b6f69caeeb8fc34ef2df63763ce35c"))],
  _txdats = TxDatsRaw (fromList []),
  _txrdmrs = RedeemersRaw (fromList [])},
   isValid = IsValid True,
   auxiliaryData = SNothing}

Note the output, where the Value has a policy ID with script hash  "42c7a014a4cd5537f64e5ae8ec7349db3d8603e16765dc37f8fb6e67"
Note that, that is the script hash of the unneeded witness.
How does an extra witness lead to the MissingScriptWitnessesUTXOW (fromList [])  failure?  This arises because of this code in the Utxow rule in the alonzo era.
validateMissingScripts pp sNeeded sReceived =
  if HardForks.missingScriptsSymmetricDifference pp
    then
      sequenceA_
        [ failureUnless (sNeeded `Set.isSubsetOf` sReceived) $
            MissingScriptWitnessesUTXOW (sNeeded `Set.difference` sReceived),
          failureUnless (sReceived `Set.isSubsetOf` sNeeded) $
            ExtraneousScriptWitnessesUTXOW (sReceived `Set.difference` sNeeded)
        ]
    else
      failureUnless (sNeeded == sReceived) $
        MissingScriptWitnessesUTXOW (sNeeded `Set.difference` sReceived)  ### TRACE SHOWS WE ARE HERE

So he hardforks test is false, and we compute  (sNeeded Set.difference sReceived)  which turns out to be the empty set since
sReceived is a superset of sNeeded.  Here are the values of those variables.
sneeded =fromList
   [ScriptHash "395e0b6c308dbdfd6e41354b68f833b96990ecd93721699ed90a2113",
    ScriptHash "504fca9befba2683bcf5797db908b891ff8e9aacfb3ce633fe495b45",
    ScriptHash "5c0a02a40d0b72ea023a6628116c3fd7ca00e853dde5f7c90606aeff",
    ScriptHash "64abdacc0e1cc6b7dcbcf601c28f3e882f5453dca4eb713591635f90",
    ScriptHash "7c06fcc873546a676c9b83947385ccf5101d2320456ec3f2dd8179f9",
    ScriptHash "9573fdfbcf7e2fdec139e2fcf7215883855933c9628928d5e5c0f3b4"]
  received=fromList
   [ScriptHash "395e0b6c308dbdfd6e41354b68f833b96990ecd93721699ed90a2113",
    ScriptHash "42c7a014a4cd5537f64e5ae8ec7349db3d8603e16765dc37f8fb6e67",  -- Extra script hash
    ScriptHash "504fca9befba2683bcf5797db908b891ff8e9aacfb3ce633fe495b45",
    ScriptHash "5c0a02a40d0b72ea023a6628116c3fd7ca00e853dde5f7c90606aeff",
    ScriptHash "64abdacc0e1cc6b7dcbcf601c28f3e882f5453dca4eb713591635f90",
    ScriptHash "7c06fcc873546a676c9b83947385ccf5101d2320456ec3f2dd8179f9",
    ScriptHash "9573fdfbcf7e2fdec139e2fcf7215883855933c9628928d5e5c0f3b4"]

This explains why we get the error. But not why the extra witness is generated. But perhaps it is a usefull clue, that at least in this failure the hash comes from a PolicyID.
Once can reproduce this on commit 4fc32a6117db697bc928d1488d38e9e871e82dbe
using this command
TASTY_PATTERN='/total amount of Ada is preserved (Chain)/'   cabal test --test-options="--quickcheck-replay=76070 "

Fixed in #3039


Move refactor: Treat Follow Me and Rage Powder as side conditions

This fixes Rage Powder's interaction with Safety Goggles.

Oh wait this has a lot more complicated checks that I'm missing

Meh, this hardcode solution is much cleaner and fixes issues with things like switching out and back in


Allow escaping of '%' in templates

I'm using vim-zettel to manage my memex and would like to have notes start with '%title [%:description]'
I'm not sure if this breaks the org-mode spec, but having an escape key for % would be useful for my purposes.
I know python but am still figuring out the code base currently, and RE is not my strong suit. Pointers on where to look to add escape characters to the RE parsing would be helpful. Line 66 in org_tools.py seems to be what I need to change?
Currently any text appended to '%' results in an error because it cannot find the variable.

Hi, seems that org-mode spec suggests using \% for escaping https://orgmode.org/manual/Template-expansion.html#FOOT87
Would that suit you?
You're right, this line is responsible for template expansion https://github.com/karlicoss/grasp/blob/master/server/org_tools.py#L67 I haven't tried, but I think you'd need something like  py_template = re.sub(r'[^\\]%[:]?([?\w]+)', r'{\1}', org_template), so it excludes the \% from matching.

Yes, \% would suit me perfectly
Thanks for the regex, I will try changing the python and make a pull request if I'm successful :)

I think this works now :)


"Automatic Tunic"

https://docs.microsoft.com/en-us/sql/?view=sql-server-2017#pivot=sqlserver&panel=sqlserver
Please fix so it does not say "Automatic Tunic" but says "Automatic Tuning"
@MikeRayMSFT

@MashaMSFT Hi Masha, there is a spelling mistake to fix, on the SQL Hub page, I think. Per this Issue 1704.
CC: @MikeRayMSFT

Well.. that's embarrassing :) Thanks for catching that @jzabroski ! I've fixed this typo within PR 9298, and will proceed with closing out this Git Issue. However, please feel free to respond should you need anything further. Thanks again!

THANK YOU SO MUCH.
On Mon, Mar 4, 2019 at 1:22 PM Masha at MSFT<EMAIL_ADDRESS>wrote:

Well.. that's embarrassing :) Thanks for catching that @jzabroski
https://github.com/jzabroski ! I've fixed this typo within PR 9298, and
will proceed with closing out this Git Issue. However, please feel free to
respond should you need anything further. Thanks again!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/MicrosoftDocs/sql-docs/issues/1704#issuecomment-469359902,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAbT_a4ThdYxsTgN8YW3_x5FNBaQra9Oks5vTWRNgaJpZM4baBod
.

@MashaMSFT Hi Masha,  A friendly reminder - to click the Close button on a final Comment when you have completed an Issue.
Plus, update the label from 'Issue-Status-' to 'Issue-Outcome-'.
For this Issue 1704, @MikeRayMSFT  has closed and re-labeled this for you today.
Thanks.


Refactor Character icons to remove BEM modifiers

Character icons, in misc.less, need to be refactored to remove the step BEM modifiers (e.g. 1, 2, 3, a, b, c).  This now can be accomplished using CSS counters (https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Counters). Need to make sure the solution degrades gracefully.

Is this issue referring to https://github.com/cfpb/cfgov-refresh/blob/master/cfgov/unprocessed/css/pages/event.less#L116 ?

I don't remember events having steps but I know OaH does https://www.consumerfinance.gov/owning-a-home/process/close/

It's referring to this: https://github.com/cfpb/cfgov-refresh/blob/master/cfgov/unprocessed/css/misc.less#L154-L254

Looks like it was only used on Doing Business with Us which has been modified since moving to Wagtail. Can we ditch these entirely or do we still want them on that page?

@jimmynotjim, how do you feel about closing this issue?

If they're no longer used lets close it. If it resurfaces we can always reopen it at a later date.


Allow override of default browser/editor in settings

Somebody (like myself) like to use a separate browser for testing than regular browsing (e.g. Safari vs. Chrome or Chrome Canary for testing). Right now we use the default browser, but we should allow changing this.
The same goes for editor. We should hit most since we pick the default browser for js, but some Ember projects are written in Coffescript or Typescript, and some users might prefer a different editor for that.

Would this be on a global or per-project basis? Or both? (global, with project-override?)

Global first and foremost, but per-project would be nice too.

Global implemented e1f7f6d4975879801529f21c0cb54df1c070df19

Closing this for now as we don't really have a system for per-project settings yet, and when we do it should be easy enough to implement this as one of the options.


Tier 1: [BANNER] Get the Tools:  Mimic get the tools on 101 page

Layout and image just look a little weird.  I'll see if I can do this one but might need help

@quinnfenlon what page is this on?


[class*='class_name'] dont work

I'm writing a website with react and next.js.
I have some css to handle different screen size(responsive) witch is done like so:
 @media (min-width: 1px) and (max-width: 768px) {
      [class*='grid__col--'] {
        margin-top: 12px;
        margin-bottom: 12px;
      }
    }

the problem is that the inside ( [class*='grid__col--'] ) does not work but when i put some other thing it work i dont Know if it is an issue or some misunderstood by me.

What do you mean by "it doesn't work"? Can you provide more details / the output?

it seems that is not an issue i just used wrong i was putting the style tag inside the Head tag


Next.js getting started app

A work in progress PR to allow for code discussion.
Adds a new Next.js getting-started prefixed example application that will show the result of running through the Next.js Getting Started guide.

Replaced with https://github.com/xataio/examples/pull/504


Add CircleCI support

Similarly to appveyor and travis:

a script named circle_dashboard.cmake could be added to the dashboard branch. See https://github.com/python-cmake-buildsystem/python-cmake-buildsystem/tree/dashboard
a file named circle.yml could be added to the master branch. See https://circleci.com/docs/configuration for help

CircleCI has been activated and adding the missing files should now be sufficient.
See https://circleci.com/gh/python-cmake-buildsystem/python-cmake-buildsystem

@thewtex Let me know if you would like to work on this :)
Ps: Seems you didn't accept the invite to the 'python-cmake-buildsystem' organization.

Super!
Yeah I missed the invite -- joined now :-). Thanks!
Please assign this one to me.

CircleCI support has been added following integration of https://github.com/python-cmake-buildsystem/python-cmake-buildsystem/commit/60c3fd0b48bd12947e2f6579a6a3a9a5629b6877 and https://github.com/python-cmake-buildsystem/python-cmake-buildsystem/commit/14c8c57290fa2c81daa1d4ee039827a6fc03a323


Update translation for 0.8.0

wip.

I've finished. As commits are ugly, could you do squash merge please?


feat: add star repo hotkey

Resolves #1479

@adamlacombe Friendly ping :)

@adamlacombe Can you mention the feature in the readme?

@sindresorhus Sorry for the delay - should be all set now.

Thank you for adding the feature, Adam!


Very high stack usage under clang on debug

With the commit d87d2a1acf0daa82bc0855559617df0f9800ceef, after generating the amalgamation files, I did the following:
clang++ -o amalgamation_demo amalgamation_demo.cpp -std=c++17
objdump --disassemble-all -C -M intel amalgamation_demo > out.txt

Search an implementation:
0000000000284360 <bool simdutf::haswell::(anonymous namespace)::utf8_validation::generic_validate_utf8<simdutf::haswell::(anonymous namespace)::utf8_validation::utf8_checker>(unsigned char const*, unsigned long)>:
  284360:	55                   	push   rbp
  284361:	48 89 e5             	mov    rbp,rsp
  284364:	41 57                	push   r15
  284366:	41 56                	push   r14
  284368:	41 55                	push   r13
  28436a:	41 54                	push   r12
  28436c:	53                   	push   rbx
  28436d:	48 83 e4 e0          	and    rsp,0xffffffffffffffe0
  284371:	48 81 ec e0 97 01 00 	sub    rsp,0x197e0

Ubuntu clang version 14.0.0-1ubuntu1.1 for this test, but the original problem was found on some AppleClang version.
sub    rsp,0x197e0 -> that's over 100kb of stack used in this function.
Most likely other functions have the same problem, but this is what was crashing for me due to stack overflow.
I am not using the cmakefiles from the project, so I don't know if there's a mitigation for this already, but I did not find any similar issue reported on GitHub.
I know building this on debug kind of defeats the purpose of the library, but it's at best an annoyance and at worst an unexpected crash. I also had problems in the past with trying to set -O2 explicitly for some files with the XCode generator, so I'm trying not to do that.
How I fixed it for me was to force the fallback implementation on debug. But I was hoping there was a better way fix for this, or at least some official guidance on the best way to deal with this?

I recommend building with -O1. It is what we do in the CMake and it is common practice.


fix: implement own AST parser to reduce dep

Bug

[x] Related issues linked using fixes #number

Feature

[ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
[ ] Related issues linked using fixes #number
[ ] Documentation added
[ ] Example added

Documentation / Examples

[ ] Update https://github.com/PlasmoHQ/docs

why are we parsing the AST, instead of evaluating the file & using the exported config object?

why are we parsing the AST, instead of evaluating the file & using the exported config object? @louisgv

@kiprasmel I assume by evaluating the file, you mean compiling the ts file at the plasmo compiler's runtime and extracting the config object out. We can use something like vite's parser, but it'd be slow and unnecessary for this case.
Parsing the AST for the config is, in my mind, "evaluating the file." It allow us to ignore most of the ts compile needed to get to the config.


Is this not just wikipedia?

I get this a lot. I think the main difference is that Wikipedia is only 1 article. The idea here would be to have multiple versions, each one focusing on a different part. Also, every author would be credited.

Cool idea!


[REVIEWABLE] Sign in with Apple on iOS

This is a rough, incomplete draft of this feature (focused on iOS) intended to check my understanding of what needs to be done, broadly. Even if I've got some things wrong, I think I've reached a point where it would be helpful to test with a server-side implementation, using a key that @gnprice has.
I have several questions, some larger, some smaller. How about I write a separate message for each of them, here, and if it's big enough for a lot of discussion, we can go to CZO?
Fixes: #3964

After we decided to use a custom button everywhere, and never to use the system-provided button (Apple's HIG document on these), I haven't yet done the work to comply with the official rules for custom buttons. Part of me wishes this were acceptable, since the code makes it so easy for it to be uniform with the other social auth buttons, which (IMHO) looks better than having it be different, anyway. For the real version, it looks like the biggest differences we'll have to make are:

to use the SVG Apple provides, instead of the "apple-logo" SVG icon from Ionicons.
to match the height of the logo file to the height of the button
to not use our Zulip green color on the logo, or any custom color

It looks so nice with the others, now, though!

You can pass a "state" to the authorization request to Apple, which is "Data that’s returned to you unmodified in the corresponding credential after a successful authentication." (Apple doc; state is a property on an ASAuthorizationOpenIDRequest, which ASAuthorizationAppleIDRequest
 extends, and here's the line where Expo uses an ASAuthorizationAppleIDRequest, also, Expo doc). It's optional. Expo says it's useful to help prevent replay attacks. Would it be appropriate to use an OTP from our existing OTP generator, perhaps? 🤷♂

There's also a nonce property we can apparently use, which Expo exposes, and I'm having trouble distinguishing it from what state does. In the first of two attempts, Expo is, surprisingly, more helpful than the Apple doc about this property; Expo links to the OpenID Connect specification. There may be a standard, correct answer for what to do with this, but that spec says it's optional, so I'm appealing to others' judgment on this.

On purpose, in this PR, I haven't made any code changes to the web flow logic, with a glass-half-full mindset (and some thinking through) that it will Just Work, since that's what the existing web auth flow is designed for. The web flow will always be used on Android, and always on iOS versions before 13. For iOS >= 13, it will be used for non-Kandra realms.

As noted in a code comment, I think we'll need to carefully handle errors from the fetch of ${this.props.realm}/complete/apple/?mobile_flow_otp=${nativeAppleOTP}. I have it in my notes from a conversation with @gnprice that, when using the native flow, it would be nice to open Zulip's "create account" flow in the browser if it turns out that the user hasn't created a Zulip account yet. The mobile app doesn't have to be in charge of this for any of the existing auth flows (I think maybe the purely web-auth ones handle it this way, though?).

We can use fetch, right, or does this limitation apply?

I'm looking at this doc for this question. For the body of the POST request to /complete/apple/ (which we make after successful Apple auth), I'm trying to exactly replicate the shape of the request that Apple will send there, in the web flow. In the web flow, we get to tell Apple what we'd like their request to look like, with a response_mode flag, which can be query, fragment, or form_post. I'm having trouble finding where we do this in https://github.com/zulip/zulip/pull/14235, but I expect it will be form_post, because the docs say, "If you requested any scopes, the value must be form_post", and I think we'll probably at least want the email scope, maybe full name too. Then,

For the form_post value, an HTTP POST request containing the results of the authorization is sent to the redirectURI. The HTTP body contains the result parameters with application/x-www-form-urlencoded content type.

Thus, the body I've chosen to use. Do I seem to be on the right track here?

I haven't thought much about the "Prevent Duplicate Accounts" strategy outlined at this Apple doc. It doesn't seem to block a basic implementation, but it might be nice to investigate.

Apple has documentation (at "Manage the User Session") on, I think, a way to kick someone out of a Zulip account that they logged into with Apple, upon discovering that their account is no longer authenticated at the device level. It doesn't sound like we do something similar with Google on Android, but some users might feel more comfortable if this were done?

Just rebased and fixed some merge conflicts.

I'm having trouble finding where we do this in zulip/zulip#14235, but I expect it will be form_post, because the docs say, "If you requested any scopes, the value must be form_post", and I think we'll probably at least want the email scope, maybe full name too.

You're right about it. That is taken care by Python-social-auth here https://github.com/python-social-auth/social-core/blob/master/social_core/backends/apple.py#L55
We send the scope as email name. We only get name the first time user makes a request, so Only on the initial try to register we get name but we get email every time the user tries to logs in.

I haven't thought much about the "Prevent Duplicate Accounts" strategy outlined at this Apple doc. Omitting that strategy doesn't seem to block a basic implementation,

I think a user can only make two accounts, one with original email through normal email registration and another with apple auth with a private email. And we get the same private email everytime as apple returns user data based on initial request as said in Retrieve the User’s Information from Apple ID Servers

The server returns the credentials and user information based on the initial request.

Looking at "Prevent Duplicate Accounts" in that doc, If my understanding is right, we send a request to the apple keychain(an apple user uses this to save their login credentials of a website/app in this afaik) credential sharing which helps us detect existing account only if it's credentials with url are saved in keychain. But I'm not really sure about that. I didn't really understand how to implement ASAuthorizationPasswordProvider from their docs.

Thanks, @chdinesh1089! It's helpful for me see that code in python-social-auth. 🙂
I'd better go help make dinner, but I just pushed some changes to add the custom button. Initially, I had thought it would be best to use the custom button for everything, since we had to make one anyway. But actually, I think we can be more targeted than that. In particular, @gnprice, what do you think about

on Android, using the existing ZulipButton that's already consistent with the other social auth buttons, since Apple's Human Interface Guidelines (which guide what the button should look like) don't apply on Android
on iOS, using the system-provided button when possible (i.e., iOS >=13), and the custom button otherwise? The custom button is kind of annoying because (at least currently) I don't know how to make the logo, which is a PNG, work well with any of RN's Touchable components that have feedback, since they all use opacity, and none seem to apply the opacity properly to the PNG

Here's the official button:

And the custom button:

I guess one thing that's nice about the custom button is that we're allowed to increase the size of the Apple logo to match the other logos/icons (doc):

Also, the left-aligned logos are available in small, medium, and large sizes, so you can match logo sizes in all the sign-up buttons you display.

OK, just pushed my latest revision, @gnprice. Still a draft, and Flow has some issues with
9812a3c24 [draft] Use "Sign in with Apple".
But just in case you wanted to check in on the code.

Fixed the Flow issues (and filed an Expo issue that should clarify some things for us)!

I just pushed with some rebase conflicts resolved, and removed the edits of lots of translation files, as that'll be handled in Transifex as long as messages_en.json is correct.

Tested this just now with Mateusz's test server, as discussed in chat here. And with one fix, it works!
diff --git src/start/AuthScreen.js src/start/AuthScreen.js
index a246baed9..af8714691 100644
--- src/start/AuthScreen.js
+++ src/start/AuthScreen.js
@@ -245,6 +245,7 @@ class AuthScreen extends PureComponent<Props> {
     const state = await webAuth.generateRandomToken();
     const credential: AppleAuthenticationCredential = await AppleAuthentication.signInAsync({
       state,
+      requestedScopes: [AppleAuthentication.AppleAuthenticationScope.FULL_NAME, AppleAuthentication.AppleAuthenticationScope.EMAIL],
     });

Specifically with that change it worked on a simulated iPhone 11 running iOS 13.1.
It also worked, even without that change, on iOS 12 -- on a simulated iPhone 7 running iOS 12.2. As expected, on that OS version the "Sign in with Apple" button went straight to a browser view; I went through the auth flow on appleid.apple.com, got redirected back to the Zulip server, and then the app was successfully logged in.

Probably worth a try on Android, as well; this PR is also meant to fix #3965.

OK, just pushed my latest changes, including the new way of establishing that a server is Kandra-hosted, as discussed around here.

@gnprice, thanks for the review! I've just pushed my latest changes, for another one.

Sorry, just pushed again—was getting those errors in Jest again; see https://github.com/zulip/zulip-mobile/pull/4034#discussion_r447928183.

And merged -- thanks! Added a few small changes.

Great, thanks, and thanks for those changes! I just took a look and they definitely make sense.


executing sample command from README doesn't work

to get periscope.py running I had to add the following changes:
diff --git a/Dockerfile b/Dockerfile
index 5bb473b..adacea1 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,6 +4,6 @@ WORKDIR /usr/src/app
 COPY requirements.txt ./
 RUN pip install --no-cache-dir -r requirements.txt
-COPY periscope.py ./
+COPY periscope.py checks.py ./
-ENTRYPOINT [ "python", "/usr/src/app/periscope.py" ]
\ No newline at end of file
+ENTRYPOINT [ "python", "/usr/src/app/periscope.py" ]
diff --git a/periscope.py b/periscope.py
index bfafefa..666f9ea 100755
--- a/periscope.py
+++ b/periscope.py
@@ -4,6 +4,10 @@ import argparse
 from termcolor import colored
 import yaml
 import concurrent.futures
+import importlib.util
+spec = importlib.util.spec_from_file_location("checks", "checks.py")
+foo = importlib.util.module_from_spec(spec)
+spec.loader.exec_module(foo)
 from checks import CheckResult, checks, Ok, Warn, Err
@@ -101,4 +105,4 @@ if __name__ == '__main__':
     if any(isinstance(x, Err) for x in results):
         exit(1)
     else:
-        exit(0)
\ No newline at end of file
+        exit(0)
diff --git a/requirements.txt b/requirements.txt
index 0a2e487..4cfe122 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,5 @@
 termcolor
 icmplib
 netaddr
-urllib3
\ No newline at end of file
+urllib3
+pyyaml

After building the container and running the sample command inside, the following error occured:
sudo docker run -it --entrypoint=/bin/sh --rm periscope
/usr/src/app # python periscope.py \
>   --http https://httpstat.us/200 \
>   --tcp  <IP_ADDRESS>:53 \
>   --ping <IP_ADDRESS> \
>   --dns  'dns.google=<IP_ADDRESS>,<IP_ADDRESS>'
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/icmplib/sockets.py", line 88, in __init__
    self._sock = self._create_socket(
  File "/usr/local/lib/python3.9/site-packages/icmplib/sockets.py", line 452, in _create_socket
    return socket.socket(
  File "/usr/local/lib/python3.9/socket.py", line 232, in __init__
    _socket.socket.__init__(self, family, type, proto, fileno)
PermissionError: [Errno 13] Permission denied
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/src/app/periscope.py", line 104, in <module>
    print_results(results)
  File "/usr/src/app/periscope.py", line 59, in print_results
    for result in results:
  File "/usr/src/app/periscope.py", line 71, in run
    yield future.result()
  File "/usr/local/lib/python3.9/concurrent/futures/_base.py", line 438, in result
    return self.__get_result()
  File "/usr/local/lib/python3.9/concurrent/futures/_base.py", line 390, in __get_result
    raise self._exception
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/checks.py", line 38, in ping
    host = icmplib.ping(x, privileged=False,count=ping_count)
  File "/usr/local/lib/python3.9/site-packages/icmplib/ping.py", line 131, in ping
    sock = ICMPv4Socket(
  File "/usr/local/lib/python3.9/site-packages/icmplib/sockets.py", line 97, in __init__
    raise SocketPermissionError
icmplib.exceptions.SocketPermissionError: Root privileges are required to create the socket

even though the container itself is running as root as well as the user starting the command
Distro: Linux Mint 19 Tara
docker version:
Client: Docker Engine - Community
 Version:           20.10.2
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        2291f61
 Built:             Mon Dec 28 16:17:32 2020
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.2
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       8891c58
  Built:            Mon Dec 28 16:15:09 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.3
  GitCommit:        269548fa27e0089a8b8278fc4fc781d7f65a939b
 runc:
  Version:          1.0.0-rc92
  GitCommit:        ff819c7e9184c13b7c2607fe6c30ae19403a7aff
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

thx for the report. Should be fixed in latest version.


[PF2] Can't add Lore skills to HTML form

The skill list doesn't allow you to enter anything in the blank for a Lore skill, or any of the other blank skill spaces at the bottom of the list.

Good point. I've started working on this.


AVRO-4053: doc consistency in velocity templates

What is the purpose of the change
AVRO-4053: Improve doc consistency in SpecificRecord
Fixes inconsistencies in generated doc comments.
Verifying this change
This change adds tests and can be verified as follows:

Verify the updates velocity templates
Check that the updated file simple_record.avsc (used by many tests) could but does not cause problems
Review the new test docsAreEscaped_avro4053 in org.apache.avro.compiler.specific.TestSpecificCompiler

Documentation

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

Thanks for addressing Martin's comments!  I've gone through this PR and it all looks good to me ... except that I haven't quite finished thoroughly reviewing that Regex construction :laughing:   My apologies, I'm committing to finishing this tomorrow!

I've taken the liberty of taking the import order config out of this PR, and started a discussion on the dev mailing list.


RuntimeError: size mismatch when running examples/causal_language_modeling/peft_lora_clm_accelerate_big_model_inference.ipynb

The error is triggered in Line 8 in the 5th Notebook Cell:
model = PeftModel.from_pretrained(model, peft_model_id, device_map="auto", max_memory=max_memory)

Versions of related packages are:
datasets                  2.11.0                               pypi_0    pypi
ffmpeg                    4.3                              hf484d3e_0    pytorch
peft                      0.3.0.dev0                           pypi_0    pypi      # commit hash: e8f66b8
pytorch                   2.0.0           py3.8_cuda11.7_cudnn8.5.0_0    pytorch
pytorch-cuda              11.7                             h778d358_3    pytorch
pytorch-mutex             1.0                                    cuda    pytorch
torchaudio                2.0.0                            py38_cu117    pytorch
torchtriton               2.0.0                                  py38    pytorch
torchvision               0.15.0                           py38_cu117    pytorch
transformers              4.28.1                               pypi_0    pypi

Traceback
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
Cell In[5], line 8
      6 config = PeftConfig.from_pretrained(peft_model_id)
      7 model = AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path, device_map="auto", max_memory=max_memory)
----> 8 model = PeftModel.from_pretrained(model, peft_model_id, device_map="auto", max_memory=max_memory)

File /datadisk/miniconda3/envs/peft/lib/python3.8/site-packages/peft/peft_model.py:181, in PeftModel.from_pretrained(cls, model, model_id, adapter_name, is_trainable, **kwargs)
    179 else:
    180     model = MODEL_TYPE_TO_PEFT_MODEL_MAPPING[config.task_type](model, config, adapter_name)
--> 181 model.load_adapter(model_id, adapter_name, **kwargs)
    182 return model

File /datadisk/miniconda3/envs/peft/lib/python3.8/site-packages/peft/peft_model.py:376, in PeftModel.load_adapter(self, model_id, adapter_name, is_trainable, **kwargs)
    372 adapters_weights = torch.load(
    373     filename, map_location=torch.device("cuda" if torch.cuda.is_available() else "cpu")
    374 )
    375 # load the weights into the model
--> 376 set_peft_model_state_dict(self, adapters_weights, adapter_name=adapter_name)
    377 if (
    378     (getattr(self, "hf_device_map", None) is not None)
    379     and (len(set(self.hf_device_map.values()).intersection({"cpu", "disk"})) > 0)
    380     and len(self.peft_config) == 1
    381 ):
    382     device_map = kwargs.get("device_map", "auto")

File /datadisk/miniconda3/envs/peft/lib/python3.8/site-packages/peft/utils/save_and_load.py:123, in set_peft_model_state_dict(model, peft_model_state_dict, adapter_name)
    120 else:
    121     raise NotImplementedError
--> 123 model.load_state_dict(peft_model_state_dict, strict=False)
    124 if isinstance(config, PromptLearningConfig):
    125     model.prompt_encoder[adapter_name].embedding.load_state_dict(
    126         {"weight": peft_model_state_dict["prompt_embeddings"]}, strict=True
    127     )

File /datadisk/miniconda3/envs/peft/lib/python3.8/site-packages/torch/nn/modules/module.py:2041, in Module.load_state_dict(self, state_dict, strict)
   2036         error_msgs.insert(
   2037             0, 'Missing key(s) in state_dict: {}. '.format(
   2038                 ', '.join('"{}"'.format(k) for k in missing_keys)))
   2040 if len(error_msgs) > 0:
-> 2041     raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
   2042                        self.__class__.__name__, "\n\t".join(error_msgs)))
   2043 return _IncompatibleKeys(missing_keys, unexpected_keys)

RuntimeError: Error(s) in loading state_dict for PeftModelForCausalLM:
	size mismatch for base_model.model.transformer.h.0.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.0.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).
	size mismatch for base_model.model.transformer.h.1.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.1.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).
	size mismatch for base_model.model.transformer.h.2.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.2.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).
	size mismatch for base_model.model.transformer.h.3.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.3.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).
	size mismatch for base_model.model.transformer.h.4.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.4.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).
	size mismatch for base_model.model.transformer.h.5.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.5.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).
	size mismatch for base_model.model.transformer.h.6.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.6.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).
	size mismatch for base_model.model.transformer.h.7.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.7.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).
	size mismatch for base_model.model.transformer.h.8.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.8.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).
	size mismatch for base_model.model.transformer.h.9.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.9.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).
	size mismatch for base_model.model.transformer.h.10.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.10.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).
	size mismatch for base_model.model.transformer.h.11.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.11.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).
	size mismatch for base_model.model.transformer.h.12.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.12.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).
	size mismatch for base_model.model.transformer.h.13.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.13.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).
	size mismatch for base_model.model.transformer.h.14.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.14.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).
	size mismatch for base_model.model.transformer.h.15.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.15.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).
	size mismatch for base_model.model.transformer.h.16.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.16.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).
	size mismatch for base_model.model.transformer.h.17.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.17.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).
	size mismatch for base_model.model.transformer.h.18.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.18.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).
	size mismatch for base_model.model.transformer.h.19.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.19.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).
	size mismatch for base_model.model.transformer.h.20.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.20.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).
	size mismatch for base_model.model.transformer.h.21.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.21.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).
	size mismatch for base_model.model.transformer.h.22.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.22.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).
	size mismatch for base_model.model.transformer.h.23.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.23.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).
	size mismatch for base_model.model.transformer.h.24.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.24.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).
	size mismatch for base_model.model.transformer.h.25.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.25.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).
	size mismatch for base_model.model.transformer.h.26.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.26.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).
	size mismatch for base_model.model.transformer.h.27.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.27.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).
	size mismatch for base_model.model.transformer.h.28.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.28.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).
	size mismatch for base_model.model.transformer.h.29.self_attention.query_key_value.lora_A.default.weight: copying a param with shape torch.Size([16, 4096]) from checkpoint, the shape in current model is torch.Size([8, 4096]).
	size mismatch for base_model.model.transformer.h.29.self_attention.query_key_value.lora_B.default.weight: copying a param with shape torch.Size([8192, 8, 1]) from checkpoint, the shape in current model is torch.Size([12288, 8]).

Hi, can you try adding ignore_mismatched_sizes=True inside from_pretrained like this:
model = AutoModelForCausalLM.from_pretrained(
   config.base_model_name_or_path,
   ignore_mismatched_sizes=True,
   device_map="auto",
   max_memory=max_memory
)

Hello, may I ask if the issue has been resolved? I have encountered the same problem as well.

Hello, may I ask if the issue has been resolved? I have encountered the same problem as well.

Not yet unfortunately.

same problem after expend the embeding layer then save_pretrained and load back

I met the same problem


migrate CSRFSuite to munit

Thanks! With one import change, I brought it all the way back to 0.21 so it can start doing good there, too.

Thanks! With one import change, I brought it all the way back to 0.21 so it can start doing good there, too.


chore: #33 remove post

Hi all - just for awareness - I am removing this CI/CD post as it seems to cause merge conflicts in other PRs.

Not sure why the spelling is failing but hopefully that works itself out


$form->select can't set related to null (URGENT)

Hi,
I have this category_id field in my form, foreign key from Product to ProductCategory and I can't set it to null :
$res = ProductCategory::all()->pluck('name', 'id');
$form->select('category_id', trans('admin::app.category'))->options($res);

// this is the relation from Product to ProductCategiry:
public function category() {
    return $this->belongsTo(ProductCategory::class,'category_id');
}

category_id is nullable.
this is the data in $res :
Collection {#386 ▼
  #items: array:5 [▼
  1 => "One"
  2 => "Two"
  3 => "Three"
  4 => "Four"
  5 => "Five"
  ]
]

When I click on the X in the select, the field actually reset as expected.
in the http request the value is empty:
------WebKitFormBoundaryEBHiBJGmKv3CDA06
Content-Disposition: form-data; name="category_id"

but in the database category_id is not set to null.
Can you explain what am I doing wrong?
Thanks
I saw similar questions but the solutions are very "pitfally"
https://github.com/z-song/laravel-admin/issues/243

This happens because the blade is incomplete.
Check src/Form/Field/Select.php:22 - it should be like this:
$this->script = "$(\"#{$this->id}\").select2({allowClear: true, placeholder: \"{$this->label}\"});";
The missing placeholder option triggers Javascript error thus select field not clearing. See the comment from select2 issue: https://github.com/select2/select2/issues/3497#issuecomment-113501752

This file are still different between git version and Composer version even version number of them are 1.4.*? How can I update this to the right version?

@JefferyWong it feels this repo is quite a mess.
Master branch of this repository is way behind what is active at the moment and very difficult to update - implies lots of cherry picking.
This issue is not pulled in any branch. If you need this fix you might as well modify your code by hand and not rely on Git or Composer.

@manyk will this repo get a proper fix? And when?

One cheap trick would to override and insert a str_replace in:
vendor/encore/laravel-admin/views/partials/script.blade.php
Example:
<script data-exec-on-popstate>
    $(function () {
        @foreach($script as $s)
            <?php
                $s = str_replace(
                    '$(\"{$this->getElementClassSelector()}\").select2({allowClear: true});',
                    '$(\"#{$this->id}\").select2({allowClear: true, placeholder: \"{$this->label}\"});',
                    $s
                );
            ?>
            {!! $s !!}
        @endforeach
    });
</script>

Very temporary ..really don't like this, but it patches the problem until officially fixed without complicated class overrides?

My solution to this was to override the Select field and register it in the bootstrap:
app/Admin/Extensions/Select.php
<?php

namespace App\Admin\Extensions;

use Encore\Admin\Form\Field\Select as AdminSelect;

class Select extends AdminSelect
{
    public function render()
    {
        if (empty($this->placeholder)) {
            $this->script = '$("'.$this->getElementClassSelector().'").select2({allowClear: false});';
        }
        else {
            $this->script = '$("'.$this->getElementClassSelector().'").select2({allowClear: true, placeholder: '.json_encode($this->placeholder).'});';
            //$this->default = '';
        }

        if ($this->options instanceof \Closure) {
            if ($this->form) {
                $this->options = $this->options->bindTo($this->form->model());
            }

            $this->options(call_user_func($this->options, $this->value));
        }

        $this->options = array_filter($this->options);

        if (!empty($this->placeholder)) {
            $this->options = array_prepend($this->options, ' ', '');
        }

        return parent::render()->with(['options' => $this->options]);
    }
}

Note the empty option I'm injecting. I think I am exploiting a bug because select2 is picky about the needed empty  tag.
app/Admin/bootstrap.php
Encore\Admin\Form::extend('select', \App\Admin\Extensions\Select::class);

Then I can use the new select field like this:
$form->select('fruit')->options(['apple','orange','banana'])->placeholder('Choose something...');

When you don't use the placeholder, the selection will be forced (like before).
@z-song Could you take a look into this? Do you prefer pull request?

I prefer to always have a blank placeholder, not propose the first item (i would use default() for that purpose). And if I need a placeholder text, I use the placeholder() method.
Updated app/Admin/Extensions/Select.php
<?php

namespace App\Admin\Extensions;

use Encore\Admin\Form\Field\Select as AdminSelect;

class Select extends AdminSelect
{
    public function render()
    {
        if (empty($this->placeholder)) {
            $this->placeholder = '';
        }

        $this->script = '$("'.$this->getElementClassSelector().'").select2({allowClear: true, placeholder: '.json_encode($this->placeholder).'});';

        if ($this->options instanceof \Closure) {
            if ($this->form) {
                $this->options = $this->options->bindTo($this->form->model());
            }

            $this->options(call_user_func($this->options, $this->value));
        }

        $this->options = array_filter($this->options);
        $this->options = array_prepend($this->options, ' ', '');

        return parent::render()->with(['options' => $this->options]);
    }
}

This works very well for me.

@isometriq you are right. That's overkill.
Best solutions should be the simplest ones.
@JefferyWong I suggest you clone this repository to your GitHub account, make the proper adjustments to the code and use it into your app instead of the official @z-song repository. You can take this path until this issue of laravel-admin is fixed in a future release.

Unless you need to make heavy changes/customizations to the repo (as opposed to what we are dealing with in this issue), I find that cloning or forking the repo would complicate things including maintaining and updating. I don't have lots of experience with forks, so my opinion may be ignorance.
If @z-song accepts pull requests, that would be optimal so that everyone benefits from it?

@z-song 你明白吗？

related to https://github.com/z-song/laravel-admin/issues/867


[New Port Request] libvirt

Library name: libvirt
Library description:  The libvirt project:   is a toolkit to manage virtualization platforms
Source repository URL: https://gitlab.com/libvirt/libvirt
Project homepage (if different from the source repository): https://libvirt.org/index.html
Anything else that is useful to know when adding (such as optional features the library may have that should be included):
Hyper-V support

If you wish to add this port in the future, you can reopen this issue, but we're closing it for now.


Add watchdog for automatic data upload

Currently waiting for the version deadlock between aind-data-schema and watchdog to be solved. Tracking https://github.com/AllenNeuralDynamics/aind-data-transfer-models/issues/18

This should be a feature to be added to the CLI as a "plugin".
One way to go about this is to add the following high-level methods:
CreateConfiguration
Takes some arguments from the rig, ideally from the Launcher object and creates a configuration file for the watchdog. This should only be needed to be run once when setting up a new PC, but in case different tasks want to use different targets, this might be important.
CreateManifest
Gets created at the end of each session from information from that session. This should probably hook to the process stdout. Once the bonsai process exists, we can assume that the task has finished and the launcher can now run.
I wonder if we should try to grab the stdout and try to send a control message to ensure that this routine should run. Need to test this out...


SyncCommandBufferBuilderError(Conflict) On Successive Calls to AutoCommandBuffeBuilder::blit_image

Versions of Vulkano: 0.19.0 and 0.18.0
OS: Linux (Kernel version: 5.6.15-1-MANJARO)
GPU (the selected PhysicalDevice): AMD Radeon RX580
GPU Driver: VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] (rev e7) (prog-if 00 [VGA controller])

Repository demonstrating the issue: https://github.com/Neightro/vulkan-tutorial-test
Branch master uses Vulkano 0.11.1 and works as expected.  Branch 'version_0-19-0' uses the latest version and panics on a BlitImageError.
Issue
When adding image blitting commands to a command buffer, successive calls to AutoCommandBufferBuilder::blit_image return a SyncCommandBufferBuilderError(Conflict)). The tutorial I was following warns that this code "results in Validation Layer warnings and may not behave the same on all machines." In the time since the tutorial has been released, has a more reliable way of performing this type of blitting been introduced?
Stacktrace
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: SyncCommandBufferBuilderError(Conflict { command1_name: "vkCmdBlitImage", command1_param: "source", command1_offset: 1, command2_name: "vkCmdBlitImage", command2_param: "destination", command2_offset: 1 })', src/main.rs:667:13
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.44/src/backtrace/libunwind.rs:86
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.44/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:78
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:59
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1063
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1426
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:62
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:204
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:224
  10: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:470
  11: rust_begin_unwind
             at src/libstd/panicking.rs:378
  12: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
  13: core::option::expect_none_failed
             at src/libcore/option.rs:1211
  14: core::result::Result<T,E>::unwrap
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/libcore/result.rs:1003
  15: vulkan_tutorial::Renderer::create_texture_image
             at src/main.rs:667
  16: vulkan_tutorial::Renderer::initialize
             at src/main.rs:282
  17: vulkan_tutorial::HelloTriangleApplication::initialize
             at src/main.rs:1057
  18: vulkan_tutorial::main
             at src/main.rs:1069
  19: std::rt::lang_start::{{closure}}
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/libstd/rt.rs:67
  20: std::rt::lang_start_internal::{{closure}}
             at src/libstd/rt.rs:52
  21: std::panicking::try::do_call
             at src/libstd/panicking.rs:303
  22: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:86
  23: std::panicking::try
             at src/libstd/panicking.rs:281
  24: std::panic::catch_unwind
             at src/libstd/panic.rs:394
  25: std::rt::lang_start_internal
             at src/libstd/rt.rs:51
  26: std::rt::lang_start
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/libstd/rt.rs:67
  27: main
  28: __libc_start_main
  29: _start
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Does this issue still occur with the latest Vulkano?


delete the ingest when any errors happen during resuming status

Fix: https://github.com/containerd/containerd/issues/3089

Codecov Report

Merging #3160 into master will increase coverage by 0.03%.
The diff coverage is 50%.

@@            Coverage Diff             @@
##           master    #3160      +/-   ##
==========================================
+ Coverage   42.38%   42.41%   +0.03%
==========================================
  Files         115      115
  Lines       12751    12759       +8
==========================================
+ Hits         5404     5412       +8
  Misses       6513     6513
  Partials      834      834

Flag
Coverage Δ

#linux
45.49% <60%> (+0.04%)
:arrow_up:

#windows
40.52% <50%> (+0.04%)
:arrow_up:

Impacted Files
Coverage Δ

content/local/store.go
49.51% <50%> (+0.99%)
: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 2f60e38...0f9bc42. Read the comment docs.

Please sign the commit with your full name

@AkihiroSuda changed

@AkihiroSuda PTAL


Details to install the latest version of Node.js

Added the direct code to always install the latest version of Node.js for the manual installation.
Maybe you could also include this in the automatic setup script, which does not seem to install the latest version of Node.js and fails on a clean image of raspian stretch.

Please send your pull requests the develop branch.
Don't forget to add the change to CHANGELOG.md.

Note: Sometimes the development moves very fast. It is highly
recommended that you update your branch of develop before creating a
pull request to send us your changes. This makes everyone's lives
easier (including yours) and helps us out on the development team.
Thanks!

Does the pull request solve a related issue?
If so, can you reference the issue?
What does the pull request accomplish? Use a list if needed.
If it includes major visual changes please add screenshots.

Warnings

:warning:

Please include an updated CHANGELOG.md file.This way we can keep track of all the contributions.

  Generated by :no_entry_sign: dangerJS

I did not change code but added details on how to manually install MagicMirror in README.md


Updated bpmn-js dependency

Summary

Updated the versions of bpmn-js and diagram-js that are used by the Management System

Is this a major change of any component?
(Tick the ones that apply)

[ ] Some API (JS, REST, Dispatcher, BPMN Server Event) is newly introduced
[ ] Some API (JS, REST, Dispatcher, BPMN Server Event) has been completely reworked and is not backward compatible
[ ] Major change of the underlying architecture
[x] A version of a dependency has been changed

Details

[x] Updated bpmn-js to version 11.1.1
[x] Updated diagram-js to version 11.4.3
[x] Fixed bugs that occured to breaking changes to the location of the di information of bpmn elements and newly introduced element properties
[x] Replaced our custom handling of displaying/editing collapsed subprocess in favor of  the newly introduced logic and ui of bpmn-js
[x] Removed dependency on the deprecated inherits package

 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.Janis Joderi Shoferi seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


investigate how texture scenes could use a generic threaded processing model

Convert test_lines.gd to run generation routine in a thread and join whenever.

related to #9

[ ] individual texture_scenes spawn thread to run their generation function
[ ] ui.gd needs ot know when all layers have finished updating (signal from texture_scene -> layer -> layer manager?) to be able to finally viewport_step_update()

generate all layers' texture_scenes
... and wait until they're done.
Once all generated, get ui.gd to viewport_step_update().

[ ] move the GDScript for l in $layerManager.layers: into layerManager.gd

works pretty well
RNG in thread state needs tidying up (#14)


Populating Collins - How are people doing this?

Just wondering what strategies are people using to initially populate collins? Manual entry? Agents collecting facts about existing systems?

We use a system called genesis https://github.com/tumblr/genesis to do
the population of assets, we call it intake, as well as other hardware
setup.  You could also write a small program to process some other input,
say a CSV file, with some information, but we keep track of a lot for each
asset.
Roy
On Wed, Jun 15, 2016 at 7:21 PM, sarlindo<EMAIL_ADDRESS>wrote:

Just wondering what strategies are people using to initially populate
collins? Manual entry? Agents collecting facts about existing systems?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/tumblr/collins/issues/449, or mute the thread
https://github.com/notifications/unsubscribe/AF2LSqIcU34u1p-0METPt-OCyILlSnL-ks5qMIkUgaJpZM4I243x
.

Thanks, I quickly looked at https://github.com/tumblr/genesis.
I read the install.md, I still don't think this really explains how to actually make use of this in production and how the overall architecture works? Is there any further detailed documentation you can point me to?

The general-workflow
https://github.com/tumblr/genesis#general-workflow should
give an overview on how everything is supposed to work.  The basic idea is
that you boot a genesis image on a server and either manually or (if the
correct boot line parameter is set) automatically run a target.  targets
are collections of tasks which are written in a ruby DSL and preform
small units of work.  There are md files which are supposed to describe all
the pieces.
As the general-workflow and install readme says, you need dhcp and tftp
servers to support the network booting and a file server for the non-tftp
downloaded files.  We also have a system to generate iPXE menus on the fly,
but ours can't be opened sourced and isn't strictly needed.
It is my hope that the various .md files in the repo would be enough to get
you started.  If you have specific questions or can tell me what you find
unclear, I'll try to explain more.
Roy
On Thu, Jun 16, 2016 at 10:49 AM, sarlindo<EMAIL_ADDRESS>wrote:

Thanks, I quickly looked at https://github.com/tumblr/genesis.
I read the install.md, I still don't think this really explains how to
actually make use of this in production and how the overall architecture
works? Is there any further detailed documentation you can point me to?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/tumblr/collins/issues/449#issuecomment-226508433, or mute
the thread
https://github.com/notifications/unsubscribe/AF2LSlUxcHaObO44_u__euh7rh-rxqSrks5qMWKAgaJpZM4I243x
.

Alternative you can also use my https://github.com/discordianfish/collins-pxe, if you're looking for something a) less complex but also b) less maintained ;)
That being said, this can be closed - right?

Thanks. Yes pls close.
Sent from my BlackBerry - the most secure mobile device - via the Rogers Network
Original Message
    Show Details

From<EMAIL_ADDRESS>Sent: November 23, 2016 1:28 PM
To<EMAIL_ADDRESS>Reply-to<EMAIL_ADDRESS>Cc<EMAIL_ADDRESS><EMAIL_ADDRESS>Subject: Re: [tumblr/collins] Populating Collins - How are people doing this? (#449)
Alternative you can also use my https://github.com/discordianfish/collins-pxe, if you're looking for something a) less complex but also b) less maintained ;)
That being said, this can be closed - right?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/tumblr/collins/issues/449#issuecomment-262595032, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGHAFumM7P2CjYqJWdjpFNsDB0OIHKMlks5rBIW5gaJpZM4I243x.
Alternative you can also use my https://github.com/discordianfish/collins-pxe, if you're looking for something a) less complex but also b) less maintained ;)
That being said, this can be closed - right?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/tumblr/collins/issues/449#issuecomment-262595032, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGHAFumM7P2CjYqJWdjpFNsDB0OIHKMlks5rBIW5gaJpZM4I243x.

That looks cool @discordianfish! Maybe we should add a list of links to "collins related" projects in the readme?
Anyway, good discussion! Closing now :)


Unsubmodule Ly

Hello. Ly look interesting project, but submodules and build process prevent to include Ly in official repo of some major distros, so is it possible to improve this situation? Really want to package it for Fedora. Thank you.

FYI, I've almost finished packaging it for FreeBSD (see #143), I am testing the Ly itself now.

I don't really think this would be an improvement, sorry...


[bug] Version mismatch with dask-gateway

Describe the bug
Version Mismatch is seen for dask gateway, when conda list command is executed in the jupyterlab  dask-gateway=0.6.1
is seen. which leads to issue in accessing the daskgateway.
How can we help?
This issue can be resolved by adding below entries in the qhub-config.yaml file generated by qhub init command

dask==2.30.0
distributed==2.30.1
dask-gateway=0.9.0

Your environment
This bug is seen currently:

local deployment
AWS deployment
GCP deployment

Issue with version mismatch

dask-gateway v0.6.1

After updating the qhub-config.yaml file

Hi @tarundmsharma thanks for opening this issue, it was indeed an error with the qhub-dask metapackage, by some weird issue it was not installing the correct pins for the dependencies that it was built with. But the problem was solved with #700, would you mind trying a new deployment to confirm that those errors have been corrected?

Sure @viniciusdc , Ill do it :)

AWS Testing works Fine:

GCP Testing works fine:


Linter does not work correctly on PRs

The GitHub action which runs a generic language agnostic linter doesn't work correctly on PRs.
The linter is always green on PRs but sometimes fails on main. I think this is due to the fact that the default branch is misconfigured as master instead of main. On a PR we find the following in the logs:
fatal: ambiguous argument 'master...ad4da4ce5404ab89a04299bdc9b9a71f94f9bd69': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

Problem is located here:
https://github.com/polarity-lang/polarity/blob/531d5b7df09c0820cabedbcd55ecd157a1f8c797/.github/workflows/lint.yml#L36


Sync surefire dependencies

The surefire artifact's versions were mismatched.
For some reason surefire 2.18.1 still caused issues, so I went for 2.18 instead.

@timowest I think it's wise to merge this, and then rebase all open pull requests onto the new master.

I will do the rebases later today.

It's not crucial, but it might help with possible problems.
If you want me to do anything, let me know.

I rebased the master based PR branches now.


How to restrict remote participant video when both are connect to same room?

I have integrate TwilioVideo functionality in my project.when both users connect to same room by mobile and web.Web user video displaying in mobile without accepting from web.
 var tokenUrl = "http://localhost:3000/token.php"

 // Video SDK components
 var room: Room?
 var camera: CameraSource?
 var localVideoTrack: LocalVideoTrack?
 var localAudioTrack: LocalAudioTrack?
 var remoteParticipant: RemoteParticipant?
 var remoteView: VideoView?
 var roomName = String()
var accessToken = String()

@IBAction func connect(sender: AnyObject) {
// Configure access token either from server or manually.
// If the default wasn't changed, try fetching from server.
if (accessToken == "TWILIO_ACCESS_TOKEN") {
    do {
        accessToken = try TokenUtils.fetchToken(url: tokenUrl)
    } catch {
        let message = "Failed to fetch access token"
        logMessage(messageText: message)
        return
    }
}

// Prepare local media which we will share with Room Participants.
self.prepareLocalMedia()

// Preparing the connect options with the access token that we fetched (or hardcoded).
let connectOptions = ConnectOptions(token: accessToken) { (builder) in

    // Use the local media that we prepared earlier.
    builder.audioTracks = self.localAudioTrack != nil ? [self.localAudioTrack!] : [LocalAudioTrack]()
    builder.videoTracks = self.localVideoTrack != nil ? [self.localVideoTrack!] : [LocalVideoTrack]()

    // Use the preferred audio codec
    if let preferredAudioCodec = Settings.shared.audioCodec {
        builder.preferredAudioCodecs = [preferredAudioCodec]
    }

    // Use the preferred video codec
    if let preferredVideoCodec = Settings.shared.videoCodec {
        builder.preferredVideoCodecs = [preferredVideoCodec]
    }

    // Use the preferred encoding parameters
    if let encodingParameters = Settings.shared.getEncodingParameters() {
        builder.encodingParameters = encodingParameters
    }

    // Use the preferred signaling region
    if let signalingRegion = Settings.shared.signalingRegion {
        builder.region = signalingRegion
    }

    // The name of the Room where the Client will attempt to connect to. Please note that if you pass an empty
    // Room `name`, the Client will create one for you. You can get the name or sid from any connected Room.
    builder.roomName = self.roomName
}

// Connect to the Room using the options we provided.
room = TwilioVideoSDK.connect(options: connectOptions, delegate: self)

logMessage(messageText: "Attempting to connect to room \(String(describing: self.roomName))")

}

 func prepareLocalMedia() {

// We will share local audio and video when we connect to the Room.

// Create an audio track.
if (localAudioTrack == nil) {
    localAudioTrack = LocalAudioTrack(options: nil, enabled: true, name: "Microphone")

    if (localAudioTrack == nil) {
        logMessage(messageText: "Failed to create audio track")
    }
}

// Create a video track which captures from the camera.
if (localVideoTrack == nil) {
    self.startPreview()
}
}

// Update our UI based upon if we are in a Room or not
func showRoomUI(inRoom: Bool)
 {
 self.micButton.isHidden = !inRoom
 self.disconnectButton.isHidden = !inRoom
 self.navigationController?.setNavigationBarHidden(inRoom, animated: true)
  UIApplication.shared.isIdleTimerDisabled = inRoom

 // Show / hide the automatic home indicator on modern iPhones.
 self.setNeedsUpdateOfHomeIndicatorAutoHidden()
  }

 func logMessage(messageText: String) {
NSLog(messageText)
messageLabel.text = messageText
 }

  func renderRemoteParticipant(participant : RemoteParticipant) -> Bool {
// This example renders the first subscribed RemoteVideoTrack from the RemoteParticipant.
let videoPublications = participant.remoteVideoTracks
for publication in videoPublications {
    if let subscribedVideoTrack = publication.remoteTrack,
        publication.isTrackSubscribed {
       setupRemoteVideoView()
        self.showRoomUI(inRoom: true)
        subscribedVideoTrack.addRenderer(self.remoteView!)
        self.remoteParticipant = participant
        return true
    }
}
return false
}

 func renderRemoteParticipants(participants : Array<RemoteParticipant>) {
for participant in participants {
    // Find the first renderable track.
    if participant.remoteVideoTracks.count > 0,
        renderRemoteParticipant(participant: participant) {
        break
    }
   }
 }

  func setupRemoteVideoView() {
// Creating `VideoView` programmatically
self.remoteView = VideoView(frame: CGRect.zero, delegate: self)

self.view.insertSubview(self.remoteView!, at: 0)

// `VideoView` supports scaleToFill, scaleAspectFill and scaleAspectFit
// scaleAspectFit is the default mode when you create `VideoView` programmatically.
self.remoteView!.contentMode = .scaleAspectFill;

let centerX = NSLayoutConstraint(item: self.remoteView!,
                                 attribute: NSLayoutConstraint.Attribute.centerX,
                                 relatedBy: NSLayoutConstraint.Relation.equal,
                                 toItem: self.view,
                                 attribute: NSLayoutConstraint.Attribute.centerX,
                                 multiplier: 1,
                                 constant: 0);
self.view.addConstraint(centerX)
let centerY = NSLayoutConstraint(item: self.remoteView!,
                                 attribute: NSLayoutConstraint.Attribute.centerY,
                                 relatedBy: NSLayoutConstraint.Relation.equal,
                                 toItem: self.view,
                                 attribute: NSLayoutConstraint.Attribute.centerY,
                                 multiplier: 1,
                                 constant: 0);
self.view.addConstraint(centerY)
let width = NSLayoutConstraint(item: self.remoteView!,
                               attribute: NSLayoutConstraint.Attribute.width,
                               relatedBy: NSLayoutConstraint.Relation.equal,
                               toItem: self.view,
                               attribute: NSLayoutConstraint.Attribute.width,
                               multiplier: 1,
                               constant: 0);
self.view.addConstraint(width)
let height = NSLayoutConstraint(item: self.remoteView!,
                                attribute: NSLayoutConstraint.Attribute.height,
                                relatedBy: NSLayoutConstraint.Relation.equal,
                                toItem: self.view,
                                attribute: NSLayoutConstraint.Attribute.height,
                                multiplier: 1,
                                constant: 0);
self.view.addConstraint(height)
}

this is my publication response
trackSid: MTb80db34080ec204bd978608425dd3bad
trackName: 45339dcc-1ab8-4044-85c8-981d9d8a0229
isEnabled: YES
I don't want to show remote participant video directly to mobile.I want to show when remote participant accept from web.

Hey @mouli457,

I don't want to show remote participant video directly to mobile.I want to show when remote participant accept from web.

If you are accepting the web Participant after they are in the Room, then the web Participant should not publish tracks until they accept. The iOS app can just wait for the subscription callbacks as usual.
Best,
Chris

func didSubscribeToVideoTrack(videoTrack: RemoteVideoTrack, publication: RemoteVideoTrackPublication, participant: RemoteParticipant) {
// The LocalParticipant is subscribed to the RemoteParticipant's video Track. Frames will begin to arrive now.
    logMessage(messageText: "Subscribed to \(publication.trackName) video track for Participant \(participant.identity)")

    if (self.remoteParticipant == nil) {
        _ = renderRemoteParticipant(participant: participant)
    }
}

when remote participant join room above method was calling and getting tracksid,trackname and isenable(as YES).

Hey @mouli457,

when remote participant join room above method was calling and getting tracksid,trackname and isenable(as YES).

Yes, that's why I suggested changing your JavaScript application which controls the RemoteParticipant. Have you had a chance to try the code snippet where the JavaScript Participant publishes after connecting to the Room  (https://github.com/twilio/video-quickstart-ios/issues/530#issuecomment-663164642)?
Best,
Chris

Closing an old ticket but feel free to reopen or file another if you run into any issues.

Closing an old ticket but feel free to reopen or file another if you run into any issues.


Uncaught ReferenceError: your_user_id is not defined

using this minimal init code:
const tagManagerArgs = {
  gtmId: "GTM-XXXXXX", // <- with a valid gtm id
}

TagManager.initialize(tagManagerArgs);

produce the following error:
Uncaught ReferenceError: your_user_id is not defined

Just found was using Hotjar and it was requiring some user id under "your_user_id" variable and this has no relation with this module. closing this issue.


Add example for sqlpackage extract

Add an example usage of sqlpackage extract to create a schema-only .dacpac

@sredman : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@sredman : Thanks for your contribution! The author(s) have been notified to review your proposed change.

#sign-off

@ktoliver : Thanks for your contribution! The author(s) have been notified to review your proposed change.


Ruby 3.2 removed Object#=~ making it impossible to write Date objects

Reproduction steps:
require 'write_xlsx'
require 'date'

workbook = WriteXLSX.new(StringIO.new)
worksheet = workbook.add_worksheet
worksheet.write(0, 0, Date.today)

This works on 3.1, but on 3.2 fails with the following error:
irb(main):006:0> worksheet.write(0, 0, Date.today)
/Users/grk/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/write_xlsx-1.10.1/lib/write_xlsx/worksheet.rb:909:in `write': undefined method `=~' for #<Date: 2023-02-15 ((2459991j,0s,0n),+0s,2299161j)> (NoMethodError)

I guess the fix would be the same as with https://github.com/cxn03651/write_xlsx/commit/345adae664d8aebfeb9554cb311cfb88920174f6

Thank you for your report.
fixed version v1.10.2 will be released soon.
FYI:
We have Worksheet#write_date_time method which can write date/time in several format.
see https://cxn03651.github.io/write_xlsx/worksheet.html#write_date_time

Thank you so much for fixing this bug. It was frustrating to encounter this strange error when running my program. Fortunately the fix was simple: bundle update write_xlsx.


std.digest.package: fix slicing of temp array

This is no longer allowed, per https://github.com/dlang/dmd/pull/7110 which this blocks.

The above is similar to the C++ rule for extending rvalue lifetime:

It's fundamentally unsafe AFAIK.

It's fundamentally unsafe AFAIK.

Yes, but only in C++. In Rust, for example, this is completely safe, AFAIK. I think we can make it safe in D too if we simply infer the result as scope.

I just thought about @ZombineDev solution and it seems this is a good solution which

Keeps old, correct code working (code which already keeps the slice variable scope-local will continue to work)
Disallows incorrect code (the slice variable is marked scope, so it can't escape)
Is consistent with other language features, this is currently valid D code:char[16] helper() @safe
{
    char[16] data;
    return data;
}

string foo() @safe
{
    // step 1: value types without indirections implicitly convert to `const` or `immutable`
    // already implemented!
    immutable(char)[16] data = helper();
    // step 2: slicing local static array variables is allowed and the result is inferred as `scope`.
    // already implemented!
    string s = data;
    // Error: scope variable s may not be returned
    // just as expected!
    return s;
}

So we really just need DMD to recognize the combined pattern and do the lowering.

I also agree @ZombineDev's solution looks good if we can pull it off.

Looking at Walter's comments in the other PR, I think we are better off just deprecating, and changing the example here to reflect that instead of making an exception for static arrays.

What’s the status of this? Can we merge as is?

I'm a bit confused about what actually happens. I noted this earlier:

In fact, I wouldn't be surprised at all if in the prior version of the code, hex1, hex2, and hex3 all point at the same data.

I tested, and in fact, the pointers of the arrays are all correct, pointing at data on the stack that is reserved for each of the "temporary" static arrays.
Is the compiler already doing what @ZombineDev suggested?

BTW, I'm ok with merging this as is. Whether the fact that it worked was a happy accident or not, I think it's likely the noted examples would not work if the compiler was aggressive in how it laid out the stack.

@WalterBright Unblocked.
Needs a force push to retry Jenkins?

Needs a force push to retry Jenkins?

You can simply login via GitHub ("Login" button is on the the top right). Afterwards, you can restart jobs there.


Add missing texture parameter values

GL_NEAREST is particularly important to prevent bilinear filtering on textures, if necessary

Thanks for adding these, @kitten !
CI failure doesn't look related to this - it seems somehow we're not getting the OpenGL libs to link against in the CI environment. Looking into it-

Somehow the packages we need changed! Not sure if Azure CI changed the version of Ubuntu, or something else changed... but updated in master and merged in.
Should be good to go now 😄


doc: IK-TWT-386-first-link-changed

What does this fix or implement?

Checklist

[ ] PR name added as appropriate (e.g. feat:/fix:/doc:/test:/refactor:)
[ ] Tests added or updated
[ ] Documentation updated
[ ] Changelog updated and version incremented (label: upcoming release)
[ ] Github Issue linked if any
[ ] Jira task updated

Thanks. One thing, we usually give more descriptive names to PRs


GitLab CI/CD intergration faied

Describe the bug
A clear and concise description of what the bug is.
i followed the instuctions ( https://hub.armosec.io/docs/gitlab ) to to integrate Kubescape to GitLab CI.
failed with bash: line 66: /usr/local/bin/kubescape: No such file or directory
Any help?

Thank for reporting this. It seems like the downloaded Kubescape binary cannot be saved in the path.
How about opening a feature request for creating a Kubescape GitLab job (similar to the Kubescape GitHub actions)

I did

https://github.com/kubescape/github-action/issues/12

Hi. I ran into the same issue. For now it seems that alpine does not pick up the kubescape binary for some reason. Maybe the binary is not in the correct format?
This has worked for me in the meantime:
kubescape:scan:
  image: ubuntu:latest
  needs: []
  script:
    - apt-get update && apt-get install curl -y
    - curl -s https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | bash
    - kubescape scan .

If I may chime in here - the binary gets downloaded all right, the problem lies within the way it seems to be built. It tries to dynamically link libraries which are not installed on Alpine based images by default. You can verify this like so
❯ docker run -it --rm bash:latest bash
bash-5.2# apk add curl
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/community/x86_64/APKINDEX.tar.gz
(1/5) Installing ca-certificates (20220614-r0)
(2/5) Installing brotli-libs (1.0.9-r6)
(3/5) Installing nghttp2-libs (1.47.0-r0)
(4/5) Installing libcurl (7.83.1-r4)
(5/5) Installing curl (7.83.1-r4)
Executing busybox-1.35.0-r17.trigger
Executing ca-certificates-20220614-r0.trigger
OK: 9 MiB in 22 packages
bash-5.2# curl -s https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | bash
Installing Kubescape...

######################################################################## 100.0%

Finished Installation.

bash: line 66: /usr/local/bin/kubescape: cannot execute: required file not found
bash-5.2# ldd $(which kubescape)
        /lib64/ld-linux-x86-64.so.2 (0x7f2caf61e000)
        libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7f2caf61e000)
        libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x7f2caf61e000)
        libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f2caf61e000)
Error relocating /usr/local/bin/kubescape: __fprintf_chk: symbol not found
Error relocating /usr/local/bin/kubescape: __memcpy_chk: symbol not found
Error relocating /usr/local/bin/kubescape: __vfprintf_chk: symbol not found
Error relocating /usr/local/bin/kubescape: __vsnprintf_chk: symbol not found
Error relocating /usr/local/bin/kubescape: __strncpy_chk: symbol not found
Error relocating /usr/local/bin/kubescape: __snprintf_chk: symbol not found
Error relocating /usr/local/bin/kubescape: __printf_chk: symbol not found
bash-5.2#

Installing gcompat fixes this issue, so a working GitLab job definition should look something like this:
scan-job:
  stage: scan
  image: bash:5.2.15@sha256:d2daf13cf80f3743960e3a5b64e66f0e7fcc904369eca3b94dc83c638a6595aa
  script:
  - apk add curl gcompat
  - curl -s https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | bash
  - kubescape scan .

Install the gcompat package as demonstrated  here.
The documentation has been updated as well.


Size of message problems with hopskotch?

When trying to push through the timing tier messages, we got some kafka warnings suggesting that we were trying to jam through too much.
We need to replicate that with a well-specified test case, collect the exact error message, and take it to SCIMMA to see what they think is happening.

It would be good to know which error was thrown. Does anyone have a log file?
I suspect this is unrelated, but just in case, scimma included a bug fix in hop-client v0.9.0 (snews_pt uses v0.8.0) for when hopskotch expects JSON data but receives a binary data instead and chokes.
https://github.com/scimma/hop-client/pull/198

I have an idea for a solution.
According to Kafka documentation, there is a maximum message size of 1,048,588 bytes (~1 MB), but it is configurable.
For the example that @KaraMelih mentioned in PR #98 of 100,000 integers, the size of those integers are 800,056 bytes, which is less that the threshold above, but we're sending multiple SNEWS messages in one go, so it quickly adds up.
There are multiple paths in between SNEWSMessageBuilder and kafka, which looks like this:
snews_pt.messages.SNEWSMessageBuilder.send_messages
└── snews_pt.messages.Publisher.send
    └── hop.io.Stream.open
        └── hop.io.Stream.Producer
            └── adc.producer.ProducerConfig

That last class—adc.proder.ProducerConfig—takes message_max_bytes as a keyword argument, and the methods in the aforementioned chain starting at hop.io.Stream.open pass **kwargs the rest of the way down.
So... We should be able to increase the maximum message size by passing the kwarg into here: https://github.com/SNEWS2/SNEWS_Publishing_Tools/blob/f9b990aea4a63d989b46307febbf9c2f1a354574/snews_pt/messages.py#L51-L53
This would be the appropriate change (for 5x max message size):
self.stream = Stream(until_eos=True, auth=self.auth).open(
    self.obs_broker,
    'w',
    message_max_bytes=5242940  # <--- New
)

I have not tested this yet.

The scimma people report that the default max message size is 1MB. They're leery to increase that to head off future scaling problems, and are working on a large file offload service. But: now knowing this we can plan for it, with efficiencies like this PR helping. Could imagine daisy-chaining things together like SMS messages that go over 140 characters, too.

We were just discussing this now.
If raising the infrastructure limit is the answer (we need to test this), then can we raise it enough to solve the problem?  If not, then we'd need to "packetize" things anyway.  If we have to write that code, then living within our 1MB per packet means is probably the way to go.
Marta says about 1s of data in the last test fit in the 1MB.  So we'd need an order of magnitude more overhead to make ~10s of light curve go in one shot.

We should in any case, warn the user about the large message size and what we do to process. Something like; "Input data is larger than >1mb, we will chunk it into pieces and send several messages" etc. So that if something goes wrong, it is more obvious where it might have gone wrong.
Alternative to chunking, @justinvasel looked into compression options. We should probably check if kafka offers any of these internally. Then, we also need to validate whatever chunked/compressed gets unchunked/decompressed properly on the other end.