Dropdown enhancements: Better remote API support, item customization

This wound up a little long, sorry in advance!
I'm trying to use the dropdown with a remote data source. I'm running into a few interconnected issues so I'm just going to enumerate them here:
1. Disabling/customizing local filtering
I'm using the onSearchChange callback to send a request to the server with the search term and it's sending me back filtered results. The issue I'm running into is that the results are being filtered client-side as well:
https://github.com/TechnologyAdvice/stardust/blob/master/src/modules/Dropdown/Dropdown.js#L527-L531
// filter by search query
if (search && searchQuery) {
  const re = new RegExp(_.escapeRegExp(searchQuery), 'i')
  filteredOptions = _.filter(filteredOptions, (opt) => re.test(opt.text))
}

In my case, the text label for each option is not the criteria that's used server-side, causing results to be filtered out incorrectly. I'd basically just like to skip this filtering since I'm relying on the server to do it.
Some possible solutions:

Allow disabling local filtering via a boolean
Allow someone to pass as a prop their own function that gets passed to _.filter.

In my case I could just pass () => true.
I could also see it being useful to perform a more complex match based on the option or match based on some criteria other than text.

Allow someone to pass as a prop their own filter function that takes the options and the search query and returns filtered options. Similar to 2, but 2 wouldn't allow you to pre-calc a regex like you're doing above for performance.

Option 2/3 seems to provide more flexibility. The default could be the current functionality since that's what one would expect for the simple text-option case.
1a. Hiding/showing the "Add item" option
There' also a filter function to determine whether the "Add item" option should be shown that's slightly different than the filter above:
// insert the "add" item
if (allowAdditions && search && searchQuery && !_.some(filteredOptions, { text: searchQuery })) {

That could also be a prop (e.g. showAdditionOption or some better name) that's a function that takes the options and the search query and returns a boolean. That would be necessary for my case, but you could imagine using that to doing things like validation or more complex logic.
2. Option customization
I want to display a more complex "dropdown item" with some custom styles. I think this could be done with two small (backwards compatible) tweaks:

Allow specifying the element type of Dropdown.Item as a prop so one could pass a custom component. This is already in progress: #414
Instead of each object in the options array only having value and text keys, treat the object as props to be passed to the object. E.g. Change the snippet here to something like:

return _.map(options, (opt, i) => (
  <DropdownItem
    key={`${opt.value}-${i}`}
    active={isActive(opt.value)}
    onClick={this.handleItemClick}
    selected={selectedIndex === i}
    {...opt}
  />
))

I tried just rendering my own menu+items but this breaks the keyboard up/down/enter functionality, which relies on an options array. That could be something to address in addition or instead of the above.
3. Hiding the dropdown caret
This is pretty self-explanatory and might even be possible now - if so, how? Passing undefined as the icon property does the trick :)
4. Customize "no results" text
Add a prop like noResultsLabel analogous to additionLabel?

1. Disabling/customizing local filtering

...the text label for each option is not the criteria that's used server-side...

Hm, this might be a use case for the Search module.  If there are no options in the list or if searches are potentially unrelated to the readable items, I think it is probably just a search field.
I think the purpose of the Dropdown is to show the user a list of options.  When searching, they are trimming down the list that is there.  With the Dropdown being complex as it is, and the fact that there is a dedicated Search component (awaiting PR, #195), I think these features are best implemented there.
Give the search a go on the SUI docs and let me know if you think this more closely suits your use case.

Allow disabling local filtering via a boolean

Filtering can be disabled by removing the search prop.  Is this use case different than removing the search prop?  If so, what does a searchable Dropdown do when you search if it doesn't remove the non-matching items?

Allow someone to pass as a prop their own filter function that takes the options and the search query and returns filtered options...

This sounds like a good improvement, I'd merge a PR implementing this.  Perhaps searchFilter?
2. Option customization
Yep, we pulled back on support for defining your own markup here.  The reasoning was that there is no reliable way to "get items" from children.  There would need to be some item register mechanism in place for this to work well I believe.

...Allow specifying the element type...

In progress as you noted, #414.

...treat the object as props to be passed to the object....

Would take a PR for this as well.  It is the way our more recent components work, too.  This should really be library wide.  Arrays of items should always spread as props on the children they generate.
3. Hiding the dropdown caret
Glad it worked.  Was this a selection Dropdown or default (menu) style dropdown?
4. Customize "no results" text
Merged, thanks!

I believe 2, 3, 4 are now addressed, could you confirm?  Now, just to resolve 1 and 1a.

+1 for option to disable local filtering, or at least customize it. Custom filtering is not against the nature of the component, IMHO.
Would you accept a PR for adding such an option as prop to Dropdown?
I want to use the dropdown component in a similar fashion to @jcarbo  .
I tried creating a simple CountrySelect component.
The component options: "flag - country name"
The user can enter search text to lookup a country.
No luck :( .

Dropdown item accepts a iconName prop, but flags are not Icon(s)
The local filtering breaks search, if text is a react element, not clear text.

Could you post some code snippets with the expected behavior for each?  What you are describing sounds like features already supported.  There are known limitations elsewhere, but I'm seeing those described in this issue.
The Dropdown needs more support for the sub component usage.  I'd love to add more support with doc site examples.  Though, I think I can achieve what I think is being described in this particular issue with the existing component.
Disable Search
Search (local filtering) is enabled by the search prop.  To disabled it, simply omit it or set it to false.
<Dropdown options={...} />
// or
<Dropdown options={...} search={false} />

Custom Items & Custom Search
When using sub components, you are using the controlled component pattern.  So you must handle search change, value, and item clicks manually.  There is no reliable way (outside of using context) to add event listeners to the child items and filter them for you.  This also means you can customize the search however you choose.  Here, I've just used a simple "contains" RegEx search.
Again, there are issues with this usage (such as keyboard navigation and propType warnings) and improvements that could be made (using value over text to set the displayed value).  Though, I am able to create a working country search selection Dropdown with Flags.

const flagOptions = Flag._meta.props.name.map(name => ({
  text: _.startCase(name), value: name,
}))

export default class CountrySearch extends Component {
  componentWillMount() {
    this.setState({ flagItems: this.filterItems(''), value: '' })
  }

  filterItems = (query) => flagOptions
    .filter(({ text }) => new RegExp(query, 'gi').test(text))
    .map(({ text, value }) => (
      <Dropdown.Item key={value} value={value} onClick={this.handleItemClick}>
        <Flag name={value} /> {text}
      </Dropdown.Item>
    ))

  handleItemClick = (e, value) => this.setState({
    value: _.find(flagOptions, { value }).text,
  })

  handleSearchChange = (e, query) => {
    const flagItems = this.filterItems(query)
    this.setState({ flagItems })
  }

  render() {
    const { flagItems, value } = this.state

    return (
      <Dropdown fluid search selection text={value} onSearchChange={this.handleSearchChange}>
        <Dropdown.Menu>
          {flagItems}
        </Dropdown.Menu>
      </Dropdown>
    )
  }
}

Please let me know your exact use case as I would like to add more support to the Dropdown.

I should note, if you can live without the Flag, you can still customize the search and things are far more simple.  This is the current intended use of the Dropdown (or Select), so you also get full keyboard nav and no limitations.
Here I search by "starts with":

const flagOptions = Flag._meta.props.name.map(name => ({
  text: _.startCase(name), value: name,
}))

export default class CountrySearch extends Component {
  state = { options: flagOptions }

  handleSearchChange = (e, query) => {
    this.setState({
      options: flagOptions.filter(({ text }) => {
        return text.toLowerCase().startsWith(query.toLowerCase())
      }),
    })
  }

  render() {
    const { options } = this.state

    return (
      <Select fluid search options={options} onSearchChange={this.handleSearchChange} />
    )
  }
}

@levithomason Thank you very much for the examples and your time.
It is true, that one can use the "controlled component" pattern and manually control the props of the dropdown.
That is approach sub-optimal IMHO.
Your example for the country with flag is missing keyboard navigation. To implement that in a parent component to Dropdown would be additional work / would add complexity / would miss props validations / etc.
A simpler and thus better approach - requiring less work on the user of the component - would be to provide a "filter" prop.
With this approach you do not miss any of the functionality of the dropdown, and get additional customization hook.
Maybe I am missing something, and also I am fairly new to React, @levithomason please let me know what do you think.
Example:
import React from 'react'
import {Dropdown} from 'stardust'
import _ from 'lodash'

export default class OsnovaDropdown extends Dropdown {

  static propTypes = Object.assign(Dropdown.propTypes, {
    filter: React.PropTypes.func
  })

  getMenuOptions = () => {
    console.log('getMenuOptions')

    const {multiple, search, allowAdditions, additionPosition, additionLabel, options, filter} = this.props
    const {searchQuery, value} = this.state

    let filteredOptions = options

    // filter out active options
    if (multiple) {
      filteredOptions = _.filter(filteredOptions, opt => !_.includes(value, opt.value))
    }

    // filter by search query
    if (search && searchQuery) {
      if (_.isFunction(filter)) {
        filteredOptions = filter(filteredOptions, searchQuery)
      } else {
        const re = new RegExp(_.escapeRegExp(searchQuery), 'i')
        filteredOptions = _.filter(filteredOptions, (opt) => re.test(opt.text))
      }
    }

    // insert the "add" item
    if (allowAdditions && search && searchQuery && !_.some(filteredOptions, {text: searchQuery})) {
      const addItem = {
        text: additionLabel ? `${additionLabel} ${searchQuery}` : searchQuery,
        value: searchQuery,
      }
      if (additionPosition === 'top') filteredOptions.unshift(addItem)
      else filteredOptions.push(addItem)
    }

    return filteredOptions
  }
}

@venelin-mihaylov as @levithomason pointed out, filtering can, without any changes to Stardust, be disabled by disabling the search prop on the Dropdown component.
//
<Dropdown options={...} />
// or
<Dropdown options={...} search={false} />

As far as the filter customization, that definitely sounds like a worthwhile solution. Here are my two proposals. Note that these are not mutually exclusive.
Internal Filtering
<Dropdown search={myFilterFunction} />

This provides an easy way to extend a Dropdown that is already search capable into one that uses a custom filter function. Instead of just passing true, you can pass a function that will filter the items internally. This means that if you provide a set of options to the Dropdown instance, only a subset of them will be displayed depending on the result of the filter function and state of the search input. This is a key distinction to note before moving on to the (not mutually exclusive) option:
External Filtering
This is the more traditional React way of doing filtering, and one that I'm in support of because it pulls state upwards and away from child components, allowing you to store more meaningful state toward the top of the application. With this approach there is definitely more manual wiring to do, but it's a worthwhile alternative and not one that should be dismissed just because it's syntactically lengthier. This is the same exact idea that @levithomason had earlier.
_onSearchChange = (e, query) => {
  this.setState({ filteredOptions: someItems.filter(...) })
}

render () {
  const options = this.state.filteredOptions.map(...) // create elements

  return (
     <Dropdown search selection onSearchChange={this._onSearchChange}>
        <Dropdown.Menu>
          {options}
        </Dropdown.Menu>
      </Dropdown>
  )
}

The distinction between onSearchChange and search={searchFunction} is the effect that it has on the options. onSearchChange is a simple event, it does not actually affect the options in any way; this is exactly the same as inputs work with onChange, for example. You become responsible for making the change yourself, which clearly provides more control in userland. search={searchFunction} on the other hand, is a shorthand way of telling the Dropdown how to filter the items itself. This removes more boilerplate for the user, and will be useful for prototyping or simpler use cases.

If I can pass a function as a search prop, not just bool, that would be just what I need, thank you very much!
As far as I can see, the internal filtering is done in Dropdown.getMenuOptions()
I just checked the source again, seems search prop is used only as a flag, i.e. not used as a function?
Search prop is documented only as bool.
Can you please comment on that?
The disadvantage of the external search for a country+flag example component is that the keyboard support is not working (and I do not know how to add it back to the controlled component, can it be done relatively easy?)
I need not disable search altogether, but customize the internal filtering (disable it in some cases)  and still have search prompt and searchText
My use case:
Internal search:
Country with flag, search by country name, have keyboard support (tab, arrows, enter)
External search:

Have a dropdown with a server provided options.
1.0 when the dropdown is expanded, the options need to fancy render themselves, e.g. a whole ContactCard, not only firstName-lastName
1.1. Keyboard navigation should work. (tab, arrows, enter)
1.2 The user types in search criteria
1.3 The search is done on the server
1.4 Only some options are sent to the client
1.5 Options are stored in redux store
1.6 Dropdown is subscribed to redux, receives prop options on redux store update
1.7 When the user selects an option, a text is shown in the Dropdown to signify the new selection.

@venelin-mihaylov you are correct. Currently, search can only be either disabled or enabled, it does not yet support a custom function. The search={someFunc} is my API proposal for supporting for your use case, and it sounds like you're in support of it.
We also discussed supporting keyboard navigation for more advanced dropdown item components by allowing users to pass in an array of React elements, rather than POJOS (Plain Old JavaScript Objects). So, if both of these were to be implemented, it would seem as though the needs delineated by this issue would be resolved :).

search={func} sounds good to me, looks easy to implement as well. Will keep an eye on the change log :).

I'd accept a PR for the search prop, however, this will not solve either of @venelin-mihaylov's use cases since they both require custom sub component items and search with keyboard navigation.  The Dropdown can only handle search behavior and keyboard navigation when using the options prop, not sub components.
@venelin-mihaylov has specified:
Internal search

Country with flag, search by country name, have keyboard support (tab, arrows, enter)

Having a flag means using custom <Dropdown.Item /> sub components.  This negates search and keyboard navigation.  Search requires an array of options to filter prior to render.  Keyboard navigation requires an options  array to track the selectedIndex.
Be aware that adding  search function will do nothing for this use case.
External search

the options need to fancy render themselves, e.g. a whole ContactCard, not only firstName-lastName

Again, this requires custom <Dropdown.Item /> sub components which negates the search functionality and keyboard navigation.

The search is done on the server

This requirement is what makes this a Search component (#424) and not a Dropdown.  A selection Dropdown is for selecting from a list of options.  The Dropdown "search" is only a convenience for quickly finding the item in the list of options.  You cannot search the options while also not filtering the items.
When a user "searches" for something using a Search (#424) they see a loading state and eventually receive a hard list of the top results.  A Search does not allow for filtering the local results.  Instead, there are a limited number of "maxResults".  If the user needs to "filter the list", they would perform a new search and receives new results, replacing the items in the list.
I'll propose a solution anyhow, since I think in React the paradigm is a little different and may support both use cases.
Proposal
Custom Dropdown Search
Let's add @davezuko's proposed search={myFilter} prop.  This will allow customizing a local filter only.  It does not account for searching on the server.
Search and Keyboard Nav with Children
We need to be able to reliably loop the children in order to provide this.  I propose we either:

Accept an array of item elements (i.e. <Dropdown.Item />s)

const options = [
  <Dropdown.Item key='us' value='usa'>
    <Flag name='us' />
    United States of America
  </Dropdown.Item>,
  // ...
]

<Dropdown options={options} />

Provide an itemRenderer={this.renderItem} prop which would be passed each option and be expected to return a <Dropdown.Item />.  This is identical to how we do Table cells and headers with cellRenderer and headerRenderer props.

const options = [{ text: 'United States of America', value: 'usa' }, ...{}]

const renderItem = (option) => (
  <Dropdown.Item value={option.value}>
    <Flag value={option.value} />
    {option.text}
  </Dropdown.Item>,
)

<Dropdown options={options} itemRenderer={renderItem} />

Server Side Searching
This could be accomplished by extending the proposed search API to allow both enabling search and disabling the search filter function.  This sounds confusing and I think the API shows that as well.  If search enables searching and the value is the filter function then enabling search, disabling the search filter, and capturing search queries it might look like so:
<Dropdown
  search={null}
  onSearchChange={this.handleSearch}
  options={this.state.options}
/>

Compare this to:
<Search
  onChange={this.handleSearch}
  results={this.state.results}
/>

I agree with SUI in the separation here.  A Search should never filter the list, but only replace the results on query change.  The search selection Dropdown should always filter the list on query change.  The Dropdown is just a modern <select /> component. The user flow for a traditional server search is not compatible with the user flow of using a select component.

FYI I did point out:

We also discussed supporting keyboard navigation for more advanced dropdown item components by allowing users to pass in an array of React elements, rather than POJOS (Plain Old JavaScript Objects)

Which falls in line with your proposal to allow options to be an array of elements. I'm definitely a huge 👍  for this over itemRenderer, which would require more work interacting with the component API than requiring the user to map them into elements themselves. This is due to the fact that they'd have to pass two props, the renderer and the list of objects, rather than just the elements. The separate renderer prop also limits the ability for the component rendering the dropdown to receive an array of elements, if that need should ever arise.

Indeed, I should have specified the array of elements was per your offline suggestion.  It is also inline with where we are going with all shorthand props.  Shorthand is used to generate children.  Shorthand props then should accept a primitive that gets mapped to the most intuitive child prop, a props object used to createElement, or an instance which is cloned.
So, we can implement search={myFilter} and options={/* string[]|object[]|element[] */}.  However, I'm still not convinced that server side searching (enabling search and disabling menu search) belongs in the Dropdown component.

I am currently using the children prop of options to fancy render the options ... with that I can custom render options (pass react elements there) and also have keyboard nav.
https://gist.github.com/venelin-mihaylov/64773135ddc58535d93a15d8701ae994
@levithomason Isn't that ok?
(The only hindrance is that {text} is displayed always first, which is not always appropriate, but's that's a minor thing ...)

This is good.  Though this is using custom items, it is not doing so via JSX in the Dropdown children.  It is still using the options prop with an array of props objects, which is what we plan to officially support for all shorthand.  This is the Dropdown children usage that does not work with search and keyboard nav:
<Dropdown>
  <Dropdown.Menu>
    <Dropdown. Item {...} />
  </Dropdown.Menu>
</Dropdown>

Though the provided example is working, it is not supported usage and will not work in v1.  The reason is that children cannot be used with shorthand props in v1.  The text prop is shorthand:
<Dropdown.Item text='USA' />
// vs
<Dropdown.Item>USA</Dropdown.Item>

I'd recommend refactoring your map function to use only children.  This way it is v1 compliant and also you can control the ordering of the text/flag.
const options = countries.all
  .filter(c => c.status === 'assigned' && Flag._meta.props.name.indexOf(c.alpha2.toLowerCase()) !== -1) // eslint-disable-line no-underscore-dangle
  .map(c => ({
    value: c.alpha2.toLowerCase(),
    name: c.name,
-   text: c.name,
-   children: <Flag name={c.alpha2.toLowerCase()} style={{marginLeft: 5}} />
+   children: (
+     <div>
+       <Flag name={c.alpha2.toLowerCase()} style={{marginLeft: 5}} /> {c.name}
+     </div>
+   )
  }))

Lastly, I'd remove usage of the _meta prop.  The underscore means this is a private property.  We may change it or remove it entirely at any point with a patch version bump and your app will break.  I also do hope to remove it entirely, someday.

I've added issues:

https://github.com/TechnologyAdvice/stardust/issues/469 support custom search function
https://github.com/TechnologyAdvice/stardust/issues/470 support an array of string|element options

@jcarbo I believe all issues raised in the OP are now solved. Could you confirm or expound in what's left in this issue? Thanks much.


better recovery after failure

After power failure on one of three nodes Etcd-2.2.2 failed to start:
etcd[1001]: recovered store from snapshot at index 20431266
[...]
etcd[1001]: loaded cluster information from store: <nil>
systemd[1]: etcd.service: Main process exited, code=exited, status=1/FAILURE

Investigation revealed that most recently modified<PHONE_NUMBER>00003f-0000000001367007.wal file is likely to be corrupted. However etcd silently terminated on start without clearly logging nature of the problem.
Removing damaged file did not help and all my attempts to recover node have failed.
In the end I had to remove member and re-create it from scratch.
This incident demonstrate that there is a room for improvements to how Etcd handles such problems. For instance I suppose Etcd could automatically dismiss corrupted file and fall back to earlier snapshot and re-load newer data from peers. Such situation should be recoverable without manual re-creation of member.

For instance I suppose Etcd could automatically dismiss corrupted file and fall back to earlier snapshot and re-load newer data from peers. Such situation should be recoverable without manual re-creation of member.

That is not going to work. If any committed log entries is lost, etcd has to refuse to start. Or you might corrupt the cluster data.

Can you please show the full log of etcd?

However etcd silently terminated on start without clearly logging nature of the problem.

This is what we need to fix I believe.

Can you please show the full log of etcd?

I already quoted all meaningful messages. Etcd just terminates after loaded cluster information from store: <nil> so there is nothing more to add...

If any committed log entries is lost, etcd has to refuse to start. Or you might corrupt the cluster data.

IMHO this is the problem. When other Etcd nodes are up-to-date it is clear that node that fall behind due to corruption should just pull newer data from peers instead of failing.
Anyway this is the only way to recover but manual re-creation of node pulls all data from peers while automatic recovery could probably load data since last valid index point.
Peers should not let outdated node to corrupt cluster data so I don't see why there can't be automatic recovery. If outdated peer can corrupt cluster data then there is a bigger (more serious) problem...

Etcd just terminates after loaded cluster information from store:  so there is nothing more to add...

I mean the log before it when reading the wal.

Peers should not let outdated node to corrupt cluster data so I don't see why there can't be automatic recovery.

Your node is not only out of date but also loses meaningful state information about itself. For more information, I would suggest you to read raft paper which we use as our underlying protocol.

@onlyjob Also to get full log, you need to do https://github.com/coreos/etcd/blob/master/Documentation/reporting_bugs.md#how-to-get-etcd-configuration-and-log-when-it-runs-as-systemd-service-etcd2service. There is a journald issue.

I mean the log before it when reading the wal.

Please believe me, Etcd logged nothing useful comparing to normal Etcd start up.
I know how to use journalctl. This is exactly one of the problems I'm reporting: Etcd quietly terminates when its data files are corrupted.

Your node is not only out of date but also loses meaningful state information about itself.

Well, in this case it knows when to re-initialise itself. Why not to do so instead of failing?
Why do I need to remove and re-create member manually?

@onlyjob Have you tried https://github.com/coreos/etcd/blob/master/Documentation/reporting_bugs.md#how-to-get-etcd-configuration-and-log-when-it-runs-as-systemd-service-etcd2service? I do not think etcd should silently quit.

Well, in this case it knows when to re-initialise itself.

etcd does not provide auto reconfiguration intentionally. Check https://github.com/coreos/etcd/blob/master/Documentation/runtime-reconf-design.md#design-of-runtime-reconfiguration. We already provide a flexible enough reconfiguration API. If you want, you can write a script to do it.

I do not think etcd should silently quit.

This is exactly my point. Yet it seems to quit silently. I've checked logs and I'm not sure how can I convince you that Etcd logged nothing relevant...

etcd does not provide auto reconfiguration intentionally

Fair enough. Bit IMHO it invalidates the following claim: "etcd is designed to be resilient to machine failures" from admin guide as my example demonstrates that Etcd in fact very poorly handles abnormal termination. Re-creation of node is like re-formatting file system after power loss. Journal should be of help in such situation...
I'm not sure whether it is a flaw in implementation or in design of Etcd...

I'm not sure whether it is a flaw in implementation or in design of Etcd...

Well. First etcd handles power failure most the cases. If the last few entries does not contain important data, it can be repaired. Check https://github.com/coreos/etcd/blob/master/wal/repair.go. I am not sure what exactly happened. And you told me it is likely happened. I want something for sure.
I cannot really help unless you can reproduce the issue and give me step by step instruction. If we can get the last few log lines it would also be helpful. I do not think etcd CAN quit silently without log. I can double check tomorrow.

etcd is designed to be resilient to machine failures

I have to copy the full paragraph here. Your argument totally misinterprets the whole paragraph.
etcd is designed to be resilient to machine failures. An etcd cluster can automatically recover from any number of temporary failures (for example, machine reboots), and a cluster of N members can tolerate up to (N-1)/2 permanent failures (where a member can no longer access the cluster, due to hardware failure or disk corruption). However, in extreme circumstances, a cluster might permanently lose enough members such that quorum is irrevocably lost. For example, if a three-node cluster suffered two simultaneous and unrecoverable machine failures, it would be normally impossible for the cluster to restore quorum and continue functioning.
What we are trying to say is etcd as a cluster can handle machine failure. And for your exact case, you lose ZERO data at cluster level even if one of your power went down.

It is true that cluster survives single node failure. However instead of self-repairing node just commits suicide which is wrong. Certainly it can be improved.

I am not sure what exactly happened. And you told me it is likely happened. I want something for sure.

I'm sorry if I wasn't clear enough. I tried though... See below for details.

I cannot really help

I'm not asking for help but reporting two issues that I recognise as suboptimal: lack of error message and failure to recover.  I hope you might consider this report as opportunity to introduce some improvements.

unless you can reproduce the issue and give me step by step instruction.

I tried to corrupt last wal file and managed to produce similar failure using the following steps:

stop etcd daemon.
in the data folder  member/wal find most recently modified file (e.g.<PHONE_NUMBER>000001-00000000013dad08.wal).
corrupt the file: head --bytes=4M /dev/zero >>0000000000000001-00000000013dad08.wal

Now Etcd either fails to start exactly as described (i.e. silently) or with error read wal error (walpb: crc mismatch) and cannot be repaired which is close enough. About 4M in the end of the originally corrupted file was empty which makes me think that some data was lost. In the above example I'm appending zeroes instead of overwriting tail of the file for simplicity.
I tried that two times and on one instance Etcd failed to start silently without read wal error.

If we can get the last few log lines it would also be helpful.

Why do you keep insisting on that? I already told you that there was nothing logged, at least not to syslog.

I do not think etcd CAN quit silently without log.

I have no time to deal with denial and I find it quite discouraging. Perhaps if try to reproduce the issue by overwriting some megs in the end of recent wal file with zeroes you'll see for yourself...

I can double check tomorrow.

Thanks.

@onlyjob Thanks for your last reply with more detailed information. I will try to reproduce it and get back to you soon.

@onlyjob

Now Etcd either fails to start exactly as described (i.e. silently) or with error read wal error (walpb: crc mismatch) and cannot be repaired which is close enough.

I tried several times on both linux(ext3/ext4) and osx(hfs+). etcd always fails with crc mismatch error. This is expected. etcd might fix short write as long as the metadata of the last entry is written. As long as the broken entry is not a critical one (a state change entry), etcd should be able to repair it. For appending all zeros, etcd cannot identify the metadata so it cannot be repaired.
I cannot reproduce the silent failure case. After you reproduced the silent failure case, will etcd fail silently every time you restart with the same data dir? Can you share that data dir?

Unfortunately original corrupted data is lost. IMHO silent fail is not too important if it is hard to reproduce but I hope crc mismatch error can be re-factored into warning + automatic recovery from peers -- it will make Etcd clusters much more robust and resilient to failures.
Thanks and Happy New Year. :-)

I hope crc mismatch error can be re-factored into warning + automatic recovery from peers

We cannot do this by default since this is unsafe. Any quorum based system requires the majority to have data written to disk before commit it. Restarting a data loss peer (we do not know if crc mismatch is caused by actual data loss or just a writing during power failure) might break this and also cause inconsistency. To be honest, I understand that data loss happens very rare in reality and most cases it is just a short write. But we still do not want etcd compromise correctness.
There are ways to make this slightly better though. But it is not a high priority for now. We might consider to do it in the future. I will create an issue for that, so closing this one.


Entity.inanimate field named incorrectly

The Entity.inanimate (field_23807) is named incorrectly; it means if an entity should be considered for shape intersection calculation, which is its exclusive usage. Discovered while reviewing #2903.

The first name I came up with was collidable. But there is a problem.
In Minecraft entities there are 2 types of collision - the general collision (what this inanimate is doing; basically any LivingEntitys, boats or minecarts - which can be "nudged"), and the "strict collision" that ignores the gravity (e.g. you can stand on a shulker or a boat, but you cannot stand on a cow or a creeper) which is what Entity#isCollidable is doing. These two are different and should have different naming.

Is "intersectable" a word?

Think we can call that and just document it (mainly used in block placement like frost walker and mob spawning to prevent clashes)


SYN scanning

Write the starter/untested code for @kumarde and he'll take over.

SYN scanning can be implemented around these lines:
https://github.com/noise-lab/iot-inspector-client/blob/master/v2-src/arp_scan.py#L69

@kumarde I'm on this right now. Turns out I need to make some heavy changes to packet_processor.py and data_upload.py. Stay tuned.

Took me two hours to figure out that to send a SYN packet, we must use scapy's send() (whereas we must use sendp() to send ARP packets)... @kumarde

Pushed fix (https://github.com/noise-lab/iot-inspector-client/commit/da529003b8c496916ac2844c778233fb99efdcdd), although I'll need to change the backend to handle the new data uploaded (see diff https://github.com/noise-lab/iot-inspector-client/commit/da529003b8c496916ac2844c778233fb99efdcdd#diff-43d0bcc1944351307bb6db6f4d1093d8)

Corresponding server issue: https://github.com/noise-lab/iot-inspector-server-v2/issues/3


Add doc for limiting resources by priority

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
For 1.11 Features: set Milestone to 1.11 and Base Branch to release-1.11
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
NOTE: After opening the PR, please un-check and re-check the "Allow edits from maintainers" box so that maintainers can work on your patch and speed up the review process. This is a temporary workaround to address a known issue with GitHub.>

cc @bsalamat

/cc @zparnold

This is related to issue #9098

/retest

triggered restart of travis and see if the error is a transient one.

Thanks, @vikaschoudhary16!

@tengqm ping

/lgtm

/assign @zacharysarah @mistyhacks

/hold
Please rebase on release-1.11.

Moved here https://github.com/kubernetes/website/pull/9291

This needs to be rebased on current master. I will do it this time. In the future, make sure you are working off a fresh master.

/lgtm
/approve
/hold cancel


MatrixLinearOperator implements _adjoint(), but not _transpose()

See title. Given a matrix A, this works:
aslinearoperator(A).H

but this not:
aslinearoperator(A).T

This seems like a basic oversight; is there a reason?

How about this https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.linalg.LinearOperator.transpose.html ?

Isn't that the documentation for the method on the abstract base class LinearOperator? It doesn't seem to be implemented for MatrixLinearOperator.

Indeed, .T raises an error (note that this back-and-forth would have
been avoided with code example and error message).

I'd like to make a PR on this, because I've never done one before & this seems like an easy one - is this OK? It will probably take me a bit to work through all the first time stuff.
As far at this change goes, to me this seemed like just adding _transpose method with a one-liner "return MatrixLinearOperator(self.A.T)". However, I was comparing transpose to adjoint method and I'm pretty confused about the implementation of the adjoint method... why does it return an AdjointMatrixOperator?? Seemed really odd to me, that's like if you took the adjoint of a matrix and got an AdjointMatrix instead of a just a Matrix. I wonder if there's a reason for this, and if I should follow suit in the implementation of transpose.
Thanks!

From reading the code, it seems that it caches both the adjoint operator as well as the adjoint of the adjoint (i.e., the original matrix) so that if you do .H repeatedly, it won't have to compute the adjoint matrix several times, and if you do .H.H it will give you back the original matrix. So it seems to be an optimization that sounds reasonable to have also for the transpose.

This was fixed in the meantime.

For reference: This is a predating duplicate of #8486 and was fixed in #9064.


Deletes SECURITY.md in favour of org-wide SECURITY.md file

Description
Deletes SECURITY.md in favour of org-wide SECURITY.md file added in this PR:

https://github.com/celo-org/.github/pull/1

This ensures that our security policy is up-to-date and can be managed in a single top-level repository.
Context from the PR:

Add default GitHub community health files for "Code of conduct", "Contributing" and "Security" guidelines across the entire celo-org organization. They are sourced from the latest versions added on various repositories (the source is given at the top of the file).
These files will be visible on any repository that doesn't have its own specific override, which must be located at the root, inside .github/ or inside docs/.

Tested
N/A, no code change, only docs change.
Related issues

https://github.com/celo-org/.github/pull/1
#29

Backwards compatibility
Yes, no code change, only docs.
Documentation
N/A, deletes docs.

Is this mergeable before https://github.com/celo-org/.github/pull/1 gets merged?

This is unblocked because this PR is now merged:

https://github.com/celo-org/.github/pull/1

Merging the changes here 👍


Define rule for object's header JSON marshaling

There is a need to get objects's header in JSON format in neo-go codebase. Now ToV2 func is used for obtaining v2 object structure and than v2's JSON marshaling is called.
It seems that using v2 abstractions outside api-go repository is unwanted behaviour. But addition header related methods to pkg/object is also not really good solution.
Therefore, we need to define what is canonical way to marshal object's header.

After discussion, it was decided to add a method for marshaling an object's header in JSON format to the highest object structure.


Revert "fix quote for text with '/', such as branch 'dev/test'"

Reverts ducksboard/libsaas#99

Reverting this because of test failures like this one:
AssertionError: 'https://mydomain.cartodb.com%2Fapi/v2/sql' != 'https://mydomain.cartodb.com/api/v2/sql'

It seems that we can't just change the base quote_any method but rather need to create a different one that will get used on GET params only, not the entire URL.

cc @david-stream


Add attention_x and attention_y as output to attention based crop

Hello,
This is in response to #3084 and builds upon the following PR in libvips.
The code change exposes the coordinates of the center of attention when using attention based smart cropping.
I'd suggest to merge this PR after my changes are included in libvips.

The relevant changes will be released in version 8.14 of libvips.

@lovell - Thank you, feedback adressed.
The newest libvips release also includes the attentionX and attentionY fields.
Is there an approximate timeline for the next release?

Thanks for the updates, please can you rebase against the flow branch (I've changed the target branch of this PR to match) as that has the latest libvips with support for this feature.

Done 🙌

Thanks for the updates, LGTM. The Windows failures are due to what appears to be a possible bug in that latest node-addon-api, which I've pinned to the last-known good release via commit https://github.com/lovell/sharp/commit/a9bd0e79f8dbf034f1a839bbf231aebdb5393414

Danke schön Emanuel!


The library doesn't work in Firefox or Microsoft Edge

I am trying to use the library in Firefox and Microsoft Edge, but it displays an error "MediaStreamError" in Firefox and doesn't work in Microsoft Edge.

Works fine for me


Feature Request: add native sndio backend

Excerpt:
" Sndio is a small audio and MIDI framework part of the OpenBSD project and ported to FreeBSD, Linux and NetBSD. It provides a lightweight audio & MIDI server and a fully documented user-space API to access either the server or directly the hardware in a uniform way. Sndio is designed to work for desktop applications, but pays special attention to synchronization mechanisms and reliability required by music applications. Reliability through simplicity are part of the project goals. "
API: https://man.openbsd.org/sio_open

It looks like portaudio supports sndio
Perhaps anyone who's interested could try using sndio via Librespot's portaudio backend and report back.
I can't immediately see any sndio bindings for Rust which would be a pre-requisite for support here, or cpal (if they're open to adding more backends).

The PortAudio backend worked on OpenBSD when I tried it awhile ago. Someone would probably need to add sndio support to CPAL if the PortAudio backend gets dropped.

I recently implemented GStreamer support here: https://github.com/allquixotic/librespot/tree/gst1.0-2020
There's a GStreamer sndio sink here: https://github.com/t6/gstreamer-plugins-sndio
You could play back to sndio using a command like librespot --backend gstreamer --device '! audioconvert ! sndiosink.


Tas897 - 900: LiMiT, QA-SRL_dataset

@swarooprm I have created a pull request. Please review the instruction tasks.

@swarooprm
The workflow is not running as it seems to require approval from the maintainer.
Could you please look into this?

@Mirzyaaliii, wondering if you can help review these tasks?

General Comments -

Add contributor name to all the tasks.
Include dataset link and paper (if there is any) in the source field, for reference check tasks 166 and 313 here.
Remove extra empty lines after Definition, Positive Examples and Negative Examples.
Correct grammar and typos in the definition of all the tasks and remove the repetitive parts. (few suggestions are provided below also.)
Elaborate summary for all the tasks in the README, (For reference check summary of few tasks from here)

Task-897

The provided definition and examples do not match, i.e.,
"Definition": "In this task you are given a sentence and your task is answer the question with yes or no answers.You should answer the question using the information from the sentence. The answer to the question is yes if there is a physical occurrence of a motion of a physical entity otherwise the answer is no"
i) you are given a sentence and your task is answer the question with yes or no answers -> this sounds confusing and there is no connection between sentence and question.
ii) As mentioned in the definition that output should generate the answer to the question, however, there is no question in the input. Either correct the definition or correct the task.

Task-898

In the definition, mention that if there can be an instance when there is 0 physical entity in the motion and if not mention that there is at least 1 entity exists.
In the output of instances, instead of separating entities by comma, make every entities element of the list. E.g.,

"output": [
           "I",
           "she",
           "home"
       ]

In the examples, keep it as it is. Just add space between each entity. i.e.,
"output": "person, fruit, spoon"

Task-899

Include a separator between different elements of the input.
For example:
"input": "Sentence: The album is named after the discredited pseudoscience of phrenology , the study of head shapes to determine intelligence and character , which was used to rationalize racism during the 19th century in the United States . \n Verb: named"
(Apply this to Task-900 also)
In the definition, change this
i) In this task you are given a sentence and a verb in the sentence and your task ... -> In this task, you are given a sentence and a verb from the sentence. Your task ...
ii) and the answers to these questions are phrases in the given sentence -> and the answers to the generated questions are phrases in the given sentence
iii) (v) the length of the questions must not exceed 7 -> what does 7 indicate here?
iv) If This set of questions must contain the verb and the answers to these questions are phrases in the given sentence. and (ii) it is answerable from the sentence, are the same thing, then remove either one and make definition concise.
v) Avoid creating questions that (i) can be answered correctly without actually understanding the sentence -> What does this mean?? clarify.
Remove extra empty lines.

Looks good to me almost, just a few minor changes

Task - 897

Simplify this statement in the definition (Task - 897)
... The sentence belongs to the 'yes' category if there is a physical occurrence of a motion of a physical entity ...
There are some yes and no capital and some small. Write all like this Yes and No.
In the explanation of the examples, you mentioned present tense and all, if this is the case write in the definition that when some physical entity in the motion should provide answer Yes and when No.

Task - 898

Combine this line
The sentence will contain at least one entity. The sentence might contain more than one entity taking part in various physical motions.
something like this
The input sentence can have more than one entity and also there is at least one entity that takes part in physical motion.

Task - 899

In the definition
This set of questions must contain the verb and the answers to the generated questions are phrases in the given sentence. The answer to these questions is associated with a specific semantic role.
change this like to something like this
The generated questions must contain the verb and the answers to these questions are phrases in the input sentence. The answer to the questions is associated with a specific semantic role.

Task - 900

Keep space after every sentence. For example, in the definition
... ed using the sentence.Your task is to answer the ...
Keep space between 2 sentences. Check in the explanation also.

In the explanation of the examples, you mentioned present tense and all, if this is the case write in the definition that when some physical entity in the motion should provide answer Yes and when No.
Could you explain this?Did not get this point

In the explanation of the examples, you mentioned present tense and all, if this is the case write in the definition that when some physical entity in the motion should provide answer Yes and when No.
Could you explain this?Did not get this point

In the 2nd and 3rd positive examples, you mentioned that motion exists in the input but it is not currently happening. Also, in the 4th example, you wrote that the input sentence is in the present tense and it has motion.
So. define these criteria in the definition that when the output is Yes and when No in terms of when motion is happening.

@ssaivenkat176, can you address reviewer comments so that I can evaluate your HW?

@swarooprm
Could you please approve the workflow?
@Mirzyaaliii
I have addressed your comments. Please look into it.

@Mirzyaaliii, check and let me know if you are happy or have any other feedback?

All tasks look good to me. Just a few minor comments -

Contributor and Category should be list not string.
There are few grammatical errors in the explanations. So, please once pass this on the Grammarly (or a similar tool). Hence, there will be no grammatical, punctuation, spacing, etc errors.

@Mirzyaaliii addressed comments.
@swarooprm please approve the workflow.

@swarooprm All tasks look good to me. Proceed further.

Your HW2 is complete now.
Would you like to submit the same tasks to our big project repo https://github.com/allenai/natural-instructions-expansion/pulls? You just need to fork that repo, rename tasks starting from the latest number in the repo and create PR there. This way, you can be part of our research on "learning from instructions instead of learning from examples (conventional machine learning)". This is purely optional and your HW2 grade does not depend on this @ssaivenkat176

@ssaivenkat176 Just a reminder that, if you plan to submit these tasks to the main Github repo and join our research project, Monday (27th Sept) is the deadline. Again, this is optional and independent of your HW2 grade.


Cannot read properties of undefined (reading 'incoming')

Hello, I can't use the node graph data source to display it using the josn api panel, which prompts this error

Hi @cuibaoluo
This plugin is not supported anymore. I suggest using this one: https://grafana.com/grafana/plugins/hamedkarbasi93-nodegraphapi-datasource/

is more flexible
is publicly available (no need to allow grafana to install an unsigned plugin)
is supported and updated

Best regards.


Performance - immutable and/or move more logic to the server

woo immutable

moving sorting to the server next m8

inefficient functions too m8


Help

how can i install this app to my android phone?
or where i can get the apk file?
can you cite any tutorial for my next time help

Hey @maaudrana , currently there is not an APK file and in order to get the app on your phone you need to build the app using android studio or using the adb tools from google in conjunction with the Kotlin tools if building from the command line. I can provide an APK file but this app is still in the development phase and has not reached the development release milestone.
Would you like for me to provide a development APK file anyways?

actually now i am trying to be app tester for bug-hunting besides design thats why asked for apk.

Hey @maaudrana,
You still want the APK? I've been working on other projects this past week along and haven't got the chance to work on this project. This project is still one of my primary projects so it won't end anytime soon. Let me know and I'll upload it.


Steps unclear when creating the 2nd Node (Node02)

Hi Team,
When creating the 1st Node (Node 01) the instruct mentioned to created 4 Disk of 100 GB there (Data01,Data02,Data03,Data04)

It doesn't mention why we we need 4 disks here
When create the 2nd Node - do we need to repeat 4 Disks for Node02 as well? Data01.vhdx, Data02.vhdx and so on.

It is unclear in this steps.
The powershell - Copy and Paste doesnt seem to work.
Error:
Invoke-Command : Cannot validate argument on parameter 'VMName'. The argument is null or empty. Provide an argument
that is not null or empty, and then try the command again.
At line:1 char:24

Invoke-Command -VMName "$nodeName" -Credential $domainCreds -ScriptBl ...

                   ~~~~~~~~~~~

CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand

Hi - Yep, each of your nodes should have the 4 data disks.
When you get to the "repeat creation process", bounce back up to the top, specifically to the https://github.com/Azure/AzureStackHCI-EvalGuide/blob/main/nested/steps/3b_AzSHCINodesPS.md#create-the-azshcinode01-vm-using-powershell stage, and run all the scripts again.  The only thing you need to adjust is the $nodeName = "AZSHCINODE01", which you'll find in a few places.  Simply change this to 02 instead of 01, and all should work fine. I chose to split up the scripts and explain a bit more about each one, so people would understand what's happening, however if you copy them all to a PowerShell ISE, you may find that easier.
If you make a mistake and want to recreate the VM, simply delete it from Hyper-V Manager, then navigate to C:\VMs and delete the folder that contains the VM you wish to delete.
Hope that helps.


manifest invalid: Only schema version 2 is supported

I'm currently enjoying and using gpr-docker-publish for some blog project. It is working pretty well.
This morning I suddently runned into a strange issue when pushing a successfully built image with the SHA.
[DEPRECATION NOTICE] registry v2 schema1 support will be removed in an upcoming release. Please contact admins of the docker.pkg.github.com registry NOW to avoid future disruption. More information at https://docs.docker.com/registry/spec/deprecated-schema-v1/
manifest invalid: Only schema version 2 is supported

As far as I understand logs from my last two actions, the first push without the SHA (docker push ${BASE_NAME}) is still working.
Is it something related to the Docker runtime mentionned in the gpr-docker-publish 's Dockerfile ?
FROM docker:19.03.2 as runtime

Tried to re-run the Github Action and it just works (link), now i'm not sure what happened back then, I would be ok to close the issue, but I would appreciate some insights, just to make sure.


Aardvark 2.7: UI suggestions

I had the chance to have a look at the new Aardvark 2.7x design and want to give some feedback. The new, lighter look makes it feel unfamiliar, but I think I like it :+1:

The red for query errors seems to a bit too intense, it should look more like the Clear button.

The query error messages aren't readable unless hovered, the color needs to be changed to some darker tone.

Feature request: query errors should be clickable and either transfer you to a reference page, or display the meaning of the error code somehow inline (tooltip, popup, ?)

The colorful, original ArangoDB logo is now in the top left corner, but where did the name go?
The text should be included.

Radio buttons and checkboxes are merely merely distinguishable, I prefer square checkboxes to clearly communicate the different behavior compared to radio buttons.

Great job at PPP™ by the way! (Pong Progress Popup)

Thank you for your feedback.

The red color is now smoother.
Query messages are now readable.
If detailed error information is available, a tooltip icon will be rendered.
We've changed the logo to a smaller one in order to save room.
Checkboxes are now displayed as squares.


go: Fix golint maker

Wrongfully broken in 5ac6c80, golint behaves differently in contrast to the core go toolchain

Thanks!
@mediocregopher
Is this correct?

Yup, looks like it. Sorry, I use gometalinter instead of the normal one, I had assumed they behaved the same but I guess not.

Thanks!


Include a unique identification number for given "Delete a Person" use case

Codecov Report

Merging #52 (903b2f4) into master (39b3cc0) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master      #52   +/-   ##
=========================================
  Coverage     72.15%   72.15%
  Complexity      399      399
=========================================
  Files            70       70
  Lines          1232     1232
  Branches        125      125
=========================================
  Hits            889      889
  Misses          311      311
  Partials         32       32

Continue to review full report at Codecov.

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


Display artifacts from performance test dependencies

Previously the composite performance test triggers didn't show any artifacts, making it hard to find the performance test results.
This is how it looks like now:

@bot-gradle test and merge

Your PR is queued. See the queue page for details.

OK, I've already triggered a build for you.


[docs] Update example in documentation

I noticed a typo in the example in the MDE>Distortion functions>Losses section of the documentation (https://pymde.org/mde/index.html#losses) .  The second line of the example reads f = pymde.losses.Quadratic(weights), when it should read f = pymde.losses.Quadratic(deviations).
I'm happy to fix this by forking the repo and submitting a pull request. Is that ok? Should I go ahead and do the same if I notice any other small errors?

@theresekoch, thanks so much for catching this typo and reporting it.
Yes, please do submit a PR, for this and for any other mistakes you find. That would be very much appreciated.
Thanks!

No problem! Here is a link to the pull request https://github.com/cvxgrp/pymde/pull/36.


incorporating build system changes from PaHM branch

this pull request is for resolving conflicts @platipodium @josephzhang8

I am really interested in this merge especially because of the many gnu fixes Takis introduced in the PAHM branch.


Poor contrast in diff'ed comments

In the diff viewer if the change is a comment (most notably in commented out code) the contrast is so low that I can't see the comment.
This is important for me because I frequently need to be able to see/read the comments in diff viewer to decide if that block needs to be retained or not...
It would be good if those comments were legible.  Here's an example:

By contract here's an example of the same line in my second-favourite theme:

Just pushed an update, let me know if this fixes it. Looks ok my end but may need further tweaks as I also had to adjust the diff -green highlight shade. Update should be available in marketplace in approx 10 minutes.

Diff'd comments now are very legible thanks!
However as a result (maybe) of this change, there are other problems with comments.
Here's an example of a comment that has been "selected" (highlight with the mouse)

Still not really usable in that state - I still think that root of these issues is the base colour of comments...  They're generally hard to see in any state I find.  Like here:

Comments are now a deep shade of purple-pink. Looks clear at my end, let me know how it works for you.

Looks great, clear, easy to read - very comment-y!!


FATAL -- : Satoshi::TooManyDigitsAfterDecimalPoint:

hi guys, I just want to make an order with USD currency and I am getting the next error:
FATAL -- : Satoshi::TooManyDigitsAfterDecimalPoint: Too many digits (20) after decimal point used for btc value, while 8 allowed
root@ubuntu-s-2vcpu-4gb-sfo2-01-BTC-process:~# straight-server -p 9696
/usr/share/rvm/gems/ruby-2.5.1/gems/straight-1.0.0/lib/straight/faraday_monkeypatch.rb:1: warning: already initialized constant Faraday::SSLOptions
/usr/share/rvm/gems/ruby-2.5.1/gems/faraday-0.15.2/lib/faraday/options.rb:218: warning: previous definition of SSLOptions was here
Setting config dir to /root/.straight
I, [2018-08-10T22:57:12.627270 #1658]  INFO -- : starting Straight Server v 1.0.0
I, [2018-08-10T23:01:22.396766 #1658]  INFO -- : POST /gateways/0bed1c74cc5fa8deb1c0db270b34d54e5e2f871a2673b1e837515c9e45ea15fd/orders
{"amount"=>"1", "currency"=>"USD"}
I, [2018-08-10T23:01:22.398397 #1658]  INFO -- : Creating new order with attrs: {:amount=>"1", :currency=>"USD", :btc_denomination=>nil, :keychain_id=>nil, :callback_data=>nil, :data=>nil, :description=>nil}
F, [2018-08-10T23:01:22.426246 #1658] FATAL -- : Satoshi::TooManyDigitsAfterDecimalPoint: Too many digits (20) after decimal point used for btc value, while 8 allowed
Backtrace:
/usr/share/rvm/gems/ruby-2.5.1/gems/satoshi-unit-0.2.2/lib/satoshi.rb:147:in convert_to_satoshi'     /usr/share/rvm/gems/ruby-2.5.1/gems/satoshi-unit-0.2.2/lib/satoshi.rb:24:in initialize'
/usr/share/rvm/gems/ruby-2.5.1/gems/straight-1.0.0/lib/straight/exchange_rate_adapter.rb:17:in new'     /usr/share/rvm/gems/ruby-2.5.1/gems/straight-1.0.0/lib/straight/exchange_rate_adapter.rb:17:in convert_from_currency'
/usr/share/rvm/gems/ruby-2.5.1/gems/straight-1.0.0/lib/straight/gateway.rb:158:in block in amount_from_exchange_rate'     /usr/share/rvm/gems/ruby-2.5.1/gems/straight-1.0.0/lib/straight/gateway.rb:193:in block in try_adapters'
/usr/share/rvm/gems/ruby-2.5.1/gems/straight-1.0.0/lib/straight/gateway.rb:191:in each'     /usr/share/rvm/gems/ruby-2.5.1/gems/straight-1.0.0/lib/straight/gateway.rb:191:in try_adapters'
/usr/share/rvm/gems/ruby-2.5.1/gems/straight-1.0.0/lib/straight/gateway.rb:157:in amount_from_exchange_rate'     /usr/share/rvm/gems/ruby-2.5.1/gems/straight-1.0.0/lib/straight/gateway.rb:99:in new_order'
/usr/share/rvm/gems/ruby-2.5.1/gems/straight-server-1.0.0/lib/straight-server/gateway.rb:140:in create_order'     /usr/share/rvm/gems/ruby-2.5.1/gems/straight-server-1.0.0/lib/straight-server/orders_controller.rb:55:in create'
/usr/share/rvm/gems/ruby-2.5.1/gems/straight-server-1.0.0/lib/straight-server/orders_controller.rb:169:in dispatch'     /usr/share/rvm/gems/ruby-2.5.1/gems/straight-server-1.0.0/lib/straight-server/orders_controller.rb:16:in initialize'
/usr/share/rvm/gems/ruby-2.5.1/gems/straight-server-1.0.0/lib/straight-server/initializer.rb:133:in new'     /usr/share/rvm/gems/ruby-2.5.1/gems/straight-server-1.0.0/lib/straight-server/initializer.rb:133:in block in initialize_routes'
/usr/share/rvm/gems/ruby-2.5.1/gems/straight-server-1.0.0/lib/straight-server/server.rb:71:in block in process_request'     /usr/share/rvm/gems/ruby-2.5.1/gems/straight-server-1.0.0/lib/straight-server/server.rb:70:in each'
/usr/share/rvm/gems/ruby-2.5.1/gems/straight-server-1.0.0/lib/straight-server/server.rb:70:in process_request'     /usr/share/rvm/gems/ruby-2.5.1/gems/straight-server-1.0.0/lib/straight-server/server.rb:43:in block in response'
/usr/share/rvm/gems/ruby-2.5.1/gems/logmaster-0.1.5/lib/logmaster.rb:54:in watch_exceptions'     /usr/share/rvm/gems/ruby-2.5.1/gems/straight-server-1.0.0/lib/straight-server/server.rb:36:in response'
/usr/share/rvm/gems/ruby-2.5.1/gems/goliath-1.0.6/lib/goliath/api.rb:163:in call'     /usr/share/rvm/gems/ruby-2.5.1/gems/faye-websocket-0.10.7/lib/faye/adapters/goliath.rb:28:in call'
/usr/share/rvm/gems/ruby-2.5.1/gems/goliath-1.0.6/lib/goliath/rack/params.rb:67:in call'     /usr/share/rvm/gems/ruby-2.5.1/gems/goliath-1.0.6/lib/goliath/rack/async_middleware.rb:73:in call'
/usr/share/rvm/gems/ruby-2.5.1/gems/rack-1.6.10/lib/rack/content_length.rb:15:in call'     /usr/share/rvm/gems/ruby-2.5.1/gems/async-rack-0.5.1/lib/async_rack/async_callback.rb:114:in call'
/usr/share/rvm/gems/ruby-2.5.1/gems/async-rack-0.5.1/lib/async_rack/async_callback.rb:91:in block in new'     /usr/share/rvm/gems/ruby-2.5.1/gems/rack-1.6.10/lib/rack/reloader.rb:45:in call'
/usr/share/rvm/gems/ruby-2.5.1/gems/goliath-1.0.6/lib/goliath/request.rb:166:in `block in process'

satoshi-unit-0.2.2 causes this error. downgrade to satoshi-unit-0.1.8 and its working

Hello! In case this is still an issue, feel free to submit it to https://github.com/mycelium-com/gear-engine/issues


Enumerator & mapper improvements

[x] Rename enumerator to planner except for join order enumerator
[ ] Keep schema as planner local concept. Avoid giving schema to mapper. A possible solution is, instead of giving actual factorzation group position to logical operator. We give a logical position and mapper can map from logical position to a physical position.
[x] Split mapper to different cpp file per operator.

For the second task, we choose a different approach. Now we are giving schema to operator so dependency becomes
physical operator -[depends on]-> schema -[depends on]-> logical operator. We can move logical operator freely as long as we recompute schema after moving. See PR #1119 and #1121


Typo

Question
Is it bug or bugs?

Bugs. Will be fixed in 0.18.9 or 1.0 depending on how many other bug are found


#56: Make spring-cloud-context required dependency.

@iocanel looks like it has not yet been merged

@lburgazzoli : right! Let me merge asap!

[merge]


kali

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by marshalsec.util.Reflections (file:/root/MMD/fastjson/marshalsec-0.0.3-SNAPSHOT-all.jar) to field com.sun.jndi.rmi.registry.ReferenceWrapper.wrappee
WARNING: Please consider reporting this to the maintainers of marshalsec.util.Reflections
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

Expected, as we are messing with classes in internal modules.


i18n(ko-KR): update error-reference.mdx

Description (required)

update error-reference.mdx
#8224
#8236
#8283

Related issues & labels (optional)

Closes #
Suggested label:

Lunaria Status Overview
🌕 This pull request will trigger status changes.

Learn more
By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.
You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

Locale
File
Note

ko
reference/error-reference.mdx
Localization changed, will be marked as complete.

Warnings reference

Icon
Description

🔄
The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.


Add Aria2

Hey please add aria2 to the dockerfile, iwas trying to add but was failed to do. Can you please add it?

https://github.com/FuaerCN/Cloudreve-Heroku/tree/Redis-Mysql


User story 5: Create new tasks

"As a user, I want to submit new tasks with a description, priority level and three states: expired, completed or active"

@RyanBalfanz CR?
Note: I cheated somewhat because I use "urgent" as a priority option instead of "high", which allows me to use the orderBy filter and use the expression prefix for 'descending' on the object priority. I like this solution because it reduces complexity of the application and the user-facing language is still clear.
If using "high" as a priority option was required, then I suppose I would either have to pass a function to orderBy or I would have to write my own custom filter.
Another option might be to add another attribute to the model that corresponds to the priority. So, if the priority is "high", there could be another attribute, such as "prioritySort" with a value of "1" for high, "2" for medium, and "3" for low. However, this feels like a dirty technique and I don't think I should be adding what are essentially logical operators to the model.
Out of all these options, I prefer passing a function to orderBy, where I would mutate the priority values so that "low" would come after "high", and the resulting order would be returned. I'm curious about your thoughts on this.


MuiPickersUtilsProvider doesn't create a new instance of Utils if the locale changes

Environment

Tech
Version

material-ui-pickers
rc7

Steps to reproduce
Set up like in docs and change locale prop
Expected behavior
date-picker should re-render with new locale settings
Actual behavior
date-picker won't recognize locale changes, MuiPickersUtilsProvider doesn't create a new Utils instance. I also found out, that MuiPickersUtilsProvider uses the legacy Provider API and it seems it doesn't pass down locale changes at all.

But but - it works...

How did you get that out?

Right. I just created a sandbox and it seems to work correctly indeed.
I tried to do a custom implementation of Utils using date-fns for calculation and globalize.js for i18n. Maybe I did something wrong. I'm on it...

Sandbox is here: https://codesandbox.io/s/mq3xl413jy
It's still broken in my setup. Need some further investigation.

wrapping the picker inside the reduxForm() hoc breaks the updates in my case

I also found out, that the connect() hoc of react-redux breaks the provider from updating.
This part in the documentation of the legacy and unreleased context API seems to be the key here: https://reactjs.org/docs/legacy-context.html#updating-context
I suggest updating to the new (official) Context API.

I didn’t know about it! Thanks 🙏
I will migrate to the context in the nearest release


Create a function to extract thumbnail from a video file

I would like to contribute by creating a function to extract thumbnail from a video file.
@NitkarshChourasia please assign me this issue

Now you can close this issue. @ibtsam3301

@ibtsam3301 Merging will be done by @geekcomputers when you complete the issues with the projects.
Thanks for contributing.


AllAccessDisabled: All access to this object has been disabled

I get this error from S3 I guess. Do you have any suggestion about how to solve this problem ?
I have all the rights to my bucket. Therefore I shouldn't have any issues regarding access.
I think that's why I get the following error :
GET /test/cr9YpNAdG.jpeg 500 643.251 ms - -
[resizer] new stream created!
[resizer] not valid image format

Hmm, that is odd. So that error message arises from attempting to resize a file that is not one of the accepted formats (jpeg,jpg,png,gif) but clearly that is not the issue.
There were some issues a while back with file paths not being correctly passed through when there were no modifications listed. Maybe try adding a modifier like: /s200/test/cr9YpNAdG.jpeg and see that helps.
You could also try the new sharp branch that I have been working on which has a number of improvements. It will land sometime this week as the next evolution of the repo.


Ardent Defender Cheat Death does not proc

For the Prot Paladin sim when you look at the log and follow the health loss the first death does not proc the cheat death aspect of Ardent Defender.  I assume this would greatly impact the % chance of death stat.

AD is also still using TBC logic (leapfroggable DR). Thanks for the report, I meant to look at this already.

Fixed with #1763


How to also update Menu bar with under line?

Any help updating a menu bar at top of page with an under line would be appreciated, i.e. check out this polymer demo: http://theseamau5.github.io/swipe-pages/components/swipe-pages/demo.html
btw - good job on this project. Looking forward to getting it working in a React app.

I figured out how to do this using ReactJS's this.state and this.SetState.


Should reports be edited on FP instead of deletion?

Currently, if a report is marked as False Positive, Smokey will try to delete the report to prevent accidental flagging.
However, on more than one occasion I have been wanting to see the post itself so I can make up my own mind/investigate/check for hidden spam etc. To do this, I have to go to metasmoke, click the post tab, find the post, go to the post page and click once more to view on the original site. Too much effort for a lazy person like me :)
Instead, I propose that Smokey should try to edit the report to the following:

[SmokeDetector | MS] (false positive - report deleted)

or something similar, so that the MetaSmoke link is still clickable.
This could be easily done by modifying line 983 of chatcommands.py. Should be low-hanging fruit.

I like the idea, but if we want to do this, we would like to scratch the report instead of putting the false positive in brackets, as that would make it more clear. Something like this:

But note that as we cannot edit messages once two minutes have gone by, this will not be possible in many cases.

@Fortunate-MAN I disagree - there is a reason why FPs are deleted in the first place, and that reason is probably to stop robo-flaggers from clicking the link and flagging it. While crossing the message out does convey that the report is a false-positive, it doesn't stop users from clicking on it.
Alternatively we could edit out the link then strikeout?
Also, you can't delete messages after x minutes anyway, so nothing much should change if we edit instead.

If you want to see the metasmoke report - and the link to the actual post - MetaSmoke is still available and contains the information. Deleting the report from the chatrooms doesn't remove that information

@AWegnerGitHub exactly - but what I am asking, is for the MS report to be linked in the message, even after it has been marked as FP, for easier access.

Throw this in a bookmark: //metasmoke.erwaysoftware.com/posts/latest

I'm closing this one. We designed it this way to make it a quick and easy way to identify which reports not to waste your time with. If it's marked as a false positive, in most cases it is.
If you really want to review these posts, just view https://metasmoke.erwaysoftware.com/posts -- or the link Undo gave above.

I do see that it can be a little peeving to have the MS link, in particular, removed from the chatroom because the message was deleted, but I also agree that deleting the message is the best thing to do. There's not really much we can do here.

@Undo1 thanks for the tip - that should do nicely

Just to have told you my opinion, I'd also personally prefer editing by striking the message through and optionally removing the post link, leaving only the metasmoke link over deleting the whole message.
Besides that, if Smokey reports posts in foreign rooms (like Ask Ubuntu spam in the Ask Ubuntu General Room), the post there does not get deleted if somebody feeds back "f" e.g. in Charcoal HQ. The chance to attract robo-review flags in such a room with "ordinary" users is probably much higher than from within the specialized Charcoal HQ room.


Remove experimental warning from CLI running in Windows

[x] Double check that everything is correctly documented for running the CLI and project creating in Windows.
[x] Remove the warning when running the CLI.

Fixed as part of this PR: https://github.com/serverpod/serverpod/pull/1736


[WIP] Add pglogical module to PostgreSQLAdapter

These methods wrap the interface to the pglogical PostgreSQL extension which will be used in place of rubyrep for one way database replication.
The package, and it's configuration will be installed in https://github.com/ManageIQ/manageiq-appliance-build/pull/89 and https://github.com/ManageIQ/manageiq-appliance/pull/57 respectively.
Also in this PR I replaced the old (mostly unused) replication tests with new tests designed to test the pglogical functions which require a master database to be configured.
The intention is to create another class in RAILS_ROOT/lib which will encapsulate groups of these methods into larger logical units (such as create_provider, create_subscriber, pause_all_subscriptions etc.) in order to be consumed by the application.
@Fryguy @jrafanie @gtanzillo I specifically need advice on:

The primary key migration

Is this the right way to do this sort of thing?

The replication specs

This will likely not be able to run on travis given that it needs the pglogical package
The specs leave the vmdb_test_master database on the machine. Is that okay?

:heart_eyes:

This will likely not be able to run on travis given that it needs the pglogical package

This might be tricky because we can't run with sudo on Travis unless we give up their containers infrastructure (or they need to add it to their whitelists).  We might have to do a skip "pglogical not install" unless connection.pglogical_extension_installed? or something like that.

The specs leave the vmdb_test_master database on the machine. Is that okay?

That's fine...I think the current specs do that now anyway.

@Fryguy Yeah, I added the skip in here https://github.com/ManageIQ/manageiq/pull/6713/files#diff-3f24a6daf06f67e8c06558b423898604R5

Requires https://github.com/ManageIQ/manageiq-appliance-build/pull/89

@miq-bot remove_label wip

@Fryguy @matthewd Looks good to me, merge if you're ok.  Thanks!

Going to add a test to be sure all tables have a primary key before we merge this.

Adding WIP label while I figure out how pglogical uses primary keys and if we need to use them or can just rely on unique constraints.  The documentation in question is here. After figuring out what is necessary, I will create a spec test in the replication group to test that it is satisfied for all tables.
@miq-bot add_label wip

So here is the warning I was getting when running tests. It doesn't seem to happen in production mode though. I was able to see the warning by running:
ncarboni@nick-lenovothinkpad-w541:~/Source/manageiq (pglogical *)$ RAILS_ENV=test rails c
Loading test environment (Rails 5.0.0.beta2)
irb(main):001:0> ActiveRecord::Base.connection.primary_key("miq_groups_users")
WARNING: Rails does not support composite primary key.

miq_groups_users has composite primary key. Composite primary key is ignored.
=> nil

I'm not sure how to get around that.

I think generally that primary key are going to be the way to go here.
It is possible to use a UNIQUE constraint where all of the columns involved are not-null and also assign a REPLICA IDENTITY to the constraint, but that seems much more difficult to maintain and test for.

@matthewd This seems to be specific to rails 5. I can't find the same warning in <IP_ADDRESS>

Specifically here https://github.com/rails/rails/commit/444c4d05fea817fcad991e79fa128b640e2e4ff1

@carbonin can you throw in some debugging, and get the backtrace?
primary_key complaining if it knows it's ignoring/mangling some info in its return value seems fair, but I'm still not clear why, for a join table, we'd ever go looking for a PK at all.

@matthewd It's a bit large so https://gist.github.com/carbonin/e01bad710ddc8ea1a3a1

It looks like we're looking for a pk while inserting records.  We should fix this on the Rails side, so I'm preparing a patch.

Great, thanks @tenderlove!

Neat, thanks @tenderlove

The warnings should be fixed in rails/rails@2df891dccdcfbdfb176c55297589712ac379f87d, so I think it's OK for us to ignore them now (the warnings will be gone when we bump Rails)

Thanks again @tenderlove

Closing in favor of opening multiple smaller PRs.


Add --cpus flag to control cpu resources

We currently have various flags for managing cpu resources of a container.  These flags are still needed for advanced use cases around cpu affinity but for the 90% use case having these multiple flags adds confusing for people.
I propose we add a --cpus flag that takes a float for specifying the number of cpus a user wishes to limit the container to.  If a user wishes the container to have 1 cpu then they can simple put --cpus 1.0 as the value and Docker will configure the container correctly.  This also will allow users to add partial cpus enabling --cpus 1.5, --cpus 2.3, --cpus 0.5, etc...
Under the hood this will be implemented by cpu-quota and cpu-period on linux and cpu percent on Windows.  This will be based on time so that it is possible to allocate percentage of a core on the system.
This will also allow swarm to have a unified configuration option across all platforms for scheduling without having to parse platform specific options or leave users trying to decide if they should use cpu-shares( you never should ) or how cpu quota works and what number they should input.
For people wanting to manage container resources simply then this will really help out and result in a simpler docker run cmdline.
docker run --cpus 2.5 --memory 1g ubuntu bash

SwarmKit has a concept of NanoCPUs which I think we could reuse for HostConfig. Created a PR #27958 for that.

We should also make this flag work on windows using the cpu %

@crosbymichael let me reopen then

/cc @jhowardmsft ^^

@crosbymichael @jhowardmsft @thaJeztah I realized the PR #27958 took Windows into consideration. But I don't have a reliable Windows dev setup so not fully tested. Let me see if I can setup a Windows env and test it again.

we can do it, john does not need to worry about it

There's more to consider on Windows. --cpu-percent works for Windows Server Containers (isolation=process), but Hyper-V containers will require more work. The default for Hyper-V containers is 2vCPUs, and the percentage will apply to just those two, not taking into account the host's CPUs. We could set cpu-count (see https://github.com/docker/docker/pull/24194) to the count of CPUs on the host when --cpus is set, but I want think about it a bit to make sure that is the correct solution.

We can make the change for server containers to bring it inline and then figureout what we want to do with hyper-v

Is this planned for docker build as well? (I noticed the other day that it supports the same primitives that this new --cpus is a wrapper around, but it doesn't appear to have received the new wrapper)

I have 20 core box on which I am trying to limit each container to 5 core. With --cpus =5.000, docker is setting CPU period=100ms(default) and CPU quota=500ms. How can quota be greater than period? Correct me if my understanding is wrong.

@nilangshah I think you are misunderstanding something.
It always has to be greater than the period if you are wanting more than 1 core for the container.  If its equal its saying "for every 100ms of cpu time, this container gets 100ms", where if its more in your example its "for every 100ms of cpu time, this container gets 500ms, which means it can run on more cores"
The period is based on 1 cpu, not the entire machine.

@crosbymichael Thank you for quick response and correction.

can cpuset/cpuset.cpus work together with /cpu/cpu.cfs_period_us &cpu.cfs_quota_us ?


Is there a way to get classes back instead of PostCSS-style styles?

Hey Adam!
I’m very interested in this plugin but I’m wondering if there’s a way to get back just Tailwind classes as opposed to the PostCSS-style styles, for example the ones found here.
Is there a reasonable common ground here, even if only for the 90% case, or is it simply incompatible with how this was architected? For my use case, I’d like to bootstrap classes generated from this plugin. For me, relying 100% on PostCSS seems uncomfortable if I need to add special behavior like dark mode or etc. I get that there are a lot of styles that don’t translate to Tailwind CSS, but I suspect that some 90% of them are perfectly compatible.
Thank you.

By the way, if anyone’s curious how this plugin actually works, here‘s the generated CSS for .prose classes from https://tailwindcss-typography.netlify.app.

Sorry I'm not sure what you mean by "PostCSS-style ones", the plugin just generates regular CSS. Can you explain what output you actually want in concrete terms with examples?

Hey Adam! Thanks for the quick reply. Sorry I lost you there.
By PostCSS-styles, I meant basically this:
module.exports = {
  default: {
    css: [
      {
        color: defaultTheme.colors.gray[700],
        maxWidth: '65ch',
        '[class~="lead"]': {
          color: defaultTheme.colors.gray[700],
        },
        // ...

What I’m hoping to get from this plugin is the corresponding Tailwind CSS classes.
So for example, instead of:
        a: {
          color: defaultTheme.colors.gray[900],
          textDecoration: 'underline',
        },

It would be really nice if the plugin or similar can generate:
.prose a {
    @apply text-gray-900 underline
}

This may very well be a non-goal, but it would be really nice if there was parity between Tailwind classes and your styles.js implementation.
I totally get that this may be a non-goal.

I still don't think I understand the problem you're trying to solve, sorry, haha...
Both of those things generate the exact same CSS. What does it matter to you how it's implemented internally? What can you do if we implement it with apply that you can't do now?

Very fair point.
I’m curious about finding dramatically simpler ways of styling articles without using CSS/PostCSS unless necessary. So for context, this is a concept for how someone might be able to style an article in Tailwind CSS: https://gist.github.com/codex-zaydek/f7e87dce51ad4e3c34f0e51853818d4f.
The concept here is that someone can style an article with dramatically less effort because they can think in terms of Tailwind CSS classes. Finally, if they need more control, they can opt-in to styles or even components.
<TailwindArticle
  h1="font-semibold text-3xl leading-tight text-black antialiased"
  emoji={{ verticalAlign: "-10%", fontSize: "120%", lineHeight: 1 }}
>

    Hello, world! 😀

</TailwindArticle>

Would generate:

  Hello, world! 😀

Basically. I’m not sure this is a good idea yet, but the point is by having access to the 90% Tailwind classes this plugin uses, it’s much easier to bootstrap these kinds of ideas into different approaches.
Personally, I want to be able to style articles using Tailwind CSS classes. This plugin would force me to think in PostCSS/Tailwind JS which is fine, but I’m personally interested in the Tailwind CSS class-based approach.
I hope that makes more sense. I get that this may be outside of your goals for this plugin, but as a Tailwind CSS user, I was hoping to have more visibility into the Tailwind CSS classes this plugin uses, not just the compiled CSS.

Gotcha, so there's a couple reasons we have done it internally the way we have instead of using @apply:

There is no guarantee the classes we are trying to apply actually exist. If we say @apply text-3xl but the user has changed their font size configuration, the build would fail. So we instead reference the default Tailwind theme, where we know exactly what exists and what doesn't, and if someone wants to override something because they've changed a color or whatever they can do that by configuring the typography plugin itself.

We wanted to define all spacing and sizing in em instead of rem, so that if someone made a simple customization like changing the font size in the plugin, everything would scale somewhat sensibly and nothing would be completely broken.

There are also a lot of rules that are contextual, like we do stuff like h1 + * for example to override the margin on anything following an h1. Using your approach you'll run into issues there, because you might say <TailwindArticle p="my-6"> but you don't have a way of overriding the top margin to 0 when the p tag is following an h1 without reimplementing CSS syntax all over again, like <TailwindArticle 'h1+*'="mt-0"> or something, which I don't even think is valid JSX.
I've tried what you are trying to do here using MDX and the MDXProvider configuration to add class names to each element and it fell apart quickly because of the contextual differences in styles.
At a high level I think the important thing to think about here is that Tailwind classes are not set in stone, they are a build artifact that depend on your personal theme configuration, so the theme is the source of truth, not the classes themselves.
Either way you can definitely use our styles as inspiration to build what you're building, just look through our styles.js file and translate as much of it as you can to a class-based approach. We don't consider the styles.js file to be an export or anything, so actually pulling it in and using it would always be at-your-own-risk.
So for the reasons outlined above no plans to change this unfortunately 👍

Thanks for replying! I’m grateful for your interaction. All the best. 😀


Implement watch task

The problem
Not sure if this is really important but in v4 we had a watch task which was not ported to v5. Let's reevaluate the importance of it and implement it if we see it to be useful.

This issue was moved to webdriverio/webdriverio#2857


Fix init h2 sql

// Describe your PR here; eg. Fixes #issueNo

Make sure that:

[ ] You have read the contribution guidelines.
[ ] You submit test cases (unit or integration tests) that back your changes.
[ ] Your local test passed mvn clean install -Dmaven.javadoc.skip=true.

Codecov Report

Merging #1388 (736cfc0) into master (be5b377) will decrease coverage by 0.64%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #1388      +/-   ##
============================================
- Coverage     67.05%   66.40%   -0.65%
+ Complexity     2141     2129      -12
============================================
  Files           404      404
  Lines          8781     8781
  Branches        880      880
============================================
- Hits           5888     5831      -57
- Misses         2452     2516      +64
+ Partials        441      434       -7

Impacted Files
Coverage Δ
Complexity Δ

...soul/client/tars/TarsServiceBeanPostProcessor.java
23.17% <0.00%> (-59.76%)
5.00% <0.00%> (-9.00%)

.../soul/admin/service/impl/UpstreamCheckService.java
56.88% <0.00%> (-10.10%)
16.00% <0.00%> (-3.00%)

.../soul/plugin/httpclient/NettyHttpClientPlugin.java
57.14% <0.00%> (-2.05%)
10.00% <0.00%> (ø%)

...omara/soul/sync/data/http/HttpSyncDataService.java
72.54% <0.00%> (+3.92%)
12.00% <0.00%> (ø%)

Continue to review full report at Codecov.

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


Incomplete chunked encoding

I have a page with lots of images (~40), each around 200kb but randomly some of them  (~4) throw an error. They are never the same. They start loading (i see them build up) but then they stop and this error is thrown.
net::ERR_INCOMPLETE_CHUNKED_ENCODING
domrange.js:23

domrange.js sits in the UI package, but i dont know how i could have done wrong in that regard.
I'm running Meteor Release <IP_ADDRESS>
Anyone familiar with this? Could it be a memory issue on the server? It's using 400 of 490 MB. I'll might ramp it up tomorrow to 1GB just for testing but i fear its unrelated.

@nooitaf @maomorales wondering if you resolved this... I am getting a similar issue outlines here https://github.com/CollectionFS/Meteor-CollectionFS/issues/690 I am struggling to resolve it.
My error is random... ie I can upload the same image a few times and sometimes it works for all the transforms, sometimes it does not

@adamgins - I'll solved the problem, however it does not mind I found the root cause of the problem.
First there was a content-length header missing, we fixed that in the source code of collectionFS a time ago. It fixed some problems, however the ERR_CONTENT_LENGTH_MISMATCH continued showing in some weird and random scenarios.
Check this out:
http://stkchf.bootstrup.com/cfs/files/chefphotos/t6TLmcs6NyicPu8ov/IMG-20140822-WA0001.jpg?store=chefphotos_horizontal
And now check this out:
http://kechef.com/cfs/files/chefphotos/t6TLmcs6NyicPu8ov/IMG-20140822-WA0001.jpg?store=chefphotos_horizontal
With the second one, you'll probably get the ERR_CONTENT_LENGTH_MISMATCH. The difference is that the second file is being served directly by nodeJS/meteor app to Chrome - where somehow there is some incompatible header with chrome.
The first URL is served by a cache server that we created, in order to avoid hits to NodeJS app server to download files (avoid as much as possible, as you know Node does not perform that well for this task) – it's a simple layer with a Varnish service. You can accomplish the same goal by using CloudFront. In the end it does hit NodeJS in order to cache the file for the first time or when cache is invalidated - but it serves the file with some different headers that work well on Chrome.
I'm sorry I cannot point you to the specific cause. I solved this with the cache by coincidence (as we wanted to cache anyways) and haven't had time to inspect in depth.

@maomorales thanks. ok I just tried to divert using Cloudflare (the freeversion) and I ended up with a similar error:
Failed to load resource: net::ERR_SPDY_PROTOCOL_ERROR

On the nginx side .. still seems to be cutting off the connection:
Jun 12 10:13:35 BuzzyDockerTestEnv1-buzzytest1 nginx-proxy:  nginx.1    | 2015/06/12 00:13:35 [error] 27#0: *2481 upstream prematurely closed connection while reading upstream, client: <IP_ADDRESS>, server: test.buzzy.buzz, request: "GET /files/files/images/rGM4Gd6zrHrMAvLW9/thumb_IMG_3448.jpg?token=eyJhdXRoVG9rZW4iOiJwaGNhSzVUWnpwT3l1YlV3dTM1UERSeFQ2aU9EUm5DWTN4a1ppR0txZFN3In0%3D&store=thumbs HTTP/1.1", upstream: "http://<IP_ADDRESS>:80/files/files/images/rGM4Gd6zrHrMAvLW9/thumb_IMG_3448.jpg?token=eyJhdXRoVG9rZW4iOiJwaGNhSzVUWnpwT3l1YlV3dTM1UERSeFQ2aU9EUm5DWTN4a1ppR0txZFN3In0%3D&store=thumbs", host: "test.buzzy.buzz"
With cloudflare, the file seems to stay there for a lot longer before the broken image symbol appears.
Did you have to upgrad to Cloudfare "pro" to get this to work?
Just wondering if GraphicsMagick is causing the issue and writing an invalid header?

@adamgins I have the same issue. Have you find a way to fix it ?

sorry I moved away from CollectionFS
Adam Ginsburg
<EMAIL_ADDRESS>tel: +61 411 151 732
www.buzzy.buzz

On 20 Apr 2016, at 11:46 PM, Mickael Lecoq<EMAIL_ADDRESS>wrote:
@adamgins https://github.com/adamgins I have the same issue. Have you find a way to fix it ?
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub https://github.com/CollectionFS/Meteor-CollectionFS/issues/312#issuecomment-212431681

The following lines
 if (fsFile.original.size < (2097152) * 10) {
    const chunkSize = fsFile.original.size / 10;
    FS.config.uploadChunkSize = chunkSize;
  }

fixed my issue
Except on chrome (where my photo is half grey)


Consistent naming for "gen" packages

The following packages compile an executable and then use it to generate source code.  The naming is inconsistent.

src//lib/crypto_params/gen - gen.exe
src//lib/snark_keys/gen_keys - gen_keys.exe
src//lib/pickles/precomputed/gen_values - gen_values.exe
src//lib/dummy_values/gen_values - gen_values.exe
src//lib/coda_base/gen - gen.exe
src//lib/precomputed_values/gen_values - gen_values.exe

A single naming convention should be followed.  Since these all generate source files, I suggest gen_srcs.

Thanks for suggesting this @mobileink

Closing this issue as it is stale for a long time.


AngularJS Parse.com retrieving value problem

I am taking question data from parse.com qustion table. I need to save the answer with question id. But when I am accessing  quesID in JS file, it dispays : {{dt.quesID}} instead of question id itself. I am inistializing the value in ng-init tag: init="ans.quesID='{{dt.id}} . Is there any mistake in it ???
This is html file:

It is a sample description, that provides instruction of how to answer above question..

                 <input type="text" ng-model="ans.quesID" ng-init="ans.quesID='{{dt.id}}'" />

<button type="submit" style="margin: 20px 0 0 0; padding:0 70px" class="btn-survey"  ng-click="addAns(ans);next()" > Next</button>

</form>

This is js file:
$scope.addAns = function (form) {
alert("quesID: "+form.quesID);
var AnsObject = Parse.Object.extend("answer");
var ansObject = new AnsObject();
ansObject.set("answer", form.newAns.toString());
ansObject.set("questionID", form.quesID);
ansObject.save(null, {
success: function (testObject) {
},
error: function (testObject, error) {
alert('Failed to create new object, with error code: ' + error.message);
});
}
};

@mariamano please use an appropriate support channel for those types of general support questions: https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#question
Thnx!


Relationship with entities and queries

Hi,
is it possible to do into the DAO a join with 2 entities who are link with foreign key ?
In order to have the parent and a list of children into the parent object ?
And if we have always the parent and a list of children in memories, can we use the @insert in order to insert into Moor on the 2 tables (like cascade in Doctrine) ?
If yes, do you have example of this 2 questions ?
Thanks

is it possible to do into the DAO a join with 2 entities who are link with foreign key ?
In order to have the parent and a list of children into the parent object ?

Joined return values (e.g. parent with children in one row) are currently only partly supported. Can a database view help you in this situation? Database views fully support JOIN clauses.

And if we have always the parent and a list of children in memories, can we use the @insert in order to insert into Moor on the 2 tables (like cascade in Doctrine) ?

If both floor and moor databases access the same database file, there should technically not be a problem with that. I have never tried that myself though.

This feature would be amazing, I’m actually currently working on it. Similar to what django offers.

Take a look https://github.com/vitusortner/floor/discussions/492

Joins as a feature can be achieved through multiple means:

through @Relation (#47)
through returning arbitrary objects in @Querys (#94)
through assembling views for the returned objects (already implemented, see https://vitusortner.github.io/floor/database-views/.)

But as this question isn't asked for the first time, I think we should improve the documentation on views, to include at least an example for joins.