Deleting brands that have been assigned to products causes checkout error

Bagisto Version: 1.1.0
I have quite few products linked to a brand which was deleted from the Brand listing and it seems that there is no cascading effect to remove the brand from the products and so when I try to checkout with any of those products I get the following error:
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (db123.order_brands, CONSTRAINT order_brands_brand_foreign FOREIGN KEY (brand) REFERENCES attribute_options (id) ON DELETE CASCADE) (SQL: insert into order_brands (order_item_id, order_id, product_id, brand, updated_at, created_at) values (38, 12, 101, 13, 2020-04-12 21:01:19, 2020-04-12 21:01:19))
Order emails are sent but the order is not created. Once I resave the products this and then checkout the error is no longer thrown. I have quite a lot of products in the database and would be difficult to go through each product just to update the brand attribute. The brand attribute should be removed from the product when the selected brand is deleted from the brand attribute.

Due to this error the Order ID and Increment ID are now different. So order with Order ID being 14 for instance actually has an Increment ID of 12. The orders page shows the order id as being 12 but the ID in the URL is 14. This seems to be an issue.

After a few more orders the Order ID and Increment ID are now the same.

feel free to reopen this if you are still facing issue


Add CRDs to Helm chart

Fixes #246

Codecov Report

Merging #273 (775d0f5) into main (53d096d) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #273   +/-   ##
=======================================
  Coverage   75.55%   75.55%
=======================================
  Files          17       17
  Lines        1489     1489
=======================================
  Hits         1125     1125
  Misses        286      286
  Partials       78       78

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 53d096d...775d0f5. Read the comment docs.

//@#Cocaiine#@\//@#LexZii`มายืนตีเขียด.,#@\//@#fOrma๋riin๊z.,#@\//@#Melo๋diied#@\//
@.***:6969#@\//@#www.giithub.com#@\//@#SOUNEDT-TRAACK-OffMelo
๋diiedffO#@\
ในวันที่ อา. 27 มี.ค. 2022 15:45 น. Xabier Larrakoetxea Gallego <
@.***> เขียนว่า:

Merged #273 https://github.com/slok/sloth/pull/273 into main.
—
Reply to this email directly, view it on GitHub
https://github.com/slok/sloth/pull/273#event-6313396247, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AYI5CT6EPLC44KEKUI2U4C3VCAU2ZANCNFSM5RYO3XFA
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>


Implement UI Additions and Changes for StorageManager

Add all the changes necessary to implement the UI changes for the new StorageManager implemented via pull requests:
https://github.com/ManageIQ/manageiq/pull/11458 for the SwiftManager
and
https://github.com/ManageIQ/manageiq/pull/11088 for the CinderManager.
A new left-side menu is added containing sub-menus for the Storage Providers,
Cloud Volumes, and Cloud Object Stores.
The Cloud Volumes and Cloud Object Stores have been removed as selections under the
Compute -> Clouds menu.
Any Storage Providers linked from another Provider will show up in the Cloud Manager detail screen.  In the case of the OpenStack CloudManager, there should be a link to a table of both the
Swift and Cinder StorageManagers.
Links

https://github.com/ManageIQ/manageiq/pull/11458
https://github.com/ManageIQ/manageiq/pull/11088

@roliveri @hsong-rh @Fryguy Please review.  @dclarizio please assign someone from the UI team to review as well.  Thanks all.

@jerryk55 Many test failures, but they seem to be related : "undefined method `id' for nil:NilClass"

@roliveri just looking at it.  It looks like the application_helper method primary_nav_class has special-case logic for cloud_volume and cloud_object_store_container that is right after a "FIXME:" comment.  this method is in every one of the stack traces.

Rubocop warnings fixed up, and spec error fixed.  Pushed again.

@jerryk55 there's still one failure:
1) EmsCloudController#show render listnav partial should respond with numeric status code 200
     Failure/Error: is_expected.to have_http_status 200
       expected the response to have status code 200 but it was 500
     # ./spec/controllers/ems_cloud_controller_spec.rb:396:in `block (4 levels) in <top (required)>'

@roliveri @dclarizio Re-pushed with remaining spec failure resolved (thanks @h-kataria for your help) and a few more RuboCop warning fixes.  This should be good to go pending final review.

@jerryk55 this PR needs some tests.  At least tests for the new routes and then whatever controller/view tests you can bring over from the code this was based on would be good.  Thx, Dan

@dclarizio working on it....

@roliveri @dclarizio @h-kataria spec tests have been added for new storage manager routes.  In order to expedite, further tests will be added later in the week under separate cover (unless I can squeeze any more in under the deadline).

@dclarizio ran in UI a little bit, looks good to merge

@dclarizio @h-kataria  as soon as the latest tests are green - running now....

Merging with above issue opened for follow up tests.

Euwe Backport details:
$ git log
commit 0426738e1ac48cc4cd798a02f9fea791166c4ed0
Author: Dan Clarizio<EMAIL_ADDRESS>Date:   Mon Oct 3 15:08:03 2016 -0700

    Merge pull request #11626 from jerryk55/storage_manager_ui_changes

    Implement UI Additions and Changes for StorageManager
    (cherry picked from commit a8b3258acefd069c3e78d0797d39bf5e50004e7a)


[RFC] Question about your implementation

Hello,
Sorry if this is not the place for this to be asked, but I was reading your code and there is a part that I don't understand. I noticed that in the base server, base.py, it's the _process_clients method that takes care of determining whether it is time to process the client reports and proceed with the aggregation process, however, this is also being done in the periodic_task if I'm not wrong. Can you perhaps explain to me how these two are different? Thank you!

Depending on self.simulate_wall_time, there are two ways of running Plato sessions in asynchronous mode. One is to run it in real-time, where _periodic_task(self) is called, and the other is to run it with the wall-clock time simulated, when _periodic_task(self) is not called. In the latter case, _process_clients() is where aggregation starts.


Retain plug-in state even on app-refresh

Plug-ins are disabled and the UX reverts to the default state when the browser/app is refreshed.
The plug-in settings can include secrets, so making this feature sticky isn't trivial.  Security must be considered

Could local-storage be utilized?

Came to add this. So I'll upvote it. Since this is just a local tool that I'm playing with, and not deploying, and not pushing up anywhere, I've just hard coded my secrets into the redux state, but that doesn't work for plugins added through the wizard 😞
LocalStorage is what I thought too. I tried adding it myself, but I haven't done any front end development in many years, and have never used redux. I'm not super familiar with Qdrant. Can that be used for simple persistence as well?


Please provide api option to change language

Hey,
It would be nice if you could provide an api option to change language.
Now I am hard coding it manually in Calendar.js, like this  _moment.locale('zh-cn').
But this does no good for team development, if my project has new team members, they would also have to add a line like this.
Also, the format api doesn't seem to work for me.
import React, { Component } from 'react';
import { DateRange } from 'react-date-range';

class MyComponent extends Component {
    handleSelect(range){
        // intuitively, I think here would log out dates in the set format,
        console.log(range);
        // but turns out I still need to do something like this
        // to get the right format dates
        // or did I set the format in a wrong way in the props??
        let startDate = range.startDate.format('YYYY-MM-DD')
        console.log(startDate);
    }

    render(){
        return (
            <div>
                <DateRange
                    onInit={this.handleSelect}
                    onChange={this.handleSelect}
                    format={ 'YYYY-MM-DD' }  // set format here
                />
            </div>
        )
    }
}

Hi @levblanc, your request considered by the new version. One of the examples exactly what you want.


enable compute_engine_creds and jwt_token_creds interop tests for managed dotnet client

They should work now due to recently added support for ChannelCredentials.
Removing _SKIP_GOOGLE_DEFAULT_CREDS and _SKIP_COMPUTE_ENGINE_CHANNEL_CREDS is out of scope for now because they rely on special functionality implemented only in C core and one the auth test cases are enabling sufficiently cover all the use cases we need.

@JunTaoLuo @JamesNK

Known failures:
https://github.com/grpc/grpc/issues/19338
https://github.com/grpc/grpc/issues/19877


Update README.md

Adding the license clickable link to the end of the page

Summary by CodeRabbit

New Features

Updated branding from "Friend" to "Omi," highlighting it as an open-source AI wearable for conversation management.
Enhanced licensing information with a direct link to the MIT License.

Documentation

Revised the introduction section in the README to reflect the new app name and description.
Removed outdated commented-out sections for clarity.

lgtm 🥳


The same name for BasicBlock

Hello, I've encountered an issue with basic block renaming in the latest version of AFLGo. I noticed the previous  issue #116  regarding this matter, and I think the fix applied should have addressed it. However, I'm still experiencing problems with basic block renaming when running it. I would appreciate your assistance. Thank you.
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

int foo(char *arr, int t1) {
  int i = 0;

  if (arr[i++] == 'c') return 0;
  if (arr[i++] == 'd') return 1;
  if (arr[i++] == 'c') return 2;
  if (arr[i++] == 'c') return 3;
  if (arr[i++] == 's') return 4;
  if (arr[i++] == 'b') return 5;
  if (arr[i++] == 's') return 6;
  if (arr[i++] == 'g') return 7;

  if (*(int *)arr != 0xdeadbeef) return 0;

  // Can we trigger this code?
  return (int)(20 / t1);
}

int main(int argc, char *argv[]) {
  // open file
  FILE *f = fopen(argv[1], "rb");

  // get file size
  fseek(f, 0, SEEK_END);
  long fsize = ftell(f);

  // read file contents
  fseek(f, 0, SEEK_SET);
  char *string = malloc(fsize + 1);
  fread(string, 1, fsize, f);
  fclose(f);

  // pass string to foo
  int retval = foo(string, argc - 2);

  free(string);
  return retval;
}

Does the problem persist, or did you find a solution?


Transformation Combinator

Inspired by Daniel's work on the parser combinator, why not re-imagine the evaluator engine as a function combinator?
At the moment (version 0.7/0.8), an XPath expression or XSLT stylesheet is compiled into a Sequence Constructor. This is a nested data structure that describes how a sequence should be constructed. Instead, use function combinators to build a new function that is the evaluator. That function would take a transformation context as its argument.

I've been doing some experimentation on this idea; these are in a new branch "transcomb". See transcomb.rs for the transformation combinator.
So far I have created functions: literal, context, sequence, compose, and step. These functions return a result which if successful contain a Sequence.
"sequence" takes a vector of functions. The result of each of these functions becomes an item in the returned Sequence. The original Context is used for each function.
"compose" takes a vector of functions. Each function is evaluated in turn, with the returned sequence of a function being used as the context of the next function. If each function is the "step" function, then this is an XPath path.
For example, a path in XPath such as child::node()/child::node() looks like:
  vec![
    step(NodeMatch{axis: Axis::Child, nodetest: NodeTest::Kind(KindTest::AnyKindTest)}),
    step(NodeMatch{axis: Axis::Child, nodetest: NodeTest::Kind(KindTest::AnyKindTest)}),
  ]
)

This gets evaluated by calling it with a Context:
ev(Context::new()).expect("evaluation failed")

Of course, the context needs to be a tree (RNode) to actually return anything. See the tests in the module for a more complete example.

Variables and functions now added.

This is looking very promising. :D

The next step will be handling XPath patterns. The current code does this by reversing a Constructor, which is OK since it is just a data structure. Reversing a function may be challenging ;-)

Unfortunately, the transformation combinator idea hasn't worked out.
Patterns were the first to go. They are basically expression in reverse and it was too difficult to represent them as a function. However, predicates in patterns still use XPath expressions so they ended up being mixed.
When I tried to bring everything together in the XSLT module it really fell apart. The combination of transformation combinator functions with parser functions and then Pattern structures just became too complicated. :-(

Was worth trying anyway! I've redone so many parts of the XML parser... nevermind the Ship of Theseus, I could build him a whole fleet! But I needed to do it to know what way to go about it.
"I have not failed. I've just found 10,000 ways that won't work.”
― Thomas A. Edison

We may revisit this at some point in the future. I've spent months working on it and it feels bad to give up on the whole approach. However, I certainly have learned a lot along the way.
I'm still using the parser combinator, just producing an Enum instead of functions.


Add support for imported objects and templates for gofpdf v2

This allows v2 of gofpdf to use gofpdi free pdf document importer.  The code that calls gofpdi is in the jung-kurt/gofpdfcontrib repository.

Many thanks, @phpdave11!


Improved Multi Network Selector component

Problem solved
Short description of the bug fixed or feature added

PR-Codex overview
This PR focuses on refactoring the NetworkDropdown component to create a new MultiNetworkSelector component, enhancing the selection of multiple networks. It also improves the MultiSelect component's functionality and styling.
Detailed summary

Added data-scrollable attribute to ScrollShadow.
Renamed NetworkDropdown to MultiNetworkSelector in networks-fieldset.tsx and index.tsx.
Updated NetworkDropdown to MultiNetworkSelector with new props and functionality.
Introduced MultiNetworkSelector with custom search and rendering options.
Enhanced MultiSelect with search functionality and dynamic styling.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

#4953  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @MananTank and the rest of your teammates on  Graphite


Specify Working Examples

@JamesCarzon's setting:

Same time and domain as in the paper
221-member ensemble

@vasanchez16's setting:

Time: August and September of 2017
I believe the same spatial domain
121 member ensemble varying 12 parameters

@vasanchez16, do you have any bugs when running your test cases through the code?

(Didn't mean to close just yet)


Update Chef policyfile extensions

Fixes https://github.com/vscode-icons/vscode-icons/issues/2783
Changes proposed:

[ ] Add
[ ] Delete
[x] Fix
[ ] Prepare

We want to match on policyfile.rb not policyfile and we also want to match on the lock file.
Signed-off-by: Tim Smith<EMAIL_ADDRESS>

@tas50, thanks for this PR ❤


Closes: #1

Updated validations.py python script.
Fixed the behavior of validate_user function in validations.py.
Fixes #<issue_number_goes_here>

It's a good idea to open an issue first for discussion.

[ ] Tests pass
[ ] Appropriate changes to README are included in PR

This is my first pull request...

this is my first pull request...


Release process updates based on feedback from v3.5

May need tweaks after platform discussion on 11/25

Updated based on feedback from platform meeting

Thanks @esethna, it looks good!
Can we also:

Update the bullet points to be consistent with ending in period vs not ending in period.
Update the point about adding download links to the download page to clarify which links should be added there, and to test the links and make sure they work

Updated


Adding C++14 and C++17 kernels

Added classes for C++14 and 1Z to cling kernel
similar changes for kernel.json
This allows there to be separate kernels for C++11,14,1Z all accessible through Ipython Notebook and adds kernels for those. I did change some of the lines near the interpreter I wasn't sure what the quoting was for and it was making it difficult to add options so I changed it.

Needs rebase.


Add Dutch mailing list and Wonder.me

Added the Dutch mailing list and virtual meeting room Wonder.me

thanks @RobinLinde 👍


fix bug in readme

--max-target-megabytes INT
Description:
Added int type to --max-target-megabytes in Readme file

Thanks @sergiomarotco


Could you please add GithubProvider in the next-learn?

I am a frontend beginner, and I need the login with GithubProvider.
but in the example links(https://github.com/nextauthjs/next-auth-example), add  auth method does not likes in the next-learn project.

Hey @wade-liwei, thank you for the feedback.
Not sure if you have seen this already, but the new Auth.js docs has a page for the Github Provider: https://authjs.dev/getting-started/providers/github
Just as an FYI, we're removing NextAuth from the learn course as we have found that it can be overwhelming for beginners. If you'd like to learn more about auth, I've written a guide that goes through the principles of auth and what Next.js features to use, including guides from popular auth libraries: https://nextjs.org/docs/app/building-your-application/authentication


(kubernetes-cli) Fix Update.ps1 (Prerelease version broke all)

Description
Changing to continue rather than return when a URL isn't matched fixes an issue where a pre-release version broke our regex.
Also takes advantage of the REST API to get the changelogs, which improves performance from ~164s to ~86s on my machine.
We may consider releasing prerelease streams at some point, but we don't currently do so - otherwise, we could fix up the regex to respect full semver versions.
Motivation and Context
GetLatest was failing to return anything. On inspection, it seems that a latest -alpha release was causing get latest to return immediately instead of listing the rest of the available streams.
How Has this Been Tested?

Before changes:

With just the fix to continue:

Including the change to using the REST API:

Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
~[ ] Breaking change (fix or feature that would cause existing functionality to change)~
~[ ] Migrated package (a package has been migrated from another repository)~

Checklist:

[x] My code follows the code style of this repository.
~[ ] My change requires a change to documentation (this usually means the notes in the description of a package).~
~[ ] I have updated the documentation accordingly (this usually means the notes in the description of a package).~
~[ ] I have updated the package description and it is less than 4000 characters.~
[x] All files are up to date with the latest Contributing Guidelines
[ ] The added/modified package passed install/uninstall in the Chocolatey Test Environment(https://github.com/chocolatey-community/chocolatey-test-environment/). Note that we don't support the use of any other environment.
[x] The changes only affect a single package (not including meta package).

:white_check_mark: Package verification completed without issues. PR is now pending human review

:white_check_mark: Package verification completed without issues. PR is now pending human review


Add Django :: 4.0 classifier.

Request to add a new Trove classifier.

Framework :: Django :: 4.0

Why do you want to add this classifier?
Django 4.0 alpha was released on September 21, 2021. See: https://www.djangoproject.com/weblog/2021/sep/21/django-40-alpha-1-released/

This will be available after the new release is pulled into PyPI.

Thanks @di!

...after the new release is pulled into PyPI.

Can I ask, is there a way to know when that is? (Sorry if that should be apparent. 😬)

There will be a PR like https://github.com/pypa/warehouse/pull/10076 in about 24 hours, once it's merged the classifier will be available.

@di Super. I shall keep the eye out for that. Thanks for the help!


Memory Leak

We've just switched to use Dink instead of Running WkHtml in a process, so to see if it behaves any better.
Whilst it seems to report less errors, there does seem to be a memory leak. I'm wondering if this bit of code in BasicConverter shouldn't have a try finally?
        ProcessingDocument = document;
        byte[] result = new byte[0];
        Tools.Load();
        IntPtr converter = CreateConverter(document);
        Tools.SetPhaseChangedCallback(converter, OnPhaseChanged);
        Tools.SetProgressChangedCallback(converter, OnProgressChanged);
        Tools.SetFinishedCallback(converter, OnFinished);
        Tools.SetWarningCallback(converter, OnWarning);
        Tools.SetErrorCallback(converter, OnError);
        if (Tools.DoConversion(converter))
        {
            result = Tools.GetConversionResult(converter);
        }

        Tools.DestroyConverter(converter);

as in:
            ProcessingDocument = document;
            byte[] result = [];
            IntPtr converter = IntPtr.Zero;
            try
            {
                Tools.Load();
                converter = CreateConverter(document);
                Tools.SetPhaseChangedCallback(converter, OnPhaseChanged);
                Tools.SetProgressChangedCallback(converter, OnProgressChanged);
                Tools.SetFinishedCallback(converter, OnFinished);
                Tools.SetWarningCallback(converter, OnWarning);
                Tools.SetErrorCallback(converter, OnError);
                if (Tools.DoConversion(converter))
                {
                    result = Tools.GetConversionResult(converter);
                }
            }
            finally
            {
                if (converter != IntPtr.Zero)
                    Tools.DestroyConverter(converter);
            }

If anyone has any thoughts, I'd be happy to do a PR for this. or am I barking up the wrong tree?

to fix your trouble check this solution click
maybe this will solve your problem.

@simon-halsey-fadv It looks like you're barking up the right tree)) By using try-finally, you ensure that Tools.DestroyConverter(converter) is always called, even if an exception occurs during the conversion process. This helps prevent resource leaks if, for example, Tools.Load() or Tools.DoConversion(converter) throws an error. Probably there can be added a wrapper and implement the IDisposable to make it reusable or keep it as you've already suggested. At the same time, what if Tools.DestroyConverter(converter)  fails? If Tools  implement IDisposable, I believe it might be better to use using  for Tools, as this ensures its disposal is attempted even if an exception occurs. However, since DestroyConverter is directly responsible for freeing unmanaged resources,  probably there's a sense to handle exceptions somehow.


Volto slate upgrade guide cleanup

This addresses the missed review items from https://github.com/plone/volto/pull/3508

Two unresolved questions from:
https://github.com/plone/volto/pull/3508

We say that draftJS will be removed in Volto 18, but we do not say to what version of Plone that might correspond. Is there a roadmap for removal of draftJS in a future version of Plone, such as Plone 6.2 or 7.0, or is it "whatever version number of Plone is at whenever we release Volto 18"?
Do we return a deprecation warning to the developer if they use draftJS? I don't know if that is even possible in Volto, but we do that in Pyramid when a deprecated method is called.

Two unresolved questions from: #3508

We say that draftJS will be removed in Volto 18, but we do not say to what version of Plone that might correspond. Is there a roadmap for removal of draftJS in a future version of Plone, such as Plone 6.2 or 7.0, or is it "whatever version number of Plone is at whenever we release Volto 18"?

More the latter because, we do not know that yet. We will assign Volto releases to Plone versions but we can't tell upfront. I have a plan to write down the Plone's product strategy and discuss it during the conf with the Release team and people interested.
We did this "deprecated but will be removed two majors from now" before, it worked well. Allows people to adjust.

Do we return a deprecation warning to the developer if they use draftJS? I don't know if that is even possible in Volto, but we do that in Pyramid when a deprecated method is called.

We could throw a console message if the configuration is set to draftJS, but never did it.


Update LOCALIZATION_CONTRIBUTORS

Summary
I added my name to the list of localization contributors.
Details and comments
I added my name to the list of localization contributors.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

@SooluThomas for conflict fix - @fsdundar is contributing to Turkish per https://github.com/Qiskit/qiskit/issues/648


fix: Spool mysql instead of using mock

Right now, sql store unit test are using sql mock : https://github.com/DATA-DOG/go-sqlmock
As per the discussion with the team, seems like its not so viable option to choose. Therefore, update the the unit-test to use the mysql db instead of mock.
Fix the below from the list 1948:

open a new sql.DB and exec the "USE" statement on that one. Assign it to the storage.Store: https://github.com/hyperledger/aries-framework-go/pull/1938/files#diff-5c03fdd2a42c9a160e4a9b056cb9db20R102
mocking the database in tests

closes #1948
Signed-off-by: talwinder.kaur<EMAIL_ADDRESS>

@talwinder50 Could you please use this package for testing https://github.com/ory/dockertest

@talwinder50 Could you please use this package for testing https://github.com/ory/dockertest

@soluchok  As we tried #1964 doest fix the  Could not start resource: : dial unix /var/run/docker.sock: connect: no such file or directory error in the CI  for using docker test. i followed the already existing pattern and CI pass.


Blocklist doesn't work as expected

i created a minimal example:
1234567 generates 56thj, but if i choose to block thj i expect to have another id and this does not happen
i tracked the problem to be in function isBlockedId at the first comparison:
if i change
if (lowercaseId.length <= 3 || word.length <= 3) {

to
if (lowercaseId.length === word.length) {

it works as expected, because it will go on the other conditions
example
const sqids = new Sqids({
    blocklist: new Set(['thj'])
});
const id = sqids.encode([1234567]); // 56thj
console.log(id);

I think what you're describing has been done intentionally: https://github.com/sqids/sqids-spec/blob/main/src/index.ts#L281
Is this what you're referring to?

i'm talking about the line above of what you sent
https://github.com/sqids/sqids-spec/blob/40f407169fa0f555b93a197ff0a9e974efa9fba6/src/index.ts#L280

i'm sad that you don't plan to fix it, since it is an issue
i'm leaving here a hacky fix that i use, if anyone else needs it:
import Sqids from 'sqids';

Sqids.prototype.isBlockedId = function (id) {
    const charReplacements = {
        '0': 'O',
        '1': 'I',
        '2': 'Z',
        '3': 'E',
        '4': 'A',
        '5': 'S',
        '7': 'T',
        '8': 'B',
        '9': 'G',
    };
    const lowercaseId = id.toLowerCase();
    let transformedId = '';
    for (let i = 0; i < lowercaseId.length; i++) {
        const chr = lowercaseId[i];
        transformedId += charReplacements[chr] || chr;
    }
    for (const word of this.blocklist) {
        if (transformedId.length === word.length) {
            return transformedId === word;
        }
        if (transformedId.includes(word)) {
            return true;
        }
    }
    return false;
};


setup_tools produces incorrect path

I'm installing on a linux machine with conda.
The shebang is not pointing to the correct python environment ;; except for the ariaTSsetup.py
For example, the correct first line in
/home/bbuzz001/Miniconda3/envs/ARIA/lib/python3.7/bin/ariaTSsetup.py

#!/home/bbuzz001/Miniconda3/envs/ARIA/bin/python

However the rest of the files (e.g. .../ariaPlot.py) have the incorrect shebang:

#!/home/bbuzz001/Miniconda3/bin/python

Any ideas?

Would remove the files in both locations and then run the setup.py again.
This just to make sure its not a legacy installation.
e.g. if you did not activate the environment first before running setup.py.

Thanks; I removed the files and had the same issue.
Reinstalling ARIA-tools entirely has fixed the problem though.
I think probably all I had to do was remove the build directory and rebuild using setup.py

On Jan 7, 2020, at 16:24, dbekaert<EMAIL_ADDRESS>wrote:
Would remove the files in both locations and then run the setup.py again.
This just to make sure its not a legacy installation.
e.g. if you did not activate the environment first before running setup.py.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/aria-tools/ARIA-tools/issues/125?email_source=notifications&email_token=ADWNVR4BZ24CNSP2LQFROLTQ4TXJFA5CNFSM4KD5E75KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIKKV5Y#issuecomment-571779831, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADWNVR5S54B3IBX25KZDSCDQ4TXJFANCNFSM4KD5E75A.


Getting started guide not working, ImportError: cannot import name dataclass_transform

I'm following this guide: https://github.com/replicate/cog/blob/550dd219d2f6908e2557c4e448cf5a0972b87f5a/docs/getting-started.md
I'm on a Mac M1. I got the following error after following the first steps and running "cog predict -i @input.jpg"
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/runpy.py", line 185, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/local/lib/python3.8/runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "/usr/local/lib/python3.8/site-packages/cog/__init__.py", line 1, in <module>
    from pydantic import BaseModel
  File "pydantic/__init__.py", line 2, in init pydantic.__init__
  File "pydantic/dataclasses.py", line 41, in init pydantic.dataclasses
    # +---------+-----------------------------------------+
ImportError: cannot import name dataclass_transform
ⅹ Failed to get container status: exit status 1

Thanks for reporting. This looks like a duplicate of https://github.com/replicate/cog/issues/958. Closing this to keep it all in once place.


Source data missing

I created a new source, added a data layer which appeared correctly and can be edited/styled locally.
However when I upload it to Mapbox and copy the map ID into my style project as a layer, the layer can't be edited and doesn't appear in the data tab.
Thanks

@Fraser91
First thing would be to check at https://www.mapbox.com/uploads/ if the upload was successful or it is still being processed.
Also, if the upload was successful you should see the map ID in  Mapbox Studio above the Upload to Mapbox button, e.g.:


Smooth map centering when selecting different locations on mobile map view

The re-centering creates a disjointed experience. I think the map should stay wherever the user has dragged it while clicking around.
The slide up animation of the tray also feels a bit jerky, and if it can be smoothed will improve the user experience.
Compare heroku and live
heroku
https://github.com/user-attachments/assets/14d1c690-2d45-4549-a3ee-52dd02aebc48

and live
https://github.com/user-attachments/assets/0b1b636d-c74b-4172-ae13-8b04105cb969

This is fixed - smooth pan animation is now enabled in test environment.
Sliding the tray up is something we can add later. This animation is also not currently working on live, so at least it's not worse.

Def imrpvode, still a bit jerky compared to live. Appreciating it's not a required for launch priority.


Add possibility to mock/intercept multipart/form-data requests

What is your Scenario?
I need to send a mock video to the server.
What are you suggesting?
I suggest to add a possibility in Request Mock to handle multipart/form-data mocking as well.
What alternatives have you considered?
No response
Additional context
No response

Hello @marpapikyan ,
Please describe your scenario in greater detail. What exact functionality do you miss in TestCafe (filtering by the content-type header with the multipart/form-data value, the possibility to send several response pieces for a single request)?


Fix a few typos

Codecov Report

Merging #4982 (4ba8b26) into master (c134afa) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4982      +/-   ##
==========================================
- Coverage   95.66%   95.65%   -0.02%
==========================================
  Files         631      631
  Lines       65695    65695
==========================================
- Hits        62847    62839       -8
- Misses       2848     2856       +8

Flag
Coverage Δ

servertests
36.07% <33.33%> (ø)

unittests
95.59% <100.00%> (-0.01%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

moto/servicediscovery/models.py
99.34% <ø> (ø)

moto/apigateway/models.py
94.08% <100.00%> (ø)

moto/resourcegroupstaggingapi/models.py
83.18% <0.00%> (-0.59%)
:arrow_down:

moto/route53/responses.py
96.69% <0.00%> (-0.42%)
:arrow_down:

moto/sns/models.py
96.83% <0.00%> (-0.40%)
:arrow_down:

moto/sqs/models.py
96.76% <0.00%> (-0.18%)
:arrow_down:

moto/config/models.py
99.22% <0.00%> (-0.13%)
:arrow_down:

moto/ssm/models.py
94.42% <0.00%> (-0.11%)
:arrow_down:

Continue to review full report at Codecov.

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


[BUG] unable to build OpenCE 1.5.0 with docker

The following error is seen while building OpenCE 1.5.0 with docker:
HEAD is now at 841253d Release numactl 2.0.12
Traceback (most recent call last):
  File "/root/open_ce/build_feedstock.py", line 166, in build_feedstock_from_command
    conda_build.api.build(os.path.join(os.getcwd(), recipe['path']),
  File "/opt/conda/lib/python3.9/site-packages/conda_build/api.py", line 186, in build
    return build_tree(
  File "/opt/conda/lib/python3.9/site-packages/conda_build/build.py", line 3068, in build_tree
    packages_from_this = build(metadata, stats,
  File "/opt/conda/lib/python3.9/site-packages/conda_build/build.py", line 2120, in build
    m.parse_until_resolved(allow_no_other_outputs=True)
  File "/opt/conda/lib/python3.9/site-packages/conda_build/metadata.py", line 1061, in parse_until_resolved
    self.parse_again(permit_undefined_jinja=True, allow_no_other_outputs=allow_no_other_outputs,
  File "/opt/conda/lib/python3.9/site-packages/conda_build/metadata.py", line 1001, in parse_again
    self.meta = parse(self._get_contents(permit_undefined_jinja,
  File "/opt/conda/lib/python3.9/site-packages/conda_build/metadata.py", line 1568, in _get_contents
    env.globals.update(environ.get_dict(m=self, skip_build_id=skip_build_id))
  File "/opt/conda/lib/python3.9/site-packages/conda_build/environ.py", line 282, in get_dict
    d.update(meta_vars(m, skip_build_id=skip_build_id))
  File "/opt/conda/lib/python3.9/site-packages/conda_build/environ.py", line 486, in meta_vars
    d.update(get_git_info(git_exe, git_dir, meta.config.debug))
  File "/opt/conda/lib/python3.9/site-packages/conda_build/environ.py", line 193, in get_git_info
    from conda._vendor.auxlib.packaging import _get_version_from_git_tag
ModuleNotFoundError: No module named 'conda._vendor.auxlib'
[OPEN-CE-ERROR]-11 Unable to build recipe: numactl-feedstock
[OPEN-CE-ERROR]-11 Unable to build recipe: numactl-feedstock

Conda released v4.11 today, which moves auxlib.
The import for auxlib is fixed in conda-build v3.21.7 - https://github.com/conda/conda-build/pull/4335#issuecomment-989213445.
We need to update our Dockerfiles to use conda-build v3.21.7.


Add rolling code parameter to sendCommand method

Hi,
I have added rolling code to the sendCommand method to allow external storage of rolling codes.
I had a problem with NVS on ESP32C3 and decided to keep the rolling codes "offloaded". This approach allows users to use this library on bridge type of devices where there is no need to keep state of the controlled shutters.

Too many default values might result into breaking changes. This line results in the method overload forcing exact naming. I'll add separate function for this functionality in separate PR to not pollute the codebase with unnecessary commits


Snowflake Ingestion failing on Schemas with thousands of objects

Describe the bug
Snowflake ingestion is failing for schemas with more than 10,000 views.
To Reproduce
Steps to reproduce the behavior:

Ingest Snowflake schema with ~16,000 views, with debugging enabled on the UI.

Expected behavior
You will see the following error:
[2024-01-18 21:12:02,501] DEBUG    {datahub.ingestion.source.snowflake.snowflake_v2:838} - Failed to get views for schema FOOBAR.BAZ due to error 090153 (22000): The result set size exceeded the max number of rows(10000) supported for SHOW statements. Use LIMIT option to limit result set to a smaller number.
Traceback (most recent call last):
This is the complete error log:
Traceback (most recent call last):
File "/tmp/datahub/ingest/venv-snowflake-0.12.0/lib/python3.10/site-packages/datahub/ingestion/source/snowflake/snowflake_schema.py", line 307, in get_views_for_database
cur = self.query(SnowflakeQuery.show_views_for_database(db_name))
File "/tmp/datahub/ingest/venv-snowflake-0.12.0/lib/python3.10/site-packages/datahub/ingestion/source/snowflake/snowflake_utils.py", line 41, in query
resp = self.get_connection().cursor(DictCursor).execute(query)
File "/tmp/datahub/ingest/venv-snowflake-0.12.0/lib/python3.10/site-packages/snowflake/connector/cursor.py", line 1132, in execute
Error.errorhandler_wrapper(self.connection, self, error_class, errvalue)
File "/tmp/datahub/ingest/venv-snowflake-0.12.0/lib/python3.10/site-packages/snowflake/connector/errors.py", line 290, in errorhandler_wrapper
handed_over = Error.hand_to_other_handler(
File "/tmp/datahub/ingest/venv-snowflake-0.12.0/lib/python3.10/site-packages/snowflake/connector/errors.py", line 345, in hand_to_other_handler
cursor.errorhandler(connection, cursor, error_class, error_value)
File "/tmp/datahub/ingest/venv-snowflake-0.12.0/lib/python3.10/site-packages/snowflake/connector/errors.py", line 221, in default_errorhandler
raise error_class(
snowflake.connector.errors.ProgrammingError: 090153 (22000): The result set size exceeded the max number of rows(10000) supported for SHOW statements. Use LIMIT option to limit result set to a smaller number.
[2024-01-18 21:12:00,128] DEBUG    {datahub.ingestion.source.snowflake.snowflake_schema:40} - Query : show views in schema "FOOBAR"."BAZ";
[2024-01-18 21:12:02,501] DEBUG    {datahub.ingestion.source.snowflake.snowflake_v2:838} - Failed to get views for schema FOOBAR.BAZ due to error 090153 (22000): The result set size exceeded the max number of rows(10000) supported for SHOW statements. Use LIMIT option to limit result set to a smaller number.
Traceback (most recent call last):
File "/tmp/datahub/ingest/venv-snowflake-0.12.0/lib/python3.10/site-packages/datahub/ingestion/source/snowflake/snowflake_v2.py", line 820, in fetch_views_for_schema
for view in self.get_views_for_schema(schema_name, db_name):
Screenshots
N/A
Desktop (please complete the following information):

Running on EKS
Browser [Edge]
DataHub version 12.0.1

Additional context
Other schemas with fewer views are being ingested.

We looked into this a bit more, and it looks like the Snowflake SHOW VIEWS query supports pagination by combining the LIMIT  and FROM  clauses.
Implementing this would require modifying the get_views_for_database and the show_views_for_database methods.
Is this something that you'd be up for contributing?

Hi Harshal, yes I would like to work on this. I will ping you on slack for a quick overview of what I need to do if that is okay.


FreeAgent (Independent Publisher)

When submitting a connector, please make sure that you follow the requirements below, otherwise your PR might be rejected. We want to make you have a well-built connector, a smooth certification experience, and your users are happy :)

[x] I attest that the connector works and I verified by deploying and testing all the operations.
[x] I attest that I have added detailed descriptions for all operations and parameters in the swagger file.
[x] I attest that I have added response schemas to my actions, unless the response schema is dynamic.
[x] I validated the swagger file, apiDefinition.swagger.json, by running paconn validate command.
[x] If this is a certified connector, I confirm that apiProperties.json has a valid brand color and doesn't use an invalid brand color, #007ee5 or #ffffff. If this is an independent publisher connector, I confirm that I am not submitting a connector icon.

If you are an Independent Publisher, you must also attest to the following to ensure a smooth publishing process:

[x] I have named this PR after the pattern of "Connector Name (Independent Publisher)" ex: HubSpot Marketing (Independent Publisher)
[x] Within this PR markdown file, I have pasted screenshots that show: 3 unique operations (actions/triggers) working within a Flow. This can be in one flow or part of multiple flows. For each one of those flows, I have pasted in screenshots of the Flow succeeding.
[x] Within this PR markdown file, I have pasted in a screenshot from the Test operations section within the Custom Connector UI.
[x] If the connector uses OAuth, I have provided detailed steps on how to create an app in the readme.md.

Here the screenshots of the tested items

The following screenshot has 2 items which is failing because its a business scenario that some invoices cannot be marked as scheduled or cancelled as per the business requirement and it shows the appropriate error messages.

Other Screenshots

Thank you for your connector submission. We will be validating your files and communication will be on this channel until the PR is merged to dev branch. You will hear back from us shortly.

[[certify-connector]]

[[certify-connector]]

[[certify-connector]]

@sriyen-msft  Any Update on this?

@natalie-pienkowska Is there any update on this.? . When can i see this in Live environment ?

@nk-gears Update - Your connector is now in production deployment and reached to Brazil, Canada, Japan, and India region, and it would be completed and available in all the production regions by Wednesday 13th October 2021.
But I can not see your connector artifacts in the repo even though I have merged the PR. Can you please take a look and upload the files into your active PR. Please let us know if you have any questions. Thanks

Hi @sriyen-msft , Something wrong in that branch. Even don't see those files are any history of that folder.
I recommitted the code and missing folders/files to the same branch. Should i need to raise a separate PR ?


Not clear how to use MQTT v5?

I'm wanting to connect to Mosquitto from the browser using MQTT v5. But the documentation is not clear on how to do this, there don't appear to be any examples?
Here is what I have but it isn't clear if I'm using v5, certainly I am not seeing user properties that are being set from a publish sent in a v5 client application (I am using a Node-RED server and can see the v5 data there).
import mqttClient from 'https://cdn.jsdelivr.net/npm/u8-mqtt/esm/web/index.js'

let mqtt = mqttClient()
    .with_websock('wss:my.server:8883')
    .with_autoreconnect()

mqtt.connect()
    .then(() => {
        console.log('connected')

        mqtt.subscribe_topic('test/*', (pkt, params, ctx) => {
            console.log('topic packet', params, pkt, pkt.json())
        })
        mqtt.subscribe_topic('test', (pkt, params, ctx) => {
            console.log('topic packet', params, pkt, pkt.json())
        })
    })

There is a web-targeted demo in demo/web_v5.js, although it would be clearer if it written as a standalone demo instead of sharing code between the NodeJS and Deno backends.
// Using the `web/v5.js` module directly excludes code for MQTT 3.1.1 (v4) support -- great for the web!
// Also, importing the `mqtt_v5` export ensures you get the protocol version you want.
import { mqtt_v5 } from 'https://cdn.jsdelivr.net/npm/u8-mqtt/esm/web/v5.js'

let mqtt = mqtt_v5()
    .with_websock('wss://my.server:8883') // use the secure WebSocket url protocol
    .with_autoreconnect()

mqtt.connect()
    .then(() => {
        console.log('connected')

        mqtt.subscribe_topic('test/*', (pkt, params, ctx) => {
            console.log('topic packet', params, pkt, pkt.json())
        })
        mqtt.subscribe_topic('test', (pkt, params, ctx) => {
            console.log('topic packet', params, pkt, pkt.json())
        })
    })

Thanks.


Reload configmap

1.Describe what this PR did
fix the watchconfig to suport k8s configmap reload when configmap was modified.
2.Does this pull request fix one issue?
fix #17
3.Describe how you did it
below is the investigation.
[root@k8s-master examples]# kubectl -n kube-system -owide get pods |grep monkey
kube-monkey-7b8987b4d8-9rmb2               1/1       Running   0          4h        <IP_ADDRESS>   k8s-node2
[root@k8s-master examples]#
[root@k8s-master examples]# vi configmap.yaml
[root@k8s-master examples]# vi deployment.yaml
[root@k8s-master examples]#
[root@k8s-master examples]# kubectl -n kube-system exec -it kube-monkey-7b8987b4d8-9rmb2 sh
# ls -al /etc/kube-monkey/
total 4
drwxrwxrwx.  3 root root   75 Apr  4 09:42 .
drwxr-xr-x. 43 root root 4096 Apr  4 09:42 ..
drwxr-xr-x.  2 root root   24 Apr  4 09:42 ..4984_04_04_09_42_57.493638710
lrwxrwxrwx.  1 root root   31 Apr  4 09:42 ..data -> ..4984_04_04_09_42_57.493638710
lrwxrwxrwx.  1 root root   18 Apr  4 09:42 config.toml -> ..data/config.toml

after configmap modified，look again：
[root@k8s-master examples]# kubectl -n kube-system exec -it kube-monkey-7b8987b4d8-9rmb2 sh
# cd /etc/kube-monkey
# ls -al
total 4
drwxrwxrwx.  3 root root   75 Apr  4 14:07 .
drwxr-xr-x. 43 root root 4096 Apr  4 09:42 ..
drwxr-xr-x.  2 root root   24 Apr  4 14:07 ..4984_04_04_14_07_49.707929309
lrwxrwxrwx.  1 root root   31 Apr  4 14:07 ..data -> ..4984_04_04_14_07_49.707929309
lrwxrwxrwx.  1 root root   18 Apr  4 09:42 config.toml -> ..data/config.toml

but the pod did not recognize the change, so I have to fix the code in viper.
4.Describe how to verify it
after kubectl replace -f configmap.yaml, tail the pod's log:
[root@k8s-master examples]# kubectl logs -f kube-monkey-7b8987b4d8-85w79 -n kube-system
I0405 16:14:58.667535       1 config.go:74] Successfully validated configs
I0405 16:14:58.668139       1 main.go:52] Starting kube-monkey with v logging level 5 and local log directory /var/log/kube-monkey
I0405 16:14:58.761436       1 kubemonkey.go:19] Debug mode detected!
I0405 16:14:58.761472       1 kubemonkey.go:20] Status Update: Generating next schedule in 10 sec
I0405 16:15:08.761799       1 schedule.go:54] Status Update: Generating schedule for terminations
I0405 16:15:08.952412       1 schedule.go:47] Status Update: 1 terminations scheduled today
I0405 16:15:08.952476       1 schedule.go:49] v1.DaemonSet chaos-victim-ds scheduled for termination at 04/05/2018 17:00:00 +0800 CST
I0405 16:15:08.952562       1 kubemonkey.go:63] Status Update: Waiting to run scheduled terminations.
	********** Today's schedule **********
	k8 Api Kind	Kind Name		Termination Time
	-----------	---------		----------------
	v1.DaemonSet	chaos-victim-ds		04/05/2018 17:00:00 +0800 CST
	********** End of schedule **********

I0405 16:17:19.387225       1 config.go:55] Config change detected

5.Special notes for reviews
None

@asobti there's an issue reported from travis, we may need to change the vendor to fix this issue. Can you kindly advise?
config/config.go:8:2: cannot find package "github.com/huanwei/viper" in any of:
	/home/travis/gopath/src/github.com/asobti/kube-monkey/vendor/github.com/huanwei/viper (vendor tree)
	/home/travis/.gimme/versions/go1.9.linux.amd64/src/github.com/huanwei/viper (from $GOROOT)
	/home/travis/gopath/src/github.com/huanwei/viper (from $GOPATH)
make: *** [test] Error 1

Ahh I see... it's rebuilt from https://github.com/spf13/viper/pull/415

To be closed, fix should be upstream @asobti


Port Panels to Cards

Panels and Wells have been replaced by cards in bootstrap v4, Would we drop the styles for panels all together? or support both in the v4 release?

We will probably have ASU Web Standards Bootstrap reimplement them for backwards compatibility.

On hold until Bootstrap 4 is out of the alpha stage.

The easiest way to do these sort of test for incrementing bootstrap is to also close out #149


Incomplete port name visualization on the Monitor window

I'm using Yukon for PX4 and Ardupilot. I've added port.List on my custom branch and found out that some of their port names are incompletely visualized in the Monitor window.
Let's study PX4. All port related registers have the following name pattern: uavcan.<pub/sub>.<udral/uorb>.<port name>.<instance number>.id. For example, the ESC related register name is uavcan.pub.udral.esc.0.id. You can check the actual registers names in ParamManager.hpp.
All register names are correctly parsed in the Registers window:

In the Monitor window I expect to see uadral.esc.0 . But I see just their instance numbers:

All ports which have no dot in their name, it is fine.
Should this problem be solved on the autopilot side by changing the port name pattern (for example by using underscore instead of dots), or can Yukon handle such names?
Thanks.

I programmed it in a way that expects the last element separated by dot to be id, the second last to be the link name and the third last to be the port type (pub/sub/cln/srv).

That is, strictly speaking, up to spec, but then the spec is incorrect:
https://github.com/OpenCyphal/public_regulated_data_types/blob/70573cb98a346f5a9aee54ce421a8a79700df2b4/uavcan/register/384.Access.1.0.dsdl#L128-L139
I think it should be updated to allow the full stop symbol inside the PORT_NAME.

Yes, I will do this.

Thanks! With the latest release it works well.


Simplify system tests

Fixes: #462

Perhaps a silly question, but why not use async/await?

@JustinBeckwith Sorry I'm still in the process of updating this PR.  I wanted to first have the tests pass with the current layout and then update the PR to use async/await.

PTAL


update to support python 3.6

It seems like python-zpar only supports python=3.3. However, this older python version already not installable on Mac (either directly or through anaconda). Is there another way to use this parser? Thanks.

python-zpar supports python 3.6 and 3.7 just fine. In fact, Python 3.7 is what the CircleCI build uses.

Thank you. I believe python-zpar works fine with python 3.6 3.7 on Linux (I am using a Ubuntu VB on Mac). However, it still fails on local Mac OSX machines.

Ah I see. As the readme for python-zpar says, you have to make sure that
you are using gcc installed via homebrew or macports. The readme has the
details.
On Fri, Jul 19, 2019 at 3:23 PM Siyao (Logan) Peng<EMAIL_ADDRESS>wrote:

Thank you. I believe python-zpar works fine with python 3.6 3.7 on Linux
(I am using a Ubuntu VB on Mac). However, it still fails on local Mac OSX
machines.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/EducationalTestingService/discourse-parsing/issues/46?email_source=notifications&email_token=AABHPEDLFA2FXOOWPVJHQPLQAIID5A5CNFSM4FDTXOGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2MQ5WA#issuecomment-513347288,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABHPEFZTGOP4ZZSNE6KFVLQAIID5ANCNFSM4FDTXOGA
.

--
Linguist, Desi Linguist
http://www.desilinguist.org

I think this is resolved.


Remove check for staging collector when making preconnect requests

Description
The issue https://github.com/newrelic/newrelic-ruby-agent/issues/657 is temporarily solved by this PR  https://github.com/newrelic/newrelic-ruby-agent/pull/681, however this is not intended to be a permanent change. Once the issue is resolved with the staging collector, we should revert that change so that the agent will always use the configured collector for preconnect requests.

Checked on this today and the staging collector is still behaving the same way. So we will need to keep our workaround.


PHP 8 support

Hi! When will be released a stable version with PHP 8 support?

Good point. Going to get one out right now. :)

Good point. Going to get one out right now. :)

PHP 8 support is out. Had to do it in a major release (4.0.0) because support for PHP 5.6 to 7.2 has been dropped as well. (The library's code itself has not changed, so if you make Composer ignore Fuse's PHP version constraints, it should still run fine. But I don't test against old PHP versions any longer and I won't restrict myself to PHP 5 syntax in future changes.)

PHP 8 support is out. Had to do it in a major release (4.0.0) because support for PHP 5.6 to 7.2 has been dropped as well. (The library's code itself has not changed, so if you make Composer ignore Fuse's PHP version constraints, it should still run fine. But I don't test against old PHP versions any longer and I won't restrict myself to PHP 5 syntax in future changes.)


Refactor/standalone tests

#172
Pre-submission Checklist

For tests to work you need a working neo4j and redis instance with the example dataset in docker/db-graph

[ ] Testing: Implement and pass new tests for the new features/fixes, cargo test.
[ ] Performance: Ensure new code has relevant performance benchmarks, cargo bench

@amirRamirfatahi let me know when this is ready for re-review


A new issue

#30

Could you please practice this in your own repositories?
If you have an assignment to make issues/prs in some other repositories, I think it should be meaningful.
Otherwise, it's just spam.


[9.x] Add extra type checks for model factories

This PR is a followup to #40902, previously some type assertions were not possible due to a limitation in PHPStan, this has now been fixed (since PHPStan 1.4.7, in phpstan/phpstan-src#1019) so these assertions can be added in.

@axlon can you also bump PHPStan to this new minimum?

@driesvints done!

Thanks 👍


eth/client: add transfer_erc20 function

geth = Client.create "/tmp/geth.ipc"
# => #<Eth::Client::Ipc:0x000056433dfb0f28 @gas_limit=21000, @id=0, @max_fee_per_gas=0.4269e11, @max_priority_fee_per_gas=0.101e10, @path="/tmp/geth.ipc">
erc = Contract.from_file(file: "spec/fixtures/contracts/erc20.sol")
# => #<Eth::Contract::ERC20:0x000056433e09a678>
geth.deploy_and_wait(erc, "FooBar", "FOO")
# => "0xb14BD4a61E0f8d0e390A8e109e67dedb5965EEDe"
key = Key.new
# => #<Eth::Key:0x000056433d98b620 @private_key=#<Secp256k1::PrivateKey:0x000056433d98a478 @data="E\xAC\x8C\"\xFB\xEC+\xA6u'\x9E\x02@\xAFWy\x03X\"dY]\x13m\xF9\\\x15\v\xE07\xDFn">, @public_key=#<Secp256k1::PublicKey:0x000056433d989ac8>>
geth.transfer_and_wait(key.address.to_s, 1 * Unit::ETHER)
# => "0xa1a8a9e13bd54585d6e761ff31fc1db191c9bca83853e240712b190af8cc6b30"
geth.transact_and_wait(erc, "mint", key.address.to_s, 1 * Unit::ETHER)
# => "0x2e4bf86faf18f5450f5c15304c5236378937953283c8fdd15ab2fd2019cb0991"
geth.call(erc, "balanceOf", key.address.to_s)
# =><PHONE_NUMBER>000000000
geth.transfer_erc20_and_wait(erc, "0x49eB8f597De9B22D9141392d287BAfDc80994D51", 1, sender_key: key)
# => "0x5669979670d204bc1624ac9042c28fdef7c5e26d722872026cc7bb980482e280"
geth.call(erc, "balanceOf", key.address.to_s)
# =><PHONE_NUMBER>99999999
geth.call(erc, "balanceOf", "0x49eB8f597De9B22D9141392d287BAfDc80994D51")
# => 1

fix #145

Codecov Report

Merging #197 (0d3440e) into main (096d793) will decrease coverage by 0.06%.
The diff coverage is 93.33%.

:exclamation: Current head 0d3440e differs from pull request most recent head db1e14f. Consider uploading reports for the commit db1e14f to get more accurate results

@@            Coverage Diff             @@
##             main     #197      +/-   ##
==========================================
- Coverage   99.76%   99.70%   -0.07%
==========================================
  Files          74       74
  Lines        4345     4375      +30
==========================================
+ Hits         4335     4362      +27
- Misses         10       13       +3

Impacted Files
Coverage Δ

lib/eth/client.rb
98.92% <60.00%> (-1.08%)
:arrow_down:

spec/eth/client_spec.rb
100.00% <100.00%> (ø)

lib/eth/client/ipc.rb
93.33% <0.00%> (-6.67%)
:arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Twitch VOD downloads don't retry on errors and can't be resumed

I'm trying to download a long Twitch VOD (over 9 hours). I have ffmpeg in my path (not that it would even work without that). youtube-dl will start downloading the VOD just fine, but can run into an issue like this:
[tcp @<PHONE_NUMBER>87c780] Failed to resolve hostname vod.ak.hls.ttvnw.net: The name does not resolve for the supplied parameters
[hls,applehttp @<PHONE_NUMBER>87f160] Failed to open segment of playlist 0
http://vod.ak.hls.ttvnw.net/v1/AUTH_system/vods_e783/miss_jamball_13115324480_203872310/chunked/index-dvr.m3u8:
 Input/output error

(Here's a full -v log)
Now, this is clearly just a temporary download hiccup, and a retry should sort it out just fine, but at this point the download will just stop and youtube-dl will write the final file. No download retry attempts are made (-R does nothing) and you can't resume the download either (neither by default nor with -c - youtube-dl just says the target file already exists), which means that I'll have to try download the whole thing again (and another error like that will mean I'll need to try again and again and again until I'd get a download with no errors for the entire >9h duration, which seems like an almost impossible task).
Considering all this, wouldn't it make more sense for youtube-dl to download all the playlist parts first and only then invoke ffmpeg to mux it all together? I'd expect it to be actually possible for youtube-dl to retry chunk downloads properly that way and resume a halted download later on as well. Sure, it might take a bit longer to download and then mux instead of muxing on the fly, but I'd say being able to reliable download long things to begin with clearly trumps that downside.

At the moment, these HLS downloads are run by ffmpeg alone. youtube-dl just extracts the metadata and invokes ffmpeg. I've added an option --hls-prefer-native to use youtube-dl's native HLS downloader instead.
However, at the moment, that won't help you, because the native HLS downloader is quite experimental and doesn't support resuming either. I'm working on that though, although it may take a while.

I wouldn't say that --hls-prefer-native won't help.  Actually, it very much helps me over the ffmpeg/avconv default.  I was having the download fail very often, and retrying would cause the entire download to restart.  But by using --hls-prefer-native, it's downloading fragments and if it fails, rerunning will pickup these fragments and quickly get to the point where the download failed.  Huge improvement and it's almost essentially resume.

In the latest version hls native is used by default for vods.

Hi sorry for bringing this up, but is the hlsprefer-native do support resuming or retrying yet as in the latest version?
since when i use ffmpeg  it always failed on some video segment probably do to internet hiccup but opening the link manually is fine
Unable to open resource:https://xxxxx
[hls,applehttp @<PHONE_NUMBER>3f2ea0] Failed to open segment of playlist 0
and when using hls-prefer native after it done muxing it seem it always leave some segmented file behind
(most of it are deleted but not all of them)
and i also have error like [ffmpeg] Fixing malformated aac bitstream in "download.ts"
does leaving some segmented file and the fixing malformated aac means the hls prefer native downloader have also some segment download error or not? since there is no similar error message as when using ffmpeg (i already turn on the verbose)
also is there any way to retrying the failed segment if using the default ffmpeg?


Make page_count self-truncating when we detect the last page of a query

Fixes

Fixes #196  by @dhruvkb
Description

This relatively simple change "truncates" the page count for a query to the current page number if we recieve fewer results on the page than are able to fill out the page based on the page_size. This follows the suggestion from the issue by @AetherUnbound.
Testing Instructions

Checklist

[ ] My pull request has a descriptive title (not a vague title like Update index.md).
[ ] My pull request targets the default branch of the repository (main) or a parent feature branch.
[ ] My commit messages follow best practices.
[ ] My code follows the established code style of the repository.
[ ] I added or updated tests for the changes I made (if applicable).
[ ] I added or updated documentation (if applicable).
[ ] I tried running the project locally and verified that there are no visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

I am debugging the tests that are failing. It is easy to fix them, I just change the page_count from 0 to 1 to match the new expected result of the page counting operation... however, now I am second guessing whether page_count should be 1 or 0 when there is only a single page of results. Do any @WordPress/openverse-api folks know what the intention is? My intuition is that it should be 1 as there is a single page of results. I've made changes to reflect that, but again, I'm second guessing myself that I actually understand the original intention of the code, in particular because the "dangling page of results" code was obscure to me (why did we modulo page count over page size? this made no sense to me).
Thanks for any insight here.

This was discussed a bit in the community meeting in the Make WP Slack:
https://wordpress.slack.com/archives/C02012JB00N/p1670945242644929
@obulat shared that the frontend expects the page count to be 1, and I mentioned that an api response with these values:
{
  "page": 1,
  "page_count": 1
}

feels internally consistent.
Additionally, the API currently requires users to pass a page value of 1 or higher:
https://api.openverse.engineering/v1/audio/?q=puppy&page=0
{
    "detail": {
        "page": [
            "Ensure this value is greater than or equal to 1."
        ]
    }
}

That is all in line with what my expectations would be as well. Thanks for uncovering those details, Zack. I'll undraft this now :slightly_smiling_face:

I will be AFK starting tomorrow so Dhruv and Olga, if y'all review and approve this feel free to merge it at your convenience if you're working.

@obulat Can you re-review this? @dhruvkb when you have a chance this needs a second review. Thanks@


video stream is not stopped

$scope.closed = function stopWebcam() {
onDestroy()
$scope.$broadcast('STOP_WEBCAM', stopWebcam);
$scope.$broadcast('$destroy', onDestroy);
}
var onDestroy = function onDestroy() {
    if (!!_video ) {
      var checker = typeof _video.getVideoTracks === 'function';
      if(_video.getVideoTracks && checker) {
        videoStream.stop();

        // get video track to call stop in it
        // videoStream.stop() is deprecated and may be removed in the
        // near future
        // ENSURE THIS IS CHECKED FIRST BEFORE THE FALLBACK
        // videoStream.stop()
        var tracks = _video.getVideoTracks();
        if (tracks && tracks[0] && tracks[0].stop) {
          tracks[0].stop();
        }
      } else if (_video.stop) {
        // deprecated, may be removed in the near future
        videoStream.stop();
      }
    }
    if (!!_video) {
      delete _video.src;
    }
  };

Camera doesn't stop after clicking image


Update CAmRoutingSenderCAPI.cpp

correction indent on asyncSetVolume
edit string var name BusName > busName

As you commented above it's duplicated request.
Please ignore it if it's already merged.
Thanks.


Add gradient

This page of the XD prototype has a gradient which makes the "central page" blend into the call-to-action section...
https://xd.adobe.com/view/8a626811-2fea-419b-5abd-4177a925eb9e-fc53/screen/485e3ce5-6a2a-4f82-ba0d-718f2e01d18c/
I think this could work nicely at both the top and the bottom of our "central pages", so all our pages will go from dark green to the lighter green and then back to the darker green.

I added the gradient to the article page like the XD prototype

Gradient is looking good. I'd like us to add the gradient to the top and bottom of the Articles pages and the services section on the homepage.
We also need to add a little more space at the top and bottom of these pages so there's some room to breath...

Gradient needs to be added to the top of the Articles pages...

and also to the top and bottom of the services section...


Evaluate necessity of lodash

Validate if lodash is really needed for proper change detection in OnChanges lifecycle hook.
See: https://angular.io/api/core/OnChanges

lodash can be removed for immutable change detection. But need to validate how change detection works on mutable objects.

Referencing the same mutable object does not trigger change detection but using an immutable object does. If you need to trigger change detection rerendering use the spread operator:
this.cytoscapeOptions = { ...this.cytoscacytoscapeOptions };


Transparency support

Without this some tiles cannot be used correctly (e.g.  https://services.arcgisonline.com/arcgis/rest/services/Reference/World_Boundaries_and_Places_Alternate/MapServer/tile/1/0/0.png)

Thank you!


drone not able to auth via oauth2

drone:latest can login to gitea:latest, i'm create app in gitea oauth2 screnn and set env varaibles for drone, but when i'm authorize drone i get error:
Login Failed. unauthorized_client: client is not authorized
May 14 01:24:09 central01.z1.unistack.org dockerd-current[1517]: [Macaron] 2019-05-13 22:24:09: Completed POST /login/oauth/access_token
 400 Bad Request in 114.064282ms
May 14 01:24:09 central01.z1.unistack.org docker[15577]: [Macaron] 2019-05-13 22:24:09: Completed POST /login/oauth/access_token 400 Bad
 Request in 114.064282ms
May 14 01:24:09 central01.z1.unistack.org dockerd-current[1517]: ERRO[0252] oauth: cannot exchange code: GkQ1EgbX-ZmG8PCfi0IYWiK2T9ICbIo
QSQi4uI-0c94=: unauthorized_client: client is not authorized

I do not know for sure for latest of gitea version but version 1.8.1 can work again with drone.

All works fine now

I'm still experiencing this issue:
gitea_1        | [Macaron] 2019-09-10 10:47:17: Started POST /login/oauth/grant for XXX.XXX.XXX.XXX
gitea_1        | [Macaron] 2019-09-10 10:47:17: Completed POST /login/oauth/grant 302 Found in 36.181938ms
gitea_1        | [Macaron] 2019-09-10 10:47:17: Started GET /login/oauth/access_token for <IP_ADDRESS>
gitea_1        | [Macaron] 2019-09-10 10:47:17: Completed GET /login/oauth/access_token 404 Not Found in 12.233255ms
drone_1        | {"level":"error","msg":"oauth: cannot exchange code: 2VQ4KdZ <...> 5RKYf98wJSMk=: : ","time":"2019-09-10T10:47:17Z"}

Redirects are working fine. Any ideas?

pump

@sleepycodernotes IMHO this was an issue that should be fixed by now.
See Drone issue 2704 for more information.
See this comment for a description how to configure it properly.

Using latest images : gitea/drone/treafik/portainer

Did you follow the explanation I linked to? https://github.com/drone/drone/issues/2704#issuecomment-552084152 / https://github.com/go-gitea/gitea/issues/6883#issuecomment-492112398
If you have a firewall: did you ensure that both containers can connect to each other?

i did
i'm using windows 10 wsl 2, dont know where to look

I'm not a Windows user but for testing whether the firewall might be the reason, you know, you could simply search in the internet.

as i understand windows firewall give permission to docker, i run docker-compose in ubuntu and can access all images from windows. All images are in same network

In that case I can't help you. But it still looks like a network error (because it says connection refused in your screenshot).

I'm having a similar issue, which i'm not able to work around.
I use gitea, drone and traefik (latest) and want to make the oauth2 flow working.
I'm able to request access to drone from gitea, but the final redirect fails with:
Login Failed. Post "https://git.<internaldomain>/login/oauth/access_token": dial tcp: lookup git.<internaldomain> on <IP_ADDRESS>:53: no such host
It seems like drone is not able to resolve the internal domain for gitea from within the container in the last step.
This is my docker-compose configuration for drone.
 drone-server:
        image: drone/drone:latest
        volumes:
          - ./drone-data:/var/lib/drone/
          - /var/run/docker.sock:/var/run/docker.sock
        restart: always
        environment:
          - DRONE_SERVER_HOST=drone.<internaldomain>
          - DRONE_SERVER_PROTO=https
          - DRONE_LOGS_DEBUG=true
          #GITEA Settings
          - DRONE_GITEA_SERVER=https://git.<internaldomain>
          - DRONE_GITEA_CLIENT_ID=677d401a-1f97-400f-92c5-2008134c819f
          - DRONE_GITEA_CLIENT_SECRET=qQ0FOe7JXDd3vYw5ty3RkQk6FRPnxW_82fvNgPLCr20=
          - DRONE_RPC_SECRET=39b27c73abdb5fbde740a399d5b3d3fc
        labels:
          - "traefik.enable=true"
          #  Router to forward Port 80 tto 443
          - "traefik.http.routers.drone80.rule=Host(`drone.<internaldomain>`)"
          - "traefik.http.routers.drone80.entrypoints=web"
          - "traefik.http.routers.drone80.middlewares=httpsredirect"
          - "traefik.http.middlewares.httpsredirect.redirectscheme.scheme=https"
          - "traefik.http.middlewares.httpsredirect.redirectscheme.permanent=true"
          #  Route which handles HTTPS Traffic
          - "traefik.http.services.drone.loadbalancer.server.port=80"
          - "traefik.http.services.drone.loadbalancer.server.scheme=http"
          - "traefik.http.routers.drone.tls=true"
          - "traefik.http.routers.drone.rule=Host(`drone.<internaldomain>`)"
          - "traefik.http.routers.drone.entrypoints=websecure"

And this one for Gitea
    gitea:
      image: gitea/gitea:latest
      environment:
        - USER_UID=1000
        - USER_GID=1000
        - DOMAIN=git.<internaldomain>
        - SSH_DOMAIN=git.<internaldomain>
      restart: always
      volumes:
        - ./gitea:/data
        - /etc/timezone:/etc/timezone:ro
        - /etc/localtime:/etc/localtime:ro
      ports:
        #- "3000:3000"
        - "222:22"
      labels:
        - "traefik.enable=true"
        #  Router to forward Port 80 tto 443
        - "traefik.http.routers.git80.rule=Host(`git.<internaldomain>`)"
        - "traefik.http.routers.git80.entrypoints=web"
        - "traefik.http.routers.git80.middlewares=httpsredirect"
        - "traefik.http.middlewares.httpsredirect.redirectscheme.scheme=https"
        - "traefik.http.middlewares.httpsredirect.redirectscheme.permanent=true"
        #  Route which handles HTTPS Traffic
        - "traefik.http.services.git.loadbalancer.server.port=3000"
        - "traefik.http.services.git.loadbalancer.server.scheme=http"
        - "traefik.http.routers.git.tls=true"
        - "traefik.http.routers.git.rule=Host(`git.<internaldomain>`)"
        - "traefik.http.routers.git.entrypoints=websecure"


You seemed to have made a typo. Let me help you with that.

I don't know. I think the new way promotes depression which is a real problem many people struggle with. Also burnination, and only Trogdor wants that.

            .-9 9 `\
          =(:(::)=  ;
            ||||     \
            ||||      `-.
           ,\|\|         `,
          /                \
         ;                  `'---.,
         |                         `\
         ;                     /     |
         \                    |      /
  jgs     )           \  __,.--\    /
       .-' \,..._\     \`   .-'  .-'
      `-=``      `:    |   /-/-/`
                   `.__/

-1

But seriously, the comment is still wrong.


Updated Templates Samples

This PR updates the examples in samples with the possibility to create a template with the marketplace disabled. I removed the example about enabling the internal proxy in code-server because I've noticed that with the latest version it is enabled by default and there is no way to disable it.

/hold

/unhold

/rebase

/merge


Can't get SDL_mixer to build with OGG support

I've tried everything for days - and nothing seems to work. I finally have libvorbis installed, but the configure script can't find the vorbisfile.h
Help?

If you are on debian, or ubuntu or its alikes, you install libvorbis-dev.
If you are on fedora, rhel, centos or its alikes, install libvorbis-devel.

I'm on windows using cygwin.
I think it's working, after going in and messing with the make files... but now there's  libpng error.
Strangely, I also have to add this above main:
#ifdef main
#undef main
#endif

lnstall libvorbis-devel (and its dependents) for cygwin. And libpng-devel for png
(I guess you are trying to built SDL_image too.)
As for main, I think your exe needs to link with -lSDLmain

Sorry, I was stressed out earlier - I finally got it working and building and running correctly in both windows & cygwin, somehow.


ensure correct ODBCVER is used

And to avoid build warning
/builddir/build/BUILD/php-sqlsrv-4.0.4/NTS/sqlsrv/xplat.h:233:0: warning: "ODBCVER" redefined [enabled by default]
 #define ODBCVER 0x0380
 ^
In file included from /usr/include/php/main/php_syslog.h:27:0,
                 from /usr/include/php/ext/standard/php_ext_syslog.h:26,
                 from /usr/include/php/ext/standard/php_standard.h:33,
                 from /builddir/build/BUILD/php-sqlsrv-4.0.4/NTS/sqlsrv/core_sqlsrv.h:37,
                 from /builddir/build/BUILD/php-sqlsrv-4.0.4/NTS/sqlsrv/core_init.cpp:20:
/usr/include/php/main/php_config.h:2168:0: note: this is the location of the previous definition
 #define ODBCVER 0x0300
 ^

@remicollet 👍 Accepted and merged the PR, thanks


Whether to support Android platform

Same as above

Okay, so I'm going to try to build binary files for android


add URLConnection timeouts

to avoid blocking when communication is impaired

Thanks @eerobinson, we've merged your changes to the develop branch. How urgently do you need these changes released?

using a local build for now.  no hurry.  whenever you get a chance.  thanks.


Configure environment to make virtualenv as isolated as possible

Issue description
$ PIPENV_VENV_IN_PROJECT=1 pipenv install

$ rm -rf .venv/lib

$ PIPENV_VENV_IN_PROJECT=1 pipenv run python test.py

I would think this would throw an error, but instead it seems to just read from the system libraries instead of .venv. Is this by design?

$ pipenv --support
Error: no such option: --support
$ pipenv --version
pipenv, version 2018.6.25

In what way does this default to system python? You haven’t deleted the virtualenv or the python binary inside it. You only deleted a folder of libraries which may or may not be relevant to whatever you ran in your example. Python still would work fine. Also, the --support flag was added in the release that came out yesterday.
What is your goal here? We don’t build in protections to stop you from selectively deleting things out of your virtualenv. The things you deleted don’t prevent the tasks you attempted. I’m not sure there’s anything else we can really say on this.

Sorry, wasn't clear: the libraries inside are required by test.py, and when some key topmost directories are corrupt/deleted from .venv, there are no errors thrown. I guess you're saying that's expected?
For more detail, an error is thrown if deeper files are corrupted, but not the uppermost directory/ies.
My expectation was that .venv was self-contained, and corruption to key files in this folder would break the script.
Is there any way to say ".venv is the only library path, not the first path in an array of search locations"?

mkdir test && cd test
PIPENV_VENV_IN_PROJECT=1 pipenv install requests
echo "import requests" >> test.py
PIPENV_VENV_IN_PROJECT=1 pipenv run test.py

The above works as expected
Let's remove .venv/lib and run again
rm -rf .venv/lib
PIPENV_VENV_IN_PROJECT=1 pipenv run test.py

No errors? Let's remove the system package and try again
pip uninstall requests
PIPENV_VENV_IN_PROJECT=1 pipenv run test.py

Errors as expected

Traceback (most recent call last):
File "test.py", line 1, in
import requests
ImportError: No module named requests

Let's setup again and delete the requests library inside .venv:
rm -rf .venv
PIPENV_VENV_IN_PROJECT=1 pipenv install requests
rm -rf .venv/lib/python2.7/site-packages/requests
PIPENV_VENV_IN_PROJECT=1 pipenv run test.py

Traceback (most recent call last):
File "test.py", line 1, in
import requests
ImportError: No module named requests

I assume you’re using Windows? By default .py files are associated to the py launcher, which finds a system Python, not a virtualenv Python. I think there is a workaround, but generally you want to do pipenv run python test.py instead.

Not following, this is what I'm running on MacOS:

PIPENV_VENV_IN_PROJECT=1 pipenv run test.py

But the issue is about the inconsistency between .venv/lib not existing (default to system in this case) and .venv/lib/python2.7/* not existing (error)

No, it’s about you are using an incorrect invocation style.
On macOS (and Windows, but that is not relevant in your case), files have a “default association”. If you open a file without specifying an executable, it is run with a default one specified by the system. If you install Python with an official installer from python.org, it sets the association automatically.
This means that when you invoke pipenv run test.py without specifying an interpreter, the file will always be executed by the default associated executable, which is always a system-wide Python, never the virtual environment Python. To get the interpreter inside the environment, you should write pipenv run python test.py. With your commands, the virtual environment is never taken into consideration.

(Original comment deleted—I see it is a typo, not a different invocation style.)
There is no such fallback, however. This is likely related to how virtualenv works internally, and we can do very little about it if that is the case. You may want to investigate using bare virtualenvs, and file the issue to pypa/virtualenv.
I’m keeping this in my backlog to investigate later with a Mac. Will reopen if I find anything unusual about Pipenv itself (instead of virtualenv).

Will do, thank you

I did some digging and this is indeed a problem caused by virtualenv’s design. virtualenv uses site.py to hook into Python’s startup sequence and perform customisation.
Python is hard-wired to detect ../lib/pythonX.Y/site.py when it starts up. If a site.py does not exist on the call side (i.e. in the virtual environment), it automatically uses the default site.py instead. This is how the interpreter is designed. So unfortunately there is no way to fix this, even in virtualenv.

Nice investigatory work, @uranusjr, thanks!
Looks like this might work to clear sys.path?
PYTHONHOME=/foo PYTHONPATH=/foo python

Setting PYTHONHOME sounds like a good idea. IIRC virtualenv’s activate script also sets it. Maybe we should do the same. Will need to dig deeper.

A lot has changed since this issue report was opened.  Please open a new report if there is a modern issue to address.


GHC pax fixes

Motivation for this change
These changes fix the GHC versions used for building and using pandoc.
Things done

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

[x] NixOS
[ ] macOS
[ ] Linux

[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

These work for me on my local branch, rebuilding against master (using commits in this PR) currently and will report on that once it finishes (I believe it took an hour or two previously).

While I have the information in my head:
Just to make sure this is intentional/known, the GHC build process on the way to 8.0.x goes:
7.4.2-binary -> 7.8.4 -> 7.10.3 -> 8.0.1
(Where "a -> b" means "a is used to build b")
(bummer parallel building has to be disabled, haha)
Additionally, I'll note that I left 7.8.4 and 7.10.3 alone pax-wise since their usage to build the next stage seems to not be problematic, and I figured I'd let someone who at least encounters a problem propose weakening protections for those.... but as a result the versions that are pax-friendly and those that aren't is somewhat arbitrary.  This isn't really that big of a change from the current situation where 7.6.3 is the only one given needed PaX touchups.

Patch 'ghcHEAD' as well
Looks like 8.x only need to paxmark the ghc/haddock binaries (not the bits about non-executable stack)

I believe this is good to go now.

Merged to haskell-updates in 21c88c00a83c25a19c92d76153cd875abeab56db and 6e123a44dbafa6ffd750a7c60d59755d2dfbb1af. The patches will go to master as soon as the test builds at http://hydra.nixos.org/jobset/nixpkgs/haskell-updates show that nothing unexpected happened because of the changes.

@peti great, thank you! paxctl is generally safe in my experience, but it can conflict with patchelf when dealing with pre-compiled binaries (per what I've personally seen, fwiw).

Merged to master.

Awesome, thanks!


Android - The transition back does not occur immediately after pressing the Back button.

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Issue found when executing PR https://github.com/Expensify/App/pull/13670
Action Performed:

Launch the app
Enter a new email address
Tab button Back

Expected Result:
By pressing the Back button, the transition back to the login page should be quick
Actual Result:
The transition back does not occur immediately after pressing the Back button.
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android / app

Version Number: 1.243.1
Reproducible in staging?: Yes
Reproducible in production?: n/a
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://user-images.githubusercontent.com/93399543/209221904-1982679d-27e1-4180-ada4-1291b3c0c6b4.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub

Sorry for the delay, not sure why weekly had gotten add and why I didn't notice it!
Hey @kbecciv Are you still able to recreate this?

Unable to reproduce the issue with latest build <IP_ADDRESS>
https://user-images.githubusercontent.com/93399543/211854616-248456c8-1d5a-401b-9345-2b0d2e6c41c6.mp4

@slafortune this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!

It seems like Applause is unable to reproduce on <IP_ADDRESS>. I also couldn't reproduce anymore. Gonna close this issue. Please reopen if it happens again.


Implementing cache-control config

For now, we only have option for disabling cache. Although it is useful, sometimes we'd like to test how does our app performs with some cached files.
I suggest using koa-cache-control, as it is easy to implement and to set maxAge and other headers for local development needs.

sounds useful, thanks - i will look at this tonight 👍

just to keep you updated, i am beta-testing version 2 of local-web-server.. it has been re-designed to be simple to add your own middleware and command-line options..
you can see an example of building a simple static server with cache-control here.. i just need to write the documentation..


Use latest prompt_toolkit

This resolves an import error in the collections library when using python 3.10 or higher.
ImportError: cannot import name 'Mapping' from 'collections'<EMAIL_ADDRESS>

Love the 3.10 migration work! Forced the update to prompt_toolkit=3.0.32 on my machine and it introduces an import error. More work would need to resolve that:

I know the PyPi is not up to date and forces users to install older prompt-toolkit.
The workaround for me that worked is to install from the latest commit. It did pull the prompt-toolkit 3.x.xx and didn't raise any errors when loading it.
'pyInquirer @ git+https://github.com/CITGuru/PyInquirer.git#7637373429bec66788650cda8091b7a6f12929ee'
The change I made in the code moving from PyPi install is change the import of prompt from PyInquirer,
from PyInquirer import prompt change to from PyInquirer.prompt import prompt

And what about to do:
try:
    from collections.abc import Mapping
except ImportError:
    from collections import Mapping

to keep that backwards compatible?


Missing download file on release

It allows the user to download the source code, with all the github clutter with it.

Yes, it is.... That's what git is...

Ah ok sorry, it's just that most other mods that use Github as a platform usually attach a zip file to the releases, take for example
https://github.com/zorbathut/oshacompliance/releases/tag/v1.0.2
Or many others, if it is like this, then no problem!

I've attached a zip file for unfamiliar people to git.


Add blog post to sidebar and make absolute link relative.

Signed-off-by: Matthias Eichstedt<EMAIL_ADDRESS>

If you merge #272 then there's no need to maintain that sidebar config anymore ...

Let's merge this one in while we discuss the best way forward for dynamic sidebars ..

closing in favor of #272!


RegionProposalNetwork can't be traced or AOTInductor compiled with dynamic batch size

🐛 Describe the bug
this is a cross post of https://github.com/pytorch/pytorch/issues/121036
Just raising it here to notify the maintainers that I'm going to take a crack at fixing the RegionProposalNetwork and potentially other modules to be either traceable, AOTInductor compileable, or both. Are there any current efforts in this direction I should be aware of?
For AOTInductor I think this will at least involve changing the AnchorGenerator, which has a method that mutates an anchor attribute to instead return anchor values.
To support tracing, my plan is to address each TracerWarning (see below). First I'll be looking to remove the iteration over tensors in ImageList  that prevent the model from generalziing after tracing.
[/opt/workspace/./satlas-src/satlas/model/model.py:438](http://<IP_ADDRESS>:8888/satlas-src/satlas/model/model.py#line=437): TracerWarning: Iterating over a tensor might cause the trace to be incorrect. Passing a tensor of different shape won't change the number of iterations executed (and might lead to errors or silently give incorrect results).
  image_sizes = [(image.shape[1], image.shape[2]) for image in images]
[/opt/conda/lib/python3.10/site-packages/torchvision/ops/boxes.py:166](http://<IP_ADDRESS>:8888/opt/conda/lib/python3.10/site-packages/torchvision/ops/boxes.py#line=165): UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
  boxes_x = torch.min(boxes_x, torch.tensor(width, dtype=boxes.dtype, device=boxes.device))
[/opt/conda/lib/python3.10/site-packages/torchvision/ops/boxes.py:168](http://<IP_ADDRESS>:8888/opt/conda/lib/python3.10/site-packages/torchvision/ops/boxes.py#line=167): UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
  boxes_y = torch.min(boxes_y, torch.tensor(height, dtype=boxes.dtype, device=boxes.device))
[/opt/conda/lib/python3.10/site-packages/torch/__init__.py:1560](http://<IP_ADDRESS>:8888/opt/conda/lib/python3.10/site-packages/torch/__init__.py#line=1559): TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  assert condition, message
[/opt/workspace/./satlas-src/satlas/model/model.py:537](http://<IP_ADDRESS>:8888/satlas-src/satlas/model/model.py#line=536): TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.
  losses = {'base': torch.tensor(0, device=device, dtype=torch.float32)}
[/opt/workspace/./satlas-src/satlas/model/model.py:850](http://<IP_ADDRESS>:8888/satlas-src/satlas/model/model.py#line=849): TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.
  losses = torch.tensor(0, device=batch_tensor.device, dtype=torch.float32)

Versions
I'm using the nightlies, see https://github.com/pytorch/pytorch/issues/121036

Thanks for the report @rbavery

Are there any current efforts in this direction I should be aware of?

No, we haven't been looking at the RPN's support for torch.compile yet.

I think this will at least involve changing the AnchorGenerator

Just note that a lot of this code is public and changing the behaviour e.g. the expected intput/output would technically be breaking backward compatibility. So adding support for AOT while still preserving BC may not be a trivial task.
Beyond the RPN, what model specifically are you interested in tracing?

I was able to get torch scripting to work by refactoring the Satlas source code, mostly by adding typing, removing control flow in some spots, and replacing the use of complex python data structures containing tensors with plain tensors. inference on dynamic batches appears to work without error. No changes to torchvision were needed.
but not AOTInductor unfortunately. I made some progress forking torchvision and trying to remove the use of ImageList and other python data structures, remove control flow (often making very hard assumptions about the input data), replace python indexing with torch.narrow, etc. But I still ran into unbacked symint issues when the NMS step is applied in the RPN, which I wasn't sure how to get around the fact that NMS is data-dependent and can't be made un-data dependent. If it' shelpful, I tried to document how I made progress here https://github.com/pytorch/pytorch/issues/121036
Both methods for exporting were relatively painful. I'm hoping that AOTInductor comes up with a solution for handling data-dependent shapes, or making the process to write code that handles data-dependent shapes easier. I realize it is early days for AOTInductor still, but documentation would go a long way. I'd be happy to contribute but still feel fairly new to the process of handing data dependent shapes.


use of yadcf option filters_tr_index and datatables option columnDefs

on jsfiddle https://jsfiddle.net/aureltime/5zh7u4rs/8/, the red right border shows up on column header : OK as expected
on other jsfiddle https://jsfiddle.net/aureltime/5zh7u4rs/10/, with 2 rows in the header, the red right border is not displayed on the 2 headers rows but just one.
by the way, the plugin is great ! thanks for your time

it's not related to yadcf (you can omit yadcf code and that red border issue will remain)
but...
you can solve it in tow different ways,

add class to the th element like this Yes / No
use css

thead tr th:nth-child(3) {
	border-right : 5px solid red;
}

thanks for your answer, i will ask on datatable forum


Client API to access assembly though accession

I created a few classes to expose an API endpoint and was able to get an assembly with its chromosomes as a JSON response.
Changes

New dependency added in pom.xml to use HTTP mappings in controller
Client API to get assembly at http://{serverIP}:8080/contig-alias/api/{accession}
AssemblyDao interface
FTPClientAssemblyDaoImplement to provide no persistence implementation of AssemblyDao
NCBIBrowser#getGenomeReportDirectory(String accession) -- fix an issue where a directory having more than one subdirectory may result in nothing getting appeneded to path
AssemblyService to implement functionality in API

Disregard any changes already proposed in PR #10.

Get Request and response