[CLOSED] Make both body and hidden_indexable_content indexable

 Issue by robmckinnon
Wednesday 09 September 2015 at 15:35 GMT
Originally opened as https://github.com/alphagov/specialist-publisher/pull/557

As recommended by search team members here: https://github.com/ministryofjustice/specialist-publisher/commit/512a73301be1f9909573b847e23222a4bcd126cd#commitcomment-12928833
"There's little harm if there's duplication between body and indexable_content_indexable, and there's
definite benefit to making sure any text we have available is searchable."

robmckinnon included the following code: https://github.com/alphagov/specialist-publisher/pull/557/commits

 Comment by tijmenb
Wednesday 09 September 2015 at 16:36 GMT

Great! Would it be good to also index tribunal_decision_reference_number here? Do you think people will search for that?

 Comment by robmckinnon
Thursday 10 September 2015 at 09:44 GMT

@tijmenb Are you suggesting we should remove tribunal_decision_reference_number from the extra_attributes at this line in the indexable formatter?

 Comment by tijmenb
Thursday 10 September 2015 at 10:56 GMT

No, suggesting that we do indexable_content: "#{entity.hidden_indexable_content}\n#{entity.tribunal_decision_reference_number}\n#{entity.body}".strip so that if people search for the reference number in the normal GOV.UK search they'll find the document. But this might not be necessary - no idea if people would actually search for those.

 Comment by tomwm
Thursday 10 September 2015 at 12:53 GMT

not sure i understand. Yes, reference numbers are 'usually' in the content of the decision doc (caveat: i cant guarantee this for all tribunals because we've not been in contact with them all and currently they use different decision formats within the tribunals themselves)

 Comment by robmckinnon
Thursday 10 September 2015 at 12:42 GMT

All tribunal decision examples I've seen so far have the reference number in the decision text. So don't think we need to explicitly include it in the indexable_content. I'll confirm this with @tomwm.

 Comment by tijmenb
Friday 11 September 2015 at 10:34 GMT

Yes! :+1:

 Comment by robmckinnon
Friday 11 September 2015 at 10:22 GMT

@tijmenb Suggest we merge this as is for now. Ok with you?
We could always change in rummager the tribunal_decision_reference_number field definition from identifier to searchable_identifier later.

 Comment by rboulton
Friday 11 September 2015 at 10:36 GMT

Merged.
On point to note - I imagine lots of these finders will have a "decision reference number" - if at all possible, it would be good to make sure these go in the same field, so that it would be possible to allow searching across all tribunals given just a reference number, without having to know which tribunal it's for.  Similarly if there are any other "shared" reference numbers.  ie, don't make new fields for every finder, if there's some shared fields you can use instead.

 Comment by robmckinnon
Friday 11 September 2015 at 10:53 GMT

@rboulton Where possible I'll reuse fields that are semantically the same across tribunal finders. As you say tribunal_decision_reference_number is a good example of a field where this reuse makes sense.


Only implement middleware in "some" view instead of ALL?

From what I can understand I see CORS middleware will apply to any route.
However, I believe in practice different CORS settings may be required.
Only the API part requires CORS, however,/admin/ should not accept CORS access?
I am just starting with this app and not sure if I have misunderstood anything.
Thanks for any thoughts

You can use the CORS_URL_REGEX setting: https://github.com/ottoyiu/django-cors-headers#cors_urls_regex . You'll need to write a regex to match the URL's to apply to, as per Python's re module.
HTH,
Adam

Thanks, will give a shot


'mvn install' command execution failed

Describe the bug
'mvn install' command execution failed:
Debug logs

Use command mvn clean install -Dmaven.javadoc.skip=true and try again.

Doesn't solve the problem, let me fix it.

Use command mvn clean install -Dmaven.javadoc.skip=true and try again.

Use command mvn clean install -Dmaven.javadoc.skip=true and try again.

Doesn't solve the problem, Let me fix it.

I try it successfully with command mvn clean install -Dmaven.javadoc.skip=true

The latest code？

I try it successfully with command mvn clean install -Dmaven.javadoc.skip=true

The latest code？

I try it successfully with command mvn clean install -Dmaven.javadoc.skip=true

You execute org.apache.shenyu.admin.service.UpstreamCheckServiceTest this test class, is there a problem?


Responding to adaptive card input events

Hi.  Is there an API that I can use to respond to adaptive card input events.  For example if a user toggles a checkbox in an adaptive card I'd like to respond to this event with some custom logic (send an API request).  I took a look at the card action middleware but it looks like the toggling of a checkbox is not captured.

This is not supported as Adaptive Cards do not have APIs to control its surface.
You can file a feature request to their repo.

@compulim the ability to react to toggle changes is already supported in Adaptive Cards but doesn't appear to be surfaced in WebChat.
If I render the card using the Adaptive Cards library directly I can use the onInputValueChanged method to capture this event.  Here's a working example of this:
import * as AdaptiveCards from "adaptivecards"

const card = {
  type: "AdaptiveCard",
  $schema: "http://adaptivecards.io/schemas/adaptive-card.json",
  version: "1.3",
  body: [
    {
      type: "Input.Toggle",
      title: "Toggle Me",
    },
  ],
}

const adaptiveCard = new AdaptiveCards.AdaptiveCard()

adaptiveCard.onInputValueChanged = function (value) {
  console.log("Toggle has been changed", value)
}

adaptiveCard.parse(card)

document.body.appendChild(adaptiveCard.render())

Is it possible for me to hook into this event using WebChat?

@compulim @stevkan I think this was closed prematurely.  Can someone please review the message above?


Moved _POPTORCH_AVAILABLE and _IPU_AVAILABLE

What does this PR do?
Moves _POPTORCH_AVAILABLE and _IPU_AVAILABLE from lightning_utils.imports #11826.

Does your PR introduce any breaking changes? If yes, please list them.

Before submitting

[x] Was this discussed/approved via a GitHub issue? (not for typos and docs)
[x] Did you read the contributor guideline, Pull Request section?
[x] Did you make sure your PR does only one thing, instead of bundling different changes together?
[ ] Did you make sure to update the documentation with your changes? (if necessary)
[ ] Did you write any new necessary tests? (not for typos and docs)
[ ] Did you verify new and existing tests pass locally with your changes?
[ ] Did you list all the breaking changes introduced by this pull request?
[ ] Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

PR review
Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:

[ ] Is this pull request ready for review? (if not, please submit in draft mode)
[ ] Check that all items from Before submitting are resolved
[ ] Make sure the title is self-explanatory and the description concisely explains the PR
[ ] Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?
Make sure you had fun coding 🙃

@carmocca Not sure why the pytorch_lightning IPU one is failing.

Me neither. Unfortunately, it's a segfault, the worst class of error we could get. There are only a few changes in this patch and IPU CI is quick to run if you want to try splitting this into several tiny commits to see which one causes this.

Me neither. Unfortunately, it's a segfault, the worst class of error we could get. There are only a few changes in this patch and IPU CI is quick to run if you want to try splitting this into several tiny commits to see which one causes this.

I'll try to have a look at this.

Working on identifying Segfault source.


rename: Avoid renaming the same name as other containers

After change:
➜  buildah git:(rename-fix) ✗ sudo buildah containers
CONTAINER ID  BUILDER  IMAGE ID     IMAGE NAME                       CONTAINER NAME
e173e4ed21d3     *                  scratch                          zz
2256d7709941     *     e1ddd7948a1c docker.io/library/busybox:latest busybox
➜  buildah git:(rename-fix) ✗ sudo ./buildah rename e173 busybox
The container name "busybox" is already in use by container "2256d7709941ebfc1de14d0fab2e0c4959d38df3c2c7455ada99f342975e8c21"

Signed-off-by: Zhou Hao<EMAIL_ADDRESS>

LGTM

I'm losing it, thought I'd LGTM'd this yesterday.
LGTM.

LGTM

@rh-atomic-bot r+

@rh-atomic-bot retry

Homu is upset about something here.

@rh-atomic-bot retry


Fix a couple of typos.

Can you look into why Travis is not passing?

+1 after Travis

@tilogaat I can merge this now, right?

Travis completed successfully.


Reinitialize NSRunningApplication at EVENT_HANDLER_APPLICATION_LAUNCHED

As per https://github.com/koekeishiya/yabai/issues/923#issuecomment-885823553 this appears to resolve #920 crashes for me
(all the ones I have experienced so far anyway, there may be more like it)
I'm not asserting this is the correct way to handle this, but its a workaround at least
(Also my literal test case is as xorpse#5 )

I tried a more aggressive version where I also deleted
https://github.com/koekeishiya/yabai/blob/8777db43b8551e0bc4e5c55d1e15bcbed52501a1/src/process_manager.c#L37
but that did  segfault elsewhere (though I don't actually notice anything that is/should be looking at process->ns_application prior to EVENT_CALLBACK(EVENT_HANDLER_APPLICATION_LAUNCHED )

I don't get why this would be an issue at all. I'd suggest waiting for a stable Monterey release before doing upstream changes, particularly in cases like these where official APIs suddenly breaks. Of course there could be some obscure bug in yabai, but I find that unlikely as this code has been running fine for me ever since High Sierra was the latest.

So the crash this is squashing is related to the arm64e pointer authentication (https://developer.apple.com/documentation/security/preparing_your_app_to_work_with_pointer_authentication ) - which is being built with on xorpse's fork (and I am using the kernel boot arg to opt into supporting; I admit I am not fully aware why this is desirable – though I note that e.g. the contents of /bin on both Monterey and Big Sur are all x86_64/arm64e universal, not merely x86_64/arm64);
In my original linked comment I was definitely thinking about this in terms of being an initialization issue – like that the NSRunningApplicaiton wasn't valid until later in the launching/reaction lifecycle; but now I'm thinking its probably something more to do with a liability of storing information in C++ structs (as void *s) outside the ObjC runtime's domain
The problem is either:

Merely that ObjC doesn't trust the pointer next time it sees them: If it is in that way a ~safety violation, but not a correctness problem, its fair that it doesn't belong upstream - or rather what (eventually) belongs upstream is probably something I don't the most understand yet, but talked about in the link above (ptrauth.h - "the ptrauth_strip macro"; to ... remove the signatures from the pointers? / opts out of this functionality?)

And/or (and would be that something like (2) is true but that the "opt out" changes compiler behavior such that it won't be)

That the pointer is legit invalid by the time its accessed. My thought in this case would be about where the result of NSRunningApplication runningApplicationWithProcessIdentifier is being allocated.

That this patch works makes me wonder if its maybe its now allocating it directly on the stack of the caller of workspace_application_create_running_ns_application (or maybe in an allocation managed by the ObjC runtime with only that guaranteed lifetime)
If this is the case, it could be the case that either the ObjC behavior has changed (and again, might change back with use of ptrauth macros?)
or it could be if fact that this was ~always theoretically/potentially incorrect—that we are referring with this pointer to memory that happens to still contain the object we care about, but technically is no longer allocated for it; memory (on the heap?) that would be overwritten if enough other NSObjects et al to get allocated? (but that in practice yabai's ObjC surface area is small enough that would never / has never happened?)

I don't have ~any objC / Swift / Apple runtime experience – so its totally possible this reasoning is misapplications of understandings from C++ years ago and more recent playing in Rust – or that the ObjC runtime gives some FFI guarantees I'm not aware of that make the void * carry safe ; but it looks risky to me

Continuing the above edit, I wonder if what's missing is just a call to [retain] (https://developer.apple.com/documentation/objectivec/1418956-nsobject/1571946-retain) in workspace_application_create_running_ns_application
(either cause that "should" have always been there, or cause something has changed about reference counting under return from a function)
I'll give that a shot

That sounds correct, yes. I wish there was a way to completely disable autoreleasepools, but I haven't found a way to do so.
Sent from my iPhone
On 28 Jul 2021, at 23:29, Donald Guy @.***> wrote:

Continuing the above edit, I wonder if what's missing is just a call to [retain] (https://developer.apple.com/documentation/objectivec/1418956-nsobject/1571946-retain) in workspace_application_create_running_ns_application
(either cause that "should" have always been there, or cause something has changed about reference counting under return from a function)
I'll give that a shot
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/koekeishiya/yabai/pull/967#issuecomment-888634413, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABPDZVYL3XC3OACXH6JUDHLT2BZEDANCNFSM5A4RAGJQ.

you:

but I find that unlikely as this code has been running fine for me ever since High Sierra was the latest.

me:

(either cause that "should" have always been there, or cause something has changed about reference counting under return from a function)

For the record, this code re: allocation in its current form dates only to #543 (which is a pretty short "always" for me to refer to, one when I'm pretty sure we lived in fact in Catalina times; but also already COVID-19 times, so what is/was time anyway)
prior to that it looks like you did a more similar-to-this allocation of the handle uniquely in each callback — beside which you immediately added an observer, which maybe effected the way the lifetime of the object was handled

Closing in favor of #973

That sounds correct, yes. I wish there was a way to completely disable autoreleasepools, but I haven't found a way to do so.
…

https://clang.llvm.org/docs/AutomaticReferenceCounting.html#general does offer an -fno-objc-arc but maybe that its a bigger hammer than you are asking for, or is incompatible with CoreFoundation or something


Feature/task creation

Codecov Report

Merging #37 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #37   +/-   ##
=======================================
  Coverage   99.52%   99.52%
=======================================
  Files          14       14
  Lines         209      209
  Branches       30       30
=======================================
  Hits          208      208
  Partials        1        1

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 1faf3c9...0727407. Read the comment docs.


python3Packages.python-gitlab: 2.9.0 -> 2.10.0

Motivation for this change
Update to latest upstream release 2.10.0
Change log: https://github.com/python-gitlab/python-gitlab/releases/tag/v2.10.0
Things done

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

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

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 133452 run on x86_64-linux 1

4 packages built:

python38Packages.criticality-score
python38Packages.python-gitlab
python39Packages.criticality-score
python39Packages.python-gitlab


getuser() fails in containers

Hi @PalNilsson
In singularity containers the user name and UID should be the same inside as outside.
However, in k8s pods, the UID is defined as part of the pod YAML spec. It can be any arbitrary UID (but may need to match a certain range to comply with pod security policy on clusters.)   And the user name is equally arbitrary and meaningless as the UID, so generally it is left out to avoid redundancy.
Anyway in order to add full container support and be able to run in k8s (and to some extent Docker as well), applications should not strictly require running with a named user account. There is only an arbitrary UID:
bash-4.2$ whoami
whoami: cannot find name for user ID 10000
bash-4.2$ id
uid=10000 gid=10000 groups=10000,1000

Currently the pilot fails in this situation:
---- Ready to run pilot ----

2020-12-16 21:35:50,110 [wrapper] ==== pilot stdout BEGIN ====
2020-12-16 21:35:50,122 [wrapper] pilotpid: 3345
2020-12-16 21:35:53,016 | INFO     | MainThread          | pilot.util.auxiliary             | pilot_version_banner      | ****************************************
2020-12-16 21:35:53,016 | INFO     | MainThread          | pilot.util.auxiliary             | pilot_version_banner      | ***  PanDA Pilot version 2.9.3 (10)  ***
2020-12-16 21:35:53,016 | INFO     | MainThread          | pilot.util.auxiliary             | pilot_version_banner      | ****************************************
2020-12-16 21:35:53,016 | INFO     | MainThread          | pilot.util.auxiliary             | pilot_version_banner      |
2020-12-16 21:35:53,016 | INFO     | MainThread          | pilot.util.auxiliary             | pilot_version_banner      | pilot is running in a VM
2020-12-16 21:35:53,016 | INFO     | MainThread          | pilot.util.auxiliary             | display_architecture_info | architecture information:
2020-12-16 21:35:53,184 | INFO     | MainThread          | pilot.util.auxiliary             | display_architecture_info |
LSB Version:	:core-4.1-amd64:core-4.1-noarch
Distributor ID:	CentOS
Description:	CentOS Linux release 7.8.2003 (Core)
Release:	7.8.2003
Codename:	Core
2020-12-16 21:35:53,185 | INFO     | MainThread          | pilot.util.auxiliary             | pilot_version_banner      | ****************************************
2020-12-16 21:35:53,216 | DEBUG    | MainThread          | pilot.util.https                 | https_setup               | User-Agent: pilot/2.9.3 (10) (Python 2.7.5; Linux x86_64)
2020-12-16 21:35:53,218 | WARNING  | MainThread          | pilot.util.https                 | https_setup               | Python version <2.7.9 lacks SSL contexts -- falling back to curl
2020-12-16 21:35:53,235 | WARNING  | MainThread          | pilot.info.dataloader            | load_url_data             | cache file=/pilotdir/PanDA_Pilot2_3345_1608154553/queuedata.json is not available: [Errno 2] No such file or directory: '/pilotdir/PanDA_Pilot2_3345_1608154553/queuedata.json' .. skipped
2020-12-16 21:35:53,235 | INFO     | MainThread          | pilot.info.dataloader            | load_url_data             | [attempt=1/3] loading data from url=http://pandaserver.cern.ch:25085/cache/schedconfig/CA-VICTORIA-K8S-TEST-T2.all.json
2020-12-16 21:35:53,605 | INFO     | MainThread          | pilot.info.dataloader            | load_url_data             | saved data from "http://pandaserver.cern.ch:25085/cache/schedconfig/CA-VICTORIA-K8S-TEST-T2.all.json" resource into file=/pilotdir/PanDA_Pilot2_3345_1608154553/queuedata.json, length=3.6Kb
2020-12-16 21:35:53,605 | WARNING  | MainThread          | pilot.info.dataloader            | load_url_data             | cache file=/pilotdir/PanDA_Pilot2_3345_1608154553/cric_pandaqueues.json is not available: [Errno 2] No such file or directory: '/pilotdir/PanDA_Pilot2_3345_1608154553/cric_pandaqueues.json' .. skipped
2020-12-16 21:35:53,606 | INFO     | MainThread          | pilot.info.dataloader            | load_url_data             | [attempt=1/1] loading data from file=/cvmfs/atlas.cern.ch/repo/sw/local/etc/cric_pandaqueues.json
2020-12-16 21:35:54,188 | INFO     | MainThread          | pilot.info.dataloader            | load_url_data             | saved data from "/cvmfs/atlas.cern.ch/repo/sw/local/etc/cric_pandaqueues.json" resource into file=/pilotdir/PanDA_Pilot2_3345_1608154553/agis_schedconf.cvmfs.json, length=1184.0Kb
2020-12-16 21:35:54,236 | INFO     | MainThread          | pilot.info.configinfo            | resolve_queuedata         | queuedata: following keys will be overwritten by config values: {'maxwdir_broken': '14336 MB', 'es_stageout_gap': 601}
2020-12-16 21:35:54,237 | DEBUG    | MainThread          | pilot.info.queuedata             | __init__                  | Final parsed QueueData content:
 acopytools={u'pr': [u'rucio', u'xrdcp'], u'write_lan': [u'rucio'], u'read_lan': [u'rucio', u'xrdcp'], u'pw': [u'rucio']}
 acopytools_schemas={}
 allow_lan=True
 allow_wan=False
 appdir=
 aprotocols=None
 astorages={u'pr': [u'CA-VICTORIA-WESTGRID-T2_DATADISK', u'CA-VICTORIA-WESTGRID-T2_LOCALGROUPDISK', u'CA-VICTORIA-WESTGRID-T2_SCRATCHDISK'], u'es_events': [u'CERN-PROD_ES'], u'read_lan': [u'CA-VICTORIA-WESTGRID-T2_DATADISK', u'CA-VICTORIA-WESTGRID-T2_LOCALGROUPDISK', u'CA-VICTORIA-WESTGRID-T2_SCRATCHDISK'], u'pw': [u'CA-VICTORIA-WESTGRID-T2_DATADISK', u'CA-VICTORIA-WESTGRID-T2_LOCALGROUPDISK', u'CA-VICTORIA-WESTGRID-T2_SCRATCHDISK'], u'write_lan': [u'CA-VICTORIA-WESTGRID-T2_DATADISK', u'CA-VICTORIA-WESTGRID-T2_LOCALGROUPDISK', u'CA-VICTORIA-WESTGRID-T2_SCRATCHDISK']}
 catchall=
 container_options=
 container_type={}
 copytools={u'xrdcp': {u'setup': u'$VO_ATLAS_SW_DIR/local/xrootdsetup.sh'}, u'rucio': {u'setup': u''}}
 corecount=8
 direct_access_lan=False
 direct_access_wan=False
 es_stageout_gap=7200
 is_cvmfs=True
 maxinputsize=20000
 maxrss=32000
 maxtime=86400
 maxwdir=150000
 name=CA-VICTORIA-K8S-TEST-T2
 platform=
 pledgedcpu=0
 resource=CA-VICTORIA-K8S-TEST-T2
 site=CA-VICTORIA-WESTGRID-T2
 state=ACTIVE
 status=test
 timefloor=3600
 type=production
 use_pcache=False

2020-12-16 21:35:54,241 | WARNING  | MainThread          | pilot.info.dataloader            | load_url_data             | cache file=/pilotdir/PanDA_Pilot2_3345_1608154553/cric_ddmendpoints.json is not available: [Errno 2] No such file or directory: '/pilotdir/PanDA_Pilot2_3345_1608154553/cric_ddmendpoints.json' .. skipped
2020-12-16 21:35:54,241 | INFO     | MainThread          | pilot.info.dataloader            | load_url_data             | [attempt=1/1] loading data from file=/cvmfs/atlas.cern.ch/repo/sw/local/etc/cric_ddmendpoints.json
2020-12-16 21:35:54,274 | INFO     | MainThread          | pilot.info.dataloader            | load_url_data             | saved data from "/cvmfs/atlas.cern.ch/repo/sw/local/etc/cric_ddmendpoints.json" resource into file=/pilotdir/PanDA_Pilot2_3345_1608154553/cric_ddmendpoints.json, length=2186.6Kb
2020-12-16 21:35:54,379 | INFO     | MainThread          | __main__                         | main                      | pilot arguments: Namespace(abort_job=<threading._Event object at 0x7f7455668510>, allow_other_country=False, allow_same_user=False, cacert=None, capath=None, cleanup=True, country_group='', debug=True, graceful_stop=<threading._Event object at 0x7f7455668450>, harvester=False, harvester_datadir='', harvester_eventstatusdump='', harvester_submitmode='PULL', harvester_workdir='', harvester_workerattributes='', hpc_mode='manytoone', hpc_resource='', input_dir='', job_aborted=<threading._Event object at 0x7f7455668550>, job_label='managed', job_status={}, jobtype='', kill_time=0, lifetime=324000, mainworkdir='/pilotdir/PanDA_Pilot2_3345_1608154553', nopilotlog=False, output_dir='', pilot_user='ATLAS', port=25443, queue='CA-VICTORIA-K8S-TEST-T2', queuedata_url='', resource=None, resource_type='SCORE_HIMEM', retrieve_next_job=True, signal=None, signal_counter=0, site=None, sourcedir='/pilotdir/atlas_6uTEAmt0', timing={'1': {'PILOT_MULTIJOB_START_TIME':<PHONE_NUMBER>.015654}, '0': {'PILOT_START_TIME':<PHONE_NUMBER>.015652}}, update_server=True, url='https://pandaserver.cern.ch', use_https=True, verify_proxy=False, version_tag='PR', workdir='/pilotdir', workflow='generic', working_group='')
Traceback (most recent call last):
  File "pilot2/pilot.py", line 557, in <module>
    trace = main()
  File "pilot2/pilot.py", line 85, in main
    workflow = __import__('pilot.workflow.%s' % args.workflow, globals(), locals(), [args.workflow], 0)  # Python 3, -1 -> 0
  File "/pilotdir/atlas_6uTEAmt0/pilot2/pilot/workflow/generic.py", line 32, in <module>
    from pilot.control import job, payload, data, monitor
  File "/pilotdir/atlas_6uTEAmt0/pilot2/pilot/control/monitor.py", line 131, in <module>
    def get_process_info(cmd, user=getuser(), args='aufx', pid=None):
  File "/usr/lib64/python2.7/getpass.py", line 158, in getuser
    return pwd.getpwuid(os.getuid())[0]
KeyError: 'getpwuid(): uid not found: 10000'
2020-12-16 21:35:54,662 [wrapper] ==== pilot stdout END ====
2020-12-16 21:35:54,673 [wrapper] ==== wrapper stdout RESUME ====
2020-12-16 21:35:54,685 [wrapper] Pilot exit status: 1

Even on quite old linuxes , either UID or name can be used in ps -u
       -u userlist     Select by effective user ID (EUID) or name.
                       This selects the processes whose effective user name or ID is in userlist. The effective user ID describes the user whose file
                       access permissions are used by the process (see geteuid(2)). Identical to U and --user.

so this code should work fine on both traditional systems and k8s containers if UID is used instead of user name, fixing the issue:
https://github.com/PanDAWMS/pilot2/blob/master/pilot/control/monitor.py#L131
Thanks!

Hi. Thanks Ryan. Fixed in the dev pilot. The 'funny' thing is that the function get_process_info() is not even called - but since there's a function call (getuser()) in its definition, that function gets called anyway at import time! I removed that from the code and replaced the user name with uid as you suggested. At some point the get_process_info() will be used so I fixed it rather than just removing it. Cheers

Great thanks @PalNilsson  ! Do you have an estimate when the prod pilot will have this update?
I think I get the emails whenever a new pilot version is released.

Great thanks @PalNilsson  ! Do you have an estimate when the prod pilot will have this update?
I think I get the emails whenever a new pilot version is released.

Hi. I'm aiming for next Monday. Cheers

Hi. I'm aiming for next Monday. Cheers


Formating of input data

Hi,
I really like the idea behind SPRITE and TISSUE and want to try it with my own data.
A part I am unsure about is the the formating of the input data.
For example in the tests/data you seem to use count data for the spatial and normalized + log1p for the scRNA reference.
In the SPAGE tutorial the authors use
def Log_Norm_cpm(x):
    return np.log(((x/np.sum(x))*1000000) + 1) and

def Log_Norm_spatial(x):
    return np.log(((x/np.sum(x))*np.median(cell_count)) + 1)

How much does this matter in your expirience and what would be your recommendation?
Thank you!

In my experience, whether to normalize the spatial data doesn't seem to matter too much when it comes to performance. Either should work for TISSUE or SPRITE.
In the TISSUE and SPRITE manuscripts, we based our normalization choice on empirical results showing generally better performance from an earlier benchmarking effort, which might also be helpful to you.

I was unfamilair with that supplement ty!


Modify exceptions when a whitelist may be present

When a NotFoundException is thrown by a method which may be under whitelist restriction, the exception is intercepted and the error message is modified to indicate the possible problem to the user.
Still to come is integrating into system tests to help keep this up to date and alert us when a whitelist is removed.

@michaelbausor @dwsupplee PTAL.
All the currently whitelisted methods are tested, save deleteSnapshot, which I can't really test accurately seeing as I can't create a resource to delete. :)
The environment variable GOOGLE_CLOUD_PHP_TESTS_WHITELIST_KEY_PATH must be set and pointed at a keyfile which is billing-whitelisted, but not feature-whitelisted.

@dwsupplee @michaelbausor refactored some things. PTAL


FIX: install the latest pip

Installing the latest pip to stabilise the Docker image build.

Thanks @cgeoffroy


Help me design / write a generic HTTP routing helper library for the http_s struct.

Are you yet interested by this subject. Doing C HTTP framework is one of my favorite subject with c10k problem and asynchronous design in C

https://github.com/thierry-f-78/afcgi
https://github.com/thierry-f-78/templates
https://github.com/thierry-f-78/multipart-parser
haproxy contributor with lua integration and some other things

I just see your project, and router design is an interesting subject. I start to brainstorm about design. the following is preliminary and not terminated.
/*
HTTP Router API

The router is designed to be simple with a concise syntax for easy adoption by users. It should also be performant during execution.

The implementation is composed of several stages:

1. Router Configuration Management
   This includes functions and macros that allow developers to easily define their routes. This section comprises:
   * A path definition language with support for variable parameters
   * A method definition system
   * A route definition system

2. Compilation
   A system for compiling the "configuration" that provides optimal structures for quickly finding paths.

Vocabulary:
* path: The URL path, e.g., /path/to/api/method
* segment: In a path, it's the part between two "/"

General features and base concepts:

1. Route Definition
   * HTTP Method (GET, POST, PUT, DELETE, etc.)
   * Path with support for:
     a. Static segments ("/users", "/api")
     b. Dynamic segments ("/:id", "/:username")
     c. Regular expressions for precise matching
   * Handler (function to execute when the route is matched)

2. Route Grouping
   * Ability to define a common prefix for a set of routes
   * Application of common middlewares to a group of routes
   * Support for hierarchization (sub-routers)

3. Route Parameters
   * Capture of dynamic path segments
   * Definition of constraints on parameters (e.g., id must be numeric)
   * Optional parameters

4. HTTP Method Management
   * Definition of routes for specific methods
   * Support for routes responding to multiple methods
   * Default method (e.g., GET if not specified)

5. Content Negotiation
   * Definition of routes based on Accept headers
   * Ability to specify multiple content types for the same route
   * Content type should be optional

6. Middlewares
   * Definition of intermediate functions to execute before/after the main handler
   * Ability to apply middlewares globally, by group, or by route

7. Error Handling and Default Cases
   * Definition of handlers for 404 (Not Found), 500 (Internal Server Error), and 405 (Method Not Allowed) errors
   * Default route (fallback) if no other route matches

8. Priorities and Matching Order
   * By default, static routes have priority over dynamic routes
   * Ability to manually define the priority of a route (optional)

Segment definition grammar:

segment = static_segment | dynamic_segment ;
static_segment = ["::", ] { character - ":" } ;
dynamic_segment = ":", name, [":", match] ;
name = (letter | "_"), { letter | digit | "_" } ;
match = ("~", regexp) | ("%", wildcard) | type_match | enum_match | date_match | time_match | hex_match | range_match ;
type_match = "int32" | "uint32" | "int64" | "uint64" | "bool" | "b64" | "b64i" | "uuid" | "email" | "slug" ;
hex_match = ("hex" | "hexl" | "hexu"), ["(", length, ")"] ;
regexp = ? PCRE compatible regular expression ? ;
wildcard = ? simplified wildcard pattern, e.g., "*" for any characters, "?" for single character ? ;
length = digit - "0", { digit } ;
enum_match = "enum", "(", word_list, ")" ;
word_list = word, { ",", word } ;
word = (letter | digit | "-" | "_"), { letter | digit | "-" | "_" } ;
date_match = "date", ["(", date_format, ")"] ;
time_match = "time", ["(", time_format, ")"] ;
range_match = "range", "(", range_list, ")" ;
range_list = range, { ",", range } ;
range = single_value | open_range | closed_range ;
single_value = number ;
open_range = (number, "-") | ("-", number) ;
closed_range = number, "-", number ;
number = digit, { digit }, [".", { digit }] ;
letter = "A" | "B" | "C" | ... | "Z" | "a" | "b" | "c" | ... | "z" ;
digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
character = ? any Unicode character ? ;
date_format = ? date format string ? ;
time_format = ? time format string ? ;

Where:

~ : regular expression that must match the entire string
% : wildcard that must match the entire string
hex : case-insensitive hexadecimal with or without length
hexl : lower case hexadecimal with or without length
hexu : upper case hexadecimal with or without length
int32, int64 : signed integer of the specified size
uint32, uint64 : unsigned integer of the specified size
bool : true or false
b64 : valid base64 [A-Za-z0-9+/=]
b64i : internet base64 [A-Za-z0-9_-]

Examples of path segments:
(as provided in the original text)
*/

// Path structure
struct Path {
    // Implementation details
};

// Function to create a path
struct Path* path_create();

// Generic and fast function to create a prefix
// Can return an error in the prefix definition
struct PathError* path_add_prefix(struct Path* path, const char* prefix);

// Function to add a static segment
// Can return an error if the segment contains forbidden characters
struct PathError* path_add_static(struct Path* path, const char* value);

// Function to add a simple variable segment
void path_add_variable(struct Path* path, const char* name);

// Function to add a variable segment with validation
void path_add_variable_with_validator(struct Path* path, const char* name, bool (*validator)(const char* value, char** error_message));

// Function to add a segment with regular expression
struct PathError* path_add_regex(struct Path* path, const char* name, const char* pattern);

// Basic functions
struct PathError* path_add_static(struct Path* path, const char* segment);
struct PathError* path_add_dynamic(struct Path* path, const char* name);

// Base types
struct PathError* path_add_int32(struct Path* path, const char* name);
struct PathError* path_add_uint32(struct Path* path, const char* name);
struct PathError* path_add_int64(struct Path* path, const char* name);
struct PathError* path_add_uint64(struct Path* path, const char* name);
struct PathError* path_add_bool(struct Path* path, const char* name);

// Special types
struct PathError* path_add_uuid(struct Path* path, const char* name);
struct PathError* path_add_email(struct Path* path, const char* name);
struct PathError* path_add_slug(struct Path* path, const char* name);

// Base64
struct PathError* path_add_base64(struct Path* path, const char* name);
struct PathError* path_add_base64_url(struct Path* path, const char* name);

// Hexadecimal
struct PathError* path_add_hex(struct Path* path, const char* name, int length);
struct PathError* path_add_hexl(struct Path* path, const char* name, int length);
struct PathError* path_add_hexu(struct Path* path, const char* name, int length);

// Regex and Wildcard
struct PathError* path_add_regex(struct Path* path, const char* name, const char* pattern);
struct PathError* path_add_wildcard(struct Path* path, const char* name, const char* pattern);

// Enum
struct PathError* path_add_enum(struct Path* path, const char* name, const char** values, int count);

// Date and Time
struct PathError* path_add_date(struct Path* path, const char* name, const char* format);
struct PathError* path_add_time(struct Path* path, const char* name, const char* format);

// Range
struct PathError* path_add_range(struct Path* path, const char* name, const struct RangeSegment* ranges, int count);

// Utility function to create a path from a string
struct Path* path_from_string(const char* prefix);

// Function to free the memory of a path
void path_free(struct Path* path);

// HTTP Methods
struct HttpMethods {
    const char **methods;
    int count;
};

// Macro for creating HttpMethods
#define METH(...) (struct HttpMethods){(const char*[]){__VA_ARGS__}, sizeof((const char*[]){__VA_ARGS__})/sizeof(const char*)}

// Function to create HttpMethods
struct HttpMethods* method_create();

// Function to create and pre-fill HttpMethods
struct HttpMethods* method_fill(int nb, ...);

// Function to add a method to HttpMethods
struct Error* method_add(struct HttpMethods* methods, const char* method);

// Content Types
struct ContentTypes {
    const char **types;
    int count;
};

struct ContentTypePattern;

// Structure to represent a list of Content-Type patterns
struct ContentTypePatternList {
    struct ContentTypePattern** patterns;
    int count;
};

// Creates a Content-Type pattern from a string
struct ContentTypePattern* content_type_pattern_create(const char* pattern);

// Creates a list of Content-Type patterns from a string
struct ContentTypePatternList* content_type_pattern_list_create(const char* patterns);

// Router structure
struct Router {
    // Implementation details
};

// Router error structure
struct RouterError {
    // Implementation details
};

// Router creation and destruction
struct Router* router_create();
void router_free(struct Router* router);

// Default configuration functions for a router
struct RouterError* router_set_default_method(struct Router* router, struct HttpMethods methods, HandlerFunc handler);
void router_set_error_handler(struct Router* router, int error_code, ErrorHandlerFunc handler);
void router_set_fallback_handler(struct Router* router, HandlerFunc handler);
void router_add_middleware(struct Router* router, MiddlewareFunc middleware);

// Adding routes
struct RouterError* router_add_route(struct Router* router, struct HttpMethods methods, const char* prefix, HandlerFunc handler);
struct RouterError* router_add_route_path(struct Router* router, struct HttpMethods methods, struct Path* path, HandlerFunc handler);

// Adding sub-routers
struct RouterError* router_add_subrouter(struct Router* parent, struct Router* child, const char* prefix);
struct RouterError* router_add_subrouter_path(struct Router* parent, struct Router* child, struct Path* path);

// Content management
struct RouterError* router_add_content_route(struct Router* router, struct HttpMethods methods, const char* prefix, const char* content_type_patterns, HandlerFunc handler);
struct RouterError* router_add_content_prefix(struct Router* router, struct HttpMethods methods, struct Path* path, const char* content_type_patterns, HandlerFunc handler);

// Matching and dispatching
struct MatchResult* router_match(struct Router* router, const char* method, const char* path, const char* content_type);
void router_dispatch(struct Router* router, struct MatchResult* result, struct Request* request, struct Response* response);

And exemple usage (generated by IA) :
#include <stdio.h>
#include "http_router.h"

// Example handler functions
void get_users(struct Request* req, struct Response* res) {
    // Implementation
}

void create_user(struct Request* req, struct Response* res) {
    // Implementation
}

void get_user_by_id(struct Request* req, struct Response* res) {
    // Implementation
}

void update_user(struct Request* req, struct Response* res) {
    // Implementation
}

void delete_user(struct Request* req, struct Response* res) {
    // Implementation
}

void get_article(struct Request* req, struct Response* res) {
    // Implementation
}

void api_fallback(struct Request* req, struct Response* res) {
    // Implementation for handling unmatched routes
}

int main() {
    struct Router* router = router_create();
    if (!router) {
        fprintf(stderr, "Failed to create router\n");
        return 1;
    }

    struct RouterError* err;

    // Example 1: Simple static route
    err = router_add_route(router, METH("GET"), "/hello", hello_world);
    if (err) {
        fprintf(stderr, "Failed to add route: %s\n", err->message);
        // Handle error
    }

    // Example 2: Route with dynamic segment using concise syntax
    err = router_add_route(router, METH("GET"), "/users/:id:uint64", get_user_by_id);
    if (err) {
        // Handle error
    }

    // Example 3: Multiple HTTP methods for the same route with content negotiation
    err = router_add_content_route(router, METH("GET", "POST"), "/users", "application/*", NULL);
    if (err) {
        // Handle error
    }

    err = router_add_content_route(router, METH("GET"), "/users", "application/json", get_users);
    if (err) {
        // Handle error
    }

    err = router_add_content_route(router, METH("POST"), "/users", "application/json", create_user);
    if (err) {
        // Handle error
    }

    // Example 4: Route with multiple dynamic segments and type constraints
    err = router_add_route(router, METH("GET"), "/blog/:year:int32/:month:range(1-12)/:slug:slug", get_article);
    if (err) {
        // Handle error
    }

    // Example 5: Route with hexadecimal constraint
    err = router_add_route(router, METH("GET"), "/resources/:id:hex(32)/read", get_resource);
    if (err) {
        // Handle error
    }

    // Example 6: Sub-router for API versioning
    struct Router* api_v1 = router_create();
    struct Router* api_v2 = router_create();

    // Add routes to api_v1
    router_add_route(api_v1, METH("GET"), "/users", get_users_v1);
    router_add_route(api_v1, METH("POST"), "/users", create_user_v1);

    // Add routes to api_v2
    router_add_route(api_v2, METH("GET"), "/users", get_users_v2);
    router_add_route(api_v2, METH("POST"), "/users", create_user_v2);

    // Add sub-routers to main router
    router_add_subrouter(router, api_v1, "/api/v1");
    router_add_subrouter(router, api_v2, "/api/v2");

    // Example 7: Setting a fallback handler for unmatched routes
    router_set_fallback_handler(router, api_fallback);

    // Example 8: Adding middleware to the router
    router_add_middleware(router, log_request);
    router_add_middleware(router, authenticate_user);

    // Example 9: Route with enum constraint
    err = router_add_route(router, METH("GET"), "/items/:category:enum(electronics,books,clothing)", get_items_by_category);
    if (err) {
        // Handle error
    }

    // Example 10: Route with wildcard
    err = router_add_route(router, METH("GET"), "/files/:path:%*", serve_file);
    if (err) {
        // Handle error
    }

    // Clean up
    router_free(api_v1);
    router_free(api_v2);
    router_free(router);

    return 0;
}

Are you interested by this job ? can I continue the brainstorm ?

Hi,
Thank you so much for both your interest in contributing and detailed suggestion.
That's a lot of beautiful work that you did and a lot for me to go over.
My biggest things to note:

Development Repo Updates
Dependencies
API design
Naming Conventions
Argument Types

Development Repo Updates
Please allow me to point out that edge development for the facil.io functionality, including the HTTP layer, is now performed in the repo: https://github.com/facil-io/cstl
The new repo represents the transition to version 0.8.x.
Dependencies
The project avoids external dependencies when possible, especially dependencies that might raise licensing issues.
For this reason RegEx cannot be accepted (unless we roll our own and the RegEx Specification License allows us to do so while licensing our code under MIT / ISC).
For now, I suggest that we limit our URL section parser to glob matching that is already implemented, or perhaps rolling our own slightly expended approach.
By the way, does :year:int32 follow a convention of some type? Is it something already seen in the wild?
API
User experience is highly values in the facil.io approach. Everything should be easy.
For this reason, I would like to minimize the number of possible functions and provide named arguments for functions with more than 3 or 4 arguments.
Basically I hope to have as little as a single function that controls the router:
typedef struct fio_http_router_s fio_http_router_s;
/**
* Creates a route to URL and returns a pointer to a router object starting at that URL (sub-router).
*
* The sub-router allows calls to `fio_http_router_map` to treat `url` as the root of any new routes.
*
* The sub-router may be discarded or ignored, but it MUST NOT be freed manually (as it belongs to the main router object).
*/
fio_http_router_s *  fio_http_router_map(fio_http_router_s *, const char * url, fio_http_router_options_s opt);

/** named arguments helper for the `fio_http_router_map` function. */
#define fio_http_router_map(router, url, ...) fio_http_router_map(router, url, (fio_http_router_options_s){__VA_ARGS__})

/* and, of course, init/destruct functions: */
fio_http_router_s * fio_http_router_new(void);
void fio_http_router_free(fio_http_router_s *);
void fio_http_router_destroy(fio_http_router_s *);
#define FIO_ROUTER_INIT {0}

The options passed should include callbacks for GET, POST etc', as well as a static file callback and a catch-all callback (in case of non-standard methods).
The sub_router you mention should be detected automatically by the fio_http_router_map function as it breaks down the URL to sections and creates sub-routers for each section
As for the content-type property as a router controller – I think that's a super interesting idea, but in general I haven't seen much use for it in the wild. If this is a use-case you encountered, we can definitely add it while keeping the NULL content-type as a catch-all.
Naming Conventions
Please note that all names in facil.io use snake_case and types have a designated suffix that depends on what they refer to (i.e., _s for struct, _u for union, _e for enum).
We avoid the struct and enum keywords where possible by using typedef, The suffix should be enough to indicate if this is a struct, a union, an enum, or anything else.
To maintain name space integrity and avoid the risk of name collisions (especially with possible user code), the names of types and functions should follow the <library>_<module>_<function/type> convention.
The library is always fio for facil.io.
So, in this case, I would expect struct Router to become a typedef with the name fio_http_router_s.
Argument Types
The moment we accept dynamic URL segments, we need to discuss the types we will use to store this data and how it would be made available.
I suggest that we adopt the FIOBJ type system, but if you have a better idea, I'm all ears.

Again, thank you so much and I hope we can make this work :)

Please allow me to point out that edge development for the facil.io functionality, including the HTTP layer, is now performed in the repo: https://github.com/facil-io/cstl
The new repo represents the transition to version 0.8.x.

Okay, no problem.

For this reason RegEx cannot be accepted (unless we roll our own and the RegEx Specification License allows us to do so while licensing our code under MIT / ISC).

I'm thinking of PCRE regex, but I'm not aware of the license issues. I don't think including a third-party library from the system (without providing the source) causes license problems. this library is not embedded in the source code, its just a compilation dependancy. (look in haproxy, embedding PCRE it juste changing compilation line https://github.com/haproxy/haproxy/blob/8427c5b5421a93ee29170fb6ca3093478acd7ab7/Makefile#L770)
Note that "libc" regex exists (https://www.gnu.org/software/libc/manual/html_node/Regular-Expressions.html). These regex functions are slower than PCRE, but they exist, are provided with libc, and are POSIX specified.
The compilation with one library or the other could be defined at compilation time by a define.

By the way, does :year:int32 follow a convention of some type? Is it something already seen in the wild?

You can find the : notation in some frameworks:

https://expressjs.com/en/guide/routing.html#route-parameters
https://guides.rubyonrails.org/routing.html#dynamic-segments

We chose the : character because it's a reserved character and it's forbidden in URLs. Note that : can be used in a URL if it's URL-encoded like %3A. This case is processed using :: to designate : at the start and handle uri like GET /%3Aaction.
The extension : <type-description> is personal brainstorming.
There are other examples of routers:

using <> : https://flask.palletsprojects.com/en/2.3.x/quickstart/#variable-rules
using {} : https://learn.microsoft.com/en-us/aspnet/core/fundamentals/routing?view=aspnetcore-7.0
using {} : https://symfony.com/doc/current/routing.html#route-parameters

User experience is highly values in the facil.io approach. Everything should be easy.

I absolutely agree. And a good documentation with many examples will be welcome. The minimum code for using my proposition (disregarding naming, which will be changed later) is:
   router = router_create();
   err = router_add_route(router, METH("GET", "POST"), "/resources/:id:hex(32)/read", get_resource);

Methods are processed by macros, or could be specified as a comma-separated string with a parser like other resources.
URL path and segments are defined below
Content-type is not mandatory

This contains the minimum information to design a simple project. Other functions are used for advanced usage. Look at the example at the end of my previous post.
Perhaps the functions exposed in the API should be separated into two parts. One part that presents simple and concise functions that allow handling most simple projects, and another part that presents advanced functions that also allow handling complex projects.

Calling middleware functions is absolutely necessary to process common functions easily, like authentication, access control, adding CSP header, processing session coockie, loading user language, ...
Allowing the user to use their own URL parameter parser is also very important. Parameter parsing is the first security consideration in web applications, and many applications will use homemade formats (for example, the format of Google's reCAPTCHA tokens: g-recaptcha-response).

The sub_router you mention should be detected automatically by the fio_http_router_map function as it breaks down the URL to sections and creates sub-routers for each section

Sub-routers are strongly used to configure complex applications with inheritance, like this:
The main router splits the application into 4 parts, processed by 4 teams:

/api/v1
/api/v2
/app
/static
Each part is processed by a specific file dedicated to the action. Only the sub-router is given to the specific processor. Below is a simple example (in pseudo-code), but we can think of a registration system: during initialization, each part of the program registers its own router on a specific URL.

main.c:

void main() {
   router *v1;
   router *v2;
   router *app
   router *static
   router *main

   v1 = router_create();
   v2 = router_create();
   app = router_create();
   static = router_create();

   main = router_create();
   router_add_route(router, METH("GET"), "/heath-check, get_health_check);
   router_add_subrouter(router, v1, "/v1")
   router_add_subrouter(router, v2, "/v2")
   router_add_subrouter(router, app, "/app")
   router_add_subrouter(router, static, "/static")

   init_v1(v1);
   init_v1(v2);
   init_v1(app);
   init_v1(static);
}

v1.c:
void init_v1(r *router) {
   router_add_route(r, METH("GET"), "/users, get_users);
}

v2.c:
void init_v2(r *router) {
   router_add_route(r, METH("GET"), "/users, get_users);
}

app.c:
void init_app(r *router) {
   router_add_route(r, METH("GET"), "/login, get_login);
   router_add_route(r, METH("POST"), "/login, post_login);
}

static.c
void init_static(r *router) {
   router_add_route(r, METH("GET"), "/, get_static_content);
}

Note, I've already seen this case at a client's (a very large publicly traded company). Each team handles a part of the application, and the routing was done by the application server (old C technology). Its current usage with other framework of other languages.

As for the content-type property as a router controller – I think that's a super interesting idea, but in general I haven't seen much use for it in the wild.

Content-type based routing is necessary for compatible APIs. POST with JSON is processed by a specific handler, while POST with form-data is processed by another one.

If this is a use-case you encountered, we can definitely add it while keeping the NULL content-type as a catch-all.

NULL content-type is handled. Alternative functions without the content-type parameter could be exposed (but this would be one more function).

Naming Conventions
…
So, in this case, I would expect struct Router to become a typedef with the name fio_http_router_s.

Okay, no problem. It's a detail to rename all of this.

Dès que nous acceptons des segments d'URL dynamiques, nous devons discuter des types que nous utiliserons pour stocker ces données et de la manière dont elles seront rendues disponibles.

Absolutely, for me, the most important thing is defining an API, and then types.
Obviously, types used by the API are different from runtime types, which must be optimized for speed.
All the router/subrouter must be solved as unique descriptor in a sort of compilation phase.
Quickly, I'm thinking of some TREEs with one root per METHOD. Each tree node contains:

The tree node type (segment or parser)
List of middleware to execute
List of children to continue browsing
Default action is exists

Closing, discussion moved to: https://github.com/facil-io/cstl/issues/26


Hello world

Hello world

In this feature update:

[x] Create a new Rails app called 'hello-rails-react'.
[x] Initialize your project with Git.
[x] Set up your project with webpacker the react-rails gems as describe in the previous lesson's tutorial.
[x] Make sure that project has a Postgres database set up.
[x] Create a table for storing messages and create 5 different greetings.
[x] Create an API endpoint that selects a random greeting from table
[x] Create a static view that will be the root of app.
[x] Create the App component with react-router and render it in static view.
[x] Create the Greeting component that will display a greeting. Set it up as a route in App component.
[x] Create a store, an action and a reducer that will connect to API endpont to get the random greeting.
[x] Display the random greeting in Greeting component.

Thanks @Meltrust


Quick Change to Addon.xml

Could you add this
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
So that my Version Scraper at: https://imreallyshiny.github.io/ietvnow can auto-grab the correct version (Its set to index 2 for all my other addons as my addons.xml files all have the code above which contains version="" aswell)

Will do J


Deep Link to Files Tab

How can I get the information to create a deep link to a channel's Files tab? I tried to retrieve the tabs from a channel using Graph Api (List tabs in channel), but the Files tab is missing from the response.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 45541337-ecd7-5cf6-cbe4-3f0d2f39aa79
Version Independent ID: 6b4203f0-2844-06c9-eaa3-9cc03e6f76c0
Content: Create deep links - Teams
Content Source: msteams-platform/concepts/build-and-test/deep-links.md
Product: msteams
GitHub Login: @clearab
Microsoft Alias: anclear

@vladschiop Currently we do not have this documented anywhere. This is in our backlog and we are working on it.

@Gousia-MSFT is not implemented or just not documented? Thank you!

@vladschiop It is just not documented. Here is a sample format for deeplink to files.
https://teams.microsoft.com/l/file/5E0154FC-F2B4-4DA5-8CDA-F096E72C0A80?tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47&fileType=pptx&objectUrl=https%3A%2F%2Fmicrosoft.sharepoint.com%2Fteams%2FActionPlatform%2FShared Documents%2FFC7- Bot and Action Infra%2FKaizala Actions in Adaptive Cards -<EMAIL_ADDRESS>This is the serialization of this object:
{
tenantId: “72f988bf-86f1-41af-91ab-2d7cd011db47”,
filetype: = “pptx”,
objectUrl: “https://microsoft.sharepoint.com/teams/ActionPlatform/Shared Documents/FC7- Bot and Action Infra/Kaizala Actions in Adaptive Cards - Deck.pptx”,
baseUrl: “https://microsoft.sharepoint.com/teams/ActionPlatform”,
serviceName: “teams”,
threadId: =<EMAIL_ADDRESS>groupId: “ae063b79-5315-4ddb-ba70-27328ba6c31e”
}

Hello, is there a way to open new chat window, I mean blank window?


Add label options to loadBalancerService

Should be able to set scheduling options and labels on load balancer services.

labels are not working on load balancer services (#1325)

Also environment variables would be nice!

@rschmukler what would you do with environment variables on a balancer?

Is this closed or still a WIP?

@vincent99 sorry on the delay, the environment variables would be useful if you are using something like  jwilder/nginx-proxy to handle mapping VHOSTs.
So for example:
Node-1 has nginx-proxy listening on 80 -> uses environment variable to forward to appropriate load balancer (say you have a load balancer for each service running on a node) which then forwards to the appropriate service.

So you can do that if you run nginx-proxy as a (regular) Service.  But "Load Balancer Services" are specifically running our agent image with haproxy in it, and it does not respond to any environment variables.
Separately, we are working on Host header and Request URI-based targeting as first-class options in #544.

@vincent99 that looks good to me. Right now I am just running nginx-proxy and then have a super simple haproxy running on the same machine (with env variable), which then forwards to the load balancer.
The environment variables are actually parsed by the nginx-proxy image (which is monitoring the docker socket), so there isn't any responding to environment variables required, if it is present nginx-proxy will just pick up on it and take care of the appropriate networking.
#544 will address my use-case fully, so big +1 for that - right now everything is more or less a hack around it anyway.

+1 on the scheduling, we would need this to run on every host for a particular label as well.

Setting custom labels + scheduling rules + internal-only balancing is in the UI in this week's release... Global scale ("run on every host that matches") is not, but not for any great reason.  It probably works in compose/the API though.

Nice. Would be good to have global scale in the UI as well.

@alena1108 All scheduling rules already apply to LB through API and compose, right?

QA tested scheduling LBs already before I did the UI work, but I didn't think to ask about global.

Global is in the next build now too.

Verified with v0.30.0-rc2


Index search

Search won't work yet
https://docsearch.algolia.com/docs/legacy/run-your-own/

https://docusaurus.io/docs/search#using-algolia-docsearch


Specify java_test test_classes for Bazel [phab:D734]

Created by schroederc at 2016-02-22 18:36:13:
See https://github.com/bazelbuild/bazel/commit/0e396b827bca5ee507aadc875169e47d959a7136

zarko accepted this revision at 2016-02-22 18:42:49

schroederc closed via commit 1f9b07b71f4e205afdecb0bbe15626b8c57899b2 at 2016-02-22 18:44:12


iframe with Flash Content does not work properly

In The Name Of GOD
Hello,
If the iframe resizer content contain Flash ( Micromedia Flash , swf ) Content ,the iframe resizer does not work properly ( the auto height does not function properly ) .
Please Help Us.
Thanks

Flash is not supported
Sent from my iPhone.

In The Name Of GOD
Hello,
I tested the iframe resizable with just the swf content and it works fine , the problem was from the javascript content on the same page .
any suggestion on javascript problems ?
our working environment :
Joomla : version 1.5
Extension :
http://www.mintjoomla.com/download/mighty-extensions/item/3655-mighty-analytics.html
when I want to produce a graph and report table from the content and when I press the view the results button on the making report page , the iframe does not resize properly .
the report table is hided to some extend .
Any suggestion on this problem ?
Thanks

I would suggest not using Flash, it is not longer support or distributed.


Change cancelation in results grid

One of the bugs we have seen in the the results streaming is rows changing values. This fixes that by correctly handling cancel requests.

Thanks for taking care of this issue!


isCategoryIndex function does not propagate to URL generations

Have you read the Contributing Guidelines on issues?

[X] I have read the Contributing Guidelines on issues.

Prerequisites

[X] I'm using the latest version of Docusaurus.
[X] I have tried the npm run clear or yarn clear command.
[X] I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
[X] I have tried creating a repro with https://new.docusaurus.io.
[X] I have read the console error message carefully (if applicable).

Description
I have set up
isCategoryIndex() {
  return false
},

for my docusaurus.config.js. And I have a folder structure of
08
├── 01.md
├── 02.md
├── 03.md
├── 04.md
├── 05.md
├── 06.md
├── 07.md
└── 08.md

As a folder structure of docs/2023/08. As you can see, it's just a calendar notation. However, while isCategoryIndex disables the sidebar behavior of overriding 'August 8th' to August, it still creates the URL for 2023/08.
Reproducible demo
https://github.com/anaclumos/heimdall/tree/da910b28b2ae2d6ecf77225db38035e57cdaa637 (Exact Commit)
Steps to reproduce
https://github.com/anaclumos/heimdall/tree/da910b28b2ae2d6ecf77225db38035e57cdaa637 (Exact Commit)
Expected behavior
The URL for docs/2023/08/08.md should be generated at sitename/2023/08/08, not sitename/2023/08
Actual behavior
The URL generates at sitename/2023/08
Your environment
No response
Self-service

[ ] I'd be willing to fix this bug myself.

Hi, this is deliberate by design. See https://github.com/facebook/docusaurus/pull/6451#discussion_r792670630. You would want to use the slug front matter instead.

If because category index pages are not coupled to the slug system and we'd better not give users the impression that they are, would there be an exposed function for isSlugIndex or so? I am generating many pages (thousands) and want as minimum information as possible.

This would be possible with the createFrontMatter hook: https://github.com/facebook/docusaurus/issues/5568

Yes, solving your use-case would be quite complicated. And a breaking change too (it's always quite risky for our users to change the permalink generation algo).
Currently the process is:

Read docs files, generate metadata including a permalink for each
Generate the autogenerated sidebar from those docs

Providing an explicit slug remains an option, although not as convenient.
And createFrontMatter would also give you the ability to generate with code your own slug front matter.
Another option would allow to allow providing a isCategoryIndex callback as a first-class docs plugin option, and default to the current behavior. This would be the default isCategoryIndex that is passed as param to the defaultSidebarItemsGenerator. Once we have createFrontMatter, I'm not sure it would be a super useful option.


Make different calendar views more obvious

Currently, the different views for My Schedule is hidden behind a hamburger menu.  We can make it more obvious by placing it in the app bar

Fixed.


feat(SWA-256): remove old landing page.

The type of this PR is: Feature

This PR solves SWA-256
Description
This PR removes the old landing page.

@kiryl-zubarau the merge conflict in the following files is coming from this commit:

src/v2/__generated__/SoldRecentlyQuery.graphql.ts
src/v2/__generated__/SoldRecently_tests_Query.graphql.ts

Looking at that commit, I think that it's safe to delete those files when I rebase.


libarchive: disable test_write_disk_hardlink test

Description of changes
https://github.com/NixOS/nixpkgs/pull/169051#issuecomment-1108767042
Appears this is failing on darwin hydras. Not sure what filesystem they're using but perhaps we shouldn't assume the builder's filesystem has working hardlinks.
Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
22.05 Release Notes (or backporting 21.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[ ] Fits CONTRIBUTING.md.

Shall I just push it on top of staging-next? Rather than messing around with the neat PR re-targeting technique...

Done that.


Implements support for when `Verify the origin of reCAPTCHA solution is unchecked.

Replaces #202
Implements support for when `Verify the origin of reCAPTCHA solution is unchecked in the reCaptcha settings by adding support for verifying a solution as per the reCAPTCHA Domain/Package Name Validation.

@alanverresen Thank you for this thorough review and all your details suggestions.
I disagree with characterization of the logging change as too ad-hoc - I think it's a well thought out change that actually fits far better with Django's full embrace of Python logging than the current approach of making everyone deal with warning messages on simple captcha fails. That said, I agree that this PR need not require those enhancements to proceed. I'll get the two properly separated. Your time permitting, I'd very much like to continue the logging conversation over on #276 - if you have any suggestions, I'd love to collaborate!
Regarding validate_hostname, I'll have to spend some time and figure out why I did it this way. I imagine I had a good reason because otherwise you're absolutely right that a method param would be simpler and preferable.
Examples: yeah I wish that weren't the case, but you speak the truth. I'll rework the example.
I agree with and will do all other suggestions.
I want to reiterate that I really appreciate how much thought you put into this review. I'm happy to have a partner in getting this across the line!

@rgs258 I'll be looking forward to your changes. Feel free to take as much time as you need.


Write test plan for installing on supported platforms. Automate that plan.

Like AWS.

Also maybe a separeate test suite for "installer tests". That tests letsencrypt with a predefined domain? And minikube as well as AWS CI runners for the installer suite?

Maybe extend the work started here: #642

We have a https://github.com/epinio/epinio/tree/main/acceptance/install
and https://github.com/epinio/epinio/wiki/Release-Test-Plan(s)


Mod uses Swedish text to speech so it sounds wierd.

I am Swedish and my windows OS is set to swedish, and the english is read by the computer as they are swedish. I tried to read and understand how it works and from your text i guess it uses windows built-in text to speech system for the sounds?
I love this mod, but it would be nice if they spoke english and not swenglish, and some words are right out spoken in Swedish.
I have english installed as a keyboard layout in windows, would this work to switch to or do i need an english version of the whole OS for it to work properly? Or is there some windows setting for text to speech that can be changed maybe?
Or are you Swedish and it is from you it is coming from?

I'm looking at text to speech properties now and i have Microsoft Zira Desktop- English (united states) as voice. But then the sounds have to come frome some other place because the english i hear here is much much better than what i hear in the game.


Add support for return routes

Static Agents can receive messages from their corresponding Full Agents in a couple of ways:

By running a service that listens for messages (i.e. a web server, as seen in the included examples)
By specifying that messages can be passed back over the current connection with return_route

The Static Agent library could use a mechanism for specifying a return route on the message being sent (preferably not just by manually adding it to every message sent).
To my knowledge, there isn't a solid Full Agent implementation with support for both adding static connections and return routing that we can run against so this issue may have to stew for a bit.

Implemented in Version 0.5.0


fix: generated image position

Issue:  Image cutoff breaks Chrome, Brave on Mac and older Safari
Solution: Fix the position of generated image
Safari - 16.3

Brave -  v1.52.130

Chrome - 114.0.5735.198

Firefox - 115.0.2

Closes #1474

#1482 resolved the issue described in #1474 for me. Thank you @monika1127!

thanks so much @monika1127! Amazing contribution.


Create warning modal when user comes back from the builder

Warning modal like we have with the "locked dataset/map", saying:
"You already have touched this map in the builder, if you edit it in the editor your map could break it."

cc @saleiva @javisantana


PHP 7.4 - unknown password hashing algorithm: DEFAULT

Description
After upgrading to PHP 7.4 I'm getting warning during password hashing:
Warning: password_hash(): Unknown password hashing algorithm: DEFAULT in vendor/shopware/core/Framework/DataAbstractionLayer/FieldSerializer/PasswordFieldSerializer.php line 34

Possible Solution
Use one of available options returned by password_algos(), which currently are: 2y, argon2i or argond2id.
Alternatively use constants like PASSWORD_DEFAULT, as stated in:
https://wiki.php.net/rfc/password_registry#backward_incompatible_changes

Hey @patpilus,
that's weird as it runs on our ci, probably there are differences with different php builds.
However a fix is on the way.
Kind regards
Jonas

@keulinho thanks. I've used 7.4-fpm-alpine-3.10 from docker hub: https://hub.docker.com/layers/php/library/php/7.4-fpm-alpine3.10/images/sha256-74933e05838128c933d7a46dfa718f243a64925afdaa380d133e43df5012f4bf.
I've just notice another issue regarding php 7.4: shopware/core dev-master requires zircote/swagger-php 3.0.2, which is not fully compatible with 7.4. There's zircote/swagger-php 3.0.3 release with php 7.4 support: https://github.com/zircote/swagger-php/releases/tag/3.0.3

Thanks for the information, we'll update the package.

@patpilus we've changed the password hashing handling and it should solve your problem.
We've also updated the zircote/swagger-php package.
Thanks again for raising this issues. Don't hesitate to reopen this or open a new issue if you are still experiencing any problems.


Composer options debug based on sf env

Q
A

Bug fix?
Yes

New feature?
No

BC breaks?
No

Deprecations?
No

Fixed tickets
#2035

Awesome! Also I'm thinking what else can be improved in Symfony recipe? As now its time to break change!

One of the things I was thinking recently is to utilize git archive instead of git clone not sure if it will improve anything yet but probably it could at least {{.git}} directory won't be created.

Actually current deploy:update_code task is using --dissociate option which will reuse previously cloned release (!)
But you always can test. There is a new --profile option too.


requireCapitalizedComments: Doesn't seem to catch these errors

Offending example from https://github.com/mrjoelkemp/gulp/blob/a727c783a3e6b3ecbbdcbf8bf59e7d3d74fe6057/test/watch.js#L30-L50:
    it('should call the function when file changes: no options', function(done) {

      // arrange
      var tempFile = path.join(outpath, 'watch-func.txt');
      fs.writeFile(tempFile, tempFileContent, function() {

        // assert: it works if it calls done
        var watcher = gulp.watch(tempFile, function(evt) {
          should.exist(evt);
          should.exist(evt.path);
          should.exist(evt.type);
          evt.type.should.equal('changed');
          evt.path.should.equal(path.resolve(tempFile));
          watcher.end();
          done();
        });

        // act: change file
        writeFileWait(tempFile, tempFileContent + ' changed');
      });
    });

The .jscrc: https://github.com/mrjoelkemp/gulp/blob/a54996c6a98acc000ebb310f89d7ca4bbacb9371/.jscsrc
This wasn't tested against master just yet.

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/9589362-requirecapitalizedcomments-doesn-t-seem-to-catch-these-errors?utm_campaign=plugin&utm_content=tracker%2F281640&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F281640&utm_medium=issues&utm_source=github).

It seems that as long as there's at least one capitalized comment at the beginning, all further comments are considered part of a textblock and therefore ignored:
// This
console.log(1);

// is
console.log(2);

// not
console.log(3);

// caught
console.log(4);

// as
console.log(5);

// well.
console.log(6);

#1235 should fix this.


RLP-406 Each client has a different password for each homeserver

Adding a new field to the client table current_server_name to save the current logged in server
Adding logic to delete a LC when the current server is not available anymore to force a new onboarding

Please remove unused imports


Empty search query in /json/messages endpoint causes 500 internal server error.

Sending an empty search query (not possible directly from the web app UI) causes a 500 internal server error. The endpoint is json/messages and the query string is:
anchor=newest
num_before=50
num_after=50
narrow=[{"negated":false,"operator":"search","operand":""}]
client_gravatar=true

and the error stacktrace is
2020-03-30 18:36:06.228 INFO [zr] <IP_ADDRESS>      GET     500  49ms (db: 34ms/3q) /json/messages [streams,search]<EMAIL_ADDRESS>via website)
2020-03-30 18:36:06.228 ERR  [django.request] Internal Server Error: /json/messages
2020-03-30 18:36:06.229 ERR  [django.server] "GET /json/messages?anchor=newest&num_before=50&num_after=50&narrow=[{%22negated%22:true,%22operator%22:%22streams%22,%22operand%22:%22public%22},{%22negated%22:false,%22operator%22:%22search%22,%22operand%22:%22%22}]&client_gravatar=true HTTP/1.1" 500 49
2020-03-30 18:36:07.830 ERR  [] Traceback (most recent call last):
  File "/srv/zulip-py3-venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1246, in _execute_context
    cursor, statement, parameters, context
  File "/srv/zulip-py3-venv/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 588, in do_execute
    cursor.execute(statement, parameters)
  File "/srv/zulip/zerver/lib/db.py", line 31, in execute
    return wrapper_execute(self, super().execute, query, vars)
  File "/srv/zulip/zerver/lib/db.py", line 18, in wrapper_execute
    return action(sql, params)
psycopg2.errors.SystemError: pgroonga: query_extract_keywords: failed to parse expression: Syntax error: <||>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/srv/zulip-py3-venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/srv/zulip/zerver/lib/rest.py", line 27, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/srv/zulip-py3-venv/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/srv/zulip/zerver/lib/rest.py", line 166, in rest_dispatch
    return target_function(request, **kwargs)
  File "/srv/zulip-py3-venv/lib/python3.6/site-packages/django/utils/decorators.py", line 142, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/srv/zulip/zerver/decorator.py", line 677, in _wrapped_view_func
    return authenticate_log_and_execute_json(request, view_func, *args, **kwargs)
  File "/srv/zulip/zerver/decorator.py", line 656, in authenticate_log_and_execute_json
    return limited_view_func(request, user_profile, *args, **kwargs)
  File "/srv/zulip/zerver/decorator.py", line 796, in wrapped_func
    return func(request, *args, **kwargs)
  File "/srv/zulip/zerver/lib/request.py", line 368, in _wrapped_view_func
    return view_func(request, *args, **kwargs)
  File "/srv/zulip/zerver/views/messages.py", line 903, in get_messages_backend
    rows = list(sa_conn.execute(query).fetchall())
  File "/srv/zulip-py3-venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 982, in execute
    return meth(self, multiparams, params)
  File "/srv/zulip-py3-venv/lib/python3.6/site-packages/sqlalchemy/sql/elements.py", line 293, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/srv/zulip-py3-venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1101, in _execute_clauseelement
    distilled_params,
  File "/srv/zulip-py3-venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1250, in _execute_context
    e, statement, parameters, cursor, context
  File "/srv/zulip-py3-venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1476, in _handle_dbapi_exception
    util.raise_from_cause(sqlalchemy_exception, exc_info)
  File "/srv/zulip-py3-venv/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 398, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/srv/zulip-py3-venv/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 152, in reraise
    raise value.with_traceback(tb)
  File "/srv/zulip-py3-venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1246, in _execute_context
    cursor, statement, parameters, context
  File "/srv/zulip-py3-venv/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 588, in do_execute
    cursor.execute(statement, parameters)
  File "/srv/zulip/zerver/lib/db.py", line 31, in execute
    return wrapper_execute(self, super().execute, query, vars)
  File "/srv/zulip/zerver/lib/db.py", line 18, in wrapper_execute
    return action(sql, params)
sqlalchemy.exc.OperationalError: (psycopg2.errors.SystemError) pgroonga: query_extract_keywords: failed to parse expression: Syntax error: <||>

[SQL: SELECT /* get_messages */ anon_1.message_id, anon_1.flags, anon_1.subject, anon_1.rendered_content, anon_1.content_matches, anon_1.topic_matches
FROM (SELECT message_id, flags, subject, rendered_content, pgroonga_match_positions_character(rendered_content, pgroonga_query_extract_keywords(escape_html(%(escape_html_1)s))) AS content_matches, pgroonga_match_positions_character(escape_html(subject), pgroonga_query_extract_keywords(escape_html(%(escape_html_1)s))) AS topic_matches
FROM zerver_usermessage JOIN zerver_message ON zerver_usermessage.message_id = zerver_message.id
WHERE user_profile_id = %(param_1)s AND recipient_id NOT IN (%(recipient_id_1)s, %(recipient_id_2)s, %(recipient_id_3)s, %(recipient_id_4)s, %(recipient_id_5)s, %(recipient_id_6)s, %(recipient_id_7)s, %(recipient_id_8)s, %(recipient_id_9)s, %(recipient_id_10)s, %(recipient_id_11)s, %(recipient_id_12)s, %(recipient_id_13)s, %(recipient_id_14)s) AND (search_pgroonga &@~ escape_html(%(escape_html_1)s)) ORDER BY message_id DESC
 LIMIT %(param_2)s) AS anon_1 ORDER BY message_id ASC]
[parameters: {'escape_html_1': '', 'param_1': 10, 'recipient_id_1': 18, 'recipient_id_2': 19, 'recipient_id_3': 20, 'recipient_id_4': 21, 'recipient_id_5': 22, 'recipient_id_6': 26, 'recipient_id_7': 27, 'recipient_id_8': 28, 'recipient_id_9': 29, 'recipient_id_10': 30, 'recipient_id_11': 31, 'recipient_id_12': 32, 'recipient_id_13': 33, 'recipient_id_14': 34, 'param_2': 50}]
(Background on this error at: http://sqlalche.me/e/e3q8)

on the current master (35b444d59cb00ba2ca2973a5f7fef42f844ab445).

This might be a bug just impacting the PGroonga search backend, based on the traceback, but it probably isn't -- we should be rejecting the '' in the by_search codepath before we get to the search backend code.

Tagging as a priority since all known 500 errors are.

Ah, pgroonga_query_extract_keywords() doesn't support empty string as input for now.
I'll improve pgroonga_query_extract_keywords() to accept it later but please ignore empty string in Zulip.


Missing Arguments With Optional Flags

Version Observed In
1.0.0
Description
Currently, absence of arguments upon entering optional flags like -p generate the usual behaviour without their existence.
Errors
Exceptions for missing optional arguments are not raised or excepted.
Expected Behaviour
It should raise an exception, be excepted and generate an error message.
Further Comments
Define an exception and conditionally handle the missing value by changing default from None to something else.

Version Fixed In
1.1.0
Fix Implemented
As mentioned in "Further Comments".
Drawbacks to Solution
None.
Further Comments
None.


Export functions which are important when implementing custom blocks

So you don't have to copy the function and implement it on your own.

these are all just small utilities to save some lines.
you can just copy paste them in your server core, and they'll work fine.
I honestly don't think they should be exported.


Complains about jack server not running on Raspbian

I tried using soundmeter today on a Raspberry Pi running Raspbian.  It's a Debian like distribution and installation worked without any problems by following the normal Debian/Ubuntu installation instructions.  The soundmeter functionality I expect seems to work fine.  However, it always complains about jack server not running.  Specifically, here's an example:
$ soundmeter --collect --seconds 10
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
Collecting RMS values...
        19  Timeout
Collected result:
    min:         18
    max:         27
    avg:         19

I can make that warning go away if I run jackd with the dummy driver:
terminal1$ jackd -d dummy
jackdmp 1.9.10
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2014 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"

terminal2$ soundmeter --collect --seconds 10
Collecting RMS values...
        17  Timeout
Collected result:
    min:         16
    max:         20
    avg:         17

I'm filing this issue because I'm not sure what the implications are of running an instance of jackd with the dummy driver.  Since it seems like soundmeter doesn't actually need a jack server to function, is it possible to add a fix somewhere in soundmeter itself?

Hi, I did a search and found that it seems more of a pyaudio/portaudio issue:

http://stackoverflow.com/questions/4672457/pyaudio-trying-to-use-jack
http://stackoverflow.com/questions/36244367/jack-server-is-not-running-or-cannot-be-started

So soundmeter doesn't need a jackd process running, so you can ignore that message.


Our Partners Page

Resolves #509 and adjusts header styles in the AboutPagesCard component to account for the variable length of card titles.
Only issue I'm having is that changing the width property on the card title to max-content ends up pushing the container further left when it grows, meaning that larger titles end up spaced too far left.  The image below shows what I mean:

If anyone knows how to fix this or another way to approach the problem, let me know!

Should be all good to merge now.  Thank you @sashamaryl!


genetic-rs 0.4.0

Adds derive macros and general opt/enhancements

I believe that's everything. Will publish shortly


Add assignee to issue

add assignees to bot created issues text

The git commit history is a mess will need to fix it at some point.


Adds TypeScript support

This PR adds TS support so that candidates can choose the language that best suits them. It will also allow us to use this repo as an internal training tool to upskill devs on TS!

Adding the do not merge label for now until #4 has been merged. (As we rely on Webpack config in this branch)

But given it's such a small change, I'll look into it.

Took a little more effort than I thought 🙈
Added a script that

Renames files in /src from .js > .tsx
...But not test files, because that involves a whole lot more setup for Jest
...And also not src/index.js, because Webpack looks for that file.

Might also be worth adding @types/react as a dev dependency?

Had a play about with things and I can happily vouch for the following:

the app runs as expected
types can be added to the types folder and then used without issue in the app
the convert-ts command does what we'd expect ( of course the real magic would be if we could convert them back at will also)

Sadly as things stand, the tests don't run if you use a type in the src files. This would be enough to block the whole endeavour for me, as ideally we'd like to see candidates testing. Unless there's some Jest config shenanigans we can pull out the bag, @johnmccollum?

I think I need to spend a bit more time looking at the testing side. Thanks for giving it a test drive @futuresocks and @jordandavidson1990!

In lieu of me having write-access to this repo, @johnmccollum  👀
The test issue should be fixable by installing @babel/preset-typescript and adding it to babel.config.json
{
  "presets": ["@babel/preset-env", "@babel/preset-react", "@babel/preset-typescript"]
}

I've tried this locally and it means I can use custom types and interfaces from the types folder in files without Jest getting upset.

Sorry about that, @futuresocks. You should have push access now, would you like to try again?

Not sure I can approve this now I'm involved up to my neck. But if you're reading this I reckon it works great


Help wanted! Error happened when using deepspeed.

hi~ I try to reproduce your work using deepspeed and i had followed all the steps on README.
When i run this command:
deepspeed --master_port=16668  main.py configs/train_deepspeed.json
i got an error CUDA error

please help me to fix it thank you.

I am training with 6 pieces of NVIDIA-3090, and the batch_size has also been reduced from 16 to 4 for me, but I still can't execute the deepspeed command, it will give an error.

I'm sorry, I could not replicate the error in my system. Installation of "torch" can also give random errors, just curious if you used "pip install torch==1.12.1+cu116 torchvision==0.13.1+cu116 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu116" to install the torch?

same as your version in README.


Add Vectr to Apps/Websites

Vue is not detected by Vue-Devtools, but source shows it uses Vue

@RIanDeLaCruz
I'm confused, what does the text have to do with the content of the PR`?
Did you meant to open an issue in the devtools repository?


建议添加订阅节点过滤功能

有时候订阅节点太多，一些低等级节点测速没什么意义，建议添加通过名称过滤节点
类似下图这样

支持這個提議

楼主这个截图，是什么软件？

楼主这个截图，是什么软件？

OpenWrt R20.9.15 / LuCI Master (git-20.256.12360-1a54222)

配置文件里面有:
[common]
;Excluded remarks, nodes with these remarks will be ignored, supports regular expression
;one remark per line, index starts at 0
exclude_remarks0=(剩余流量|到期时间|过期时间|官网地址|产品名称)
;Included remarks, if defined (";" removed), only nodes with these remarks will be tested, supports regular expression
;one remark per line, index starts at 0
;include_remarks0=香港
可以善用include

配置文件里面有:
[common]
;Excluded remarks, nodes with these remarks will be ignored, supports regular expression
;one remark per line, index starts at 0
exclude_remarks0=(剩余流量|到期时间|过期时间|官网地址|产品名称)
;Included remarks, if defined (";" removed), only nodes with these remarks will be tested, supports regular expression
;one remark per line, index starts at 0
;include_remarks0=香港
可以善用include

配置文件里面有:
[common]
;Excluded remarks, nodes with these remarks will be ignored, supports regular expression
;one remark per line, index starts at 0
exclude_remarks0=(剩余流量|到期时间|过期时间|官网地址|产品名称)
;Included remarks, if defined (";" removed), only nodes with these remarks will be tested, supports regular expression
;one remark per line, index starts at 0
;include_remarks0=香港
可以善用include

谢谢
不好意思，我没有注意到有配置文件。

配置文件里面有:
[common]
;Excluded remarks, nodes with these remarks will be ignored, supports regular expression
;one remark per line, index starts at 0
exclude_remarks0=(剩余流量|到期时间|过期时间|官网地址|产品名称)
;Included remarks, if defined (";" removed), only nodes with these remarks will be tested, supports regular expression
;one remark per line, index starts at 0
;include_remarks0=香港
可以善用include

谢谢
不好意思，我没有注意到有配置文件。


Allow public client usage

This PR allows direct access to the generated client, allowing APIs to migrate to generated client structs without using wrappers.
For better testing, the generated client is flattened into a single interface, such that no "sub clients" are required anymore.

With this, all funcs of different entities must not overlap if i understand it correct, this is wrong !

Kind of. We would come into trouble already if we'd introduced a v2 and use identical operation ids (would cause collisions inside the same package). For the next version we need to prefix the operation names properly, to circumvent this problem, maybe just use the automatically proposed id?
operationId is an optional unique string used to identify an operation. If provided, these IDs must be unique among all operations described in your API.

From: https://swagger.io/docs/specification/paths-and-operations/
So, using same ids across different packages is prohibited anyway.

But the current approach prevents this by design and makes the API obvious, removing the package by entity is from may POV not acceptable.

It is not prevented at the moment. If you name operations the same with the current impl then the generator will only produce code in one package.

Codecov Report

Merging #75 (f4f0bdd) into master (a021207) will decrease coverage by 1.00%.
The diff coverage is 8.08%.

@@            Coverage Diff            @@
##           master     #75      +/-   ##
=========================================
- Coverage    4.45%   3.45%   -1.01%
=========================================
  Files          16      16
  Lines        1257    1275      +18
=========================================
- Hits           56      44      -12
- Misses       1194    1224      +30
  Partials        7       7

Impacted Files
Coverage Δ

filesystem.go
0.00% <0.00%> (ø)

firewall.go
0.00% <0.00%> (ø)

firmware.go
0.00% <0.00%> (ø)

health.go
0.00% <0.00%> (ø)

image.go
0.00% <0.00%> (ø)

machine.go
8.40% <2.70%> (-0.37%)
:arrow_down:

metal.go
18.66% <17.94%> (-26.95%)
:arrow_down:

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 a021207...f4f0bdd. Read the comment docs.

I tried to make the changes less intrusive and closer to the way we deal with our gRPC clients.


*.github.com pages URL's should be HTTPS'd

Fixes #33.
/cc @benbalter

Odd that 1/5 tests failed? Otherwise, LGTM (unless you want to put scheme on the repository).