feat: update OQpy to version 0.3.3

Issue #, if available:
OQpy pushed some bug fixes that will be needed for future features such as in-place modification of pulse sequences.
With the new version of OQpy, we could support parametric pulse sequence (especially with duration types where OQpy support notations such (c) * 1s out of the box.
Description of changes:

update oqpy to 0.3.3
fix how free parameters with delays are being handled
update tests to match new duration variable printing

Testing done:
Ran the test suite.
Merge Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.
General

[x] I have read the CONTRIBUTING doc
[x] I used the commit message format described in CONTRIBUTING
[x] I have updated any necessary documentation, including READMEs and API docs (if appropriate)

Tests

[x] I have added tests that prove my fix is effective or that my feature works (if appropriate)
[x] I have checked that my tests are not configured for a specific region or account (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Yes, let's backport the changes from @ajberdy's updates. This is also blocking the fix for #828
I have reviewed most of the changes here and can take another look once those changes have been merged.


Paging menu items are not centered initially

I initialized a FixedPagingViewController with two controllers, both with icons. I setup everything inside of viewDidLoad but then I noticed that they are not centered correctly. They only are properly centered after clicking on the other icon or swiping to the other tab. Is this possible a bug? or am I just using it incorrectly
How it looks Initially

After switching to another tab

Now you can see it is properly centered

Thanks!

Hmm, seems to work just fine here. What options are you using?

here's my options
struct CustomPagingMenuTheme: PagingTheme {
    let font: UIFont = Constants.ThemeColors.tabBarFont!
    let textColor: UIColor = Constants.ThemeColors.tabBarColor
    let selectedTextColor: UIColor = Constants.ThemeColors.tabBarColorActive
    let backgroundColor: UIColor = .white
    let headerBackgroundColor: UIColor = .white
    let indicatorColor: UIColor = Constants.ThemeColors.tabBarColorActive
    let borderColor: UIColor = .clear
}

struct HomePagingMenuOptions: PagingOptions {
    var menuItemClass: PagingCell.Type {
        return IconPagingCell.self
    }

    var menuItemSize: PagingMenuItemSize {
        return .fixed(width: 150, height: 50)
    }

    var menuHorizontalAlignment: PagingMenuHorizontalAlignment {
        return .center
    }

    var menuInteraction: PagingMenuInteraction {
        return .none
    }

    let theme: PagingTheme = CustomPagingMenuTheme()
}

here's how I use it
override func viewDidLoad() {
        super.viewDidLoad()
        let first = PresetsViewController.instance()
        let second = ActiveClassViewController.instance()

        pagingMenuVC = FixedPagingViewController(viewControllers: [
            first,
            second], options: HomePagingMenuOptions())

        addChildViewController(pagingMenuVC)
        view.addSubview(pagingMenuVC.view)
        view.constrainToEdges(pagingMenuVC.view)
        pagingMenuVC.didMove(toParentViewController: self)
    }

Weird, just tried it out with exactly those options and it still works. Which version of Parchment and iOS are you using?

iOS 11 and i'm using the latest version. Could it be because I'm possibly using a custom tab bar controller ? where the first tab is pretty much this paging menu controller? It seems to be working when I switch to another tab (i have other tabs that are using this library, they seem to be working but not on the first tab).

Just tried to wrap this in a UITabBarController, but it still works just fine. Are you doing anything else that might affect how the view is displayed?

Unfortunately no, that's the entire code pretty much that I posted (aside from the custom tab bar). All I do is initialize the the paging menu controller and in the child view controllers they have zero logic in them at all. Basically just a view with text in the middle.

Sure, that might be helpful

Thanks for the quick replies, here's my code below for the custom tab bar maybe it is the cause of all of it, however, i'm not sure why.

class CustomTabBarController: UIViewController {

    @IBOutlet weak var contentView: UIView!

    @IBOutlet var tabButtons: [UIButton]!

    @IBOutlet var tabActiveBorder: [UIView]!

    var tabControllers: [UIViewController]!
    var selectedIndex: Int = 0

    class func instance()->UIViewController{
        let controller = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "TabBarController")
        return controller
    }

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        tabControllers = [
            HomeViewController.instance(),
            StatsViewController.instance(),
            ScheduleViewController.instance(),
            ClassesViewController.instance(),
            MoreViewController.instance()
        ]

        setButtonSelected(button: tabButtons[selectedIndex], bar: tabActiveBorder[selectedIndex])
        didPressTab(tabButtons[selectedIndex])

    }

    @IBAction func didPressTab(_ sender: UIButton) {
        let previousIndex = selectedIndex
        selectedIndex = sender.tag

        setButtonUnselected(button: tabButtons[previousIndex], bar: tabActiveBorder[previousIndex])
        let previousVC = tabControllers[previousIndex]
        previousVC.willMove(toParentViewController: nil)
        previousVC.view.removeFromSuperview()
        previousVC.removeFromParentViewController()

        setButtonSelected(button: sender, bar: tabActiveBorder[selectedIndex])

        let currentVC = tabControllers[selectedIndex]
        addChildViewController(currentVC)
        currentVC.view.frame = contentView.bounds
        contentView.addSubview(currentVC.view)
        currentVC.didMove(toParentViewController: self)
    }

    func setButtonSelected(button: UIButton, bar: UIView) {
        button.isSelected = true
        button.tintColor = Constants.ThemeColors.bottomNavBarIconActive
        button.isUserInteractionEnabled = false

        bar.isHidden = false
    }

    func setButtonUnselected(button: UIButton, bar: UIView) {
        button.isSelected = false
        button.tintColor = Constants.ThemeColors.bottomNavBarIcon
        button.isUserInteractionEnabled = true

        bar.isHidden = true
    }

}

i left out some small bits of code, but nothing related to changing views

When you call didPressTab: from viewDidLoad the contentView bounds will be .zero.  Could it have something to do with the frame not being configured correctly? Are you setting the frame somewhere else as well?

That might be it, I tried moving the call to didPressTab to viewDidAppear instead and the tabs were centered correctly but I can't put it in viewDidAppear because then they views inside that need to draw themselves will be drawn late and the user will see it being transitioned from incorrect to correct. Not sure what's the best solution here, what do you recommend? Thanks!

I would try to constrain the view using auto layout. That way the frame will be correct when the view appears, and it will also support transitioning to other sizes. Another option is to store the currently visible view as a property and set the frame in viewWillLayoutSubviews.

I decided to constrain it to the edges instead like you said, seems to have worked but now for some reason the first page in the Parch page controller frame seems to be wrong and only seems to be correct when I leave the page and come back. I printed out the frame of the page in viewDidAppear to ensure that I was properly getting the frame and I got (750.0, 0.0, 375.0, 667.0) and then after I went to another tab and came back i got (0.0, 0.0, 375.0, 503.0). So all views that in that first page are not properly set because of the different frame. Why is it a different frame randomly?

Is it one of the views inside FixedPagingViewController or pagingMenuVC.view that has the wrong frame? And are the initial menu items layout out correctly now?
You can select other items by calling selectPagingItem: with the item that you want to select. The items are available in the items property on FixedPagingViewController. Let's say you want to select the last one you could do:
if let lastItem = pagingMenuVC.items.last {
    pagingMenuVC.selectPagingItem(lastItem)
}

One of the views inside of FixedPagingViewController to be more specific here is my code once again that shows how I initialize
let first = PresetsViewController.instance()
        let second = ActiveClassViewController.instance()

        pagingMenuVC = FixedPagingViewController(viewControllers: [
            first,
            second], options: HomePagingMenuOptions())

        addChildViewController(pagingMenuVC)
        containerView.addSubview(pagingMenuVC.view)
        containerView.constrainToEdges(pagingMenuVC.view)
        pagingMenuVC.didMove(toParentViewController: self)

inside of PresetsViewController I print out the frame in viewDidAppear and the frame is incorrect initially
also thanks for the code for switching to another item! Appreciate it a lot

Hmm, that's odd. Is the view for pagingMenuVC.view correct?

Not sure, how would I go about making sure that it's correct?

You can just print out pagingMenuVC.view.frame like you did with the other views. Just curious to see if the FixedPagingViewController itself is displayed correctly.

I printed out the frame in viewDidAppear in the view controller I initialized it in and I got (0.0, 0.0, 375.0, 553.0) it seems to be correct. the viewDidAppear for PresetsViewController runs before the viewDidAppear where I print out the frames of pagingMenuVC. Not sure if that helps or not

Sorry, I'm struggling to get this reproduced and it's not really obvious to me what would cause this.

I was finally able to fix it. I initialized it in viewWillLayoutSubviews instead of viewDidLoad and viewDidAppear. It's working perfectly now in iOS11 but for some reason it's not working in iOS9. It's having the same sort of effect. (will be testing it in iOS10 shortly)

Hi! Sorry for the late response. Are you still seeing the bug with iOS 9? If that's the case, are you able to create a minimal bug report that re-reproduces the issue?

Closing this for now, but feel free to open if you're able to reproduce this!


Build precompilation 1.10 error in custom Module/Theme

Build precompilation don't copy content from src\Orchard.Web\InnoLine\Modules and src\Orchard.Web\InnoLine\Themes
copy only web.config

Precompilation is not supported by Orchard as it doesn't find and compile all sub-modules.


dev(narugo): use both cpu and cuda provider when creating onnx session

Codecov Report

Merging #42 (0f6f981) into main (17df867) will decrease coverage by 0.07%.
The diff coverage is 80.00%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
@@            Coverage Diff             @@
##             main      #42      +/-   ##
==========================================
- Coverage   98.83%   98.76%   -0.07%
==========================================
  Files          52       52
  Lines        1379     1382       +3
==========================================
+ Hits         1363     1365       +2
- Misses         16       17       +1

Flag
Coverage Δ

unittests
98.76% <80.00%> (-0.07%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files
Coverage Δ

imgutils/utils/onnxruntime.py
76.19% <80.00%> (-0.74%)
:arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


adding flexibility for attaching alexa-app to express

change alexa.express()
so that it takes either an express app or router and attach alexa-app to it under given endpoint.
leave the logic of binding router to app out of the scope of alexa-app/alexa.express()

This looks right to me, but I have this feeling that we're missing something, cc: @tejashah88.
@bgjehu Try this against alexa-app-server please, any failing tests?
The PR needs to be rebased, and see my minor comment on CHANGELOG above.
Please add a paragraph to UPGRADING wrt what one should do if they specified both express app and router before.

Looks great so far, except for that endpoint does not have any normalization (i.e. ////test is valid).
@bgjehu I've submitted PR #180, which adds a bunch of utility functions, one of which includes a function to normalize the final endpoint result.

@dblock I will work on better explanation on CHANGELOG.md, work on testing with alexa-app-server and  updating UPGRADING.md
@tejashah88 I will add the usage of normalization

@dblock @tejashah88

clarified changes in CHANGELOG.md
added normalization of param 'endpoint' for alexa.express() with util fn
added upgrading guide for ExpressJS support in UPGRADING.md

not related to the commit, I testedthe new logic with alexa-app-server, swap the alexa-app node_module to my folk for all the examples (including the invalid ones), all test passed. However, not changing anything in alexa-app-server for its package.json is point to<EMAIL_ADDRESS>instead of 4.0.0. I would apply the associated changes to alexa-app-server once it starts pointing to<EMAIL_ADDRESS>

How do all our alexa-app-server tests pass when we're no longer attaching the router to the express instance? :)

I had made related changes in alexa-app-server/index.js as well before I ran the test. They didn't just pass without changes for the usage of alexa.express() would be different.

I made some comments. Sorry to be a pest, I want to make sure we don't break a bunch of users.

backward compatible tested with alexa-app-server

@dblock @tejashah88
Backward compatible tested with alexa-app-server

I'm going to merge this, nice work on a spec, too!
I'd appreciate a follow-up pull request that:

Deletes unused functions in utils.
Slightly tweaks UPGRADING to say that the behavior with both is deprecated rather than removed.

@tejashah88 Interested in cutting a minor release with this change?

@dblock there is unused functional in utils? I saw the coverage for utils.js is 100%
will tweaks UPGRADING

coverage means there're tests, but half the functions in utils aren't actually used, eg. isValidDirectory.

right right right, silly me. I will double check and remove the unused

@dblock We can do a release, however the CHANGELOG states that version 3.1.2 should be released today.

We should either go to 3.1.1 or 4.0.0, or wait until all relevant PRs are merged before deciding.

The CHANGELOG is wrong, it shouldn't have been updated. The current release is still 3.1.0.


[1.19.2] Crash, probably incompatibility with effective

https://pastebin.com/RuEJ6bxL

Hello - Late response man here, I believe this is a Effective crash being falsely blamed on Biome Makeover for some weird reason.
We're not supporting 1.19.2 anymore, but I'd suggest trying without Biome Makeover, if it still happens, it's not BM.
If it does still happen it likely is some compatibility issue.
If you can recreate this on 1.19.4+ please let me know.


SMTP binding doesn't allow send mail with a SMTP server without auth

Expected Behavior

Allow config SMTP binding without user and password in order to use a SMTP server without authentication by user and password
Actual Behavior

SMTP binding requires always to provider and user and password to authenticate with a SMTP server
Steps to Reproduce the Problem

Release Note

RELEASE NOTE: FIX allow setup SMTP binding without user and password

/assign


Why "directory completion (cd **)" and "cd key binding (ALT-C)" has different finding strategy?

[x] I have read through the manual page (man fzf)
[x] I have the latest version of fzf
[x] I have searched through the existing issues

Info

OS

[x] Linux
[ ] Mac OS X
[ ] Windows
[ ] Etc.

Shell

[ ] bash
[ ] zsh
[x] fish

Problem / Steps to reproduce
In completion.xsh, the default finding command is:
command find -L "$1" \
    -name .git -prune -o -name .hg -prune -o -name .svn -prune -o -type d \
    -a -not -path "$1" -print 2> /dev/null | sed 's@^\./@@'

In my opinion, Its purpose is to skip common version control directories.

On the other hand, the default finding command in key-bindings.xsh is:
command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
    -o -type d -print 2> /dev/null | cut -b3-

In my opinion, Its purpose is to skip hidden directories and common virtual file systems directories.

I thought they are quite similar features, but their finding strategy is very different.
What is the reason for this different behavior? Thanks!

Hmm, I don't have a good answer. It doesn't look like there's an inherent reason they should differ. They seemed to have gotten out of sync at some point. Probably an oversight.
This is an old PR that changed key-bindings, but not completion.

https://github.com/junegunn/fzf/commit/53d5d9d1624d23175eca4c1e1bd93bbbb7b41b0c

Thanks for the quick reply and PR information.  😆
Do you think it is worth to sync these two commands? Maybe a new env variable FZF_FIND_DIR_COMMAND which has a placeholder $1 to accept a base search path (default value is '.')
For compatibility, it can use some expansion syntax like this: ${FZF_FIND_DIR_COMMAND:-${FZF_ALT_C_COMMAND:-"command find -L . ......"}}.
In this way, it can maintain consistence between these commands and provide users more flexibility to change default command in _fzf_compgen_dir()

Yes, it would be nice to update the command for directory completion. But a static command set via a configuration variable won't work as it can't handle the completion prefix. e.g. cd ~/**<tab> or cd /tmp/**<tab>, etc, and that's why we resort to _fzf_compgen_dir function.

@kevin61416 Good point! I wrote a simple demo (#2721), which introduces a new _fzf_find_dir function to handle both completion with prefix and ALT-C Key Binding simply without breaking compatibility.
@junegunn
For compatibility, this function (i.e., _fzf_find_dir) only works when users have provided it. At present, I have written ZSH version only. If you accept this proposal, I can help write other shells one.
Thanks 😀

Yes, it would be nice to update the command for directory completion. But a static command set via a configuration variable won't work as it can't handle the completion prefix (e.g. cd ~/**<tab> or cd /tmp/**<tab>, etc), and that's why we resort to _fzf_compgen_dir function with $1 being the base directory.

How about fzf doing cd first, and then invoke the user provided command?
Building upon @kevin61416's suggestion: CDPATH= cd "${1:-.}" && ${FZF_FIND_DIR_COMMAND:-${FZF_ALT_C_COMMAND:-"command find -L . ......"}}

Alternatively, we could use an unexpanded variable, like documented here: https://github.com/junegunn/fzf/#fish-shell

Closing as we're now using fzf's built-in walker instead of find command.


'$prime' suffix no longer seems to work

exports["on'"] would also work, for future reference :)

This has been fixed in the latest master. Thanks anyway!


This does not seem to work for "May the force be with you". But my testing shows it to be correct in the result window of 5.

Challenge Find the Longest Word in a String has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:
var longestLength = 0;
function findLongestWord(str) {
    var res = str.split(" ");
  var arrayLength = res.length;
for (var i = 0; i < arrayLength; i++) {
    if (res[i].length > longestLength){
          longestLength = res[i].length;
    }
}
return longestLength;

    //Do something
}

findLongestWord("May the force be with you");

Global variables are bad. Think through what your code does if it is run twice. Thanks and happy coding!

Thank you.  I just moved the variable to inside of the function.  Lesson
learned.  Thanks again.
Sent with AquaMail for Android
http://www.aqua-mail.com
On 7 March 2016 01:49:35 Logan Tegman<EMAIL_ADDRESS>wrote:

Global variables are bad. Think through what your code does if it is run
twice. Thanks and happy coding!

Reply to this email directly or view it on GitHub:
https://github.com/FreeCodeCamp/FreeCodeCamp/issues/7441#issuecomment-193041945


Release 1.3.0

• Fixed option naming, now it's track_null_params
• Added a check for current_session value to keep the paramaters during the session
Waiting for a confirmation about docs.

To clarify, how about these requirements for this PR?

Keep the same behavior, i.e. use '' (empty string) in form field if a UTM value is not available.
Reset UTM values at the end of session if reset_params_at_session_end is set to true.

To clarify, how about these requirements for this PR?

Keep the same behavior, i.e. use '' (empty string) in form field if a UTM value is not available.
Reset UTM values at the end of session if reset_params_at_session_end is set to true.

Done. Let me know if everything is ok for you.


Python eRPC nested call

Dear eRPC team,
Thanks for the great job.
I am trying python nested eRPC call, but it seems this funtion is not implemented.
Is there a plan to develop such feature in python?
If not, do you have any suggestion on porting this feature from C++ to python?
Thanks

Hi @Davy4fg , currently this is not on my list. In C i did it a bit complicated to save memory, code, ... In python i think it can be done easier, but i would need think what is the best way. Feel free to suggest something.

Hi @Hadatko, thanks for the feedback.
After add a m_server in Class ClientManager and let m_server to run in the end of function perform_request, the nested call is working. My problem now is how to seperate the nested call and non-nested call functions, then to decide whether m_server need to run in the end of function perform_request. Do you have any suggestions?

Well i am thinking if you can do it by analyzing callstack.

you mean user maintain a list containing the nested calls, and analyze callstack if match to any item of this list?

I was thinking something like this. If we can find that the eRPC client call is called inside Server then it is nested call....
import traceback
from inspect import getframeinfo, stack

def b():
    print(traceback.extract_stack()[1].name == "a")

    print(getframeinfo(stack()[1][0]).function=="a")

def a():
    b()

a()

Could you share your changes? I am happy that you have working solution.


Validating inheritance between the session backend that uses the database and the django SESSION_ENGINE configuration.

The django.contrib.sessions.backends.cached_db backend uses the same settings as django.contrib.sessions.backends.db but uses an additional cache. The tests were performed without failure and it appears that the cache does not generate side effects when changing between sessions.

Need more testing.


Slack notification

Signed-off-by: Pranav Singh<EMAIL_ADDRESS>Description
It fixes the slack notification for new stargazers on this repo.
This PR fixes #
Notes for Reviewers
Signed commits

[x] Yes, I signed my commits.

I'll do it.
But I'm afraid, I cannot understand what you meant by github.actor and other items should be included 😅
I believe that those items are already there on line 16. Please correct me if I'm wrong. Actually I'm still exploring these terminologies.

@theBeginner86 review this line - https://github.com/meshery/meshery/blob/080ee07c1ffe306cef90b5e6a86d0229a23f27ce/.github/workflows/slack.yml#L17

Thanks @leecalcote for providing that link
I still couldn't find what is missing 😨
For your reference:

Screenshot of my change:

Screenshot of the file your shared:

I still believe that the line 16 on file of this PR and last line on file you shared are similar(only repo links and names are different).

@theBeginner86, you're right. Of the item that I described, that concern is already addressed and needs no change here. 👍
I do have another ask to consider: using a variable for the repo name, so that this same slack.yaml workflow can be exactly the same across all repos. (e.g. GITHUB_REPOSITORY) - https://docs.github.com/en/actions/learn-github-actions/environment-variables. If you would like to undertake this, will you crack open a new issue?


1.23 30 docs<PHONE_NUMBER>

Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/unhold
/lgtm
/approve


Build failure on OpenBSD

$ gmake VERBOSE=1
compile src/core.c => build/debug/src/core.lo
cc -Wall -Wextra -Wconversion -Wstrict-prototypes -pedantic -std=c99 -O0 -ggdb -DDEBUG -c src/core.c -fPIC -DPIC -o build/debug/src/.libs/core.o
src/core.c: In function 'mpack_rtoken':
src/core.c:176: warning: passing argument 1 of 'mpack_byte' with different width due to prototype
src/core.c:179: warning: passing argument 2 of 'mpack_blob' as unsigned due to prototype
src/core.c:182: warning: passing argument 2 of 'mpack_blob' as unsigned due to prototype
src/core.c:185: warning: passing argument 2 of 'mpack_blob' as unsigned due to prototype
src/core.c:189: warning: passing argument 1 of 'mpack_byte' with different width due to prototype
src/core.c:191: warning: passing argument 1 of 'mpack_byte' with different width due to prototype
src/core.c:193: warning: passing argument 1 of 'mpack_byte' with different width due to prototype
src/core.c:244: warning: passing argument 1 of 'mpack_byte' with different width due to prototype
src/core.c: In function 'mpack_rvalue':
src/core.c:273: warning: passing argument 1 of 'mpack_byte' with different width due to prototype
src/core.c: In function 'mpack_wtoken':
src/core.c:333: warning: passing argument 3 of 'mpack_w1' as unsigned due to prototype
Assembler messages:
FATAL: can't create build/debug/src/.libs/core.o: No such file or directory
Error while executing cc -Wall -Wextra -Wconversion -Wstrict-prototypes -pedantic -std=c99 -O0 -ggdb -DDEBUG -c src/core.c -fPIC -DPIC -o build/debug/src/.libs/core.o
gmake: *** [Makefile:147: build/debug/src/core.lo] Error 2

This is today's master, gcc-4.2.1 on OpeBSD-current.
In case this is an issue with the older gcc, I tried with 4.9.4:
$ CC=egcc gmake VERBOSE=1
compile src/core.c => build/debug/src/core.lo
egcc -Wall -Wextra -Wconversion -Wstrict-prototypes -pedantic -std=c99 -O0 -ggdb -DDEBUG -c src/core.c -fPIC -DPIC -o build/debug/src/.libs/core.o
Assembler messages:
FATAL: can't create build/debug/src/.libs/core.o: No such file or directory
Error while executing egcc -Wall -Wextra -Wconversion -Wstrict-prototypes -pedantic -std=c99 -O0 -ggdb -DDEBUG -c src/core.c -fPIC -DPIC -o build/debug/src/.libs/core.o
gmake: *** [Makefile:147: build/debug/src/core.lo] Error 2

I don't know what this error means. A quick search suggests it is a compiler bug that has long been fixed(ref), so I'm not sure why you are seeing it on gcc 4.9.4.


Multi-line description on helm chart causes formatting issues after synth

Description of the bug:
I have found, when using the OpenEBS helm chart and enabling LVM, that something to do with multiline descriptions and single quotes formatting is causing the synth'd chart to be malformed. I've not been able to pin it down the cause, though.
Reproduction Steps:
cdk.json
language: typescript
app: npx ts-node ./src/main.ts
imports:
  -<EMAIL_ADDRESS>
chart:
import { Openebs } from "./imports/openebs";
class Storage extends Chart {
  constructor(scope: Construct, name: string) {
    super(scope, name);

    // new Minio(this, "operator");
    // new Tenant(this, "tenant");
    new Openebs(this, "openebs", {
      values: {
        "lvm-localpv": {
          enabled: true
        }
      }
    });
  }
}

pnpm run synth
Notice in synth'd output, the multi-line hasn't been parsed correctly, example:
properties:
  message:
    description: message is a string detailing the encountered erro
    during snapshot creation if specified. NOTE: message may be
    logged, and it should not contain sensitive information.' type: string

Error Log:
Error from server (BadRequest): error when creating "./dist/0001-storage.k8s.yaml": CustomResourceDefinition in version "v1" cannot be handled as a CustomResourceDefinition: strict decoding error: unknown field "spec.versions[0].schema.openAPIV3Schema.properties.apiVersion.of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info", unknown field "spec.versions[0].schema.openAPIV3Schema.properties.kind.object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info"
Error from server (BadRequest): error when creating "./dist/0001-storage.k8s.yaml": CustomResourceDefinition in version "v1" cannot be handled as a CustomResourceDefinition: strict decoding error: unknown field "spec.versions[0].schema.openAPIV3Schema.properties.apiVersion.of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info", unknown field "spec.versions[0].schema.openAPIV3Schema.properties.kind.object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info", unknown field "spec.versions[0].schema.openAPIV3Schema.properties.spec.Required.' properties", unknown field "spec.versions[0].schema.openAPIV3Schema.properties.spec.by a user. More info", unknown field "spec.versions[0].schema.openAPIV3Schema.properties.status.properties.boundVolumeSnapshotContentName.To avoid possible security issues, consumers must verify binding between VolumeSnapshot and VolumeSnapshotContent objects is successful (by validating that both VolumeSnapshot and VolumeSnapshotContent point at each other) before using this object.' type", unknown field "spec.versions[0].schema.openAPIV3Schema.properties.status.properties.error.properties.message.during snapshot creation if specified. NOTE", unknown field "spec.versions[0].schema.openAPIV3Schema.properties.status.properties.error.properties.message.logged, and it should not contain sensitive information.' type"

Environment:

Framework Version: 2.151.0
OS: Microsoft Windows [Version 10.0.22621.2428] - WSL 2 Debian 12 (Bookworm)

Other Info:
Here is the search against the OpenEBS chart's GitHub highlighting the relavent areas: https://github.com/search?q=repo%3Aopenebs%2Flvm-localpv+sensitive+information.'&type=code

This is :bug: Bug Report

This is an issue with flagger as well. If CRDs are included, the single quotes of description are removed:
          properties:
            apiVersion:
              description: APIVersion defines the versioned schema of this representatio
              of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
              type: string

As you can see, the single quote before "APIVersion" is missing. The closing single quote after "resources" is there. I would expect the whole string to be formatted correctly. With just helm template on the command line, this works as expected.
In the current state, we are not able to use cdk8s to deploy CRDs.

This is becoming a bigger issue for us, we are having to manually edit before imports which is making us reevaluate the CDK8s as a valid option

It looks like the helm chart linked here is not a valid YAML.
After running helm template, the relevant sub-section is as follows:
properties:
  message:
    description: 'message is a string detailing the encountered error
    during snapshot creation if specified. NOTE: message may be
    logged, and it should not contain sensitive information.'
    type: string

This, according to both yamllint and the VSCode YAML (by RedHat) extension, is invalid.

Also see https://github.com/openebs/lvm-localpv/issues/269

This corruption exists in the original chart: https://github.com/openebs/lvm-localpv/blob/609b0d5226d58ce733845902c3ce3dcb4694d8cb/deploy/helm/charts/charts/crds/templates/csi-volume-snapshot-content.yaml#L206-L211
I'm not sure why our YAML parser doesn't panic when it encounters this, I suspect it is a bug on their end.
The reason helm preserves the original content is because it probably doesn't try to parse the manually written YAML, it just passes it through. In cdk8s, we do parse the YAML and then serialize it back, which is where the YAML parser bug comes into play.
But regardless, if indeed this is invalid YAML - not much we can do...
@BoatPartyJesus you mention that with helm it works as expected, did you try to deploy the chart as helm produces it? I would think you'll see a kubernetes error at that point.
Given this information, I am removing the p1 classification for this issue, as it doesn't look like a bug for now.


Possibly with introduction of auto db compaction, NeDB is now liable to leave the db in a corrupt state when user quits app, say, after changing PW

Just experienced this while testing PW change and then quickly quitting the app.
mymonero-app/node_modules/nedb/lib/datastore.js:77
    if (err) { throw err; }
               ^

Error: More than 10% of the data file is corrupt, the wrong beforeDeserialization hook may be used. Cautiously refusing to start NeDB to prevent dataloss
    at Persistence.treatRawData (mymonero-app/node_modules/nedb/lib/persistence.js:242:11)
    at mymonero-app/node_modules/nedb/lib/persistence.js:281:38
    at tryToString (fs.js:426:3)
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:413:12)

Found unsolved NeDB issue and commented with potential cause. Awaiting maintainer reply. https://github.com/louischatriot/nedb/issues/455
Possible solutions:

Setting autocompaction interval from 60s to something more like 1s to make likelihood of quit/crash during compaction much lower
Doing compaction manually on writes, incrementing counter, listening for done to decrement counter, and delaying app quit until that counter is back to 0 -- this is probably suboptimal though because we probably can't do that on mobile, and the app could be quit anytime on mobile. (Good thing we'll have Realm in the native apps.)

It looks like a re-launch left it in a workable state - probably the datastore load triggers an autocompaction, and autocompactions remove corrupted records (although I'm not clear on whether there would be dataloss in that case).
So, another possible solution (at least, if there is no dataloss on a corruption..?) would be to attempt to load the DB again in case of errors, maybe with some limit on number of retries.

Looks like NeDB writes / syncs happen somewhat in the background after a write call's cb is called. Just something to keep in mind.

Implemented the above two things. Closing this one for now. Might be worth re-opening if we are seeing actual dataloss in normal use cases and want to switch to another db or follow up.

Just got this again :\ So, re-opening.

Dang, saw it again. Probably will switch away from NeDB.

I added commits https://github.com/mymonero/mymonero-app-js/commit/67a1d58bbe8c1384ff3584a63b1efd66dd8d10e0 and https://github.com/mymonero/mymonero-app-js/commit/ef9c843c13aa01147057913f3e175cd353081fb4 to fix the apparent mistake in error detection in previous attempt at ability to recover on launch from failed datastore load on corrupted db. I have yet to be able to verify this as a fix to datastore load err detection because I've not yet been able to reproduce a database corruption event. Stay tuned.
Other db options I'm considering are leveldb and sqlite. If I really do need to change the db out, it would probably be much better to do it before the public launch. So I'm going to put the blocking label back on this issue.

Related (trivial): https://github.com/mymonero/mymonero-app-js/commit/9902063dd6458b2e26f12bb9d614a950302c3109

Fixed by https://github.com/mymonero/mymonero-app-js/commit/8fb7bb07bf77fb0a0af2dcb24754d8ecfde79024


Overlapping of elements in navbar

The navbar of the home page is a bit messy. Also, a few elements are overlapping slightly.

As you can see the "Offers" and the "Login" parts are overlapping slightly. Also, the indentation of the navbar has been should be in justified to make it look better.
The navbar of the homepage should be made to match the style of the navbar of the other pages. Something like this:

Please assign this issue to me for gssoc24. Thank you

thank you for assigning this to me. i am working on it


The 'res-vnet' snippet doesn't match the documentation and is bugged

Bicep version
0.4.1124
Describe the bug
The code for the res-vnet snippet doesn't match the documentation. The location reads location instead of resourceGroup().location
To Reproduce

Open vscode with the bicep extension installed
Type res-vscode
Press Tab or Enter
The default code should be entered and the bug should be visible

After playing a bit more with other templates I'm now wondering if it's the documentation that's wrong and that it should have a step to manually replace location with resourceGroup().location...
Thoughts?

This is intentional because we advise users to have dedicated param for location like so:
param location string = resourceGroup().location

We will update the documentation that you linked to. We will also be adding new linter rules to help explain this in more depth.


Refactor the IndexMapping

The current implementation takes up tons of memory, and is of really low efficiency. My idea would be change it to:
interface IndexMapping {
    start: number,
    skipAt: number[]
}

Example
Outter string:
0---------1---------2---------3---------4
01234567890123456789012345678901234567890
datapack enable "crazy\"stuff\\42"

Inner string:
0---------1---------2---------3---------4
01234567890123456789012345678901234567890
crazy"stuff\42

Index mapping:
const mapping = {
    start: 17,
    skipAt: [5, 11]
}

:tada: This issue has been resolved in version 2.0.0 :tada:
The release is available on:

npm package (@latest dist-tag)
Visual Studio Marketplace
GitHub release

Your semantic-release bot :package::rocket:


brandImage to occupy 100% of the width of

If you go:

addParameters({
	options: {
		theme: create({ brandImage: 'https://cdn.something/my-image.svg' })
	}
});

The <Img/> has no width or height, nor does <Brand/> or <BrandArea/>. As they're all three display: block, we can safely tell it to occupy 100% the height, and 100% the width of their parents. Because they do, <Img/> will stretch 100% of the height of <Head/>, and width auto.
Tested this with your own logo: _https://storybook.js.org/images/logos/logo-storybook.svg_, rather than use <Logo/>.

@maraisr thanks for this PR, I want to merge it, but some snapshots need to be updated, would you be able to update them?

Are you able to help me with what commands to run to do this? Running a yarn test and selecting, "Update all snapshots" is just producing alot of errors that follow this:
Cannot find module '@storybook/addons' from 'index.js'

I have rebased from upstream/next

@ndelangen those snapahots have been updated! Thank you!

That force push there, was just a rebase onto upstream/next.


Prepare bump for xchain-client|util

[x]<EMAIL_ADDRESS>[x]<EMAIL_ADDRESS>

oh right you gotta bump the dep versions all around too I guess

oh right you gotta bump the package.json versions all around too I guess

It will be another (next) PR. xchain-client|util need to be published before, in other case all other packages will fail (as we currently have with xchain-binance)

For now we ignore failing tests for xchain-binance (see https://github.com/xchainjs/xchainjs-lib/pull/388/checks#step:6:27) - it needs to be updated with latest xchain-client|util
Error: /home/runner/work/xchainjs-lib/xchainjs-lib/packages/xchain-binance/src/client.ts(18,3): semantic error TS2305: Module '"@xchainjs/xchain-client"' has no exported member 'singleFee'.

that's not it, it's that the deps don't match as specified any more

that's not it, it's that the deps don't match as specified any more

Yep, but you can't add dependencies of<EMAIL_ADDRESS>/<EMAIL_ADDRESS>to xchain-binance as long as these are not published or do I miss something?

I'm pretty sure you can -- I think it's failing because lerna is putting the xchain-binance build ahead of the xchain-client one, because it's noticed that "@xchainjs/xchain-client": "^0.9.3" dep in xchain-binance doesn't match the version in /packages/xchain-client/package.json so it hasn't realized they have to be built in order.


Generate a robots.txt when generating docs for API site.

Fixes #23960

Actually, I've realized that this isn't the solution: that will make our master docs site searchable too, and we really just want the docs.flutter.io site to appear, so there aren't competing results.


hello why the program stop at 4 294 000 000 checked adress ?

the program stop at 4 294 000 000 checked adress and the cpu continue being used why ?

Ahhh..... It's a 4byte counter limit. 👍
You can change the code
https://github.com/iceland2k14/ETH_Hunt/blob/6aa5577e28a06fa82222050ac1a26384092d483f/Eth_Hunt4.py#L36
to
counter = Value('Q')
This will work upto 18 Exakeys. Which is enough for Practical case.

hello ,thx i test it.


Raspberry Pi: Software caused connection abort

I have connected a Large motor to port A on a Technic Hub, to power a Lego Loop Coaster.  I've been able to control it via Bricknil on my Macbook Pro, but I can't get it to work on a Raspberry Pi.  Almost every time I run my program on the Raspberry Pi, I get the following error:
``
INFO:BLE Event Q.0:found device Technic Hub
DEBUG:bleak.backends.bluezdbus.client:Connecting to BLE device @ 90:84:2B:70:74:8C with hci0
DEBUG:bleak.backends.bluezdbus.discovery:Technic Hub, 90:84:2B:70:74:8C (-74 dBm), Object Path: /org/bluez/hci0/dev_90_84_2B_70_74_8C
Traceback (most recent call last):
File "/home/tyler/lego1/lib/python3.9/site-packages/bleak/backends/bluezdbus/client.py", line 69, in connect
await self._bus.callRemote(
txdbus.error.RemoteError: org.bluez.Error.Failed: Software caused connection abort
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/tyler/lego1/./bricknil_test.py", line 21, in
start(system)
File "/home/tyler/lego1/lib/python3.9/site-packages/bricknil/bricknil.py", line 214, in start
ble.run()
File "/home/tyler/lego1/lib/python3.9/site-packages/bricknil/bleak_interface.py", line 52, in run
self.loop.run_until_complete(self.asyncio_loop())
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/home/tyler/lego1/lib/python3.9/site-packages/bricknil/bleak_interface.py", line 71, in asyncio_loop
await device.connect()
File "/home/tyler/lego1/lib/python3.9/site-packages/bleak/backends/bluezdbus/client.py", line 78, in connect
raise BleakError(str(e))
bleak.exc.BleakError: org.bluez.Error.Failed: Software caused connection abort
``
It works every time on the Macbook Pro.  It worked once out of maybe 50 attempts on the Raspberry Pi.
Does anyone have a combination of Raspberry Pi OS / Python / Bricknil / Bleak versions that is working well for them?
Steps to reproduce:

Install "Raspberry Pi OS (32-bit) Bullseye 2023-05-03" on a Raspberry Pi 4 Model B, and login as a regular user via SSH.  This comes with Python 3.9.2.
pip install virtualenv
export PATH=$PATH:~/.local/bin
virtualenv lego1
cd lego1
source bin/activate
pip install bricknil

Successfully installed attrs-23.1.0 automat-22.10.0 bluebrick-Adafruit-BluefruitLE-0.9.13 bricknil-0.9.3 bricknil-bleak-0.3.1 constantly-15.1.0 curio-1.6 future-0.18.3 hyperlink-21.0.0 idna-3.4 incremental-22.10.0 pyyaml-6.0.1 six-1.16.0 twisted-23.8.0 txdbus-1.1.2 typing-extensions-4.7.1 zope-interface-6.0
Then run the following Python program, based on the technic 4x4 example:
``
#! /usr/bin/env python3
import logging
from curio import sleep
from bricknil import attach, start
from bricknil.hub import CPlusHub
from bricknil.sensor.motor import CPlusLargeMotor
@attach(CPlusLargeMotor, name='loop_motor', port=0)
class Coaster(CPlusHub):
async def run(self):
self.message_info("Running")
await self.loop_motor.set_speed(50)
await sleep(20)
async def system():
hub = Coaster('loop_hub', True)
if name == 'main':
logging.basicConfig(level=logging.DEBUG)
start(system)
``
If I press the button on the hub immediately before running the Python program, or soon after, I can see that it discovers the hub OK, but fails when it tries to connect.

I am getting much better stability by setting query_port_info=False when creaating the CPlusHub object.  I haven't had a "Software caused connection abort" failure since switching it from True to false.
I do still get a lot of error messages like this one:
Unhandled Error Traceback (most recent call last):   File "/home/tyler/lego1/lib/python3.9/site-packages/txdbus/protocol.py", line 140, in dataReceived     self.rawDBusMessageReceived(raw_msg)   File "/home/tyler/lego1/lib/python3.9/site-packages/txdbus/protocol.py", line 266, in rawDBusMessageReceived     self.signalReceived(m)   File "/home/tyler/lego1/lib/python3.9/site-packages/txdbus/client.py", line 642, in signalReceived     self.router.routeMessage(msig)   File "/home/tyler/lego1/lib/python3.9/site-packages/txdbus/router.py", line 128, in routeMessage     r.match(m) --- <exception caught here> ---   File "/home/tyler/lego1/lib/python3.9/site-packages/txdbus/router.py", line 67, in match     self.callback(m)   File "/home/tyler/lego1/lib/python3.9/site-packages/bleak/backends/bluezdbus/discovery.py", line 65, in parse_msg     device_interface = message.body[1].get("org.bluez.Device1", {}) builtins.AttributeError: 'list' object has no attribute 'get'
Earlier in the day, I tried lots of different Raspberry Pi images from 2020 to 2022, and tried a Raspberry Pi Zero W.  None of that seemed to help much.


Add patch to disable autohidecursorevent on mac

Related https://github.com/atom/atom-shell/pull/1326

It should be made optional, see how we override acceptsFirstMouse :
https://github.com/atom/libchromiumcontent/blob/atom/patches/render_widget_host_view_mac.patch#L38.

Patch merged in https://github.com/atom/libchromiumcontent/blob/atom/patches/render_widget_host_view_mac.patch.


Adds node v4 to build matrix.

This adds node version for to travis build matrix so that failures are allowed. Same as on-core.

+1

:+1:


Fix training resuming in references/segmentation #2116

This PR fixes an issue with training resuming of references/segmentation.

Sorry this has some issues.


is beta 3 production ready?

Hello,
I just discovered MOON and am very excited to try it in a legacy project (as it's very hard to attach Vue or other full-blown library on top of that ol' good spaghetti :).
However I found that the latest MOON release is from 2018, but https://github.com/kbrsh/moon/blob/master/packages/moon/dist/moon.min.js is being quietly updated to beta 3.
Hence I wonder, is beta 3 safe to use in production or I better stick to beta 2 for now? Are there any docs about beta 3 changes?
Cheers!

Hey!
I’d suggest sticking to beta 2 because beta 3 doesn’t have documentation yet. Documentation is the only thing left before beta 3 launches though, so it’s coming pretty soon!
However, one thing to keep in mind is that beta 3 will have a more functional API that will be quite different from what you’re likely used to. Keep that in mind before committing to Moon for a production project :)

Beta 3 is out! As implied by the name, it's not production ready yet but it is fully documented and ready for use :)


Update invocation and execution diagrams

What this PR does / why we need it:

Revist based on HLGF meeting notes
Cleanup and printer friendly edits
Remove cc2cc calls from execution diagram
Resolve open questions regarding response encryption

Which issue(s) this PR fixes:
This PR addresses  #355
Special notes for your reviewer:
Does this PR introduce a user-facing changes and/or breaks backward compatability?:

Updated based on feedback from @g2flyer and recent discussion regarding component naming convention as discussed in https://github.com/hyperledger-labs/fabric-private-chaincode/pull/375_.
@bvavala Please consider for merging.

Updated based on feedback from @g2flyer and recent discussion regarding component naming convention as discussed in #375_.
@bvavala Please consider for merging.

You have a fixup commit! But Bruno obviously can also squash-merge (just needs some manual commit info cleanup but here it should be straight-forward).


Method ol.View.fit(ol.Extent) not working well

Describe the bug
From version 6.0.0, the method ol.View.fit(ol.Extent) is not working precisely.  The features are displayed partly behind the edges of the view(they do not fit with the whole size of the image style).
To Reproduce
https://codepen.io/mattti/pen/OJPagag
Expected behavior

How come view.fit(extent) works as expected but view.fit(extent, { size: map.getSize() }) does something different and zooms in way too much so that full extent is not visible?
The documentation suggests that "Default is the current size of the first map in the DOM that uses this view, or [100, 100] if no such map is found." but inspecting the code shows that size defaults to getViewportSizeMinusPadding_() -- which is something else than map size, right?

The documentation is indeed outdated. getViewportSizeMinusPadding_() should be equivalent to map.getSize(), unless the view is configured with a padding.

Specifying { size: map.getSize() } messed up the resolution/zoom, so I had to leave it out.

@namedgraph Would you be able to create a new issue with a reproduction case? This seems to be a different problem than the one reported here.

I had vaguely similar issue with view.fit(extent) when it was called for the first time for a map that was not yet displayed. It did not zoom in close enough (zoom level was roughly 2.5 smaller than expected), but when the same map was opened again (using identical code path), the view fit perfectly to the extent as is expected.
After adding the { size: map.getSize() } the issue was fixed.

@ahocevar is the map.getView().fit(extent, map.getSize()); signature obsolete? I.e. Passing size as number instead of the options object.

View.fit() signature was changed with v4.0.0


Made get Started button responsive

Related Issue

Get Started button was not responsive.

Closes: #22
Are you creating this PR under Hacktoberfest
Yes, I'm opening this PR under hacktoberfest.
Describe the changes you've made
Made Get started button responsive for different screen sizes.
Breakpoints introduced ;- 600px 768px 1000px
Describe if there is any unusual behaviour of your code(Write NA if there isn't)
NA
Checklist:

[x] My code follows the style guidelines of this project.
[x] I have performed a self-review of my own code.
[x] I have commented my code, particularly in hard-to-understand areas.

Screenshots

<1000px

<768px

<600px

Can you please provide screenshots of how button is looking at different screen sizes.
Thanks

hi @yashikabhargava , I've updated the my previous comment to include the screenshots, please check if it looks fine.

Thank you for contributing.


Add jsdoc to all js statements

Fixes #39516
This is the simplest solution -- just add jsdoc to all statements if it's there, but it doesn't seems to cause a performance problem, so I think it's fine.

@typescript-bot perf test this

Perf tests look fine.

Change seems relatively small; can you think of any other areas that are likely to see unintended consequences of this that we should pay attention to?

No, this is strictly additive, which is why I was concerned about performance the most.
Two minor issues:

In theory almost any node could have a typedef in front of it. But I think we can fix that lazily just like this time. It's rare enough that it may never be a problem.
The function that tries to find a name for an anonymous typedef will not find one from any of these statements. I guess you could look inside a for's initialisation step to get a name, but it seems like a huge reach.

Test is added and sure enough I missed one of the cases in parseBlock.


WHO-reference

Overview
Includes WHO reference and all the refactors to make it render.
closes #138

Implements WHO charts using the extend centile collection (1, 3, 5, 10, 15, 50, 85, 90, 95, 97, 99)

Merging this here. Should have no implications for existing users. The WHO charts can only be used with v4.3.0 of the server (which contains 4.3.3 of the RCPCHGrowth package).


get_current_user

Shiny supports this via session.user, for other frameworks we should support this via SDK:

https://docs.posit.co/connect/user/fastapi/#user-meta-data
https://docs.posit.co/connect/user/flask/#user-meta-data
https://docs.posit.co/connect/user/dash/#user-meta-data
https://docs.posit.co/connect/user/streamlit/#user-meta-data

We just added https://github.com/posit-dev/posit-sdk-py/pull/51. So should we plan to update those guides to use the SDK to get the user? Or something else?

The API call in #51 will return the user who owns the At the client is configured to use. The scenario here is a deployed app that wants to know the identity of visiting users who are identified to Connect (but not the app) via a session cookie. Connect embeds their information in an HTTP header that the app receives. Code to extract HTTP headers from the inbound request is framework-specific.

Is visitor the appropriate name for this entity? While user for "me".
e.g.,
client.visitor

So the SDK would be providing a helper function to encapsulate that?

That was what I had in mind.

Got it. Is visitor still appropriate for a logical name?
I'm thinking the following where get_visitor is the tbd helper method
import json

from posit.connect import Client

def get_visitor() -> dict:
    return {'username': 'taylor_steinberg', 'groups': ['rsc_team']}

with Client() as client:
    visitor = get_visitor()
    user = client.users.find_one(lambda user: user["username"] == visitor["username"])
    print(json.dumps(user))

I think "visitor" is fine and it's a word we use in other places in the documentation. A good alternative is "viewer"--it overlaps with the Connect role, which I think is fine in this case.

visitor = get_visitor()

Looking at our example code for Flask, FastAPI and Streamlit, it will be difficult for the API to have that shape since we don't know which framework is in use. We might need a separate helper function per framework.


how to reload the pmml file?

Hello!
I save the Keras model as pmml file . but how to reload it by nyoka API?
my code is
pmml = KerasToPmml(keras_model=model, model_name="text", predictedClasses=[1, 0])
pmml.export(open("%s/model/cnn.pmml" % path, "w"), 0)
I use the model  to predict the binary text classification, the parameter predictedClasses is right to be given?

Yes. You are using the exporter in correct way. However, Nyoka is an exporter only. It only allows you to convert a model into PMML.

Yes. You are using the exporter in correct way. However, Nyoka is an exporter only. It only allows you to convert a model into PMML.

I get i ！tthank you


Add a panda

Hi! I would like to add a panda to the pet options. I added gifs to a "panda" folder in media and updated the ts files in src as well. There is a regular black/white panda and a brown/white panda too.
Let me know what you think!
Related to #447 and #548

These animations are fantastic, I'll get it running and merge if there aren't any changes required.


Registered critical service

Using the ConsulProvider, it is correct that a service cannot be both registered and have critical status? Because whenever the status code is critical it gets unregistered. If that is the intention I would've thought if I have a service that is responding but is critical for another reason, consul should still know about it? (I'm new to consul if this question seems obvious) Thanks

See #31
The reaper should probably be removed from the Consul provider as it lacks knowledge on what is going on in the network.

Reaper have been removed. critical services can still exist


Fix/test pass overrides

Fixes #909
I've added a test too, let me know if it's unnecessary.

This is breaking master, it shall be fixed... @MattPainter01?


build.rs: if found more than one candidate, filter on arch

Hi,
This is my first RP on pyo3. Thanks for the great work, I'm using this right now to convert a library from python to rust for a raspberry pi running in 32 bit mode, that is armhf architecture, using ubuntu 20.04 as the target distribution. I have both the host x86_64 python3.8 sysconfigdata and the foreign architecture armhf in /usr/lib/python3.8, which results in more than one candidate during search_lib_dir, and an error of "Detected multiple possible python versions".
I've conservatively added a filter in that case to keep only the paths with cross.arch in their name (to_lossy_string.contains(&config.arch))
There is already an existing filter on config.arch but only in another branch, so I didn't want to pull it in to the first branch (Ok(f) if starts_with(f, "_sysconfigdata") && ends_with(f, "py")).
I added a line in CHANGELOG, I think this is a bug so it should not change the documentation.
I've run clippy (no errors), run fmt (no changes), "cargo test" fails but on unrelated code (I can attach, fails in examples).
Alon

ok, I made a mess by accidentally pushing with force my updated change, so
now I'm redoing the rebase you did for me.
On Tue, May 25, 2021 at 9:23 AM David Hewitt @.***>
wrote:

@.**** commented on this pull request.
Hi @alonblade https://github.com/alonblade, thanks for the PR!
We literally just merged a change to the build infrastructure, so I had to
rebase and force-push your PR. Hope that's ok.
Let's see how CI does with this branch, also I have one thought...
In pyo3-build-config/src/impl_.rs
https://github.com/PyO3/pyo3/pull/1626#discussion_r638487362:

// If we got more than one file, only take those that contain the arch name.

// For ubuntu 20.04 with host architecture x86_64 and a foreign architecture of armhf
// this reduces the number of candidates to 1:
//
// $ find /usr/lib/python3.8/ -name '_sysconfigdata*.py' -not -lname '*'
//  /usr/lib/python3.8/_sysconfigdata__x86_64-linux-gnu.py
//  /usr/lib/python3.8/_sysconfigdata__arm-linux-gnueabihf.py
if sysconfig_paths.len() > 1 {

   sysconfig_paths = sysconfig_paths

       .iter()

       .filter(|p| p.to_string_lossy().contains(&cross.arch))

       .map(|p| p.clone())

       .collect::<Vec<PathBuf>>();

}

The only potential issue I see is that if the arch doesn't match any
sysconfig file (e.g. maybe the arch is spelt differently for some reason?)
then this could reduce the number of candidates to zero.
In that case, it might be worth keeping the original full set of paths
instead of listing zero paths and failing?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/PyO3/pyo3/pull/1626#pullrequestreview-667429711, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ASHRLMN5LNDHBWJO3TDWOLLTPM67VANCNFSM45NEBKDQ
.

@davidhewitt hmm, now that I rebased on latest I get a different error from my use case (pi armhf target, x86_64 host) - Trying to debug it.
   Compiling pyo3 v0.13.2 (/home/alon/catkin_ws/mpu6050/sub/pyo3)
error: failed to run custom build command for `pyo3 v0.13.2 (/home/alon/catkin_ws/mpu6050/sub/pyo3)`

Caused by:
  process didn't exit successfully: `/home/alon/catkin_ws/mpu6050/target/release/build/pyo3-6c31d3e862b113d6/build-script-build` (exit status: 1)
  --- stderr
  error: Your Rust target architecture (32-bit) does not match your python interpreter (64-bit)

@alonblade yikes, I'm pretty sure this is my fault; I have a guess at what's going on.
I'll try to open a PR to fix tonight.

@davidhewitt ok, I think I found the problem: the new refactoring of pyo3-build-config out of build.rs means that when
pyo3-build-config/src/impl_.rs is run the value of the cargo target environment variables is actually the host, not the real target. So cross.arch is actually x86_64, and I get a false error. To confirm, I commented out ensure_target_architecture and tested the resulting binary and it is the correct architecture.
I am not sure how to proceed - one option would be to pass the real target variables to pyo3-build-config in a different set of environment variables (i.e. CARGO_CFG_TARGET_ARCH becomes PYO3_CARGO_CFG_TARGET_ARCH)
What do you think?

@alonblade yikes, I'm pretty sure this is my fault; I have a guess at what's going on.
I'll try to open a PR to fix tonight.

Thanks!

(Apologies, I've run out of time to try to fix this tonight. I'm going to attempt to find time again soon, hopefully on Thursday evening.)

Sweet. No worries.
On Wed, May 26, 2021 at 1:34 AM David Hewitt @.***>
wrote:

(Apologies, I've run out of time to try to fix this tonight. I'm going to
attempt to find time again soon, hopefully on Thursday evening.)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/PyO3/pyo3/pull/1626#issuecomment-848313291, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ASHRLMORTYEDPDLJ6VE3YILTPQQZBANCNFSM45NEBKDQ
.

I'm going to merge this and rebase my cross-compilation fix on it. Thanks for implementing this!

Super, thanks!
On Sat, Jun 5, 2021 at 11:29 AM David Hewitt @.***>
wrote:

Merged #1626 https://github.com/PyO3/pyo3/pull/1626 into main.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/PyO3/pyo3/pull/1626#event-4846372229, or unsubscribe
https://github.com/notifications/unsubscribe-auth/ASHRLMNCRDDVAJLVD6FZCQDTRHN5XANCNFSM45NEBKDQ
.


[Email Security] Zero Trust Email Security documentation

Summary
This PR creates the documentation for the Zero Trust, Email Security product.

Closing in favor of https://github.com/cloudflare/cloudflare-docs/pull/16425, which aligns with the Starlight requirements


DataStore with @auth - Sync error subscription failed ... Missing field argument owner

tl;dr Is it necessary to configure DataStore to include owner for syncing when using owner auth? If so, what's the syntax or can anyone point to a working example?
Which Category is your question related to?
Amplify CLI, DataStore, auth, GraphQL API
Amplify CLI Version
4.6.0
What AWS Services are you utilizing?
Amplify CLI, Datastore, AppSync, Cognito User Pools
Provide additional details e.g. code snippets
Hi all, attempting to add simple owner authorization to this DataStore demo https://github.com/sebsto/amplify-datastore-js-e2e .
Changes to the demo repo
@auth directive was added to schema:
enum PostStatus {
  ACTIVE
  INACTIVE
}

type Post @model @auth(rules: [{ allow: owner }]) {
  id: ID!
  title: String!
  rating: Int!
  status: PostStatus!
}

App.js updated for auth:
export default withAuthenticator(App, true);

The usual amplify init, amplify add auth (Cognito User Pools), npm run amplify-modelgen, npm run amplify-push, possibly other commands in there
Signing up and signing in...
Result
Browser fails to sync records giving the following in the console:
[WARN] 21:10.98 DataStore - Sync error subscription failed Connection failed: {"errors":[{"message":"Validation error of type MissingFieldArgument: Missing field argument owner @ 'onCreatePost'"}]}

which is followed after ~20 seconds by:
AWSAppSyncRealTimeProvider.ts:506 Uncaught TypeError: Cannot read property 'observer' of undefined
    at AWSAppSyncRealTimeProvider._timeoutStartSubscriptionAck (AWSAppSyncRealTimeProvider.ts:506)
    at AWSAppSyncRealTimeProvider.ts:318

Please note

same errors when commenting out the useEffect containing the DataStore.observe(Post).subscribe(...) call and clicking buttons to trigger a DataStore.query() instead, so it seems DataStore is trying to set up subscriptions itself
same errors when adding owner to the call to DataStore.save() apart from records created in IndexedDB now showing owner
from the AppSync console, querying and mutating Posts as the authenticated user works fine and includes an owner field

So, is it necessary to configure DataStore explicitly to use owner? e.g. an equivalent to API.graphql(graphqlOperation(onUpdateNote, { owner })).subscribe(...) in the GraphQL API? Or should DataStore pick that up automagically and the issue is somewhere else?
(Also wondering, are there any samples/demos/docs using DataStore together with auth yet? I understand it's early days for DataStore but haven't found any so far)

@chuckatc We're actively working on this and expect a fix for this very soon.
cc @yuth  @elorzafe

I'm hitting this too, or at least something similar, take the following slightly extended example,
Type Task
    @model
    @auth(rules: [
        {allow: groups, groups: ["SuperUser"], queries: [get, list], mutations: [create, update, delete]},
        {allow: owner, queries: [get, list], mutations: [create]}
      ])
 {
    id: ID!
    title: String!
    description: String
    status: String
 }

I'd expect an owner to be able to subscribe to onCreateTask, and get only their 'Tasks', and a user in the SuperUser group to be able to subscribe to all onCreateTask events from all users. As it is today the owner is a required argument to the generated subscription, so when a member of the SuperUser group subscribes with their user as owner they only see their create events not all create events.

I think I'm hitting something similar to my app. Setup is pretty much the same as the original author, Javascript client, amplify generated backend and models.
Schema is this:
type Timeline   @model   @searchable   @auth(     rules: [       { allow: groups, groups: ["SuperUser"] }       { allow: owner }     ]   ) {   id: ID!   name: String!   startDate: AWSDate!   endDate: AWSDate!   investment401k: [Investment401k]     @connection(name: "TimelineInvestment401ks")   income: [Income] @connection(name: "TimelineIncomes") } type Income   @model   @searchable   @auth(     rules: [       { allow: groups, groups: ["SuperUser"] }       { allow: owner }     ]   ) {   id: ID!   startDate: AWSDate!   endDate: AWSDate   rate: Float!   object: AWSJSON   timeline: Timeline! @connection(name: "TimelineIncomes") } type Investment401k   @model   @searchable   @auth(     rules: [       { allow: groups, groups: ["SuperUser"] }       { allow: owner }     ]   ) {   id: ID!   object: AWSJSON   timeline: Timeline! @connection(name: "TimelineInvestment401ks") } type UserData   @model   @searchable   @auth(     rules: [       { allow: groups, groups: ["SuperUser"] }       { allow: owner }     ]   ) {   id: ID!   birthdate: AWSDate!   retirementdate: AWSDate!   profileImageUrl: String   profileImageUncroppedUrl: String   profileImageManipulations: AWSJSON }
aws-exports.js, which is generated by Amplify, is this (test environment, nothing production):
`// WARNING: DO NOT EDIT. This file is automatically generated by AWS Amplify. It will be overwritten.
const awsmobile = {
"aws_project_region": "us-east-1",
"aws_cognito_identity_pool_id": "us-east-1:85e7460b-feab-4f21-87b7-a9a265125c77",
"aws_cognito_region": "us-east-1",
"aws_user_pools_id": "us-east-1_txxH6nvSj",
"aws_user_pools_web_client_id": "7t9mnj8a2pqfrju2e0tjh40ka4",
"oauth": {
"domain": "modelmymoney655c1605-655c1605-localdev.auth.us-east-1.amazoncognito.com",
"scope": [
"phone",
"email",
"openid",
"profile",
"aws.cognito.signin.user.admin"
],
"redirectSignIn": "http://localhost/auth/signin/",
"redirectSignOut": "http://localhost/auth/signout/",
"responseType": "code"
},
"federationTarget": "COGNITO_USER_POOLS",
"aws_appsync_graphqlEndpoint": "https://aitvi3puvfcwfkhqmhmsiw6i3q.appsync-api.us-east-1.amazonaws.com/graphql",
"aws_appsync_region": "us-east-1",
"aws_appsync_authenticationType": "AMAZON_COGNITO_USER_POOLS",
"aws_appsync_apiKey": "da2-g47wpfle4rhzrotlqnfu6cgew4",
"aws_user_files_s3_bucket": "model-my-money947365a9c1734517af86f8ba26db26a7money-localdev",
"aws_user_files_s3_bucket_region": "us-east-1"
};
export default awsmobile;`
Relevant lines from main.js
import Amplify from 'aws-amplify'; import awsconfig from '@/aws-exports'; Amplify.configure(awsconfig);
And the generated schema.js in the /models/ folder:
export const schema = {     "models": {         "Timeline": {             "syncable": true,             "name": "Timeline",             "pluralName": "Timelines",             "attributes": [                 {                     "type": "model",                     "properties": {}                 },                 {                     "type": "searchable",                     "properties": {}                 },                 {                     "type": "auth",                     "properties": {                         "rules": [                             {                                 "groupClaim": "cognito:groups",                                 "provider": "userPools",                                 "allow": "groups",                                 "groups": [                                     "SuperUser"                                 ],                                 "operations": [                                     "create",                                     "update",                                     "delete"                                 ]                             },                             {                                 "provider": "userPools",                                 "ownerField": "owner",                                 "allow": "owner",                                 "identityClaim": "cognito:username",                                 "operations": [                                     "create",                                     "update",                                     "delete"                                 ]                             }                         ]                     }                 }             ],             "fields": {                 "id": {                     "name": "id",                     "isArray": false,                     "type": "ID",                     "isRequired": true,                     "attributes": []                 },                 "name": {                     "name": "name",                     "isArray": false,                     "type": "string",                     "isRequired": true,                     "attributes": []                 },                 "startDate": {                     "name": "startDate",                     "isArray": false,                     "type": "AWSDate",                     "isRequired": true,                     "attributes": []                 },                 "endDate": {                     "name": "endDate",                     "isArray": false,                     "type": "AWSDate",                     "isRequired": true,                     "attributes": []                 },                 "investment401k": {                     "name": "investment401k",                     "isArray": true,                     "type": {                         "model": "Investment401k"                     },                     "isRequired": false,                     "attributes": [],                     "association": {                         "connectionType": "HAS_MANY",                         "associatedWith": "timeline"                     }                 },                 "income": {                     "name": "income",                     "isArray": true,                     "type": {                         "model": "Income"                     },                     "isRequired": false,                     "attributes": [],                     "association": {                         "connectionType": "HAS_MANY",                         "associatedWith": "timeline"                     }                 }             }         },         "Investment401k": {             "syncable": true,             "name": "Investment401k",             "pluralName": "Investment401ks",             "attributes": [                 {                     "type": "model",                     "properties": {}                 },                 {                     "type": "searchable",                     "properties": {}                 },                 {                     "type": "auth",                     "properties": {                         "rules": [                             {                                 "groupClaim": "cognito:groups",                                 "provider": "userPools",                                 "allow": "groups",                                 "groups": [                                     "SuperUser"                                 ],                                 "operations": [                                     "create",                                     "update",                                     "delete"                                 ]                             },                             {                                 "provider": "userPools",                                 "ownerField": "owner",                                 "allow": "owner",                                 "identityClaim": "cognito:username",                                 "operations": [                                     "create",                                     "update",                                     "delete"                                 ]                             }                         ]                     }                 }             ],             "fields": {                 "id": {                     "name": "id",                     "isArray": false,                     "type": "ID",                     "isRequired": true,                     "attributes": []                 },                 "object": {                     "name": "object",                     "isArray": false,                     "type": "AWSJSON",                     "isRequired": false,                     "attributes": []                 },                 "timeline": {                     "name": "timeline",                     "isArray": false,                     "type": {                         "model": "Timeline"                     },                     "isRequired": true,                     "attributes": [],                     "association": {                         "connectionType": "BELONGS_TO",                         "targetName": "investment401kTimelineId"                     }                 }             }         },         "Income": {             "syncable": true,             "name": "Income",             "pluralName": "Incomes",             "attributes": [                 {                     "type": "model",                     "properties": {}                 },                 {                     "type": "searchable",                     "properties": {}                 },                 {                     "type": "auth",                     "properties": {                         "rules": [                             {                                 "groupClaim": "cognito:groups",                                 "provider": "userPools",                                 "allow": "groups",                                 "groups": [                                     "SuperUser"                                 ],                                 "operations": [                                     "create",                                     "update",                                     "delete"                                 ]                             },                             {                                 "provider": "userPools",                                 "ownerField": "owner",                                 "allow": "owner",                                 "identityClaim": "cognito:username",                                 "operations": [                                     "create",                                     "update",                                     "delete"                                 ]                             }                         ]                     }                 }             ],             "fields": {                 "id": {                     "name": "id",                     "isArray": false,                     "type": "ID",                     "isRequired": true,                     "attributes": []                 },                 "startDate": {                     "name": "startDate",                     "isArray": false,                     "type": "AWSDate",                     "isRequired": true,                     "attributes": []                 },                 "endDate": {                     "name": "endDate",                     "isArray": false,                     "type": "AWSDate",                     "isRequired": false,                     "attributes": []                 },                 "rate": {                     "name": "rate",                     "isArray": false,                     "type": "Float",                     "isRequired": true,                     "attributes": []                 },                 "object": {                     "name": "object",                     "isArray": false,                     "type": "AWSJSON",                     "isRequired": false,                     "attributes": []                 },                 "timeline": {                     "name": "timeline",                     "isArray": false,                     "type": {                         "model": "Timeline"                     },                     "isRequired": true,                     "attributes": [],                     "association": {                         "connectionType": "BELONGS_TO",                         "targetName": "incomeTimelineId"                     }                 }             }         },         "UserData": {             "syncable": true,             "name": "UserData",             "pluralName": "UserData",             "attributes": [                 {                     "type": "model",                     "properties": {}                 },                 {                     "type": "searchable",                     "properties": {}                 },                 {                     "type": "auth",                     "properties": {                         "rules": [                             {                                 "groupClaim": "cognito:groups",                                 "provider": "userPools",                                 "allow": "groups",                                 "groups": [                                     "SuperUser"                                 ],                                 "operations": [                                     "create",                                     "update",                                     "delete"                                 ]                             },                             {                                 "provider": "userPools",                                 "ownerField": "owner",                                 "allow": "owner",                                 "identityClaim": "cognito:username",                                 "operations": [                                     "create",                                     "update",                                     "delete"                                 ]                             }                         ]                     }                 }             ],             "fields": {                 "id": {                     "name": "id",                     "isArray": false,                     "type": "ID",                     "isRequired": true,                     "attributes": []                 },                 "birthdate": {                     "name": "birthdate",                     "isArray": false,                     "type": "AWSDate",                     "isRequired": true,                     "attributes": []                 },                 "retirementdate": {                     "name": "retirementdate",                     "isArray": false,                     "type": "AWSDate",                     "isRequired": true,                     "attributes": []                 },                 "profileImageUrl": {                     "name": "profileImageUrl",                     "isArray": false,                     "type": "string",                     "isRequired": false,                     "attributes": []                 },                 "profileImageUncroppedUrl": {                     "name": "profileImageUncroppedUrl",                     "isArray": false,                     "type": "string",                     "isRequired": false,                     "attributes": []                 },                 "profileImageManipulations": {                     "name": "profileImageManipulations",                     "isArray": false,                     "type": "AWSJSON",                     "isRequired": false,                     "attributes": []                 }             }         }     },     "enums": {},     "version": "c3d791373597b9b143173b56a57ae474" };

Not much to add - same as the others. Fix or a workaround would be fantastic as we're in production with no path forward.

@dbhagen @chuckatc @dconlon-monigo @CodySwannGT the fix for the library is already published on @latest tag on npm.

@elorzaf I was getting the same problem as @chuckatc, just updated to @aws-amplify/datastore version 1.04 and now the sync is not working at all anymore.
I set log level to DEBUG and on 1.0.3. I can see it's doing the sync, but on 1.0.4. there is nothing logged for it.
Do we need to configure the sync?

same here!

@alex-vladut is correct.

Hi ! I've been struggling with this issue for a while
Using
"@aws-amplify/datastore": "^2.0.8"
CLI : 4.18.0
Schema
type Session
  @auth(
    rules: [
      {
        allow: owner
      }
    ]
  )

  @model {
  id: ID!
  owner: String
  title: String
}

Error given
From AWS AppSync RealTime (background operation for DataStore sync)
Validation error of type MissingFieldArgument: Missing field argument owner @ 'onCreateSession'"
I tried many things, custom resolvers... removing the mandatory owner parameter from subscription... but it seems like the other previous issues, that DataStore is not sending the owner field in the subscription
The subscriptions sent by AppSync for DataStore being the following :
"subscription operation {
  onCreateSession {
    id
    owner
    title
    _version
    _lastChangedAt
    _deleted
  }
}
"

I've read on the Amplify Graph API doc (here) that

You don’t need to pass the user as an argument in the subscription request, since the resolver will instead check the contents of your JWT token.
So I also tried manually adding the access token in the header

Amplify.configure(awsconfig);
Amplify.configure({
    graphql_headers: async () => {
      const session = await Auth.currentSession();
      return {
        Authorization: session.getAccessToken().getJwtToken()
      };
    }
  }
});

But the error is still there, so I don't really know what to do... Did I miss something somewhere (I digged into all the related issues here, and tried all the workaround without success)

@tomheno The subscription should receive owner as a parameter, something like:
subscription operation($owner: String!) {
  onCreateSession(owner: $owner) {
    id
    owner
    title
    _version
    _lastChangedAt
    _deleted
  }
}

How did you generate those codes?

@richardfan1126 Got it from the console, Amplify Logger is logging at DEBUG level, see the following screenshot :

There's also the same error with onUpdateSession & onDeleteSession subscriptions, that are run by DataStore in background, those messages occures on app start.

I ran into pretty much the same issue with Sync error subscription failed Connection failed: {"errors":[{"message":"Validation error of type MissingFieldArgument: Missing field argument owner @ 'onCreateXXX'. In the end, I managed to work around it by explicitly specifying the owner field in the schema:
type SecondTestField
  @auth(
    rules: [
      {
        allow: owner,
        ownerField: "owner",
        operations: [create, update, delete, read]
      }
    ]
  )
  @model {
  id: ID!
  title: String!
  description: String
  owner: String
}

Also during the debugging I realized I forgot to run amplify codegen models, so that may also be one of the steps leading to this issue.
But I don't think it's the only one. I now have for testing two models, one with explicit owner and one with implicit owner and when using the implicit/automatic one, I don't get any errors, but I also don't get subscription functionality. I need to refresh the page each time for new data to load. The implicit model is defined like this:
type TestField
  @auth(
      rules: [
        {
          allow: owner
        }
      ]
  )
  @model {
    id: ID!
    title: String!
    description: String
}

so the only difference is missing explicit owner field. Yet in code, TestField doesn't support subscriptions (needs a page reload to display new data) and SecondTestField works as it should.
AWS libs are as follows:
        "@aws-amplify/api": "^3.1.9",
        "@aws-amplify/datastore": "^2.0.10",
        "@aws-amplify/pubsub": "^3.0.10",
        "@aws-amplify/ui-react": "^0.2.5",
        "aws-amplify": "^3.0.10",

Hi I am having similar issues.
One @auth rule works:
type Task @model
  @auth(rules: [
      { allow: owner, ownerField: "owner" }
    ]) {
  id: ID!
  title: String!
  owner: String
}

But when I want to add a second auth rule
type Task @model
  @auth(rules: [
      { allow: owner, ownerField: "owner" },
      { allow: owner, ownerField: "assignee", operations: [update, read] }
    ]) {
  id: ID!
  title: String!
  owner: String
  assignee: String
}

with the following:
[WARN] 40:44.603 DataStore - Sync error subscription failed Connection failed: {"errors":[{"message":"Validation error of type MissingFieldArgument: Missing field argument owner @ 'onUpdateTask'"}]}
And does not sync to cloud, local changes are working though.
"dependencies": {
        "@aws-amplify/core": "^3.2.6",
        "@aws-amplify/datastore": "^2.0.10",
        "@aws-amplify/ui-react": "^0.2.5",

I have the same issue.
Using
"@aws-amplify/api": "^3.1.10",
"@aws-amplify/auth": "^3.2.7",
"@aws-amplify/core": "^3.2.7",
"@aws-amplify/datastore": "^2.1.0",

I have tried the various workarounds found here but it still does not work.
@chuckatc mentioned this post here where it seems to work, but I noticed that the author is using npx amplify-app to init his project, so he does not add an API with amplify add api.
I am in the case where I had an API before setting up DataStore, so I used the cli to update my API to use DataStore.
@veproza @tomheno In which case are you? Did you init your project with npx amplify-app or did you update your existing API tu use DataStore?

I have similar error.
Right after authenticate user, I'm trying to perform DataStore.query, and get undefined.
But after waiting a few seconds and reload applications query successfully returns data.

I have similar issues, all models are marked with @auth

Cognito is setup separately and configured in aws-exports
AppSync api pushed and configured in aws-exports

Most of our configuration are manual.
Tried amplify api update.
Also tried DataStore.configure(), which give other error DataStore - Sync error subscription failed Subscribe only available for AWS AppSync endpoint.

I have the same issue.
Using
"@aws-amplify/api": "^3.1.10",
"@aws-amplify/auth": "^3.2.7",
"@aws-amplify/core": "^3.2.7",
"@aws-amplify/datastore": "^2.1.0",

I have tried the various workarounds found here but it still does not work.
@chuckatc mentioned this post here where it seems to work, but I noticed that the author is using npx amplify-app to init his project, so he does not add an API with amplify add api.
I am in the case where I had an API before setting up DataStore, so I used the cli to update my API to use DataStore.
@veproza @tomheno In which case are you? Did you init your project with npx amplify-app or did you update your existing API tu use DataStore?

I made the test and it has nothing to do with whether you started the project using npx amplify-app or you updated an existing API.
I still have this issue in my React Native app, I created a new issue as this one is closed.
https://github.com/aws-amplify/amplify-js/issues/5898

I have a similar issue with
type Quiz   @model   @auth(     rules: [       { allow: public, provider: iam, operations: [read] }       { allow: owner }     ]   ) {   id: ID!   title: String!   seconds: Int!   currentQuestion: String   questionOrder: String   started: Boolean   questionTime: Int   view: Int   owner: String! }
[WARN] 34:16.791 DataStore - Sync error – "Connection failed: {"errors":[{"message":"Validation error of type MissingFieldArgument: Missing field argument owner @ 'onUpdateQuiz'"}]}"
 "@aws-amplify/analytics": "^3.1.15",     "@aws-amplify/api": "^3.1.15",     "@aws-amplify/auth": "^3.2.12",     "@aws-amplify/core": "^3.3.2",     "@aws-amplify/datastore": "^2.2.2",     "@aws-amplify/interactions": "^3.1.15",     "@aws-amplify/predictions": "^3.1.15",     "@aws-amplify/storage": "^3.2.5",     "@aws-amplify/ui": "^2.0.2",     "@aws-amplify/ui-react": "^0.2.8",     "@aws-amplify/xr": "^2.1.15",     "@testing-library/jest-dom": "^4.2.4",     "@testing-library/react": "^9.3.2",     "@testing-library/user-event": "^7.1.2",     "array-move": "^2.2.1",     "aws-amplify": "^3.0.13",     "aws-amplify-react": "^4.1.12",

Same issue here
This don't work
@auth(         rules: [             { allow: owner, ownerField: "owner" }             { allow: owner, ownerField: "tecs", operations: [read, update] }         ]     ) {...
But only one rule works perfect
@auth(         rules: [             { allow: owner, ownerField: "owner" }         ]     ) {

Hello @alexandprivate is there missing comma in auth array?
Please check with comma, if it works let us know.

Hello @alexandprivate is there missing comma in auth array?
Please check with comma, if it works let us know.

Hi there, well yes and not, prettier actually removed  the comma when I save the doc, so I don't that's the issue

Ok guys lets see if we can solve this

"@aws-amplify/core": "^3.2.6",
"@aws-amplify/datastore": "^2.0.10",
"@aws-amplify/ui-react": "^0.2.5",

Any updates on this?

https://github.com/aws-amplify/amplify-cli/issues/3048#issuecomment-624720926 Any updates on this?

Hi I am having similar issues.
One @auth rule works:
type Task @model
  @auth(rules: [
      { allow: owner, ownerField: "owner" }
    ]) {
  id: ID!
  title: String!
  owner: String
}

But when I want to add a second auth rule
type Task @model
  @auth(rules: [
      { allow: owner, ownerField: "owner" },
      { allow: owner, ownerField: "assignee", operations: [update, read] }
    ]) {
  id: ID!
  title: String!
  owner: String
  assignee: String
}

with the following:
[WARN] 40:44.603 DataStore - Sync error subscription failed Connection failed: {"errors":[{"message":"Validation error of type MissingFieldArgument: Missing field argument owner @ 'onUpdateTask'"}]}
And does not sync to cloud, local changes are working though.
"dependencies": {
        "@aws-amplify/core": "^3.2.6",
        "@aws-amplify/datastore": "^2.0.10",
        "@aws-amplify/ui-react": "^0.2.5",

Hi there @johanbuys any updates on this from your side?

Hi I am having similar issues.
One @auth rule works:
type Task @model
  @auth(rules: [
      { allow: owner, ownerField: "owner" }
    ]) {
  id: ID!
  title: String!
  owner: String
}

But when I want to add a second auth rule
type Task @model
  @auth(rules: [
      { allow: owner, ownerField: "owner" },
      { allow: owner, ownerField: "assignee", operations: [update, read] }
    ]) {
  id: ID!
  title: String!
  owner: String
  assignee: String
}

with the following:
[WARN] 40:44.603 DataStore - Sync error subscription failed Connection failed: {"errors":[{"message":"Validation error of type MissingFieldArgument: Missing field argument owner @ 'onUpdateTask'"}]}
And does not sync to cloud, local changes are working though.
"dependencies": {
        "@aws-amplify/core": "^3.2.6",
        "@aws-amplify/datastore": "^2.0.10",
        "@aws-amplify/ui-react": "^0.2.5",

Hi there @johanbuys any updates on this from your side?

Hi, no not really.
I still have the issue. It looks like, If I change around the 2 rules the error changes to match the first field.
This was core to our use case, I did not want to hack something together to make this work so I haven't looked into this for a while. I am monitoring this thread, but I had to refactor my code, not using Datastore for now.
Hopefully these issues can be fixed I was really eager to use this, but for now it's a showstopper.

Hi I am having similar issues.
One @auth rule works:
type Task @model
  @auth(rules: [
      { allow: owner, ownerField: "owner" }
    ]) {
  id: ID!
  title: String!
  owner: String
}

But when I want to add a second auth rule
type Task @model
  @auth(rules: [
      { allow: owner, ownerField: "owner" },
      { allow: owner, ownerField: "assignee", operations: [update, read] }
    ]) {
  id: ID!
  title: String!
  owner: String
  assignee: String
}

with the following:
[WARN] 40:44.603 DataStore - Sync error subscription failed Connection failed: {"errors":[{"message":"Validation error of type MissingFieldArgument: Missing field argument owner @ 'onUpdateTask'"}]}
And does not sync to cloud, local changes are working though.
"dependencies": {
        "@aws-amplify/core": "^3.2.6",
        "@aws-amplify/datastore": "^2.0.10",
        "@aws-amplify/ui-react": "^0.2.5",

Hi there @johanbuys any updates on this from your side?

Hi, no not really.
I still have the issue. It looks like, If I change around the 2 rules the error changes to match the first field.
This was core to our use case, I did not want to hack something together to make this work so I haven't looked into this for a while. I am monitoring this thread, but I had to refactor my code, not using Datastore for now.
Hopefully these issues can be fixed I was really eager to use this, but for now it's a showstopper.

Oh! Sad to hear it, I would like to keep DataStore but implicates to hacking the request buy user and basically remove the @auth from the affected model, let's hope this could be solved sooner than expected.
@elorzafe any updates on this so far?

Hi everybody, I've been having this issue. I'm noticing that it basically only happens when you limit certain operations. Having only operations: ["read"] for me, was producing errors for "onCreate{type}", "onUpdate{type}", and on "onDelete{type}". It seems that the Amplify CLI is generating more than it needs to in subscriptions.graphql and maybe elsewhere. I haven't looked into this more as I just found this out, but it's worth trying if you think it helps! I'll comment again if I can figure out more!

Hi everybody, I've been having this issue. I'm noticing that it basically only happens when you limit certain operations. Having only operations: ["read"] for me, was producing errors for "onCreate{model}", "onUpdate{model}", and on "onDelete{model}". When I added "update" and "delete" operations, only the error for "onCreate{model}" appeared.
It seems that the Amplify CLI is generating more than it needs to in subscriptions.graphql and maybe elsewhere. I haven't looked into this more as I just found this out, but it's worth trying if you think it helps! I'll comment again if I can figure out more.
edit: In case you're wondering, my model was set to only have operations: ["read"] overall despite my project needing to track changes in real time. A few of the items also had "update", but apparently the object overall needs to adopt all operations for DataStore to work.

This is also what I have found. See this https://docs.amplify.aws/cli/graphql-transformer/directives#multiple-authorization-rules
type Draft @model
  @auth(rules: [
    # Defaults to use the "owner" field.
    { allow: owner },

    # Authorize the update mutation and both queries.
    { allow: owner, ownerField: "editors", operations: [update, read] }
  ]) {
  id: ID!
  title: String!
  content: String
  owner: String
  editors: [String]
}

And this translates to:

Draft that stores unfinished posts for a blog. You might want to allow the Draft’s owner to create, update, delete, and read Draft objects. However, you might also want the Draft’s editors to be able to update and read Draft objects.

This is the exact use case I was trying to accomplish and it did not work.

@yuth @elorzafe @undefobj
Can you re-open this issue? It is still not solved in the last relase!

Reopening cc @sammartinez @manueliglesias @iartemiev

Thanks @undefobj, Im going to transfer this to the Amplify JS Repo so we can dig into it


Feature Request: Navigate Tasks with Arrowkeys

Basically what the title says. Probably not a lot of people who would use it but I just noticed myself trying it for Scorpion who got a lot of tasks and being kinda disappointed that it didn't work.

It's a good idea, but it has the same problem that requests for keybinds to change tabs: the UI is just too slow. You'd want to go down 3 quests, hit down three times, and be lucky if you actually went more than 1.
Obviously less than ideal, but I don't like adding functionality that ends up feeling bad :(


Add support for multiple server permanent keys

Fixes #109.

First draft. @lgrahl what do you think?

I've made a few changes (also see the comments in the review).