Cannot upload documents to Azure Cognitive Search

Package Name: azure.search.documents
Package Version: 11.3.0
Operating System: Windows
Python Version: 3.9.5

Describe the bug
SearchClient.upload_documents throws exception when attempting to upload any documents to cognitive search. It can successfully create and delete the index, but not upload documents to it.
requirements.txt:
azure-common==1.1.28
azure-core==1.23.0
azure-search-documents==11.3.0
certifi==2021.10.8
charset-normalizer==2.0.12
idna==3.3
isodate==0.6.1
msrest==0.6.21
oauthlib==3.2.0
requests==2.27.1
requests-oauthlib==1.3.1
six==1.16.0
typing_extensions==4.1.1
urllib3==1.26.8

update-search-index.py:
import time
import sys
from azure.core.credentials import AzureKeyCredential
from azure.search.documents.indexes import SearchIndexClient
from azure.search.documents import SearchClient
from azure.search.documents.indexes.models import (
  CorsOptions,
  SearchIndex,
  SearchFieldDataType,
  SimpleField,
  SearchableField
)

service_name = sys.argv[1]
admin_key = sys.argv[2]
if not service_name:
  raise Exception('Service name cannot be empty')
if not admin_key:
  raise Exception('Azure search admin key cannot be empty')

index_name = "help"

# Create an SDK client
endpoint = f"https://{service_name}.search.windows.net/"
print (f'Endpoint: {endpoint}')
admin_client = SearchIndexClient(endpoint=endpoint,
                      index_name=index_name,
                      credential=AzureKeyCredential(admin_key))

# Specify the index schema
name = index_name
fields = [
        SimpleField(name="DocumentId", type=SearchFieldDataType.String, key=True),
        SearchableField(name="Content", type=SearchFieldDataType.String, analyzer_name="en.lucene"),
        SearchableField(name="Url", type=SearchFieldDataType.String, facetable=True, filterable=True),
        SearchableField(name="Title", type=SearchFieldDataType.String, facetable=True, filterable=True),
        SearchableField(name="MetaTitle", type=SearchFieldDataType.String, facetable=True, filterable=True),
        SearchableField(name="MetaDescription", type=SearchFieldDataType.String, facetable=True, filterable=True),
        SearchableField(name="Product", type=SearchFieldDataType.String, facetable=True, filterable=True, sortable=True),
        SearchableField(name="SubCategory", type=SearchFieldDataType.String, facetable=True, filterable=True, sortable=True),
    ]
cors_options = CorsOptions(allowed_origins=["*"], max_age_in_seconds=60)
scoring_profiles = [
                    {
                      "name": "boostTitles",
                      "text": {
                        "weights": {
                          "Title": 3,
                          "MetaTitle": 7,
                          "MetaDescription": 5,
                          "Product": 3,
                          "SubCategory": 3,
                          "Content": 1
                        }
                      }
                    }
                  ]

suggester = [{'name': 'sg', 'source_fields': ['Title', 'MetaTitle', 'MetaDescription', 'Product', 'SubCategory', 'Content']}]

#Delete existing index
try:
  result = admin_client.delete_index(index_name)
  print ('Index', index_name, 'deleted')
except Exception as ex:
  print (ex)

index = SearchIndex(name=name, fields=fields, scoring_profiles=scoring_profiles, suggesters = suggester, cors_options=cors_options)

# Recreate the index
try:
  result = admin_client.create_index(index)
  print ('Index', result.name, 'created')
except Exception as ex:
  print (ex)

def getSearchDocument():
  return {
<EMAIL_ADDRESS>"upload",
    "DocumentId": "Intro",
    "Url": "contoso.com",
    "Content": "Here is the content of my document",
    "Title": "Intro to Contoso",
    "MetaTitle": "Intro to Contoso",
    "MetaDescription": "Intro to Contoso",
    "Product": "Contoso",
    "SubCategory": "Marketing",
  }

documents = [getSearchDocument()]
print('Documents: ', documents)

search_client = SearchClient(endpoint=endpoint,
                      index_name=index_name,
                      credential=AzureKeyCredential(admin_key))

try:
  print (f"Uploading {len(documents)} documents.")
  result = search_client.upload_documents(documents=documents)
  print ("Upload of new document succeeded:", result[0].succeeded)
  print ("Number of documents uploaded:", len(documents))

except Exception as ex:
  print (ex.message)

# Wait for the search index to complete its magic within Azure
time.sleep(10)
results = search_client.search(search_text="block", include_total_count=True)

result_count = results.get_count()
print ('Total documents matching test query:', result_count)
assert result_count > 0

Output:
Endpoint: https://help-dev2-search.search.windows.net/
Index help deleted
Index help created
Documents<EMAIL_ADDRESS>'upload', 'DocumentId': 'Intro', 'Url': 'contoso.com', 'Content': 'Here is the content of my document', 'Title': 'Intro to Contoso', 'MetaTitle': 'Intro to Contoso', 'MetaDescription': 'Intro to Contoso', 'Product': 'Contoso', 'SubCategory': 'Marketing'}]
Uploading 1 documents.
Operation returned an invalid status 'Not Found'
Traceback (most recent call last):
  File "C:\Users\JohnSmith\update-search-index.py", line 110, in <module>
    result_count = results.get_count()
  File "C:\Users\JohnSmith\AppData\Roaming\Python\Python39\site-packages\azure\search\documents\_paging.py", line 82, in get_count
    return self._first_iterator_instance().get_count()
  File "C:\Users\JohnSmith\AppData\Roaming\Python\Python39\site-packages\azure\search\documents\_paging.py", line 91, in wrapper
    self._response = self._get_next(self.continuation_token)
  File "C:\Users\JohnSmith\AppData\Roaming\Python\Python39\site-packages\azure\search\documents\_paging.py", line 115, in _get_next_cb
    return self._client.documents.search_post(
  File "C:\Users\JohnSmith\AppData\Roaming\Python\Python39\site-packages\azure\search\documents\_generated\operations\_documents_operations.py", line 310, in search_post
    map_error(status_code=response.status_code, response=response, error_map=error_map)
  File "C:\Users\JohnSmith\AppData\Roaming\Python\Python39\site-packages\azure\core\exceptions.py", line 105, in map_error
    raise error
azure.core.exceptions.ResourceNotFoundError: Operation returned an invalid status 'Not Found'

To Reproduce
Steps to reproduce the behavior:

Save the script and requirements.txt
pip install -r requirements.txt
Create a Cognitive Search resource in Azure and note the resource name and primary admin key
Run python  .\update-search-index.py <search-resource-name> <search-admin-key>
The search_client.upload_documents step will throw an exception: "Operation returned an invalid status 'Not Found'"

Expected behavior
The script should not fail when uploading the documents to the newly-created index.
Additional context
The provided script is a trimmed-down version of one that we run during our production build pipeline. As of 10/20/22 the script started throwing this exception 100% of the time and we hadn't changed anything with our process, environment, script, or package versions.
I have been in contact with Azure Support over the last month about this issue and after trying everything they suggested, they told me to submit a bug report here.
In the meantime, we switched over to the Node.js Azure SDK for the purposes of uploading documents to an index.

Thanks for the feedback, we’ll investigate asap.

Hi @tcummin2, I followed your repros but unfortunately I couldn't reproduce the issue.
I ran 'pip install -r requirements.txt' in a new venv:
> pip list
Package                Version
---------------------- ---------
azure-common           1.1.28
azure-core             1.23.0
azure-search-documents 11.3.0
certifi                2021.10.8
charset-normalizer     2.0.12
idna                   3.3
isodate                0.6.1
msrest                 0.6.21
oauthlib               3.2.0
pip                    20.2.1
requests               2.27.1
requests-oauthlib      1.3.1
setuptools             49.2.1
six                    1.16.0
typing-extensions      4.1.1
urllib3                1.26.8

And ran your script. Here is the output:
Endpoint: https://rakshith-search.search.windows.net/
Index help deleted
Index help created
Documents<EMAIL_ADDRESS>'upload', 'DocumentId': 'Intro', 'Url': 'contoso.com', 'Content': 'Here is the content of my document', 'Title': 'Intro to Contoso', 'MetaTitle': 'Intro to Contoso', 'MetaDescription': 'Intro to Contoso', 'Product': 'Contoso', 'SubCategory': 'Marketing'}]
Uploading 1 documents.
Upload of new document succeeded: True
Number of documents uploaded: 1
Total documents matching test query: 0
Traceback (most recent call last):
  File "app1.py", line 107, in <module>
    assert result_count > 0
AssertionError

I was using Python 3.8.6 on Windows.
Please feel free to let me know if I missed anything.

Thanks for the quick response!
I did a little more digging and created Azure Cognitive Search resources in different regions. I found that the script works properly in the West US 2 region, but not the Central US region. Our operation is based in the Midwest so most of our resources belong to the Central US region.
Central US:
Endpoint: https://help-dev3-central-search.search.windows.net/
Index help deleted
Index help created
Documents<EMAIL_ADDRESS>'upload', 'DocumentId': 'Intro', 'Url': 'contoso.com', 'Content': 'Here is the content of my document', 'Title': 'Intro to Contoso', 'MetaTitle': 'Intro to Contoso', 'MetaDescription': 'Intro to Contoso', 'Product': 'Contoso', 'SubCategory': 'Marketing'}]
Uploading 1 documents.
Operation returned an invalid status 'Not Found'

West US 2:
Endpoint: https://help-dev3-west-search.search.windows.net/
Index help deleted
Index help created
Documents<EMAIL_ADDRESS>'upload', 'DocumentId': 'Intro', 'Url': 'contoso.com', 'Content': 'Here is the content of my document', 'Title': 'Intro to Contoso', 'MetaTitle': 'Intro to Contoso', 'MetaDescription': 'Intro to Contoso', 'Product': 'Contoso', 'SubCategory': 'Marketing'}]
Uploading 1 documents.
Upload of new document succeeded: True
Number of documents uploaded: 1

I will send this new information over to Azure support.

Thanks for the updates.
I will close the issue. Please open a service ticket to ask the service team to help.


Azure App Service - use 2018-02-01 version for config/web Prevents IPSecurityRestrictions from getting overwritten

use 2018-02-01 version for config/web Prevents IPSecurityRestrictions from getting overwritten

I dont think the failures are related to my changes. @vincentdass could you confirm ?

@fashaikh We upgrade patch for all tasks that consume the common modules. The failures point to the tasks for which version has to  be bumped up.

CLosing this, as a new PR is created. https://github.com/microsoft/azure-pipelines-tasks/pull/11037


Allow sheet to be the height of the content inside the sheet

Hey! This is awesome, just a thought here with this PR.
I think that this helps #69 by allowing you to add to the sheet props a flag to set the height of the sheet to the height of the content inside the sheet.

Added the logic inside the SheetContainer
Added the prop and passed to context inside Sheet
Added to types
Added an example

Found an issue actually, when the height of the content inside the sheet potentially changes. Going to take a look at that.


Make process startup timeout configurable.

Browser sometimes takes a little longer to startup on busy ci systems. PR makes the existing startup timeout configurable via the driver options.

Thank you! Sounds legit 👍


Sync Up Existing Test Suites with x-common

There are continuous changes of existing tests in x-common.
Is there a good way to keep track and update the Scala tests?
Just to list some recent changes:

[ ] scrabble-score
[ ] nucleotide-count
[ ] phone-number
[ ] prime-factors
[ ] etl
[ ] secret-handshake

Coincidentally, an issue for this topic has only recently been opened: https://github.com/exercism/x-common/issues/524 Perhaps you could chip in there?

What do you think about the idea to directly parse the canonical-data.json file as suggested in this Haskell issue?

I think we should generate the tests programmatically. Some of the test
suites are already built in this way.
Take a look in the testgen directory and
https://github.com/exercism/xscala/blob/master/README.md . The testgen code
I have written isn't all that clean, but it works.
On Wed, Feb 1, 2017 at 10:48 PM abo64<EMAIL_ADDRESS>wrote:

What do you think about the idea to directly parse the canonical-data.json
file as suggested in this Haskell issue
https://github.com/exercism/xhaskell/pull/487?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/exercism/xscala/issues/331#issuecomment-276874183,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABeHGwNgWrPhZPSCe8UemOP8f5_UNmv-ks5rYW4SgaJpZM4LyiJn
.

@ricemery Yes, that looks like the right idea.
I wonder whether we should even bother to generate extra Scala source code from the TestCases as it complicates matters quite a bit.
Maybe just use the TestCases to run the tests immediately? (very similar to the Haskell PR).
(btw, you use play.api.libs.json. Why?)

If I understand the Haskell PR correctly, they want their test code to read the JSON and build/execute test cases dynamically.
I'm not sure I like that idea. It add complexity for the end user trying to figure out how to code their solution to meet the test requirements. When I solve exercism problems, I always look at the test code to figure out how to proceed. I suppose this is TDD.
I think having the test cases obfuscated within the JSON makes doing TDD more difficult.
Though I do agree it would make maintaining the test suites easier.
I am using play json because I knew how to use the api. It is in no way a statement on play json being the best way to parse json.

True, this approach works only if a closer look at the test suite is not required (which is the case in the Haskell track). Some issues:

Every exercise includes a stub with the signature for the solution;
or if we don't want this we need a unified format of the tests that makes it very clear how the solution signature must be: For example always having a (possibly overloaded) function named callMUT or so that then calls and reveals the required signature(s).
The test failure messages must be self-explanatory including input, expected and actual output.
There are no pending exercises (which I personally would welcome - one usually tries to go through the tests from top to bottom anyway to make them green).
Maybe some additional general information about all this on how to run a test suite.

I agree that these are a quite disruptive changes, and that might be reason enough to not go this way.
On the other hand the extra step of creating a Scala source file adds quite some complexity and work for ourselves. Is it really worth the effort?

Creating a Scala source is more work, but I really feel we should keep it that way. Every single exercise I try to solve, I start out with examining the tests. I really like having them be explicit and being able to run or debug them individually.
To solve the problem of automatically keeping up-to-date with the canonical data, I think a better approach would be to write a generator that takes the canonical data and automatically creates the test file.

All right, if that is the majority opinion I will of course follow.
I will look upon it as a challenge to simplify this translation process. :)

I'm sure you can do a much better job of building a generator than I did! I
will admit that my generators are ugly.
On Fri, Feb 3, 2017 at 1:46 AM abo64<EMAIL_ADDRESS>wrote:

All right, if that is the majority opinion I will of course follow.
I will look upon it as a challenge to simplify this translation process. :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/exercism/xscala/issues/331#issuecomment-277194484,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABeHGyzWhZHm6DXAi-FJFnLrB8Tku04Lks5rYulIgaJpZM4LyiJn
.

No, that is fine.
I was thinking to extract some utility functions or so. Your generators are a good start!

Now the x-common JSON schema has become more standardized.
My suggestion is:
We track progress of this issue and update the Scala test suites more or less in sync with it, ideally adding respective test generators.
Even better would be to make use of the schema versions somehow?
What do you think?

So are you suggesting that we should make the basic test generator conform to the updated JSON schema?

@ErikSchierboom Not really, but when I think about it: This is actually a good idea, too! :)
We could do this first. Probably with a clone of TestBuilder (named TestSuiteBuilder, say) in order not to interfere with existing generators.
As this issue is about being in sync with changes in x-common: My initial thought was only to monitor the issue and update our generators and test suites more or less in sync with it.
Or if we somehow keep track of the json file versionIds (for example as a comment in the test suite?) we might even be able to automatically generate the list of outdated test suites?

We are not supposed to change the test data in exercism/x-common#625, except for adding the property key and maybe make other minor changes to pass validation. I'm also taking the opportunity no reformat the files in separated commits.
If any PR there changes the test contents, it is a bug. 🐛
Of course, all the current generators will almost certainly stop functioning.

@rbasso You are right. Maybe I should then say:
Let's use the changes of tests in exercism/x-common#625 to

write/adapt Scala test generators for them.
cover any changes of outdated Scala test suites on the fly.
detect any future changes automatically if we can to keep the Scala test suites up to date.

Sounds like a good plam!

TestCaseGen should be modified to contain all possible json schema fields.
And the Json parser can be included in TestSuiteBuilder to always (?!) create the Seq[TestCaseGen].
Then hopefully the default generator will just work for most test suites.

TestCaseGen should be modified to contain all possible json schema fields.
And the Json parser can be included in TestSuiteBuilder to always (?!) create the Seq[TestCaseGen].
Then hopefully the default generator will just work for most test suites.

I just remembered one important thing...
One of the central features of the new schema is that test data is completely separated from test grouping, so it is possible to write generators that are not sensible to test grouping, and they would continue working if the tests are regrouped/"renested", which is not considered a MAJOR change. In fact, if the test ordering is not changed, regrouping is considered simply a PATCH by the proposed semantic versioning.

@abo64 , @ErikSchierboom ,
I was looking to update perfect-numbers to use the canonical-data.json. I notice that the last 2 test cases are testing error conditions. The existing test suite and solution do not test error conditions. I am trying to decide how to proceed.
I could have the code/tests handle optional or either. But.. We have this exercise set as a difficulty 2. I'm not sure we want to introduce optional or either in a difficulty 2 exercise. So, we would probably want to move the difficulty to 3.
Or, the code could throw an exception. Which doesn't feel right..
Or, the NumberType enumeration could have an additional value of Error. And, the error tests could check for the Error value.
Thoughts?
Thanks

IMO the the right way to represent this in Scala would be with Either as the test cases define precise error messages. If there is no error message as for all-your-base it would be translated to an Option.
And yes, then the difficulty should be increased to 3.

I agree with @abo64!

Thanks @abo64  and @ErikSchierboom !


Build Hugo from a Go program

I use Hugo for most of my sites now, it is awesome. Thanks...
The command line is great, but I am wondering what the best approach would be if I want to have a different Go program do the build of a Hugo site.
My guess is that I would need to create a viper config and then find an entry point while bypassing cobra. Does anyone have suggestions for how I would go about doing this? Thanks...

Please use http://discuss.gohugo.io/ for questions/troubleshooting. Also see  Hugo Documentation.

But you may get a hint at https://github.com/bep/hugo-benchmark/
(we may get a proper API in the future)

Thank you @bep for getting me pointed in the right direction.  I will review Hugo-benchmark and will post on http://discuss.gohugo.io/ if I can't figure it out from there.


[install.sh] ask to modify exist config file during install

What is changed

ask whether you want to modify existing config file (i.e. .bashrc) during installation

there is no way to run install.sh, keeping config file (i.e. .bashrc) unchanged.
therefore, i add this option for interactive mode.

What is the use case for this? Isn't the purpose of the installation to enable Bash-it by including it in the config file that is run when you start a new shell?
I'm not sure I understand how someone would use Bash-it in this case.

in my case, i manage config files on github and, in my config file, bash_it config is already written.
so there is no need to modify config in my case.

OK, got it. In that case - wouldn't it be smarter to detect whether the config file already contains the required lines that load Bash-it?
I would like to avoid having lots of questions in the installer if possible, especially when many of the questions aren't required for the majority of users.

Current problem is that there is no way to run the install script while keeping config file unmodified.
For interactive mode, the script should ask to modify it first, and question about backup files questions should be after that.
i think it is not a long flow for installation, and in the case that program modify file, it should ask.
unless you don't choose interactive mode, install script does not ask anything as before.

Yes, I get your use case, but I still feel that adding an additional question is too invasive, as for most users, the answer will be "Yes, please modify the file." Answering "No" will be a complete edge case, and I don't expect to see that frequently used.
Like I said, a much better option would be to check whether the config file already contains the required lines. Instead of asking the user, the install script would figure it out on its own. In your case, it would see that your ~/.bashrc already contains the lines that load Bash-it and would modify the file.
What do you think about that?

i always want to say 'No, do not modify it' to install script, but it is my case.
i don't know other users experience much.
for scraping config file, what you mean 'required line' is source $BASH_IT/bash_it.sh
but i don't write config file like that, and a lot of users are same as me, they wrote config file by themselves.
therefore, i think checking config file is not a good idea.
i think whenever program modify existing file, they should ask it or tell it to user.
now install script modify config file while not telling anything to user (just telling existing backup file), and it is really weird for me
https://github.com/Bash-it/bash-it/blob/master/template/bash_profile.template.bash

Thanks for the additional information, this makes it a lot easier to understand your use case.
Based on what you wrote, maybe using the install script is not a good idea. The primary purpose of the install script is to ensure that Bash-it is loaded when the user starts a new shell.
Out of curiosity, if you're not using a line like the one you quoted, how do you load Bash-it from your ~/.bashrc?
Also, when you run the install script, do you use it in interactive mode, so that it asks you about every plugin to enable? Or how do you use the installer? There might be better options for you to achieve the same thing.
I think your use case would better be covered by an additional command line flag to the install script. If the flag is provided, it doesn't modify the config file. How about that?

i rewrite alias with my own alias files so that i make bash code not to source bash_it alias
when i get new computer, i often run install script with interactive mode and delete generated bashrc.
flag is also good for me.

Since I keep my dotfiles in a Git repo, I don't run the installer when setting up a new machine - I simply clone my dotfile repo and enable the Bash-it components that I need. The bashrc file already contains the lines that load Bash-it - no need to do that again, same as you.
I keep a script in my dotfiles repo that clones Bash-it and then enables what I need - maybe that would be useable approach for you as well? Here's the script in case you're interested: https://github.com/nwinkler/dotfiles/blob/master/install_bash_it.sh
Feel free to update the PR with a change that implements your feature through a flag instead of a question.

cool example script!
thank you :)
i will modify this PR to flag version

Sure, you're welcome. Looking forward to the updated PR!

i updated to use flag --no-modify-config

@nwinkler friendly ping. if you have time, can you review?

Sorry about the delay - I've been pretty busy. I'll try to find time today...

thank you :) i'm not in hurry, so it's up to you

Sorry for the delay, finally had time to review this. Some findings:

Works fine when running the installer using either ./install.sh --no-modify-config or ./install.sh --interactive --no-modify-config. In these cases, the config file is not modified.
When running the installer using ./install.sh --silent --no-modify-config, the config file is modified. Could you please fix that use case? The expectation is that the config file is not modified in that case.
The README.md file should be updated to show the new installer option. (I know it's also missing a description of the --silent option - feel free to add that as well if you like, otherwise I'll add it in a separate update.)

Could you please take a look at these two items? Looks great otherwise.

thank you for quick review, i will fix it :)

i fixed bug and i add description in README.

Thanks - works fine now! Thanks again for hanging in there and accepting a compromise. If only more people would be like that 😄

thank you so much for reviewing many times :smile:


GetProperties (get_properties) for UIAWrapper

Propose to add GetProperties for UIA elements.
I am sure GetProperties is a good candidate to become a BaseWrapper method.
See current HwndWrapper implementation:
def GetProperties(self):
        "Return the properties of the control as a dictionary"
        props = {}

        # for each of the properties that can be written out
        for propname in self.writable_props:
            # set the item in the props dictionary keyed on the propname
            props[propname] = getattr(self, propname)()

        if self._NeedsImageProp:
            props["Image"] = self.CaptureAsImage()

        return props

Fixed with PR
https://github.com/pywinauto/pywinauto/pull/153


Fixes to 10x workflow

Added strandedness explanation, updated barcodes, zenodo record based on recommendations from @hrhotz
This incorporates fixes mentioned:

https://github.com/galaxyproject/training-material/pull/1600
https://github.com/galaxyproject/training-material/issues/1601

General Question: The data (i.e.: the fastq files) is provided under "https://creativecommons.org/licenses/by/4.0/" by 10X. As far as I know, the barcode files are part of the software, aren't-they? Is the software also distributed under  'CC BY 4.0' ?

As far as I understand, these files come with cell ranger and so are distributed with the cell ranger license which is MIT
https://github.com/10XGenomics/cellranger/blob/master/LICENSE

I am not an expert on open source license, especially, I am always confused wrt the hierarchy between them: If the barcode files are distributed under "MIT", is it then allowed to re-distribute them under  'CC BY 4.0'  on zenodo?

I think it would be enough to serve both licenses in the Zenodo url, but we probably wouldn't need to mention it in the tutorial. Would that work?

@hrhotz You can mix MIT-licensed files with stuff under any other license, as long as you distribute the MIT license file with them.

@nsoranzo Thank You for providing a solution!

@hrhotz good spot, will fix

@hrhotz so I updated the Zenodo link to include an MIT license, and added a link to CC. In the material I changed the cell numbers, and added a section about whitelist barcodes.


Set DO flag when doing NSEC lookups.

Some DNS servers wont answer on NSEC querys unless the DO flag has been set.
Easiest patch is to add 	m.SetEdns0(1232, true) in DoLookupWorker but i dont know if its desired to do this on all querys.
Perhaps some flag is needed for EDNS buffer size and DO?

I think that’s probably fine to set globally for now. Can you submit PR?
On Thu, May 21, 2020 at 11:26 PM Simon Vikström<EMAIL_ADDRESS>wrote:

Some DNS servers wont answer on NSEC querys unless the DO flag has been
set.
Easiest patch is to add m.SetEdns0(1232, true) in DoLookupWorker but i
dont know if its desired to do this on all querys.
Perhaps some flag is needed for EDNS buffer size and DO?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/zmap/zdns/issues/220, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AABREUBZI4MPLQ5DINJLWHLRSX5IDANCNFSM4NHO3X2A
.

Addressed by #323


How to trigger updateAppearance() method from other scripts?

I have 3 menus (a, b, c) that works as a drilldown. In other words, menu a is populated when the page is loaded. However, menu b is populated after menu a change and has values (the values from a are used to populate b.) Then when menu b changes, menu c is populated. Since these menu options are dynamically loaded, the updateAppearance() needs to be called each time a change event is fired!
I want to be able to reuse the code that populates the drilldown menus. So, I want to make sure that the drilldown logic stays independent of BsMultiSelect. In other cases, I am using the same drilldown logic without BsMultiSelect.
In addition to the bsMultiSelect code, I added the following code to activate it using css-class. So my bsMultiSelect.js look like this
// Here I am also including the BsMultiSelect code.

let menus = document.getElementsByClassName('content-picker');

for (let i = 0; i < menus.length; i++) {
    let menu = menus[i];
    var bsMenu = dashboardcode.BsMultiSelect(menu, {
        placeholder: menus[i].getAttribute('placeholder') || '',
        useChoicesDynamicStyling: true,
        cssPatch: {
            choices: { columnCount: menu.getAttribute('data-column-count') || '1' },
        },
        useHighlighting: true
    });

    // save an instance of the bsMenu as a property on the element to be updated later
    menu.bsMenu = bsMenu;
}

Then in another file called drilldown.js I have a function that populates the items in the menu, that looks something like this
function populateMenu(select, url) {

    clearMenu(select);

    fetch(url, {
        method: 'get'
    }).then(response => response.json())
        .then(jsonData => {
            for (let i = 0; i < jsonData.length; i++) {
                let item = jsonData[i];
                let opt = document.createElement('option');

                if (!item.text) {
                    continue;
                }
                opt.value = item.value;
                opt.innerHTML = item.text;

                select.appendChild(opt);
            }

            select.removeAttribute('disabled');
            dispatchChange(select, eventType);

            if (select.bsMenu) {
                // at this point we know that this menu is a bsMenu, lets update its appearance
                // this does not work!
               console.log('Fixing sppearance for menu with id ' + select.id);
                select.bsMenu.updateAppearance();
            }
        })
        .catch(err => {
            console.log(err);
        });
}

As you can see in the above code, I am checking to see if select.bsMenu is set, and if so I want to fire select.bsMenu.updateAppearance();. But in this case it does not work. I do see the log to the console as expected, but select.bsMenu.updateAppearance(); does not really do anything. I confiremed that the populateMenu function actually appends the options to the menu correctly. but select.bsMenu.updateAppearance(); does not seem to have effect in my case.
I am loading the scripts in the following order
drilldown.js
bsMultiSelect.js

The drilldown.js must be loaded first as it has the listeners to the change events. Is this an issue or something I am doing wrong here?

I'm not sure that I'm able to understand this with witout snippet. Create snippet and ask it through stackOverflow (there are tag for bsMultiSelect). I wll reply you in SO.
P.S. One thing I can say ahead: updateAppearance updates only "validity" and "size" (push changes from bs custom vlidity and size css classes ). it seems like you want to is data - use udateData for it.

@rpokrovskij Thank you! Calling  select.bsMenu.updateData(); instead worked!


Cannot select text in atom-overlay

Prerequisites

[x] Put an X between...

Description
Currently, when we use decorateMarker the rendered text is not selectable, and there is no way to make it available. This has affected atom-ide-datatip, linter-ui-default, atom-ide-signature-help, etc.
  editor.decorateMarker(overlayMarker, {
      type: "overlay",
      class: "datatip-overlay",
      position: "tail",
      item: view.element,
    })

Adding CSS properties such as the following does not help
  pointer-events: all !important;
  user-select: text !important;

Steps to Reproduce

Install one of the above-mentioned packages
Invoke an overlay
Try to select the text

Expected behavior:
Giving an option to select the text
Actual behavior:
No way to select the text
Reproduces how often:
Always
Versions
All the versions
Additional Information
Datatip issue: https://github.com/atom-ide-community/atom-ide-datatip/issues/60

X

X


Boxing interface usage is allocating unnecessary heap data

scenario: using the async API but fully sync in reality after checking completion; each call issues an InternalFasterSession boxed on the heap;
You can see this by running a memory profiler on this branch (branch: faster-boxing; project: /test/Benchmarks) in DEBUG mode (release mode runs BDN; you don't want that). The test runs 25,000 operations in a loop; the only heap alloc is:
Type	Allocations
| - FASTER.core.ClientSession<FASTER.core.SpanByte, FASTER.core.SpanByte, Input, Output, FASTER.core.Empty, CacheFunctions>.InternalFasterSession	25,000
Since InternalFasterSession is a struct, this is unlikely to be intentional.
This is almost certainly where InternalFasterSession is being passed as a IFasterSession<Key, Value, Input, Output, Context> - for example DoSlowOperation, AsyncOperationInternal, etc, which will force it to be boxed. To avoid boxing, the type must be either:

typed as itself, InternalFasterSession
"constrained", i.e. passed (and used as) a generic TSession where TSession : IFasterSession<Key, Value, Input, Output, Context> (used in a few places, such as FasterSession in RmwAsync)

but: any time it is assigned / passed as IFasterSession<...>: it will box, i.e. allocate

Your findng is accurate, but the reason we have not addressed it is because there is a standard pattern we use to avoid this:
var status = sync-call
if (status.IsPending)
   (await or sync-wait) complete-pending

An example for Read along these lines is in Garnet here: https://github.com/microsoft/garnet/blob/main/libs/server/Storage/Session/MainStore/MainStoreOps.cs#L18

To confirm, then: using the synchronous API, checking IsPending, and in the
pending scenario using asynchronous completion: is equivalent
(functionally) to using the asynchronous API in the first instance? (give
or take having to wire up cancellation etc, which I can probably do)
On Sun, 31 Mar 2024, 21:11 Badrish Chandramouli, @.***>
wrote:

Your findng is accurate, but the reason we have not addressed it is
because there is a standard pattern we use to avoid this:
var status = sync-call
if (status.IsPending)
(await or sync-wait) complete-pending
An example for Read along these lines is in Garnet here:
https://github.com/microsoft/garnet/blob/main/libs/server/Storage/Session/MainStore/MainStoreOps.cs#L18
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/FASTER/issues/907#issuecomment-2028893336
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAEHMF3ZI6MRK7L7B33CBDY3BUW7BFKMF2HI4TJMJ2XIZLTSOBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDUOJ2WLJDOMFWWLLTXMF2GG2C7MFRXI2LWNF2HTAVFOZQWY5LFUVUXG43VMWSG4YLNMWVXI2DSMVQWIX3UPFYGLLDTOVRGUZLDORPXI6LQMWWES43TOVSUG33NNVSW45FGORXXA2LDOOJIFJDUPFYGLKTSMVYG643JORXXE6NFOZQWY5LFVEYTIMZSGUZTAMRQQKSHI6LQMWSWS43TOVS2K5TBNR2WLKRSGIYTIMBSGQ2DKMVHORZGSZ3HMVZKMY3SMVQXIZI
.
You are receiving this email because you authored the thread.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub
.

@badrishc I've spiked a switchover to the synchronous API exclusively, with any mention of async only in the IsPending scenario; I'll run the numbers when my machine is working


Source map error with RC version update

🐞 Bug report
Command (mark with an x)

[X] serve
[X] update

Is this a regression?

Yes
Description
 A clear and concise description of the problem...
when connecting to http://localhost:4200 after ng serve I get a blank screen page and an error
🔬 Minimal Reproduction
Maybe not the best idea I had but I've runned the following command
all of the following packages where on 8 version
ng update @angular/cdk @angular/cli @angular/core @angular/material rxjs --allowDirty --next --force
now my angular.json looks like that:
  "dependencies": {
    "@angular/animations": "^11.0.0-rc.0",
    "@angular/cdk": "^11.0.0-rc.0",
    "@angular/common": "^11.0.0-rc.0",
    "@angular/compiler": "^11.0.0-rc.0",
    "@angular/core": "^11.0.0-rc.0",
    "@angular/fire": "^6.0.2",
    "@angular/forms": "^11.0.0-rc.0",
    "@angular/material": "^11.0.0-rc.0",
    "@angular/platform-browser": "^11.0.0-rc.0",
    "@angular/platform-browser-dynamic": "^11.0.0-rc.0",
    "@angular/router": "^11.0.0-rc.0",
    "@types/fabric": "^3.0.0",
    "bootstrap": "^4.3.1",
    "color": "^3.1.2",
    "core-js": "^2.5.4",
    "fabric": "^3.3.2",
    "fabric-with-gestures": "^4.0.0-rc.1",
    "firebase": "^7.19.1",
    "jquery": "^1.9.1",
    "popper.js": "^1.14.7",
    "rxjs": "^7.0.0-beta.8",
    "tslib": "^1.9.0",
    "zone.js": "^0.10.3"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.1100.0-rc.0",
    "@angular/cli": "~11.0.0-rc.0",
    "@angular/compiler-cli": "~11.0.0-rc.0",
    "@angular/language-service": "~11.0.0-rc.0",
    "@types/jasmine": "~2.8.8",
    "@types/jasminewd2": "~2.0.3",
    "@types/jquery": "^3.3.31",
    "@types/node": "^8.9.5",
    "codelyzer": "~4.5.0",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~5.2.3",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~1.1.2",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~7.0.0",
    "ts-node": "~7.0.0",
    "tslib": "^1.9.0",
    "tslint": "~6.1.3",
    "typescript": "~4.0.5"
  }

🔥 Exception or Error

    Error: request failed with status 404
    ressource URL: http://localhost:4200/vendor.js
    URL source link: startWith.js.map

🌍 Your Environment

Angular CLI: 11.0.0-rc.0
Node: 14.5.0
OS: darwin x64

Angular: 11.0.0-rc.0
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, language-service, material, platform-browser
... platform-browser-dynamic, router
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1100.0-rc.0
@angular-devkit/build-angular   0.1100.0-rc.0
@angular-devkit/core            11.0.0-rc.0
@angular-devkit/schematics      11.0.0-rc.0
@angular/fire                   6.0.2
@schematics/angular             11.0.0-rc.0
@schematics/update              0.1100.0-rc.0
rxjs                            7.0.0-beta.8
typescript                      4.0.5

Anything else relevant?
The error message used to show on Chrome but the one I gave you is a translation of Firefox and don't show on Chrome anymore.
Firefox 82.0.1
Chrome 86.0.4240.111

This seems like a bug but we'll need to look at a reproduction to find and fix the problem. Can you setup a minimal repro please?
You can read here why this is needed. A good way to make a minimal repro is to create a new app via ng new repro-app and adding the minimum possible code to show the problem. Then you can push this repository to github and link it here.
This might be related to your directory structure so its really important to get an accurate repro to diagnose this.

In a nutshell what is happening here is that.
In version 11, we no longer process vendor sourcemaps unless the vendor option is enabled which improves build time, ~3 seconds on an ng new application. The drawback of this that //# sourceMappingURL comment is not removed from the source file of the libraries. Hence, a warning will be issued in the console because the sourcemap cannot be loaded.

@alan-agius4 Sorry I din't gave you an example but the project is quite big and I assumed I gave you sufficent infos to reproduce the basic case (which is updating an existing project) as when I downgraded back to the latest 10th version of angular everything went back to normal. Thanks again for your time

@JSmithOner, I was able to replicate the reported issue.


[Go Live][Dec 23]

Push to live

Docs Build status updates of commit bf1b2dd:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

msteams-platform/assets/images/adaptive-cards/adaptive-cards-tab-action-controls.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/add-client-aapplication.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/add-permissions.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/add-scope.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/app-id-url.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/appsettings-json.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/authentication-tokens.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/azure-bot-ui.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/azure-bot.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/bot-home-page.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/channel-teams.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/client-secret-value.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/client-secret.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/config-microsoft-app-id.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/configure-web-redirect-url.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/create-azure-bot.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/desktop-mobile-screenshot.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/go-to-resource-card.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/manage-bot-label.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/manifest-vsc.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/manifest.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/multi-tenant.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/new-client-secret.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/ngrok-messaging-endpoint.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/ngrok-url.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/oauth-connection-setting.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/repo-download.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/sample-task-module.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/select-teams.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/select-terms-of-service.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/sign-in-page.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/sign-out.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/single-tenant.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/success-sign-out.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/tab-home-page.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/tab-in-teams.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/task-submit.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/validation-pane.png
:white_check_mark:Succeeded
View

msteams-platform/assets/images/adaptive-cards/web-redirect-url-display.png
:white_check_mark:Succeeded
View

msteams-platform/mstdd-landing.yml
:white_check_mark:Succeeded
View

msteams-platform/sbs-tab-with-adaptive-cards.yml
:white_check_mark:Succeeded
View

msteams-platform/tabs/how-to/authentication/auth-aad-sso.md
:white_check_mark:Succeeded
View

msteams-platform/whats-new.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


Motion detection not avaliable in automation

Description
After latest update, the motion and cellmotion etinity are not visible for use as an trigger in automation(C310). My C310WS are working fine. The etinity shows in the list but not when I want to use it as an trigger in automation.
Reproduction Steps

Automation
Event device action
Motion detection

Expected behavior
Before latest update, I could use motion detection as an trigger in my automations, not working now.
The entinity shows for my C310WS
If applicable, add error logs.
No response
Device Firmware
1.3.7
Using stream component
No
Does camera work via official integrations?
Yes
Camera has all attributes filled out in developer tools
Yes
HASS Environment
HAOS on dedicated NUC
Search for similar issues
Yes
Additional information
No response

hello, for me no more motion sensors on my 3 tapo cam, c200, c310 and c320w after update today  :(

Read faq and get back once you try all the steps. Nothing was changed in latest version for motion detection.


core needs

Implement following things:

[x] Support transactional operations
[x] Callbacks as function parameter
[x] Access C bindings  via the Rust's safe interface

Done via 86d8e0beac4351ead4a9bd0c84c8a82f89fd451c


No longer depend on nvim-lspconfig

Revert "Revert "feat: no longer require nvim-lspconfig (#27)" (#30)"
This reverts commit 67bb9a1c504fc522391b83f1f46be1a1ef98918a.
This reverts the #30, which is a revert of #27. We can merge this when
vim.fs and vim.lsp.start make it into stable.
Closes #5 Lose dependency on lspconfig

This removed support for the cmd option and given that it's still in the docs, I believe it wasn't intentional.

@jfpedroza fixed in #42


decrement encountersUntilSRChoice at end of combat, not start

This is failing tests right now. I need to get the two tests it's failing (and any potential other tests I add) to process the end of combat with all the monsters in question, but I don't immediately see a way to do that, so this is a draft for now.

This post from Malibu Stacey quotes cannonfire40 (a dev):

cannonfire said:

fwiw
it's not turnsinzone % 11 == 0 precisely, it's (turnsinzone - lastnc) >= 11
which may help your intuitions
(this is how all scheduled NC forcing works)
also, the bosses are NCs.

and

the lodestone is a superlikely
not an NC

when asked if the "Like a Loded Stone" encounter resets the schedule too.

Also

because the NC does not advance turnsinzone
but bosses do

I chose to implement the counter using exactly the formula that cannonfire40 said was used by KoL itself.
I am surprised that you chose to eliminate that.

I think PR https://github.com/kolmafia/kolmafia/pull/1676 does this with a much less invasive change.

With those, I could test that we are now incrementing turns at the end of the fight, not the start.
I suppose that DEBUG logs of ending a fight via Using the Force could also verify that the "end of fight" code was not running and the counters changing, but I had no such DEBUG logs available today.
Maybe tomorrow.

Looks like your PR is handling this in a much more elegant way--great work! I have no idea why I didn't think to just move the handleRufusCombat function to be end of combat instead of start, that's an extremely good solution.
Are we able to use CLEESH or Macrometeor against bosses? Handling the NC reset at end of combat could be troublesome if we can, but I expect that as bosses they're immune to monster replacement. Either way, that's extremely surmountable
With respect to this:

it's not turnsinzone % 11 == 0 precisely, it's (turnsinzone - lastnc) >= 11
I don't currently see a meaningful difference between that and merely decrementing the property; the quote there seems to clarify that you can't "miss" a noncombat by hitting a wanderer or analogous disruption at the right moment. Decrementing the property and resetting it to 11 when you hit an appropriate NC should also replicate that behavior, but without the intermediary properties. But there could very well be something big that I'm missing here that makes these more different than I assumed.

You have a point about "no meaningful difference".
And it would be an elegant code change to eliminate the intermediate properties and just do it the way we do "encountersUntilNEPChoice", say.
We have tests for "encountersUntilSRChoice".
Should be a "simple matter of coding" to remove the lines from the tests that deal the intermediate properties, change to the simpler implementation of "encountersUntilSRChoice", and verify that the tests still pass.
That could be a separate PR.


🐛 BUG: Incorrect URLs for npm packages, causing 404 in watch mode

Quick checklist

[X] I am using the latest version of Snowpack and all plugins.

What package manager are you using?
npm
What operating system are you using?
Windows
Describe the bug
Some URLs generated by Snowpack in --watch mode are 404s. Partly, the reason for that is non-relative URLs, addressed in #3597. However, the incorrect URLs point to files that do not exist altogether.
This happens with<EMAIL_ADDRESS>on npm. Snowpack generates the following:
build
├── _snowpack
│   └── pkg
│       ├── oblik.core.component.v1.1.4.js
│       └── oblik.core.watcher.v1.1.4.js
└── index.js

However, oblik.core.component.v1.1.4.js contains:
import { d as defaults } from '/_snowpack/pkg/oblik.v1.1.4/common/index-2bf599f2.js';

...which doesn't exist. I can see Snowpack also generates the following:
node_modules
└── snowpack
    ├── build
    │   └──<EMAIL_ADDRESS>    │       ├── common
    │       │   └── index-2bf599f2.js
    │       ├── oblik
    │       │   └── core
    │       │       ├── component.js
    │       │       └── watcher.js
    │       └── import-map.json
    └── .meta

It looks like the path in the output folder is referencing a file in the cache:
_snowpack/pkg/oblik.v1.1.4/common/index-2bf599f2.js --- path in the output folder
<EMAIL_ADDRESS>--- actual file in the cache

All paths work fine without the --watch option, though. Linked packages work too. If I npm link oblik, everything works as expected. It seems like an npm/cache issue.
Steps to reproduce

git clone https://github.com/hdodov/repro-snowpack-url-issue
cd repro-snowpack-url-issue
npm i
npx snowpack build --watch
Output build folder should contain incorrect paths.

Link to minimal reproducible example (optional)
https://github.com/hdodov/repro-snowpack-url-issue

Seeing exactly this - comparing the build with just npm run build, vs npm run build -- --watch, the watch output stamps the version number in resulting in a 404:
import React from "../../../_snowpack/pkg/react.v17.0.2.js";

I am not sure if this is the same issue, but I am getting a very different file structure when building with --watch compared to regular build. Not sure if I need to open a new issue, or if its address by this existing issue.
For context, I'm using preact and typescript, although I don't think that should affect this.
The difference in output is the pkg directory (I've collapsed other directories below to make it clearer whats different).
When I run snowpack build, this is the structure of the output:
build
  _snowpack
    link
    pkg
      common
        _commonjsHelpers-913f9c4a.js
        preact.module-370f5a61.js
        preact-router.es-f5a825fe.js
      preact
        hooks.js
      ...

But when I run snowpack build --watch, this is the structure of the output:
build
  _snowpack
    link
    pkg
      preact.hooks.v10.5.14.js
      preact.v10.5.14.js
      preact-router.match.v3.2.1.js
      preact-router.v3.2.1.js
      since-time-ago-typescript.v2.1.0.js

The problem comes in watch mode, because the imports are referencing files from the first structure shown above, that don't exist in the watch output structure. Specifically, the file named preact-router.match.v3.2.1.js contains this import:
import { p as preactRouter_es } from '/_snowpack/pkg/preact-router.v3.2.1/common/preact-router.es-f1da841e.js';

but there is no directory named common in the output from --watch, so this file does not exist.
This causes the entire app to fail to render.
Sorry for this being such a long comment, I've tried to include any relevant detail, if I've missed anything please let me know, and if this is a seperate issue, please let me know to create a new one.
Many thanks, Brian

Same issue.


Swift_TransportException: Failed to authenticate on SMTP server with username<EMAIL_ADDRESS>using 2 possible authenticators

Bug report?         yes
How used?           Laravel  5.4.28
Swiftmailer version 5.4.8
PHP version       7.1.11
I config outlook smtp details in laravel  with tls and port 587 . i getting Swift_TransportException . i am able login outlook with those credentials.

I can;t get Swift Mailer to connect to either Gmail server or Website Hosting Server even my hosting support guy (Inmotion Hosting) spent 30 minutes on the phone with me trying to fix the issue.
I would like  if someone replied please.


radare2: 4.5.0 -> 4.5.1

Motivation for this change
fixes  CVE-2020-17487, CVE-2020-16269
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

20.03 backport: 43a27ce45d52afb59bb3bd6570852d0623fcbc96


Allow streaming LSP communication into the inspector

From @octref on June 12, 2018 23:57
Currently the web app has a way to load log files. However, it would be nice if it can connect to a data source (using websocket?) and let LSP logs be appended to the visualization as they happen.
Copied from original issue: octref/lsp-inspector#5

https://github.com/octref/vscode-lsp-inspector

Documentations will follow.


Add GoVet Linter

Summary:
go tool vet or "go vet" help detect functional problems in Golang
code. It is useful in addition to golint, which checks for style violations.
Test Plan:
Ran manually on one of my personal repos:
>>> Lint for test.go:

   Warning  (GOVET)
    Possible formatting directive in Println call

               3 import "fmt"
               4
               5 func main() {
    >>>        6        fmt.Println("%d", 1)
               7 }

Reviewers: #blessed_reviewers, sectioneight, joshuaspence
Subscribers: eMxyzptlk, epriestley
Maniphest Tasks: T6867
Differential Revision: https://secure.phabricator.com/D12120

@malandrew, fixes #7

Great.
:ship: :it:


After rebalance, consumers are not re-joining the consumer group.

I have a service running in K8s that is consuming from a Kafka topic. When a new pod comes up, this triggers a rebalance which seems to kick old consumers out of the consumer group. I have 16 pods / consumers running, but after a new pod comes up I can have only 1 consumer (consuming all partitions) and my 15 other pods are idle.
When this new pod comes up, the existing consumers have messages like the following in the logs:
22:33:44.055 [INFO] [org.apache.kafka.clients.consumer.internals.AbstractCoordinator:1072] [pc-broker-poll] - [Consumer instanceId=6588bffbc4-nnnzc, clientId=consumer-my-consumer-6588bffbc4-nnnzc, groupId=my-consumer] Request joining group due to: group is already rebalancing
22:33:44.055 [INFO] [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator:338] [pc-broker-poll] - [Consumer instanceId=6588bffbc4-nnnzc, clientId=consumer-my-consumer-6588bffbc4-nnnzc, groupId=my-consumer] Revoke previously assigned partitions my-topic-12, my-topic-13, my-topic-14
22:33:47.160 [INFO] [org.apache.kafka.clients.consumer.internals.AbstractCoordinator:1072] [kafka-coordinator-heartbeat-thread | my-consumer] - [Consumer instanceId=6588bffbc4-nnnzc, clientId=consumer-my-consumer-6588bffbc4-nnnzc, groupId=my-consumer] Request joining group due to: group is already rebalancing
...(5 mins of repeated logs)
22:38:41.699 [INFO] [org.apache.kafka.clients.consumer.internals.AbstractCoordinator:1072] [kafka-coordinator-heartbeat-thread | my-consumer] - [Consumer instanceId=6588bffbc4-nnnzc, clientId=consumer-my-consumer-6588bffbc4-nnnzc, groupId=my-consumer] Request joining group due to: group is already rebalancing
22:38:44.103 [WARN] [org.apache.kafka.clients.consumer.internals.AbstractCoordinator$HeartbeatThread:1481] [kafka-coordinator-heartbeat-thread | my-consumer] - [Consumer instanceId=6588bffbc4-nnnzc, clientId=consumer-my-consumer-6588bffbc4-nnnzc, groupId=my-consumer] consumer poll timeout has expired. This means the time between subsequent calls to poll() was longer than the configured max.poll.interval.ms, which typically implies that the poll loop is spending too much time processing messages. You can address this either by increasing max.poll.interval.ms or by reducing the maximum size of batches returned in poll() with max.poll.records.
22:38:44.103 [INFO] [org.apache.kafka.clients.consumer.internals.AbstractCoordinator:1025] [kafka-coordinator-heartbeat-thread | my-consumer] - [Consumer instanceId=6588bffbc4-nnnzc, clientId=consumer-my-consumer-6588bffbc4-nnnzc, groupId=my-consumer] Resetting generation and member id due to: consumer pro-actively leaving the group
22:38:44.103 [INFO] [org.apache.kafka.clients.consumer.internals.AbstractCoordinator:1072] [kafka-coordinator-heartbeat-thread | my-consumer] - [Consumer instanceId=6588bffbc4-nnnzc, clientId=consumer-my-consumer-6588bffbc4-nnnzc, groupId=my-consumer] Request joining group due to: consumer pro-actively leaving the group

The Request joining group due to: group is already rebalancing message is repeated for around 5 mins. My messages are very quick to process (< 25ms with default max.poll.records) and we did not hit this issue previously in <IP_ADDRESS>.
Is there a regression in one of the two recent versions that may cause this?

Hi @ryan-clancy,
Can you please provide more information on setup / configuration?
Version of Kafka Brokers, version of PC used, ordering mode of PC, commit mode, partition assignment strategy, consume or consumer and produce mode, anything else that may be relevant?

@rkolesnev: we are using AWS MSK (2.8.2) with version <IP_ADDRESS> of PC. The ordering is KEY, commit mode + partition assignment strategy are default, and we are using consume only mode. These have all remained constant (these have all been the same for over a year) with the exception of the PC version.
Here are the consumer properties:
allow.auto.create.topics = true
auto.commit.interval.ms = 5000
auto.include.jmx.reporter = true
auto.offset.reset = earliest
bootstrap.servers = [...]
check.crcs = true
client.dns.lookup = use_all_dns_ips
client.id = consumer-myconsumer-1
client.rack =
connections.max.idle.ms = 540000
default.api.timeout.ms = 60000
enable.auto.commit = false
exclude.internal.topics = true
fetch.max.bytes = 52428800
fetch.max.wait.ms = 500
fetch.min.bytes = 1
group.id = myconsumer
group.instance.id = null
heartbeat.interval.ms = 3000
interceptor.classes = []
internal.leave.group.on.close = true
internal.throw.on.fetch.stable.offset.unsupported = false
isolation.level = read_uncommitted
key.deserializer = class org.apache.kafka.common.serialization.StringDeserializer
max.partition.fetch.bytes = 1048576
max.poll.interval.ms = 300000
max.poll.records = 1000
metadata.max.age.ms = 300000
metric.reporters = []
metrics.num.samples = 2
metrics.recording.level = INFO
metrics.sample.window.ms = 30000
partition.assignment.strategy = [class org.apache.kafka.clients.consumer.RangeAssignor, class org.apache.kafka.clients.consumer.CooperativeStickyAssignor]
receive.buffer.bytes = 65536
reconnect.backoff.max.ms = 1000
reconnect.backoff.ms = 50
request.timeout.ms = 30000
retry.backoff.ms = 100
sasl.client.callback.handler.class = null
sasl.jaas.config = null
sasl.kerberos.kinit.cmd = /usr/bin/kinit
sasl.kerberos.min.time.before.relogin = 60000
sasl.kerberos.service.name = null
sasl.kerberos.ticket.renew.jitter = 0.05
sasl.kerberos.ticket.renew.window.factor = 0.8
sasl.login.callback.handler.class = null
sasl.login.class = null
sasl.login.connect.timeout.ms = null
sasl.login.read.timeout.ms = null
sasl.login.refresh.buffer.seconds = 300
sasl.login.refresh.min.period.seconds = 60
sasl.login.refresh.window.factor = 0.8
sasl.login.refresh.window.jitter = 0.05
sasl.login.retry.backoff.max.ms = 10000
sasl.login.retry.backoff.ms = 100
sasl.mechanism = GSSAPI
sasl.oauthbearer.clock.skew.seconds = 30
sasl.oauthbearer.expected.audience = null
sasl.oauthbearer.expected.issuer = null
sasl.oauthbearer.jwks.endpoint.refresh.ms = 3600000
sasl.oauthbearer.jwks.endpoint.retry.backoff.max.ms = 10000
sasl.oauthbearer.jwks.endpoint.retry.backoff.ms = 100
sasl.oauthbearer.jwks.endpoint.url = null
sasl.oauthbearer.scope.claim.name = scope
sasl.oauthbearer.sub.claim.name = sub
sasl.oauthbearer.token.endpoint.url = null
security.protocol = SSL
security.providers = null
send.buffer.bytes = 131072
session.timeout.ms = 45000
socket.connection.setup.timeout.max.ms = 30000
socket.connection.setup.timeout.ms = 10000
ssl.cipher.suites = null
ssl.enabled.protocols = [TLSv1.2, TLSv1.3]
ssl.endpoint.identification.algorithm = https
ssl.engine.factory.class = null
ssl.key.password = null
ssl.keymanager.algorithm = SunX509
ssl.keystore.certificate.chain = null
ssl.keystore.key = null
ssl.keystore.location = null
ssl.keystore.password = null
ssl.keystore.type = JKS
ssl.protocol = TLSv1.3
ssl.provider = null
ssl.secure.random.implementation = null
ssl.trustmanager.algorithm = PKIX
ssl.truststore.certificates = null
ssl.truststore.location = null
ssl.truststore.password = null
ssl.truststore.type = JKS
value.deserializer = class org.apache.kafka.common.serialization.ByteArrayDeserializer

Thanks, i will look into it at earliest opportunity.
It is a little bit strange as there weren't many changes in that area of code in the recent versions - if you have capacity and able to recreate this behaviour in integration test - basically create a reproducible example - I would really appreciate it.

@rkolesnev - this looks to be the same issue as https://github.com/confluentinc/parallel-consumer/issues/648. When we remove the .producer(kafkaProducer) from our builder, the issue goes away.
I will close this issue in favor of https://github.com/confluentinc/parallel-consumer/issues/648, which has some steps to re-produce.


Support comments for enum values

To leave comments on Enum values like below. This allows us to use comments for other tools.
 enum ProductTypes {
    # New
     NEW
    # Used
     USED
    # Refurbished
     REFURBISHED
 }

Thank you for creating very useful tool.

Thanks, @lacolaco. This sounds like a good enhancement, to me. I want one of the other maintainer's opinions before moving forward, but it's likely we'd appreciate a PR for this, I think, if you're interested in helping out with that. :)


Search icons not displayed correctly on current Bootstrap (v4.0.0-beta.3)

After going from v4.0.0-beta.2 to v4.0.0-beta.3 the search and clear-search icons next to the search input don't show up correct anymore:
v4.0.0-beta.2

v4.0.0-beta.3

Not working on beta 6 either. Any idea what version is okay?


Propagate custom user assigned tags to every resource created/managed by ACA environment

This issue is a: (mark with an x)

[x] bug report -> please search issues before submitting
[ ] documentation issue or request
[ ] regression (a behavior that used to work and stopped in a new release)

Issue description
Custom user assigned tags set during ACA environment provisioning are not propageted to all the resources in the managed (MC_) resource group.
We have a policy in place that blocks creation of resources not tagged with mandatory tags.

All resources in the managed (MC_) resource group inherit tags from ACA environment
Actual behavior [What actually happened.]
1 out of 2 Public IP address resources, the one mapped to the frontend IP configuration of the LB, in the managed (MC_) resource group is not inheriting tags from the ACA environment.
Additional context
This was reproduced using cli and terraform.

I will fix this.

Fix is ready. Waiting for rollout.

The fix has been deployed


Script to analyze BLAST output from host genome

This is marked as a good first bug because, although it sounds complicated, it's computationally not as bad as it sounds - I think. There might be some tricky sections, but if a newcomer is attempting this, I'm available for questions anytime! Just comment in this issue.
Motivation
Research has suggested that there may be cases when CRISPR systems are used for something besides immunity to foreign DNA - perhaps they could be regulating the host genome, or they might simply be inactive. A clue that one of these things might be happening is if there are spacers that come from their own host genome. To this end, we need functions to (A) BLAST spacers against the host genome and (B) analyze the BLAST output. The first function is described in issue #60 and the second function is described here.

The function
Input:

XML file produced by the BLAST function in issue #60 (example here).
File containing the start and end positions of CRISPR loci in the sequence, which can be found here. The format of each row in this file is Accession, CRISPR_ID, start, end.
Optional expect value cutoff, default should be 1.

The function should do the following:

Use BioPython's built-in BLAST parser to parse the XML file produced by BLAST (example in Input section). This is also done in filterByExpect_all_v2.py, although I've noticed a few mistakes just now so be careful!
This is the tricky part: differentiate between a match with itself (i.e. the source spacer array) and a match somewhere else in the genome. I think the easiest way might be to run extract_CRISPRdb.py once at the beginning of the analysis, and then use the start and stop locations of the CRISPR loci as boundaries to exclude from. If there is more than one CRISPR locus in a genome, matches to any of the loci should be considered "CRISPR" matches. This will have to be slightly modified if people are contributing genomes not from CRISPRdb - but this could be solved by first running CRISPRfinder on submitted genomes. If a match is suspected to be from the original CRISPR array, the output should mark it as being "CRISPR". If it is suspected to be from a different region of the genome, the output should mark it as being "non-CRISPR".

Output:

A csv file called accession_self-spacers.csv (where "accession" is the NCBI accession number, i.e. NC_000853) with the following column headings:

Query
Score
Expect
QueryStart
QueryEnd
SubjectStart
SubjectEnd
Source

The "Source" column contains the "CRISPR" or "non-CRISPR" flag. All other column headings are fields in the object that results from the BLAST-parser module.

I would like to try this out, but I am going to need help. I am going to update here with questions.

@Ipix, awesome!

Hi @lpix I can also help if you run into any technical problems...

@lisajguo, I added a file with CRISPR locus start and end positions for each organism.

Hey
Is this issue still open?
I would like to give it a try.

Hi @bhanu546, yes it's still open! Let me know if there's anything I can do to help you get started.

Use BioPython's built-in BLAST parser to parse the output. This is also done in filterByExpect_all_v2.py, although I've noticed a few mistakes just now so be careful

In reference to this, what does the parse the output mean? Could you please explain the statement?

@bhanu546, it's a bit vague, I agree. By "output" I mean the output of BLAST - for example, the XML file linked here. I'll update it in the issue text as well.

Hi @mbonsma
Is this issue still open?
I would like to solve it.

Hi @Ky5595, yes it is!

Hi mbonsma,
Thanks for the information.
I am going to work on it now.

Hello, I can look into this.

Woo @wgma00, thanks!

I'm trying to create a sample XML file from #60 but I'm not sure what to pass as the second parameter to anticrisprblast.py . echo data/velvet-distinct-spacers.fasta python3 anticrisprblast.py <genome>, is what I've managed to figure out so far.

I think you want blast_spacer_to_host_genome.py instead of anticrisprblast.py, for starters, but it looks like blast_spacer_to_host_genome.py has a single demo file hardcoded and probably won't do anything interesting.
You could ignore #60 for now and use this example file if you want.

And I'll make an issue for blast_spacer_to_host_genome.py to fix it up a bit.

You mention that there should be an optional cut-off value, but I've read through the http://biopython.org/DIST/docs/tutorial/Tutorial.html#sec:parsing-blast you  posted but I don't see any mention of a "cut-off" value. How is this to be incorporated? Also are there any bounds on this value?.
I've started some work https://github.com/wgma00/phageParser/commit/d2fcb3eda093fe449a8b54fa4fc4fdf21e964fb2

Hello! Just wondering what the status for this issue is. I would love to assist!

I wrote up some starter code on my master branch, but I won't have time contribute today. So feel free to take over if you'd like.

Hi @ayangromano, basically all this has to do is make sure that we're not counting 'hits' that are self-matches. When you blast a fragment of a bacterial genome against the whole genome, there will be one hit that is a self-match, and any other hits are the ones we're interested in.
extract_CRISPRdb.py is almost deprecated since we've moved to using a database, so probably the best thing to do instead would be to check for that spacer in the organismspacerrepeatpair table, get its genomic_start and genomic_end positions, and check if the BLAST match falls inside those positions.
For example, here's what one row of that table looks like in json format:
    "organism_spacer_repeat_pairs": [
        {
            "genomic_end": 1928488,
            "organism": 1923,
            "id": 1,
            "spacer": 1,
            "repeat": 1,
            "genomic_start": 1928414,
            "order": 1
        }

I realize this is a bit vague, so in the next few days I'll update this issue to reflect more recent development. But feel free to start and ping me with questions in the meantime.

I'm going to close this and redirect to #223 which is more current.


exclude column form selection (Hidden Columns) @select(false)

Problem
How can i exclude certain column form select query overall like Password in the User Model.
Currently i'm using @Column({ select: false  }) in typeorm.
ref: https://github.com/satishbabariya/nodejs-boilerplate/blob/master/src/models/User.ts#L37
Is ther any way to do this in prisma2? like
model User {
  id       Int    @default(autoincrement()) @id
  email    String @unique
  password String @select(false)
}

reference of TypeORM: https://typeorm.io/#/select-query-builder/hidden-columns

Related: https://github.com/prisma/prisma/issues/2173


New develop version

supported aead cipher and udp tunnel

would you like to fix the CI?

yes. I thought it should be your job, sorry for that. will be done in the next few days

@qunxyz I mean your PR should pass the CI

This really a big PR, and will be pending(just like mine PR and others) after I get some idea about how to do the reconstruction on this repo

Maybe a developer branch

got it. and I also changed some code for cow project, I will make a pr for cow till you merged this branch

About cow, u'd contact the author for more help

I tried doing some minor change to support aead, but then I realized that seems impossible. so it is this branch. anyway, maybe you would liked this branch

never mind cow, though it's the reason I developed this branch. I just waiting. take your time

yep, and I'm sorry cause this PR will not be merged in this way. I will make a plan how we do the reconstruct on this repo, and welcome you to join.

never mind. but anyway, I would made a new pr once done the parts of passing CI. merge or not, it's all your call, I would accepted that. I just want to share it, and I appreciate you creating this project.

@qunxyz dude, would you like to fix this merge request and push to another branch I will create for your reconstruction?

so sorry, @arthurkiller. I forgot it, will be done this weekend

Great! And Now I will create a new branch called dev-qunxyz for your merge request

maybe after two days? I should made a new pr on Sunday afternoon

never mind

solve conflicts and change the dependencies into shadowsocks-go

oh, man, you already done that. thanks very much, I really appreciate it.
then I don't need to make a new pr for it. just let you know, I fixed it too

LGTM

@qunxyz still get some conflicts, rebase the master

still here?@qunxyz

@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB

@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB

@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB

@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB

@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB

@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB

@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB

@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB

@arthurkiller 审核你MB帐户状态++你+arthurkillerMB+arthurkillerMB

Any updates on this PR?


Don't resolve the response data correctly

I have the following route endpoint:
async login({ request, response }: HttpContext) {
    const { email, password } = await request.validateUsing(loginValidator);

    const user = await User.verifyCredentials(email, password);
    const token = await User.accessTokens.create(user);

    return response.ok({
      token,
      ...user.serialize(),
    });
  }

And use it in the frontend with Tuyau:
const signIn = async () => {
    const result = await client.user.login.$post({
      email: '',
      password: '',
    });

    const thisIsNull = result.data;
  };

Then the strange thing is that the  result.data is everytime null. But somehow it looks correct in the generic, see this screenshot:

But directly after this it is undefined:

Do you have a idea what causes this problem?

Hey! Cannot reproduce here. Could you share a reproduction please?

Yeah, of course: https://stackblitz.com/~/github.com/jleifeld/TuyauReproductionExample
Open the the file: /apps/app/hooks/useSession.tsx and look at the result in line 34. The types there are looking correct. If you look at variable thisIsNull at line 39 you see that the data is not typed anymore and just null.
Expected is here the schema or types for the response.

Thanks a lot for the reproduction
Should be fixed with @tuyau/client 0.1.3. Lemme know if it works for you

It is working perfectly. Thanks for your fast response!


Move postsPerPage to be a theme-level config option

Ghost 1.0 is all about fixing things that annoy us or get in our way 😁
One of those things, is the "Posts per Page" setting in the admin panel. It tells a blog how many posts its allowed to output on a particular page. However, it makes little sense for this to be a global blog-level setting because this is presentation logic.
Presentation logic belongs in a theme, and ideally, it should be themes that control how much content appears on a page, in order to suit that themes particular layout. E.g. a 2 column theme might want an even number of pieces of content.
The version of this we want to ship for Ghost 1.0 involves adding a new concept of theme config via the package.json file.
Example:
"name": "casper",
"version": "1.3.6",
 "theme": {
        "ppp": 2
    }

As a next step, we're considering adding frontmatter to templates, so that this (and any other theme config we come up with) can be set on a template-level basis.
TBD: Should this be called ppp or postsPerPage or posts_per_page 🤔
P.S. Got this working nicely on a local branch 💃

+1 for postsPerPage

@JohnONolan I've got this implemented and as a result have a couple of bits of the spec that I need a little bit of clarity around, mostly to do with naming-things.
Thing 1 - package.json
In package.json, I'm adding a new object like this:
"name": "casper",
"version": "1.3.6",
...more stuff...
 "theme": {
        "ppp": 2
    }

Ideally I'd like to have some sort of top-level key to contain the theme's config here as that will keep my implementation minimal and easy, assuming we will come up with more things to put here, however I guess theme doesn't make that much sense, so perhaps it should be config.
Secondly, I've called the setting ppp just cos that was fast to type. To be consistent with the rest of package.json, if we use multiple words we should camelCase. Any idea on what you preferred name for this config option is?
Thing 2 - handlebars
Back in Ghost 0.7.3 we added both permalinks and the post per page setting available to the theme via the @blog global.
E.g<EMAIL_ADDRESS>and<EMAIL_ADDRESS>Note: handlebars/theme API uses snake_case.
Now that posts per page is no longer a global blog setting, should it be removed from here? I made a bunch of assumptions, assumed we'd want it to become part of a new @theme global and implemented it as<EMAIL_ADDRESS>but I can also put it back. These changes are trivial.
Thing 3 - the default
It's currently set to 5, which is what it was before. Every blog that USED to have a setting with a different number will lose that configuration in Ghost 1.0. We could implement some really complex migration, but that seems totally unnecessary seeing as 1.0 is meant to have breaking changes.
TLDR;

what should the object in package.json look like? what: {what: 5}}
what should the handlebars helper look like<EMAIL_ADDRESS>what should the default be? (it's 5 right now)

config: { postsPerPage: x}
@config.postsPerPage
5

?

Consistency clash: package.json uses camelCase, our theme API uses snake_case. I 100% agree that whatever we pick it makes sense to make them consistency. However, when it comes to which standard to break, I would much, much, much, much rather break general consistency with package.json than with the theme API.
So can I raise you:

config: { posts_per_page: x}
@config.posts_per_page
5

fine w/ me


storage: execute gc command base on statistics

Currently we execute GC command for each region periodically, and the GC command is a kind of expensive operation that must scan whole region. If a region has no write after previous GC command executed, when a new GC command arrived for this region, we don't need to execute it.
This pr make GC command execute base on write statistics.

please assign someone to review your code.

why not let raftstore do itself?

why not let raftstore do itself?
Raftstore knows nothing about GC command.

@BusyJay @disksing @siddontang PTAL

@siddontang @BusyJay @disksing PTAL

Any update? @zhangjinpeng1987

@zhangjinpeng1987
CI failed
error: using `clone` on a `Copy` type [-D clone-on-copy]
  --> src/storage/txn/statistics.rs:94:47
   |
94 |             let duration = now.duration_since(stat.last_active.clone());
   |                                               ^^^^^^^^^^^^^^^^^^^^^^^^
   |

PTAL

@BusyJay