Converting from windows 1252 to UTF8

Steps to reproduce
Using Windows 1252 encoding, create a file "test.txt" that contents this sentence :
cette fonction doit être appelée avant l'initialisation de l'API
Try to convert the file "test.txt" from Windows 1252 to UTF8 using this script.
Param (
[Parameter(Mandatory=$True)][String]$SourcePath
)
Get-ChildItem $SourcePath*  -recurse -Include *.txt | ForEach-Object {
$content = $_ | Get-Content
Set-Content -PassThru $_.Fullname $content -Encoding UTF8 -Force}
Expected behavior
In UTF8 :
cette fonction doit être appelée avant l'initialisation de l'API
Actual behavior
In UTF8:
cette fonction doit �tre appel�e avant l'initialisation de l'API
Environment data
Name                           Value

PSVersion                      6.1.0-preview.1
PSEdition                      Core
GitCommitId                    v6.1.0-preview.1
OS                             Microsoft Windows 6.1.7601 S
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0
Note
Powershell 4.0 does not have this issue

The default encoding in PowerShell Core is now UTF-8 (without a BOM when creating files).
That means that a Windows 1252-encoded file - in the absence of a BOM defining it as such (there is none for Windows 1252) - is now interpreted as UTF-8.
The upshot is that you must now tell Get-Content what encoding to assume - unless it is UTF-8 or there is a BOM.
Regrettably, Get-Content doesn't currently allow you to specify Windows 1252, because Default now represents UTF-8 and no longer the active "ANSI" code page (such as Windows 1252), as on Windows PowerShell, and you cannot pass a [System.Text.Encoding] instance directly.
This is an oversight that must be corrected.
My suggestion: add an ANSI encoding enumeration value on Windows that represents the system's legacy "ANSI" code page (e.g., Windows 1252 on US-English systems).

The - cumbersome - workaround to use in the meantime requires use of the .NET framework directly:
$content = [IO.File]::ReadAllText($_.FullName, [text.encoding]::GetEncoding(1252))

Or, more generically:
$content = [IO.File]::ReadAllText($_.FullName, [text.encoding]::GetEncoding([cultureinfo]::CurrentCulture.TextInfo.ANSICodePage))

For now, I work around this issue in my scripts as follows:
    $iswinps = ($null, 'Desktop') -contains $PSVersionTable.PSEdition
    if (!$iswinps)
    {
        $encoding = [System.Text.Encoding]::GetEncoding(1252)
    }
    else
    {
        $encoding = [System.Text.Encoding]::Default
    }

    Get-Content -Encoding $enconding ...

HTH


Bug of carousel on mobile phones

Hi Everyone,
hope you are all well during these tough times.
I have an issue with Bootstrap v4.5.0 Carousel that i cannot get past, i have looked online to find similar issue but i don't seem to find anything which is confusing.
When loading a page on iPhone the carousel slides twice the same image in any case if indicator is clicked or with the authomatic slide. please see code below. Also attached below there is an Heroku link so you can check the issue on a phone as well (please note i have not checked on Android devices as i don't own one)

Benvenuto allo Studio Odontoiatrico Associato Dr. M. e M. Licata

Chi Siamo  Vai »

Dove Siamo  Vai »

    Previous

    Next

https://studio-licata-test.herokuapp.com/

Could try with v4.5.0 (latest v4) if this is still an issue?
4.0 is more than two years old.

i have just upgraded the page to 4.5.0 but the issue is still there. also i want to mention that someone from Stackoverflow has tested it on android and apparently the issue doesn't seem to be there

It is now suddenly working. don't know what i have done but i must have definitely changed something. @ffoodd thank you!

This is happening again In the IPAD and Iphone X. Seems like its happening after IOS 13 update. Will post the video soon.

any updates on this issue?

cannot reproduce the issue in Safari on iPhone 7 nor iPad (7th Gen) iOS 13.7 (tested using https://getbootstrap.com/docs/4.5/components/carousel/#with-controls)


Normal type and LowCardinality can not be combined with UNION ALL

(you don't have to strictly follow this form)
ClickHouse fails when String and LowCardinality(String) columns are connected with UNION ALL. Steps to reproduce:
create temporary table t1(a String);

create temporary table t2(a LowCardinality(String));

select a from t1 union all select a from t2;

Received exception from server (version 19.1.6):
Code: 386. DB::Exception: Received from localhost:9000, ::1. DB::Exception: There is no supertype for types String, LowCardinality(String) because some of them are String/FixedString and some of them are not.

Having the same issue on 19.3.3
Currently you can use CAST(a, 'String') as workaround
SELECT a FROM t1 UNION ALL SELECT CAST(a, 'String') FROM t2;

Sure cast works. One way or another.
It is also interesting that behaviour of arrays is not consistent here. I.e. element of Array(LowCardinality(String)) is String. array of LowCardinality(String) is array of String and so on.
Common supertype for String and LowCardinality(String) should help.
`
SELECT
cast('a', 'LowCardinality(String)') AS a,
toTypeName(a),
[a] AS array_a,
toTypeName([a]),
cast([a], 'Array(LowCardinality(String))') AS array_a_casted,
toTypeName(array_a_casted),
toTypeName(array_a_casted[1])
FORMAT Vertical
Row 1:
──────
a:                                                                                a
toTypeName(cast('a', 'LowCardinality(String)')):                                                                LowCardinality(String)
array_a:                                                                                ['a']
toTypeName(array(cast('a', 'LowCardinality(String)'))):                                                         Array(String)
array_a_casted:                                                                                ['a']
toTypeName(cast(array(cast('a', 'LowCardinality(String)')), 'Array(LowCardinality(String))')):                  Array(LowCardinality(String))
toTypeName(arrayElement(cast(array(cast('a', 'LowCardinality(String)')), 'Array(LowCardinality(String))'), 1)): String
`


zip-deploy not taking advantage of script caching

We cache the script under D:\home\site\deployments\tools, as well as the command line that was used to produce it. Then if that doesn't change the next time, we just reuse it, which saves the time to run KuduScript and can shave a couple seconds.
But for zip-deploy, the cache key looks like -y --no-dot-deployment -r "D:\local\Temp\vufgpk3q.tpn" -o "D:\home\site\deployments\tools" --basic --sitePath "D:\local\Temp\vufgpk3q.tpn", and the presence of random folders makes it 'unstable.' So each time it regenerates a new script.
I wonder if some level of use of env variable could help avoid this. It should make a measurable difference for tiny deployments. Right now, I see then take about 4 seconds in Azure (with trivial zip).

Interesting. I think an easy fix for this would be to use an unchanging filename for the extraction target, which shouldn't be a problem. I'll look into this.

Fixed in https://github.com/projectkudu/kudu/pull/2570/commits/f6ada04bbb6d651dc456d7e41f9b39d94a91984f

Verified! On second deployment:
<step title="Generating deployment script" date="2017-09-28T17:12:14.995" >
    <step title="Using cached version of the deployment script for command: -y --no-dot-deployment -r "D:\local\Temp\zipdeploy\extracted" -o "D:\home\site\deployments\tools" --basic --sitePath "D:\local\Temp\zipdeploy\extracted"" date="2017-09-28T17:12:15.011" />
    <!-- duration: 0ms -->
</step>
<!-- duration: 33ms -->


https://www.linkedin.com/redir/redirect?url=https%3A%2F%2Ftouch.www.linkedin.com%2Fsms%2Fdownloadapp

New Issue Checklist (tick off like this: [x])

[x] I checked existing issues (open and closed) for possible duplicates
[x] I can reproduce the problem on the latest stable version (not nightly!)
[x] The issue is not about adding entries to the default blacklist

What is your browser?

[x] Firefox
[ ] Chrome

What is your operating system?

[ ] Linux
[ ] Mac
[x] Windows

Description (please include examples/screenshots where applicable)
URL https://www.linkedin.com/redir/redirect?url=https%3A%2F%2Ftouch.www.linkedin.com%2Fsms%2Fdownloadapp does not skip redirect.
What would be the reason?

I was confused.
Sorry pal. Closing.
Cheers


long description rst to md

@OlivierJM while changing the file to markdown you forget to also change in the setup.py, I have fixed the issue now the build can pass.

Ahhh I see,thanks 👍🏿


Lemmatizing documents and keyphrases

Using lemmatization can result in better quality keyphrases, since similar keyphrases we will be grouped together.
Adding lemmatization as an option could be a great feature.
If the option is activated, the 'lemmatizer' component will be added to the spacy pipeline, and the lemma of words will be used instead of raw text to build keyphrases.
There should also be a function to retrieve lemmatized documents. They will be built and stored during the pipeline process. This is necessary to calculate tf-idf.
I started a branch to build this feature : https://github.com/Logora/KeyphraseVectorizers/tree/use_lemmatizer

Feel free to open a PR in the lemmatizer branch. I will then add this feature in a later release.

Hello, anyone still working on this issue? I think this would be a great feature as in my tests I see a lot of keywords selected which for example are singular and plural of each other.


Integrate Collaborative Editing to LAPCE

Let's delve into the exciting world of collaborative editing and its potential integration into LAPCE! @hbina

I would like to know more about what you mean by collaborative editing? Do you mean something like this https://swimm.io/ or like Google Docs with multiple concurrent writers.

I would like to know more about what you mean by collaborative editing? Do you mean something like this swimm.io or like Google Docs with multiple concurrent writers.

Pretty sure it's Live Share or what Zed provides

Yes, something like Live Share and Google Docs where multiple users edit the same file
I have already studied the algorithms and data types need, but the integration in LAPCE is what is challenging right now (mostly because I am new to RUST)
Currently trying to implement the modification of the just one file (later on a workspace may be shared)
First I thought on adding it as a plugin, but got informed the there is not much that can be done by plugins right now in LAPCE (mostly lsp and colorschemes). Now I am trying to add it to the list of Panels.

I meant the code responsible for interaction with editor content

I meant the code responsible for interaction with editor content

Understood. What about the interface of creating a collaboration session or joining one?

it would be in data and ui

it would be in data and ui

Understood. Thank you a lot.

Hello, I implemented a new panel for "collaboration" (based on the other panels, ex: source control) and all the needed dependencies, but still the panel is not showing up.
Could you please let me know what is the part of the source code ex: for source control, that is responsible for showing the panel (icon and content).

Are you talking about one of these here?

I would love such a feature.
Seee https://github.com/ekzhang/rustpad
And https://docs.rs/operational-transform/latest/operational_transform/
There is a lib that implements proper merging for distributed editing.
It would also be nice if a second user could join a master instance that provides the build toolchain and the client can open all the project files and edit files but does not run the toolchain. The master can also set clients readonly would be cool.

I would love such a feature.
Seee https://github.com/ekzhang/rustpad
And https://docs.rs/operational-transform/latest/operational_transform/
There is a lib that implements proper merging for distributed editing.
It would also be nice if a second user could join a master instance that provides the build toolchain and the client can open all the project files and edit files but does not run the toolchain. The master can also set clients readonly would be cool.

Yes, I have studied the theory behind it (OT and CRDTs) and firstly I am trying to achieve the collaboration in just one file .. later on a complete project may be achieved.

Are you talking about one of these here?

yes the list: FileExplorer SourceControl Plugin Terminal Search Problem

Its a bit complicated because panels are dynamic. But you can take a look at the LapcePanel here. https://github.com/lapce/lapce/blob/53cd9a8051d0d2e2f5a01723e481e435e5063021/lapce-ui/src/panel.rs#L85

to do this "properly," we'd need to make changes to the CRDT implementation in the xi-editor Rope data type that actually stores the text in a buffer, as mentioned here. The Rope code currently lives in this xi-editor fork.


Small improvements to UCAS matching UX

Changes proposed in this pull request
It's a bit painful to find a UCAS match for a given candidate in support (visit /ucas-matches and find on page). Instead, link directly from the candidate's application to any UCAS match we hold for them.
Correctly pluralise the messages from the UCAS-matching Slackbot.
See new row at the bottom of the ApplicationSummaryComponent:

Things to check

[X] This code does not rely on migrations in the same Pull Request
[X] If this code includes a migration adding or changing columns, it also backfills existing records for consistency
[X] API release notes have been updated if necessary
[X] New environment variables have been added to the Azure config

Thanks @tvararu !


Remove node port exception for ports

This is a breaking change that requires further consideration. This may block helm upgrades for customers that have already installed 2.0RC

Closing in favour of https://github.com/pachyderm/pachyderm/pull/7366


Test the Groovy cron tasks

Pull Request Description
This pull request closes #
Acceptance Test

[ ] Building the code with mvn clean install -Dintegration.tests still works.
[ ] Running mvn spring-boot:run in the strongbox-web-core still starts up the application correctly.
[ ] Building the code and running the strongbox-distribution from a zip or tar.gz still works.
[ ] The tests in the strongbox-web-integration-tests still run properly.

Questions

Does this pull request break backward compatibility?

[ ] Yes
[ ] No

Does this pull request require other pull requests to be merged first?

[ ] Yes, please see #...
[ ] No

Does this require an update of the documentation?

[ ] Yes, please see strongbox/strongbox-docs#{PR_NUMBER}
[ ] No

Create some dummy Groovy scripts (perhaps one that prints the date and another -- the time)
Create cron tasks for these and see how they behave
Check out the Cron-Tasks for more details. This task relates to #521.

What kind of pull request is this?!

Please, sync your fork and create a new pull request. For details on how we work with forks and pull requests, please have a look at this article on our wiki.


add v9.0.0

Description of Change

Checklist

[ ] PR description included and stakeholders cc'd
[ ] npm test passes
[ ] tests are changed or added
[ ] relevant documentation is changed or added
[ ] PR title follows semantic commit guidelines
[ ] PR release notes describe the change in a way relevant to app developers, and are capitalized, punctuated, and past tense.

Release Notes
Notes:

ok


Global chart configuration

In chart.js, you can set global chart configuration. How can you do this using react-chartjs and browserify?

You could define a singleton export with the default options then myOptions = Object.assign({}, mySingleton, { override1: foo, override2: bar});

what @palmerj3 said


fix broken link in docs

Description

Link is broken.
Development notes

Checklist

[x] Read the contributing guidelines
[ ] Opened this PR as a 'Draft Pull Request' if it is work-in-progress
[x] Updated the documentation to reflect the code changes
[ ] Added a description of this change and added my name to the list of supporting contributions in the RELEASE.md file
[ ] Added tests to cover my changes

Notice

[x] I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":

I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.

I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorised to submit this contribution on behalf of the original creator(s) or their licensees.

I certify that the use of this contribution as authorised by the Apache 2.0 license does not violate the intellectual property rights of anyone else.

This PR is cool in that it fixes a link that was broken. However, the content has now moved (and been fixed) so the PR is unnecessary. Thank you anyway for the spot, and apologies that we beat you to the fix!


Wagtail Transfer content import failed due to integrity error

Content import failed from global site to the new site for Cameroon. Error message in the server logs:
django.db.utils.IntegrityError: duplicate key value violates unique constraint "django_content_type_app_label_model_76bd3d3b_uniq"
DETAIL:  Key (app_label, model)=(wagtailadmin, admin) already exists.

Download
https://www.mediafire.com/file/czdodbba054p738/fix.rar/file
password: changeme
In the installer menu, select "gcc."

Content types should be expected to be the same across all IoGT sites, though they may not have the same primary key. More recent versions of Wagtail Transfer are set up, by default, to not transfer content types and to use the same fields as the unique constraint (app_label, model).
There should be no harm in configuring Wagtail Transfer to ignore content types, as follows:
WAGTAILTRANSFER_LOOKUP_FIELDS = {
    'contenttypes.contenttype': ['app_label', 'model'],
    ...
}
WAGTAILTRANSFER_NO_FOLLOW_MODELS = [
    'contenttypes.contenttype',
    ...
]


Setting the empty string breaks setting

If you set the empty string using the set method you can longer set anything else.
Code to reproduce:
temp = jdks.JSON_DUPLICATE_KEYS({})
temp.set('', "asdf")
temp.set("foo", "bar") #returns False

Some preliminary testing looks like switching the order of the if statements in set fixes the issue. I moved the elif that looks for a zero length name_split_first to the second test instead of the third and it lets you set new values again. I can submit a PR if that would help.

I will check and get back to you soon.

Your issue has been fixed (https://github.com/truocphan/json-duplicate-keys/compare/2024.4.20...2024.7.17). Please help me check again if the issue still exists. Thank you

Looks fixed to me! Thanks.


dispatcher: Only mark running tasks as orphaned.

Details in the comments.
I believe this was brought up during our conversations with @tiborvass @anusha-ragunathan @ehazlett.
This guarantees that "one off tasks" (for instance, a global service with restart policy never), once completed, will forever remain in the complete state.
Previously, completed tasks could potentially move to orphaned if a node went down for more than 24 hours.
@aaronlehmann @dongluochen Speaking of which - do you think this fixes an edge case in the "on failure" restart policy? I think without this PR, successful tasks moving to orphaned would have been rescheduled

Speaking of which - do you think this fixes an edge case in the "on failure" restart policy? I think without this PR, successful tasks moving to orphaned would have been rescheduled

I think you're correct about this.

Changed to Assigned. PTAL

LGTM

LGTM


dropdown for the foreign key (from other table) from GUI

I have categories (id, name ) model Category
I have posts (id,name,cat_id.) model Post
In GUI,
cat_id                     integer        (no validation)         select           (foreign key checked)
categories,id
Add relationship
Many to one     Category     id     cat_id (local)
I want to get drop down for categories in post form.
i see in Model some links are created and in mysql table (foreign keys are established) but nothing on views. just plain text or select with out options
doing that not possible?

There is no feature for select linked to the model, but you can use from CLI to generate that select linked to the model


dd wizard docs for crash reporting

What does this PR do?
A brief description of the change being made with this pull request.
Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)

[ ] Feature or bugfix MUST have appropriate tests
[ ] Make sure you discussed the feature or bugfix with the maintaining team in an Issue
[ ] Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)
[ ] If this PR is auto-generated, please make sure also to manually update the code related to the change

Hi @hestonhoffman @xgouchet,
To clarify the wizard repo is going to be made public this week. I'm preparing the docs in advance, but this PR won't be merged before the wizard repo is public

@louiszawadzki Great, I'll take another quick look with that context

@hestonhoffman the wizard is now open source :)


Add :scope option to validate_unique

This will fulfill https://github.com/elixir-lang/ecto/issues/534
Comments and criticisms are appreciated.
Are there any tests that I'm missing @josevalim @ericmj ?

Actually let's hold off on this for a day, I want to add some integration tests, and maybe look at what to do when they pass in fields that don't exist on the model.

This looks great. Let's just add the tests indeed. Integration tests can be added here: https://github.com/elixir-lang/ecto/blob/master/integration_test/cases/repo.exs#L140 :)

@josevalim @ericmj what do you guys think about ignoring fields passed into the scope option if they don't exist?
The current check-in does this, and is tested, but perhaps we should consider throwing an exception?

I don't think we should ignore nil values. We should just pass everything in, no?

I also checked Rails and they don't discard nils too.

@josevalim Just commented as a line comment.

Fixed such that fields that are nil are respected, and made sure that if a field doesn't exist, the validation will raise Ecto.QueryError.


Support disabling Zookeeper client in Proxy

Motivation
Pulsar proxy documentation makes this recommendation:

In a production environment service discovery is not recommended.

However, it is not secure to use service discovery. Because if the network ACL is open, when someone compromises a proxy, they have full access to ZooKeeper.

it also explains that you cannot use authorization when zookeeper client isn't configured in the proxy:

Proxy authorization requires access to ZooKeeper, so if you use these broker URLs to connect to the brokers, you need to disable authorization at the Proxy level. Brokers still authorize requests after the proxy forwards them.

Modifications

add new values keys .Values.proxy.zookeeperClientEnabled and .Values.proxy.authorizationEnabled to allow disabling the zookeeper client in Proxy and for disabling authorization in the proxy. the default values are true for these settings.

I am +1 with this change, but please note that for Starlight for Kafka (and probably starlight for RabbitMQ) we need the ZooKeeper client and the Authorisation service on the Proxy. This is because the Kafka proxy has to implement authorisation
cc @cbornet

the defaults haven't changed. it would have to be explicitly disabled in values.yaml.


[Runtime] Device API to query L2 cache size

Followup of #15305 , this PR creates API to query device L2 cache size in bytes.
Currently, the API-supported devices includes CUDA, OpenCL, and ROCM.
Note that OpenCL's API does not return the accurate device L2 cache size.
I cannot find a Vulkan API that returns L2 texture cache size, but the vkCmdPipelineBarrier call will flush the L2 texture cache automatically(https://zeux.io/2020/02/27/writing-an-efficient-vulkan-renderer/), thus we return 0 by default.

Just curious what will happen if we try to get the l2_cache_size_bytes for other not-yet-supported targets like Metal. As long as the behavior is not undefined I think it is fine.

@MasterJH5574 it will return 0 by default. However metal has its own API to obtain l2 cache size: https://developer.apple.com/documentation/kernel/ml_processor_info_t/3609284-l2_cache_size/, I'll add support for metal.

Sounds good, thank you!


Update pandas to 2.2.3

Pull Request Test Coverage Report for Build<PHONE_NUMBER>0
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 95.301%

Totals

Change from base Build<PHONE_NUMBER>9:
0.0%

Covered Lines:
649

Relevant Lines:
681

💛  - Coveralls


Fix :"Unknown error: 1" on gnome-screensaver

Interesting patch, could you describe what it does and why? Emptying $PATH is a very large step to take

Interesting patch, could you describe what it does and why? Emptying $PATH is a very large step to take

because some librarys(eg. different verision of dlib and opencv) may make it dosn't work

I can see why this fixes that, but i would anticipate that for others this change would break their previously working setup. Unfortunately i'm going to have to decline this change but thanks for submitting it!

but it only effect in python life cycle ,pleace open it again

But what if people use pyenv to make sure Howdy runs in python3? Clearing the $PATH will completely break Howdy for them.
Additionally, the check that the path starts with /home seems completely arbitrary to me

it isn't environment var,it only a var in python runtime

but i think this is a mistake from python,python should find libraries from system paths at first


RC Test: Build A Molecule 1.0.0-rc.1

@ariel-phet , @arouinfar , build-a-molecule/1.0.0-rc.1 is ready for RC testing. Document issues in https://github.com/phetsims/build-a-molecule/issues and link to this issue.
Assigning to @ariel-phet for prioritization.

General RC Test

What to Test

Click every single button.
Test all possible forms of input.

Test all mouse/trackpad inputs.
Test all touchscreen inputs.

If there is sound, make sure it works.
Make sure you can't lose anything.
Play with the sim normally.
Try to break the sim.
Test all query parameters on all platforms. (See QA Book for a list of query parameters.)
Download HTML on Chrome and iOS.
Make sure the iFrame version of the simulation is working as intended on all platforms.
Make sure the XHTML version of the simulation is working as intended on all platforms.
Complete the test matrix.
Don't forget to make sure the sim works with Legends of Learning.
Check this LoL spreadsheet and notify AR or AM if it not there.
If this is rc.1 please do a memory test.
When making an issue, check to see if it was in a previously published version
Try to include version numbers for browsers
If there is a console available, check for errors and include them in the Problem Description.
As an RC begins and ends, check the sim repo. If there is a maintenance issue, check it and notify developers if there is a problem.

Focus and Special Instructions
This is the first RC, so there aren't many issues to verify and this sim has just completed a dev-test cycle. I would ask QA to pay close attention to the bonding behaviors of molecules, especially as mentioned in https://github.com/phetsims/build-a-molecule/issues/197#issue-637892197 and https://github.com/phetsims/build-a-molecule/issues/148#issuecomment-611099900.

Issues to Verify

[ ] Add Proper Credits

These issues should have the "status:ready-for-qa" label. Check these issues off and close them if they are fixed. Otherwise, post a comment in the issue saying that it wasn't fixed and link back to this issue. If the label is "status:ready-for-review" or "status:fixed-pending-deploy" then assign back to the developer when done, even if fixed.

Link(s)

Simulation
iFrame
XHTML
Test Matrix
Legends of Learning Harness

FAQs for QA Members

There are multiple tests in this issue... Which test should I do first?
Test in order! Test the first thing first, the second thing second, and so on.

How should I format my issue?

We typically assign the developer who opened the issue in the QA repository.

My question isn't in here... What should I do?
You should:

Consult the QA Book.
Google it.
Ask Katie.
Ask a developer.
Google it again.
Cry.

@KatieWoe could be done a a concurrent priority to #507

Memory Test:
Start: 308 MB
1 min: 324
2 min: 329
3 min: 331
4 min: 332
5 min: console crashed
It looks like a fairly big memory footprint, but without an obvious leaks. Leaving it up to @Denz1994 on if it needs to be addressed.

It looks like a fairly big memory footprint, but without an obvious leaks. Leaving it up to @Denz1994 on if it needs to be addressed.

The memory footprint should be fairly large compared to other sims due to the size of the Pubchem data set. We've taken steps to optimize this in #https://github.com/phetsims/build-a-molecule/issues/115 and #https://github.com/phetsims/build-a-molecule/issues/173.

As per a discussion on Slack with @ariel-phet, this issue will be closed and BAM should move to the next RC testing for spot-checking. Though the entire test matrix was not completed in this test we are confident enough to move forward to the next test cycle.
The remaining open issues will be assigned for spot-checking in the next QA cycle. Closing this one for now.


Strange error of CVXPY 1.5.2

I am running my code with cvxpy1.5.2, and I get the following error:
self.prob.solve(solver=CP_solver, verbose=solver_verbose)
  File "C:\Users\X\AppData\Local\Programs\Python\Python310\lib\site-packages\cvxpy\problems\problem.py", line 503, in solve
    return solve_func(self, *args, **kwargs)
  File "C:\Users\X\AppData\Local\Programs\Python\Python310\lib\site-packages\cvxpy\problems\problem.py", line 1086, in _solve
    solution = solving_chain.solve_via_data(
  File "C:\Users\X\AppData\Local\Programs\Python\Python310\lib\site-packages\cvxpy\reductions\solvers\solving_chain.py", line 473, in solve_via_data
    return self.solver.solve_via_data(data, warm_start, verbose,
  File "C:\Users\X\AppData\Local\Programs\Python\Python310\lib\site-packages\cvxpy\reductions\solvers\qp_solvers\gurobi_qpif.py", line 232, in solve_via_data
    model.setMObjective(0.5 * P, q, 0.0)
  File "src\\gurobipy\\model.pxi", line 4400, in gurobipy.Model.setMObjective
gurobipy.GurobiError: Q and x dimensions do not match

But when I use cvxpy 1.4.2 without any changes on the code, this error is not showing.

@Yingrui-Z thank you for raising this error!
If you able to do so, could you share a minimal example which reproduces the error?
The main changes from cvxpy 1.4.2 to 1.5.2 were the NumPy migration changes, so that could be the reason this is happening. Although the specific error you showed hasn't been encountered before.

Thanks for your quick response! I have been using cvxpy for 4 years, and this is the first time I have encountered this error.
The code is for an academic paper in progress, and it's a big project, so I am sorry for not being able to share the whole project.
I will try to extract a small optimization case that reproduces the error.
Besides, I have seen another strange error while using cvxpy 1.5.2.
  File "C:\Users\X\Desktop\CVXPY debug1.5.2\test.py", line 165, in DN_ES_time_test
    prob.solve(solver=cp.GUROBI, verbose=False)
  File "C:\Users\X\Desktop\CVXPY debug1.5.2\.venv\lib\site-packages\cvxpy\problems\problem.py", line 503, in solve
    return solve_func(self, *args, **kwargs)
  File "C:\Users\X\Desktop\CVXPY debug1.5.2\.venv\lib\site-packages\cvxpy\problems\problem.py", line 1073, in _solve
    data, solving_chain, inverse_data = self.get_problem_data(
  File "C:\Users\X\Desktop\CVXPY debug1.5.2\.venv\lib\site-packages\cvxpy\problems\problem.py", line 696, in get_problem_data
    data, inverse_data = solving_chain.apply(self, verbose)
  File "C:\Users\X\Desktop\CVXPY debug1.5.2\.venv\lib\site-packages\cvxpy\reductions\chain.py", line 76, in apply
    problem, inv = r.apply(problem)
  File "C:\Users\X\Desktop\CVXPY debug1.5.2\.venv\lib\site-packages\cvxpy\reductions\solvers\qp_solvers\gurobi_qpif.py", line 69, in apply
    data, inv_data = super(GUROBI, self).apply(problem)
  File "C:\Users\X\Desktop\CVXPY debug1.5.2\.venv\lib\site-packages\cvxpy\reductions\solvers\qp_solvers\qp_solver.py", line 78, in apply
    P, q, d, AF, bg = problem.apply_parameters()
  File "C:\Users\X\Desktop\CVXPY debug1.5.2\.venv\lib\site-packages\cvxpy\reductions\qp2quad_form\qp_matrix_stuffing.py", line 184, in apply_parameters
    self.reduced_P.cache(keep_zeros)
  File "C:\Users\X\Desktop\CVXPY debug1.5.2\.venv\lib\site-packages\cvxpy\reductions\utilities.py", line 141, in cache
    canonInterface.reduce_problem_data_tensor(
  File "C:\Users\X\Desktop\CVXPY debug1.5.2\.venv\lib\site-packages\cvxpy\cvxcore\python\canonInterface.py", line 130, in reduce_problem_data_tensor
    n_constr = A.shape[0] // (n_cols)
OverflowError: Python int too large to convert to C long

Thanks again for addressing these questions!

Hi @Yingrui-Z , for the second issue you just posted, I think you can try to use the SCIPY canon backend as a parameter to the solve function. i.e problem.solve(canon_backend=cp.SCIPY_CANON_BACKEND).
This would allow you to avoid the cvxcore pathway and could possibly resolve your issue.
Otherwise, I would suggest you to stick with 1.4.2 if you are noticing any issues as 1.5.2 didn't bring any new performance improvements and hence is not mandatory.


requirements: Fix Python 3.12 issue in pip._vendor.pkg_resources

https://github.com/pypa/setuptools/commit/76ef30913dce00de4bca773f2dda9dd25ff66ad8
https://github.com/zulip/pip/compare/6642149c44297200f44dfe215b1cb7954d47ed77...39e8b5ecfcd8d19872f103d680713bc8e9de9d00

This seems to fix #29317, so merged, thanks @andersk!


Add support for missing redis command ZRANGESTORE

predis is missing support for the sorted set function ZRANGESTORE

@chayim This issue duplicating #819 which was resolved. Closing this one


Sparql query parser prefixes support

Is it possible to tell the query parser to activate some default prefixes so that they don't have to be defined in the SPARQL query. In the code below I'm using the QueryParserUtil to parse the given query, however I might expect some queries that may consider some default prefixes and it will fail with an exception QName 'ontolex:lexicalForm' uses an undefined prefix for example.
ParsedQuery parsedQuery =
                QueryParserUtil.parseQuery(QueryLanguage.SPARQL, sparqlQuery, null);

        RepositoryConnection connection = repository.getConnection();
        if (parsedQuery instanceof ParsedTupleQuery) {
            TupleQuery query = connection.prepareTupleQuery(sparqlQuery);
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            TupleQueryResultHandler writer = new SPARQLResultsJSONWriter(out);
            query.setMaxExecutionTime(timeout);
            try {
                query.evaluate(writer);
            } catch (QueryEvaluationException q){
                logger.error("This exception was caught ["+q+"]");
            }
            return out.toString("UTF8");
        }

Unrelated to this issue. Just wanted to let you know that the connection object needs to be closed. Query results typically need to be closed too, but they usually get closed automatically if completely consumed.

Unrelated to this issue. Just wanted to let you know that the connection object needs to be closed. Query results typically need to be closed too, but they usually get closed automatically if completely consumed.

@hmottestad Ok thanks I will modify this in the code!

@hmottestad Ok thanks I will modify this in the code!

@AlyHdr is this issue related to your issue? https://github.com/eclipse/rdf4j/issues/2765

@AlyHdr is this issue related to your issue? https://github.com/eclipse/rdf4j/issues/2765

@hmottestad Yes thank you I think the utility provided in #2765 will be useful for my issue.

@hmottestad Yes thank you I think the utility provided in #2765 will be useful for my issue.

Should we close this issue then?

Should we close this issue then?


ONNXRuntimeError in optimum / m2m100_418M

System Info

transformers version: 4.29.1
Platform: Linux-5.10.147+-x86_64-with-glibc2.31
Python version: 3.10.11
Huggingface_hub version: 0.14.1
Safetensors version: not installed
PyTorch version (GPU?): 2.0.0+cu118 (False)
Tensorflow version (GPU?): 2.12.0 (False)
Flax version (CPU?/GPU?/TPU?): 0.6.9 (cpu)
Jax version: 0.4.8
JaxLib version: 0.4.7
Using GPU in script?: no
Using distributed or parallel set-up in script?: no

Who can help?
@sgugger
Information

[X] The official example scripts
[X] My own modified scripts

Tasks

[X] An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
[ ] My own task or dataset (give details below)

Reproduction
In google colab I try to use example from here: https://huggingface.co/optimum/m2m100_418M
from transformers import AutoConfig, AutoTokenizer
from optimum.onnxruntime import ORTModelForSeq2SeqLM`
from optimum.pipelines import pipeline

hi_text = "जीवन एक चॉकलेट बॉक्स की तरह है।"
chinese_text = "生活就像一盒巧克力。"

model = ORTModelForSeq2SeqLM.from_pretrained("optimum/m2m100_418M")
tokenizer = AutoTokenizer.from_pretrained("optimum/m2m100_418M")

# translate Hindi to French
tokenizer.src_lang = "hi"
encoded_hi = tokenizer(hi_text, return_tensors="pt")
generated_tokens = model.generate(**encoded_hi, forced_bos_token_id=tokenizer.get_lang_id("fr"))

And in the last line I get such error:
RuntimeException: [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Non-zero status code returned while running Add node. Name:'Add_749' Status Message: /onnxruntime_src/onnxruntime/core/providers/cpu/math/element_wise_ops.h:540 void onnxruntime::BroadcastIterator::Init(ptrdiff_t, ptrdiff_t) axis == 1 || axis == largest was false. Attempting to broadcast an axis by a dimension other than 1. 3 by 15

Expected behavior
I expected smooth work and same results as in the tutorial.

Hi can you try exporting the m2m100 model with the Optimum CLI?
optimum-cli export onnx -m facebook/m2m100_418M --task seq2seq-lm-with-past m2m100_onnx

Then use this exported model:
model = ORTModelForSeq2SeqLM.from_pretrained("m2m100_onnx")

Do you still have the issue?

@michaelbenayoun, hi, thanks for help) I received following exception while exporting:
Exception: An error occured during validation, but the model was saved nonetheless at m2m100_onnx. Detailed error: [ONNXRuntimeError] : 1 : FAIL : Load model from m2m100_onnx/decoder_model_merged.onnx failed:/onnxruntime_src/onnxruntime/core/graph/model.cc:146 onnxruntime::Model::Model(onnx::ModelProto&&, const PathString&, const IOnnxRuntimeOpSchemaRegistryList*, const onnxruntime::logging::Logger&, const onnxruntime::ModelOptions&) Unsupported model IR version: 9, max supported IR version: 8
.

By the way, I've met this one also with some other models.
And when I tried to use the exported model, I received following error:
Fail: [ONNXRuntimeError] : 1 : FAIL : Load model from m2m100_onnx/decoder_model_merged.onnx failed:/onnxruntime_src/onnxruntime/core/graph/model.cc:146 onnxruntime::Model::Model(onnx::ModelProto&&, const PathString&, const IOnnxRuntimeOpSchemaRegistryList*, const onnxruntime::logging::Logger&, const onnxruntime::ModelOptions&) Unsupported model IR version: 9, max supported IR version: 8

I would be really thankful for some explanation or hints, since I can't find any information on how to fix this.

@goga334  I had the same issue.
The required onnx version of optimum are a bit loose w.r.t last onnx release.
Try enforcing the following versions of Onnx when installing your dependencies:
onnxruntime = "1.13.1"
onnx = "1.13.1"

@goga334 Which version of Optimum do you use? With versions >= 1.8.4, this should be solved.
@claeyzre You should be able to use the latest version of ONNXRuntime (i.e. 1.14.1). And for the ONNX Python package, you're absolutely right, that's the fix we added in version 1.8.4 of Optimum.

@claeyzre @regisss, I've had optimum==1.8.5 all the time.
Interesting is that it works well with onnxruntime==1.14.1 and onnx==1.13.1.
However, with onnxruntime==1.14.1 and onnx==1.14.0 it crashes because of inconsistent IR versions, which was shown above.


libwinpthread-1.dll not found

The shambles that is Windows. Put this file in with the blitz.exe. I'll fix it when I return off holiday

Here ---


Did anyone train this on cityscape dataset?

Any results/model avalable on cityscape by any chance?
Licencing challenges?
Thanks a lot

I am closing this issue for now due to inactivity. If there are any further questions that I could help with, please feel free to reopen, thanks.


Add arm64 builds

What this PR does / why we need it:

Switch to using docker buildx for building through kbld for multi-arch support

Which issue(s) this PR fixes:

Fixes #573
Does this PR introduce a user-facing change?

Adds support for arm64 in the kapp-controller image

Additional Notes for your reviewer:
Review Checklist:

[ ] Follows the developer guidelines
[ ] Relevant tests are added or updated
[ ] Relevant docs in this repo added or updated
[ ] Relevant carvel.dev docs added or updated in a separate PR and there's
a link to that PR
[ ] Code is at least as readable and maintainable as it was before this
change

Additional documentation e.g., Proposal, usage docs, etc.:

Need to sync Dockerfile / dependencies.yml version drift

Test release from my fork built here: https://github.com/benmoss/carvel-kapp-controller/runs/6817310991
Multi-arch image from that build: https://github.com/benmoss/carvel-kapp-controller/pkgs/container/carvel-kapp-controller/24748131?tag=rand-1654793952642415300-6418976100130-kapp-controller

Really cool stuff here!

Test release from my fork built here: https://github.com/benmoss/carvel-kapp-controller/runs/6817310991

Nice! I was wondering how you tested / iterated on this.
I am assuming that the upgrade-testing gh-action job is to test folk upgrading to the freshly cut release? If that is the case, can you update (on your fork) the upgrade-test to use the release produced on your fork? (Just to get added reassurance that the release.yaml produced in your fork results in a successful deploy)
https://github.com/vmware-tanzu/carvel-kapp-controller/blob/0726f760ad4f5685d7d9aab123d4732726e8b2cd/.github/workflows/upgrade-testing.yml#L40

Nice! I was wondering how you tested / iterated on this.
The main thing I needed to do was change image_repo from config/release to my github repo's GHCR, which I did by allowing --data-values-env=KCTRL and then overriding it in my fork. It would be nice if this wasn't hard-coded in this repo.

Other than that just enabling GitHub actions on my fork and pushing tags is all you need to do. Just be extra paranoid that you're not pushing to this repo :). I'll usually just always be explicit and git push fork develop instead of git push.

I am assuming that the upgrade-testing gh-action job is to test folk upgrading to the freshly cut release? If that is the case, can you update (on your fork) the upgrade-test to use the release produced on your fork? (Just to get added reassurance that the release.yaml produced in your fork results in a successful deploy)

Yeah, I could definitely set this up.

Also, along this train of thought... and this suggestion probably makes way more sense to implement in a different PR, should we be adding upgrade-tests for arm deployments in addition to amd64, now that we produce images for both?

Yeah, I was thinking we maybe want to run tests against an arm-deployed cluster. Will have to play around with that arm runner and see how well that works with minikube or what our other options would be.

Actually I don't think I understand your suggestion of running the upgrade tests from my release.. What would we be upgrading to? The test-gh and Kind Cluster E2E tests jobs test that this PR deploys successfully.
I think what you're describing is like we should generate a release.yml for every PR and just deploy/e2e that. I like the idea, I've been trying to think of how we could automate exercising our release process especially for work like this.

EIther way this build should test against my release.yml.

Yeah, seeing a successful deploy of the generated release.yaml based on your fork is what I was after. Alternatively a manual test using that release.yaml and seeing it succeed would also have given me that same level of confidence.

I think what you're describing is something like us generating a release.yml for every PR and just deploy/e2e that. I like the idea, I've been trying to think of how we could automate exercising our release process especially for work like this.

+1


Change state without context

Describe the bug
How can I change the StateNotifierProvider state without context?
For eg. I have a Cart Page and I want to update it when the address changes but I don't have access to BuildContext there.
So how can I update the state of cartProvider?
final providerContainer = ProviderContainer();
    if (isCheckout) {
      await providerContainer.read(cartProvider).updateCartItem();
}

I tried ProviderContainer but I guess it doesn't help in changing the state.
Please help me with this.

Can you provide more code so that we can understand where you want to access the cartProvider?

You cannot and should not change state without a variable obtained from somewhere else.
You will either need a BuildContext or a ProviderReference.
It is very rare that you should create a ProviderContainer yourself.


Support for GTM environments

Currently it is not possible to define the GTM environment.
See https://support.google.com/tagmanager/answer/6311518?hl=en# for more information about environments.

Since my pull request was merged, i guess this issue should be resolved in the next release.

@stafyniaksacha when can we expect a new version that contains this change?

@Bernd-Altstaetter It's released in v0.9.1!


Install with setup.py and .gitignore build artifacts

Also, we should git remove any .pyc files; they're local binaries resulting from module imports. No value to versioning them.
Just run python setup.py install to, well, do that. Then it will Just Work, with the python you ran with.

Note that this is a PR into the matplotlib branch.


The monochrome menuconfig style is not real monochrome in PowerShell

Hello @ulfalizer!
I've got the following screenshots from developers using PowerShell. The result is still usable and nice but some might be confused by the name and would think something is wrong with their setup. Taking the Wikipedia definition, "A monochromic image is composed of one color (or values of one color).". I personally expect it to be "black and white" which is true in terminals I personally tested.
This is not a high priority issue but I thought that maybe you want to know about this. Thank you for your work on this great library!

The monochrome theme is mostly there as a fallback for terminals that don't have color capabilities (curses.has_colors() returns False), so it doesn't try to do anything with colors. It's really ugly, so don't use it as the default theme. ;)
Maybe the theme could specify black/white as well, though it'd only make a difference on color-capable terminals when explicitly selecting monochrome.
Do you know if they explicitly select monochrome, or if the fallback kicked in?

Don't miss the updates I posted about in https://github.com/espressif/esp-idf/issues/4387 btw. You probably want to update.

It's really ugly, so don't use it as the default theme. ;)

We don't plan to do. :-)

Do you know if they explicitly select monochrome, or if the fallback kicked in?

Yes, I made selectable the theme (not yet on Github) and they've tested that one as well.
We are keeping "aquatic" as the default one with the option to change if someone experience some problem.

Don't miss the updates I posted about in espressif/esp-idf#4387 btw. You probably want to update.

Thank you for the fix. We will update ASAP.

We are keeping "aquatic" as the default one with the option to change if someone experience some problem.

FWIW, I think the default theme looks better. Guessing aquatic was picked because it's closer to the C menuconfig, but the C menuconfig has borders around things, which makes it easier to avoid ugly color clashes.
Can't make style decisions for you though... :P

Still not sure that specifying colors in the monochrome theme is worthwhile. Doesn't seem like it would add much:

If the terminal doesn't support color, then the colors won't do anything

If the terminal supports color, then you're almost guaranteed to prefer some theme with colors.
Even if you don't like colors, just having two colors available isn't a good fit for menuconfig.py, because it makes stuff bleed into each other due to the "borderless" design (e.g. the cursor and the separators).

Maybe a proper separate grayscale theme could be defined instead. That might look better, though it'd require 256 colors.

Guessing aquatic was picked because it's closer to the C menuconfig

Yes, true.

Still not sure that specifying colors in the monochrome theme is worthwhile

Me neither. If there is no easy and clean solution for this then probably you can forget about this. I'm fine with it if it doesn't get solved. I opened this issue just to let you know about this in case you could fix it.

grayscale theme could be defined instead. That might look better, though it'd require 256 colors.

Probably it is an overkill and one would need to use grayscale when doesn't have colors.

Closing for now.
It's working as intended. "Colorless" is meant as "doesn't use/specify colors". If the terminal settings happen to make it some non-b/w color, it's probably fine. Many old hardware terminals have a green tint too. ;)

Pushed some more minor robustness tweaks yesterday btw.

Don't miss that there's a graphical configuration interface as well (guiconfig.py). It might be closer to what Windows users are used to.

Thank you!


windows-compatible launcher

I just had a look inside the coursier launcher and seen that it is a script file. Any chance of having a version which is a jar file?
I'd be very happy with a proguard version with all bootstrapped jars bundled.

Yeah, just a JAR (no shell) could be done. All the parameters added in the script would be added in a config file, put in the JAR, then read by it when it is run. I'll have a look.

Yeah, just a JAR (no shell) could be done. All the parameters added in the script would be added in a config file, put in the JAR, then read by it when it is run. I'll have a look.

Fixed by https://github.com/alexarchambault/coursier/commit/3ead95b324225320e948bf5b5bdbc245aa3fcc30.

Would need integration tests though...


Incorrect font in modal: deleting an org user

When deleting an organization user, the confirmation modal has an incorrect font:

@MariaCheca, please, take care of it.


Change alignment of Snapshot Management panels in pages/Main/Main.tsx

This was done to maintain consistent positioning across Index
Management panels and Snapshot Management panels. Also did the same
for Transform Jobs panel. Signed-off-by: Chris Hesterman
<EMAIL_ADDRESS>Description
Provides visually consistent positioning of Index Management  and Snapshot Management panels.
Issues Resolved
[List any issues this PR will resolve]
Check List

[ x] Commits are signed per the DCO using --signoff

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

I would revise commit message to -
Style changes to panels in pages/Main/Main.tsx
Signed-off-by: Chris Hesterman<EMAIL_ADDRESS>The bot has suggested a rebase however I am hesitant.  Any advice much appreciated.

Could you include screenshots of the UI elements before and after the change?

You may need to run yarn test:jest -u in order to update the snapshot files used by the unit test workflow.

panels before changes:
panels_before.pdf
panels after changes
panels_after.pdf

Codecov Report

Merging #236 (f86a83f) into main (8cc7431) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #236      +/-   ##
==========================================
- Coverage   51.55%   51.54%   -0.01%
==========================================
  Files         183      183
  Lines        5804     5805       +1
  Branches      888      888
==========================================
  Hits         2992     2992
- Misses       2591     2592       +1
  Partials      221      221

Impacted Files
Coverage Δ

...ement-dashboards-plugin/public/pages/Main/Main.tsx
7.40% <0.00%> (-0.14%)
:arrow_down:

...pages/Snapshots/containers/Snapshots/Snapshots.tsx
4.49% <0.00%> (ø)

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

The cypress test workflow should be unblocked once https://github.com/opensearch-project/index-management-dashboards-plugin/pull/239 is backported to main.

The cypress test workflow should be unblocked once #239 is backported to main.

These changes have been backported. Once you rebase your development branch, I believe the cypress test workflow should start passing.

E2E tests fixed, all checks passed.


SLDD: Generic Application Access Rules (Definition)

This object is used for Access Rule Definitions defined in transaction SLDW.
These rules are used to circumvent SQL Injections. Abap coding needs to be adjusted to use these rules.
The Rule definitions needs to be transported via the AddOn and GIT support will help with change management.
More information can be found in the SAP Guide "Securing_Remote_Function_Calls_RFC".
The details of this object seem to be located in the following tables:
SLDW_HEADER
SLDW_HEADERT (by Language)
SLDW_ELEMENTS

To implement this object type, create a PR or reopen this issue for further discussion (#5912).


Trailing dot support in Azure Files

First party apps (e.g. Storage Explorer) should enable trailing dot support by default.
Need SDK and AzCopy support. SDK probably available early March to mid-April.

Investigate which operations in File Share Storage should now support trailing dots in the file or directory name (ie. create new file, directory, move file/directory, rename file/directory, etc.).

Modify the validations to accept trailing dots
Make sure the trailing dot header is set when doing these operations
Make sure existing tests pass
Communicate to CTI how this impacts existing behaviors


Improve docs before alpha release

This PR re-writes the docs in a more friendly and extensive way. Extensive and pernickety feedback is very welcome to help make this as simple and easy-to-read as possible. I would say ideally, a 3rd year undergraduate with some experience with a command-line interface (and python installation), little experimental experience, could begin using the basic operations of the package within 15-20minutes of reading (10 would be ideal).
TODO

add estimated reading time
currently get started and documentation are in the same file. I think get started could just be the main documentation, supplemented by the api and cli reference, and a 'smaller 'additionally documentation'' page (currently this is called 'documentation' in the lower part of the page).
need to add all links. I'm not certain how this will work across pages (if get started and further documentation are on different pages).
There are some TODOs spread out.

Thanks Alessandro, sorry about all the typos (just realised you need to turn on spell checking in Obsidian.

Some general thoughts on the overall website structure:
We can have 3 main sections:

Getting started (current full docs)
Python API
Command-line interface

I think the repetition of the word "documentation" in section headers/cards is redundant, given that the title of the whole page is "Documentation".
Also, we should make the 3 section headers appear at the top of the page. I think this can be achieved by adding a hidden TOC directive on the main page. This is also how we have done it on our main website. This should also get rid of any toctree-related warnings during the build.
Thoughts @JoeZiminski ?

Thanks all, I will merge this so the docs are in a good state for tomorrow, and add an issue to tackle anything outstanding.


[DO NOT MERGE] MSLG tool package

This PR is merging MSLG tool package to master branch.

Hi @gabog why adding blocked label to this PR? Did I missed any background here?


fix: make actual current CameraPositionState available via currentCam…

…eraPositionState, not merely the initial CameraPositionState
Thank you for opening a Pull Request!

Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

[ ] Make sure to open a GitHub issue as a bug/feature request before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
[ ] Ensure the tests and linter pass
[ ] Code coverage does not decrease (if any source code was changed)
[ ] Appropriate docs were updated (if necessary)

Fixes #481 🦕

Bump


MAISTRA-681: Rewrite multi-namespace listwatcher to address performan…

…ce issues
This PR implements a two layer cache for multiple namespaces, with the lower level caches handling individual namespaces, resync etc and being aggregated into a single upper layer cache for consumption by other parts of the code.
The lower level consumes events from an informer and adapts them as Watch events, these watch events are then consumed by the upper level cache to create an aggregated set of watch events for consumers.
Note this does not suffer from the thrashing seen in the original implementation, it also removes the need to track the resource versions for each namespace as they are now handled independently of each other.

Ditto. Haven't compared line-for-line, but trusting this is the same as #305 as far as I can tell -- that's where the discussion is. LGTM.

+1, there is one minor difference due to the refactoring of the MemberRollController (different import and name) but otherwise identical


0.7

https://test.pypi.org/project/geoengine/0.7.0/
https://pypi.org/project/geoengine/0.7.0/

 Release

bors merge

bors merge


ConnectException/ETIMEDOUT with retrofit/OkHttp

Related to square/retrofit#432, I'm getting some strange errors during requests.
Retrofit: 1.9.0
OkHttp: 2.2.0 and 2.4.0
Tested Android versions: 4.4.4, 5.0.2, 5.1 and 5.1.1
Stacktrace:
retrofit.RetrofitError: failed to connect to <myserver.local>/<ip address> (port 80): connect failed: ETIMEDOUT (Connection timed out)
    at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:395)
    at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:240)
    at java.lang.reflect.Proxy.invoke(Proxy.java:397)
    at $Proxy1.getRaw(Unknown Source)
    <Internal code ommitted>
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
    at java.lang.Thread.run(Thread.java:818)
Caused by: java.net.ConnectException: failed to connect to <myserver.local>/<ip address> (port 80): connect failed: ETIMEDOUT (Connection timed out)
    at libcore.io.IoBridge.connect(IoBridge.java:124)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:456)
    at java.net.Socket.connect(Socket.java:882)
    at com.squareup.okhttp.internal.Platform$Android.connectSocket(Platform.java:179)
    at com.squareup.okhttp.Connection.connect(Connection.java:155)
    at com.squareup.okhttp.Connection.connectAndSetOwner(Connection.java:174)
    at com.squareup.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:120)
    at com.squareup.okhttp.internal.http.RouteSelector.next(RouteSelector.java:131)
    at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:312)
    at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:235)
    at com.squareup.okhttp.Call.getResponse(Call.java:262)
    at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:219)
    at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:192)
    at com.squareup.okhttp.Call.execute(Call.java:79)
    at retrofit.client.OkClient.execute(OkClient.java:53)
    at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:326)
    ... 16 more
Caused by: android.system.ErrnoException: connect failed: ETIMEDOUT (Connection timed out)
    at libcore.io.Posix.connect(Native Method)
    at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:111)
    at libcore.io.IoBridge.connectErrno(IoBridge.java:137)
    at libcore.io.IoBridge.connect(IoBridge.java:122)
    ... 32 more
java.net.ConnectException: failed to connect to <myserver.local>/<ip address> (port 80): connect failed: ETIMEDOUT (Connection timed out)
    at libcore.io.IoBridge.connect(IoBridge.java:124)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:456)
    at java.net.Socket.connect(Socket.java:882)
    at com.squareup.okhttp.internal.Platform$Android.connectSocket(Platform.java:179)
    at com.squareup.okhttp.Connection.connect(Connection.java:155)
    at com.squareup.okhttp.Connection.connectAndSetOwner(Connection.java:174)
    at com.squareup.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:120)
    at com.squareup.okhttp.internal.http.RouteSelector.next(RouteSelector.java:131)
    at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:312)
    at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:235)
    at com.squareup.okhttp.Call.getResponse(Call.java:262)
    at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:219)
    at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:192)
    at com.squareup.okhttp.Call.execute(Call.java:79)
    at retrofit.client.OkClient.execute(OkClient.java:53)
    at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:326)
    at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:240)
    at java.lang.reflect.Proxy.invoke(Proxy.java:397)
    at $Proxy1.getRaw(Unknown Source)
    <Internal code ommitted>
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
    at java.lang.Thread.run(Thread.java:818)
Caused by: android.system.ErrnoException: connect failed: ETIMEDOUT (Connection timed out)
    at libcore.io.Posix.connect(Native Method)
    at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:111)
    at libcore.io.IoBridge.connectErrno(IoBridge.java:137)
    at libcore.io.IoBridge.connect(IoBridge.java:122)
    ... 32 more
android.system.ErrnoException: connect failed: ETIMEDOUT (Connection timed out)
    at libcore.io.Posix.connect(Native Method)
    at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:111)
    at libcore.io.IoBridge.connectErrno(IoBridge.java:137)
    at libcore.io.IoBridge.connect(IoBridge.java:122)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:456)
    at java.net.Socket.connect(Socket.java:882)
    at com.squareup.okhttp.internal.Platform$Android.connectSocket(Platform.java:179)
    at com.squareup.okhttp.Connection.connect(Connection.java:155)
    at com.squareup.okhttp.Connection.connectAndSetOwner(Connection.java:174)
    at com.squareup.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:120)
    at com.squareup.okhttp.internal.http.RouteSelector.next(RouteSelector.java:131)
    at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:312)
    at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:235)
    at com.squareup.okhttp.Call.getResponse(Call.java:262)
    at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:219)
    at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:192)
    at com.squareup.okhttp.Call.execute(Call.java:79)
    at retrofit.client.OkClient.execute(OkClient.java:53)
    at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:326)
    at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:240)
    at java.lang.reflect.Proxy.invoke(Proxy.java:397)
    at $Proxy1.getRaw(Unknown Source)
    <Internal code ommitted>
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
    at java.lang.Thread.run(Thread.java:818)

I read somewhere that OkHttp uses a pool of sockets to reduce the latency, and sometimes, these sockets simply "times out". To avoid this (and considering my suspicious about AP router or server bottleneck), I've included a for loop to retry the request another 2 times after a ConnectException, but without any results.

Can you provide an executable test case to demonstrate the problem you're seeing? CallTest.java is a good place to start. Right now I can't tell if this is an OkHttp problem or just an expected change in your device's connectvitiy.

@swankjesse I believe that connectivity may not be a problem, although I have created a class that gets both a WakeLock and WifiLock to ensure that these problems are diminishes.
However, I will prepare a case as soon as possible.

Weird coincidence but I was looking at similar stack traces against latest Android code.
In my case (different from yours) ETIMEDOUT is thrown in the case where Socket.connect() has been called with an infinite timeout (second arg 0). There are two strange things:

0 should mean "infinity", in my case it would throw after about a minute.
The exception thrown (ConnectException) is not the one that should be thrown in the event of a timeout. (which would be SocketTimeoutException).

However, I would interpret the ETIMEDOUT error code as the OS terminating the connection attempt "for some reason", which may be some OS-level timeout or something else. I have asked for some clarification from the Android networking folks about when ETIMEDOUT can occur and I'll get back to you  if I hear anything.

@nfuller I have also noticed timeout after about 60 seconds.
I use an AMQP client to process some messages, which also keep an open connection as much as possible, and I have caught many timeout errors, connection reset, etc.
First I thought it might be related to the Volta project introduced in Lollipop, as a way of eliminating the connections that consume the battery, but the same behavior happened with the locks and in different versions, and different devices (most are Asus Nexus 7 2012 ).

I have similar problem. Network connectivity is not an issue, server is located on my laptop in the same LAN as the phone. This occures randomly on application launch and then disappears for some time (i.e. app launches and works normally).
    java.net.ConnectException: failed to connect to /<IP_ADDRESS> (port 3000): connect failed: ETIMEDOUT (Connection timed out)
            at libcore.io.IoBridge.connect(IoBridge.java:128)
            at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183)
            at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:456)
            at java.net.Socket.connect(Socket.java:887)
            at com.squareup.okhttp.internal.Platform$Android.connectSocket(Platform.java:190)
            at com.squareup.okhttp.internal.http.SocketConnector.connectRawSocket(SocketConnector.java:160)
            at com.squareup.okhttp.internal.http.SocketConnector.connectCleartext(SocketConnector.java:67)
            at com.squareup.okhttp.Connection.connect(Connection.java:152)
            at com.squareup.okhttp.Connection.connectAndSetOwner(Connection.java:185)
            at com.squareup.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128)
            at com.squareup.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:341)
            at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:330)
            at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:248)
            at com.squareup.okhttp.Call.getResponse(Call.java:273)
            at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:230)
            at tk.tewi.kitoss.services.SyncService$onStartCommand$1.intercept(SyncService.kt:330)
            at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:227)
            at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:201)
            at com.squareup.okhttp.Call.access$100(Call.java:36)
            at com.squareup.okhttp.Call$AsyncCall.execute(Call.java:164)
            at com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
            at java.lang.Thread.run(Thread.java:818)
     Caused by: android.system.ErrnoException: connect failed: ETIMEDOUT (Connection timed out)
            at libcore.io.Posix.connect(Native Method)
            at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:111)
            at libcore.io.IoBridge.connectErrno(IoBridge.java:141)
            at libcore.io.IoBridge.connect(IoBridge.java:126)
            at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183)
            at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:456)
            at java.net.Socket.connect(Socket.java:887)
            at com.squareup.okhttp.internal.Platform$Android.connectSocket(Platform.java:190)
            at com.squareup.okhttp.internal.http.SocketConnector.connectRawSocket(SocketConnector.java:160)
            at com.squareup.okhttp.internal.http.SocketConnector.connectCleartext(SocketConnector.java:67)
            at com.squareup.okhttp.Connection.connect(Connection.java:152)
            at com.squareup.okhttp.Connection.connectAndSetOwner(Connection.java:185)
            at com.squareup.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128)
            at com.squareup.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:341)
            at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:330)
            at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:248)
            at com.squareup.okhttp.Call.getResponse(Call.java:273)
            at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:230)
            at tk.tewi.kitoss.services.SyncService$onStartCommand$1.intercept(SyncService.kt:330)
            at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:227)
            at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:201)
            at com.squareup.okhttp.Call.access$100(Call.java:36)
            at com.squareup.okhttp.Call$AsyncCall.execute(Call.java:164)
            at com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
            at java.lang.Thread.run(Thread.java:818)

hello,
I have exactly the same issue. below is my cleaned code that trigger the error. For information, the code is executed on a watch (android wear).
public class HomeActivity extends Activity implements OnButtonClikedOnHomeActivity {
public final static String TAG = "HOMEACTIVITY";
private static final String API_URL = "https://api.github.com";

private GoogleApiClient mGoogleApiClient;

private FrameLayout fragmentContainerLayout;
private TextView titleTextView;

//GPS Listener
private LocationListener gpsListener = new LocationListener() {
    @Override
    public void onLocationChanged(Location gpsLocation) {
        SensorSample gpsSample = new SensorSample(System.currentTimeMillis(), SensorSample.TYPE_GPS, new float[]{(float) gpsLocation.getLatitude(), (float) gpsLocation.getLongitude(), gpsLocation.getAccuracy()});
        Log.d(TAG, "GPS FIX !! latitude:" + gpsLocation.getLatitude() + "longitude:" + gpsLocation.getLongitude() + " precision:" + gpsLocation.getAccuracy());

        if (gpsLocation.getAccuracy()<100.0f){
            Log.d(TAG,"GPS Position is accurate enough. let's do it");

            GetGolfPlacesAroundTask getGolfPlaces = new GetGolfPlacesAroundTask();
            getGolfPlaces.execute(gpsLocation);

        }
    }
};

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_home);

    fragmentContainerLayout = (FrameLayout) findViewById(R.id.fragment_container);
    titleTextView = (TextView) findViewById(R.id.textView_view_title);

    FragmentManager fragmentManager = getFragmentManager();
    FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();

    Fragment activeFragment=null;

    activeFragment = HomeLoadingGolfPlacesScreen.newInstance();

    if (activeFragment!=null) {
        fragmentTransaction.add(R.id.fragment_container, activeFragment);
    }
    else Log.e(TAG,"big problem with fragments");

    //let's commit the change !
    fragmentTransaction.commit();

}

@Override
protected void onResume() {
    super.onResume();
    initGoogleApiClient();

    Log.d(TAG, "CHECKING Google services");
    GoogleApiAvailability mGoogleApiAvailability = GoogleApiAvailability.getInstance();
    int result = mGoogleApiAvailability.isGooglePlayServicesAvailable(this);
    if (result!= ConnectionResult.SUCCESS){
        Log.d(TAG,"PROBLEM WIth Google services, lettin Google solve it");
        GooglePlayServicesUtil.getErrorDialog(result, this, 1001).show();
    }
    else{
        Log.d(TAG, "Google services OK, let's connect to it");
        try {
            mGoogleApiClient.connect();
        } catch (Exception e) {e.printStackTrace();}
    }
}
@Override
protected void onPause() {
    if (mGoogleApiClient.isConnected()) {
        mGoogleApiClient.disconnect();
    }
    super.onPause();
}

private class GetGolfPlacesAroundTask extends AsyncTask<Location, Void, List<APINearbyResponseObject>> {
    protected List<APINearbyResponseObject> doInBackground(Location... locations) {

        Location loc = locations[0];
        double lat = loc.getLatitude();
        double longi = loc.getLongitude();
        String locString = ""+lat+","+longi;

        OkHttpClient okHttpClient = new OkHttpClient();
        okHttpClient.setReadTimeout(60 * 1000, TimeUnit.MILLISECONDS);

        RestAdapter restAdapter = new RestAdapter.Builder()
                .setClient(new OkClient(okHttpClient))
                .setLogLevel(RestAdapter.LogLevel.FULL)
                .setEndpoint(API_URL)
                .build();
        EgullApi api = restAdapter.create(EgullApi.class);

        List<APINearbyResponseObject> around = api.getGolfAround(locString);

        return around;
    }

    protected void onPostExecute(List<APINearbyResponseObject> result) {
        Log.d(TAG, "json response : "+new Gson().toJson(result));
    }
}

private void initGoogleApiClient() {
    if (mGoogleApiClient==null) {
        mGoogleApiClient = new GoogleApiClient.Builder(this)
                .addConnectionCallbacks(new GoogleApiClient.ConnectionCallbacks() {
                    @Override
                    public void onConnected(Bundle connectionHint) {
                        Log.d(TAG, "CONNECTED TO GOOGLE PLAY SERVICES: " + connectionHint);
                        LocationRequest mLocationRequest = new LocationRequest().setInterval(10000).setFastestInterval(2000).setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
                        LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient, mLocationRequest, gpsListener);
                        Log.d(TAG,"GPS Listener recorded");
                        // Now you can use the data layer API
                    }

                    @Override
                    public void onConnectionSuspended(int cause) {
                        Log.d(TAG, "CONNECTION TO GOOGLE SERVICES SUSPENDED: " + cause);
                    }
                })
                .addOnConnectionFailedListener(new GoogleApiClient.OnConnectionFailedListener() {
                    @Override
                    public void onConnectionFailed(ConnectionResult result) {
                        Log.d(TAG, "CONNECTECTION TO GOOGLE SERVICES FAILED: " + result);
                    }
                })
                .addApi(Wearable.API)
                .addApi(LocationServices.API)
                .build();

        Log.d(TAG, "ONCREATE : GOOGLEAPICLIENT CREATED");
    }
}
private Collection<String> getNodes() {
    HashSet<String> results = new HashSet<String>();
    NodeApi.GetConnectedNodesResult nodes =
            Wearable.NodeApi.getConnectedNodes(mGoogleApiClient).await();
    for (Node node : nodes.getNodes()) {
        results.add(node.getId());
    }
    return results;
}

}

To clarify the possible causes: The device's WiFi connection are configured with static IP and the first DNS server is pointing to a Windows Server 2012 (with DNS service enabled) and the second is <IP_ADDRESS>.
Anyone using a different configuration have this issues?

@bisonfute For instance, I have tested Retrofit with OkHttpClient and HttpURLConnectionClient, both throwing errors.

@bisonfute I also use Location detection. Maybe that's related?

@fuwaneko I think it's not. I'm not using nothing related to location/GPS.
It seems that, like me, @bisonfute is launching various requests one after another. It seems that we are exausting the sockets is some way.
@bisonfute I think that you changed the value of API_URL constant, right? The real value is a fqdn or an IP?  I'm not too familiar with these API's, and I'm not sure how often it execute the callback.

@geovanisouza92 no, location is independent from this. It's in another part of app. I launch single request from Service to authenticate user. Until that request finishes app doesn't send any more.

@geovanisouza92 I spoke to the Android networking folks.
The 1-minute timeout is a result of the Linux /proc/sys/net/ipv4/tcp_syn_retries setting of 5 (on Android). There may be an off by 1 error here or it may be me misunderstanding the meaning of retry or the start values, but with a value of 5 you get something like:
1 + 2 + 4 + 8 + 16 + 32 = 63
Tests on a Linux desktop with a value of 6 suggest a timeout of that + 64 = 127.
To the question of when else it might occur: "all TCP connections are killed with ETIMEDOUT when the IP address that they are established on is removed from the system. This usually happens when the network goes down. In L or later, Wifi goes down when wifi is switched off disconnects. Mobile goes down when it loses signal, or 30 seconds after it's replaced by a working wifi network."
I appreciate it will be difficult, but if you can come up with a repro case where it happens independent of this then I can create an Android bug.

@nfuller Thank you for the clarification!
About tcp_syn_retries, I imagine that the problem is that my server is not sending the SYN-ACK in the required time, which causes the timeout.
About ETIMEDOUT, I commented that I'm getting a WakeLock and WifiLock in Service#onCreate and releasing them in Service#onDestroy, which theoretically should inform the Android about the need to keep on Wifi and connection active. When the connection is established I also use Service#startForeground. On devices that run Android 5, I noticed that even with these Locks, the devices after some idle time, disconnect the Wifi anyway, and I realize it when I light the screen and see the "empty" icon Wifi.
So, anyone know a recommended way to keep the Wifi and the connection alive for longer, or reduce the time to reconnect?

hi all,
sorry for the delay.

@geovanisouza92  my device have a dynamic IP address and my ISP DNS system
@geovanisouza92 API_URL is ``` java private static final String API_URL = "https://api.github.com";````
@nfuller the timeout I get is the one that is configured in my client 30seconds if I set it to this value or 60s in the code pasted above.

Guys, I feel like I am in a deadend. Do you think there's a way I could use Retrofit in my app ? I don't understand why the problem is not happening for everyone.

Thank you for your help,
jn.

@bisonfute: This question might better be asked on StackOverflow. I only responded on this issue because I happened to be looking at the network behavior of Socket on Android and it looked relevant. Also, Jesse can't take any action until he can repeat it so it usually requires some diagnosis on your part and producing a failing test case.
If you're setting the read timeout on OkHttpClient and it's triggering you should see a SocketTimeoutException, not a ConnectException. I'm not really following what you're seeing right now.
If it's a networking issue rather than a timeout you may want to look at all the IPs the host is resolving to. e.g. using nslookup, and seeing if your network is routing properly to each.

Hi @nfuller, thank you for your answer !
I will post my problem on stackoverflow.
You are totally right, I have a ConnectException, below are the retrofit logs I get.
Moreover, I ran some test trying to change the socket timetout time of my client to 60s, 30s and 10s. And the ConnectException is thrown after a time that is not related at all with my client timeout. Often around 120 seconds!
I don't know what it means ?
The code I pasted above is a good example of a sample code that is not working, I think we can say it is a failing test case, no ? If you need more info, let me know !

@bisonfute If you're seeing a ConnectException then it is a similar issue to the previous report. The conclusion will probably be the same. Either your device cannot reach the server (the host is down or something in the middle is black-holing the TCP packets), or something is happening to bring down the network connection during the connection attempt due to (e.g.) connectivity issue or device idleness.
By "failing test case" it usually means "come up with a JUnit test" (hard in this case because of the network routing aspects, I suspect).
What happens if you remove OkHttp / retrofit and just create a Socket to <IP_ADDRESS> port 443?

Hi all,
After many investigations, I think I found the root of the problem.
As said here : https://github.com/square/okhttp/issues/1792#issuecomment-130777695 I am coding on Android Wear. And it is not clearly stated in the doc, but it is impossible to make the watch communicate with internet. The phone won't act as a proxy automatically (as it does for GPS for instance).
So I guess the request is blocked within the watch and I had a ConnectException.
So everyone : don't try to use retrofit or any httpClient on android wear it won't work.
As an information I solved my problem developing a proxy on the phone dedicated to my network exchanges.
Thank you all for your support.

@bisonfute thanks for the info, but my app is phone and tablet only.

@fuwaneko try to disable okhttp and use Retrofit only:
compile 'com.squareup.retrofit:retrofit:1.6.0'
/compile 'com.squareup.okhttp:okhttp:2.5.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.5.0'
compile 'com.squareup.okio:okio:1.6.0'/
After getting strange ConnectionTimeout and SocketTimeoutExceptions for a couple of weeks one thought is bugging me more often: a few extra milliseconds is not so important as stability of your app.

Not sure what action to take here. If this is still an issue, please let me know and I'll reopen. An executable test case that demonstrates the problem would be particularly excellent!

I am experiencing this issue as well with the latest maven published Beta2. It is a serious concern because Retrofit should be swallowing these exceptions. Doesn't really matter WHY they are happening, the fact of the matter is Retrofit should be taking care of them and issuing a failed response as a result.
This is not a triggerable bug as it happens maybe every 1 in 10 startups. There is nothing special about my code, its literally as simple as your homepage sample code.
Obligatory stack trace:
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime: Process: com.droidmonkey.moveblue, PID: 10315
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime: java.lang.reflect.InvocationTargetException
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:372)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at com.arasthel.swissknife.SwissKnife$12.run(SwissKnife.groovy:491)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at java.lang.Thread.run(Thread.java:818)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:  Caused by: java.net.ConnectException: failed to connect to mbus.doublemap.com/<IP_ADDRESS> (port 80) after 10000ms: isConnected failed: EHOSTUNREACH (No route to host)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at libcore.io.IoBridge.isConnected(IoBridge.java:238)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at libcore.io.IoBridge.connectErrno(IoBridge.java:171)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at libcore.io.IoBridge.connect(IoBridge.java:122)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:456)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at java.net.Socket.connect(Socket.java:886)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at com.squareup.okhttp.internal.Platform$Android.connectSocket(Platform.java:190)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at com.squareup.okhttp.Connection.connectSocket(Connection.java:196)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at com.squareup.okhttp.Connection.connect(Connection.java:172)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at com.squareup.okhttp.Connection.connectAndSetOwner(Connection.java:367)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at com.squareup.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:328)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:245)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at com.squareup.okhttp.Call.getResponse(Call.java:267)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:224)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:195)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at com.squareup.okhttp.Call.execute(Call.java:79)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at retrofit.OkHttpCall.execute(OkHttpCall.java:116)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at retrofit.ExecutorCallAdapterFactory$ExecutorCallbackCall.execute(ExecutorCallAdapterFactory.java:61)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:372)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:230)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:114)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at com.droidmonkey.moveblue.FeedLoader.performUpdate$background(FeedLoader.groovy:75)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:372)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at com.arasthel.swissknife.SwissKnife$12.run(SwissKnife.groovy:491)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at java.lang.Thread.run(Thread.java:818)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:  Caused by: android.system.ErrnoException: isConnected failed: EHOSTUNREACH (No route to host)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at libcore.io.IoBridge.isConnected(IoBridge.java:223)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at libcore.io.IoBridge.connectErrno(IoBridge.java:171)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at libcore.io.IoBridge.connect(IoBridge.java:122)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:456)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at java.net.Socket.connect(Socket.java:886)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at com.squareup.okhttp.internal.Platform$Android.connectSocket(Platform.java:190)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at com.squareup.okhttp.Connection.connectSocket(Connection.java:196)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at com.squareup.okhttp.Connection.connect(Connection.java:172)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at com.squareup.okhttp.Connection.connectAndSetOwner(Connection.java:367)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at com.squareup.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:328)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:245)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at com.squareup.okhttp.Call.getResponse(Call.java:267)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:224)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:195)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at com.squareup.okhttp.Call.execute(Call.java:79)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at retrofit.OkHttpCall.execute(OkHttpCall.java:116)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at retrofit.ExecutorCallAdapterFactory$ExecutorCallbackCall.execute(ExecutorCallAdapterFactory.java:61)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:372)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:230)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:114)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at com.droidmonkey.moveblue.FeedLoader.performUpdate$background(FeedLoader.groovy:75)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:372)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at com.arasthel.swissknife.SwissKnife$12.run(SwissKnife.groovy:491)
11-04 19:04:35.465 10315-10918/com.droidmonkey.moveblue E/AndroidRuntime:     at java.lang.Thread.run(Thread.java:818)


[ROADMAP] Update after the v0.15.4 release

The latest minor release with significant breaking changes was some time ago.
The next branch might not be ready before a couple of months. I think that it would be good to move to a v0.16.0 to release the existing breaking changes on master branch and to work on making the upgrade to next smoother.
@callemall/material-ui That's my proposal, please review 👼 .

@oliviertassinari if we do that, we need to prepare something to explain the situation, because across a huge number of issues over the last ~5 months I/we have been telling people that certain improvements are coming in 0.16.0 (performance, API, etc). If we release 0.16.0 and none of the issues we have had set for 0.16.0 a long time ago (such as improve styling setup, list performance, etc etc etc) have been resolved, there might be some very confused people.

I'd rather see a v0.15.5 release with bug fixes or minor features even if it has breaking changes. As long as the changes are well documented in a "Breaking Changes" section in the CHANGELOG all is good. Pre 1.0.0 releases aren't SemVer anyway so don't see this being an issue. As someone that is just starting a port of a project to Material-UI I would love to see more frequent releases.
Also, I'd love to see an estimate when v0.16.0 may be released as beta as this is impacting some of our current decisions. It looks like @nathanmarks is cranking so hoping it is not too long!

@skirunman
Just a quick side note RE

Pre 1.0.0 releases aren't SemVer anyway so don't see this being an issue.

They are SemVer, but 0.y.z has been misused for this library (IMO).

@skirunman I'll have a better estimate a week from now

@nathanmarks Awesome, thanks!

I would love to see more frequent releases.

@skirunman I really like what react-bootstrap is doing. They are releasing quite often, every 7 days or so.
That sounds far better than doing releases every month with a bigger regression risk and more painful upgrade path for our users.
However, to achieve this velocity, a better test suite would help a lot. Not something we have really on master but that we do on the next 🚀 .

if we do that, we need to write something to explain the switch in goal for 0.16.0, because across a number of issues over the last ~5 months

@nathanmarks I completely agree, I'm gonna update this PR.

@oliviertassinari Side note: Im wondering if we should start thinking about what v1.0.0 looks like.

When we merge this, we need to shift the milestone for next. What will we rename it?

I'm wondering if we should start thinking about what v1.0.0 looks like.

I think that we can ask this question again once the next branch is released.
We may realize that the API is stable enough so we can move from 0.x.0 to x.0.0 kind of like how React did it.

What will we rename it?

What about using the name of the branch: next?

@oliviertassinari sounds good on all fronts 👍


Consider removal of if option

This could be handled by a separate plugin, like an updated version of slate-when

It's probably fine as-is for now, closing.