Client.postThread() no longer seems to work.

This issue was happening before the latest refactor happened.
Trying to use Client.postThread results in a response with an error code of 500 and this json body:
{ message: 'Server has an unknown issue.', status: 'fail' }

I've quintuple checked my credentials to make sure they're correct, and it still results in this error occurring.

Same here

Had no issues posting. some interesting details in the returned response below
console.log     {       media: {         taken_at:<PHONE_NUMBER>,         pk: redacted,         id: 'redacted',         device_timestamp: 0,         media_type: 19,         code: 'redacted',         client_cache_key: 'redacted',         filter_type: 0,         can_viewer_reshare: true,         caption: {           pk: 'redacted',           user_id: redacted,           text: 'This Means HammerTime!',           type: 1,           created_at:<PHONE_NUMBER>,           created_at_utc:<PHONE_NUMBER>,           content_type: 'comment',           status: 'Active',           bit_flags: 0,           did_report_as_spam: false,           share_enabled: false,           user: [Object],           is_covered: false,           is_ranked_comment: false,           media_id: redacted,           private_reply_status: 0         },         clips_tab_pinned_user_ids: [],         comment_inform_treatment: {           should_have_inform_treatment: false,           text: '',           url: null,           action_type: null         },         fundraiser_tag: { has_standalone_fundraiser: false },         sharing_friction_info: {           should_have_sharing_friction: false,           bloks_app_url: null,           sharing_friction_payload: null         },         xpost_deny_reason: 'This post cannot be shared to Facebook.',         caption_is_edited: false,         original_media_has_visual_reply_media: false,         like_and_view_counts_disabled: false,         fb_user_tags: { in: [] },         can_viewer_save: true,         is_in_profile_grid: false,         profile_grid_control_enabled: false,         featured_products: [],         is_comments_gif_composer_enabled: true,         product_suggestions: [],         user: {           has_anonymous_profile_picture: false,           all_media_count: 99,           fan_club_info: [Object],           fbid_v2: redacted,           transparency_product_enabled: false,           text_post_app_take_a_break_setting: 0,           interop_messaging_user_fbid: redacted,           show_insights_terms: false,           allowed_commenter_type: 'any',           is_unpublished: false,           reel_auto_archive: 'on',           can_boost_post: false,           can_see_organic_insights: false,           has_onboarded_to_text_post_app: true,           text_post_app_joiner_number: redacted,           pk:<PHONE_NUMBER>,           pk_id: '7069455076',           username: 'redacted',           full_name: 'redacted',           is_private: false,           profile_pic_id: 'redacted',           profile_pic_url: 'redacted',           account_badges: [],           feed_post_reshare_disabled: false,           show_account_transparency_details: true,           third_party_downloads_enabled: 0         },         image_versions2: { candidates: [] },         original_width: 612,         original_height: 612,         is_reshare_of_text_post_app_media_in_ig: false,         comment_threading_enabled: false,         max_num_visible_preview_comments: 2,         has_more_comments: false,         preview_comments: [],         comment_count: 0,         can_view_more_preview_comments: false,         hide_view_all_comment_entrypoint: false,         likers: [],         shop_routing_user_id: null,         can_see_insights_as_brand: false,         is_organic_product_tagging_eligible: false,         product_type: 'text_post',         is_paid_partnership: false,         music_metadata: null,         deleted_reason: 0,         organic_tracking_token: 'redacted',         text_post_app_info: {           is_post_unavailable: false,           is_reply: false,           reply_to_author: null,           direct_reply_count: 0,           self_thread_count: 0,           reply_facepile_users: [],           link_preview_attachment: null,           can_reply: true,           reply_control: 'everyone',           hush_info: null,           share_info: [Object]         },         integrity_review_decision: 'pending',         ig_media_sharing_disabled: false,         has_shared_to_fb: 0,         is_unified_video: false,         should_request_ads: false,         is_visual_reply_commenter_notice_enabled: true,         commerciality_status: 'not_commercial',         explore_hide_comments: false,         has_delayed_metadata: false       },       upload_id: 'None',       status: 'ok'

noticing that these posts don't have an upload ID. this is something that I actually saw but couldn't figure out how to get. it's probably because there is no upload ID. I can try to figure that out.

Something else interesting that I noticed is that it only worked properly for the first post I had ever made to the account. After that, it didn't give me an error but it also didn't actually upload a new post. When I decided to delete the first post to see what that would do, I started getting the internal server error message.

upload ID isn't something that's returned by any endpoint, which makes me think it could be a timestamp. if you leave a post hanging in Burp Suite and then post it five minutes later, it will return the correct date of when you sent it. but it's not a Unix timestamp. I'll try to figure out what it is.

Something else I was thinking is that it may have something to do with using different android ids for both logging in and sending the post, but I'm not sure how that could have resulted in it working the first time but not any subsequent times.

Unix timestamps work for the upload ID. fix is coming in a sec.


add support to parse stdin in jsonlines format

stdin can be a stream ofnew line seperated jsons
controlled by a -line cmd line flag
fix for #9
parse a -line flag from cmd line args, if set , treats the stdin as newline seperated jsons
can be tested manually
go build .
./jsonui -line < test_big_line.jsonl

Thanks for the pull request @mojozinc !
I am doing a workshop till Wednesday, I will review it as soon as I'm back (around wednesday-thursday).

This is a cool project would be cool to see it pick up some traction!

I'm sorry I don't reply to these PRs, I'm absolutely overwhelmed with my work and family. I will try to review these over the weekend.


entry for table 'users' shows none for multiuser entry

when using python3 tweep.py -s 'truedonaldtrump' --database test.db the saved table 'users' in SQLight, contains the entry 'None' instead of the Usernames. So multiuser entries won't work.
If you use python3 tweep.py -u 'truedonaldtrump' --database test.db the entry of 'users' is right.
Bug or feature?

You can close it. I just wanted to point it out.


bug(mat-menu): Button highlighting persists even after different button is highlighted

Reproduction
Use StackBlitz to reproduce your issue:

https://stackblitz.com/edit/angular-yrcycm?file=src/app/menu-nested-example.html

Steps to reproduce:

Click to open "Animal Index"
Mouse over "Vertebrates" to expose submenu
Mouse over  "Reptiles" to expose submenu
Move mouse down to "Birds"

Expected Behavior
The highlighting on Reptiles should be removed, only Birds should be highlighted
Actual Behavior
Both Birds and Reptiles are highlighted.

Notes
This has something to do with using both ChangeDetectionStrategy.OnPush and <ng-template matMenuContent>. If either is removed, the bug goes away. The reproduction was made by taking the example from the angular documentation and adding those two things. Thanks!

I confirmed that this is fixed in the MDC menu (I currently have a demo deployed on https://jelbourn-dev.web.app)

I think that this is unrelated to MDC, but some change detection weirdness around matMenuContent.


Updated gitattributes to show mojo as primary lang

This PR updates our repository language from Python to Mojo, enriching our project's appeal and accessibility within the developer community.

Hi @grandimam , what is the purpose of gitattribute? Where it is used?


[AutoPR datalake-store/resource-manager/datalake-analytics/resource-manager] Fix ADLA & ADLS readme java config

Created to sync https://github.com/Azure/azure-rest-api-specs/pull/4093

Closing PRs that have been open for more than 1 month.


[CVP] Login -Concierge chat is not created when login in via a link from the expense email

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: v9.0.35-0
Reproducible in staging?: Y
Reproducible in production?: N/A, not receiving expense emails on prod
Issue was found when executing this PR: https://github.com/Expensify/App/pull/49130
Email or phone of affected tester (no customers<EMAIL_ADDRESS>Issue reported by: Applause Internal Team
Action Performed:

As user A(Gmail account) Submit a manual expense of any amount to someone who doesn’t have an Expensify account(Gmail Account). Call this User B
Navigate to the email of User B and locate the expense email
Login to the new dot app via the "Pay" link in the email

Expected Result:
When the user logs in via the link 'Concierge' chat is created
Actual Result:
When the user logs in via the link 'Concierge' chat is not created
Workaround:
Unknown
Platforms:

[ ] Android: Native
[x] Android: mWeb Chrome
[ ] iOS: Native
[ ] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos
https://github.com/user-attachments/assets/3f40a264-4b10-4f56-8ae9-ae70dad11485

View all open jobs on GitHub

We think that this bug might be related to #wave-collect - Release 1

I have tested this in both staging and production and its same so not a blocker
The concierge chat is present in Onyx but it seems like there is some wrong data/ it is created in a different way, so I think this is a backend issue, but we need to investigate what exactly it is. Because of the wrong data/ format the chat does not show up in the LHN.
Here is staging
https://github.com/user-attachments/assets/27cd3494-a321-4003-b25d-81547a91bba9
And here is production
https://github.com/user-attachments/assets/0ccdb4d2-26c7-4087-ac66-cb723818ca22
I put this to newdot quality but its also related to the CVP

Asked in slack here

Hi, I would like to investigate it!

Investigations
After confirming what @mountiny  already investigated (thanks for that buddy!) that the Concierge report record is present in the database in the broken flow, let’s check what decides that Concierge is shown.
To understand better what is happening I decided to compare rendering differences of LHN between regular account creation flow (via signing page) with email notification (the broken) one.
In order to show a report, LHN triggers getOrderedReportIDs which fills in reportsToDisplay bucket of report ids.
One of the checks is shouldReportBeInOptionList function and that’s where the distinction between working and broken flows exists.
https://github.com/Expensify/App/blob/2190f6279041ed8260752294d095bbdda76faebe/src/libs/ReportUtils.ts#L6059-L6062
In working flow, Concierge report falls into isPinned check:

While in broken flow, the report is missing isPinned property:

Takeaways
It looks like when accessing the account for the first time via email notification, the Concierge is not set up same way (missing isPinned property and possibly others) which leads to LHN logic skipping it in rendering.
Let's consult with a backend team if it's something which should be fixed there.
Extra cases
When Concierge report record is removed from local database (indexedDB), it is not revived from the backend on reload as it works with other reports (and with Concierge on regular account).
It may also indicate that something is off server-side with Concierge setup.
Searching for Concierge and starting conversation adds Concierge report correctly, allowing for normal interaction afterwards.

Great, thanks @deetergp!
Let me know what would need to change client-wise after fixes to CompleteGuidedSetup - I will adjust it 🫡
CC @mountiny

@kacper-mikolajczak let us know if there are any more questions here. Thanks!

@mountiny I'm bringing this up here since you commented on a draft PR I was working on where I was waiting till onboarding was completed in order to pin the Concierge chat. Looking at Account::createAccount it looks like we intentionally do not allow the creation of the Concierge chat for invited accounts—accounts that are created in the closed state. Is it your opinion that we should change that? Otherwise waiting till they log in and complete onboarding, which is when the Concierge chats are currently being created, to pin them seems like the correct thing to do in this situation.

@deetergp i see thanks for the explanation. I feel like its odd/ unintuitive to create it in a place like when onboarding is completed. The catch i see is that we are assuming that the user will always complete the onboarding which yes, they should but it relies on fact there wont be any flow/ bug in the frontend where user somehow bypasses completing the onboarding and then they are left with no concierge chat.
What if we create the chat in OpenApp for them? Or the OpenReport, ie the initial interaction with the app?
I think it would be great to get more visibility for this so we are aligned on the best solution, i am not sure if we should rely on the user completing the onboarding modal to create the chat.

To confirm, should we move this to the Open Source room for a bigger discussion?

Does not have to be open source, but would be good to discuss in slack @deetergp

Looks like we've agreed on a plan. I'll start on implementing it later today.

I ran into trouble trying to test this due to my test email being blocked due to changes we made to SES Discussion is here.

The Auth PR to create & pin the chats when we re-open invited accounts that were created closed is out in production. I will try to wrap up the web portion for inviting users to the workgroup later today.

@deetergp - I see that the Auth update is almost in prod. Any update for the web portion?

@alexpensify The automations must have failed to update this GH, but the Web portion of this was deployed to staging a couple hours ago.

It's on prod as of a couple days ago ✅

Eeek, ok, it looks like payment automation is failing here. I'll keep an eye out next week to see if I need to take manual action.

Closing, no payment is needed here since @kacper-mikolajczak is part of Callstack.


Add Shadow and/or Glow effect to Visual

Hello!
I'm trying to write custom theme for Avalonia, but found that there are no DropShadow and Glow effects. Is it possible to add effects for Visual class?

drop shadow is supported in 11.0

Regarding the Glow effect, I've found an easy way to have a nice result:

Put your control with a high blur effect (radius 25 for example)
Stack a copy of your control on top of it

I took a look to the Effect code, but I'm struggling to make sense of it, I don't know how hard it would be to implement it as a variation of the BlurEffect that does a redraw of the original drawing after blurring. (instead of having to double each control that need glow)
Also, it seems there is a typo in this filename.


arduino_stm32: 'class Adafruit_ILI9341_STM' has no member named 'setFont'

try to compile sample at Stm32.
'class Adafruit_ILI9341_STM' has no member named 'setFont'

Hi @NickNifontov !
As you may be aware, the upstream Arduino_STM32 library required some minor changes to accommodate libraries such as GUIslice. The good news is that the upstream repo is just completing testing and (https://github.com/rogerclarkmelbourne/Arduino_STM32/pull/461) should be merged any day now. Once that happens, I will immediately update the GUIslice master and then you could test it out easily. I have already made the changes -- I'm just waiting for the upstream merge.
I have been using GUIslice successfully with an STM32F103 -- which device are you interested in using?
For reference: I believe the version you were testing was (GUIslice branch "arduino_stm32" PR #39), which is based on an alternate patch to the upstream Arduino_STM32 that is less likely to get merged. I think the error could have been due to using the unpatched version of the upstream Adafruit_GFX_AS library (within Arduino_STM32).
My recommendation is to wait a couple more days for the upstream update to complete and then everything should work without any patches :)

It's really good news. I hope all will works 👍
About 2-3 month i'll tried to use a Master copy of GUIslice but no lucky
My Board is STM32F103C8T6 (Blue Pill, 128kbytes) - http://wiki.stm32duino.com/index.php?title=Blue_Pill
Display ILI9341 - https://www.ebay.com/itm/2-4-SPI-TFT-LCD-Display-2-4-Inch-Touch-Panel-LCD-ILI9341-240x320-5V-3-3V-New/162550483037?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m2749.l2649
Currently i have directly use Adafruits_GFX_AS + Adafruit_ILI9341_STM + my privimitive code for GUI
For touch i use modified library (it's work :o) ) -
i'll plan to use GUIslice for touch also ( DRV_TOUCH_TFT_ESPI  ). ok?
Touch.zip

TOUCH
DO_MOSI =PB15
DI_MISO=PB14
CS =PB12
CLK_SLK=PB13
IRQ=PB4
Display
CS=PA9
DC=PA10
RST=VCC

@NickNifontov -- I have now merged the changes that use the latest Arduino_STM32 release. Please re-download Arduino_STM32 and give the latest GUIslice release a try.

Thanks for the followup @NickNifontov . Closing.


[swift-4.0-branch][stdlib] Resolve the ambiguity for Int32.init(bitPattern:)

Explanation: Int32.init(bitPattern: Float) was introduced as part of integers work, but actually causes an ambiguity when used with literals. This change removes the ambiguity and suggests using Int32(bitPattern: float.bitPattern).
Scope of Issue: Fixes an ambiguity that was introduced in Beta 1
Risk: Minimal
Reviewed By: Mark Lacey
Testing: Automated test suite + specific test cases
Directions for QA: N/A
Radar: rdar://problem/32768851

@swift-ci Please test


How to mock React components?

I can't figure out a way to mock React components.
Rewire approach doesn't work: https://github.com/jhnns/rewire-webpack/issues/12
alternative doesn't work https://github.com/speedskater/babel-plugin-rewire/issues/16
Sinon doesn't work it throws some errors when I do import 'sinon'
I don't know how to setup Jest.
Can you provide an example how to mock components in this setup?
Also this: http://stackoverflow.com/questions/31475048/how-to-isolate-and-iterate-over-individual-react-components-in-a-react-applicati

I can include sinon via this config for webpack in my karma.conf
      plugins: [
        new webpack.NormalModuleReplacementPlugin(/^sinon$/,  __dirname + '/sinon-1.15.4.js')
      ],

      module: {
        noParse: [
          /sinon/
      ],

make sure to download sinon
that being said,  I can't mock anything because all my react components are created before I get a chance to mock martyjs

@eguneys a new version of babel-plugin-rewire is available which should fix the latest bugs. Could you please let me know whether your errors still persist.

i use "sinon": "git://github.com/cjohansen/Sinon.JS#sinon-2.0" and no problem with similar setup with: babel, babel rewire plugin, karma, mocha...

I initially went with Jest and it worked pretty well, but I encountered node.js compatibility issues as a result of depending on the JSDom package which is why I ended up the Mocha route.
In any case, have a look at https://github.com/badsyntax/react-seed/commit/7a5fc1cc6e4584a93fceb6fd7195a0cb1371a6ff I've added a mocking component example using the babel-plugin-rewire package.

I have a higher order component:
import React from 'react';

function withMUI(ComposedComponent) {
  return class withMUI {
    render() {
      return <ComposedComponent {...this.props}/>;
    }
  };
}

and a component:
@withMUI
class PlayerProfile extends React.Component {
  render() {
    const { name, avatar } = this.props;
    return (

{name}

          <Avatar src={avatar}/>

    );
  }
}

and a (passing) test using React.findDOMNode
describe('PlayerProfile', () => {
  // profile is type of `withMUI`
  let profile = TestUtils.renderIntoDocument(<OkeyPlayerProfile/>);

  it('should work', () => {
    let elem = React.findDOMNode(profile);

    // logs successfully
    console.log(elem.querySelectorAll('.player-profile'));
  });

  // ...
});

and another (failing) test using TestUtils:
   // ...
   it('should also work', () => {
     let elem = TestUtils.findComponentWithTag(profile, 'div');
     // throws can't find a match
     console.log(elem);
   });

If I remote the @withMUI decorator it works as expected. So why does a decorator effect TestUtils.findComponentWithTag and how can I make this work?
How can I mock withMUI function? using babel-plugin-rewire. or rewire?

I'm unsure if babel-plugin-rewire or rewire would be able to mock that. TBH i'm not exactly familiar with either so I'm trying to figure this out myself. Could you update your examples to include all the require calls? It just helps me understand your scenario better.
When I have some time I'll look into this.

updated, also asked the same question here: http://stackoverflow.com/questions/31553167/react-testutils-doesnt-work-with-decorators-or-how-to-mock-higher-order-functio?noredirect=1#comment51073353_31553167

@badsyntax Imho to be able to mock withMUI with babel-plugin-rewire you have to export a factory which returns the component instead of the component itself. The reason is that the returned component has already got withMUI applied.

@speedskater The reason I am mocking withMUI is to get rid of the wrapper, I can't solve that by adding another wrapper lol.

@eguneys Good point :)

@speedskater can you give an example of how to do this?
I've been having some troubles understanding how to do this at all. In my component file, I define the decorator like so:
var withMUI = function(ComposedComponent) {
  //...
}

@withMUI
export default class Menu extends Component {
  //...
}

I've tried to mock both the decorator and the class but I can't remove the decorator from the exported class. I've tried the following:
function mockedWithMUI(ComposedComponent) {
  return class withMUI {
    render() {
      //...
    }
  };
}

MenuItem.__Rewire__('withMUI', mockedWithMUI);

@mockedWithMUI
class MockedMenuItem extends MenuItem {

}

Menu.__Rewire__('MenuItem', MockedMenuItem);

..but all that does is add another decorator onto the class instead of replacing the withMUI decorator..

@badsyntax As far as i have understand you cannot test your component in this way. The reason is, that  - as you have already recognized - you have already decorated your class at import time and mocking the decorator at this point in time won't change your class's behaviour. Your only change is to use a factory function
export function createDecoratedComponent() {
return @withMU,,,,
}
and mock the decorator @withMUI before actually calling createDecoratedComponent.
The drawback in this case is that you generate a new class definition each time you use the module.
Another possibility would be to separate the definition of the plain MenuItem Component from the decorated component. This would allow you to test them separately.
I am not an expert in using decorators but as far as i have understood decorators are only functions which convert classes into other classes. Therefore it should be possible to create two separate files.
MenuItem.js with the undecorated component and
MenuItemDecorated.js which calls the decorator explicitly on the imported MenuItem class
Hope this answer is not too confusing and helps you to test your component.

@speedskater Apologies for the belated response. Yes that makes sense, it's awkward though, i'm sure you'll agree. We don't really want to call factory functions for generating class definitions.
I was hoping there was some way to remove a decorator from a class definition. (Any suggestions?) Alas I'm not familiar enough with decorators and the transpliation process to understand a better approach here.

Sorry I didn't finish reading the entire comment.

MenuItem.js with the undecorated component and
MenuItemDecorated.js which calls the decorator explicitly on the imported MenuItem class

This seems like the best approach IMO. @eguneys does that work for you?

@eguneys see my answer here on your post https://stackoverflow.com/questions/31459720/how-to-test-decorated-react-component-with-shallow-rendering/32194659#32194659.
I'm having the same problem testing decorators. You pretty much have to wrap your component in another higher order component/decorator in your tests, and have that higher-order-component/decorator provide the state/props/context that withMui expects. Seems ugly and not dry but I'm not sure of another way?


Confusing message in fybrik application status

When deploying fybrikapplication with write flow and with a policy preventing to use existing storage account the following message appears in the fybrikapplication status: Deployed modules do not provide the functionality required to construct a data path for new-data-parquet while the manager log reveals the true reason for the fail: Could not find a storage account, aborting data path construction
  Asset States:
    New - Data - Parquet:
      Conditions:
        Status:   False
        Type:     Ready
        Status:   False
        Type:     Deny
        Message:  An error was received for asset new-data-parquet . If the error persists, please contact an operator.Error description: Deployed modules do not provide the functionality required to construct a data path for new-data-parquet
        Status:   True
        Type:     Error

the policy deployed:
      package dataapi.authz

     rule[{"action": {"name":"RedactAction","columns": column_names}, "policy": description}] {
        description := "Redact written columns tagged as sensitive in datasets tagged with finance = true"
        input.action.actionType == "write"
        input.action.destination != "theshire"
        column_names := [input.resource.metadata.columns[i].name | input.resource.metadata.columns[i].tags.sensitive]
      }

storage account:
apiVersion:   app.fybrik.io/v1alpha1
kind:         FybrikStorageAccount
metadata:
  name: theshire-storage-account
  namespace: fybrik-system
spec:
  id: theshire-object-store
  region: theshire
  endpoint: "http://s3.fybrik-system.svc.cluster.local:9090"
  secretRef:  bucket-creds

fybrikapplication:
apiVersion: app.fybrik.io/v1alpha1
kind: FybrikApplication
metadata:
  name: my-notebook-write-new
  namespace: fybrik-notebook-sample
  labels:
    app: my-notebook-write
spec:
  selector:
    clusterName: thegreendragon
    workloadSelector:
      matchLabels:
        app: my-notebook-write
  appInfo:
    intent: Fraud Detection
  data:
    - dataSetID: 'new-data-parquet'
      flow: write
      requirements:
        flowParams:
          isNewDataSet: true
          catalog: fybrik-notebook-sample
          metadata:
            tags:
              finance: true
            columns:
            - name: nameOrig
              tags:
                PII: true
            - name: oldbalanceOrg
              tags:
                sensitive: true
        interface:
          protocol: fybrik-arrow-flight

log message from the manager:
{"level":"debug","Controller":"FybrikApplication","FybrikApplication":"fybrik-notebook-sample/my-notebook-write-new","app.fybrik.io/app-uuid":"e4b4efbb-2500-4cbc-a54c-3c87865ce2e2","DataSetID":"new-data-parquet","time":"2022-05-16T03:27:46Z","caller":"/data/the-mesh-for-data/manager/controllers/app/select_modules.go:128","message":"Could not find a storage account, aborting data path construction"}

I think the status type is also wrong - it should be deny instead of error. @shlomitk1 what do you think? Thanks

I think the status type is also wrong - it should be deny instead of error. @shlomitk1 what do you think? Thanks


Updated ML definitions

As titled.
All Id issues will be fixed in a separate pr.
Related: https://github.com/elastic/kibana/pull/83808#issuecomment-791479571
/cc @jgowdyelastic

will it also be possible to update the version of es these types are generated against so findFileStructure is removed from kibana.d.ts?

will it also be possible to update the version of es these types are generated against so findFileStructure is removed from kibana.d.ts?

These types are not generated, but created and maintained by hand, if a type is wrong it should be updated directly here :)

I've added the text_structure.find_structure as well, in a subsequent or I'll update all of our json spec files, which are out of date.


cv.threshold bugfix

still does not write to dst though, don't know why

Why is it a fix ? I think you are supposed to pass in the type field the cv type, like cv.CV_8U, right ? This might even introduce silent bugs, because the underlying C function expects a valid type

type is threshold type here http://docs.opencv.org/2.4/modules/imgproc/doc/miscellaneous_transformations.html?highlight=threshold#threshold

Ok, got it :)


Fix dependency issue for usage as Grafana data source.

Pyparsing v3 was recently released, breaking compatibility of graphite-web for usage as Grafana data source. This was observed in Grafana v6.7.x and v8.0.3.
Until compatibility with pyparsing v3 is implemented, this change prevents breaking future deployments of graphite-web as grafana datasource.

💔 Some backports could not be created

Status
Branch
Result

❌
1.1.x
Cherrypick failed because the selected commit was a merge commit. Please try again by specifying the parent with the mainline argument:

backport --mainline

or:

backport --mainline

Or refer to the git documentation for more information: https://git-scm.com/docs/git-cherry-pick#Documentation/git-cherry-pick.txt---mainlineparent-number|
To backport manually run: node scripts/backport --pr 2722.
For more info read the Backport documentation


gopls complains about AddImportArgs.ImportPath when saving files

Hi,
with following configuration:
use {
  'ray-x/go.nvim',
  config = function()
    require'go'.setup {
      gofmt = 'gopls',
    }
    vim.api.nvim_create_autocmd('BufWritePre', {pattern = '*.go', callback = require('go.format').goimport})
  end
}

I see this kind of error message on file saves:
gopls: 0: json: cannot unmarshal object into Go struct field AddImportArgs.ImportPath of type string

Strange thing is, when running :GoImport command manually, it just works as expected.
When I replace callback = require('go.format').goimport with callback = require('go.format').gofmt,
files are saved without any error message.
I'm experiencing this issue since 1 or 2 days ago.
Maybe I missed something?

neovim version: both on v0.7.0 and v0.8.0-dev+3101-ge50b1fe60
go version: v1.18.2
gopls version: v0.8.3
goimports version: latest version installed with :GoUpdateBinaries command

FYI, I tested with other versions (go 1.17, 1.18.1 and gopls 0.8.2) but the same.
I still don't get what's the difference, but will try finding out and let you know.

Thanks. As I can not reproduce and the error is from gopls. Can not offer much help.
But you can check the logs from neovim ~/.cache/nvim/lsp.log to see if there is any useful info.

Thanks for the tip! But unfortunately, I cannot see useful logs there.

I found out that replacing the line in my config:
vim.api.nvim_create_autocmd('BufWritePre', {pattern = '*.go', callback = require('go.format').goimport})

with the following line (as in the README):
vim.api.nvim_exec([[autocmd BufWritePre *.go :silent! lua require('go.format').goimport()]], false)

fixes my problem.
I still don't get what made the difference recently, but I will stick with the vim script version for now.


There are logical duplicates in the Countries list

E.g., US and United States of America.

See also Mexico and Australia.

@monika-aashe You commented on ticket https://github.com/AASHE/hub/issues/46,

Relevant to Country filter: Because Salesforce allows you to type in the country, there are several duplicates: Examples include "United States of America", "Mexico", and "Australia".

I can't find these duplicates.  Can you tell me where you see them?  I looked in the user interface and the database and don't see any dupes.

@rerb - The duplicates don't show up anymore. I think the issue was fixed when #46 got closed.

Excellent!
On Tue, Feb 2, 2016 at 1:04 PM, monika-aashe<EMAIL_ADDRESS>wrote:

@rerb https://github.com/rerb - The duplicates don't show up anymore. I
think the issue was fixed when #46
https://github.com/AASHE/hub/issues/46 got closed.
—
Reply to this email directly or view it on GitHub
https://github.com/AASHE/hub/issues/189#issuecomment-178725408.

--
Robert Erb
Web Application Developer
Association for the Advancement of Sustainability in Higher Education
www.aashe.org |<EMAIL_ADDRESS>|<PHONE_NUMBER> ext 35
--
Join us in Baltimore, Maryland from Oct. 9 - 12 for the AASHE 2016
Conference & Expo, themed Beyond the Campus. Call for proposals and
reviewers now open https://ww4.aievolution.com/ash1601!
Connect with us:   Website http://www.aashe.org/ | Facebook
https://www.facebook.com/aasheorg | Twitter
https://twitter.com/AASHENews | LinkedIn
http://www.linkedin.com/company/aashe

Email Confidentiality Notice
http://www.aashe.org/email_confidentiality_notice


--output-to-tar

Is this something that could be merged?  output-to-tar functionality seems to work well, so I wonder is this a feature that got lost in the process?
https://github.com/mapbox/tippecanoe/pull/789

It was a useful feature that allowed me to stream data directly into other databases (Clickhouse), without having to parse the MBTiles file afterward. This approach enabled to join the tile features with other data tables without the need to recreate the MBTiles file each time frequently changing data gets updated.
Not having the feature does not exactly break the workflow - just makes the process take a bit longer. Not a big issue, especially if the current code does not support this feature anymore.


NoUnusedImportsFixer - Fix extra blank line

Fixes an edge case bug with no_unused_imports fixer: when removing several consecutive use statements, some because they are not used and some because they are superfluous (same namespace), the fixer leaves an extra blank line, which then isn't removed by no_extra_consecutive_blank_lines fixer. If you run the tool again, the extra line is correctly removed by no_extra_consecutive_blank_lines.
Here is the result of one of the tests I added, before the fix:
 <?php

 namespace Foo;

-use Foo\A;
-use Foo\Bar\B;
+
 use Foo\Bar\C;

 abstract class D extends A implements C
 {
 }

I first thought this was a priority issue, but the fixers already run in the correct order (and this is covered by an integration test).
But the issue is that when removing a token, it is actually replaced with an empty one, so you might end up with whitespace tokens being separated by several empty tokens, even when using Tokens::clearTokenAndMergeSurroundingWhitespace(). This must be taken into consideration when dealing with whitespaces.

Thank you @julienfalque.


Release process for macOS needs to fail if the notarisation step does not return the status as Accepted.

We have moved away from electron based code-signing for macOS to a separate, manual code-signing process.
Once the code signing is completed and we submit the signed app to the notary tool, the notary tool runs a number of validations on the signed files within the app, and if everything is fine, the command execution status is returned as success and provides a response with status="Accepted".
If there are issues identified by the notary tool, the command execution status is returned as success but the notary tool provides a response with status="Invalid". In this case, the process needs to fail, so that it becomes evident that the entire code sign process has been unsuccessful.

Hi @itsmesamster, I remember that the status will be mentioned for each check which means that the word Accepted will be repeated and we can't look for that word only.
I think the best solution it to look for the line with the final result. We can add this line to the configuration file and compare each line the output of the command to it. Finding this line will mean that the notarizing is accepted.
Therefore, I need to whole line at the end of the notarizing logs where the result is stated to put in the configuration file.


Frontend SDK Documentation

@ninjeeter Move that to our new dev doc: https://github.com/caido/doc-developer


Make better organization selection UI for the ghosting screen

Currently, the ghosting screen of the superadmin view is a long dropdown that makes it difficult to select which org we want to ghost into/to fulfill support request. Designing/implementing some better selection UI will be a quality of life improvement for SR/CDC support staff

using combo box UI element from USWDS: https://designsystem.digital.gov/components/combo-box/


ValidateUserInternal could be called prior to UpdatePasswordHash?

When CreateAsync  a user, UpdatePasswordHash is called prior to checking ValidateUserInternal , whereas one could reverse the order such that, e.g. if UserName is already taken ValidateUserInternal will return an error without the need to go through UpdatePasswordHash.

The general pattern for identity is to update the user with all the changes, and then run validation as the last step before saving changes.  There's nothing preventing a validator from wanting to inspect the password hash which it would not be able to do if it ran before the password hash was updaated.


Release pipeline: Incorrect content in generated announcement

The announcement generated by the release pipeline has the following incorrect content:

RELEASE_CHANNEL is not resolved as a variable. It's inserted literally as RELEASE_CHANNEL in the content.
For servicing release:

Tag URLs reference https://github.com/dotnet/dotnet instead of https://github.com/dotnet/installer.

For an example of this, you can see the history of the post at https://github.com/dotnet/source-build/discussions/3368.

The tag URL is a real mystery to me. I can see the announcement text here correct:
https://dev.azure.com/dnceng/internal/_build/results?buildId=2155290&view=logs&j=3a04dffd-22cf-5707-fa41-9bd4708cc1db&t=b8061e11-088f-53b6-e12b-b3c826bcd3af&l=79
Then, when creating the announcement, the variables that are filled in the template are outputted again: https://dev.azure.com/dnceng/internal/_build/results?buildId=2155290&view=logs&j=19992227-62fb-5b50-4e29-3b72bd33eea1&t=a83d7a9e-2e19-5733-3923-52a07f576962&l=136
which comes from here:
https://dev.azure.com/dnceng/internal/_build/results?buildId=2155290&view=logs&j=19992227-62fb-5b50-4e29-3b72bd33eea1&t=a83d7a9e-2e19-5733-3923-52a07f576962&l=53
Both seem correct so I have no idea how dotnet/installer got its way in..

Oh, I see, the dev/mthalman/release branch was based on 11a3223cf1f50a2551c5b0cf87d6b8672093e798 and not on top of main which already had some fixes such as this one: https://github.com/dotnet/source-build/commit/4cd2965e63aa2d23112c4bb03282a4e905977a6f

Oh, I see, the dev/mthalman/release branch was based on 11a3223cf1f50a2551c5b0cf87d6b8672093e798 and not on top of main which already had some fixes such as this one: 4cd2965

I'm not seeing what you're seeing.

This is now fixed (example pipeline)


Messages are too short in width.

Hi, I don't know if it is normal nor fixable with configuration but all my messages are too short in width and for reading code it's really annoying etc :/

I have made the message bubbles a little wider, unfortunately I have not found any way to display the code in full width.
if that is not enough for you, it would be better to disable the chat bubbles in the theme settings. 🙄

It's still broken for me

But, there is something weirder, on replies the code is normal :

I think it has to do with one of my plugins, but I don't have any idea 🤔

Outdated Bug from CreArts v2.


BaseMessagePresenter properties became public

Current coverage is 62.53%

Merging #63 into dev will increase coverage by +0.07% as of 0a06275

@@              dev     #63   diff @@
=====================================
  Files          57      57
  Stmts        2867    2867
  Branches        0       0
  Methods         0       0
=====================================
+ Hit          1791    1793     +2
  Partial         0       0
+ Missed       1076    1074     -2

Review entire Coverage Diff as of 0a06275

Powered by Codecov. Updated on successful CI builds.


Tests: Move away from hbmqtt

poetry is unable to install hbmqtt 0.9.6: https://github.com/python-poetry/poetry/issues/3649
and it is incompatible with Python 3.9: https://github.com/beerfactory/hbmqtt/issues/223
Viable alternatives :shrug::

https://github.com/Yakifo/aio-hbmqtt

Can you take a look @freekode?

Yep, will check it out.

@pschmitt
an alpha release is out the door:
amqtt==0.10.0a1
please note that while the package name changed, the module name is still hbmqtt
We do intend to change it later on though. For now we want to keep it a drop-in replacement.
This might be a problem if there is a project that includes both, hbmqtt as well as amqtt. While in general I assume this won't happen in most projects for home-assistant that might be a problem

Glad to see that things are moving forward on your end.
Our CI indicates that amqtt isn't quite 100% compatible with hbmqtt's API. Can you point somewhere to fix it?


[fix](storage medium) Fix show partition storage medium not right whe…

…… (#30160)
Proposed changes
Issue Number: close #xxx

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall


MM-32785: In CRT, Prevent incoming replies via WS and handle feature toggling without refresh.

Summary
When CRT is toggled:

<CRTPostsChannelResetWatcher/> will respond by firing resetReloadPostsInChannel to add or remove any replies in the current channel. postsInChannel will be hard-reset, and will be rebuilt as you switch channels. The watcher component is above the router so it can reset postsInChannel when an admin toggles the feature for themselves in system console.

With CRT:ON:

Initial loading of posts do not include replies. (done prior, see https://github.com/mattermost/mattermost-redux/pull/1383)
Ongoing websocket events still bring in replies for ThreadViewer, but postsInChannel's reducer will ignore these.

Ticket Link
https://mattermost.atlassian.net/browse/MM-32785
Screenshots

Release Note

NONE

@devinbinnie @ogi-m can you help with a review here and merge as soon as it's approved? Would like to get this in for tomorrow's testing session if possible. cc// @calebroseland


Use latest version of Sphinx to fix RTD "Edit on GitHub"

This PR fixes the issue found by @parente where RTD's "Edit on GitHub" was not correctly redirecting to markdown source and throwing a 404 instead. The cause was an underlying bug in Sphinx which has been fixed as 1.3.6.
I've updated our version of Sphinx to 1.3.6 or greater.

Thanks @Carreau


experiment: Add complete record for spoonlabs/sorald PR 381

Adds the complete record for spoonlabs/sorald#381 to prs.json.
This includes the initial data, the "manual" edit (autoformatter removed an import statement), and the final data.
Merge #394 before this one

Merging this one too.

@fermadeiral Awesome, it worked. See 651ab7902778341d8e76441b1a7b67f791dfa2b1
Even though it says "co-authored by ...", it only lists the github-actions bot as the contributor. Great success!

@slarse great!


Error connecting Neo4j - Please check Backend connection

Hello,
I'm using the online version: https://llm-graph-builder.neo4jlabs.com/
When trying to connect a Neo4j 5.16 I'm getting this error "Please check backend connection".
I've created a new AuraDB and that works fine, but not with my own Neo4j instance installed in AWS Linux.
I Have already tested in the security.log and I see that just before getting the message the connection aparently is fine.

but after connecting, I finally get a "Please check backend connection" and the application discconects

Thanks in advance

Hi @joseptg are you able to resolve this issue?


Add 24/7 CFE

Insert URLs to the project here:
https://github.com/PyPSA/247-cfe

[x] The projects is active, documented, open source licensed, shows usage from external parties and is directly targeting environmental sustainability. Find more details in the Contribution Guide.

All issues labeled as 'Good First Issue' of the project listed on OpenSustain.tech will be visible on ClimateTriage.com. This is a great way to welcome new community members to your project.

@Irieo


Constraints

update: currently debugging on an unsatisfied PC check using tracing.

Note: This branch uses the constraints branch of poly-commit. Once poly-commit's PR is merged, this part needs to be changed.

(Help needed. The no_std error seems weird, though ci.yml for this branch has been updated.)

Merging with the additional conflicts with the fix to the main branch...

btw, is it possible to have a "reviewing" guide here? Which parts should I focus on, which parts are "trivial", etc.

No problem. Will do for both.

Thanks, much appreciated =)

(We would pause here and leave the changes in the constraints branch, and we will come back after the paper deadline.)


Unnecessary rebuilds in build script

I noticed that our benchmark files are repeatedly generated every time we benchmark. Given the size of the artifacts used, that process takes a while. It's also not expected, but it's not clear why exactly that is (it's possible that the dependencies we have cannot properly be expressed in build scripts at all). We should see if that can be fixed so that we only re-generate those files if something changed.

I had a look at this issue. The problem seems to be that the generated files' mtimes are after those of the output that they are compared against to determine staleness. Intuitively, that makes no sense, because it is the build script that emits those outputs to stdout while also generating those files. Hence, the build script's outputs can only be available completely after said script has run (that is, after the files have been generated as well).
This behavior seems to be caused by https://github.com/rust-lang/cargo/blob/4a60ff78a5f03e7c9ed2399754efb62c80a8ecc8/src/cargo/core/compiler/fingerprint/mod.rs?L249#L249-L256 and so is fully intentional to the degree I can tell. I haven't dug into why exactly that is (the comments doesn't make it clear to me), but I will say that we are somewhat out of the purview of what build scripts are meant to be used for. E.g., just check https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-the-build-script
This is not a blocking issue, but it's not great behavior either. One thing I believe we can do is rewind the mtimes of our generated files to a time before the output file's mtime.


Added typescript support

Added index.d.ts  file and updated the readme for that

Sorry, it's better to publish them to DefinitelyTyped https://github.com/sindresorhus/ama/issues/439

I now accept TypeScript definitions if anyone looking is interested in submitting it here.
See: https://github.com/sindresorhus/ama/issues/439#issuecomment-414212229
Please follow this guide: https://github.com/sindresorhus/typescript-definition-style-guide


refactor: fix implicit array creation

Description
Implicit arrays are prone to bugs.
Checklist:

[x] Securely signed commits
[ ] Component(s) with PHPDoc blocks, only if necessary or adds value
[ ] Unit testing, with >80% coverage
[ ] User guide updated
[x] Conforms to style guide

Thank you @paulbalandan


Unable to configure - Unknown error

Describe the bug
After installation, filling in the configuration data and then clicking Submit, I get an 'Unknown error occurred' message.
Expected behavior
Addition of Tuya 2 integration
Screenshots
Account and password deliberately not included in image.

Home Assistant Version
2021.8.0

I got that when deleting and reinstalling a blind without restarting HA. It was as though it thought the blind was still there.
After a restart, it went through fine.

I have tracked this down to not being able to communicate with the server.
HTTPSConnectionPool(host='openapi.tuyacn.com', port=443): Max retries exceeded with url
From my instance of HA I cant access this server but I do get a response from openapi.tuyaus.com and openapi.tuyaeu.com
How can I change the Tuya endpoint

Try v1.5.0.

try with +64 in Country code.

@godzone  Have you problem solved in v1.5.0?


HS App: Fix import for HsApp.css.js

HS App: Fix import for HsApp.css.js
This update fixes the import paths for the utilities used in HsApp.css.js

Pull Request Test Coverage Report for Build 1917

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 100.0%

Totals

Change from base Build 1912:
0.0%

Covered Lines:
7391

Relevant Lines:
7391

💛  - Coveralls


Devise locale file

I'm probably doing something wrong here, but i have set default locale (application.rb => config.i18n.default_locale = :el) and i have the gem, but i don't get the devise.el.yml file and thus i get error messages from the flash messages and such.
For the record, these are my gems that i use for bootstrap views, devise and rails i18n:
gem 'devise-bootstrap-views'
gem 'rails-i18n', '~> 4.0.0'
gem 'devise-i18n'
gem 'devise-i18n-views'
for the time being i copy-pasted the data but i would like to know.

What error message?

I have no idea what this was, it's been like a year since i posted it....


Support alias of derived table reference

I was testing sqlparser-rs 0.9.0, and found it doesn't support alias of derived table reference.
The following code will produce error:
use sqlparser::{dialect::PostgreSqlDialect, parser::*};

fn main() {
    println!(
        "{:?}",
        Parser::parse_sql(
            &PostgreSqlDialect {},
            "select * from (t inner join t1) t2;"
        )
    ); // Output: Err(ParserError("Expected end of statement, found: t2"))
    println!(
        "{:?}",
        Parser::parse_sql(
            &PostgreSqlDialect {},
            "select * from (t inner join t1) as t2;",
        )
    ); // Output: Err(ParserError("Expected end of statement, found: as"))
}

While the SQL query can work fine in PostgreSQL.

@leiysky any updates regarding this? Maybe the issue is outdated?

@leiysky any updates regarding this? Maybe the issue is outdated?

Thanks for reminding me, it seems has been fixed in the latest version.


STAThread Code fix

A common pattern in our remaining NUnit 2 tests is:
    [Test]
    [STAThread]

The analyser picks this up nicely, but it's a pretty simple fix to:
[Test, Appartment(ApparatmentState.STA)]

Would this be a good idea for another code-fix? I figure it should be restricted to where STAThread appears on the same method/class as TestAttribute/TestFixtureAttribute. 🙂
Thanks for putting this tool together - it's coming in pretty useful on a project I'm looking at at the moment!

Should be a straightforward task. I'll consider it for development soon.

Closed by mistake. The feature is not released yet.

Brilliant - thanks for adding that!


Repeating "unknown" status on windows machines

I'm getting "unknown" for many of my windows machines in randomly occurring 5-30 minute intervals. It seems that WMI related processes are spiking CPU usage during this unknown interval. Anyone else observing similar problems? BR /Anders

What version of Powershell is the system using? Please paste the output of $PSVersionTable from a Powershell prompt here. Also are you using Desired State Configuration by chance?

Name                           Value
----                           -----
PSVersion                      4.0
WSManStackVersion              3.0
SerializationVersion           <IP_ADDRESS>
CLRVersion                     4.0.30319.34209
BuildVersion                   6.3.9600.17400
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion      2.2

I have not configured or used DSC directly, I am not aware of any software on our servers that interact with DSC.
Have you observed similar issues?

We saw some issues with DSC on one of the Powershell 5.0 previews causing WMI queries to stall on a few systems. How many CPU cores do these systems have? We've seen CPU spikes on single or dual core VMs, but even then they usually are short and less than 10%.
Another thing to check is if it is just the WMI metrics or if ALL metrics go unknown. You can compare the graphs for os.cpu (based on WMI) and something like scollector.collect.sent (based on an internal counter) to see if it is just WMI metrics or all metrics.
There are also a bunch of metrics in the scollector.* area that can help find issues (GC stats, post size/duration/errors, collector duration/errors) so digging through those might help narrow down the issue.

Thanks for the tips, here are some findings:
The os.cpu (and others) have long unknown periods, scollector stats do not have unknown periods.
The machines with problems have at least 8 cores and are physical machines not VMs.
This graphs bellow is of data from one of the most problematic machines:

There are tons of threads about WMI performance issues with many suggested causes and solutions, I have not found why my machines are having issues yet. The only common pattern I have found yet is that the issues get worse when the load increase, and this only applies to windows machines and the WMI-collectors.
Thank you for the help this far, I will report back if I find the actual cause of the problems.


Harder Example Mining

Hi! Thanks for your great work!
Is harder example mining a method from a published paper? If yes, can you tell me the name of this paper? Thanks

Hi! Thanks for your great work!
Is harder example mining a method from a published paper? If yes, can you tell me the name of this paper? Thanks

No, it originates from my project, which is a improved version of hard example mining. The principle of mathematics can be seen in this link

    You add the two lines：
    dist_ap *= (1.0 + self.hard_factor)
    dist_an *= (1.0 - self.hard_factor)
    then, it becomes harder triplet loss?


Improve issue management (closes #346).

Added a new docs/labels.md to reference all labels used in
GitHub issues and pull requests.
Added a visual developer workflow diagram at
docs/assets/developer-workflow-opaque-bg.png (original src
graffle added as well).
Updated CONTRIBUTING.md to reflect the improved issue
management process.

/skip-all

/skip-all

The forced push was due to a rebase to ensure we are reviewing latest set of docs.

/skip-all

@McCodeman actually looks like you haven't fixed the errors reported by the spell checker yet?

/skip-all

Ignoring failed Kind test because this is purely a documentation PR


Update docker-compose.yml

Change comment out to uncomment out

Thanks @lyenliang for the pull request!
Per the CONTRIBUTING.md file displayed when you created this pull request, we need to add you to the list of approved contributors for the Mattermost project.
Please help complete the Mattermost contribution license agreement?
This is a standard procedure for many open source projects. Your form should be processed within 24 hours and reviewers for your pull request will be able to proceed.
Please let us know if you have any questions.
We are very happy to have you join our growing community! If you're not yet a member, please consider joining our Contributors community channel to meet other contributors and discuss new opportunities with the core team.

Hi @lyenliang, thanks for your contribution :)
If you sign the CLA I will merge your PR :+1:


signed url's for private user datasets

@VincentVerelst  assigning to you for testing, please close this one if it works.

@jdries , I can confirm this is working. However, I don't have permissions to close this issue.


I have onClick events on each child image. But they all get fired on load. After that they can never fire again when I click on them. I see some similar issues but no solution has worked for me.
Link to sandbox with this issue: https://codesandbox.io/s/react-slick-playground-unh8y?fontsize=14&hidenavigation=1&theme=dark
I need to update another component based on which child gets selected (clicked). Is there any workaround?
Thank you!

If you pass any function like this or call anything directly on onClick it will get executed as soon as the component mounts. Instead you should pass the function without () or bind it using .bind. In your case you should have passed the alert inside a function  and then to onClick below given examples will help you understand the ways you can pass a function to onClick.
import React from "react";
import ReactDOM from "react-dom";
import Slider from "react-slick";
import "./index.css";
class ReactSlickDemo extends React.Component {
onClickHandler(val) {
alert(val);
}
render() {
var settings = {
dots: true
};
return (

<Slider {...settings}>

//Your way of calling function

 alert(2)}>//correct way of calling function

 this.onClickHandler(3)}>//correct way of calling function

//correct way of calling function

);
}
}
https://reactjs.org/docs/faq-functions.html -> This will guide you in a much better way.

Thank you very much for the explanation and the useful link!


Can't add C225 to Homebridge

Describe Your Problem:
I'm unable to add my Tapo C225 to the plugin. I previously haven't connected it.
When the device and service is on, I consistently get the "Invalid device" error.
I've checked that:

IP is correct
RTSP is enabled
tried different variations of user/no user name for Tapo username/password
there aren't any special characters in the user name or password for the RTSP feed

I'm mostly just trying to get the Privacy Switch enabled so I can add an automation.
Logs:
[7/23/2024, 4:59:59 PM] [tapo-camera] Error at 'getStatusAndUpdateCharacteristics'. Error: Invalid device confirm
    at TAPOCamera.refreshStok (/volume1/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:205:15)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at TAPOCamera.getAuthenticatedAPIURL (/volume1/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:335:19)
    at /volume1/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:415:23
    at TAPOCamera.getStatus (/volume1/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:555:18)
    at CameraAccessory.getStatusAndUpdateCharacteristics (/volume1/homebridge/node_modules/homebridge-tapo-camera/src/cameraAccessory.ts:234:27)
    at Timeout._onTimeout (/volume1/homebridge/node_modules/homebridge-tapo-camera/src/cameraAccessory.ts:212:7)

Plugin Config:
 "cameras": [
                {
                    "name": "Tapo Homekit",
                    "ipAddress": "<IP_ADDRESS>",
                    "password": "passXXXXXXXX",
                    "streamUser": "userXXXXXXXX",
                    "streamPassword": "passXXXXXXX",
                    "debug": true,
                    "disableStreaming": true,
                    "disableAlarmAccessory": true,
                    "disableMotionAccessory": true,
                    "privacyAccessoryName": "Tapo Privacy",
                    "alarmAccessoryName": "Tapo Alarm"

Environment:

Plugin Version: 2.3.4
Homebridge Version:v.1.8.4
Node.js Version: v18.18.2
NPM Version:
Operating System: Synology DSM

Update:
Switched over to a Raspberry Pi with NodeJS v20.12.2 and I’m still experiencing the same issue.

I am experiencing the same:
[8/7/2024, 1:05:12 AM] [Tapo Garage Cam] Error when retrieving data Error: Invalid device confirm
    at TAPOCamera.refreshStok (/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:213:15)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at TAPOCamera.getAuthenticatedAPIURL (/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:349:19)
    at /homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:429:23
    at TAPOCamera.getStatus (/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:612:26)
    at CameraAccessory.getStatusAndNotify (/homebridge/node_modules/homebridge-tapo-camera/src/cameraAccessory.ts:205:28)

I just figured out. Try to scroll to the top of error logs, there should be something like:
[8/7/2024, 1:15:30 AM] Please add [Tapo Garage Cam 86C9] manually in Home app. Setup Code: xxx-xx-xxx
Add the camera manually in homekit. However, accessories of the camera are not working.

Same issue as https://github.com/kopiro/homebridge-tapo-camera/issues/132


Expose equivalent curl command.

Make equivalent curl command available through `AsCurlCommand()' method.
Includes corresponding unit-test.

LGTM thank you


Infinite loops take up a ridiculous amount of memory

If I run
(define (loop) (loop))
(loop)

then it uses a ridiculous amount of memory

this linearly increases, which means it ate 16% of my 8GB memory in 22s, which means it's eating 58 MB/s.
Either it should error with a max recursion depth or it should tail recurse

The interpreter is tail recursive, which is why we aren't getting a max recursion depth error.
The issue is that the debugger works by storing each step of execution, which takes space linear in the runtime. I see a couple possible solutions to this:

One is to error with a max recursion depth. Issue is that this could affect actual tail recursive problems, though of course we could always just increase the recursion depth so it doesn't affect anything from HWs.
Another is to throw an exception based on memory usage. This would also ensure that programs with lower recursion depth but which make multiple recursive calls (e.g. (define (loop) (loop) (loop))) will also stop this behavior.
Finally, we could just stop the debugger for very long programs and return a warning to the user. This is the solution I'm leaning towards. And I think I should be able to allow the first few steps of debugging to return to the user, so they can see what is causing the infinite loop. To do so, we'd need to

[ ] Implement a warning in the GUI that the debugger is disabled
[ ] Disable logging server-side based on memory consumption
[ ] Ensure that subsequent interaction with the console can still be debugged, even when previous code timed out.
[ ] Disable the logging of the call stack at some point, since super long error tracebacks are meaningless anyway? But then the memory usage of the stack isn't significant anyway.
[ ] Possibly raise some sort of warning in the console, indicating that the debugger had to stop logging at some point? Maybe provide statistics?

Also, the current behavior can cause further issues if the program is just very long but does ultimately terminate, since when we try to send the results back to the browser, the page runs out of memory and crashes.
One other thing - I guess we can still keep stack frames

Fixed.


WebApp - Show incorrect token in case the wallet has only 1 account type

Describe the bug
Show incorrect token in case the wallet has only 1 account type
Actual: Wallet have Substrate account but show tokens of the EVM chain

Expect: Show correct token

Version test: https://web.subwallet.app/home/tokens
@dungnguyen-art Please re-check help me:  I still reproduce on the lastest version (Firefox Browser)
Steps:

Connect WebApp with SubWallet extension (Extension have account EVM)
After connect successfully, observe the displayed screen
Perform remove account EVM on Extension
Observe the displayed screen

[ ] Still show EVM token
![Image](https://github.com/Koniverse/SubWallet-Extension/assets/117999489/6bb62e9e-599f-4a7f-a0f4-582ab5af3e09

[ ] Show incorrect icon token group

I can't reproduce this issue, so I will move it to the Follow Up label


Error when trying to use this in WebPack.

Hi @feross - I know you're very busy so hopefully this won't take much of your time.
When I try to do a simple import * as timidity from "timidity"; and then run that file through webpack I get the following 2 errors:
ERROR in ./node_modules/timidity/libtimidity.wasm
Module not found: Error: Can't resolve 'env' in '/home/chrism/dev/something/node_modules/timidity'
 @ ./node_modules/timidity/libtimidity.wasm
 @ ./node_modules/timidity/index.js
 @ ./src/js/index.js

ERROR in ./node_modules/timidity/libtimidity.wasm
WebAssembly module is included in initial chunk.
This is not allowed, because WebAssembly download and compilation must happen asynchronous.
Add an async splitpoint (i. e. import()) somewhere between your entrypoint and the WebAssembly module:
* ./src/js/index.js --> ./node_modules/timidity/index.js --> ./node_modules/timidity/libtimidity.wasm

I'm not a heavy webpack user but maybe you have some pointers as to how I can fix this? Will issue a PR if I get it working.

If I follow the advice in the second error it goes away but I still get the first error.

Just saw this: https://github.com/webpack/webpack/issues/7352
I will follow up with the workaround linked there.

I got webpack to build without errors using the suggested workaround:
  "module": {
    "rules": [
      {
        "test": /libtimidity\.wasm$/,
        "type": "javascript/auto", // ← !!
        "loader": "file-loader",
        "options": {
          "publicPath": "/"
        }
      }
    ]
  }

However I couldn't figure out how to use that build. In the end I gave up and just used bg-sound in a script tag and banged a <bg-audio src="...mid"> into the page.
Hopefully in future somebody will get a demo app working with Timidity using Webpack.

Glad you got it working. I'm not sure what the webpack issue is. It works fine in browserify with no config needed.

Yes I don't know why I didn't just try a browserify build instead. Great idea. Will do that for the next iteration. Thanks @feross very much appreciate your work!


⚠ GitLab Server has degraded performance

In f7a45bf, GitLab Server (https://gitlab01.its-telekom.eu) experienced degraded performance:

HTTP code: 200
Response time: 11967 ms

Resolved: GitLab Server performance has improved in 8c9e830.


Git fetch fails with exit code 128 when many builds are queued concurrently

What's not working?
After migrating TFS 2018 to Azure DevOps Server 2019, we have seen that some builds are failing when the agents download the code from the Git repository.
The error is the following:
2019-04-12T07:51:48.4046286Z ##[section]Starting: Checkout
2019-04-12T07:51:48.4203988Z ==============================================================================
2019-04-12T07:51:48.4204278Z Task         : Get sources
2019-04-12T07:51:48.4204346Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2019-04-12T07:51:48.4204530Z Version      : 1.0.0
2019-04-12T07:51:48.4204580Z Author       : Microsoft
2019-04-12T07:51:48.4204651Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2019-04-12T07:51:48.4204712Z ==============================================================================
2019-04-12T07:51:48.7185304Z Syncing repository: YYY (Git)
2019-04-12T07:51:48.7298437Z Prepending Path environment variable with directory containing 'git.exe'.
2019-04-12T07:51:48.7364058Z ##[command]git version
2019-04-12T07:51:48.7718050Z git version 2.18.0.windows.1
2019-04-12T07:51:48.8087458Z ##[command]git init "D:\Agents\2\_work\351\s"
2019-04-12T07:51:48.8429950Z Initialized empty Git repository in D:/Agents/2/_work/351/s/.git/
2019-04-12T07:51:48.8471749Z ##[command]git remote add origin http://XXX:8080/tfs/YYY/YYY/_git/YYY
2019-04-12T07:51:48.8734695Z ##[command]git config gc.auto 0
2019-04-12T07:51:48.8980935Z ##[command]git config --get-all http.http://XXX:8080/tfs/YYY/YYY/_git/YYY.extraheader
2019-04-12T07:51:48.9212262Z ##[command]git config --get-all http.proxy
2019-04-12T07:51:48.9485603Z ##[command]git -c http.extraheader="AUTHORIZATION: bearer ***" fetch --tags --prune --progress --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/pull/2251/merge:refs/remotes/pull/2251/merge
2019-04-12T07:51:49.7986249Z remote: Azure Repos
2019-04-12T07:51:50.4251155Z remote:
2019-04-12T07:51:50.4252484Z remote: Found 407029 objects to send. (627 ms)
2019-04-12T07:51:50.4258202Z remote: TF400733: The request has been canceled: This request was blocked because there are too many clones running at the same time. Please try again later..
2019-04-12T07:51:50.4264222Z fatal: protocol error: bad pack header
2019-04-12T07:51:50.4619757Z ##[warning]Git fetch failed with exit code 128, back off 8.863 seconds before retry.
2019-04-12T07:51:59.3294796Z ##[command]git -c http.extraheader="AUTHORIZATION: bearer ***" fetch --tags --prune --progress --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/pull/2251/merge:refs/remotes/pull/2251/merge
2019-04-12T07:52:00.2051035Z remote: Azure Repos
2019-04-12T07:52:00.8351662Z remote:
2019-04-12T07:52:00.8352492Z remote: Found 407029 objects to send. (630 ms)
2019-04-12T07:52:00.8359717Z remote: TF400733: The request has been canceled: This request was blocked because there are too many clones running at the same time. Please try again later..
2019-04-12T07:52:00.8366028Z fatal: protocol error: bad pack header
2019-04-12T07:52:00.8569408Z ##[warning]Git fetch failed with exit code 128, back off 9.855 seconds before retry.
2019-04-12T07:52:10.7185817Z ##[command]git -c http.extraheader="AUTHORIZATION: bearer ***" fetch --tags --prune --progress --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/pull/2251/merge:refs/remotes/pull/2251/merge
2019-04-12T07:52:11.5654156Z remote: Azure Repos
2019-04-12T07:52:12.2035320Z remote:
2019-04-12T07:52:12.2036458Z remote: Found 407029 objects to send. (638 ms)
2019-04-12T07:52:12.2043232Z remote: TF400733: The request has been canceled: This request was blocked because there are too many clones running at the same time. Please try again later..
2019-04-12T07:52:12.2048874Z fatal: protocol error: bad pack header
2019-04-12T07:52:12.2313996Z ##[error]Git fetch failed with exit code: 128
2019-04-12T07:52:12.3032015Z ##[section]Finishing: Checkout

The error occurs when we make a commit in a pull request of a file that affects many builds. The number of builds is almost 60, and as we have 50 build agents, all the builds execute concurrently. The problem is worse because when all of these builds end, and a new single build is queued and needs to download the repository, the error is also triggered, so we think it is a software limit error, and not a hardware restriction. The machine which hosts Azure DevOps Server has 16 GB RAM and 16 cores, and in the previous version, the error was not triggered.
We think that this error could be avoided if the Git repository is cloned fewer times. There is a pending issue on the build agent https://github.com/Microsoft/azure-pipelines-agent/issues/1506 which demands better reuse of the code in the agents. If the agent has a single copy of the repository for all builds, the full repository clone will not be triggered in each build.
How can we solve this problem? Is there any workaround? For now, we solved the problem restarting the DevOps server, but this is an ugly fix.
For us it is very important to solve it because we have a fully automated process and the builds can not be failing due to this error types.
Agent Version and Platform
Version of your agent? 2.149.2
OS of the machine running the agent? Windows
Azure DevOps Type and Version
Azure DevOps Server 2019 RTM (17.143.28621.4)

@juanperezADD do you happen to know why you have so many clone instead of incremental fetch? since you migrated from TFS2018, i would expected the agent will re-use most of the existing repository on disk instead of cloning new one.
is this a newly created definition or repository?
you might also want to ask https://developercommunity.visualstudio.com/spaces/22/index.html since the error is coming from the git server.
the only work around i can think is enable your 50 agents in batches, like 5 a time, so you can slowly get all 50 agents clone the repository.

We had this error today. I believe at the time we did not have many clones executing simultaneously - builds were failing, most of the agents were idle. Everybody was getting the same error - we tried from several accounts. It was happening only on one particular git repository - other git repositories in the same project could be cloned with no issues at all.
We have restarted the IIS on the application server and this has solved the issue temporarily. We have upgraded our TFS recently - we have not seen this error before the upgrade.

@dpurge please file issue on  https://developercommunity.visualstudio.com/spaces/22/index.html or file report ticket since this sounds like a TFS git server issue which is out of the scope of this repository.

Looking up in the developer community, this same ticket was created over there.

@TingluoHuang
do you happen to know why you have so many clone instead of incremental fetch? since you migrated from TFS2018, i would expected the agent will re-use most of the existing repository on disk instead of cloning new one.
is this a newly created definition or repository?

This is an example of an agent that re-uses most of the existing repository on disk instead of cloning a new one. I don't know why some times the agents are cloning the repository when no new build definitions nor repositories have been created.

2019-04-24T21:25:05.0703415Z ##[section]Starting: Checkout
2019-04-24T21:25:05.0868975Z ==============================================================================
2019-04-24T21:25:05.0869288Z Task         : Get sources
2019-04-24T21:25:05.0869476Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2019-04-24T21:25:05.0869552Z Version      : 1.0.0
2019-04-24T21:25:05.0869617Z Author       : Microsoft
2019-04-24T21:25:05.0869687Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2019-04-24T21:25:05.0869775Z ==============================================================================
2019-04-24T21:25:05.3976204Z Syncing repository: YYY (Git)
2019-04-24T21:25:05.4102532Z Prepending Path environment variable with directory containing 'git.exe'.
2019-04-24T21:25:05.4164435Z ##[command]git version
2019-04-24T21:25:05.4523730Z git version 2.18.0.windows.1
2019-04-24T21:25:05.4726711Z ##[command]git config --get remote.origin.url
2019-04-24T21:25:05.5025298Z ##[command]git clean -ffdx
2019-04-24T21:25:06.4146035Z ##[command]git reset --hard HEAD
2019-04-24T21:25:09.0281703Z HEAD is now at 2adf2f341a Merged PR 2259: Corrección de los diagramas y modelado de la navegación en User.
2019-04-24T21:25:09.0363620Z ##[command]git config gc.auto 0
2019-04-24T21:25:09.0609030Z ##[command]git config --get-all http.http://XXX:8080/tfs/YYY/YYY/_git/YYY.extraheader
2019-04-24T21:25:09.0827970Z ##[command]git config --get-all http.proxy
2019-04-24T21:25:09.1096357Z ##[command]git -c http.extraheader="AUTHORIZATION: bearer ***" fetch --tags --prune --progress --no-recurse-submodules origin
2019-04-24T21:25:13.4588275Z From http://XXX:8080/tfs/YYY/YYY/_git/YYY
2019-04-24T21:25:13.4588931Z  - [deleted]               (none)     -> origin/ZZZ
2019-04-24T21:25:13.4589128Z  - [deleted]               (none)     -> origin/NNN
2019-04-24T21:25:14.6776677Z remote: Azure Repos
2019-04-24T21:25:15.3625378Z remote:
2019-04-24T21:25:15.3626803Z remote: Found 11310 objects to send. (684 ms)
2019-04-24T21:25:15.3627615Z remote: TF400733: The request has been canceled: This request was blocked because there are too many clones running at the same time. Please try again later..
2019-04-24T21:25:15.3631984Z fatal: protocol error: bad pack header
2019-04-24T21:25:15.4074981Z ##[warning]Git fetch failed with exit code 128, back off 6.289 seconds before retry.
2019-04-24T21:25:21.7022256Z ##[command]git -c http.extraheader="AUTHORIZATION: bearer ***" fetch --tags --prune --progress --no-recurse-submodules origin
2019-04-24T21:25:25.2323045Z remote: Azure Repos
2019-04-24T21:25:25.6408633Z remote:
2019-04-24T21:25:25.6409689Z remote: Found 11310 objects to send. (408 ms)
2019-04-24T21:25:25.6410281Z remote: TF400733: The request has been canceled: This request was blocked because there are too many clones running at the same time. Please try again later..
2019-04-24T21:25:25.6414181Z fatal: protocol error: bad pack header
2019-04-24T21:25:25.6682706Z ##[warning]Git fetch failed with exit code 128, back off 7.422 seconds before retry.
2019-04-24T21:25:33.1057008Z ##[command]git -c http.extraheader="AUTHORIZATION: bearer ***" fetch --tags --prune --progress --no-recurse-submodules origin
2019-04-24T21:25:36.6675480Z remote: Azure Repos
2019-04-24T21:25:37.1240518Z remote:
2019-04-24T21:25:37.1241650Z remote: Found 11310 objects to send. (455 ms)
2019-04-24T21:25:37.1242281Z remote: TF400733: The request has been canceled: This request was blocked because there are too many clones running at the same time. Please try again later..
2019-04-24T21:25:37.1247054Z fatal: protocol error: bad pack header
2019-04-24T21:25:37.1536422Z ##[error]Git fetch failed with exit code: 128
2019-04-24T21:25:37.2222387Z ##[section]Finishing: Checkout

you might also want to ask https://developercommunity.visualstudio.com/spaces/22/index.html since the error is coming from the git server.

As @Starkie says, there is an issue pending to answer that it was created a month ago. I've also created it here because this site seems more followed.

the only work around i can think is enable your 50 agents in batches, like 5 a time, so you can slowly get all 50 agents clone the repository.

How can we enable the agents in batches?

@juanperezADD you can enable/disable agent in WebUI.

Closing since the git server issue is tracked on dev community.  That's the right issue and fix.

bryanmacfarlene, link?


Mf2 better repost content

Supersedes #47 (actually I'm curious what happens to that one if this one gets merged). Only the commits from Oct 15 onward are new.
Improves HTML rendering of complex likes and reposts by generating an e-content from a simplified version of the nested post.
This introduces some redundant content. I originally wanted to simply wrap the nested u-repost-of in an 'e-content` (discussion: https://github.com/snarfed/granary/pull/47#issuecomment-148821009), but the full rendered h-cite has too many other properties (published date, tag id) that look messy embedded in the e-content.

Here's what retweets look like in Woodwind:

Here's how they render in Atom
<entry>
<author>
 <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
 <uri>https://kylewm.com</uri>
 <name>Ghost Stromboli</name>
</author>

  <activity:object-type>http://activitystrea.ms/schema/1.0/note</activity:object-type>

  <id>https://twitter.com/kylewmahan/status/655134302775046144</id>
  <title>Hey @SFPD, Are you serious about #VisionZero on Market Street? Squad has been parked...</title>

  <content type="xhtml">

Shared a post by Randall Dietel

Hey @SFPD, Are you serious about #VisionZero on Market Street? Squad has been parked here for 30 minutes. @sfbike

  </content>

  <link rel="alternate" type="text/html" href="https://twitter.com/kylewmahan/status/655134302775046144" />
  <link rel="ostatus:conversation" href="https://twitter.com/kylewmahan/status/655134302775046144" />

      <link rel="ostatus:attention" href="https://twitter.com/SFPD" />
      <link rel="mentioned" href="https://twitter.com/SFPD" />

      <link rel="ostatus:attention" href="https://twitter.com/search?q=%23VisionZero" />
      <link rel="mentioned" href="https://twitter.com/search?q=%23VisionZero" />

      <link rel="ostatus:attention" href="https://twitter.com/sfbike" />
      <link rel="mentioned" href="https://twitter.com/sfbike" />

  <activity:verb>http://activitystrea.ms/schema/1.0/share</activity:verb>
  <published>2015-10-16T20:54:09+00:00</published>
  <updated>2015-10-16T20:54:09+00:00</updated>

  <link rel="self" type="application/atom+xml" href="https://twitter.com/kylewmahan/status/655134302775046144" />
</entry>

And this is deployed on https://granary-kwm.appspot.com/ if anyone wants to tinker

yay thanks! looking now. and #47 will still stick around and be visible with thiw out there, it just wouldn't merge cleanly (which is fine).

ok! overall i'm in. as before, my main thoughts are 1) i trust you on mf2, 2) i trust you on logical structure here, if you're ok with it (e.g. whether functions like hcite_to_html and render_content are orthogonal), and 3) my main concerns are that downstream consumers keep working ok, which i know you're testing.
also, very minor, but i kind of like that rendering reposts used silo-specific terminology and conventions before this, e.g. RT @username: tweet text instead of Retweeter shared a post: tweet text. very minor, again, but might be nice to think about for the future as a stretch goal. i dunno though, open to thoughts.
regardless, apart from the specific q's, i say merge when you're happy with the testing results. thanks again!

Thanks!!

whether functions like hcite_to_html and render_content are orthogonal

Ohhh that's a really good point. I think it probably should be done in render_content. That will augment the content when converting from AS to mf2-json instead of when rendering json to html. And will make the json <-> html translation more symmetrical
It does mean that the micropub conent sent via ownyourresponses will contain the generated content. That's not what I want but it probably is what some consumers would want, and I can ignore it easily enough.

i kind of like that rendering reposts used silo-specific terminology

I was afraid you'd say that :stuck_out_tongue_closed_eyes: Will definitely give it some thought

i kind of like that rendering reposts used silo-specific terminology

actually this is really easy to do if you don't mind a little special case logic in microformats2.json_to_html (i.e. a hack). if the post url is from twitter.com, use this silo specific formatting.

heh. sure! sgtm. also +1 from google+ and i think favorite from flickr? good idea!

Ohhh that's a really good point. I think it probably should be done in render_content

I ended up not liking this. Primarily because it was rendering mf2 html (e.g. likes this.) in the mf2 json. That felt like a choice that should be made by the json -> html rendering.

:+1:

OK new idea, what if render_content does include the like/repost context (so it can be used by atom.py), but does not include any microformats classes in the content, so we'd render a like like this

  Likes this.

It creates a redundant link in the HTML, which sucks.  But it's a more direct translation of the mf2 json, and unifies with the way we'd render a complex repost/like context:

  RT @author content

here's a start at the code for that https://github.com/kylewm/granary/commit/10c1e076ea40ed84559da09820a0f35aeb32cdc5

sure, sgtm! at least, i think so? honestly the detailed code structure here is pretty swapped out of my head, and i trust your judgment, and this commit looks generally good to me, so as long as it doesn't break our known consumers, i say go for it!


Add a UI element in JupyterHub Spawner to specify volume claims

In the JuptyerHub spawner you can specify Docker image and resource requirements. It would be nice if you could also specify volume claims and mount points so that users can easily attach shared volume to their notebooks.
According to jupyterhub/jupyterhub/issues/1580 we can do this just by adding some properties to our KubeSpawner.

I'm not sure if it's intuitive to have the user specify PVCs and mount points, as opposed to just requesting resources (as they currently do). It runs a bit afoul of the broad goal of making infrastructure "disappear" IMO. Maybe we can have a single place to do advanced config, which can be enabled by https://github.com/jupyterhub/kubespawner/pull/111

@foxish I'm not sure I understand the distinction you are drawing between resources and PVCs? In this case a PVC seems like a resource in the same regard as CPU/RAM/GPU.

My point was that PVCs are a much more K8s-specific construct as opposed to CPU/RAM/GPU. As I understood, we wanted to hide the complexity of k8s concepts from the user - but this is still probably useful for advanced users. IIRC, JupyterHub in kubeflow already uses PVCs under the hood for notebook storage right now. Is there a use-case driving exposing arbitrary mounts and PVCs?

So I think the use case is as follows.
People have a bunch of existing NFS servers or other types of storage systems that they want to bind to their Jupyter notebooks so that they can access data on those shares.
There are generally two approaches to this

We could make it possible for people to modify their JupyterHub/KubeSpawner config so that certain PVC's get attached to every notebook.

We can modify the spawner UI so that users can specify which PVCs to attach to their notebooks.

I think I lean towards #2. The advantage of #2 is that you don't have to redeploy to attach a newly created PVC.
Furthermore, #2 seems better suited to the case where we allow users to spawn multiple Jupyter notebooks which is a direction I think we want to move in.
My philosophy for Kubeflow is that we should expose K8s concepts/abstractions when it makes sense rather than introducing new ones.
PV/PVC is one of those abstractions that I think we should expose; I don't think we can avoid dealing with storage and PV/PVC is a great abstraction.
@pdmack any interest in trying to tackle it?

@jlewi I'll have a go. Probably have more questions as I begin the journey.

One idea I had was to generate the jupyterhub_spawner.py file using an init container. This would allow us to be more dynamic; e.g. we could make a K8s API request to see if there is a default storage class defined or not and adjust the config accordingly.

Yeah, I mean the KubeSpawner embeds the python k8s client so I was assuming that we could do some introspection from the hub pod itself. But init container might be worthwhile as a separation of concerns and a place to generally store "outward" facing logic. The hub UI will still need to reflect what comes back to it though.

Hi all,
We would like to contribute to this issue and extend the current JupyterHub Spawner UI with the option of specifying PVCs for a Jupyter Notebook. We suggest that the corresponding UI element described above should be an extra entry in the 'Advanced Options' form, just like the rest of the resources.
A user should be able to attach 0-N new, empty volumes to their notebook, so we will implement a dynamic UI component that will allow the addition and removal of volumes prior to the spawning of the Notebook. These volumes will be able to back both a workspace (/home/jovyan) and arbitrary datasets. For each volume added, the new UI element will allow the user to specify:

the size of the volume
the mount point of the volume
the access mode of the PVC

Regarding the default behavior, we suggest that only the default workspace (/home/jovyan) is created and no additional volumes are mounted to the Notebook, as some users might not want to work with external or shared volumes. This will also make things completely backwards compatible.
We can also have an option for the user to specify an existing PVC rather than a new, empty one, referenced by name. Please comment if this is something that would be of interest to the community, we believe this would be very helpful, as @pdmack also suggested in a previous community meeting. If this is the case, the user will need to define:

the name of the existing PVC
the mount point of the volume
the access mode of the PVC

We also plan to extend the aforementioned solution and concurrently deal with two additional open issues that share similar context:

kubeflow/kubeflow#541
kubeflow/kubeflow#1457

Finally, the solution will allow for 3rd party extensions to be implemented, inheriting from the proposed UI, so custom/advanced options provided by 3rd parties to K8s can be exposed to the end users of Kubeflow/JupyterHub.
All the above are related to kubeflow/kubeflow#56 and aim at making the default JupyterHub Spawner UI more intuitive in terms of configuring persistent storage, which as stated in the Kubeflow 0.4 Release Planning Document is a major feature for v0.4.
We are looking forward to your comments and feedback on the proposed solution. @jlewi @pdmack @inc0

In general the plan sounds good to me.
At the Kubeflow, contributor summit yesterday a couple key points emerged

A richer Jupyter spawner UI would be useful for users

@pdmack mentioned he was working on some related skins
Lyft showed their notebook UI and talked about how giving users precanned machined specs (high-cpu, high ram) was useful for users (while still providing an escape hatch

Long term it might make more sense to replace JupyterHub with a simple WebApp that uses the K8s API server to manage notebooks.

This raises the following problem, Can we continue to iterate and improve the user facing UI? without blocking on replacing JupyterHub which might take some time?
@ioandr Any thoughts about this? e.g.
* How much effort would be required to implement the proposal?
* Would the work be reusable if we switched to using our own web app on top of K8s?

/cc @pdmack

@vkoukis @iliastsi

This raises the following problem, Can we continue to iterate and improve the user facing UI? without blocking on replacing JupyterHub which might take some time?

Yes, we believe we can.
We agree completely that iterating on the user-facing UI, and evolving the user experience should not block on replacing JupyterHub, especially before we have a crystal clear view of what the shortcomings of the current JupyterHub-based approach are.
Having said that, it makes sense to ensure that when we do have a clear view of where we want to go, we don’t just have to rewrite everything, but can instead continue making piece-wise improvements to the code base.
So, a proposed plan of action is:

Step 1: Continue using JupyterHub for the time being. We may have to make extensive improvements to the functionality that KubeSpawner currently offers (as @pdmack also mentioned in the breakout session) to provide all desired functionality, but we will continue using the current JupyterHub -> Spawner class interface. At this point JupyterHub will just be used to trigger invocations of KubeSpawner. More on this below.

Step 2: Replace JupyterHub with a new, much thinner webapp, but keep the same Spawner interface, and continue using KubeSpawner. At this point we can have authentication be an external microservice, the webapp will be completely stateless, and no functionality should depend on the presence of JupyterHub.

We can focus on implementing Step 1 for now, which should be enough to improve the offered functionality in an end-to-end workflow considerably and to close this issue.
In the following, I try to describe what the goal of our PR will be:

[K8s-native approach] All changes to the KubeSpawner class will take advantage of being dependent on K8s underneath. Examples include spawning pods directly, using labels on pods and PVCs to be able to filter them and determine what notebook servers a user is currently running, using K8s PVCs to handle storage resources.
[PVC handling via the UI] The user will be able to specify PVCs to attach to the notebook pod, and optionally create them. For each volume to be attached, a generic UI will support either specifying an existing PVC by name or ask for a new PVC to be created. To keep things simple, a first iteration can ask the user for PVC name, size, and access mode only.
[Admin-settable defaults] The admin specifies the StorageClass, allowed access modes, and arbitrary vendor-specific annotations to use for PVCs created by the generic UI, when deploying Kubeflow. We can discuss whether we would like to expose more esoteric functionality [storage class names, access modes, annotations] via the UI in a subsequent iteration.
[K8s-based resource isolation] KubeSpawner currently creates all pods in the namespace in which it currently runs, which is the namespace in which JupyterHub runs, which means all pods run in the same namespace. This has significant shortcomings, because K8s cannot differentiate between pods belonging to different users when making authorization decisions. We propose we handle it using a new kubespawner_namespace parameter. If it is unset, then KubeSpawner will fall back to its current behavior. If it is set, then KubeSpawner will attempt to create pods in the specified namespace. If KubeSpawner treats this parameter as a template to be rendered at pod spawning time, then the admin can apply arbitrary policies. One example would be setting it to {{ user }}, so pods are created in the namespace that corresponds to the JupyterHub user.

@ioandr Any thoughts about this? E.g.

How much effort would be required to implement the proposal?

We implemented the biggest part of this proposal for our recent demo. We plan to have a PR submitted for this issue within the next two weeks, I'll let @ioandr elaborate more on this as he makes progress with the implementation.

Would the work be reusable if we switched to using our own web app on top of K8s?
/cc @pdmack

This is what we are aiming for in the plan laid out above. It is best to treat JupyterHub as a small wrapper around KubeSpawner, focus most of the changes in KubeSpawner, then switch to using a Kubeflow-specific web app which will call into the same KubeSpawner class, ideally with minimal or no changes to its interface.
Finally, does it make sense to change the title of the current issue to "Extend KubeSpawner and its UI to handle Persistent Volume Claims", so it better reflects its scope?

This sounds like a great plan to me!
@pdmack any thoughts?

@vkoukis @jlewi @pdmack @yuvipanda
A k8s native approach will likely need to scrap kubespawner entirely based on my own attempt to work within the kubespawner framework to replace kubespawner's proxy with ambassador as suggested by @yuvipanda in issue #239. I don't make this statement out-of-hand and the remainder of my comment is to substantiate this claim. It's entirely possible that JupyterHub/KubeSpawner have evolved from 0.8.1 or that I missed an approach that was obvious. The Jupyterhub/Kubespawner community may have contributed some clean solutions since 0.8.1. Hopefully Yuvi has some info in this regard.
The solution for #239 (which was merged) was to keep configurable-http-proxy which is the default proxy used by KubeSpawner as I documented in the PR. However this solution falls short of what we're after and authentication with JupyterHub remains an issue since it basically means that client_id, client_secret values must be propagated downstream from envoy or ambassador at point of time when the notebook is spawned by the jupyterhub pod (eg the user selects 'Spawn').
My attempt to extend KubeSpawner by replacing ConfigurableHttpProxy with one that uses ambassador is documented. I followed the documentation of 'Writing a custom proxy implementation' and the work is preserved in the unmerged PR #817. The custom proxy code can be found here. What made this intractable IMO is that JupyterHub, KubeSpawner use a number of flags to track and mutate pending state of launching the notebook that I've noted here. The code is a complex state machine whose transitions are arbitrated over these state flags - mostly in Spawner that include Spawner.pending, Spawner._start_pending, Spawner._stop_pending, Spawner._proxy_pending, Spawner._spawn_future. These flags may be mutated by other classes - for example in User.py that drive key state transitions. In the end one has to weigh the complexity of JupyterHub's state machine with the complexity noted by @yuvipanda.

BTW my note above agrees with @vkoukis' plan of action (retain the KubeSpawner API but bypass the implementation with a new one).

Agree with @kkasravi. The Kubespawner implementation is where we need to place much of the new work (PVC, GPU type) and rip out some other stuff (auth, reverse proxy).

how about we rip out Kubespawner?:)

@kkasravi Your observations are very useful, and thanks for having taken the effort to document meticulously all the problems you encountered. I understand replacing JupyterHub with a K8s-native implementation is not going to be a light task, and the main problem is that JupyterHub/Kubespawner maintain a lot of mutable state, which is used to track the launch of a new notebook server.
That being said, our initial goal is to get a first set of changes into the KubeSpawner implementation and its UI so that it can handle PVCs uniformly.
Then, we will need to have a much better understanding of the way JupyterHub interacts with KubeSpawner, it will take a deeper discussion, and we will definitely keep you in the loop for any proposed changes, before we can replace JupyterHub with anything else.
If you agree, it would be best if we can focus the discussion in this issue on the "KubeSpanwer + support for PVCs" part of the problem, and continue the more open-ended discussion of how JupyterHub maintains local state and how to potentially replace it, either at #1630 or in a new issue that we can create just for this purpose.

/area 0.4.0

/ priority p1

/priority p1

/remove-priority p2

/assign @ioandr
/unassign @pdmack
@ioandr has #1918 which I believe will fix this issue.


Bad case for image extraction

Hi, I use goose to extract images from a Chinese news site. Some news articles dont't have images. But goose gives me one from the sidebar of the page.
For example:
url: http://news.xinhuanet.com/fortune/2013-10/10/c_125507992.htm
And Goose give me this image: http://news.xinhuanet.com/fortune/titlepic/117523073_title1n.jpg
This image is at the right site of this page.
How can I fix it!
Thanks for your help.

This bug is fixed.


Add integration testing

Support Auth0 jwt token testing.
See: https://github.com/auth0/go-jwt-middleware/blob/master/jwtmiddleware_test.go

@appleboy I can help writing test! Any suggestion on how you wanna do it?


Cannot exclude file from linter

Possible duplicate of #78.
I can't exlude a file from a certain linter.
I've created a gist with the files I'm using to test: https://gist.github.com/shaneog/45cb88344d44a868a485
$ haml-lint -c .haml-lint.yml *
_media.html.haml:6 [W] LineLength: Line is too long. [159/110]

$ haml-lint --version
haml-lint 0.13.0

I have the same problem

Hey @shaneog,
I can't reproduce this with the latest version of haml-lint (0.15.2 at time of writing). Upgrading should fix whatever issue you're seeing.

That version is not pushed to Rubygems :disappointed:

Ignore me, I see it's been renamed to haml_lint