environment variable stuff

Two things:

highlighted text repeats "NEXT_DAO_ADDRESS" instead of "NEXT_ALCHEMY_KEY"

After recent convos with @salieflewis I believe we're gonna want to be able to throw a chainID in the environment variable flow to support testnet

This is what the env.example currently looks like sans the PA stuff.
NEXT_PUBLIC_SITE_TITLE='Public Assembly'
NEXT_PUBLIC_APP_ID='public-assembly'
NEXT_PUBLIC_SITE_DESCRIPTION="create what's missing"
NEXT_PUBLIC_TWITTER_HANDLE='pblcasmbly'
NEXT_PUBLIC_WEBSITE_URL='https://public---assembly.com'
NEXT_PUBLIC_CHAIN_ID=''
NEXT_PUBLIC_ALCHEMY_KEY=''
NEXT_PUBLIC_TOKEN_ADDRESS=''
NEXT_PUBLIC_PLATFORM_INDEX=''
NEXT_PUBLIC_WEB3STORAGE_TOKEN=''
NEXT_PUBLIC_REGISTRY_CONTRACT=''

One thing that might change is that the registry contract may be hardcoded in. Also, people can submit either Alchemy or Infura keys, not sure just yet how we'll best communicate that.

I think registry contract can/should def be hardcoded in. for the alchemy/infura bit, maybe just call it RPC Provider Key?
also cross posting this issue I added to dao-utils this morning, should prob add an (optional) zora api key slot, which will be necessary for ppl with platforms that get high levels of traction

Waiting on a follow up on the final order of these, and I'm against calling it RPC.

Do you feel like there is a logical way to break them up? They can be in whatever order we choose. Here is my suggestion.
NEXT_PUBLIC_PLATFORM_INDEX=''"
NEXT_PUBLIC_TOKEN_ADDRESS=''"
NEXT_PUBLIC_ALCHEMY_KEY=''"
NEXT_PUBLIC_WEB3STORAGE_TOKEN=''"
NEXT_PUBLIC_CHAIN_ID=''"
NEXT_PUBLIC_SITE_TITLE=""
NEXT_PUBLIC_APP_ID="" (Probably going to get rid of this)
NEXT_PUBLIC_SITE_DESCRIPTION="" (May be getting rid of this)
NEXT_PUBLIC_TWITTER_HANDLE=""
NEXT_PUBLIC_WEBSITE_URL=""


Add "default" or "minimum" disk space setting.

In Products/Services-> Module Settings, add the option "default" or "minimum" disk space.
Why?
Allowing customers to order additional disk space if needed e.g. Product has 10GB disk space by default, the customer selects additional 3GB disk space, upon submiting the data to Pterodactyl "default" or "minimum" gets added to the customers selected additional disk space.

Added the ability for overwriting variables + env variables in https://github.com/TrixterTheTux/Pterodactyl-WHMCS/commit/34d7bb8b80eaeb50ae696bbf8f2485e5a1740351
Check readme on how to use the WHMCS's provided configuration options with the module.


Redis database appliance

A Redis database appliance should be available. It's commonly used for job queues and other key-value store requirements.

We do plan to have a Redis appliance out-of-the-box in the future, but for now see the following gist for a way to run Redis using a Docker image from the Docker registry:
https://gist.github.com/lmars/fca0f18b4ecd507fb39a

:+1: that would be great to scale sessions across multiple web instances.

And while you're at it, add MongoDB and RethinkDB and Cassandra, and, and... oh and managed multi-master clustering for each :smiley:

@zeroasterisk That's absolutely the plan, it's just a matter of resources.

@lmars thanks for your link, however I can see on the gist that:
note that although the container has a data volume, they are not currently sticky so restarting the container will get a new data directory. This will be fixed when we have a Redis appliance / sticky volumes.
Any ideas on how to achieve data persistence?

Gosh, that font-size...

:+1: for data persistence.

:+1: Redis would provide a simpler example than Postgres to anyone looking to write an appliance in the future, and might be a good opportunity to write a guide on how to do that :smiley:

There is now an alpha Redis appliance that can be used as a cache (no persistence). flynn resource add redis.

Nice, I will test this :)


SID can change

Hello,
Since in the UserLogin table we are recording the SID of the user, I did a search to see if the SID can change in the active directory for a user. According to this article, it can
https://blogs.msdn.microsoft.com/oldnewthing/20141128-00/?p=43513/
Do you have anything in place that checks the history of SID?
Thank you!
Saquib

Currently no,  I'll into it.

As far is OWIN-MixedAuth is concerned, the user is authenticated. Now, in case SID gets changed, it's up to the application to handle it.
You'll need to get the SID History and add to the custom claims here, Then deal with it in the account controller ExternalLoginCallback
Thanks!


Exporting to xml

https://i.imgur.com/1jAeasd.png
I've followed the Wiki guide and I'm unsure if I've done something wrong here, the screenshot above shows the error I get when I try and export to xml.

This is caused due to the last PR https://github.com/Skylumz/Sollumz/pull/323
Fix is well underway and I will make a new PR by today to fix it. Sorry for the inconvenience

Okay, thanks, take your time with a fix, it doesn't have to be today.


Multithreading

Hello,
I am using mob-suite 3.0.0 installed with conda. I ran mob_recon with -n 10 but the blast processes still seem to use only one thread. Am I missing something?
Thanks,
Ilya.

Building the blast databases will always be single-threaded. Ten threads is a lot to provide the program and there may be bottlenecks that are preventing blast from using all of the available threads you are giving it. That being said, it looks like the tblastn calls are stuck at single threaded due to a previous issue with multi-threading in older versions of blast. I will add a fix to use multi-threading with tblastn. Blastn calls will use multiple threads

Thank you for your response. I was indeed referring to the tblastn processes which you noted.
Thanks,
Ilya.


Null string provided for DM56 Engine Family did not fail.

-84 doesn’t fail for no Engine Family value in DM56 reply. It may have been detected, but should say something like:
FAIL: <IP_ADDRESS>.x Engine Family Name missing from DM56.
Instead of Error: (which looks like a system failure)
2024E-MY comes from the regulation in 13 CCR 1971.1 (h). What follows matches the manufacturer’s emissions cert. application according to EPA’s rule (cited in an artifact footnote).
Start Test 1.6 - DM56: Model year and certification engine family
11:06:13.3182 Global DM56 Request
11:06:13.3206 18EAFFF9 [3] C7 FC 00 (TX)
11:06:13.3763 1CFCC700 [9] 32 30 32 34 45 2D 4D 59 00
Model Year and Certification Engine Family from Engine #1 (0):
Model Year: 2024E-MY
Family Name:
ERROR: Error: begin 0, end 1, length 0           /* -84 tool string
End Test 1.6 - DM56: Model year and certification engine family
This engine should send:               RNVXH07750SB

Fail should occur as part of step <IP_ADDRESS>.e
e.	Fail if engine family has <> 12 characters before first asterisk character (ASCII 2Ah) or “null” character (ASCII 00h).

Bob Halfman reports that failures are now observed for empty engine family strings.
EG.
Start Test 1.6 - DM56: Model year and certification engine family
11:08:47.3887 Global DM56 Request
11:08:47.3906 18EAFFF9 [3] C7 FC 00 (TX)
11:08:47.4474 1CFCC700 [9] 32 30 32 34 45 2D 4D 59 00
Model Year and Certification Engine Family from Engine #1 (0):
Model Year: 2024E-MY
Family Name:

FAIL: <IP_ADDRESS>.e - Engine family has 0 characters, which is not 12.

End Test 1.6 - DM56: Model year and certification engine family


update node.js to v8.9.4

update node.js to v8.9.4, I work on mac.

I'm closing it in the sight of Node.js 12 LTS being release, I'll upgrade to the latest version ASAP. Thank you for the PR!


Unable to delete folders

Describe the bug
Unable to delete folders in the solution explorer
To Reproduce
Steps to reproduce the behavior:

Create a new folder
Right click folder
Click delete

Expected behavior
Expected the selected folder to be deleted
Screenshots

Environment (please complete the following information):

OS: Mac
Version: 11.1
vscode version: 1.52.1

same issue on my windows environnement :
vscode Version: 1.52.1
OS: Windows_NT x64 10.0.19041

same issue on my windows environnement :
vscode Version: 1.52.1
OS: Windows_NT x64 10.0.19041


How can I automate the training of pupeteer?

So I want to create a chrome plugin that will capture the user's activity like clicks, keystrokes and that element's XPath on which the click/keystrokes are being recorded.  So it there any Open Source JS library available that can capture all these details?
P.S. Do not suggest clickly which acts as a puppeteer recorder

cc @benjamingr

Hey, this is actually really complicated because there are a few fundamental problems in selecting an element well. I am also not sure why puppeteer recorder doesn't work for you for your case.
There are alternatives like Selenium IDE you can consider but they are not really puppeteer or built on the devtools API.

If you just need to generate a selector you can use the devtools code for generating a selector (we needed to do this at one point - so we extracted it to a library which you are welcome to use here).
Note that we have quite a lot of code around selecting elements in Testim and then we build locators (matrices of hundreds of selectors) and use machine learning to iterate on those to get good scores between test runs. I can't open source the locator code because it's very related to what Testim does (sadly) :]
I am going to present generating accessibility annotations automatically using a similar technique at a conference in a few months which you are welcome to use for inspiration.

As for actually recording actions - things like drag and drop are actually pretty hard (but there are harder things), you are welcome to check the chromium source for cases where it's documented the debugger doesn't work (the Input namespace goes to input_injector_PLATFORM in the source - for example on mac puppeteer's click does an CGPostMouseEvent which doesn't work for a lot of cases.
We literally have tens of thousands of lines of code to record things like "Drag and Drop" correctly and even that isn't perfect. I talk a bit about why automation is hard here.


fix: component being rendered over Header

Description

Bug Description: On the main home page, another component is being rendered over the header component.
Expected Behavior: Either there needs to be some content over the header component, or the extra component needs to be removed.

Changes Made

Fixed the component that was being rendered over the header .
Ensured that the the component is only rendered when there is some content.

Fixes #3096
when there is no content to render:-

when there is content to render:-

/update

closing this PR


Evaluate schema.org structure

http://schema.org/SoftwareApplication
http://schema.org/WebSite

Also, I'm pretty interested in the Core Vocabularies for Public Services and Public Administrations published by ISA2.
In regard to this perhaps it makes sense to make a more detailed overview of the relation of structure in this project also in relation to civic.json, g0v.json etc as mentioned in #7.

If we use camelCase in stead of kebab-case #18 , we could try to stay as close to the schema.org keys as possible.

Hi @bvhme
I work as a developer on the Joinup platform (ISA2), and was made aware of your initiative by George Lobo.
Joinup (https://joinup.ec.europa.eu/) is a platform that hosts 'interoperability solutions' (more info on the site) and uses an RDF based data model to describe those solutions. Solutions could be things like Open Source software, standards, reference models, etc. The model also describes everything related to it: releases, distributions, licenses, contact information...
All of this is defined in the 'Asset Description Metadata Standard' (ADMS), which is derived, and compatible with the DCAT metadata standard used by Open Data portals.
The approach of having the metadata in you repository makes a lot of sense to me... Certainly an interesting project!
It would be really interesting if somehow we could 'transform' the metadata in the publiccode file in to full ADMS... :thinking:
Anyway, here are some references
https://joinup.ec.europa.eu/release/adms-ap-joinup-version/20
https://github.com/SEMICeu/ADMS-AP
Let me know if you need more context on all of this, I can't guarantee that I'll have an answer on everything related, but I might be able to point you in the direction of some other people.

Hey Sander,
I've been looking through some of the DOCX files scattered throughout the
joinup, and to be hones am having a bit of a hard time actually distilling
from this what lessons were learned in this process and what serves what
goal, as well as the standard entities we could use.
I understand that your standards contain some standard ways of describing
public administrations, however, I feel we could use some extra guidance on
this. I feel we're all also in a specific context and thus need a bit of a
broader view, as 'municipality' is for instance not really a clear
descriptor that says anything about the actual organisation.
We're trying to provide for an easy to use way to organise software around
its use and to signify it's context,
Do you think you could be of help with this?
Boris van Hoytema
—

E-mail<EMAIL_ADDRESS>Website bvh.me
Twitter twitter.com/bvhme
Facebook facebook.com/vanhoytema http://www.facebook.com/vanhoytema
LinkedIn linkedin.com/in/borisvanhoytema
http://nl.linkedin.com/in/borisvanhoytema

On 26 March 2018 at 17:07, Sander Van Dooren<EMAIL_ADDRESS>wrote:

Hi @bvhme https://github.com/bvhme
I work as a developer on the Joinup platform (ISA2), and was made aware of
your initiative by George Lobo.
Joinup (https://joinup.ec.europa.eu/) is a platform that hosts
'interoperability solutions' (more info on the site) and uses an RDF based
data model to describe those solutions. Solutions could be things like Open
Source software, standards, reference models, etc. The model also describes
everything related to it: releases, distributions, licenses, contact
information...
All of this is defined in the 'Asset Description Metadata Standard'
(ADMS), which is derived, and compatible with the DCAT metadata standard
used by Open Data portals.
The approach of having the metadata in you repository makes a lot of sense
to me... Certainly an interesting project!
It would be really interesting if somehow we could 'transform' the
metadata in the publiccode file in to full ADMS... 🤔
Anyway, here are some references
https://joinup.ec.europa.eu/release/adms-ap-joinup-version/20
https://github.com/SEMICeu/ADMS-AP
Let me know if you need more context on all of this, I can't guarantee
that I'll have an answer on everything related, but I might be able to
point you in the direction of some other people.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiccodenet/publiccode.yml/issues/15#issuecomment-376199507,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB1CveGa0OFIOyYwj3AsPaEfGLuw-pOGks5tiQQkgaJpZM4ScaEt
.


"initSql" as a callback

At the moment any SQL that needs to be executed on a new connection is passed in the initSql parameter. There are some potential issues:

the SQL required is too large and cumbersome to pass on a command line easily
the SQL is difficult to escape correctly for use in a command line
the SQL isn't source-controlled in the same way as migrations and callbacks are

In those cases, would the ability to use a callback-like initSql.sql file instead be valuable to anyone?

Note that multi-line config options are coming in Flyway 6.3. This'll make it easier to define longer scripts in the config file, albeit with visible newline delimiters (unsightly, but still better than a single line...).
This could be a reasonable compromise for those that need longer scripts in initSql for the time being, although a new callback still seems ideal.

A further suggestion - call it init and allow a Java callback as well as a SQL one

Closing until further interest


Library Update: added Modin package

Description
Added Modin Package to the docker image. Speed up your Pandas workflows by changing a single line of code
Related Issue

#5055
Motivation and Context

This change is required to allow processing of Pandas on multiple CPU's
Requires Documentation Change

N/A
How Has This Been Tested?

Generating DockerfileLeanFoundation and Dockerfile, testing Dockerfile
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] Refactor (non-breaking change which improves implementation)
[ ] Performance (non-breaking change which improves performance. Please add associated performance test and results)
[X] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Non-functional change (xml comments/documentation/etc)

Checklist:

[X] My code follows the code style of this project.
[X] I have read the CONTRIBUTING document.
[X] I have added tests to cover my changes.
[X] All new and existing tests passed.
[X] My branch follows the naming convention bug-<issue#>-<description> or feature-<issue#>-<description>

Thank you, @Sharma-Rajat
I am closing this pull request because we try to update the foundation with more than one package. We need to test them in QuantConnect Cloud before the merge.

Shouldn't that be specified in your contribution file? Nonetheless, I can pickup a couple more of the Feature/Library Update and combine them.


Feature request: inline comments inside TableNode

Hi,
I have some Behat tests that assert how computations of a cart (in a eCommerce context) are made. Something like "with a tax rate of X, a currency conversion rate of Y, provided I use a discount of Z percent, and my cart contains 5 items with unit price Z then cart total, tax included, should be ..."
I am using TableNode to assert multiple properties:
    Then my order should have following details:
      | total_products           | 238.00 |
      | total_products_wt        | 252.28 |
      | total_discounts_tax_excl | 9.43   |
      | total_discounts_tax_incl | 10.0   |
      | total_paid_tax_excl      | 298.57 |
      | total_paid_tax_incl      | 316.48 |
      | total_paid               | 316.48 |
      | total_paid_real          | 0.0    |
      | total_shipping_tax_excl  | 70.00  |
      | total_shipping_tax_incl  | 74.20  |

Sometimes, as the computation logic evolves, we need to re-compute these values but we need to do it manually to make sure the new values are correct. What I mean is that if Behat suddenly tells us "I expected 298.57 instead of 298.92" we need to check whether our code logic changed which means 298.92 is correct or this is an error, catched by Behat.
I consequently wanted to add the details of the computation next to each line. I tried the following:
      | total_products           | 238.00 |  # 238.00 is 119x2

But this results in a weird Notice: Array to string conversion that makes the step fail.
So if I am not wrong inline comments are not supported in Feature files: something like When I do X # this is a comment, don't parse it
I think this feature could be nice in Behat :) please tell me what you think

Hi @matks
I like your idea, but there is a question, how should the comment be recognised?
Everything after the hash character may be the comment, but what if we want to use hash in the test data?

Hi @matks
I like your idea, but there is a question, how should the comment be recognised?
Everything after the hash character may be the comment, but what if we want to use hash in the test data?

Very good question :)
It makes me think "what if we want to use the pipe character | in test data too" 😄
I can think of 2 answer for both questions:

provide a way to acknowledge if the character is part of a string (and not a keyword): for example using quotes

      | field                               | value                                                                       |
      | total_paid_tax_excl     |  298.57                                                                   |
      | total_paid_tax_incl      | 316.48                                                                    |
      | label                              | 'This is a label that contains a pipe | character' |

⬆
in the above example, we know the pipe used inside the string is 'just a character used in data set' because it is inside quotes

provide a way to escape these characters: for example using backslash

      | field                               | value                                                                       |
      | total_paid_tax_excl     |  298.57                                                                   |
      | total_paid_tax_incl      | 316.48                                                                    |
      | label                              | This is a label that contains a pipe \| character  |

⬆
in the above example, we know the pipe used inside the string is 'just a character used in data set' because it is preceded by a \

Good ideas, but this sort of discussion isn't a Behat design decision - we tend to follow cucumber on Gherkin syntax, so:

Changes to syntax should be discussed on cucumber/cucumber
If Behat's behaving differently to cucumber that should be raised on Behat/Gherkin

@matks In your example the pipe character works, here is the output of $tableNode->getRowsHash():
array(4) {
  ["field"]=>
  string(5) "value"
  ["total_paid_tax_excl"]=>
  string(6) "298.57"
  ["total_paid_tax_incl"]=>
  string(6) "316.48"
  ["label"]=>
  string(48) "This is a label that contains a pipe | character"
}

@ciaranmcnulty You are right, it's a Cucumber, not Behat thing.

We do diverge from cucumber sometimes and it's always good to identify changes, but first step is to see what cucumber does :)
There's test data here https://github.com/cucumber/common/tree/main/gherkin/testdata/good
You can use the cucumber-go binaries as a lightweight way to see how cucumber parses Gherkin into ASTs

Additionally, using the cucumber/gherkin-php is on the roadmap for Behat


Nmstate should ignore interface with state: unknown #2452

This PR adds a custom Serde deserializer in the Nmstate
Rust project to treat interface states labeled as 'unknown'
as 'InterfaceState::Ignore' and logs a warning.
This ensures the application remains stable and avoids
unnecessary errors when encountering an unexpected
interface states.
Changes:

Implemented custom deserialization for 'unknown'
interface states.
I added log warnings to notify users that the state is
unknown and would be ignored.

Testing:

Compiled the project successfully with cargo build.
Verified through manual test that the 'unknown'
state is logged correctly.

Resolves #2452

It has been  a while since my review, if you still have time and interest on this, please let us know.


support babel --keep-file-extension

That is a babel cli option. I only support babel-core not babel-cli.

I may place an option similar to this in the .languagebabel file options.

Thanks! I am waiting release

2.75.0


NIFI-4352: Add CLOB and NCLOB support to PutSQL

Thank you for submitting a contribution to Apache NiFi.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:

[x] Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?

[x] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.

[x] Has your PR been rebased against the latest commit within the target branch (typically master)?

[x] Is your initial contribution a single, squashed commit?

For code changes:

[ ] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
[ ] Have you written or updated unit tests to verify your changes?
[ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
[ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
[ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
[ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?

For documentation related changes:

[ ] Have you ensured that format looks appropriate for the output in which it is rendered?

Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.

Added followings:

CLOB and NCLOB support to PutSQL
NCLOB support to ExecuteSQL

Confirmed it can insert and select CLOB and NCLOB columns. For NCLOB, I've tested Japanese characters are inserted and retrieved successfully.
A template is available here in Gist:
https://gist.github.com/ijokarumawak/451085b01349c7e6e83bcc42182ecffc
CREATE TABLE clob_test (
  i INT not null,
  c CLOB,
  nc NCLOB,
  CONSTRAINT clob_test_pk PRIMARY KEY (i)
);

+1, ran full build with contrib-check and made few tests with provided template. Merging to master, thanks @ijokarumawak


How can a web page call API protected by kong-oidc?

Is it feasible to allow web app invoking API protected by kong-oidc to login from IdP and get resources provided by backend?

Hi, did you manage to solve? I have the same problem

Hey, sure you can. The client need to store the session cookie returned by Kong and send it on each request. Then, depending on your session storage the plugin will get the JWT and attach it into the authorization header for the backend service.
You have a functional example using Kong + OpenID + Keycloak here.


Use from command line

This might be a feature request. Is it possible to use this from the command line?

Not at the moment. There is a PR for that https://github.com/domchristie/to-markdown/pull/29, but it’s a bit out of date.

Recommend to implement the cli in a separate wrapper package, for example, to-markdown-cli.  Keep the current code base small.  Or it would be hard for new comers, like,  me, to tinker and contribute.

Thanks for you feedback. I think it'll possible to make the functionality available from the command line without it affecting the complexity of the codebase. That way there is only one repo to maintain! :)

@domchristie did this ever get implemented?

@michaelandrepearce Not yet. Should be soon, though :)

See https://github.com/domchristie/turndown/pull/284

Please merge this feature in.


Move SWIG interfaces from python to ruby

Signed-off-by: ahcorde<EMAIL_ADDRESS>🎉 New feature
Summary
This PR removes SWIG python interfaces
Require:

https://github.com/ignitionrobotics/ign-math/pull/343
https://github.com/ignitionrobotics/ign-math/pull/351

Checklist

[x] Signed all commits for DCO
[x] Added tests
[ ] Added example and/or tutorial
[ ] Updated documentation (as needed)
[ ] Updated migration guide (as needed)
[x] codecheck passed (See contributing)
[x] All tests passed (See test coverage)
[x] While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

I think we can dismiss the ABI checker, since we're not promising ABI stability of the python shared libraries.

This pull request has been mentioned on Gazebo Community. There might be relevant details there:
https://community.gazebosim.org/t/new-ignition-releases-2022-03-01-citadel-edifice-fortress/1313/1


Selected options can be cleared when the component is disabled

Hi @harshzalavadiya.
When I select any number of options and then dynamically set disabled={true} I can still click on the clear-selection "X" button, which clears all selected item, but leaves the component disabled, so the component becomes unusable.
Expected behavior:  No actions (including selection-clearing) should be allowed when the component is disabled.

@kboni Thanks for reporting I'll check it out

@kboni latest v3.1.3 should fix this issue

Works like a charm. Thanks. Great job. Cheers.


Implementations of the circuit breaker pattern related to LANG-1085

These are the results of Bruno's and my collaboration on a circuit breaker implementation. For further discussions refer to LANG-1085.
commit 1b12db706b457408562a166c21bc6470a8064620
Merge: edebd97 def7832
Author: Oliver Heger<EMAIL_ADDRESS>Date:   Wed Jun 10 21:27:17 2015 +0200
Merge pull request #1 from kinow/patch1

This commit:

commit def78320c5efcb734572c5b48623a952e3c94c75
Author: Bruno P. Kinoshita<EMAIL_ADDRESS>Date:   Wed Jun 10 22:57:33 2015 +1200
This commit:

* fixes JavaDocs warnings in Checkstyle
* adds license headers
* renames the MemoryCircuitBreaker to ThresholdCircuitBreaker
* adds more tests to have a good coverage

commit edebd970582ce2984258352c8482bcb51587f7d2
Author: oheger<EMAIL_ADDRESS>Date:   Tue Jun 9 22:11:11 2015 +0200
Documentation updates for EventCountCircuitBreaker.

commit 3d8a4ff85a78173dd8f5437d9b4d931069128e20
Author: oheger<EMAIL_ADDRESS>Date:   Tue Jun 9 21:55:02 2015 +0200
Renamed TimedCircuitBreaker to EventCountCircuitBreaker.

This name seems to be more appropriate as the main property of this circuit
breaker implementation is that it counts specific events and changes its state
when a certain threshold is reached.

commit 0e4ce5a984ef699ddace61bbf430d695b011c6b5
Author: oheger<EMAIL_ADDRESS>Date:   Tue Jun 9 21:51:22 2015 +0200
Added documentation for CircuitBreaker interface.

commit 0e6b22190ef1868655fec9b3814a2345ad206f76
Author: oheger<EMAIL_ADDRESS>Date:   Mon Jun 8 22:27:05 2015 +0200
Initial import of CircuitBreaker classes.

I guess this is ready to merge?

Well, the code is ready and fully unit-tested. When we created this pull request, we asked on the ML whether the lang concurrent package would be the right place for this code, but there was no reaction. So this question is still open.

@oheger @PascalSchumacher: Nobody objected adding it to the concurrent package. So from PoV it can be integrated into LANG.

Thanks! :+1:


protocol issue

ModuleNotFoundError: No module named 'skywalking.protocol'
Run your simplest demo report this error, please help solve it

What agent do you mean?

font{
    line-height: 1.6;
}
ul,ol{
    padding-left: 20px;
    list-style-position: inside;
}

    If you want to try out the latest features that are not released yet, please refer to the guide to build from sources.from skywalking import agent, config

config.init(collector='<IP_ADDRESS>:11800', service='your awesome service')
agent.start()
        I directly run your test scripts have problems, after checking, the installed package does not contain common protocol, please have a look

                            QQ邮箱1

<EMAIL_ADDRESS>

    签名由
    网易邮箱大师
    定制

On 3/22/2021 16:54，吴晟 Wu<EMAIL_ADDRESS>wrote：

What agent do you mean?
—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.

No detail provided. If you want to submit issue, please pay more attention on how the community works.

skywalking import agent, config
config.init(collector='<IP_ADDRESS>:11800', service='your awesome service')
agent.start()

I directly run your test scripts have problems, after checking, the installed package does not contain common protocol, please have a look

@haisheng666 if you want to build from the source codes, MAKE SURE to follow every single step of the doc, from the error codes, I suspect that you didn't run git submodule update --init

I installed it by PIP. What should I do?

@haisheng666 please, learn how to ask question and communicate efficiently, how exactly did you install the agent, one of your comment said you installed from source codes, northern other one said you install from pip, please describe you question completely at one time, and provide the full steps to reproduce your issue

When did I say I installed the source code? I just asked you whether the PIP installation module can be used, and whether the basic demo can be used, right?

The PIP module can be used, the basic demo can be used

I've tried, PIP install "Apache skywalking" is not very easy to use, and I can't find the corresponding module after installation, but PIP install Apache skywalking = = 0.5.0 can be used, and the module can be used normally. Finally, thank you for your open source module!

I want to know in "alarm"- settings.yml ”In this file, except for the {name} variable, where can I query other variables? For example, the endpoint name，thank you！

I want to know in "alarm"- settings.yml ”In this file, except for the {name} variable, where can I query other variables? For example, the endpoint name，thank you！

Only name and id are supported for now, but it should be easy to extend, https://github.com/apache/skywalking/blob/2c729b5d69b095962e7be5b8570eedc374659ec5/oap-server/server-alarm-plugin/src/main/java/org/apache/skywalking/oap/server/core/alarm/provider/AlarmMessageFormatter.java please try to contribute if you need a new feature.

Also, let’s focus on one case per issue and open another issue for a different case next time, so that we don’t mix the context here :)

Do you have any other parameters besides these alarm parameters? For example, the endpoint name

Please have time to answer me!

Why a service level alarm including an endpoint name? What do you mean?

I mean, can the alarm parameters received by webhook include the endpoint name? Now there is no such parameter

Again, there is no such thing. Why are you keeping asking?

Don't you know what that means? So I answer you?
I asked if I could add this parameter? Just answer yes or no

Aren't you community defenders? Who do you ask?

I have given you the answer. I don't know how to give an answer.

Why a service level alarm including an endpoint name?

If you set an endpoint level alarm, then it has an endpoint name, otherwise, how could it be included?
That is why I am asking you, your question doesn't make sense at all.


Added error message for invalid credentials

Hello @wouterpotters! Thanks for opening this PR.

In the file castorapi/castorapi.py:

Line 62:17: E704 multiple statements on one line (def)
Line 63:25: E126 continuation line over-indented for hanging indent
Line 85:41: E226 missing whitespace around arithmetic operator
Line 85:60: E502 the backslash is redundant between brackets

Do check out the the PEP8 style guide. Most editors support PEP8! E.g. Visual Studio, Eclipse, Spyder or PyCharm


leaf refresh enhancement

Signed-off-by: qpdpQ<EMAIL_ADDRESS>

How to test it:

use this image quay.io/yuchen_li1/ibm-cert-manager-operator-amd64@sha256:1e2330b25f63e1e5810ff0f89f4a52d7342a4a39350f8455b403c7bc55ecfd25 in ibm-cert-manager-operator
create a test certificate chain(you can use the file in the following comment)
change some data in the test-ca-certificate and watch if there is any change in test-leaf-certificate
delete test-ca-certificate and change some data in the test-ca-certificate-secret and watch if there is any change in test-leaf-certificate

changed the order of label check

this is the new imagequay.io/yuchen_li1/ibm-cert-manager-operator-amd64@sha256:df8bdddc8385e42c26d32be8dbb4c4a7765ec25ed1b07bf2f189151fa7692ee3


chore(portal): Remove duplicated "Users" billing row

This removes the duplicate Users section (formerly "Seats")

Explained in Slack


Remove extra event emitters, add DOM tests

Reason for change
We were firing the same events in certain instances from both parent and child, which was resulting in multiple components firing, say, a success event twice. Normally that wouldn’t be a huge problem, but when the parent fires it doesn’t have any of the data it needs.
That’s actually a huge problem, because if you have a success event, and you tell your application to redirect to /addon/[resourceName], it’s going to redirect to /addon/undefined and other fun things like that.
Also, tests were rewritten to test the DOM + event name, rather than testing implementation details on the class. New tests were added when events weren’t being tested.
Testing
Overall this is a fairly safe PR to merge as it only removes event emitting in 3 spots. It’s hard to test, but tests should pass. 90% of the changes were making the tests stronger by testing DOM clicks on buttons & waiting for events to fire, rather than testing class methods.
I did test this PR in Render Dashboard and it solves the intended problem of events firing twice.
Checklist

[x] CHANGELOG: The Unreleased section of CHANGELOG was updated
[x] Prop changes: docs were updated
[x] Prop changes: E2E tests were updated, testing from the highest level possible

if you have a success event, and you tell your application to redirect to /addon/[resourceName], it’s going to redirect to /addon/undefined and other fun things like that.

Is this something you've seen happen? Are there reliable repro steps in Render dashboard?

Is this something you've seen happen? Are there reliable repro steps in Render dashboard?

Yeah it’s something I experienced while working in the Render Dashboard. The clearest evidence I have of it is right here: https://github.com/manifoldco/dashboard-render/blob/master/dashboard/src/components/addon/Addon.js#L146
                          onSuccess={({ detail }) => {
                            if (detail.redirectUrl) {
                              setIsSubmitting(false);
                              Object.assign(document.createElement("a"), {
                                target: "_blank",
                                rel: "noopener noreferrer",
                                href: detail.redirectUrl
                              }).click();
                            }
                          }}

If you remove that if, then it will fire 2 events with one having undefined for detail.redirectUrl. Basically, we’re writing code around this bug rather than fixing it in UI.
But also it should follow that events only need to be emitted from a user event (in all 3, clicking a <button>). IMO there’s no reason why the action should be user clicks button > component fires action > parent re-fires same action. This PR takes out the last step.


3.9.0 BE - Replacing Weekly / Daily returns error

General information
Project issue is for:
3.9.0 BE
Expected result:
Daily / Weekly get replaced with another
Actual result:
Server crash, client fine
How to reproduce

Accept a daily
Replace.

Originally written by Stealthsuit

Fixed

Originally written by Stealthsuit


Add ability to configure which hostname/IP the server listens on

Is there a way I can bind the server to <IP_ADDRESS> address
with http-server,  we do this -a flag
http-server -a <IP_ADDRESS>
with webpack-dev-server  we do this with --host flag
webpack-dev-server --host <IP_ADDRESS>
This would be very useful when we deploy it inside containers

Just tested, it serves from both,  the localhost and the public IP. So no need to have that flag,
however if someone really like to use it as a local-web-server then there should be a way to serve from only localhost.
Closing this issue

local-web-server binds to <IP_ADDRESS> by default, therefore it listens all available hostnames (<IP_ADDRESS>, localhost, external IPs, hostname, whatever is in /etc/hosts).
However, I like your idea to make this configurable so re-opening. thanks.

I can look into this.
It would also be good practice to bind to localhost only by default (secure defaults). That would require people who want their local webserver to be available outside of their machine to explicitly set ---address <IP_ADDRESS>.

this is resolved by the --hostname option in v2 which is in progress and available for preview.. any feedback welcome.

this is resolved by the --hostname option in v2 which is in progress and available
for preview https://github.com/lwsjs/local-web-server/tree/next.. any
feedback welcome.

Nice! Tested, works as expected.
I would rename to option though, --hostname is confusing. The socket is
bound to an IP address, not a hostname. Specifying a hostname requires a
DNS lookup, which really makes no sense in this case.
In other tools, this option is usually called --bind, --listen or
--address (with --bind being the most common).
Also, from a security standpoint, a good habit would be to bind to
localhost by default, and not expose the server to the outside.
echo mailto: NOSPAM !#$.'<>'|sed 's. ..'|tr "<> !#:2" org@fr33z3

hi.. I use hostname because its value is passed directly to the hostname option of server.listen.. but i take your point about names that users are more familiar with, i will look into it.

fixed and released in v2.0.0


Embed source code snippets from example repos

I'd like to embed code snippets on the website

using https://github.com/grafana/embedmd (or something similar)
from https://github.com/open-telemetry/opentelemetry-java-examples
to https://opentelemetry.io/docs/languages/java/

Great - I'll just wait for more feedback on this issue :smile:

I suggest moving this to Discussion.

As Severin pointed out in Slack, we have some tooling setup for code snippet refresh already, and it's tooling that has been used (for almost 9 years) and continues to be in use at Google, so it is well vetted; and the tools continue to be updated -- for the (current) canonical home of the tools, see https://github.com/dart-lang/site-shared/tree/main/packages. (Insider note that a JS rewrite of the tooling is in the works.)
I took a quick look at embedmd and I get the impression that it figures out which lines of code to bring in based on regexes. This is only one of the snippet extraction modes supported by the current tools, and generally not the preferred one given that it can be brittle. In the experiences I've had at Google maintaining websites with lots of code snippets, generally the best option (least brittle) is to add annotations to the source files for the purpose of delimiting code snippets. This makes it more obvious to developers when they update the code as to whether their changes might impact (and possibly break) code snippet extraction.
That being said, if you want to only use regexes with the current tooling you can.
I hope this helps.
FYI, I'm at half time this month and OOO all of next week. I'd be glad to work through a more complete example of the use of the current tooling, but it probably won't be until the end of the month. I'll do my best to answer any questions you might have as soon as I'm available.

I suggest moving this to Discussion.

I think this is a very concrete ask (add code sync for java) with a binary answer (yes we do this, here is a PR, no we don't do this, close this issue), so a discussion might not be necessary.
on topic @chalin: would you be fine with @zeitlinger creating a PR for what he wants to accomplish using the current tooling (code_excerpter)?

@chalin: would you be fine with @zeitlinger creating a PR for what he wants to accomplish using the current tooling (code_excerpter)?

Yes, of course! 🙌🏻
There is one tweak that I want to make to the tooling so that it plays more nicely with Prettier, but the tools are usable as is.


Cannot find the LaTeX root file with \begin{document}

I use beamer for my course notes. In order to easily create the slides (with transittions) and handouts, I use the "three file setup":
File "course_slides.tex" contains only two lines:
\documentclass[10pt,t]{beamer}
\input{the_course.tex}
File "course_handouts.tex" contains only two lines:
\documentclass[10pt,t,handout]{beamer}
\input{the_course.tex}
File "the_course.tex" contains the course material:
[preamble]
\begin{document}
this is an interesting course
\end{document}
When I want to compile course_slides.tex, atom-latex fails by stating it cannot find the LaTeX root file and gives me three options. When I set the root file manually (with the home button, for example), atom-latex registers this, but fails with the same error as before.
Does atom-latex check the root file for a "\begin{document}" line? I don't think this is a wanted feature in case the user sets the root file explictly.

Hi,
The package follows a simple hierarchy to determine the root file. It pareses files for the \begin{document} line only if no explicit root file is set.
Once the file is manually set - it should not again parse all directory files.
I am a bit confused though - when you compile the_course.tex what is the root file you'd want?

Closing this issue given the lack of response - feel free to comment to open it up again!


VFPT-like enhanced syntax highlighting

The Visual F# Power Tools used to feature enhanced syntax highlighting, that highlighted syntax such as functions, mutable variables/ref cells, modules, etc. I find this really useful and it makes F# looks like a first class language in VS.
I'm not sure whether there's an issue already to track porting VFPT features over from the extension to this repository, but it's a shame that we're losing some features in VS 2017 for F# as VFPT won't be supported.

I thought @vasily-kirichenko had VFPT building on vs2017?  I'd certainly support the extended syntax highlighting, although I'm also of a mind that it's the sort of thing that's perfect for a power tools-like extension; offering even more great functionality on top of a good base of in-box features.

I'm sure it does work on 2017 but I thought the features of VPFT were being migrated to the official extension? Also I don't following the logic as to why extended syntax highlighting shouldn't be in the main extension - it has a minuscule performance cost and is really useful for users.
F#'s out-of-the-box syntax highlighting is barely better than a basic grammar that can be written up in a few lines (keywords, strings, comments).

Syntax higlighting in VS2017 is way better than it was in vanilla VS2015, but I do miss the mutable bindings being in a different colors and probably few other things.
It would be great to bring at least the mutable colorization IMHO.
The problem with having a next version of VFPT is also that it incurs having two times the FCS codebase instanciated, which means twice the objects in cache (AFAIU), it also seems that from development perspective, although VF# solution is bulkier, it helps to have FCS codebase at hand for easy stepping etc. @vasily-kirichenko was saying to me it is preferable to contribute features to this repository.

Ah, yes that would be untenable.  I think it's a good feature, just not something that I would prioritize over getting "IDE feature parity" with C#/VB and proper settings in place to toggle and customize features.  I'd happily accept the PR, though.

@smoothdeveloper
We would welcome a PR to add that feature, and any others that improved the experience of F# developers using the Visual F# tools.
Kevin

Yes a PR is good to fix what is missing.
On the question of enabling 3rd part VS extensions, I don't know what are the road blocks to avoid adding dependency on FCS in 3rd part VS extension, but I'm guessing removing internal in few places in the language service bits and shipping a nuget package for it would be the way to go; can we have some feedback from people who know better on that matter?

We made a good deal of internal Compiler Service stuff public at the beginning of this release.  If there are still API's that are internal that need to be made public then make a PR or a proposal to change them to public and we can have a discussion.

I don't think I'd like to resurrect VFPT. I just don't see the point. About two FCS instances, it'd not be the case because FSharpChecker is already exposed as MEF service and we would very easily use it in VFPT, but again, I don't think it's a good idea to have VFPT at all.

@vasily-kirichenko has started this work in #2341

@KevinRansom thanks

If there are still API's that are internal that need to be made public then make a PR or a proposal to change them to public and we can have a discussion.

Right now I'm porting some VFPT code which uses FCS, it wants to expose range which is defined as internal in this repository, this forces me to start defining more things as internal or to redesign the code.
I think whatever is public in FCS currently should be made public in FSharp.Compiler assembly (or only in FSharp.Compiler.LanguageService if we want to add #if but what is the point?). As there is nobody right now which going to depend on FSharp.Compiler or FSharp.Compiler.LanguageService, I'd be for aligning with FCS codebase if that makes sense.
@dsyme do you have opinion on how to handle those cases?

Tagging #2348 for tracking purposes.  @saul do you feel that this issue has been thoroughly addressed?

Yes @cartermp - I'm under the impression that the VFPT code was ported over directly.
I believe there's still an outstanding issue that @vasily-kirichenko commented on the PR:
"About the commented code in service.fs, it's an attempt to determine if vref is of type Ref`1. I asked @dsyme for help, but he's not answered."

@saul Do you have a link for the specific piece of code? thanks

I'll close this since the main work has been done
@vasily-kirichenko To tell if something is a ref cell, use this:
val isRefCellTy   : TcGlobals -> TType -> bool

It's implemented long time ago.


cmake build faild!!

hi this is my error:
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Boost (missing: system date_time random) (found suitable
version "1.72.0", minimum required is "1.72.0")
Is it because of my boost version?

Probably.  See my comments here.
Basically, until some updates are made, Boost > 1.69.0 won't work.  And Heaven help you if you are trying to get it to work on Visual Studio 2019, because it's very difficult (but not impossible) to do.

Boost 1.71 is the new default package version on Ubuntu 20.04 LTS: link.


How to compose YAML file if the model has multiply outputs??

Such as mobilenet-ssd, or mtcnn? How to set the "output_tensors", "output_shapes " in YAML file?
Could you give an example?

     subgraphs:
     - input_tensors:
         - input0
         - input1
       input_shapes:
         - 1,224,224,3
         - 1,224,224,3
        output_tensors:
          - output0
          - output1
        output_shapes:
          - 1,1001
          - 1,1001

@bluelml
   output_tensors:
     - output0
     - output1
   output_shapes:
     - 1,1001
     - 1,1001

Thanks a lot.


Adding jdk 17 to CI

Signed-off-by: Martin Gaievski<EMAIL_ADDRESS>Description
Adding JDK17 support
Issues Resolved
#312
Check List

[X] Commits are signed as per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Codecov Report

Merging #322 (990a3d7) into main (580411e) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main     #322   +/-   ##
=========================================
  Coverage     83.49%   83.49%
  Complexity      889      889
=========================================
  Files           127      127
  Lines          3829     3829
  Branches        361      361
=========================================
  Hits           3197     3197
  Misses          470      470
  Partials        162      162

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 580411e...990a3d7. Read the comment docs.

Why is it in draft state @martin-gaievski?

I'm adding some doc changes, draft is mainly to submit CI build job for JDK 17


Should document CARGO_CFG_* environment variables

Cargo exports these extremely useful variables but they aren’t documented in http://doc.crates.io/environment-variables.html.
(I also wrote a blog post on them, if anybody needs some use-cases for them)

rustc --print cfg

Original docs for this are at: https://github.com/rust-lang/rfcs/blob/master/text/1721-crt-static.md#lowering-cfg-values-to-cargo-build-script-environment-variables


Change language

I did everything according to the example, but for some reason I get this error when changing the language
async function changeLanguage(lang: any) {
    const { default: lngDict = {} } = await import(`~/locales/${lang}.json`);
    locale(lang, lngDict)
  }

Uncaught (in promise) TypeError: Cannot read property 'onUpdate' of undefined

Please provide a full example. For example with: https://codesandbox.io/s/github/zeit/next.js/tree/master/examples/hello-world?

@StarpTech https://codesandbox.io/s/hardcore-cray-jpitl

This works https://codesandbox.io/s/recursing-goldstine-ynls9?file=/layouts/MainLayout.js

I made mistake in the docs. You have to use i18n.t instead { t } = i18n = i18n `
The first argument is always the event, not the select value.


Prevent modification of Fastly-Client-IP by client

As recommended in Fastly's documentation: https://developer.fastly.com/reference/http-headers/Fastly-Client-IP
If a client sets this header themselves, Fastly will use it. This has implications for us as we set the value of this header as the value of another header 'True-Client-IP', which is later set as the real_ip_header in Nginx config at origin.

Deployed to staging to exercise it a bit.


feat: add caching

Why do you evict cache entries when they're touched?

What do you mean by evict?

It's just that your implementation won't save any RAM. If you don't encounter a chat member for a long time, you won't evict it from the cache.

Either let the cache grow indefinitely (TDLib way), or put the cache items in a queue that is kept sorted by modification time and then purge old items from the tail via a timeout, or use a ring buffer instead of a map (capacity instead of TTL).

I'll let it grow and we'll burn that bridge when we cross it.

Rubber-stamp LGTM. Not gonna mention missing tests for this plugin.

Please review the latest commit. I will also not mention missing tests :P

Merge it


Modify Filenames

Hey Mate,
Just wandering if it were possible to control the filename's?
Cheers,
Dave

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Hello, sorry there is currently no option to control the filenames, but you can use the --folder-structure option to control the directory names.

Would like to see it too.
e.g. to put the date in the file 2018-12-17-$name-of-the-file$
That would be a nice option

Yeah, that’s what I was hoping to do

I agree, this would be a great option!
I also need to create a manifest file that tracks the original ID and downloaded file. Right now we're just checking for the existence of the filename to see if it has already been downloaded, but this is not very reliable. And custom filenames might make this worse. I'll think about adding a custom filename format after working on this. The advantage is that you could change the filename format at any time, and the script could automatically rename the files. Also I want to change the default filename format to match the structure of the original Photos app on Mac.
Anyway, I don't have a lot of time to dedicate to this project, so it would be great if some other Python developers wanted to contribute. But I'll see if I can get around to it


assocPath regression in 0.23.0

I originally raised this in https://github.com/ramda/ramda/issues/2040 but it didnt bump the issue so i thought id raise it separately, so the other issue can be closed

I think Ive found another regression in assocPath in v0.23. The following code seems to work fine in v0.22.
const num1 = 2
const num2 = 2

const data = {
  aaa: {
    bbb: {}
  }
}

assocPath(
  ["aaa", "bbb", num1, "ccc", num2],
  {value: 333},
  data
)

returns...
{"aaa": {"bbb": {"2": {"ccc": [undefined, undefined, {"value": 333}]}}}}
instead of...
{"aaa": {"bbb": {"2": {"ccc": {"2": {"value": 333}}}}}}

Hi @burt202 , this does look like undesirable behavior to me, would you like to submit a PR?

@buzzdecafe fretted about this in https://github.com/ramda/ramda/pull/1926#issuecomment-252246777,
but I think this is still the best we're going to get with this.
The issue is that we now treat integers as array indices and strings as normal property operators.  That is all for the good, but it can lead as it does here to sparse arrays.  If we change num2 to '2', you would get the result we got in v0.23.  (The reason that num1 works properly is that aaa.bbb is already an object, so we just add a '2' property.  (Actually, we add a 2 property, but JS is kind (?) enough to convert it for us.
So my take is that this is the expected result.

In my opinion this looks more like a fix to undesirable behavior, than one of it's own.

@IMalyugin: Can you explain why?  The goal was to be able to support more data formats, so that we could address foo in {a:  {b: ['foo', 'bar'], c: 'baz'}, d: 'qux'}, via ['a', 'b', 0] in all our *path functions.


Update AC/DC docs

This branch continues from mt/ac-docs:

Switch to MathJax3 (MathJax is deprecated)
Utility functions for reusing our definitions.tex file
Slightly widened the docs-main div so the labels fit
Updated AC docs
Updated DC docs

Note this version doesn't have the corresponding dual next to each constraint / in the data table.
https://ai4opt.github.io/OPFGenerator/previews/PR153/opf/acp/

@klamike should I close #151 or merge this branch into mine? If the latter, can you update the target branch for the PR please?

If you like this one, close #151

Note this version doesn't have the corresponding dual next to each constraint / in the data table.

The reason for indicating the dual variables in bracket is because I want to (eventually) write down the dual formulations as well.
I can do that in a separate PR, and it doesn't require indicating dual variables in the primal formulation... but it will (re)introduce the mathematical symbols for dual variables.

Makes sense. Note our dual definitions are already in the definitions.tex so it shouldn't take long to add them.

There remains one thing that I feel strongly about: writing the constraints with only constant terms in the RHS.
I feel strongly about it because it's been an issue for us in the past when working on dual formulations.
I can make the change in the same PR as when I add the dual formulations.


Error when using  "Method Call" for the record.

As, we can see in the screen shot I am using method call option from the pre listed options.

When I click on the button I see the error on page. Here are the logs.

Rails version  : 7.0.0.alpha3
Ruby Version : ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin20]
OS : macOS Monterey
motor-admin (0.2.35)
Started PUT "/motor_admin/api/data/trade_symbols/196/buy" for ::1 at 2021-12-15 23:48:23 +0100
  User Load (0.2ms)  SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2  [["id", 2], ["LIMIT", 1]]
Processing by Motor::DataController#execute as HTML
  Parameters: {"resource"=>"trade_symbols", "resource_id"=>"196", "method"=>"buy"}
  Motor::Resource Maximum (0.4ms)  SELECT MAX("motor_resources"."updated_at") FROM "motor_resources"
  TradeSymbol Load (0.4ms)  SELECT "trade_symbols".* FROM "trade_symbols" WHERE "trade_symbols"."id" = $1 LIMIT $2  [["id", 196], ["LIMIT", 1]]
  Motor::Resource Load (0.2ms)  SELECT "motor_resources".* FROM "motor_resources" WHERE "motor_resources"."name" = $1 LIMIT $2  [["name", "trade_symbol"], ["LIMIT", 1]]
undefined method `[]' for nil:NilClass
......./gems/motor-admin-0.2.35/app/controllers/motor/data_controller.rb:67:in `block in execute'
......./gems/motor-admin-0.2.35/app/controllers/motor/data_controller.rb:67:in `each'
......./gems/motor-admin-0.2.35/app/controllers/motor/data_controller.rb:67:in `find'
......./gems/motor-admin-0.2.35/app/controllers/motor/data_controller.rb:67:in `execute'
......./gems/actionpack-7.0.0.rc3/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
......./gems/actionpack-7.0.0.rc3/lib/abstract_controller/base.rb:214:in `process_action'
......./gems/actionpack-7.0.0.rc3/lib/action_controller/metal/rendering.rb:53:in `process_action'
......./gems/actionpack-7.0.0.rc3/lib/abstract_controller/callbacks.rb:234:in `block in process_action'
......./gems/activesupport-7.0.0.rc3/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
......./gems/audited-5.0.2/lib/audited/sweeper.rb:16:in `around'
......./gems/activesupport-7.0.0.rc3/lib/active_support/callbacks.rb:127:in `block in run_callbacks'
......./gems/audited-5.0.2/lib/audited/sweeper.rb:16:in `around'
......./gems/activesupport-7.0.0.rc3/lib/active_support/callbacks.rb:127:in `block in run_callbacks'
......./gems/activesupport-7.0.0.rc3/lib/active_support/callbacks.rb:138:in `run_callbacks'
......./gems/actionpack-7.0.0.rc3/lib/abstract_controller/callbacks.rb:233:in `process_action'
......./gems/actionpack-7.0.0.rc3/lib/action_controller/metal/rescue.rb:22:in `process_action'
......./gems/actionpack-7.0.0.rc3/lib/action_controller/metal/instrumentation.rb:67:in `block in process_action'
......./gems/activesupport-7.0.0.rc3/lib/active_support/notifications.rb:206:in `block in instrument'
......./gems/activesupport-7.0.0.rc3/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
......./gems/activesupport-7.0.0.rc3/lib/active_support/notifications.rb:206:in `instrument'
......./gems/actionpack-7.0.0.rc3/lib/action_controller/metal/instrumentation.rb:66:in `process_action'
......./gems/actionpack-7.0.0.rc3/lib/action_controller/metal/params_wrapper.rb:259:in `process_action'
......./gems/activerecord-7.0.0.rc3/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
......./gems/actionpack-7.0.0.rc3/lib/abstract_controller/base.rb:151:in `process'
......./gems/actionview-7.0.0.rc3/lib/action_view/rendering.rb:39:in `process'
......./gems/actionpack-7.0.0.rc3/lib/action_controller/metal.rb:188:in `dispatch'
......./gems/actionpack-7.0.0.rc3/lib/action_controller/metal.rb:251:in `dispatch'
......./gems/actionpack-7.0.0.rc3/lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
......./gems/actionpack-7.0.0.rc3/lib/action_dispatch/routing/route_set.rb:32:in `serve'
......./gems/actionpack-7.0.0.rc3/lib/action_dispatch/journey/router.rb:50:in `block in serve'
......./gems/actionpack-7.0.0.rc3/lib/action_dispatch/journey/router.rb:32:in `each'
......./gems/actionpack-7.0.0.rc3/lib/action_dispatch/journey/router.rb:32:in `serve'
......./gems/actionpack-7.0.0.rc3/lib/action_dispatch/routing/route_set.rb:850:in `call'
......./gems/railties-7.0.0.rc3/lib/rails/engine.rb:530:in `call'
......./gems/railties-7.0.0.rc3/lib/rails/railtie.rb:224:in `public_send'
......./gems/railties-7.0.0.rc3/lib/rails/railtie.rb:224:in `method_missing'
......./gems/actionpack-7.0.0.rc3/lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'
......./gems/actionpack-7.0.0.rc3/lib/action_dispatch/routing/mapper.rb:48:in `serve'
......./gems/actionpack-7.0.0.rc3/lib/action_dispatch/journey/router.rb:50:in `block in serve'
......./gems/actionpack-7.0.0.rc3/lib/action_dispatch/journey/router.rb:32:in `each'
......./gems/actionpack-7.0.0.rc3/lib/action_dispatch/journey/router.rb:32:in `serve'
......./gems/actionpack-7.0.0.rc3/lib/action_dispatch/routing/route_set.rb:850:in `call'
......./gems/warden-1.2.9/lib/warden/manager.rb:36:in `block in call'
......./gems/warden-1.2.9/lib/warden/manager.rb:34:in `catch'
......./gems/warden-1.2.9/lib/warden/manager.rb:34:in `call'
......./gems/rack-2.2.3/lib/rack/tempfile_reaper.rb:15:in `call'
......./gems/rack-2.2.3/lib/rack/etag.rb:27:in `call'
......./gems/rack-2.2.3/lib/rack/conditional_get.rb:40:in `call'
......./gems/rack-2.2.3/lib/rack/head.rb:12:in `call'
......./gems/actionpack-7.0.0.rc3/lib/action_dispatch/http/permissions_policy.rb:22:in `call'
......./gems/actionpack-7.0.0.rc3/lib/action_dispatch/http/content_security_policy.rb:18:in `call'
......./gems/rack-2.2.3/lib/rack/session/abstract/id.rb:266:in `context'
......./gems/rack-2.2.3/lib/rack/session/abstract/id.rb:260:in `call'
......./gems/actionpack-7.0.0.rc3/lib/action_dispatch/middleware/cookies.rb:693:in `call'
......./gems/activerecord-7.0.0.rc3/lib/active_record/migration.rb:603:in `call'
......./gems/actionpack-7.0.0.rc3/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
......./gems/activesupport-7.0.0.rc3/lib/active_support/callbacks.rb:99:in `run_callbacks'
......./gems/actionpack-7.0.0.rc3/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
......./gems/actionpack-7.0.0.rc3/lib/action_dispatch/middleware/executor.rb:14:in `call'
......./gems/actionpack-7.0.0.rc3/lib/action_dispatch/middleware/actionable_exceptions.rb:17:in `call'
......./gems/better_errors-2.9.1/lib/better_errors/middleware.rb:87:in `protected_app_call'
......./gems/better_errors-2.9.1/lib/better_errors/middleware.rb:82:in `better_errors_call'
......./gems/better_errors-2.9.1/lib/better_errors/middleware.rb:60:in `call'
......./gems/sentry-rails-4.8.1/lib/sentry/rails/rescued_exception_interceptor.rb:12:in `call'
......./gems/actionpack-7.0.0.rc3/lib/action_dispatch/middleware/debug_exceptions.rb:28:in `call'
......./gems/web-console-4.1.0/lib/web_console/middleware.rb:132:in `call_app'
......./gems/web-console-4.1.0/lib/web_console/middleware.rb:28:in `block in call'
......./gems/web-console-4.1.0/lib/web_console/middleware.rb:17:in `catch'
......./gems/web-console-4.1.0/lib/web_console/middleware.rb:17:in `call'
......./gems/sentry-ruby-core-4.8.1/lib/sentry/rack/capture_exceptions.rb:25:in `block in call'
......./gems/sentry-ruby-core-4.8.1/lib/sentry/hub.rb:58:in `with_scope'
......./gems/sentry-ruby-core-4.8.1/lib/sentry-ruby.rb:202:in `with_scope'
......./gems/sentry-ruby-core-4.8.1/lib/sentry/rack/capture_exceptions.rb:16:in `call'
......./gems/actionpack-7.0.0.rc3/lib/action_dispatch/middleware/show_exceptions.rb:26:in `call'
......./gems/railties-7.0.0.rc3/lib/rails/rack/logger.rb:36:in `call_app'
......./gems/railties-7.0.0.rc3/lib/rails/rack/logger.rb:25:in `block in call'
......./gems/activesupport-7.0.0.rc3/lib/active_support/tagged_logging.rb:99:in `block in tagged'
......./gems/activesupport-7.0.0.rc3/lib/active_support/tagged_logging.rb:37:in `tagged'
......./gems/activesupport-7.0.0.rc3/lib/active_support/tagged_logging.rb:99:in `tagged'
......./gems/railties-7.0.0.rc3/lib/rails/rack/logger.rb:25:in `call'
......./gems/sprockets-rails-3.4.2/lib/sprockets/rails/quiet_assets.rb:13:in `call'
......./gems/actionpack-7.0.0.rc3/lib/action_dispatch/middleware/remote_ip.rb:93:in `call'
......./gems/request_store-1.5.0/lib/request_store/middleware.rb:19:in `call'
......./gems/actionpack-7.0.0.rc3/lib/action_dispatch/middleware/request_id.rb:26:in `call'
......./gems/rack-2.2.3/lib/rack/method_override.rb:24:in `call'
......./gems/rack-2.2.3/lib/rack/runtime.rb:22:in `call'
......./gems/activesupport-7.0.0.rc3/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
......./gems/actionpack-7.0.0.rc3/lib/action_dispatch/middleware/executor.rb:14:in `call'
......./gems/actionpack-7.0.0.rc3/lib/action_dispatch/middleware/static.rb:23:in `call'
......./gems/rack-2.2.3/lib/rack/sendfile.rb:110:in `call'
......./gems/actionpack-7.0.0.rc3/lib/action_dispatch/middleware/host_authorization.rb:118:in `call'
......./gems/railties-7.0.0.rc3/lib/rails/engine.rb:530:in `call'
......./gems/puma-5.5.2/lib/puma/configuration.rb:249:in `call'
......./gems/puma-5.5.2/lib/puma/request.rb:77:in `block in handle_request'
......./gems/puma-5.5.2/lib/puma/thread_pool.rb:340:in `with_force_shutdown'
......./gems/puma-5.5.2/lib/puma/request.rb:76:in `handle_request'
......./gems/puma-5.5.2/lib/puma/server.rb:447:in `process_client'
......./gems/puma-5.5.2/lib/puma/thread_pool.rb:147:in `block in spawn_thread'
Completed 500 Internal Server Error in 13ms (Views: 0.3ms | ActiveRecord: 1.0ms | Allocations: 4574)

@grsahil20 you you provide the content of your resource configs from motor.yml as well as the model name from rails?
I'can't reproduce this issue in the development env so it must be something wrong with your specific configs.

Model
# == Schema Information
#
# Table name: trade_symbols
#
#  id     :bigint           not null, primary key
#  name   :string
#  symbol :string
#
class TradeSymbol < ApplicationRecord

  has_many :orders, dependent: :destroy

  validates :name, presence: true, uniqueness: true
  validates :symbol, presence: true, uniqueness: true

  scope :with_open_place_holder_orders, -> { joins(:open_place_holder_orders)}

  def buy_for_fun
     p "buy_for_fun"
  end

 ...
  ...
end

Logs
Started PUT "/motor_admin/api/data/trade_symbols/196/buy_for_fun" for ::1 at 2021-12-16 15:05:32 +0100
  User Load (0.2ms)  SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2  [["id", 2], ["LIMIT", 1]]
Processing by Motor::DataController#execute as HTML
  Parameters: {"resource"=>"trade_symbols", "resource_id"=>"196", "method"=>"buy_for_fun"}
  Motor::Resource Maximum (0.3ms)  SELECT MAX("motor_resources"."updated_at") FROM "motor_resources"
  TradeSymbol Load (0.2ms)  SELECT "trade_symbols".* FROM "trade_symbols" WHERE "trade_symbols"."id" = $1 LIMIT $2  [["id", 196], ["LIMIT", 1]]
  Motor::Resource Load (0.2ms)  SELECT "motor_resources".* FROM "motor_resources" WHERE "motor_resources"."name" = $1 LIMIT $2  [["name", "trade_symbol"], ["LIMIT", 1]]
undefined method `[]' for nil:NilClass
......./gems/motor-admin-0.2.35/app/controllers/motor/data_controller.rb:67:in `block in execute'

Motor.yml
- name: trade_symbol
  preferences:
    actions:
    - visible: false
      name: edit
    - visible: false
      name: create
    - visible: false
      name: remove
    - name: buy
      display_name: Buy
      action_type: api
      preferences:
        api_path: "/mapi/trade_symbols/{id}/buy"
    - name: sell
      display_name: Sell
      action_type: api
      preferences:
        api_path: "  /mapi/trade_symbols/{id}/sell"
    - name: buy_for_fun
      display_name: buy_for_fun
      action_type: method
      preferences:
        method_name: buy_for_fun
    columns:
    - default_value: ''
      name: updated_at
    - access_type: read_write
      name: id
    - name: open_close_orders
      display_name: open_close_orders
      column_type: boolean
      access_type: read_write
      default_value: ''
      virtual: true
      format: {}
  updated_at: 2021-12-16 14:05:19.000780000 +00:00- name: trade_symbol
  preferences:
    actions:
    - visible: false
      name: edit
    - visible: false
      name: create
    - visible: false
      name: remove
    - name: buy
      display_name: Buy
      action_type: api
      preferences:
        api_path: "/mapi/trade_symbols/{id}/buy"           // workaround using api for buy and sell
    - name: sell
      display_name: Sell
      action_type: api
      preferences:
        api_path: "  /mapi/trade_symbols/{id}/sell"           // workaround using api for buy and sell
    - name: buy_for_fun
      display_name: buy_for_fun
      action_type: method
      preferences:
        method_name: buy_for_fun
    columns:
    - default_value: ''
      name: updated_at
    - access_type: read_write
      name: id
    - name: open_close_orders
      display_name: open_close_orders
      column_type: boolean
      access_type: read_write
      default_value: ''
      virtual: true
      format: {}
  updated_at: 2021-12-16 14:05:19.000780000 +00:00

@grsahil20 can you please provide the content of your Motor::Resource.find_by(name: 'trade_symbol').preferences
It seems like the action preferences are not present in the database but not sure why it happened - maybe because the motor.yml file was edited manually?

3.0.0 :001 > Motor::Resource.find_by(name: 'trade_symbol').preferences
  Motor::Resource Load (8.8ms)  SELECT "motor_resources".* FROM "motor_resources" WHERE "motor_resources"."name" = $1 LIMIT $2  [["name", "trade_symbol"], ["LIMIT", 1]]
 =>
{"actions"=>
  [{"visible"=>false, "name"=>"edit"},
   {"visible"=>false, "name"=>"create"},
   {"visible"=>false, "name"=>"remove"},
   {"name"=>"buy", "display_name"=>"Buy", "action_type"=>"api", "preferences"=>{"api_path"=>"/mapi/trade_symbols/{id}/buy"}},
   {"name"=>"sell", "display_name"=>"Sell", "action_type"=>"api", "preferences"=>{"api_path"=>"  /mapi/trade_symbols/{id}/sell"}},
   {"name"=>"buy_for_fun", "display_name"=>"buy_for_fun", "action_type"=>"method", "preferences"=>{"method_name"=>"buy_for_fun"}},
   {"name"=>"buy_", "display_name"=>"buy_for_fun", "action_type"=>"method", "preferences"=>{"method_name"=>"buy_for_fun"}}],
 "columns"=>
  [{"default_value"=>"", "name"=>"updated_at"},
   {"access_type"=>"read_write", "name"=>"id"},
   {"name"=>"open_close_orders", "display_name"=>"open_close_orders", "column_type"=>"boolean", "access_type"=>"read_write", "default_value"=>"", "virtual"=>true, "format"=>{}}]}
3.0.0 :002 >

I added a new function but same result
  Motor::Resource Load (1.4ms)  SELECT "motor_resources".* FROM "motor_resources" WHERE "motor_resources"."name" = $1 LIMIT $2  [["name", "trade_symbol"], ["LIMIT", 1]]
 =>
{"actions"=>
  [{"visible"=>false, "name"=>"edit"},
   {"visible"=>false, "name"=>"create"},
   {"visible"=>false, "name"=>"remove"},
   {"name"=>"buy", "display_name"=>"Buy", "action_type"=>"api", "preferences"=>{"api_path"=>"/mapi/trade_symbols/{id}/buy"}},
   {"name"=>"sell", "display_name"=>"Sell", "action_type"=>"api", "preferences"=>{"api_path"=>"  /mapi/trade_symbols/{id}/sell"}},
   {"name"=>"buy_for_fun", "display_name"=>"buy_for_fun", "action_type"=>"method", "preferences"=>{"method_name"=>"buy_for_fun"}},
   {"name"=>"buy_", "display_name"=>"buy_for_fun", "action_type"=>"method", "preferences"=>{"method_name"=>"buy_for_fun"}},
   {"name"=>"new_fun_unique", "display_name"=>"new_fun_unique", "action_type"=>"method", "preferences"=>{"method_name"=>"new_fun_unique"}}],
 "columns"=>
  [{"default_value"=>"", "name"=>"updated_at"},
   {"access_type"=>"read_write", "name"=>"id"},
   {"name"=>"open_close_orders", "display_name"=>"open_close_orders", "column_type"=>"boolean", "access_type"=>"read_write", "default_value"=>"", "virtual"=>true, "format"=>{}}]}
3.0.0 :002 >

You can see new_fun_unique

Should I create a new dummy app, and share the Github link here ?

@grsahil20 yeah, that would be great if you can create a rails app that reproduces this error and share the link

closed - unable to reproduce

@omohokcoj  reopening this as I have some issue and created a dummy application.

@grsahil20 please check the latest version, method call should be fixed there: https://rubygems.org/gems/motor-admin/versions/0.2.59

👍

Thats awesome. Thanks a lot. This will make my life a bit easy :) 👍


Review outdated and/or publicly inaccessible links

Examples:

References to BitBucket (may still be appropriate in some cases, but no longer the standard)
References to internal trimble google sites, like the very dated open source policy
others?

I've ran a broken-link scan on the site and we're all fine on this.
We do still have a link to the very old Open Source Policy (last updated 2014!), but I'm not aware of a newer/different version of that document. Any ideas on that?

Just got out of a meeting where we're discussing updates to that policy. Stay tuned!


No error or information provided when auth not setup properly

I got reading the docs, attempted a post creation as follows:
const WPAPI = require('wpapi');
var wp = new WPAPI({
endpoint: 'https://www.example.net/wp-json',
// This assumes you are using basic auth, as described further below
username: 'hgezim',
password: 'pass',
auth: true
});
wp.pages().create({
// "title" and "content" are the only required properties
title: 'Your Post Title',
}).then(function( response ) {
// "response" will hold all properties of your newly-created post,
// including the unique id the post was assigned on creation
console.log("sup....");
console.log('supt:', response);
console.log("all: ", arguments);
console.log( response.id );
});
I got no error or any other information saying auth failed. I didn't install https://github.com/WP-API/Basic-Auth as I missed that part in docs.
This also happens if I have wrong password after installing Basic Auth plugin on my site.

Your example code here does not include any Promise error handling -- if you add a
.catch( function( error ) {
    console.log( error );
} );

to the end of the promise chain, you should see an authentication error. I'm going to close this as it appears not to be an issue with the library itself (Promise error handling can be confusing, but it's what we have to work with); if you find that doing as I suggested does not work, please comment below and we can re-open to investigate. Thanks for trying out the library!


Add compatibility with AquaAcrobatics

Added code to check if AquaAcrobatics is installed, as the mod doesn't work with Galacticraft.

Related issues:

https://github.com/embeddedt/aquaacrobatics/issues/16
https://github.com/embeddedt/aquaacrobatics/issues/30
https://github.com/embeddedt/aquaacrobatics/issues/140
https://github.com/TeamGalacticraft/Galacticraft-Legacy/issues/17


WIP: new python module

Here is my new python module

!dagger -m github.com/kpenfound/dagger-modules/ruff@4c9d04b461f9e0fce3ff40399570f635f586d972 call check --directory ./my-new-python-mod
This PR has no test so I am trying to run the Ruff linter on this new module


Error in installing pywrap_tensorflow module

Type: Bug
I am not able to install pywrap_tensorflow module , it is showing like below
ERROR: Could not find a version that satisfies the requirement pywrap_tensorflow (from versions: none)
ERROR: No matching distribution found for pywrap_tensorflow
if I tried to install tensorflow that is also getting same error
how to resolve these errors
VS Code version: Code 1.85.1 (0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2, 2023-12-13T09:49:37.021Z)
OS version: Windows_NT x64 10.0.22621
Modes:

We closed this issue because it is a question about using VS Code rather than an issue or feature request. Please search for help on StackOverflow, where the community has already answered thousands of similar questions. You may find their guide on asking a new question helpful if your question has not already been asked. See also our issue reporting guidelines.
Happy Coding!


Improve support for photo search api

Add support for is_getty, is_commons and in_gallery.

Can you remove the pom/gradle changes please, they don't seem related to the search API changes.
Thanks.

Sorry - I was somewhat overzealous with the -a flag to git commit and committed some inadvertent changes then undid them. I've squashed everything into a single commit that does what is intended now.

Thanks for this change.


DEMONSTRATION OF A "Roll your own protobuf.Any" Approach

:nut_and_bolt: Description
PROTOTYPE/DEMO ONLY
This PR is for comparison with https://github.com/chef/automate/pull/346
:+1: Definition of Done
:athletic_shoe: Demo Script / Repro Steps
:chains: Related Resources
:white_check_mark: Checklist

[ ] Necessary tests added/updated?
[ ] Necessary docs added/updated?
[ ] Code actually executed?
[ ] Vetting performed (unit tests, lint, etc.)?

The concept is demonstrated and we decided on a design here so no need for this any more.


Getting session in API route

Hey,
first of all, thanks for this easy Steam OAuth integration.
The next-auth docs mention the following snippet with getServerSession for getting a user's session within API routes (I came across it as my attempt to get the session with getSession({req}) returns null within my API routes):
import { authOptions } from 'pages/api/auth/[...nextauth]'
import { getServerSession } from "next-auth/next"

export default async function handler(req, res) {
  const session = await getServerSession(req, res, authOptions) // <---- authOptions is supposed to be an object

  if (!session) {
    res.status(401).json({ message: "You must be logged in." });
    return;
  }

  return res.json({
    message: 'Success',
  })
}

Here, authOptions - e.g the object with {providers: [...], secret: [...]} - has to be passed as a "pure" object.
Your README, however, shows a setup like this in [...nextauth].ts:
export default function handler(req: NextApiRequest, res: NextApiResponse) {
  return NextAuth(req, res, {
  [...]
  providers: [
      SteamProvider(req, {
   [...]
    }
  ]
 }
}

So the SteamProvider expects a req. This makes their way of passing the authOptions as a pure object impossible when using your package as one of the providers, or am I missing something?
Now I'm wondering: is there a common way to use getServerSession with your Steam OAuth integration? Or am I the only one getting null when calling getSession({req}) inside API routes? 😄

I came up with this solution (?):
export default function handler(req: NextApiRequest, res: NextApiResponse) {
  return NextAuth(req, res, authOptions(req));
}

export function authOptions(req: NextApiRequest): AuthOptions {
  return {
    providers: [
      SteamProvider(req, {
       [...]
}]
}
}

and then pass the req object to getServerSession:
 const session = await getServerSession(req, res, authOptions(req));

This hasn't caused any unexpected behaviour so far, and after taking a look at what this package does with req internally, I don't see any issue with this solution at first glance.
I'm still interested in how you guys deal with getServerSession and this package 😄

Hey @maxeth, thanks for your interest in my project.
There's an example of using getServerSession: https://github.com/Nekonyx/next-auth-steam/tree/master/examples/get-server-session
In short, yes, we get auth options in method:
export default async function handler(
  req: NextApiRequest,
  res: NextApiResponse
) {
  return NextAuth(req, res, getAuthOptions(req))
}

export function getAuthOptions(req: NextApiRequest): AuthOptions {
  return {
    providers: [
      SteamProvider(req, {
        clientSecret: process.env.STEAM_SECRET!,
        callbackUrl: 'http://localhost:3000/api/auth/callback'
      })
    ],
    callbacks: {
      jwt({ token, account, profile }) {
        if (account?.provider === PROVIDER_ID) {
          token.steam = profile
        }

        return token
      },
      session({ session, token }) {
        if ('steam' in token) {
          // @ts-expect-error
          session.user.steam = token.steam
        }

        return session
      }
    }
  }
}


Update test suite to work with 0.17

Problem:

core tests didn't work with 0.17

Solution:

Use updated elm-test
Update syntax
to run now, you just need to do ./set-up-tests.sh and it will take care of everything
Update travis (currently failing due to Json.Decode possible bug, see other notes)

Other notes:

No longer need to clone elm-console or anything else! No need for any external native packages
Every test passed, except for decoding large ints in Json.Decode. Based on this commit, it might just be that the tests are outdated, and should actually be failing for ints like<PHONE_NUMBER>948 anyway. Updating the tests to expect decoding to fail means the whole test suite passes.
When 0.17 is released, I'll make a PR to use 0.17 final binary and update elm-test package to be elm-community/elm-test

Awesome, thank you!


Duplicated slugs are created

Hi,
Just testing this package, and when I set two entries to have the same title the slug is identical for both entries. I tried setting the field as unique which appears have no difference. Is there a setting somewhere to accommodate only unique slugs?

Their is no code for ensuring uniqueness for slugs , please see the discussion in #24 for the full discussion. Essentially, if a unique slug is wanted a unique value should be passed.


Fix noticeable warnings in workflow component html

Fixing all the obvious issues reported by IDE in this workflow component html.
For ga4gh/dockstore#1394

Codecov Report

Merging #291 into develop will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop     #291   +/-   ##
========================================
  Coverage    66.04%   66.04%
========================================
  Files          126      126
  Lines         4076     4076
  Branches       412      412
========================================
  Hits          2692     2692
  Misses        1291     1291
  Partials        93       93

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 27f9a52...6dad59c. Read the comment docs.


Add showCommentDescription config

Defaults to false.
Relies on https://github.com/leetcode-tools/leetcode-cli/pull/11
Solves #287
Demo:

@Vigilans 2.6.5 has been released. Please update the dependency as well. Thanks.


Update scheduled-events.md

API version "2017-03-01" is Preview release.
It should be "2017-08-01".

@ShuheiUda : Thanks for your contribution! The author, @ericrad, has been notified to review your proposed change.

@EricRadzikowskiMSFT Can you please review this PR and approve if the API version looks correct?
CC @jpconnock

+Mauricio
Sent via phone
On Apr 10, 2018, at 1:38 PM, Iain Foulds <notifications<EMAIL_ADDRESS>wrote:
@EricRadzikowskiMSFThttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FEricRadzikowskiMSFT&data=02|01|Eric.Radzikowski%40microsoft.com|94efb39cb27941a5282408d59f230b9f|72f988bf86f141af91ab2d7cd011db47|1|0|636589895220063408&sdata=UL08OtY45%2BtAGH6rTTK5ZbE%2FTHwBIsLkK4sPrXIZNx8%3D&reserved=0 Can you please review this PR and approve if the API version looks correct?
CC @jpconnockhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fjpconnock&data=02|01|Eric.Radzikowski%40microsoft.com|94efb39cb27941a5282408d59f230b9f|72f988bf86f141af91ab2d7cd011db47|1|0|636589895220063408&sdata=kS4sssD3HG9Mth5hZxBnXl3mYaduHV9SkzaScBKHtOg%3D&reserved=0
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoftDocs%2Fazure-docs%2Fpull%2F6813%23issuecomment-380238830&data=02|01|Eric.Radzikowski%40microsoft.com|94efb39cb27941a5282408d59f230b9f|72f988bf86f141af91ab2d7cd011db47|1|0|636589895220063408&sdata=p86nFBMJfIrewNpxsGDxx2gxy9cf8S3eVSn38J22ZdA%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAXxc_WUpwjvzEtQdXLD7bsLahreggTT4ks5tnRhQgaJpZM4TJkJl&data=02|01|Eric.Radzikowski%40microsoft.com|94efb39cb27941a5282408d59f230b9f|72f988bf86f141af91ab2d7cd011db47|1|0|636589895220063408&sdata=CwaT1AzTwQDKKf7j3q6SKKzM1P3D0pQldasgKIEFIJA%3D&reserved=0.

#sign-off

@MauricioMolinaMicrosoft: I'm sorry - only the author of this article, @ericrad, can sign off on your changes. But we do have an exception process - if you are on the Microsoft content or product team for this product area, you can ask the PR review team to review and merge it by sending mail to the techdocprs alias.

#sign-off

@EricRadzikowskiMSFT: I'm sorry - only the author of this article, @ericrad, can sign off on your changes. But we do have an exception process - if you are on the Microsoft content or product team for this product area, you can ask the PR review team to review and merge it by sending mail to the techdocprs alias.

#sign-off


Feature request - link to tutorial mode

It would be amazing to be able to have a link that someone selects to bring up the Galaxy UI AND tutorial mode to the tutorial!
Beginners having to navigate there seem to get lost and it puts them odd using Tutorial mode

dupe of https://github.com/galaxyproject/galaxy/issues/16387 😔 yeah banger idea bestie I agree


Optimization: Make hashing over transactions snarks partial (ledger hashes)

(was #12321, but that PR was made against compatible, this one is against develop)
The patch submitted here was originally made and tested against the release/2.0.0 branch (connected to berkeleynet and in a private cluster) when investigating where the node spends time when processing a block.
This is the small-patch version of this change, an alternative implementation (with a considerably bigger patch) instead defines alternative hash table and hash set modules that partially hash the transaction snark work that is used as a key.
Please let me know if there is a better way and I will look into it.
Explain your changes:
This patch changes how transaction snark statements are hashed (as per OCaml's hash functions) so that only the source and target ledger hashes are used to compute the hash of the statement, instead of the full statement.
The reason is that hashing the full statement is quite expensive, and because of this the reference-count tables used in the snark pool and the snark-pool-refcount frontier extension are costly to maintain. Updating such tables accounts for a big part of the amount of the time that it takes for a node to process a block.
A big assumption being made here is that the combination of source target ledger hash contained in the statement is unique enough (different statements will not contain the same hashes) to avoid work_id clashes.
NOTE: This results in different work_id values. Also, scan states serialized before this patch may load but will be invalid. Should I also bump the version of the serialized structure?
Explain how you tested your changes:
We are running two servers extended with internal tracing here, one patched, and the other unpatched.
Example results for block at height 4669 on previous berkeleynet (these were taken on Dec 2nd fo 2022):

Full hash (4.32s total)
Partial hash (1.62s total)

Expanded view on Snark-pool-Refcount frontier extension

Full hash (3.11s)
Partial hash (442.23ms)

Checklist:

[ ] Modified the current draft of release notes with details on what is completed or incomplete within this project
[ ] Document code purpose, how to use it

Mention expected invariants, implicit constraints

[ ] Tests were added for the new behavior

Document test purpose, significance of failures
Test names should reflect their purpose

[ ] All tests pass (CI will check this if you didn't)
[ ] Serialized types are in stable-versioned modules
[ ] Does this close issues? List them

@mrmr1993 thanks! I will adjust accordingly (I also need to investigate what changed, I see that now the ledger is changed in multiple passes).

For example, I think that it's possible to have a coinbase 'internal command' with a zero balance, which will result in no change to the ledgers (@deepthiskumar can you confirm?).

I see, I assumed there was always going to be a coinbase transaction affecting the ledger (and thus changing the hash).

For example, I think that it's possible to have a coinbase 'internal command' with a zero balance, which will result in no change to the ledgers (@deepthiskumar can you confirm?).

Coinbase amount is set by the network config and added during block validation and so if a block producer says there's a coinbase transaction in this block then the amount will be whatever is set in the network config. A block could have no coinbase transaction though but that doesn't matter in this context.
Fee transfers (prover fee, txns fee) could be zero but in the current out of snark implementation, only non-zero amount fee transfers are created. Again,
Re, failed transactions with zero transaction fee, there'd still be a ledger change due to nonce increment, no?

Re, failed transactions with zero transaction fee, there'd still be a ledger change due to nonce increment, no?

This is one of the main assumptions made in this change, even failed transactions will result in a ledger update (either because of a fee or the nonce). But when it comes to coinbase transactions and zkapp transactions there may be corner cases that I didn't consider.
But stepping back a bit. There can be hash clashes without issues (since these are OCaml hashes used by data structures and this is expected to happen anyway). Hash sets and hash tables will still work fine (the key value will be compared to disambiguate).
The worry is more about avoiding work-id clashes, because work_id = hash. These can still happen with full hashing, but partial hashing could increase the chances.
One option here (if we are not 100% sure that the fields used to compute the hash are enough) is to use partial hashing (using the source and target ledger hashes for both phases) for the OCaml hash, but to not use the partial hash as work-id. Instead keep hashing the full statement to compute the work-id by not using hash here:
  let work_ids t : int One_or_two.t =
    One_or_two.map t ~f:Transaction_snark.Statement.hash

and add a new Transaction_snark.Statement.work_id function.
What do you think? are there any downsides to that approach?

Coinbase or fee transfers don't do nonce increments so if we allowed zero amount coinbases or fee transfers then this would be a problem but currently the impl doesn't allow it. Applying a zkapp transaction will result in nonce increment for the fee payer part at the very least.

But stepping back a bit. There can be hash clashes without issues (since these are OCaml hashes used by data structures and this is expected to happen anyway). Hash sets and hash tables will still work fine (the key value will be compared to disambiguate).

There is still a problem when retrieving values since you only get the most recently added one? and so having clashes could result in invalid blocks whenever this occurs. Proofs retrieved could be for different statements and they are not verified again during block production.

to not use the partial hash as work-id.

Not changing the work id computation makes sense. Work ids are mainly used for debugging, to track a piece of snark work through daemon and snark workers. It doesn't impact block validation at all, I think.

Coinbase or fee transfers don't do nonce increments so if we allowed zero amount coinbases or fee transfers then this would be a problem but currently the impl doesn't allow it. Applying a zkapp transaction will result in nonce increment for the fee payer part at the very least.

Great, thanks for clarifying.

There is still a problem when retrieving values since you only get the most recently added one? and so having clashes could result in invalid blocks whenever this occurs. Proofs retrieved could be for different statements and they are not verified again during block production.

It will still work fine because here only the hash function is being modified, the compare function remains the same, and the values used as keys also remain the same.
Because the key value still needs to be compared to ensure that the key is really the same (and not just that the integer hash matches), hash clashes will not be an issue:
utop # #require "core";;
utop # open! Core;;
utop #
  module StringSameHash = struct
      type t = string
      let compare = String.compare
      let hash_fold_t state _  = String.hash_fold_t state ""
      let hash _ = String.hash ""
      let sexp_of_t _ = failwith "unimplemented"
  end
;;
(* output ->
  module StringSameHash :
  sig
    type t = string
    val compare : t -> t -> int
    val hash_fold_t :
      Base_internalhash_types.state -> 'a -> Base_internalhash_types.state
    val hash : 'a -> int
    val sexp_of_t : 'a -> 'b
  end *)
utop # StringSameHash.hash "a", StringSameHash.hash "b";;
- : int * int = (0, 0)
utop #
let samehash_table = Hashtbl.create (module StringSameHash) in
ignore @@ Hashtbl.add samehash_table ~key:"a" ~data:1;
ignore @@ Hashtbl.add samehash_table ~key:"b" ~data:2;
(Hashtbl.find samehash_table "a", Hashtbl.find samehash_table "b");;
- : int option * int option = (Some 1, Some 2)

Just pushed a new version rebased (and adjusted) over current develop. It also uses the full hashing functions to compute work_id.

Note that I ignored the connecting ledger hashes and only used the source + target ledger hashes of both passes, but if needed, I can add those too.

Not necessary anymore because of https://github.com/MinaProtocol/mina/pull/13409