text:
Custom prompts for chain types that aren't "stuff" in RetrievalQA

Feature request
Consider the following example:
# All the dependencies being used
import openai
import os
from dotenv import load_dotenv

from langchain.chains import RetrievalQA
from langchain.document_loaders import TextLoader
from langchain.embeddings.openai import OpenAIEmbeddings
from langchain.chat_models import ChatOpenAI
from langchain.text_splitter import RecursiveCharacterTextSplitter
from langchain.vectorstores import Chroma
from langchain.prompts import PromptTemplate

load_dotenv()

openai.organization = os.getenv("OPENAI_ORG_ID_")
openai.api_key = os.getenv("OPENAI_API_KEY")

# Load up a text file
loader = TextLoader("foo.txt")
documents = loader.load()

# Split text into chunks
text_splitter = RecursiveCharacterTextSplitter(
    chunk_size=1000, chunk_overlap=0)
texts = text_splitter.split_documents(documents)

# Set up chroma
embeddings = OpenAIEmbeddings()
docsearch = Chroma.from_documents(texts, embeddings)

# I want a custom prompt that asks for the output in JSON format
prompt_template = """
Use the following pieces of context to answer the question at the end.
If you don't know the answer, output 'N/A', don't try to
make up an answer.

{context}

Question: {question}
Answer in JSON format:
"""

PROMPT = PromptTemplate(
    template=prompt_template, input_variables=["context", "question"]
)

llm = ChatOpenAI(model_name="gpt-3.5", temperature=0)

# This is what's done in the Python docs
chain_type_kwargs = {'prompt': PROMPT}
qa = RetrievalQA.from_chain_type(llm=llm, chain_type="stuff", retriever=docsearch.as_retriever(), chain_type_kwargs=chain_type_kwargs)

query = "Foo bar"
res = qa.run(query)

If we use anything other than "stuff" for the chain_type parameter in RetrievalQA.from_chain_type, we'll get the following error from that line:
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/langchain/chains/retrieval_qa/base.py", line 91, in from_chain_type
    combine_documents_chain = load_qa_chain(
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/langchain/chains/question_answering/__init__.py", line 238, in load_qa_chain
    return loader_mapping[chain_type](
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/langchain/chains/question_answering/__init__.py", line 196, in _load_refine_chain
    return RefineDocumentsChain(
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/langchain/load/serializable.py", line 61, in __init__
    super().__init__(**kwargs)
  File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for RefineDocumentsChain
prompt
  extra fields not permitted (type=value_error.extra)

Is there anything in particular that prevents custom prompts being used for different chain types? Am I missing something? Open to any help and/or guidance.
Motivation
I'm trying to perform QA on a large block of text and so using map_reduce or refine is preferable over stuff. I also want to perform the QA with a custom prompt as I need the chain's output to be in JSON format for parsing. When using stuff for text that doesn't surpass the token limit, it works as expected.
Your contribution
Happy to contribute via a PR if someone identifies that what I'm suggesting isn't impossible.

I’ve encountered the same problem.
This is my PR #6912
You can use the method in my description of PR to solve first.

were you able to get this working? This would be useful as a feature

were you able to get this working? This would be useful as a feature

+1

Hi everyone, unfortunately got caught up with work these past couple of weeks so didn't get to get very far with this. Curious to see if anyone else gave it a try

Here you get to read Langchain code, to figure out different keyworks used in different prompt templates in different chains. For example, in Refine chain, the input variables are question_prompt and refine_prompt. Good luck.


text:
Minor tweaks to the color and layout of CI Dashboard

Also affects layout of some other pages

/lgtm

/approve

source: gharchive/pull-request

authors: beekhof danmacpherson

repo: hybrid-cloud-patterns/docs

license_type: permissive

license_source: github-api


text:
Make sending buffers easier

Please describe the changes this PR makes and why it should be merged:
Currently, to send a buffer you have to do send({ files: [{ attachment: buffer }] }) which is honestly just ugly.
This PR makes it so that you can do send({ files: [buffer] }).
Also, I'm fairly sure that this behavior was in v11.0 but was somehow removed in v11.1.
Semantic versioning classification:

[X] This PR changes the library's interface (methods or parameters added)

[ ] This PR includes breaking changes (methods removed or renamed, parameters moved or removed)

[ ] This PR only includes non-code changes, like changes to documentation, README, etc.

This might be better placed in https://github.com/hydrabolt/discord.js/pull/1451...

Closed because a lot has changed and it's gonna end up in #1731.

license_source: bigquery


text:
Invalid form shows up when the requried account sign up information is not completed

@mauriel133 @pkdash I test the sign up process and found out that if I didn't enter all the required account information and click on "Join HydroShare & Start collaborating" button, it will show the following invalid form. (Testing on chrome, firefox and Microsoft Edge  )
The expected response after a user doesn't enter all the information should refresh the page and keep the original sign up form layout.

OK.

source: gharchive/issue

repo: hydroshare/hydroshare


text:
Release Notes 1.7.6/1.8.0

Release 1.7.6 / 1.8.0

minor resource updates (icon, help message, etc.)
clickable links in resource abstract
Relationships need to be automatically created for a collection

@mjstealey
#1403 for collection was merged into dev branch. I set its milestone to 'Release 1.7.6/1.8.0'.
A manual operation in django shell is needed after you deploy this branch on beta or www.
docker exec -i hydroshare python manage.py shell  < "hs_collection_resource/patches/add_hasPart_term_django_shell.py"
This script will add "hasPart" terms to existing resource bags which are contained by other collection resources.

A manual operation in django shell is needed after you deploy this branch on beta.

Beta deployment console output (no errors observed):
@zhiyuli - when running this on beta it looks to have errors for many of the resources and had generated the following.
$ docker exec -i hydroshare python manage.py shell < "hs_collection_resource/patches/add_hasPart_term_django_shell.py"
No handlers could be found for logger "hydroshare"
/usr/local/lib/python2.7/site-packages/mezzanine/utils/conf.py:55: UserWarning: TIME_ZONE setting is not set, using closest match: Etc/UTC
  warn("TIME_ZONE setting is not set, using closest match: %s" % tz)
/usr/local/lib/python2.7/site-packages/django/contrib/contenttypes/models.py:161: RemovedInDjango19Warning: Model class django.contrib.contenttypes.models.ContentType doesn't declare an explicit app_label and either isn't in an application in INSTALLED_APPS or else was imported before its application was loaded. This will no longer be supported in Django 1.9.
  class ContentType(models.Model):

/usr/local/lib/python2.7/site-packages/autocomplete_light/widgets.py:19: RemovedInDjango19Warning: The django.forms.util module has been renamed. Use django.forms.utils instead.
  from django.forms.util import flatatt

/usr/local/lib/python2.7/site-packages/autocomplete_light/fields.py:8: RemovedInDjango19Warning: django.contrib.contenttypes.generic is deprecated and will be removed in Django 1.9. Its contents have been moved to the fields, forms, and admin submodules of django.contrib.contenttypes.
  from django.contrib.contenttypes.generic import GenericForeignKey

Python 2.7.11 (default, Jun  9 2016, 14:42:54)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
  File "<console>", line 1
SyntaxError: trailing comma not allowed without surrounding parentheses
  File "<console>", line 1
    RES_LANDING_PAGE_URL_TEMPLATE
    ^
IndentationError: unexpected indent
>>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> ... ... ... ... >>> >>> >>> >>> ... [2016-09-21 17:33:04.864513] Find 49 Collection Resources

>>> >>> >>> >>> ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... [2016-09-21 17:33:04.868799] Processing on collection 89a37c54bcae4a499351a39b4797998a: (1/49)

[2016-09-21 17:33:04.872144] Error on Collection 89a37c54bcae4a499351a39b4797998a: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:04.872185] Processing on collection bf89deb4e8fc4a72b00cb8b3048da176: (2/49)

[2016-09-21 17:33:04.875432] Error on Collection bf89deb4e8fc4a72b00cb8b3048da176: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:04.875457] Processing on collection 06c1c412dabc435f97415f9dac072fd0: (3/49)

[2016-09-21 17:33:04.878184] Error on Collection 06c1c412dabc435f97415f9dac072fd0: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:04.878207] Processing on collection bc41b169dffb4cacbf3e9bedf4f5848e: (4/49)

[2016-09-21 17:33:04.880941] Error on Collection bc41b169dffb4cacbf3e9bedf4f5848e: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:04.880964] Processing on collection 2add5c35941f4100a208cf286d07e91d: (5/49)

[2016-09-21 17:33:04.883666] Error on Collection 2add5c35941f4100a208cf286d07e91d: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:04.883689] Processing on collection 21d9a3e707b340e4b5c9f7fbeb9a9bb0: (6/49)

[2016-09-21 17:33:05.468506] Done with Collection 21d9a3e707b340e4b5c9f7fbeb9a9bb0

[2016-09-21 17:33:05.468544] Processing on collection 05a52f8d84474053a8ba5ae760331b38: (7/49)

[2016-09-21 17:33:06.510720] Done with Collection 05a52f8d84474053a8ba5ae760331b38

[2016-09-21 17:33:06.510796] Processing on collection fd4ee203de444df39c4f9c01623b41b2: (8/49)

[2016-09-21 17:33:06.520559] Error on Collection fd4ee203de444df39c4f9c01623b41b2: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:06.520585] Processing on collection 0bc876bab5b148bb840021c305f55994: (9/49)

[2016-09-21 17:33:06.524105] Error on Collection 0bc876bab5b148bb840021c305f55994: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:06.524124] Processing on collection 05374e83f5a4443a88f394658c4a7d00: (10/49)

[2016-09-21 17:33:06.526882] Error on Collection 05374e83f5a4443a88f394658c4a7d00: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:06.526900] Processing on collection b27a6b3c449e4974bb654eaec8c7f093: (11/49)

[2016-09-21 17:33:06.529650] Error on Collection b27a6b3c449e4974bb654eaec8c7f093: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:06.529667] Processing on collection b459b761bc9743bf99403e3cb470a5bd: (12/49)

[2016-09-21 17:33:06.532360] Error on Collection b459b761bc9743bf99403e3cb470a5bd: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:06.532379] Processing on collection 3b6a96dae8e44a0a9c4e41ec451a7db7: (13/49)

[2016-09-21 17:33:06.534991] Error on Collection 3b6a96dae8e44a0a9c4e41ec451a7db7: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:06.535019] Processing on collection c4802a8fc23641e3b07994faa2841c35: (14/49)

[2016-09-21 17:33:06.537733] Error on Collection c4802a8fc23641e3b07994faa2841c35: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:06.537752] Processing on collection 516a896a8e494ac5ab30fd4e5ed5beac: (15/49)

[2016-09-21 17:33:06.540374] Error on Collection 516a896a8e494ac5ab30fd4e5ed5beac: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:06.540393] Processing on collection ac1918a387ed4740b724ae7e3bc13bdb: (16/49)

[2016-09-21 17:33:06.543184] Error on Collection ac1918a387ed4740b724ae7e3bc13bdb: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:06.543202] Processing on collection 2adee16a5b0d4df0b5e687046be8515e: (17/49)

[2016-09-21 17:33:06.545775] Error on Collection 2adee16a5b0d4df0b5e687046be8515e: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:06.545812] Processing on collection e82e66572b444fc5b6bf16f88f911f77: (18/49)

[2016-09-21 17:33:06.548708] Error on Collection e82e66572b444fc5b6bf16f88f911f77: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:06.548730] Processing on collection e0568ef7089b46049fa463dbb524ad2b: (19/49)

[2016-09-21 17:33:06.551818] Error on Collection e0568ef7089b46049fa463dbb524ad2b: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:06.551839] Processing on collection 6c183e8afd52424ea58ed4a3cf4eb403: (20/49)

[2016-09-21 17:33:06.554530] Error on Collection 6c183e8afd52424ea58ed4a3cf4eb403: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:06.554551] Processing on collection 8f3d273a84d74ad1a1227a9f2b8d52ff: (21/49)

[2016-09-21 17:33:06.557196] Error on Collection 8f3d273a84d74ad1a1227a9f2b8d52ff: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:06.557217] Processing on collection bdb2e6ac7e9f46d58e985a9739145fb3: (22/49)

[2016-09-21 17:33:06.560261] Error on Collection bdb2e6ac7e9f46d58e985a9739145fb3: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:06.560281] Processing on collection 4814878814cd44a9949d64c1dc59605b: (23/49)

[2016-09-21 17:33:06.563033] Error on Collection 4814878814cd44a9949d64c1dc59605b: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:06.563067] Processing on collection 57777d2351da4a96b52687bcc0a2ffde: (24/49)

[2016-09-21 17:33:07.185643] Done with Collection 57777d2351da4a96b52687bcc0a2ffde

[2016-09-21 17:33:07.185684] Processing on collection 15fee944cad74f5cbb742d9ffad8ee8e: (25/49)

[2016-09-21 17:33:07.197381] Error on Collection 15fee944cad74f5cbb742d9ffad8ee8e: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:07.197423] Processing on collection 1fe747c0235042708af23a717d42ac3a: (26/49)

[2016-09-21 17:33:07.874558] Done with Collection 1fe747c0235042708af23a717d42ac3a

[2016-09-21 17:33:07.874609] Processing on collection d15b9934f34e4c57913b3cb53966d5c7: (27/49)

[2016-09-21 17:33:07.883192] Error on Collection d15b9934f34e4c57913b3cb53966d5c7: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:07.883232] Processing on collection 2d58ac373e4f4174a3050a046aaf121e: (28/49)

[2016-09-21 17:33:07.887133] Error on Collection 2d58ac373e4f4174a3050a046aaf121e: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:07.887172] Processing on collection 479ae9daeec34b48885f7645ea0966b4: (29/49)

[2016-09-21 17:33:07.893020] Error on Collection 479ae9daeec34b48885f7645ea0966b4: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:07.893078] Processing on collection 7455514a823040a494148f5d3437db9b: (30/49)

[2016-09-21 17:33:08.410333] Done with Collection 7455514a823040a494148f5d3437db9b

[2016-09-21 17:33:08.410417] Processing on collection fb17642c00bc4c3489878a672322caa4: (31/49)

[2016-09-21 17:33:08.419417] Error on Collection fb17642c00bc4c3489878a672322caa4: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:08.419447] Processing on collection 286e23da15f146c18adf2400f17e4a4c: (32/49)

[2016-09-21 17:33:08.423095] Error on Collection 286e23da15f146c18adf2400f17e4a4c: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:08.423115] Processing on collection d5c5b4038e47488c86dc62db73f0a08d: (33/49)

[2016-09-21 17:33:08.425833] Error on Collection d5c5b4038e47488c86dc62db73f0a08d: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:08.425852] Processing on collection 3b59c90bd8104ea99a2c84fe5b361306: (34/49)

[2016-09-21 17:33:08.428897] Error on Collection 3b59c90bd8104ea99a2c84fe5b361306: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:08.428926] Processing on collection 7cd2b6d7b3494dfb84a1707228b79b20: (35/49)

[2016-09-21 17:33:08.431757] Error on Collection 7cd2b6d7b3494dfb84a1707228b79b20: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:08.431787] Proces
sing on collection 9be3a8c8473f4c88a8f9ec5b1662afef: (36/49)

[2016-09-21 17:33:08.434980] Error on Collection 9be3a8c8473f4c88a8f9ec5b1662afef: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:08.435002] Processing on collection a166f8e121b7496397ae05367d48a1f3: (37/49)

[2016-09-21 17:33:08.437786] Error on Collection a166f8e121b7496397ae05367d48a1f3: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:08.437808] Processing on collection 2889fcae78cb40059deaf3ce53c7f8d7: (38/49)

[2016-09-21 17:33:08.440514] Error on Collection 2889fcae78cb40059deaf3ce53c7f8d7: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:08.440536] Processing on collection ca717dcd11a14398b2e0df6deef87722: (39/49)

[2016-09-21 17:33:08.443259] Error on Collection ca717dcd11a14398b2e0df6deef87722: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:08.443281] Processing on collection b7643610141945c0a3af84a03e0d175c: (40/49)

[2016-09-21 17:33:08.446103] Error on Collection b7643610141945c0a3af84a03e0d175c: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:08.446132] Processing on collection 9a926922e64747f7b91151fdc7c63450: (41/49)

[2016-09-21 17:33:08.971952] Done with Collection 9a926922e64747f7b91151fdc7c63450

[2016-09-21 17:33:08.972064] Processing on collection 4a9548c3d9ec4ee8bb6b166873726529: (42/49)

[2016-09-21 17:33:09.520729] Done with Collection 4a9548c3d9ec4ee8bb6b166873726529

[2016-09-21 17:33:09.520816] Processing on collection 418b7614bfc742bdac6a5a394103f961: (43/49)

[2016-09-21 17:33:09.531155] Error on Collection 418b7614bfc742bdac6a5a394103f961: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:09.531184] Processing on collection 65246c8fe696495fbe244c15da0ec3a1: (44/49)

[2016-09-21 17:33:09.533735] Error on Collection 65246c8fe696495fbe244c15da0ec3a1: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:09.533752] Processing on collection 4a33d8abc8d54b58b6624eda42138d4a: (45/49)

[2016-09-21 17:33:09.536243] Error on Collection 4a33d8abc8d54b58b6624eda42138d4a: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:09.536261] Processing on collection f643e1039e274818af0923b6054cc752: (46/49)

[2016-09-21 17:33:09.538722] Error on Collection f643e1039e274818af0923b6054cc752: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:09.538750] Processing on collection 4b1d2bb341164998a12eeea1f3801e32: (47/49)

[2016-09-21 17:33:09.541134] Error on Collection 4b1d2bb341164998a12eeea1f3801e32: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

[2016-09-21 17:33:09.541152] Processing on collection d5bbc9da40a4496c80707a4ca2cbaca8: (48/49)

[2016-09-21 17:33:10.018002] Done with Collection d5bbc9da40a4496c80707a4ca2cbaca8

[2016-09-21 17:33:10.018061] Processing on collection 11eee521da2f40e5913b639c612455cf: (49/49)

[2016-09-21 17:33:10.026551] Error on Collection 11eee521da2f40e5913b639c612455cf: name 'RES_LANDING_PAGE_URL_TEMPLATE' is not defined

>>> [2016-09-21 17:33:10.027025] All Done!

>>> ... TOTAL: 49; SUCCESS: 8;  ERROR: 41

@zhiyuli - This was the output when deploying 1.7.6 to www. Looks as it should.
$ docker exec -i hydroshare python manage.py shell < "hs_collection_resource/patches/add_hasPart_term_django_shell.py"
No handlers could be found for logger "hydroshare"
/usr/local/lib/python2.7/site-packages/mezzanine/utils/conf.py:55: UserWarning: TIME_ZONE setting is not set, using closest match: Etc/UTC
  warn("TIME_ZONE setting is not set, using closest match: %s" % tz)
Python 2.7.11 (default, Jun  9 2016, 14:42:54)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> ... ... ... ... >>> >>> >>> >>> ... [2016-10-05 14:52:35.309615] Find 49 Collection Resources

>>> >>> >>> >>> ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... [2016-10-05 14:52:35.314165] Processing on collection 89a37c54bcae4a499351a39b4797998a: (1/49)

[2016-10-05 14:52:37.416191] Done with Collection 89a37c54bcae4a499351a39b4797998a

[2016-10-05 14:52:37.416291] Processing on collection bf89deb4e8fc4a72b00cb8b3048da176: (2/49)

[2016-10-05 14:52:39.013117] Done with Collection bf89deb4e8fc4a72b00cb8b3048da176

[2016-10-05 14:52:39.013210] Processing on collection 06c1c412dabc435f97415f9dac072fd0: (3/49)

[2016-10-05 14:52:40.771731] Done with Collection 06c1c412dabc435f97415f9dac072fd0

[2016-10-05 14:52:40.771819] Processing on collection bc41b169dffb4cacbf3e9bedf4f5848e: (4/49)

[2016-10-05 14:52:42.547190] Done with Collection bc41b169dffb4cacbf3e9bedf4f5848e

[2016-10-05 14:52:42.547290] Processing on collection 2add5c35941f4100a208cf286d07e91d: (5/49)

[2016-10-05 14:52:43.625221] Done with Collection 2add5c35941f4100a208cf286d07e91d

[2016-10-05 14:52:43.625273] Processing on collection 21d9a3e707b340e4b5c9f7fbeb9a9bb0: (6/49)

[2016-10-05 14:52:44.653231] Done with Collection 21d9a3e707b340e4b5c9f7fbeb9a9bb0

[2016-10-05 14:52:44.653330] Processing on collection 05a52f8d84474053a8ba5ae760331b38: (7/49)

[2016-10-05 14:52:46.312566] Done with Collection 05a52f8d84474053a8ba5ae760331b38

[2016-10-05 14:52:46.312626] Processing on collection fd4ee203de444df39c4f9c01623b41b2: (8/49)

[2016-10-05 14:52:47.995714] Done with Collection fd4ee203de444df39c4f9c01623b41b2

[2016-10-05 14:52:47.995766] Processing on collection 0bc876bab5b148bb840021c305f55994: (9/49)

[2016-10-05 14:52:49.799953] Done with Collection 0bc876bab5b148bb840021c305f55994

[2016-10-05 14:52:49.800013] Processing on collection 05374e83f5a4443a88f394658c4a7d00: (10/49)

[2016-10-05 14:52:51.567724] Done with Collection 05374e83f5a4443a88f394658c4a7d00

[2016-10-05 14:52:51.567826] Processing on collection b27a6b3c449e4974bb654eaec8c7f093: (11/49)

[2016-10-05 14:52:52.834876] Done with Collection b27a6b3c449e4974bb654eaec8c7f093

[2016-10-05 14:52:52.834946] Processing on collection b459b761bc9743bf99403e3cb470a5bd: (12/49)

[2016-10-05 14:52:54.521054] Done with Collection b459b761bc9743bf99403e3cb470a5bd

[2016-10-05 14:52:54.521106] Processing on collection 3b6a96dae8e44a0a9c4e41ec451a7db7: (13/49)

[2016-10-05 14:52:56.321121] Done with Collection 3b6a96dae8e44a0a9c4e41ec451a7db7

[2016-10-05 14:52:56.321218] Processing on collection c4802a8fc23641e3b07994faa2841c35: (14/49)

[2016-10-05 14:52:57.955236] Done with Collection c4802a8fc23641e3b07994faa2841c35

[2016-10-05 14:52:57.955342] Processing on collection 516a896a8e494ac5ab30fd4e5ed5beac: (15/49)

[2016-10-05 14:52:59.771372] Done with Collection 516a896a8e494ac5ab30fd4e5ed5beac

[2016-10-05 14:52:59.771430] Processing on collection ac1918a387ed4740b724ae7e3bc13bdb: (16/49)

[2016-10-05 14:53:01.409007] Done with Collection ac1918a387ed4740b724ae7e3bc13bdb

[2016-10-05 14:53:01.409100] Processing on collection 2adee16a5b0d4df0b5e687046be8515e: (17/49)

[2016-10-05 14:53:03.259984] Done with Collection 2adee16a5b0d4df0b5e687046be8515e

[2016-10-05 14:53:03.260078] Processing on collection e82e66572b444fc5b6bf16f88f911f77: (18/49)

[2016-10-05 14:53:04.400854] Done with Collection e82e66572b444fc5b6bf16f88f911f77

[2016-10-05 14:53:04.400931] Processing on collection e0568ef7089b46049fa463dbb524ad2b: (19/49)

[2016-10-05 14:53:06.291609] Done with Collection e0568ef7089b46049fa463dbb524ad2b

[2016-10-05 14:53:06.291672] Processing on collection 6c183e8afd52424ea58ed4a3cf4eb403: (20/49)

[2016-10-05 14:53:07.473236] Done with Collection 6c183e8afd52424ea58ed4a3cf4eb403

[2016-10-05 14:53:07.473340] Processing on collection 8f3d273a84d74ad1a1227a9f2b8d52ff: (21/49)

[2016-10-05 14:53:08.548170] Done with Collection 8f3d273a84d74ad1a1227a9f2b8d52ff

[2016-10-05 14:53:08.548280] Processing on collection bdb2e6ac7e9f46d58e985a9739145fb3: (22/49)

[2016-10-05 14:53:10.461515] Done with Collection bdb2e6ac7e9f46d58e985a9739145fb3

[2016-10-05 14:53:10.461617] Processing on collection 4814878814cd44a9949d64c1dc59605b: (23/49)

[2016-10-05 14:53:12.304027] Done with Collection 4814878814cd44a9949d64c1dc59605b

[2016-10-05 14:53:12.304115] Processing on collection 57777d2351da4a96b52687bcc0a2ffde: (24/49)

[2016-10-05 14:53:13.453956] Done with Collection 57777d2351da4a96b52687bcc0a2ffde

[2016-10-05 14:53:13.454055] Processing on collection 15fee944cad74f5cbb742d9ffad8ee8e: (25/49)

[2016-10-05 14:53:14.683046] Done with Collection 15fee944cad74f5cbb742d9ffad8ee8e

[2016-10-05 14:53:14.683155] Processing on collection 1fe747c0235042708af23a717d42ac3a: (26/49)

[2016-10-05 14:53:15.845211] Done with Collection 1fe747c0235042708af23a717d42ac3a

[2016-10-05 14:53:15.845257] Processing on collection d15b9934f34e4c57913b3cb53966d5c7: (27/49)

[2016-10-05 14:53:17.832351] Done with Collection d15b9934f34e4c57913b3cb53966d5c7

[2016-10-05 14:53:17.832443] Processing on collection 2d58ac373e4f4174a3050a046aaf121e: (28/49)

[2016-10-05 14:53:19.736206] Done with Collection 2d58ac373e4f4174a3050a046aaf121e

[2016-10-05 14:53:19.736275] Processing on collection 479ae9daeec34b48885f7645ea0966b4: (29/49)

[2016-10-05 14:53:21.567095] Done with Collection 479ae9daeec34b48885f7645ea0966b4

[2016-10-05 14:53:21.567188] Processing on collection 7455514a823040a494148f5d3437db9b: (30/49)

[2016-10-05 14:53:22.713472] Done with Collection 7455514a823040a494148f5d3437db9b

[2016-10-05 14:53:22.713537] Processing on collection fb17642c00bc4c3489878a672322caa4: (31/49)

[2016-10-05 14:53:24.568431] Done with Collection fb17642c00bc4c3489878a672322caa4

[2016-10-05 14:53:24.568542] Processing on collection 286e23da15f146c18adf2400f17e4a4c: (32/49)

[2016-10-05 14:53:26.508711] Done with Collection 286e23da15f146c18adf2400f17e4a4c

[2016-10-05 14:53:26.508780] Processing on collection d5c5b4038e47488c86dc62db73f0a08d: (33/49)

[2016-10-05 14:53:28.311935] Done with Collection d5c5b4038e47488c86dc62db73f0a08d

[2016-10-05 14:53:28.312027] Processing on collection 3b59c90bd8104ea99a2c84fe5b361306: (34/49)

[2016-10-05 14:53:30.110499] Done with Collection 3b59c90bd8104ea99a2c84fe5b361306

[2016-10-05 14:53:30.110610] Processing on collection 7cd2b6d7b3494dfb84a1707228b79b20: (35/49)

[2016-10-05 14:53:31.868687] Done with Collection 7cd2b6d7b3494dfb84a1707228b79b20

[2016-10-05 14:53:31.868765] Processing on collection 9be3a8c8473f4c88a8f9ec5b1662afef: (36/49)

[2016-10-05 14:53:33.702630] Done with Collection 9be3a8c8473f4c88a8f9ec5b1662afef

[2016-10-05 14:53:33.702710] Processing on collection a166f8e121b7496397ae05367d48a1f3: (37/49)

[2016-10-05 14:53:35.604774] Done with Collection a166f8e121b7496397ae05367d48a1f3

[2016-10-05 14:53:35.604875] Processing on collection 2889fcae78cb40059deaf3ce53c7f8d7: (38/49)

[2016-10-05 14:53:37.506468] Done with Collection 2889fcae78cb40059deaf3ce53c7f8d7

[2016-10-05 14:53:37.506517] Processing on collection ca717dcd11a14398b2e0df6deef87722: (39/49)

[2016-10-05 14:53:39.180078] Done with Collection ca717dcd11a14398b2e0df6deef87722

[2016-10-05 14:53:39.180139] Processing on collection b7643610141945c0a3af84a03e0d175c: (40/49)

[2016-10-05 14:53:40.976281] Done with Collection b7643610141945c0a3af84a03e0d175c

[2016-10-05 14:53:40.976374] Processing on collection 9a926922e64747f7b91151fdc7c63450: (41/49)

[2016-10-05 14:53:42.100111] Done with Collection 9a926922e64747f7b91151fdc7c63450

[2016-10-05 14:53:42.100209] Processing on collection 4a9548c3d9ec4ee8bb6b166873726529: (42/49)

[2016-10-05 14:53:43.254378] Done with Collection 4a9548c3d9ec4ee8bb6b166873726529

[2016-10-05 14:53:43.254480] Processing on collection 418b7614bfc742bdac6a5a394103f961: (43/49)

[2016-10-05 14:53:44.622109] Done with Collection 418b7614bfc742bdac6a5a394103f961

[2016-10-05 14:53:44.622196] Processing on collection 4a33d8abc8d54b58b6624eda42138d4a: (44/49)

[2016-10-05 14:53:46.547847] Done with Collection
4a33d8abc8d54b58b6624eda42138d4a

[2016-10-05 14:53:46.548005] Processing on collection f643e1039e274818af0923b6054cc752: (45/49)

[2016-10-05 14:53:48.269036] Done with Collection f643e1039e274818af0923b6054cc752

[2016-10-05 14:53:48.269140] Processing on collection 4b1d2bb341164998a12eeea1f3801e32: (46/49)

[2016-10-05 14:53:49.425674] Done with Collection 4b1d2bb341164998a12eeea1f3801e32

[2016-10-05 14:53:49.425771] Processing on collection d5bbc9da40a4496c80707a4ca2cbaca8: (47/49)

[2016-10-05 14:53:50.671682] Done with Collection d5bbc9da40a4496c80707a4ca2cbaca8

[2016-10-05 14:53:50.671785] Processing on collection 11eee521da2f40e5913b639c612455cf: (48/49)

[2016-10-05 14:53:51.910324] Done with Collection 11eee521da2f40e5913b639c612455cf

[2016-10-05 14:53:51.910423] Processing on collection 3616e758dc06411695cbf0337409c4d7: (49/49)

[2016-10-05 14:53:53.226345] Done with Collection 3616e758dc06411695cbf0337409c4d7

>>> [2016-10-05 14:53:53.226931] All Done!

>>> ... TOTAL: 49; SUCCESS: 49;  ERROR: 0

authors: mjstealey zhiyuli


text:
Remove hs_metrics app

@aphelionz I am assigning this issue to you just to evaluate whether it is appropriate to remove hs_metrics app from HydroShare repo. I believe it is not used and can be removed, but leave it up to you whether you think it should be removed or not.

hs_metrics is being used to record HydroShare actions. These "actions" are used to generate usage reports via Jenkins and ELK-stack.

hs_metrics is being used to record HydroShare actions. These "actions" are used to generate usage reports via Jenkins and ELK-stack.

authors: Castronova hyi


text:
Introducing Dashboard

Dashboard will be the new home page after login.

The work is completed. https://github.com/hydroshare/hydroshare/pull/3301


text:
Management commands to check on and repair CZO groups.

This includes two management commands that both fixed existing CZO problems and found new ones -- and fixed them.

fix_czo_groups: no parameters, ensures that things that should not be a part of the CZO national group are not.
check_czo_groups: no parameters, enforces the following constraints:

Each resource owned by a CZO owner is in the corresponding CZO group.
Each resource in a CZO group is owned by the corresponding CZO owner.
Each resource in a CZO group is shared with exactly one CZO group.

Note that this does not check that all resources are published, just that they are shared with the group.
These were filed in hs_communities/management/commands to separate them from the standard management commands.

Pull Request Checklist:

[x] Positive Test Case Written by Dev

[x] Automated Testing

[x] Sufficient User and Developer Documentation

[x] Passing Jenkins Build

[ ] Peer Code review and approval

Positive Test Case
After running these commands:

Each CZO community resource is in exactly one CZO community group.
For each CZO group, the resources owned by the CZO group owner are precisely the resources in the CZO group.

The command fix_czo_groups is largely replaced with check_czo_groups but is being left around for reference. fix_czo_groups was run on WWW first. Then check_czo_groups was run several times, correcting different things each time.
These were tested on beta before being run on www.

Jenkins points to old CI for build:
This site can’t be reached
ci.hydroshare.org refused to connect.
Search Google for hydroshare org 8080 job pull requests 3195
ERR_CONNECTION_REFUSED

Cannot see what Jenkins is complaining about.

Restarted Jenkins. See http://ci.hydroshare.org:8080/job/hydroshare-pull-requests/3195/

This testing bug really needs to get fixed!

@sblack-usu I need to test this again on beta before I really trust it. It is otherwise ready.
Its capabilities have been increased as part of the reorganization.
It doesn't do what fix_czo_groups does, so I'm leaving that one around.

Nobody is using beta currently.  Go ahead and test.  I plan to use it next week to test some of the composite resource migration scripts.

Alva you can use beta or if you want me to migrate resources somewhere for you, I can do so. I have two PRs open that enable devs to test community functionality without needing to understand setup.

czo_iml and its Group have been created in prod and beta and added to respective Communities.

Beta testing incomplete. Will continue during the weekend.
Amusingly enough, the script had a typo in it that fouled up the ownership of all CZO resources on beta, and fixing the typo repaired them all....!  Talk about a trial by fire...!
Will add iml group checking to the script and test on Beta over the weekend.

Where was the typo

@cuahsimarko When checking on czo_national resources I made the mistake of making the only owner czo_national for ALL resources, by iterating over all resources owned by czo_national -- which is everything -- instead of resources in the CZO national group, which are the cross-repo resources.
for r in user_resources vs for r in group_resources.
Fortunately the repaired script fixed that!

@cuahsimarko At this point the script I checked in for check_czo_groups is idempotent, in the sense that it does absolutely nothing to a conforming configuration. The tests tomorrow are to move something out of spec and make it correct the problem.

As this and several related PRs are merged into the develop branch, I will be able to test comprehensively as a triple check on dev7

@cuahsimarko What is the prefix for the "CZO IML" group? I can't find any resources on beta for this group.....

You can use IMLCZO

PR is done. TO see what I tested see

hs_communities/management/commands/check_czo_groups_test.py.txt for the test script.  This has been disabled. It corrupts the CZO resources in several repairable ways.
hs_communities/management/commands/check_czo_groups_test.output.txt for the output of the test script. This shows what I corrupted.
hs_communities/management/commands/check_czo_groups.output.txt for the output of the repair process. This repairs all of the corruptions in one pass.

These demonstrate that as long as one attribute of a CZO resource is correct and its prefix is correct, its exact place in the hierarchy is repaired by check_czo_groups.
This is ready to merge.

(It really isn't worth building tests for this in the test framework. It will be used once.)

retest this, please

Note: doesn't repair everything. At least one CZO attribute of the resource has to be set for recovery to happen. This includes ownership by one of many CZO owners (even the wrong one) or sharing with one CZO group (even the wrong one).

authors: alvacouch cbcunc cuahsimarko sblack-usu


text:
Mockup A GUI for the project

We want to visualize what our end product is that users will be interacting with.  Ultimately, we hope to create a Python applet that leverages PyQt to generate an interactive GUI.
Some key features that we need to highlight in the mockup include:

Document Upload Button (to scrape information already on a document)
USCIS form template options
Saving functionality for the form while being filled

Started the ribbon, with the rest of the mockup basically just a terminal with "Next Question" and "Previous Question" capability.  I felt there was no need to mock this up further.
See the mockup here: https://www.figma.com/file/vvkGKZdP60JnwLDMjEoJSo/DACA-Mockup?type=design&node-id=1%3A2&mode=design&t=uERqsD36yn5mpcyG-1

Started the ribbon, with the rest of the mockup basically just a terminal with "Next Question" and "Previous Question" capability. I felt there was no need to mock this up further.
See the mockup here: https://www.figma.com/file/vvkGKZdP60JnwLDMjEoJSo/DACA-Mockup?type=design&node-id=1%3A2&mode=design&t=uERqsD36yn5mpcyG-1

repo: hydure/DacaFormFiller

license: MIT


text:
Illuminate \ Contracts \ Container \ BindingResolutionException Target [Hyn\Tenancy\Contracts\CurrentHostname] is not instantiable.

Hello,
Thank you for this package, it is great !. i have a small problem when i try to type on the browser www.nameblog.test it returns this error.

Illuminate \ Contracts \ Container \ BindingResolutionException
Target [Hyn\Tenancy\Contracts\CurrentHostname] is not instantiable.

Information
operating system: linux ,
homestead version: 7.7
hyn / multi-tenant version: 5.*
Laravel version: 5.6
database driver and version: MySQL
php version: 7.2
I must also say that migration succeeds !!
Thank you in advance for your answer !

Could you possibly post your tenancy.php configuration file?

@luceos
`<?php
/*

This file is part of the hyn/multi-tenant package.

(c) Daniël Klabbers daniel@klabbers.email

For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.

@see https://laravel-tenancy.com
@see https://github.com/hyn/multi-tenant
*/

use Hyn\Tenancy\Database\Connection;
return [
'models' => [
/**
* Specify different models to be used for the global, system database
* connection. These are also used in their relationships. Models
* used have to implement their respective contracts and
* either extend the SystemModel or use the trait
* UsesSystemConnection.
*/
    // Must implement \Hyn\Tenancy\Contracts\Customer
    'customer' => \Hyn\Tenancy\Models\Customer::class,

    // Must implement \Hyn\Tenancy\Contracts\Hostname
    'hostname' => \Hyn\Tenancy\Models\Hostname::class,

    // Must implement \Hyn\Tenancy\Contracts\Website
    'website' => \Hyn\Tenancy\Models\Website::class
],
'website' => [
    /**
     * Each website has a short random hash that identifies this entity
     * to the application. By default this id is randomized and fully
     * auto-generated. In case you want to force your own logic for
     * when you need to have a better overview of the complete
     * tenant folder structure, disable this and implement
     * your own id generation logic.
     */
    'disable-random-id' => false,

    /**
     * The random Id generator is responsible for creating the hash as mentioned
     * above. You can override what generator to use by modifying this value
     * in the configuration.
     *
     * @warn This won't work if disable-random-id is true.
     */
    'random-id-generator' => Hyn\Tenancy\Generators\Uuid\ShaGenerator::class,

    /**
     * Enable this flag in case you're using a driver that does not support
     * database username or database name with a length of more than 32 characters.
     *
     * This should be enabled for MySQL, but not for MariaDB and PostgreSQL.
     */
    'uuid-limit-length-to-32' => env('LIMIT_UUID_LENGTH_32', false),

    /**
     * Specify the disk you configured in the filesystems.php file where to store
     * the tenant specific files, including media, packages, routes and other
     * files for this particular website.
     *
     * @info If not set, will revert to the default filesystem.
     */
    'disk' => null,

    /**
     * Automatically generate a tenant directory based on the random id of the
     * website. Uses the above disk to store files to override system-wide
     * files.
     *
     * @info set to false to disable.
     */
    'auto-create-tenant-directory' => true,

    /**
     * Automatically rename the tenant directory when the random id of the
     * website changes. This should not be too common, but in case it happens
     * we automatically want to move files accordingly.
     *
     * @info set to false to disable.
     */
    'auto-rename-tenant-directory' => true,

    /**
     * Automatically deletes the tenant specific directory and all files
     * contained within.
     *
     * @see
     * @info set to true to enable.
     */
    'auto-delete-tenant-directory' => env('AUTO_DELETE_TENANT_DIRECTORY', false),

    /**
     * Time to cache websites in minutes. Set to false to disable.
     */
    'cache' => 10,
],
'hostname' => [
    /**
     * If you want the multi tenant application to fall back to a default
     * hostname/website in case the requested hostname was not found
     * in the database, complete in detail the default hostname.
     *
     * @warn this must be a FQDN, these have no protocol or path!
     */
    'default' => env('TENANCY_DEFAULT_HOSTNAME'),
    /**
     * The package is able to identify the requested hostname by itself,
     * disable to get full control (and responsibility) over hostname
     * identification. The hostname identification is needed to
     * set a specific website as currently active.
     *
     * @see src/Jobs/HostnameIdentification.php
     */
    'auto-identification' => env('TENANCY_AUTO_HOSTNAME_IDENTIFICATION', true),

    /**
     * In case you want to have the tenancy environment set up early,
     * enable this flag. This will run the tenant identification
     * inside a middleware. This will eager load tenancy.
     *
     * A good use case is when you have set "tenant" as the default
     * database connection.
     */
    'early-identification' => env('TENANCY_EARLY_IDENTIFICATION', false),

    /**
     * Abort application execution in case no hostname was identified. This will throw a
     * 404 not found in case the tenant hostname was not resolved.
     *
     * @see https://hyn.readme.io/v3.0/docs/tenancy#section-hostnameabort-without-identified-hostname
     */
    'abort-without-identified-hostname' => true,

    /**
     * Time to cache hostnames in minutes. Set to false to disable.
     */
    'cache' => 10,
],
'db' => [
    /**
     * The default connection to use; this overrules the Laravel database.default
     * configuration setting. In Laravel this is normally configured to 'mysql'.
     * You can set a environment variable to override the default database
     * connection to - for instance - the tenant connection 'tenant'.
     *
     * @see https://hyn.readme.io/v3.0/docs/tenancy#section-dbdefault
     */
    'default' => env('TENANCY_DEFAULT_CONNECTION'),
    /**
     * Used to give names to the system and tenant database connections. By
     * default we configure 'system' and 'tenant'. The tenant connection
     * is set up automatically by this package.
     *
     * @see src/Database/Connection.php
     * @var system-connection-name The database connection name to use for the global/system database.
     * @var tenant-connection-name The database connection name to use for the tenant database.
     */
    'system-connection-name' => env('TENANCY_SYSTEM_CONNECTION_NAME', Connection::DEFAULT_SYSTEM_NAME),
    'tenant-connection-name' => env('TENANCY_TENANT_CONNECTION_NAME', Connection::DEFAULT_TENANT_NAME),

    /**
     * The tenant division mode specifies to what database websites will be
     * connecting. The default setup is to use a new database per tenant.
     * In case you prefer to use the same database with a table prefix,
     * set the mode to 'prefix'.
     *
     * @see src/Database/Connection.php
     */
    'tenant-division-mode' => env('TENANCY_DATABASE_DIVISION_MODE', 'database'),

    /**
     * The database password generator takes care of creating a valid hashed
     * string used for tenants to connect to the specific database. Do
     * note that this will only work in 'division modes' that set up
     * a connection to a separate database.
     */
    'password-generator' => Hyn\Tenancy\Generators\Database\DefaultPasswordGenerator::class,

    /**
     * The tenant migrations to be run during creation of a tenant. Specify a directory
     * to run the migrations from. If specified these migrations will be executed
     * whenever a new tenant is created.
     *
     * @info set to false to disable auto migrating.
     *
     * @warn this has to be an absolute path, feel free to use helper methods like
     * base_path() or database_path() to set this up.
     */
    'tenant-migrations-path' => database_path('migrations/tenant'),

    /**
     * Seeds the newly created tenant database based on this Seeder.
     *
     * @info requires tenant-migrations-path to be in use.
     *
     * @warn specify a valid fully qualified class name.
     * @example App\Seeders\AdminSeeder::class
     */
    'tenant-seed-class' => TenantDatabaseSeeder::class,

    /**
     * Automatically generate a tenant database based on the random id of the
     * website.
     *
     * @info set to false to disable.
     */
    'auto-create-tenant-database' => true,

    /**
     * Automatically rename the tenant database when the random id of the
     * website changes. This should not be too common, but in case it happens
     * we automatically want to move databases accordingly.
     *
     * @info set to false to disable.
     */
    'auto-rename-tenant-database' => true,

    /**
     * Automatically deletes the tenant specific database and all data
     * contained within.
     *
     * @info set to true to enable.
     */
    'auto-delete-tenant-database' => env('AUTO_DELETE_TENANT_DATABASE', false),
],
'folders' => [
    'config' => [
        /**
         * Merge configuration files from the config directory
         * inside the tenant directory with the global configuration files.
         */
        'enabled' => true,

        /**
         * List of configuration files to ignore, preventing override of crucial
         * application configurations.
         */
        'blacklist' => ['database', 'tenancy', 'webserver'],
    ],
    'routes' => [
        /**
         * Allows adding and overriding URL routes inside the tenant directory.
         */
        'enabled' => true,

        /**
         * Prefix all tenant routes.
         */
        'prefix' => null,
    ],
    'trans' => [
        /**
         * Allows reading translation files from a trans directory inside
         * the tenant directory.
         */
        'enabled' => true,

        /**
         * Will override the global translations with the tenant translations.
         * This is done by overriding the laravel default translator with the new path.
         */
        'override-global' => true,

        /**
         * In case you disabled global override, specify a namespace here to load the
         * tenant translation files with.
         */
        'namespace' => 'tenant',
    ],
    'vendor' => [
        /**
         * Allows using a custom vendor (composer driven) folder inside
         * the tenant directory.
         */
        'enabled' => true,
    ],
    'media' => [
        /**
         * Mounts the assets directory with (static) files for public use.
         */
        'enabled' => true,
    ]
]

];
`

And also the log file of the trace, that would help identify where the exception is thrown.

[2018-06-08 23:48:26] laravel.EMERGENCY: Unable to create configured logger. Using emergency logger. {"exception":"[object] (InvalidArgumentException(code: 0): Log [] is not defined. at /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:181)
[stacktrace]
#0 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(115): Illuminate\Log\LogManager->resolve(NULL)
#1 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(103): Illuminate\Log\LogManager->get(NULL)
#2 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(519): Illuminate\Log\LogManager->driver()
#3 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(114): Illuminate\Log\LogManager->error('SQLSTATE[HY000]...', Array)
#4 /home/vagrant/code/app/Exceptions/Handler.php(39): Illuminate\Foundation\Exceptions\Handler->report(Object(Doctrine\DBAL\Driver\PDOException))
#5 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(186): App\Exceptions\Handler->report(Object(Doctrine\DBAL\Driver\PDOException))
#6 [internal function]: Illuminate\Database\Connectors\ConnectionFactory->Illuminate\Database\Connectors\{closure}()
#7 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Database/Connection.php(915): call_user_func(Object(Closure))
#8 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Database/Connection.php(940): Illuminate\Database\Connection->getPdo()
#9 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Database/Connection.php(399): Illuminate\Database\Connection->getReadPdo()
#10 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Database/Connection.php(325): Illuminate\Database\Connection->getPdoForSelect(true)
#11 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Database/Connection.php(657): Illuminate\Database\Connection->Illuminate\Database\{closure}('select * from i...', Array)
#12 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Database/Connection.php(624): Illuminate\Database\Connection->runQueryCallback('select * from i...', Array, Object(Closure))
#13 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Database/Connection.php(333): Illuminate\Database\Connection->run('select * from i...', Array, Object(Closure))
#14 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php(18): Illuminate\Database\Connection->select('select * from i...', Array)
#15 /home/vagrant/code/vendor/hyn/multi-tenant/src/Environment.php(59): Illuminate\Database\Schema\MySqlBuilder->hasTable('hostnames')
#16 /home/vagrant/code/vendor/hyn/multi-tenant/src/Environment.php(42): Hyn\Tenancy\Environment->installed()
#17 [internal function]: Hyn\Tenancy\Environment->__construct(Object(Illuminate\Foundation\Application))
#18 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Container/Container.php(800): ReflectionClass->newInstanceArgs(Array)
#19 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Container/Container.php(646): Illuminate\Container\Container->build('Hyn\\Tenancy\\Env...')
#20 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Container/Container.php(601): Illuminate\Container\Container->resolve('Hyn\\Tenancy\\Env...', Array)
#21 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(740): Illuminate\Container\Container->make('Hyn\\Tenancy\\Env...', Array)
#22 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Container/Container.php(900): Illuminate\Foundation\Application->make('Hyn\\Tenancy\\Env...')
#23 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Container/Container.php(828): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))
#24 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Container/Container.php(795): Illuminate\Container\Container->resolveDependencies(Array)
#25 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Container/Container.php(253): Illuminate\Container\Container->build('Hyn\\Tenancy\\Web...')
#26 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Container/Container.php(764): Illuminate\Container\Container->Illuminate\Container\{closure}(Object(Illuminate\Foundation\Application), Array)
#27 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Container/Container.php(646): Illuminate\Container\Container->build(Object(Closure))
#28 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Container/Container.php(601): Illuminate\Container\Container->resolve('Hyn\\Tenancy\\Web...', Array)
#29 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(740): Illuminate\Container\Container->make('Hyn\\Tenancy\\Web...', Array)
#30 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Container/Container.php(900): Illuminate\Foundation\Application->make('Hyn\\Tenancy\\Web...')
#31 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Container/Container.php(828): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))
#32 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Container/Container.php(795): Illuminate\Container\Container->resolveDependencies(Array)
#33 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Container/Container.php(646): Illuminate\Container\Container->build('Hyn\\Tenancy\\Lis...')
#34 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Container/Container.php(601): Illuminate\Container\Container->resolve('Hyn\\Tenancy\\Lis...', Array)
#35 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(740): Illuminate\Container\Container->make('Hyn\\Tenancy\\Lis...', Array)
#36 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(154): Illuminate\Foundation\Application->make('Hyn\\Tenancy\\Lis...')
#37 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(140): Illuminate\Events\Dispatcher->resolveSubscriber('Hyn\\Tenancy\\Lis...')
#38 /home/vagrant/code/vendor/hyn/multi-tenant/src/Providers/Tenants/EventProvider.php(55): Illuminate\Events\Dispatcher->subscribe('Hyn\\Tenancy\\Lis...')
#39 [internal function]: Hyn\Tenancy\Providers\Tenants\EventProvider->boot()
#40 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)
#41 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#42 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#43 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Container/Container.php(564): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#44 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(800): Illuminate\Container\Container->call(Array)
#45 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(783): Illuminate\Foundation\Application->bootProvider(Object(Hyn\Tenancy\Providers\Tenants\EventProvider))
#46 [internal function]: Illuminate\Foundation\Application->Illuminate\Foundation\{closure}(Object(Hyn\Tenancy\Providers\Tenants\EventProvider), 21)
#47 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(784): array_walk(Array, Object(Closure))
#48 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php(17): Illuminate\Foundation\Application->boot()
#49 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(206): Illuminate\Foundation\Bootstrap\BootProviders->bootstrap(Object(Illuminate\Foundation\Application))
#50 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(162): Illuminate\Foundation\Application->bootstrapWith(Array)
#51 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(146): Illuminate\Foundation\Http\Kernel->bootstrap()
#52 /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#53 /home/vagrant/code/public/index.php(55): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#54 {main}
"}

@luceos
if i   do php artisan config:cache   i have this  Impossible to create the root directory "/opt/lampp/htdocs/kawar/storage/app".

The error is related to misconfigured logging in Laravel, not this package. Fix the issue with Laravel first.
I can also suggest creating a website with Laravel first before using this package, just to get the hang of how Laravel works.

hello,
I solved the problem. for the case of homestead it is necessary to connect while making vagrant ssh to make the migrations. thanks.

authors: kawarien luceos

repo: hyn/multi-tenant

license: mit


text:
Open a PR to list the lib on geoparquet.org

https://geoparquet.org/

https://github.com/geoparquet/geoparquet.github.io/pull/71

authors: platypii severo

repo: hyparam/geoparquet


text:
handle ctl&tty serial port in pod init

Signed-off-by: Gao feng omarapazanadi@gmail.com

Hold on this pr right now, Maybe other features need current frame.

repo: hyperhq/hyperstart


text:
Package dependency errors when installing on RPi 0

When installing Alpha 9 release on a RPi 0 I get the following package dependency error.
Bug report
Steps to reproduce
sudo dpkg -i Hyperion-2.0.0-alpha.9-Linux-armv6l.deb
What is expected?
Hyperion installation is successful.
What is actually happening?
Unpacking hyperion (2.0.0) ...
dpkg: dependency problems prevent configuration of hyperion:
hyperion depends on libcec4; however:
Package libcec4 is not installed.
dpkg: error processing package hyperion (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
hyperion
System

https://unix.stackexchange.com/a/159114


text:
Error: Upgrade expected but low level API in use

I tried to implement current thread TLS websocket server based on example code:
...
let tls_cx = tokio_tls::TlsAcceptor::from(tls_cx);

let new_service = || {
    service_fn_ok(|req: Request<Body>| {
        let mut res = Response::new(Body::empty());

        // Send a 400 to any request that doesn't have
        // an `Upgrade` header.
        if !req.headers().contains_key(UPGRADE) {
            *res.status_mut() = StatusCode::BAD_REQUEST;
            return res;
        }

        let on_upgrade = req
            .into_body()
            .on_upgrade()
            .map_err(|err| eprintln!("upgrade error: {}", err))
            .and_then(|upgraded| {
                // We have an upgraded connection that we can read and
                // write on directly.
                //
                // Since we completely control this example, we know exactly
                // how many bytes the client will write, so just read exact...
                tokio::io::read_exact(upgraded, vec![0; 7])
                    .and_then(|(upgraded, vec)| {
                        println!("server[foobar] recv: {:?}", &vec);

                        // And now write back the server 'foobar' protocol's
                        // response...
                        tokio::io::write_all(upgraded, b"bar=foo")
                    })
                    .map(|_| println!("server[foobar] sent"))
                    .map_err(|e| eprintln!("server foobar io error: {}", e))
            });

        current_thread::spawn(on_upgrade);

        // Now return a 101 Response saying we agree to the upgrade to some
        // made-up 'foobar' protocol.
        *res.status_mut() = StatusCode::SWITCHING_PROTOCOLS;
        res.headers_mut()
            .insert(UPGRADE, HeaderValue::from_static("foobar"));

        return res;
    })
};

let addr = "127.0.0.1:12345".parse().unwrap();
let srv = TcpListener::bind(&addr).expect("Error binding local port");

// Use lower lever hyper API to be able to intercept client connection
let http_proto = Http::new();
let http_server = http_proto
    .serve_incoming(
        srv.incoming().and_then(move |socket| {
            tls_cx
                .accept(socket)
                .map_err(|e| io::Error::new(io::ErrorKind::Other, e))
        }),
        new_service,
    )
    .then(|res| match res {
        Ok(conn) => Ok::<_, io::Error>(Some(conn)),
        Err(e) => {
            eprintln!("[1] Error: {}", e);
            Ok(None)
        }
    })
    .for_each(|conn_opt| {
        if let Some(conn) = conn_opt {
            current_thread::spawn(
                conn.and_then(|c| c.map_err(|e| panic!("[2] Hyper error {}", e)))
                    .map_err(|e| eprintln!("[3] Connection error {}", e)),
            );
        }

        Ok(())
    });

println!("Listening on {}", addr);

current_thread::block_on_all(http_server).expect("http server finished with error");

And I got error when on_upgrade future executed: upgrade expected but low level API in use.
How to use high level api to create TLS server?

I'm running into this issue too, but am not able to use the builder pattern like above. Our tcp connection needs to be handled by something else, and sometimes we hand it off to hyper to process web stuff. Is there any more guidance about how to fix this in that case? What about connection is it that would prevent hyper from upgrading it?

@mjibson Perhaps Connection::with_upgrades might work in that case?

If using Http:
let conn = http.serve_connection(socket, svc).with_upgrades();

authors: alecmocatta ddosoff mjibson seanmonstar

repo: hyperium/hyper


text:
cargo build failed

Bug Report
Version
latest code in github master
Platform
Darwin xxx-mac.local 19.3.0 Darwin Kernel Version 19.3.0: Thu Jan  9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64 x86_64
Crates
Description
On my mac:

git clone https://github.com/hyperium/tonic.git
cd tonic
cargo build

output:
error[E0034]: multiple applicable items in scope
help: disambiguate the method call for candidate #1
|
418 |                 return tower_service::Service::poll_ready(&mut self.balance, cx);
|                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: disambiguate the method call for candidate #2
|
418 |                 return tower_make::make_service::MakeService::poll_ready(&mut self.balance, cx);
|                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: could not compile tower-balance.

This is a rustc bug, I would recommend using stable or updating to a newer nightly. If its still an issue on a newer nightly I would open an issue in rustc. Since, this is unrelated to tonic going to close this, feel free to reopen if you have any more questions.

repo: hyperium/tonic


text:
Update platform r3 corda-ent chart and configuration README.md files

Description
As a developer I want to keep the README.md files updated with the current roles
Acceptance Criteria

Readme.md files are update for configurations

I will work on this

authors: nikhilagolla suvajit-sarkar


text:
Indy: Pool genesis config map Helm chart

Create the Indy Pool genesis config map Helm chart.

Closed by #109


text:
sample documentation update

broken links fixed
additional documentation to fungible, including configuration description and how to use embed the stack in an already existing application node.
added new GitHub action to check the links in the md files

Signed-off-by: Angelo De Caro adc@zurich.ibm.com

@KElkhiyaoui , thanks. I have addressed your comments :)

repo: hyperledger-labs/fabric-token-sdk


text:
Ccf upgrade

This PR introduces changes to upgrade CCF version used for PDO-TP from 0.11.7 to 1.0.19.  A few points to note:

CCF Base installation process is different for 1.0.19 (wrt 0.11.7) if one is installing CCF on a bare metal. (without docker) (deb vs tar files). CCF documentation https://microsoft.github.io/CCF/release/1.x/build_apps/install_bin.html should act as your guide. PDO TP Installation expects Ubuntu 20.04.

PDO clients no longer need to install CCF Base. Python client package is installed via pip. The client package is tested only on Ubuntu 20.04.

CCF user keys are no longer required by PDO clients. PDO clients will instead use one-way TLS. PDO TP now implements a custom authentication policy to permit anonymous PDO clients submit unauthenticated transactions.

PDO-dev docker image uses Ubuntu 20.04 as the base.

PDO signing keys while using CCF based PDO TP will now use SECP384R1 as the ECDSA curve.

Overall it looks good.
I can later fix the gipsy and ubuntu 18.04 build/test if we decide so.

I would like to see this fixed before we approve. If there is a fundamental problem with Gipsy & 20.04 then we can discuss. Otherwise lets make sure this failure is legitimate and not part of a bigger issue.

Tests in hw mode pass!

Will create a new PR to replace this one.

authors: bvavala cmickeyb prakashngit

repo: hyperledger-labs/private-data-objects


text:
allow self-connected agent to issue credentials, present proof

The v0.1 approach of selecting model record by initiator tag (filter) would not fly for v1.0 (issue-credential, present-proof) protocols: either side may initiate. Instead, select by connection identifier, available from the request context.
While altering manager.py for both, get message data from context where possible (i.e., unless routes.py instantiates and calls manager without the request context that corresponding handlers have).
Signed-off-by: sklump srklump@hotmail.com

Codecov Report

Merging #179 into master will decrease coverage by 0.05%.
The diff coverage is 23.8%.

@@            Coverage Diff             @@
##           master     #179      +/-   ##
==========================================
- Coverage   71.73%   71.67%   -0.06%
==========================================
  Files         217      217
  Lines        9820     9826       +6
==========================================
- Hits         7044     7043       -1
- Misses       2776     2783       +7

authors: codecov-io sklump

repo: hyperledger/aries-cloudagent-python


text:
fix: Fixes Codecov

Signed-off-by: Andrii Soluk isoluchok@gmail.com

Codecov Report

Merging #21 into main will decrease coverage by 5.61%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main      #21      +/-   ##
==========================================
- Coverage   77.48%   71.87%   -5.62%
==========================================
  Files           3        1       -2
  Lines         382      160     -222
==========================================
- Hits          296      115     -181
+ Misses         49       27      -22
+ Partials       37       18      -19

Impacted Files
Coverage Δ

component/storage/couchdb/store.go
71.87% <ø> (ø)

component/storage/mysql/store.go

component/storage/mongodb/mongodb.go

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 91758e2...6c64842. Read the comment docs.

authors: codecov-io soluchok

repo: hyperledger/aries-framework-go-ext


text:
update to use new diagrams & terms

Signed-off-by: Drummond Reed drummond@connect.me

These are minor tweaks for consistency and correctness. Merging.

repo: hyperledger/aries-rfcs


text:
feat(besu): erc-20 HTLC

Is your feature request related to a problem? Please describe.
We need a Cactus plugin for executing atomic swaps via HTLCs for ERC-20 tokens There's a separate task for ETH tokens that is otherwise the same task as this.
Describe the solution you'd like
Some inspiration could be taken from this, but the solidity code itself is just the tip of the ice-berg since we have to work within the plugin architecture and work out other bells and whistles such as contract deployment so that the overall experience for a developer using Cactus as a framework is pleasant rather than overwhelming.
There's a lot more information in the parent issue where the common theme is set for all these sub-tasks related to HTLC development for Cactus.
On a high level the solution should consist of

the solidity code and the boilerplate to make that solidity code callable via the Cactus API clients:
The plugin package under ./packages/cactus-plugin-htlc-eth-besu (naming things is a difficult problem, feel free to suggest better names)
OpenAPI spec json file (in the plugin package)
Generated API client in Typescrit (based on the OpenAPI spec)
The plugin has to be able to deploy the solidity code to the underlying ledger (solidity code to be embedded as a JSON resource, see parent issue for explanation)

Describe alternatives you've considered
N/A
Additional context
Parent: feat(core-api): atomic swaps with HTLCs #510
Sibling: feat(besu): eth HTLC #512
cc: @takeutak @sfuji822 @hartm @jonathan-m-hamilton

@petermetz this is a great idea and very relevant - with Cactus, the deployment and management of instances of HTLCs could be automized. I would say this constitutes a business logic plugin because it implements well-defined logic using a connector/validator pair (Besu). Now,  this poses a problem in terms of organization: will we see the number of packages escalate indefinitely? Are we accounting for "core" business logic plugins, that should be separated from the rest? This is probably good material for being discussed in the next meeting.

@petermetz this is a great idea and very relevant - with Cactus, the deployment and management of instances of HTLCs could be automized. I would say this constitutes a business logic plugin because it implements well-defined logic using a connector/validator pair (Besu). Now,  this poses a problem in terms of organization: will we see the number of packages escalate indefinitely? Are we accounting for "core" business logic plugins, that should be separated from the rest? This is probably good material for being discussed in the next meeting.

@petermetz this is a great idea and very relevant - with Cactus, the deployment and management of instances of HTLCs could be automized.

@RafaelAPB Thank you very much! :-)

I would say this constitutes a business logic plugin because it implements well-defined logic using a connector/validator pair (Besu).

My take (and I'm willing to be wrong here as usual): It is closer to BLPs than let's say the connector plugins (which are clearly not BLPs) but still, one has to ask, if the HTLC plugin is a BLP, then what is the exact business use case it's implementing? And my answer to that is that there is none because it's still more of a core/generic plugin, a lower level primitive that can be used by BLPs but do not itself carry any business logic.

Now, this poses a problem in terms of organization: will we see the number of packages escalate indefinitely?

My hunch is that the number of plugins will be a function of the number of ledgers supported which (hopefully) will continue to increase indefinitely, yes, but as DLTs mature, maybe we'll reach a stable equilibrium, regarding this I'm definitely just guessing.
I have given this (specifically the plugin count) some thought in the past and concluded that eventually we'll have to start storing plugin packages in dedicated git repositories to be able to scale. A case study I can offer where this strategy was successful is the ansible project where they broke out the main repo into smaller repos (and the reason they could do it is because they also have a plugin architecture in place).
Their justification there was that at any given time there would be 2 thousand open bugs on the GH issue tracker regardless of how much effort was spent on closing them, the newly added plugins and their related issues were just growing quicker than they could close the old ones. I'm looking forward to us having that problem one day and I think we'll be in a good position to fix it as well (and maybe we don't wait until things get that bad but instead keep it steady with a gradual unloading of plugins to their own repos/maintainers).

Are we accounting for "core" business logic plugins, that should be separated from the rest? This is probably good material for being discussed in the next meeting.

May have partially commented on this above as well, but wanted to add an additional thought here and in the upcoming meeting!
I think the optimal recipe to decide how many/which plugins to put in their own repos is to let the community drive these decisions.
Example 1: If there's not much interest from people in being maintainers for certain plugins then we should either keep those in the main cactus repo or just straight up deprecate them if they are not really used by anyone.
Example 2: If there's 100 plugins and there are people willing to maintain some of those in separate repos, then we could break those out so that issue management/PR reviews can become easier. I also want to note here though that streamlined processes could be created with the labeling system that ensures that things go smoothly even if we reached critical mass.

@petermetz this is a great idea and very relevant - with Cactus, the deployment and management of instances of HTLCs could be automized.

@RafaelAPB Thank you very much! :-)

I would say this constitutes a business logic plugin because it implements well-defined logic using a connector/validator pair (Besu).

My take (and I'm willing to be wrong here as usual): It is closer to BLPs than let's say the connector plugins (which are clearly not BLPs) but still, one has to ask, if the HTLC plugin is a BLP, then what is the exact business use case it's implementing? And my answer to that is that there is none because it's still more of a core/generic plugin, a lower level primitive that can be used by BLPs but do not itself carry any business logic.

Now, this poses a problem in terms of organization: will we see the number of packages escalate indefinitely?

My hunch is that the number of plugins will be a function of the number of ledgers supported which (hopefully) will continue to increase indefinitely, yes, but as DLTs mature, maybe we'll reach a stable equilibrium, regarding this I'm definitely just guessing.
I have given this (specifically the plugin count) some thought in the past and concluded that eventually we'll have to start storing plugin packages in dedicated git repositories to be able to scale. A case study I can offer where this strategy was successful is the ansible project where they broke out the main repo into smaller repos (and the reason they could do it is because they also have a plugin architecture in place).
Their justification there was that at any given time there would be 2 thousand open bugs on the GH issue tracker regardless of how much effort was spent on closing them, the newly added plugins and their related issues were just growing quicker than they could close the old ones. I'm looking forward to us having that problem one day and I think we'll be in a good position to fix it as well (and maybe we don't wait until things get that bad but instead keep it steady with a gradual unloading of plugins to their own repos/maintainers).

Are we accounting for "core" business logic plugins, that should be separated from the rest? This is probably good material for being discussed in the next meeting.

May have partially commented on this above as well, but wanted to add an additional thought here and in the upcoming meeting!
I think the optimal recipe to decide how many/which plugins to put in their own repos is to let the community drive these decisions.
Example 1: If there's not much interest from people in being maintainers for certain plugins then we should either keep those in the main cactus repo or just straight up deprecate them if they are not really used by anyone.
Example 2: If there's 100 plugins and there are people willing to maintain some of those in separate repos, then we could break those out so that issue management/PR reviews can become easier. I also want to note here though that streamlined processes could be created with the labeling system that ensures that things go smoothly even if we reached critical mass.

I'm working on this, I'm currently generating end-to-end test

authors: RafaelAPB jordigiam petermetz

repo: hyperledger/cactus


text:
Unhelpful error if you don't specify enough parameters for a contract-api managed transaction

Using 2.2.3LTS
I have the following method
    @Transaction(submit=false)
    public QueryResponse<String> paginatedRichQuery(Context ctx, String queryString, String pagesize, String passedBookmark) {

I invoke paginatedRichQuery with inly 2 parameters rather than 3. The following is output in the chaincode container
Thread[fabric-txinvoke:1,5,main] 11:51:07:448 SEVERE  org.hyperledger.fabric.shim.impl.ChaincodeInvocationTask call                    [2eaadd5f] Invoke failed with error code 500. Sending ERROR
Thread[fabric-txinvoke:5,5,main] 11:51:07:448 SEVERE  org.hyperledger.fabric.Logger error                                              Index 3 out of bounds for length 3java.lang.IndexOutOfBoundsException: Index 3 out of bounds for length 3
        at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
        at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
        at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
        at java.base/java.util.Objects.checkIndex(Objects.java:372)
        at java.base/java.util.ArrayList.get(ArrayList.java:458)
        at org.hyperledger.fabric.contract.execution.impl.ContractExecutionService.convertArgs(ContractExecutionService.java:99)
        at org.hyperledger.fabric.contract.execution.impl.ContractExecutionService.executeRequest(ContractExecutionService.java:57)
        at org.hyperledger.fabric.contract.ContractRouter.processRequest(ContractRouter.java:119)
        at org.hyperledger.fabric.contract.ContractRouter.invoke(ContractRouter.java:130)
        at org.hyperledger.fabric.shim.impl.ChaincodeInvocationTask.call(ChaincodeInvocationTask.java:100)
        at org.hyperledger.fabric.shim.impl.InvocationTaskManager.lambda$newTask$17(InvocationTaskManager.java:265)
        at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1736)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

It looks like the contract api doesn't handle this well and throws an IndexOutOfBoundsException

@jt-nti  is this still an issue?

I think it probably is...
https://github.com/hyperledger/fabric-chaincode-java/blob/main/fabric-chaincode-shim/src/main/java/org/hyperledger/fabric/contract/execution/impl/ContractExecutionService.java#L92

authors: davidkel jt-nti mbwhite

repo: hyperledger/fabric-chaincode-java


text:
updated chaincodes for asset-transfer-basic in order to show good example on how achieving determinism over json

Show good praticse in order to make sure that data will be stored in the blockchain in a deterministic way using json
Signed-off-by: fraVlaca ocsenarf@outlook.com

Thank you @fraVlaca !  Could you also update the corresponding doc tutorial? I've created https://github.com/hyperledger/fabric/issues/2898 for it.

authors: denyeart fraVlaca

repo: hyperledger/fabric-samples


text:
check leveldb iterator error

Type of change

Bug fix

Description
Goleveldb iterator does not explicitly return an error. We need to call the itr.Error() method on the iterator to check for the presence of any error. As the check is missing at a few places, this PR make the leveldbhelper pkg itself to return an error by explicitly calling itr.Error()
Additional details
In the subsequent PR, we would supply the fix for iter.Next() as well.
Related issues

Good question, @ale-linux. Sorry for the long answer but I had to be comprehensive to ensure that I am not adding any forks.
Answer
In this PR, ONLY for the following ledger APIs, the function signature has been changed to also return an error

func (h *DBHandle) GetIterator(startKey []byte, endKey []byte) (*Iterator, error) {
func newMetadataHint(bookkeeper *leveldbhelper.DBHandle) (*metadataHint, error) {
func (d *db) getNamespaceIterator(ns string) (*leveldbhelper.Iterator, error) {

Given that all callers of these function already return an error, this PR does not introduce a new error in general and should not introduce fork as per my analyzis.
Only in a goroutine in the ledger, this PR introduces a panic and is debatable.
https://github.com/hyperledger/fabric/pull/1428/files#diff-19d675f588314393c7a74b5a587c1939R828-R831
This goroutine receives collection membership change event and moves ineligible missing data entries to eligible entries (as the peer has become a member now). If any issue occurs while reading entries from the db, the peer would panic as this error can occur mainly due to corrupted filesystem. Further, a single leveldb instance is used for all db. Hence, it is not possible to abort only a particular chain as well.
Additional Details
Any LevelDB iterator error might occur due to either

a corrupted filesystem or corrupted LevelDB files or
a closed DB (this should never occur unless there is a bug in the code).

Hence, an iterator would return an error in a rare case only and the caller needs to decide whether to

Propagate the error to whoever called it and so on.
Panic the peer. https://github.com/hyperledger/fabric/blob/c4d38024326e69bb85139ae4704e618f0f865d7a/gossip/state/state.go#L581
Stop processing the chain. https://github.com/hyperledger/fabric/blob/c4d38024326e69bb85139ae4704e618f0f865d7a/gossip/state/state.go#L576-L579
Log a warning message and continue.
https://github.com/hyperledger/fabric/blob/c4d38024326e69bb85139ae4704e618f0f865d7a/gossip/privdata/pvtdataprovider.go#L297-L307

I am not going into the details of why the above functionalities result in a panic or an error or a warning as this response is already a big one 😄 (in short, it depends on the severity. For example, any error happens while fetching a pvtdata from other peers need not to panic or stop processing a chain).
If I am missing something, please let me know.

repo: hyperledger/fabric


text:
FAB-12264 - Doc. fix

As mentioned in the issue FAB-12264, i've updated the docs/source/build_network.rst  with the export  command.
Issue Link

i`ll be closing this PR since the target branch isn't the master branch. The PR #192 is the correct one.


text:
update event docs

in a chain with #1028
not currently published on my github pages due to hosting another doc changes.

Codecov Report

Merging #1031 (bd06d69) into main (e281a17) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1031   +/-   ##
=======================================
  Coverage   99.98%   99.98%
=======================================
  Files         302      302
  Lines       19919    19956   +37
=======================================
+ Hits        19917    19954   +37
  Misses          2        2

Impacted Files
Coverage Δ

internal/orchestrator/orchestrator.go
100.00% <ø> (ø)

pkg/core/contract_listener.go
100.00% <ø> (ø)

pkg/core/subscription.go
100.00% <ø> (ø)

...erver/route_get_contract_listener_by_name_or_id.go
100.00% <100.00%> (ø)

internal/apiserver/route_get_subscription_by_id.go
100.00% <100.00%> (ø)

internal/blockchain/ethereum/ethereum.go
100.00% <100.00%> (ø)

internal/blockchain/ethereum/eventstream.go
100.00% <100.00%> (ø)

internal/blockchain/fabric/fabric.go
100.00% <100.00%> (ø)

internal/contracts/manager.go
100.00% <100.00%> (ø)

internal/orchestrator/subscriptions.go
100.00% <100.00%> (ø)

... and 2 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

authors: codecov-commenter shorsher

repo: hyperledger/firefly


text:
operations: [.Insert] is inserting a set of duplicate data

I noticed that .Insert was inserting duplicate data and figured I must be doing something wrong so I called
Sync.changes(JSON, inEntityNamed: entity, dataStack: self.dataStack, operations: [.Insert], completion: { error in })
twice in a row to ensure that it is on the same data and sure enough my entity contains twice the amount of data.
After some continued testing it appears that .Insert only adds one set of duplicate data.
I am not sure if calling it twice in a row causes something weird to happen but i have also done tests where I download the same data from a database two separate times calling insert on both and having twice as much data as i should in my Entity
I really love the simplicity of this framework compared to how CoreData is usually handled. Great job so far!

@3lvis do you know if this is correct or if I am just doing something wrong?

@Pyroscout Hi! We don't support calling Sync for the same resource at the same time, unexpected behavior is bound to happen. You can either find a way to only call Sync for a resource once at the time, or you can use a NSOperationQueue with maxConcurrentOperationCount = 1.
let queue = NSOperationQueue()
let operation = Sync(changes: users, inEntityNamed: "User", predicate: nil, dataStack: dataStack)
queue.addOperation(operation)

In that way a sync will only be called when the previous one has finished.

@3lvis Thanks for your quick response!
I made sure that the first Sync was completed before the second call was made and the information is still being inserted twice. I am using NSNotificationCenter to track changes. Here is what is being called the first time:
                    Sync.changes(JSON, inEntityNamed: entity, dataStack: self.dataStack, operations: [.All], completion: { error in
                        NSNotificationCenter.defaultCenter().removeObserver(self, name: NSManagedObjectContextObjectsDidChangeNotification, object: nil)
})```

And here is the second call:
```NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(Networking.changeNotification(_:)), name: NSManagedObjectContextObjectsDidChangeNotification, object: self.dataStack.mainContext)
                    Sync.changes(JSON, inEntityNamed: entity, dataStack: self.dataStack, operations: [.Insert], completion: { error in
                        NSNotificationCenter.defaultCenter().removeObserver(self, name: NSManagedObjectContextObjectsDidChangeNotification, object: nil)
                    })```
JSON contains the same data both times
Any other ideas?

Hi @Pyroscout,
I added a unit test to verify this, and everything is working as expected. https://github.com/hyperoslo/Sync/pull/235
I be able to follow up on this, could you please share your Core Data model and an example of your JSON?
I have the suspicion that it might be related to changing primary keys.

I went home for the day a bit ago so I will get those to you tomorrow. How would you like me to give you that information though? Im pretty new to github so I dont know what the best way is

Check this GitHub issue, if has an screenshot of the Core Data model and the JSON file.
https://github.com/hyperoslo/Sync/issues/184

Here is the Core Data model and the example of my JSON

Is postid the primary key?

Yes

Hi everyone.
I'm facing a similar issue with my sync process.
After some testing, I noticed that SyncDemoApp has a primary key defined as String type, the model I am working on has a primary Key defined as NSNumber.
I've changed the primary key in my model as String type, after that, the process works as expected.

All of my keys are Strings so that definitely is not what is wrong with mine. Thanks anyway

I'm not able to reproduce this error, having a sample project would help a lot. Closing until receiving further instructions.

authors: 3lvis Pyroscout osmarogo

repo: hyperoslo/Sync


text:
Rethink API

I've been wondering what if we changed the API to something more simple.
New
// [Sync changes:notes entityName:@"Notes" dataStack:self.dataStack completion:nil];

+ (void)changes:(NSArray *)changes
     entityName:(NSString *)entityName
      dataStack:(DATAStack *)dataStack
     completion:(void (^)(NSError *error))completion;

Old
// [Sync processChanges:notes usingEntityName:@"Notes" dataStack:self.dataStack completion:nil];

+ (void)processChanges:(NSArray *)changes
       usingEntityName:(NSString *)entityName
             dataStack:(DATAStack *)dataStack
            completion:(void (^)(NSError *error))completion;

Coming from Ruby, I like how the old one reads like a sentence. Maybe you could still do that with less verbosity, though.

Actually the first argument of the proposed syntax reads better (Sync changes [...]), but the second worse ([...] entityName).

So I'm totally bad at this, but what about…
[Sync changes:notes as:@"Notes" [...]

Hell, if DATAStack does what I think it does, what about…
[Sync changes:notes as:@"Notes" on:self.dataStack ...]

…? Too crazy?

Hell, if DATAStack does what I think it does, what about…
[Sync changes:notes as:@"Notes" on:self.dataStack ...]

…? Too crazy!?

That's very Swift of you, we should totally change the API once we make a Swift bridge.

So ahead of my time, you know. ;-)

What about
+ (void)changes:(NSArray *)changes
    inEntityName:(NSString *)entityName
         dataStack:(DATAStack *)dataStack
        completion:(void (^)(NSError *error))completion;

@RamonGilabert I like that!

@3lvis I was thinking in adding just changes inEntity dataStack (or just stack) the user will see the placeholder saying, entityName so I think they'll know what to put.

@RamonGilabert I haven't choose that direction because of NSEntityDescription, in a Core Data context when you say entity most of the time you are referring to a NSEntityDescription instance.
We could go for
+ (void)changes:(NSArray *)changes
   inEntityName:(NSString *)entityName
      dataStack:(DATAStack *)dataStack
     completion:(void (^)(NSError *error))completion

All right, let me finish a small surprise and I'll go for it! :dancers:

Fixed on #40!
Thanks @RamonGilabert :star2:  :bouquet: :star2:

authors: 3lvis RamonGilabert jgorset


text:
Postbacks not Working

Hi, I am trying to set up the post backs in my app and have been unsuccessful. Also, nothing is showing in the logs, any ideas?

The logs should definitely say something – if you've registered a hook on :postback it should run that code, and otherwise it should say that it's ignoring the event. Did you remember to subscribe to the page? Also, please help us to help you by sharing your code.

Totally unrelated question, but is there a way to retrieve the sender's first name on either the message or postback method?

Did you figure the first question out...?

And yes, you can use the Graph API to query user data.

Ok thanks, yeah everything is working now!

I know this issue is closed, but as an FYI to future readers, be sure when subscribing to the page to enable the messaging_postbacks event.
To receive messages and other events sent by Messenger users, the app should enable webhooks integration.
Selected events: message_deliveries, messages, messaging_optins, messaging_postbacks

When I initially setup my bot and webhooks, I only enabled the messages event (as shown in the README image).

Good catch, @dthyresson! I just got that image from Facebook's documentation, but it'd be good to update it with something that has all the right settings.

Hello. I am still facing the same issue :(
After sending this, I get the 2 quick reply options:
  optin.reply(
      text: "Welcome #{user.name}! Should I notify you of job updates via messages?",
      quick_replies: [
          {
              content_type: 'text',
              title: 'Yes, definitely',
              payload: 'notifications-yes'
          },
          {
              content_type: 'text',
              title: 'No',
              payload: 'notifications-no'
          }
      ]

but the, after selecting the 'yes. definitely' option, nothing happens in the postback callback:
Bot.on :postback do |postback|
  postback_debug = {
      sender: postback.sender,
      payload: postback.payload,
  }
  Rails.logger.debug "New postback: #{postback_debug.to_s}"
  case postback.payload
    when 'notifications-yes'
      postback.reply(text: 'Great')
    when 'notifications-no'
      postback.reply(text: 'Okay :(')
    else
      raise "Cannot handle postback payload: #{postback.payload}"
  end
end

However, I do get a message callback with :text=>"Yes, definitely", as seen in my logs.

A quick reply is not a postback, @vedant1811. Here's the documentation on postbacks.

I'm facing the same issue, it only occurs when I do broadcast

authors: AlecRubin M-Abozaid alecrubin dthyresson jgorset vedant1811

repo: hyperoslo/facebook-messenger


text:
Allow additional data as part of announce

Could you please accept additional user-data as part of the announcement API (and add that user-supplied data to the built-in lookup data and put it on the DHT)?
For example, along with peer host, port, would like to have publicKey, compression, P2P offers etc. all part of the announcement, so that discovered peers can be connected correctly. This also facilitates ICE like features, as the P2P connection offers can be retrieved from the discovery results.
IP is just one network layout option. Announcer might want to offer multiple connection facilities, and currently, @hyperswarm/discovery and DHT seems to be hardcoding the DHT lookup values to be {host, port} (essentially IPV4), which is too restrictive. Allowing custom values to be added to the announcer record in the DHT allows, say, p2p peer ids, IPV6 records, Proxy info, STUN offers, publicKeys etc. to be supplied by the user if needed, making it possible for the clients to take the best possible connection option and connect the right way.

The DHT has built in STUN.
No plans to change the announce message atm, but could be tweaked in the future.

authors: KrishnaPG mafintosh

repo: hyperswarm/discovery


text:
Add a non body consuming check for form boundaries

This also adds an option to control whether blank content types should be
assumed to be a form type for the purpose of checking when getting a form
for the purposes of this check.
The default is False, as otherwise installing pyramid-sanity could cause
otherwise working apps to fail (e.g. ones expecting JSON, but not requiring
a content type to declare it).

Can you explain the assume_form_on_blank setting? It looks like previously the invalid form tween did its thing on all POST requests. Now, by default, it only does its thing if the request method is POST and the Content-Type is "application/x-www-form-urlencoded" or "multipart/form-data".
Why the change? It looks to me like this is to fix the bulk API because, since bulk API requests aren't "application/x-www-form-urlencoded" or "multipart/form-data", the invalid form tween has now been disabled for bulk API requests? So the request.POST iterable will no longer be getting consumed by the tween, for bulk API tests?
Why the config setting to undo the change? Wouldn't it make sense to always limit the invalid form tween to "application/x-www-form-urlencoded" or "multipart/form-data" requests?

Hmm, and it seems that request.POST.get("", None) was replaced with  cgi.valid_boundary(). I'm not sure what valid_boundary()` does though, it's undocumented!

It's "inspired" rather than directly related. It's not needed to fix the bulk API issue per se, but will affect 3rd parties who try to use pyramid-sanity. Consider the following situation:

You setup a POST view, that is expecting JSON for example
You do not require any particular Content-Type header (so it's fine to send anything, or nothing at all)
You therefore end-up with consumers (self or other) that make requests, sending JSON, without a Content-Type
Now you enable pyramid-sanity
As a result, previously working end-points are broken raising messages about bad form boundaries, which is wrong and hyper confusing

I can't see a sane way of proceeding if the Content-Type is blank that doesn't break people. If you say it's a form and it's broken, than seems fair enough. If you don't even claim it to be a form, it's a bit weird. However by removing this, we strip protection for that. So I wanted a way to add that protection back in if you wanted it.
This is pretty much the situation we are actually in with h and the bulk API. We don't enforce that you tell us the content type to be declared, we just assume it's NDJSON. This meant that although the client sends the correct header, the func tests weren't. It turns out webtest tries to be helpful, and defaults to "application/x-www-form-urlencoded" so they crashed.
So while the actual type of the content we are sending is NDJSON for the bulk API, the Content-Type can be anything, or nothing at all.

The cgi stuff is stripped out of the webob.compat stuff mentioned in the code.

This has undergone some fairly major changes:

I added full testing of the error condition and realised it only applied to "multipart" things (which makes sense)
This removes the need for the option
I added testing of the others to catch similar things
Added suggested wording for docstring above

authors: jon-betts seanh

repo: hypothesis/pyramid-sanity


text:
autorandr freezes Hyprland

When autorandr is present on the system (the service must not even be enabled) Hyprland freezes after some time. Music keeps playing and the hotkey demon does still work, since I can close and reopen Hyprland with a key bind.
I experienced that on Sway as well, but only1–2 times a month. Hyprland freezes nearly every time after 5-10 min.
This was already posted here as comment:
https://github.com/hyprwm/Hyprland/issues/1491#issuecomment-1418258350
The log does not show anything relevant besides:
Window ca4d3040 set title to [intel/iris] [backend/drm/atomic.c:55] eDP-1: Atomic commit failed (modeset): Permission deni[98902:98902:0321/151713.114557:ERROR:wayland_frame_manager.cc(512)] The server has buggy presentation feedback. Discarding all presentation feedback requests in all frames except the last 3.
[98902:98902:0321/151713.915428:ERROR:wayland_frame_manager.cc(512)] The server has buggy presentation feedback. Discarding all presentation feedback requests in all frames except the last 3.

These are the last two lines, followed by many 0x00 bytes.

autorandr is for X11. Use kanshi instead.

If anyone has figured out how to disable autorandr without actually uninstalling it, I'm all ears. It's not a normal systemd service so I still tries to run when I switch monitors. I'm rm'd the udev rule in /usr/lib/udev/rules.d but somehow it miraculously still runs and crashes Hyprland.

authors: HeadTriXz LDAP mike-lloyd03

repo: hyprwm/Hyprland