stats: properly extract tag for connection limit filter

Commit Message: stats: properly extract tag for connection limit filter
Additional Description: working towards #21595
Risk Level: low
Testing: added unit tests to confirm extraction works properly
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

Also now that we've started the review, please don't force-push again.
See https://github.com/envoyproxy/envoy/blob/main/CONTRIBUTING.md:

Once your PR is under review, please do not rebase it. If you rebase, you will need to force push to github, and github's user interface will force your reviewer to review the PR from scratch rather than simply look at your latest changes. It's much easier to review new commits and/or merges. We squash rebase the final merged commit so the number of commits you have in the PR don't matter. Again once your PR is assigned a reviewer, unless you need to fix DCO please do not force push. If you need to pull recent changes you can run

branch=$(git status|head -1|cut -f3 -d\ )
git checkout main
git pull
git checkout "$branch"
git merge main


JSON DSG Proposal: Fix typos, IHE TF3 5.5.x refs, Use Case Content Co…

📑 Description
Some thoughts on the current (2023-02-15) WHO DSG JSON Proposal:

Add refs to IHE TF3: 5.5.x
Add Use Case Content Consumer
Fix some typos

✅ Checks

[ ] My pull request adheres to the code style of this project
[x] My code requires changes to the documentation
[ ] I have updated the documentation as required
[ ] All the tests have passed
[ ] I have selected a committee co-chair to review the PR

Thanks Gaby!


Question: Optimization and Dask dataframe to_parquet

Hello,
I'm trying to both use Dask with my workflow and experiment with different ways to do the same task to learn Dask and get an intuition of which API (array, dataframe, bag, delayed) to use. Therefore, some feedback on the thought process would be greatly appreciated. I hope that I can learn intuition/principles from a small example and extrapolate to bigger workflows. I also have questions about how Dask dataframe is written to parquet.
Below is a subset of my computational workflow :

Some background: the final Dask Dataframe can have up to 100k columns and 1 million rows. The parser for my input data returns test_arr as Dask-delayed objects so I can't change that. I need each each test_arr to map to a column because in next step of the pipeline, I only need a subset of columns as any given moment (but all the columns should be batched together as a dataset entity).
I'm only showing 2 conditions and 2 choices in np.select, but I have up to 10 pairs with very different logic.
Is there a better way to do what I did? I resorted to using delayed all the way for my use case because: (these opinions are from my limited experience, please correct me if I'm wrong)

Dask Dataframe: hard to initialize efficiently/ if you are not reading it from a file (csv,parquet etc). There is no easy way to initialize dataframe by columns, only through assigning one by one or dd.concat

Dask Array : Similar to Dataframe. Since there is no dask.array.selectto mimic the numpy API, I would have to use numpy then convert to dask array, and doing so would create a huge array in memory, which defeats the purpose. I couldn't convert my test_arr to a Dask array using from_delayed because I need to know the rows for the shape argument in da.from_delayed, which results in computing the array to memory. Even then, the lack of the convenience function da.select would make my code more lengthy than needed due to combination of multiple conditions and choices.

Dask bag: Although Dask bag can be used in much more flexible ways, it suffers in speed. I have tried mapping simple functions onto dask bag and realize that it is much much slower. Even when I have a sequence of length in the millions, I would batch them with delayed instead of using bags. In my mind, bags are the last resort when nothing else works. Also, I'm doing mostly numpy/pandas calls so I would lose out on performance with bag. Also, to convert bag into dataframe,  each element in the bag should be a row, whereas I have each entry as a column.

From the above, the logical way is to use delayed, flexible, fast, and take advantage of already-exist numpy functions.
Parquet: With a table of this size (100k column and 1 million rows), I'm afraid I can't pull more than one column of the data in memory of local cluster at any point, up to outputting to parquet (talking to IT at my work to lower their restrictions on our cluster to allow dask-worker jobs). When outputting to parquet, does Dask do it one column at a time? How can I specify that each column is an independent unit?
If there are some resources on any of my questions above,  a link instead of explanation is more than enough. I might have missed something while reading the documentation. Thanks in advance!

Following up on this, I realize that my dataframe had only one partition. However, I have no idea how to repartition it. This becomes an issue when I try to construct the final dataframe:
With this df as the basic structure

I tried to append those delayed columns but encountering trouble:
for col_name, col in tqdm(rsid_col_tuple_list): #rsid_col_tuple_list:[(name, dask_delayed(np.select))]
    final_df[col_name] = dd.from_delayed(col, meta=(col_name, "<U5"))

raises Not all divisions are known, can't align partitions. Please use set_index to set the index
when I add .compute() it works just fine.
for col_name, col in tqdm(rsid_col_tuple_list): #rsid_col_tuple_list:[(name, dask_delayed(np.select))]
    final_df[col_name] = dd.from_delayed(col, meta=(col_name, "<U5")).compute()

I understand that it is because the divisions are mismatched between the columns to be added and the dataframe, but can't find a way to generate/insert that division metadata into the column. Doing dd.from_delayed(col, meta=(col_name, "<U5"), divisions = final_df.divisions) didn't work.
I think this should be easy and I'm just missing some key things right now. I have looked at many sources: (1, 2,3,4) but still can't figure it out. I'd really appreciate any pointers in the right direction.

It'd be a bit easier to digest this if you could provide a minimal example that demonstrates the essence of your problem http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports.
A few scattered thoughts

You probably don't want to mix dask.delayed and dask.array or dask.dataframe. Something like dask.delayed(np.all)(dask_array) is strange. See http://docs.dask.org/en/latest/best-practices.html and http://docs.dask.org/en/latest/delayed-best-practices.html#don-t-call-dask-delayed-on-other-dask-collections
I'm not familiar with np.select, but it seems somewhat similar to np.where. Perhaps that would suffice for you, or perhaps dask.array.select could be implemented (separate issue?)

There is no easy way to initialize dataframe by columns

Correct. Dask datafrmaes are partitioned along the index. This seems to fit your problem structure well (longer than wider). Why was this an issue?
A simple, focused example would make it easier for us to provide guidance / find what needs to be done here.

Hi @TomAugspurger, I'll try but it's hard to provide a minimal example to pull out the main piece of this: the delayed object returned by another package's data parser (who uses dask). I'll try my best to respond clearly to your points.

the test_arr is not a dask array, but it's actually a delayed object that returns a numpy array when computed. In order to use np.all to get boolean from comparison, I have to either compute test_arr or wrap np.all with delayed, which I did.
Yes the use of np.select is for convenience, when you have multiple conditions mapped to multiple values
I need to map the list of test_arrobjects into columns of a parquet file since that would help my later steps in analysis pipeline.

I need each each test_arr to map to a column because in next step of the pipeline, I only need a subset of columns as any given moment (but all the columns should be batched together as a dataset entity).

Basically, I cant find a way to put divisions information into my delayed np.select/np.where object so that it can be appended as columns into my base dataframe below without triggering computation. I'm trying to keep it as DAG until the to_parquet step.

Let me know if this clarifies!

The data parser gives genotype, which is a list of delayed dictionaries. The array I care about is in the key "probs"

I try to keep things delayed until to_parquet because I assume that parquet uses column store, so that each column can be computed in sequence and not all at once?

I'll certainly acknowledge that providing minimal examples is difficult :)
It seems like my initial skim was off base, so I'll hope that you can
get something put together.
As an aside, code snippets are typically preferred to screenshots (makes it
easier to try out & think about things locally).
On Tue, May 14, 2019 at 3:57 PM hoangthienan95<EMAIL_ADDRESS>wrote:

The data parser gives genotype, which is a list of delayed dictionaries.
The array I care about is in the key "probs"
[image: image]
https://user-images.githubusercontent.com/25307953/57731732-59198880-7669-11e9-9f72-711dac66e6ec.png
[image: image]
https://user-images.githubusercontent.com/25307953/57731675-37b89c80-7669-11e9-8f30-a8d817912af3.png
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/dask/dask/issues/4795?email_source=notifications&email_token=AAKAOIUHCMIYNJG36RQEWETPVMRUDA5CNFSM4HMVDPKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVMYQZY#issuecomment-492406887,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAKAOISI3COITZZVWIXCCRTPVMRUDANCNFSM4HMVDPKA
.

@hoangthienan95 how are things going here? Have you had time to produce a minimal example demonstrating the problem(s)?

Closing due to lack of response.  @hoangthienan95 if you're able to provide a minimal example please respond here and we'll reopen.

Hi there, sorry for being slow to get back to you, the past few weeks have been busy.
One of the problems I am facing is doing operations/assign new columns from current columns where the index is not monotonically increasing and doesn't start from 0. My id index is the result from earlier merging operations and I would like to keep it for future operations.
I'm having a hard time creating new column while keeping the index and so there's misalignment when assigning the new column:
test_df = pd.DataFrame({'case_control_status': {1000194: 1,
  1000783: 0,
  1001009: 0,
  1001289: 0,
  1001347: 0},
 'sex_str': {1000194: 'Female',
  1000783: 'Female',
  1001009: 'Female',
  1001289: 'Male',
  1001347: 'Male'}}
)

test_ddf = dd.from_pandas(test_df, npartitions = 2)

In pandas, this works:
test_df.assign(sex = np.where(test_df["sex_str"] == "Male",1,0))
In dask, from what I know, the only way to assign a column is to turn it into a Dask Series? Here are the approaches I tried:
test_ddf.eval("sex = 1 if sex_str == 'Male' else 0")  #NotImplementedError: 'IfExp' nodes are not implemented

test_ddf["sex_str"].map_partitions(lambda x: np.where(x == "Male", 1, 0)) #returns dask array with no index and can’t assign

test_ddf.map_partitions(lambda x: np.where(x.sex_str == "Male", 1,0)) #same as above

dd.from_dask_array(test_ddf["sex_str"].map_partitions(lambda x: np.where(x == "Male", 1 , 0))) doesn't keep index

dd.from_dask_array(da.where(test_ddf["sex_str"] == "Male", 1, 0)) #index error, tuple index out of range

dd.from_array(np.where(test_ddf["sex_str"] == "Male", 1, 0)) #doesn't keep the index

The only thing that worked was:
test_ddf["sex_str"].map_partitions(lambda x: x.apply(lambda y: 1 if y == "Male" else 0))

but it seems unnecessarily complicated. Basically, I need a way to assign the newly created Series the same index as test_ddf or reset the index of test_ddf to monotonically increasing (which I tried with `test_ddf.reset_index().reset_index().set_index("index"). Am I missing something?
I looked at:
https://github.com/dask/dask/issues/2690#issuecomment-427838196
https://github.com/dask/dask/issues/1426
but still don't know how to proceed

On the narrow question of how to add a column, in this case I would recommend
In [17]: test_ddf.assign(sex=(test_ddf.sex_str == 'Male').astype(int))
Out[17]:
Dask DataFrame Structure:
              case_control_status sex_str    sex
npartitions=2
1000194                     int64  object  int64
1001289                       ...     ...    ...
1001347                       ...     ...    ...
Dask Name: assign, 10 tasks

Thank you @TomAugspurger, that worked. However, I have other parts of my code where I have to add columns while keeping the index that this cannot be applied. In general, if you can create an array from applying a numpy function on dask dataframe df, how do you convert this to a Dask Series while retaining the index of df so it could be appended? (assuming that the function is also implemented in dask.array)

I think something like dd.from_dask_array(dask_array, index=df.index)
would work.
On Mon, Jun 17, 2019 at 3:42 PM hoangthienan95<EMAIL_ADDRESS>wrote:

Thank you @TomAugspurger https://github.com/TomAugspurger, that worked.
However, I have other parts of my code where I have to add columns while
keeping the index that this cannot be applied. In general, if you can
create an array from applying a numpy function on dask dataframe df, how
do you convert this to a Dask Series while retaining the index of df so
it could be appended? (assuming that the function is also implemented in
dask.array)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/dask/dask/issues/4795?email_source=notifications&email_token=AAKAOIQUBT37RQOOZBSEC2LP27ZL7A5CNFSM4HMVDPKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX4MOXA#issuecomment-502843228,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAKAOIX2NDOWHZXEVAUQZCLP27ZL7ANCNFSM4HMVDPKA
.


Offer easier way to add all providers

Currently, all providers are exported together with the other stuff, so if you need all providers, there's currently no easy way to do this. Ideally, you could do something like this:
import { cdk } from "cocoda-sdk"
import * as providers from "cocoda-sdk/providers"
Object.values(providers).forEach(provider => cdk.addProvider(provider))

Made it even easier:
import { cdk, addAllProviders } from "cocoda-sdk"
addAllProviders()

👍


chore(production-build): add script for production build to package.json

Coverage remained the same at 79.417% when pulling 348006d91d282da45bf786b7b6a21803ae8b45d8 on deploy-production-build into 7c077af621035001699600c0b5628bb78f0d7d45 on development.

Coverage remained the same at 79.417% when pulling eff1465d1fe52c4aa827fc060605f9c2738260e0 on deploy-production-build into 7c077af621035001699600c0b5628bb78f0d7d45 on development.


fix: make multi-column loaders actually castable

:tada: This PR is included in version 2.1.3 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


PKG-006

Branch to solve issue #7.

Boxes build on my machine, so I'm merging this so that it builds on our CI server.


sbt 1.0.2 publish with credentials fails to push jar and sources artefacts (for one of three subprojects)

This one is weird, and I likely won't be able to formulate it according to the contribution guidelines. But I think it's worth reporting in order to see whether others are seeing similar cases on-field as well.
In short:

upgrading one of my sbt projects (multiproject, with three subprojects) from sbt 0.13.15 to 1.0.2 causes one of the projects (always the same) to be only partially published (pom's are there, but jars and sources aren't) to the company's Nexus Maven repo

Screenshots:

Properly published subproject

Partial publish (no jars, no sources)
This happens for both release and snapshot publishes.
All subprojects share the same credentials setup:
def publishAs(name: String) = {
  val nexus = "https://maven.myCompany.net/"

  Def.settings(
    moduleName := name,
    publishMavenStyle := true,
    publishArtifact in (Compile, packageDoc) := false,
    publishTo := {
      if (isSnapshot.value) {
        Some("snapshots" at nexus + "content/repositories/snapshots")
      } else {
        Some("releases" at nexus + "content/repositories/releases")
      }
    },
    credentials ++= (for {
      user <- Option(System.getenv().get("MAVEN_USER"))
      pw <- Option(System.getenv().get("MAVEN_PASSWORD"))
    } yield Credentials("Sonatype Nexus Repository Manager", "maven.myCompany.net", user, pw)).toSeq
  )
}

All of this works, with 0.13.15 in project/build.properties. Changing to 1.0.2 makes publishing consistently fail.
On the command line one sees:
[error] (testkit/*:publish) java.io.IOException: PUT operation to URL https://maven.myCompany.net/content/repositories/snapshots/fi/myCompany/basement/cloak-akka-http-testkit_2.12/0.0.13-SNAPSHOT/cloak-akka-http-testkit_2.12-0.0.13-SNAPSHOT.jar failed with status code 502: Bad Gateway
The Nexus log show 401 (Unauthorized) for the failing parts.
My current work-around is simply to not upgrade to 1.0.2 within the particular project.

@akauppi Thanks for the report, we'll see what we can do.

Got same problem here with similar publish setting above, but the failed types here are javadocs, regular jar and -bundle, the exception from sbt are either java.net.SocketException: Connection reset or java.net.SocketException: Broken pipe (Write failed)
From the nexus request log file, it seems sbt will not send request with credential for failing artifact. The request logs of success artifact always contains one request without credential followed by one request with credential. The logs of failed artifacts always come with two consecutive requests without credential.

I'm seeing the same thing with 1.0.2.
Nexus rejects the upload because of missing credentials. Weirdly this only happens for some artifacts but not all.

A workaround might be:
updateOptions := updateOptions.value.withGigahorse(false)

That should fallback to similar behavior as 0.13.

I can report that setting updateOptions := updateOptions.value.withGigahorse(false) worked around the problem. However, this kinda defeats the point of upgrading to sbt 1.

Same problem here. Problem exists since sbt 1.0.0.
Workaround updateOptions := updateOptions.value.withGigahorse(false) solved the problem for me.

Hi.
I also had problems not when publishing but resolving a dependency from an Ivy Repository with a dynamic revision, e.g. 0.0.+:

I'm seeing the same issue with downloading. It's finding the artifact, but it's failing on a 404 from a different repository
[debug] sbt-chain: Checking cache for: dependency: net.cakesolutions#scala-kafka-client_2.11;<IP_ADDRESS> {compile=[default(compile)]}
[debug] sbt-chain-delegate: Checking cache for: dependency: net.cakesolutions#scala-kafka-client_2.11;<IP_ADDRESS> {compile=[default(compile)]}
[debug]                 tried /home/jenkins/.ivy2/local/net.cakesolutions/scala-kafka-client_2.11//<IP_ADDRESS>/ivys/ivy.xml
[debug]         local: no ivy file found for net.cakesolutions#scala-kafka-client_2.11;<IP_ADDRESS>
[debug]                 tried https://repo1.maven.org/maven2/net/cakesolutions/scala-kafka-client_2.11/<IP_ADDRESS>/scala-kafka-client_2.11-<IP_ADDRESS>.pom
[debug] CLIENT ERROR: Not Found url=https://repo1.maven.org/maven2/net/cakesolutions/scala-kafka-client_2.11/<IP_ADDRESS>/scala-kafka-client_2.11-<IP_ADDRESS>.pom
[debug]         public: no ivy file found for net.cakesolutions#scala-kafka-client_2.11;<IP_ADDRESS>
[debug]                 tried https://oss.sonatype.org/content/repositories/public/net/cakesolutions/scala-kafka-client_2.11/<IP_ADDRESS>/scala-kafka-client_2.11-<IP_ADDRESS>.pom
[debug] CLIENT ERROR: Not Found url=https://oss.sonatype.org/content/repositories/public/net/cakesolutions/scala-kafka-client_2.11/<IP_ADDRESS>/scala-kafka-client_2.11-<IP_ADDRESS>.pom
[debug]         sonatype-public: no ivy file found for net.cakesolutions#scala-kafka-client_2.11;<IP_ADDRESS>
[debug]                 tried https://<company-artifactory>/net/cakesolutions/scala-kafka-client_2.11/<IP_ADDRESS>/scala-kafka-client_2.11-<IP_ADDRESS>.pom
[debug] CLIENT ERROR: Not Found url=https://<company-artifactory>/net/cakesolutions/scala-kafka-client_2.11/<IP_ADDRESS>/scala-kafka-client_2.11-<IP_ADDRESS>.pom
[debug]         <company-artifactory> releases: no ivy file found for net.cakesolutions#scala-kafka-client_2.11;<IP_ADDRESS>
[debug]                 tried https://<company-artifactory>/net/cakesolutions/scala-kafka-client_2.11/<IP_ADDRESS>/scala-kafka-client_2.11-<IP_ADDRESS>.pom
[debug] CLIENT ERROR: Conflict url=https://<company-artifactory>/net/cakesolutions/scala-kafka-client_2.11/<IP_ADDRESS>/scala-kafka-client_2.11-<IP_ADDRESS>.pom
[debug]         <company-artifactory> snapshots: no ivy file found for net.cakesolutions#scala-kafka-client_2.11;<IP_ADDRESS>
[debug]                 tried https://<company-artifactory>/net/cakesolutions/scala-kafka-client_2.11/<IP_ADDRESS>/scala-kafka-client_2.11-<IP_ADDRESS>.pom
[debug] CLIENT ERROR: Not Found url=https://<company-artifactory>/net/cakesolutions/scala-kafka-client_2.11/<IP_ADDRESS>/scala-kafka-client_2.11-<IP_ADDRESS>.pom
[debug]         <company-artifactory> Third Party: no ivy file found for net.cakesolutions#scala-kafka-client_2.11;<IP_ADDRESS>
[debug]                 tried https://dl.bintray.com/cakesolutions/maven/net/cakesolutions/scala-kafka-client_2.11/<IP_ADDRESS>/scala-kafka-client_2.11-<IP_ADDRESS>.pom
[debug]         bintray-cakesolutions-maven: found md file for net.cakesolutions#scala-kafka-client_2.11;<IP_ADDRESS>
[debug]                 => https://dl.bintray.com/cakesolutions/maven/net/cakesolutions/scala-kafka-client_2.11/<IP_ADDRESS>/scala-kafka-client_2.11-<IP_ADDRESS>.pom (<IP_ADDRESS>)
[debug] downloading https://dl.bintray.com/cakesolutions/maven/net/cakesolutions/scala-kafka-client_2.11/<IP_ADDRESS>/scala-kafka-client_2.11-<IP_ADDRESS>.pom ...
[debug]         bintray-cakesolutions-maven: downloading https://dl.bintray.com/cakesolutions/maven/net/cakesolutions/scala-kafka-client_2.11/<IP_ADDRESS>/scala-kafka-client_2.11-<IP_ADDRESS>.pom
[debug]         bintray-cakesolutions-maven: downloading https://dl.bintray.com/cakesolutions/maven/net/cakesolutions/scala-kafka-client_2.11/<IP_ADDRESS>/scala-kafka-client_2.11-<IP_ADDRESS>.pom.sha1
[debug] sha1 OK for https://dl.bintray.com/cakesolutions/maven/net/cakesolutions/scala-kafka-client_2.11/<IP_ADDRESS>/scala-kafka-client_2.11-<IP_ADDRESS>.pom
[debug]         [SUCCESSFUL ] net.cakesolutions#scala-kafka-client_2.11;<IP_ADDRESS>!scala-kafka-client_2.11.pom(pom.original) (297ms)
[debug]                 tried /home/jenkins/.ivy2/local/net.cakesolutions/scala-kafka-client_2.11//<IP_ADDRESS>/jars/scala-kafka-client_2.11.jar
[debug]                 tried https://repo1.maven.org/maven2/net/cakesolutions/scala-kafka-client_2.11/<IP_ADDRESS>/scala-kafka-client_2.11-<IP_ADDRESS>.jar
[debug] CLIENT ERROR: Not Found url=https://repo1.maven.org/maven2/net/cakesolutions/scala-kafka-client_2.11/<IP_ADDRESS>/scala-kafka-client_2.11-<IP_ADDRESS>.jar
[debug]                 tried https://oss.sonatype.org/content/repositories/public/net/cakesolutions/scala-kafka-client_2.11/<IP_ADDRESS>/scala-kafka-client_2.11-<IP_ADDRESS>.jar
[debug] problem occurred while resolving dependency: net.cakesolutions#scala-kafka-client_2.11;<IP_ADDRESS> {compile=[default(compile)]} with bintray-cakesolutions-maven: java.lang.RuntimeException: sonatype-public: unable to get resource for net/cakesolutions#scala-kafka-client_2.11;<IP_ADDRESS>: res=https://oss.sonatype.org/content/repositories/public/net/cakesolutions/scala-kafka-client_2.11/<IP_ADDRESS>/scala-kafka-client_2.11-<IP_ADDRESS>.jar: java.net.ProtocolException: Unexpected status line: 0

It seems that after updating to version 1.0.3 it works now. May have been related the doubled slash problem?
Which version are you using @Falmarri  ?

Hi all,
this one really bugged me for a while, but the good news is that I could pinpoint the problem.
I have created simple reproducer, in a simple Java project with okhttp 3.9.0 (latest version).
The exception ("java.net.ProtocolException: Unexpected status line: 0") always occurred after the following series of requests (URLs changed for brevity):

HEAD /abc/sbt_1.0/ -> 401
HEAD /abc/sbt_1.0/ (w/ basic auth) -> 200
GET /abc/sbt_1.0' -> 401
GET /abc/sbt_1.0' (w/ basic auth) -> 200
HEAD /abc/sbt_1.0/plugin_1.2.3/ivy.xml -> 💣 (boom) exception

Looking at it with a debugger, there were the response headers of the previous request in a buffer, the requests were re-using the connection (connection: keep-alive), and at the current buffer position, there was always a 0\r\n (plus other bytes from former requests).
Looking at the headers, it suddenly occurred to me: transfer-encoding: chunked.
Obviously, okhttp does not really cope well with HEAD requests using the chunked transfer encoding, ie. it does not read the final chunk and then re-uses the same buffer for the response of the next request and expects a HTTP status line at the current position...
Upstream bug report: https://github.com/square/okhttp/issues/3689

@avdv Thanks for the detective work!

@avdv Excellent work and thanks for opening the bug on the okhttp repo. I hope this will be fixed upstream.

Hey, just a quick update: the okhttp library is not at fault here. It is a misbehaviour of the upstream server, I will create a ticket there. (need to register first) I'll keep you posted.
Iin the meantime, I could reproduce this with a miinimal example. The server seeems to switch to the chunked transfer encoding for the GET requests, and does not switch it off for the HEAD requests again which leaves the 0\r\n in the buffer.
@akauppi I had a look at your inital report again, and I guess the artifactory problem when downloading might not be really related to your problems while uploading - although the workaround is the same. Have you made any progress with your specific problem?

@avdv Did you ever open a ticket with artifactory?

@leonardehrenfried Yes: https://www.jfrog.com/jira/browse/RTFACT-15318
Until now there is no response...

TBH, I would really like to see this fixed with gigahorse (somehow) or okhttp. Even if JFrog fixes their own artifactory servers, there are probably quite a few out there which probably won't see the fix in a long time.
Also, during my tests I used nginx and mitmproxy which both somehow could cope with the responses and did not error out... So, it seems not so unreasonable to just skip to the next status line (if it is just a few bytes away)?!

@avdv We (Zalando, my employee) haven't really done anything about this. For my use, I can still have the official sbt be 0.13.15 which avoids touching this problem, at all. For me, that's the best policy for now.

@akauppi fair enough, we decided to make the switch to 1.0 and disable gigahorse via .sbtoptsin every project...

@avdv If you do find a workaround for this in gigahorse I'm pretty sure a PR with the fix would be merged.

Unfortunately, still there with sbt 1.1.0

I hit the same problem with sbt 1.1.0 publishing to a Sonatype Nexus. I know that the investigation was done with Artifactory so I thought it would be useful to add the Nexus as another datapoint.
The suggested workaround:
updateOptions := updateOptions.value.withGigahorse(false)

fixed the problem. The problem does not appear when publishing to the Nexus through a reverse proxy.

We've also hit this publishing to Nexus (using sbt 1.1.1), except the error has consistently been java.net.ProtocolException: Unexpected status line: 0. The withGigahorse(false) workaround seems to be working, though.

[error] java.net.ProtocolException: Unexpected status line: 0

[error] java.net.ProtocolException: Unexpected status line: 0
[error] 	at okhttp3.internal.http.StatusLine.parse(StatusLine.java:69)
[error] 	at okhttp3.internal.http1.Http1Codec.readResponseHeaders(Http1Codec.java:189)
[error] 	at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:75)
[error] 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
[error] 	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
[error] 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
[error] 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
[error] 	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
[error] 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
[error] 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
[error] 	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
[error] 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
[error] 	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
[error] 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
[error] 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
[error] 	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:185)
[error] 	at okhttp3.RealCall.execute(RealCall.java:69)
[error] 	at sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler.upload(GigahorseUrlHandler.scala:185)
[error] 	at org.apache.ivy.util.url.URLHandlerDispatcher.upload(URLHandlerDispatcher.java:82)
[error] 	at org.apache.ivy.util.FileUtil.copy(FileUtil.java:150)
[error] 	at org.apache.ivy.plugins.repository.url.URLRepository.put(URLRepository.java:84)
[error] 	at sbt.internal.librarymanagement.ConvertResolver$LocalIfFileRepo.put(ConvertResolver.scala:365)
[error] 	at org.apache.ivy.plugins.repository.AbstractRepository.put(AbstractRepository.java:130)
[error] 	at sbt.internal.librarymanagement.ConvertResolver$ChecksumFriendlyURLResolver.put(ConvertResolver.scala:117)
[error] 	at sbt.internal.librarymanagement.ConvertResolver$ChecksumFriendlyURLResolver.put$(ConvertResolver.scala:104)
[error] 	at sbt.internal.librarymanagement.ConvertResolver$$anonfun$defaultConvert$lzycompute$1$PluginCapableResolver$1.put(ConvertResolver.scala:164)
[error] 	at org.apache.ivy.plugins.resolver.RepositoryResolver.publish(RepositoryResolver.java:216)
[error] 	at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$5(IvyActions.scala:492)
[error] 	at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$5$adapted(IvyActions.scala:491)
[error] 	at scala.collection.TraversableLike$WithFilter.$anonfun$foreach$1(TraversableLike.scala:789)
[error] 	at scala.collection.Iterator.foreach(Iterator.scala:929)
[error] 	at scala.collection.Iterator.foreach$(Iterator.scala:929)
[error] 	at scala.collection.AbstractIterator.foreach(Iterator.scala:1417)
[error] 	at scala.collection.IterableLike.foreach(IterableLike.scala:71)
[error] 	at scala.collection.IterableLike.foreach$(IterableLike.scala:70)
[error] 	at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
[error] 	at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:788)
[error] 	at sbt.internal.librarymanagement.IvyActions$.publish(IvyActions.scala:491)
[error] 	at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$3(IvyActions.scala:141)
[error] 	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
[error] 	at sbt.internal.librarymanagement.IvyActions$.withChecksums(IvyActions.scala:154)
[error] 	at sbt.internal.librarymanagement.IvyActions$.withChecksums(IvyActions.scala:148)
[error] 	at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$1(IvyActions.scala:141)
[error] 	at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$1$adapted(IvyActions.scala:131)
[error] 	at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:243)
[error] 	at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:204)
[error] 	at sbt.internal.librarymanagement.IvySbt.sbt$internal$librarymanagement$IvySbt$$action$1(Ivy.scala:70)
[error] 	at sbt.internal.librarymanagement.IvySbt$$anon$3.call(Ivy.scala:77)
[error] 	at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:95)
[error] 	at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:80)
[error] 	at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:99)
[error] 	at xsbt.boot.Using$.withResource(Using.scala:10)
[error] 	at xsbt.boot.Using$.apply(Using.scala:9)
[error] 	at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:60)
[error] 	at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:50)
[error] 	at xsbt.boot.Locks$.apply0(Locks.scala:31)
[error] 	at xsbt.boot.Locks$.apply(Locks.scala:28)
[error] 	at sbt.internal.librarymanagement.IvySbt.withDefaultLogger(Ivy.scala:77)
[error] 	at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:199)
[error] 	at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:196)
[error] 	at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.scala:242)
[error] 	at sbt.internal.librarymanagement.IvyActions$.publish(IvyActions.scala:131)
[error] 	at sbt.Classpaths$.$anonfun$publishTask$4(Defaults.scala:2238)
[error] 	at sbt.Classpaths$.$anonfun$publishTask$4$adapted(Defaults.scala:2237)
[error] 	at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] 	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:39)
[error] 	at sbt.std.Transform$$anon$4.work(System.scala:66)
[error] 	at sbt.Execute.$anonfun$submit$2(Execute.scala:262)
[error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] 	at sbt.Execute.work(Execute.scala:271)
[error] 	at sbt.Execute.$anonfun$submit$1(Execute.scala:262)
[error] 	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:174)
[error] 	at sbt.CompletionService$$anon$2.call(CompletionService.scala:36)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] 	at java.lang.Thread.run(Thread.java:748)

Using sbt 1.1.1 here as well, in a project with many, many submodules. The publish artifacts step only works the first few of them and afterwards it throws:
[error] (**** / publish) java.net.SocketException: Broken pipe (Write failed)

[error] java.net.SocketException: Broken pipe (Write failed)
[error] 	at java.net.SocketOutputStream.socketWrite0(Native Method)
[error] 	at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)
[error] 	at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
[error] 	at okio.Okio$1.write(Okio.java:78)
[error] 	at okio.AsyncTimeout$1.write(AsyncTimeout.java:179)
[error] 	at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:171)
[error] 	at okio.RealBufferedSink.write(RealBufferedSink.java:41)
[error] 	at okhttp3.internal.http1.Http1Codec$FixedLengthSink.write(Http1Codec.java:286)
[error] 	at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:171)
[error] 	at okio.RealBufferedSink.writeAll(RealBufferedSink.java:99)
[error] 	at okhttp3.RequestBody$3.writeTo(RequestBody.java:118)

The workaround did the thing for me as well.

I've hit this issue with a brand-new installation of Sonatype Nexus (version
OSS 3.9.0-01). This is quite annoying.
If we follow up on @avdv's analysis that it's buggy server behaviour with keep-alive and chunked encoding, could it be a possible solution to disable keep-alive for buggy servers?
I'm happy to author a pull request which adds this config option.

Alternatively, would an interceptor that cleans the buffer after a HEAD request work?
It could be added here: https://github.com/sbt/librarymanagement/blob/1.x/ivy/src/main/scala/sbt/internal/librarymanagement/ivyint/GigahorseUrlHandler.scala#L223

I will make a speculative pull request.

I have installed a local docker container with the very same version of Nexus that runs on our AWS infrastructure and I can deploy it just fine. :|
The only difference is that the failing one is hosted on AWS.
Could people comment on whether their failing ones are also hosted on AWS?

@leonardehrenfried Mine was not. In my case the simple step of adding a HAProxy instance in front of the Nexus resolved the issue for us. (I suspect this is because  HAProxy either a) is more tolerant of non-conformant behavior, or b) does something slightly different wrt. keep-alive, etc. After all it's supposed to be really robust in the face of misbehaving upstreams.

We're having failures w/ Google Cloud hosting Nexus.
It does feel like a chunked+keepalive problem...

sbt 1.1.4
Like @MihaiAnei but getting 502: Bad Gateway
$ sbt publishLocal
...
[info] Done packaging.
[info] 	published spring-sheets_2.12 to https://maven.zalando.net/content/repositories/releases/fi/zalando/proto/spring-sheets_2.12/0.0.1/spring-sheets_2.12-0.0.1.pom
[info] 	published spring-cal_2.12 to https://maven.zalando.net/content/repositories/releases/fi/zalando/proto/spring-cal_2.12/0.0.1/spring-cal_2.12-0.0.1.pom
[error] java.io.IOException: PUT operation to URL https://maven.zalando.net/content/repositories/releases/fi/zalando/proto/spring-cal_2.12/0.0.1/spring-cal_2.12-0.0.1.jar failed with status code 502: Bad Gateway
[error] 	at org.apache.ivy.util.url.AbstractURLHandler.validatePutStatusCode(AbstractURLHandler.java:82)
[error] 	at sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler.upload(GigahorseUrlHandler.scala:191)
[error] 	at org.apache.ivy.util.url.URLHandlerDispatcher.upload(URLHandlerDispatcher.java:82)
[error] 	at org.apache.ivy.util.FileUtil.copy(FileUtil.java:150)
[error] 	at org.apache.ivy.plugins.repository.url.URLRepository.put(URLRepository.java:84)
[error] 	at sbt.internal.librarymanagement.ConvertResolver$LocalIfFileRepo.put(ConvertResolver.scala:365)
[error] 	at org.apache.ivy.plugins.repository.AbstractRepository.put(AbstractRepository.java:130)
[error] 	at sbt.internal.librarymanagement.ConvertResolver$ChecksumFriendlyURLResolver.put(ConvertResolver.scala:117)
[error] 	at sbt.internal.librarymanagement.ConvertResolver$ChecksumFriendlyURLResolver.put$(ConvertResolver.scala:104)
[error] 	at sbt.internal.librarymanagement.ConvertResolver$$anonfun$defaultConvert$lzycompute$1$PluginCapableResolver$1.put(ConvertResolver.scala:164)
[error] 	at org.apache.ivy.plugins.resolver.RepositoryResolver.publish(RepositoryResolver.java:216)
[error] 	at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$5(IvyActions.scala:499)
[error] 	at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$5$adapted(IvyActions.scala:498)
[error] 	at scala.collection.TraversableLike$WithFilter.$anonfun$foreach$1(TraversableLike.scala:789)
[error] 	at scala.collection.Iterator.foreach(Iterator.scala:929)
[error] 	at scala.collection.Iterator.foreach$(Iterator.scala:929)
[error] 	at scala.collection.AbstractIterator.foreach(Iterator.scala:1417)
[error] 	at scala.collection.IterableLike.foreach(IterableLike.scala:71)
[error] 	at scala.collection.IterableLike.foreach$(IterableLike.scala:70)
[error] 	at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
[error] 	at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:788)
[error] 	at sbt.internal.librarymanagement.IvyActions$.publish(IvyActions.scala:498)
[error] 	at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$3(IvyActions.scala:144)
[error] 	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
[error] 	at sbt.internal.librarymanagement.IvyActions$.withChecksums(IvyActions.scala:157)
[error] 	at sbt.internal.librarymanagement.IvyActions$.withChecksums(IvyActions.scala:151)
[error] 	at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$1(IvyActions.scala:144)
[error] 	at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$1$adapted(IvyActions.scala:134)
[error] 	at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:243)
[error] 	at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:204)
[error] 	at sbt.internal.librarymanagement.IvySbt.sbt$internal$librarymanagement$IvySbt$$action$1(Ivy.scala:70)
[error] 	at sbt.internal.librarymanagement.IvySbt$$anon$3.call(Ivy.scala:77)
[error] 	at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:95)
[error] 	at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:80)
[error] 	at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:99)
[error] 	at xsbt.boot.Using$.withResource(Using.scala:10)
[error] 	at xsbt.boot.Using$.apply(Using.scala:9)
[error] 	at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:60)
[error] 	at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:50)
[error] 	at xsbt.boot.Locks$.apply0(Locks.scala:31)
[error] 	at xsbt.boot.Locks$.apply(Locks.scala:28)
[error] 	at sbt.internal.librarymanagement.IvySbt.withDefaultLogger(Ivy.scala:77)
[error] 	at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:199)
[error] 	at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:196)
[error] 	at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.scala:242)
[error] 	at sbt.internal.librarymanagement.IvyActions$.publish(IvyActions.scala:134)
[error] 	at sbt.Classpaths$.$anonfun$publishTask$4(Defaults.scala:2242)
[error] 	at sbt.Classpaths$.$anonfun$publishTask$4$adapted(Defaults.scala:2241)
[error] 	at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] 	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:39)
[error] 	at sbt.std.Transform$$anon$4.work(System.scala:66)
[error] 	at sbt.Execute.$anonfun$submit$2(Execute.scala:262)
[error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] 	at sbt.Execute.work(Execute.scala:271)
[error] 	at sbt.Execute.$anonfun$submit$1(Execute.scala:262)
[error] 	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:174)
[error] 	at sbt.CompletionService$$anon$2.call(CompletionService.scala:36)
[error] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514)
[error] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
[error] 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
[error] 	at java.base/java.lang.Thread.run(Thread.java:844)
[error] java.io.IOException: PUT operation to URL https://maven.zalando.net/content/repositories/releases/fi/zalando/proto/spring-sheets_2.12/0.0.1/spring-sheets_2.12-0.0.1.jar failed with status code 502: Bad Gateway
[error] 	at org.apache.ivy.util.url.AbstractURLHandler.validatePutStatusCode(AbstractURLHandler.java:82)
[error] 	at sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler.upload(GigahorseUrlHandler.scala:191)
[error] 	at org.apache.ivy.util.url.URLHandlerDispatcher.upload(URLHandlerDispatcher.java:82)
[error] 	at org.apache.ivy.util.FileUtil.copy(FileUtil.java:150)
[error] 	at org.apache.ivy.plugins.repository.url.URLRepository.put(URLRepository.java:84)
[error] 	at sbt.internal.librarymanagement.ConvertResolver$LocalIfFileRepo.put(ConvertResolver.scala:365)
[error] 	at org.apache.ivy.plugins.repository.AbstractRepository.put(AbstractRepository.java:130)
[error] 	at sbt.internal.librarymanagement.ConvertResolver$ChecksumFriendlyURLResolver.put(ConvertResolver.scala:117)
[error] 	at sbt.internal.librarymanagement.ConvertResolver$ChecksumFriendlyURLResolver.put$(ConvertResolver.scala:104)
[error] 	at sbt.internal.librarymanagement.ConvertResolver$$anonfun$defaultConvert$lzycompute$1$PluginCapableResolver$1.put(ConvertResolver.scala:164)
[error] 	at org.apache.ivy.plugins.resolver.RepositoryResolver.publish(RepositoryResolver.java:216)
[error] 	at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$5(IvyActions.scala:499)
[error] 	at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$5$adapted(IvyActions.scala:498)
[error] 	at scala.collection.TraversableLike$WithFilter.$anonfun$foreach$1(TraversableLike.scala:789)
[error] 	at scala.collection.Iterator.foreach(Iterator.scala:929)
[error] 	at scala.collection.Iterator.foreach$(Iterator.scala:929)
[error] 	at scala.collection.AbstractIterator.foreach(Iterator.scala:1417)
[error] 	at scala.collection.IterableLike.foreach(IterableLike.scala:71)
[error] 	at scala.collection.IterableLike.foreach$(IterableLike.scala:70)
[error] 	at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
[error] 	at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:788)
[error] 	at sbt.internal.librarymanagement.IvyActions$.publish(IvyActions.scala:498)
[error] 	at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$3(IvyActions.scala:144)
[error] 	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
[error] 	at sbt.internal.librarymanagement.IvyActions$.withChecksums(IvyActions.scala:157)
[error] 	at sbt.internal.librarymanagement.IvyActions$.withChecksums(IvyActions.scala:151)
[error] 	at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$1(IvyActions.scala:144)
[error] 	at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$1$adapted(IvyActions.scala:134)
[error] 	at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:243)
[error] 	at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:204)
[error] 	at sbt.internal.librarymanagement.IvySbt.sbt$internal$librarymanagement$IvySbt$$action$1(Ivy.scala:70)
[error] 	at sbt.internal.librarymanagement.IvySbt$$anon$3.call(Ivy.scala:77)
[error] 	at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:95)
[error] 	at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:80)
[error] 	at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:99)
[error] 	at xsbt.boot.Using$.withResource(Using.scala:10)
[error] 	at xsbt.boot.Using$.apply(Using.scala:9)
[error] 	at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:60)
[error] 	at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:50)
[error] 	at xsbt.boot.Locks$.apply0(Locks.scala:31)
[error] 	at xsbt.boot.Locks$.apply(Locks.scala:28)
[error] 	at sbt.internal.librarymanagement.IvySbt.withDefaultLogger(Ivy.scala:77)
[error] 	at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:199)
[error] 	at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:196)
[error] 	at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.scala:242)
[error] 	at sbt.internal.librarymanagement.IvyActions$.publish(IvyActions.scala:134)
[error] 	at sbt.Classpaths$.$anonfun$publishTask$4(Defaults.scala:2242)
[error] 	at sbt.Classpaths$.$anonfun$publishTask$4$adapted(Defaults.scala:2241)
[error] 	at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] 	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:39)
[error] 	at sbt.std.Transform$$anon$4.work(System.scala:66)
[error] 	at sbt.Execute.$anonfun$submit$2(Execute.scala:262)
[error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] 	at sbt.Execute.work(Execute.scala:271)
[error] 	at sbt.Execute.$anonfun$submit$1(Execute.scala:262)
[error] 	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:174)
[error] 	at sbt.CompletionService$$anon$2.call(CompletionService.scala:36)
[error] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514)
[error] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
[error] 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
[error] 	at java.base/java.lang.Thread.run(Thread.java:844)
...

For most of my builds, the workaround with Gigahorse (updateOptions := updateOptions.value.withGigahorse(false)) works  fine for me; but for one of my builds this doesn't work.
Using the shotgun approach I've come to the one bit that makes it fail / work consistently:
addArtifact(artifact in (Compile, assembly), assembly)

I build a phat-jar, using the sbt-assembly plugin. If i add that artefact, even when Gigahorse is set to false, the 503 will occur.
My current build.sbt:
name := "Taxonomy Architecture Check Tool"
normalizedName := "tact2"
description    := "TACT2 runs static analysis against XBRL Taxonomies"
organization := "nl.ebpi.tact2"
version := "0.1.0-SNAPSHOT"

scalaVersion   := "2.12.6"

// FIXME This works around a strange option where we get a 502 from Nexus' proxy, where Nexus _actually_ sends an 401
// See https://github.com/sbt/sbt/issues/3570
updateOptions := updateOptions.value.withGigahorse(false)

// See: Toward a safer Scala
//<EMAIL_ADDRESS>lazy val minimalScalacOptions = Seq(
  "-target:jvm-1.8",

  "-unchecked",
  "-deprecation",
  "-feature",
  "-Ywarn-unused:imports,privates,locals,implicits",
  "-Xlint:_"
)
lazy val strictScalacOptions = minimalScalacOptions ++ Seq("-Xfatal-warnings")

// We do not want any fatal warnings in the IDE when imports are unused.
// System property lenient is needed to communicate that to this build script.
// In IntelliJ, under SBT settings, you can set VM parameters to contain "-Dlenient=true"
scalacOptions ++= {
  sys.props.getOrElse("lenient", "false").toBoolean match {
    case true => minimalScalacOptions
    case _ => strictScalacOptions
  }
}

mainClass in assembly := Some("nl.ebpi.tact2.console.CheckDimensionUniquenessForMultipleDtses")
// FIXME assembly name is not set correctly to contain the _2.12, but manually overriding is *not* the way to go
assemblyJarName in assembly := s"tact2_2.12-0.1.0-SNAPSHOT-jar-with-dependencies.jar"
//addArtifact(artifact in (Compile, assembly), assembly) // <-- when I uncomment this one, it fails consistently. Without enabling this line, the phat jar does not get published...

resolvers ++= Seq(
  Resolver.mavenLocal,
  "My Nexus" at "https://nexus.mycompany/repository/releases/",
  "My Snapshots" at "https://nexus.mycompany/repository/snapshots/"
)

publishMavenStyle := true
publishTo := {
  val nexus = "https://nexus.mycompany/"
  if (isSnapshot.value) {
    Some("snapshots" at nexus + "repository/snapshots/")
  } else {
    Some("releases" at nexus + "repository/releases/")
  }
}
pomIncludeRepository := { _ => false }

credentials += Credentials(Path("/path") / "to" / "credentials.ini")

libraryDependencies ++= Seq(
  "eu.cdevreeze.tqa" %% "tqa" % "0.8.5",
  "eu.cdevreeze.xpathparser" %% "xpathparser" % "0.4.0",
  "org.scalactic" %% "scalactic" % "3.0.5",
  "net.sf.saxon" % "Saxon-HE" % "9.7.0-18",
  "org.slf4j" % "slf4j-api" % "1.7.25",
  "org.slf4j" % "slf4j-jdk14" % "1.7.25",
  "org.scalatest" %% "scalatest" % "3.0.5" % "test",
  "org.scalacheck" %% "scalacheck" % "1.13.5" % "test"
)

@mhogerheijde It could be that the fat jar exceeds the maximum upload size allowed by the HTTP gateway that is sitting between you and the Nexus.
I have had this problem in the past. Reconfiguring the HTTP gateway fixed the problem, and in my case, it was not related to the SBT/gigahorse issue (which I also have).

@alienscience The point is that it isn't the -jar-with-dependencies.jar that fails to upload:
When I add the
addArtifact(artifact in (Compile, assembly), assembly) // <-- when I uncomment this one, it fails consistently. Without enabling this line, the phat jar does not get published either... It does, however get built. (i.e. it is in target/scala_2.12/)

line; the other artifacts fail with a 502 even before it is trying to PUT the -jar-with-dependencies.jar:
[error] (publish) java.io.IOException: PUT operation to URL https://nexus.mycompany/repository/snapshots/nl/ebpi/tact2/tact2_2.12/0.1.0-SNAPSHOT/tact2_2.12-0.1.0-SNAPSHOT-javadoc.jar failed with status code 502: Bad Gateway

When I do a manual PUT of the -jar-with-dependencies.jar using CURL, I get the expected 201: Created.

While turning off gigahorse seemed to have worked for quite a while for me, for some reason it started failing today. It was clear that the Apache reverse proxy sitting in between was errorring to a 502 status when Nexus was closing the connection after responding 401. (why auth isn't provided right away on publish is somewhat odd to me, btw).
A day of googeloo finally landed me here:
https://support.sonatype.com/hc/en-us/articles/360000228868-Artifact-uploads-fail-with-broken-pipe-errors
From which you can simply copy
nexus.view.exhaustForAgents=Apache-Maven.*|Apache Ivy.*
to your nexus.properties file to make it work for SBT. (still with gigahorse off)
FYI, these two issues lead me to believe it's fixed as of Nexus 3.2
https://issues.sonatype.org/browse/NEXUS-16430
https://issues.sonatype.org/browse/NEXUS-10234

The same with SBT 1.2.5 and nexus 3.13.0.
The work around works
updateOptions := updateOptions.value.withGigahorse(false)

I'm also seeing this issue.  Changing updateOptions didn't fix it for us under sbt 1.2.8, but setting -Dsbt.gigahorse=false did.  This is against Nexus 2 and Nexus 3.

Ran into same issue and -Dsbt.gigahorse=false fixed it. Thanks.

This issue still occurs in SBT 1.1.6 when publishing to Nexus 3.15.2 running on baremetal.
As diagnosed by @avdv in https://github.com/sbt/sbt/issues/3570#issuecomment-345089755 the initial PUT request made to Nexus fails as it does not contain auth credentials.
After applying the updateOptions := updateOptions.value.withGigahorse(false) fix, the initial upload request still fails with 401 response but the file is submitted a second time with auth credentials and it succeeds.

FYI...I'm using sbt.version=1.2.8 and Nexus OSS verion 3.13.0-01.
I put updateOptions := updateOptions.value.withGigahorse(false) in my build.sbt file and it resolved the issue.
My primary question is, this has been a problem since Sep 2017...and we still aren't any closer to solving it? huh...

Maybe make gigahorse opt-in instead of opt-out?!

Just got this with sbt 1.2.8 and nexus 3.16.1-02, so it's still not resolved.


Volume 16 Icons

All icons for: #3828, #3686, #3726, #3727
are completed:
all icons for this epic.zip


chore(helper): fixing waitForCompletion function to handle failed helpers in case of multiple targets

Signed-off-by: shubhamchaudhary<EMAIL_ADDRESS>
fixing waitForCompletion function to handle failed helpers in case of multiple targets. It will fail the experiment if any of the helper pod fails. Earlier it was checking the last helper status only.
handling pending helper status. It will wait until the helper pods remain in the pending state.

time="2021-04-07T18:03:07Z" level=info msg="Experiment Name: pod-network-loss"
time="2021-04-07T18:03:07Z" level=info msg="[PreReq]: Getting the ENV for the  experiment"
time="2021-04-07T18:03:07Z" level=info msg="[PreReq]: Updating the chaos result of pod-network-loss experiment (SOT)"
time="2021-04-07T18:03:07Z" level=info msg="The application information is as follows\n" Namespace=shubham Label="run=nginx" Ramp Time=0
time="2021-04-07T18:03:07Z" level=info msg="[Status]: Verify that the AUT (Application Under Test) is running (pre-chaos)"
time="2021-04-07T18:03:07Z" level=info msg="[Status]: Checking whether application containers are in ready state"
time="2021-04-07T18:03:07Z" level=info msg="[Status]: The Container status are as follows" container=nginx Pod=nginx-6db489d4b7-2xxxp Readiness=true
time="2021-04-07T18:03:07Z" level=info msg="[Status]: The Container status are as follows" Pod=nginx-6db489d4b7-n4mkh Readiness=true container=nginx
time="2021-04-07T18:03:07Z" level=info msg="[Status]: The Container status are as follows" container=nginx Pod=nginx-6db489d4b7-qmbnx Readiness=true
time="2021-04-07T18:03:09Z" level=info msg="[Status]: Checking whether application pods are in running state"
time="2021-04-07T18:03:09Z" level=info msg="[Status]: The status of Pods are as follows" Pod=nginx-6db489d4b7-2xxxp Status=Running
time="2021-04-07T18:03:09Z" level=info msg="[Status]: The status of Pods are as follows" Pod=nginx-6db489d4b7-n4mkh Status=Running
time="2021-04-07T18:03:09Z" level=info msg="[Status]: The status of Pods are as follows" Pod=nginx-6db489d4b7-qmbnx Status=Running
time="2021-04-07T18:03:11Z" level=info msg="[Probe]: The cmd probe information is as follows" Run Properties="{10 5 1 2 0}" Mode=Continuous Phase=PreChaos Name=cmd-probe1 Command="echo 8" Comparator="{int == 8}" Source=inline
time="2021-04-07T18:03:11Z" level=info msg="[Probe]: The cmd probe information is as follows" Mode=Edge Phase=PreChaos Name=cmd-probe4 Command="echo 8" Comparator="{int == 8}" Source=inline Run Properties="{10 5 1 2 0}"
time="2021-04-07T18:03:11Z" level=info msg="[Probe]: {Actual value: 8}, {Expected value: 8}, {Operator: ==}"
time="2021-04-07T18:03:11Z" level=info msg="[Probe]: {Actual value: 8}, {Expected value: 8}, {Operator: ==}"
time="2021-04-07T18:03:16Z" level=info msg="[Probe]: cmd-probe4 probe has been Passed 😄 " ProbeName=cmd-probe4 ProbeType=cmdProbe ProbeInstance=PreChaos ProbeStatus=Passed
time="2021-04-07T18:03:16Z" level=info msg="[Probe]: The cmd probe information is as follows" Name=cmd-probe3 Command="echo 8" Comparator="{int == 8}" Source=inline Run Properties="{10 5 1 2 0}" Mode=Edge Phase=PreChaos
time="2021-04-07T18:03:16Z" level=info msg="[Probe]: {Actual value: 8}, {Expected value: 8}, {Operator: ==}"
time="2021-04-07T18:03:21Z" level=info msg="[Probe]: cmd-probe3 probe has been Passed 😄 " ProbeName=cmd-probe3 ProbeType=cmdProbe ProbeInstance=PreChaos ProbeStatus=Passed
time="2021-04-07T18:03:21Z" level=info msg="[Chaos]:Number of pods targeted: 3"
time="2021-04-07T18:03:21Z" level=info msg="Target pods list for chaos, [nginx-6db489d4b7-2xxxp nginx-6db489d4b7-n4mkh nginx-6db489d4b7-qmbnx]"
time="2021-04-07T18:03:21Z" level=info msg="[Probe]: The cmd probe information is as follows" Command="echo 8" Comparator="{int == 8}" Source=inline Run Properties="{10 5 1 2 0}" Mode=OnChaos Phase=DuringChaos Name=cmd-probe2
time="2021-04-07T18:03:21Z" level=info msg="[Info]: Details of application under chaos injection" PodName=nginx-6db489d4b7-2xxxp NodeName=ip-192-168-94-228.us-west-2.compute.internal ContainerName=nginx
time="2021-04-07T18:03:21Z" level=info msg="[Probe]: {Actual value: 8}, {Expected value: 8}, {Operator: ==}"
time="2021-04-07T18:03:21Z" level=info msg="[Info]: Details of application under chaos injection" PodName=nginx-6db489d4b7-n4mkh NodeName=ip-192-168-46-203.us-west-2.compute.internal ContainerName=nginx
time="2021-04-07T18:03:21Z" level=info msg="[Info]: Details of application under chaos injection" PodName=nginx-6db489d4b7-qmbnx NodeName=ip-192-168-11-134.us-west-2.compute.internal ContainerName=nginx
time="2021-04-07T18:03:21Z" level=info msg="[Status]: Checking the status of the helper pods"
time="2021-04-07T18:03:21Z" level=info msg="[Status]: Checking whether application containers are in ready state"
time="2021-04-07T18:03:31Z" level=info msg="[Status]: The Container status are as follows" container=pod-network-loss Pod=pod-network-loss-fhsbaz Readiness=true
time="2021-04-07T18:03:31Z" level=info msg="[Status]: The Container status are as follows" container=pod-network-loss Pod=pod-network-loss-kwdjwj Readiness=true
time="2021-04-07T18:03:31Z" level=info msg="[Status]: The Container status are as follows" Pod=pod-network-loss-xufmxr Readiness=true container=pod-network-loss
time="2021-04-07T18:03:33Z" level=info msg="[Status]: Checking whether application pods are in running state"
time="2021-04-07T18:03:33Z" level=info msg="[Status]: The status of Pods are as follows" Pod=pod-network-loss-fhsbaz Status=Running
time="2021-04-07T18:03:33Z" level=info msg="[Status]: The status of Pods are as follows" Status=Running Pod=pod-network-loss-kwdjwj
time="2021-04-07T18:03:33Z" level=info msg="[Status]: The status of Pods are as follows" Status=Running Pod=pod-network-loss-xufmxr
time="2021-04-07T18:03:35Z" level=info msg="[Wait]: waiting till the completion of the helper pod"
time="2021-04-07T18:03:35Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:03:36Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:03:37Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:03:38Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:03:39Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:03:40Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:03:41Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:03:42Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:03:43Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:03:44Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:03:45Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:03:46Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:03:47Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:03:48Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:03:49Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:03:50Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:03:51Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:03:52Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:03:54Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:03:55Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:03:56Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:03:57Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:03:58Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:03:59Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:00Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:01Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:02Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:03Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:04Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:05Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:06Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:07Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:08Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:09Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:10Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:11Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:12Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:13Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:14Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:15Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:16Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:17Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:18Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:19Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:20Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:21Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:22Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:23Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:24Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:25Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:26Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:27Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:28Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:29Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:30Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:31Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:32Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:33Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:34Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:35Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:36Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:37Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:38Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:39Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:40Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:41Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:42Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:43Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:44Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:45Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:46Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:47Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:48Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:49Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:50Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:51Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:52Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:53Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:54Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:55Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:56Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:57Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:58Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:04:59Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:05:00Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:05:01Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:05:02Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:05:03Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:05:04Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:05:05Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:05:06Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:05:07Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:05:08Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:05:09Z" level=info msg="helper pod status: Running"
time="2021-04-07T18:05:10Z" level=info msg="helper pod status: Succeeded"
time="2021-04-07T18:05:10Z" level=info msg="[Status]: The running status of Pods are as follows" Pod=pod-network-loss-fhsbaz Status=Succeeded
time="2021-04-07T18:05:10Z" level=info msg="helper pod status: Succeeded"
time="2021-04-07T18:05:10Z" level=info msg="[Status]: The running status of Pods are as follows" Pod=pod-network-loss-kwdjwj Status=Succeeded
time="2021-04-07T18:05:10Z" level=info msg="helper pod status: Succeeded"
time="2021-04-07T18:05:10Z" level=info msg="[Status]: The running status of Pods are as follows" Pod=pod-network-loss-xufmxr Status=Succeeded
time="2021-04-07T18:05:11Z" level=info msg="[Cleanup]: Deleting all the helper pod"
time="2021-04-07T18:05:13Z" level=info msg="[Confirmation]: The pod network loss chaos has been applied"
time="2021-04-07T18:05:13Z" level=info msg="[Status]: Verify that the AUT (Application Under Test) is running (post-chaos)"
time="2021-04-07T18:05:13Z" level=info msg="[Status]: Checking whether application containers are in ready state"
time="2021-04-07T18:05:13Z" level=info msg="[Status]: The Container status are as follows" Pod=nginx-6db489d4b7-2xxxp Readiness=true container=nginx
time="2021-04-07T18:05:13Z" level=info msg="[Status]: The Container status are as follows" Readiness=true container=nginx Pod=nginx-6db489d4b7-n4mkh
time="2021-04-07T18:05:13Z" level=info msg="[Status]: The Container status are as follows" Readiness=true container=nginx Pod=nginx-6db489d4b7-qmbnx
time="2021-04-07T18:05:15Z" level=info msg="[Status]: Checking whether application pods are in running state"
time="2021-04-07T18:05:15Z" level=info msg="[Status]: The status of Pods are as follows" Pod=nginx-6db489d4b7-2xxxp Status=Running
time="2021-04-07T18:05:15Z" level=info msg="[Status]: The status of Pods are as follows" Status=Running Pod=nginx-6db489d4b7-n4mkh
time="2021-04-07T18:05:15Z" level=info msg="[Status]: The status of Pods are as follows" Pod=nginx-6db489d4b7-qmbnx Status=Running
time="2021-04-07T18:05:17Z" level=info msg="[Probe]: cmd-probe1 probe has been Passed 😄 " ProbeName=cmd-probe1 ProbeType=cmdProbe ProbeInstance=PostChaos ProbeStatus=Passed
time="2021-04-07T18:05:17Z" level=info msg="[Probe]: cmd-probe2 probe has been Passed 😄 " ProbeType=cmdProbe ProbeInstance=PostChaos ProbeStatus=Passed ProbeName=cmd-probe2
time="2021-04-07T18:05:17Z" level=info msg="[Probe]: The cmd probe information is as follows" Phase=PostChaos Name=cmd-probe4 Command="echo 8" Comparator="{int == 8}" Source=inline Run Properties="{10 5 1 2 0}" Mode=Edge
time="2021-04-07T18:05:22Z" level=info msg="[Probe]: cmd-probe4 probe has been Passed 😄 " ProbeType=cmdProbe ProbeInstance=PostChaos ProbeStatus=Passed ProbeName=cmd-probe4
time="2021-04-07T18:05:22Z" level=info msg="[Probe]: The cmd probe information is as follows" Name=cmd-probe3 Command="echo 8" Comparator="{int == 8}" Source=inline Run Properties="{10 5 1 2 0}" Mode=Edge Phase=PostChaos
time="2021-04-07T18:05:27Z" level=info msg="[Probe]: cmd-probe3 probe has been Passed 😄 " ProbeInstance=PostChaos ProbeStatus=Passed ProbeName=cmd-probe3 ProbeType=cmdProbe
time="2021-04-07T18:05:27Z" level=info msg="[The End]: Updating the chaos result of pod-network-loss experiment (EOT)"


remove things related to old implementation

Remove packages Crayons, MacroTools, Requires, StaticArrays.
Remove graphical_rendering.jl and textual_rendering.jl.
Remove old AbstractGridWorld and GridWorldBase types.
Remove macros generate_getters and generate_setters.
Remove old action types.
Remove common struct Room and related methods.
Clean up imports.

Codecov Report

Merging #170 (994a676) into master (901b9b3) will increase coverage by 7.06%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #170      +/-   ##
==========================================
+ Coverage   66.41%   73.47%   +7.06%
==========================================
  Files          33       30       -3
  Lines        2522     2247     -275
==========================================
- Hits         1675     1651      -24
+ Misses        847      596     -251

Impacted Files
Coverage Δ

src/abstract_grid_world.jl
0.00% <ø> (ø)

src/actions.jl
88.00% <ø> (+38.00%)
:arrow_up:

src/envs/catcher.jl
75.00% <ø> (-5.27%)
:arrow_down:

src/envs/collect_gems_directed.jl
71.92% <ø> (ø)

src/envs/collect_gems_multi_agent_undirected.jl
80.39% <ø> (ø)

src/envs/collect_gems_undirected.jl
81.08% <ø> (ø)

src/envs/door_key_directed.jl
72.88% <ø> (ø)

src/envs/door_key_undirected.jl
87.93% <ø> (ø)

src/envs/dynamic_obstacles_directed.jl
70.00% <ø> (-3.34%)
:arrow_down:

src/envs/dynamic_obstacles_undirected.jl
82.60% <ø> (-2.18%)
:arrow_down:

... and 23 more

Continue to review full report at Codecov.

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


The Chado load is failing on mRNA SPAC212.11

processing mRNA SPAC212.11.1
no cvterm found for derives_from in store_feature_rel() at /home/kmr44/git/pombase-legacy/lib/PomBase/Chado/LoadFeat.pm line 662.
DBIx::Class::Storage::TxnScopeGuard::DESTROY(): A DBIx::Class::Storage::TxnScopeGuard went out of scope without explicit commit or error. Rolling back. at /usr/local/share/perl/5.14.2/Carp.pm line 100

The ID in:

mRNA SPAC212.11.1

seems to be bogus as it isn't an mRNA feature.

This problem has goon away but I'm not sure why.


Bump ddvk <IP_ADDRESS>8

This bumps ddvk's hacks to rm1: <IP_ADDRESS>6 and rm2: <IP_ADDRESS>8.
For rm1 version 32.1.02 has been superseeded by 32.1.3.
I am still on <IP_ADDRESS>6 so I can't test this PR.

Doesn't build, Invalid checksum.
toltec.builder.BuildError: Invalid checksum for source file https://github.com/ddvk/remarkable-hacks/archive/408694677aba3607aa8ee56bc0368baf91568ce7.zip:
  expected ie821c99751f12c65137d5c5dc3387b6663123cf03e1551b5af970ef4290fad5a
  actual   e821c99751f12c65137d5c5dc3387b6663123cf03e1551b5af970ef4290fad5a

Seems like you forgot an i.


assist_satellite.announce for wyoming-satellite

Hi all,
first of all - incredible project. I have a lot of fun setting everything up (with OpenAI).
I just set up two Raspberry Pis and I managed to configure a lot with the documentation.
action-assist_satelliteannounce
When i try to use the assist_satellite.announce service the devices do not show up as targets or entities.
Am I doing something wrong hiere, or is that feature not implemented ?
Reference:
assist-satellite entity documentation
I searched the repo for assist_satellite.announce and did not find anything, so I assume that feature has not yet been looked at, or im completely misunderstanding something.

I think the feature is not implemented yet.
In the Automation GUI, I cannot target my satellites with the assist_satellite.announce service.
However, I can go into `Developers Tools -> Actions' and go into YAML mode to force the service to target a satellite, but then I get:

Failed to perform the action assist_satellite.announce. Entity assist_satellite.satellite02 does not support this service.

All my satellites run wyoming-satellite.

This would be a nice feature. Would also be nice to be able to trigger the device with a button in home assistant. I would like to be able to respond to followup questions from my assistant.

I think the feature is not implemented yet.
In the Automation GUI, I cannot target my satellites with the assist_satellite.announce service.
However, I can go into `Developers Tools -> Actions' and go into YAML mode to force the service to target a satellite, but then I get:

Failed to perform the action assist_satellite.announce. Entity assist_satellite.satellite02 does not support this service.

All my satellites run wyoming-satellite.

Mind if i ask for your parameters? Did you tweak the settings for mic auto gain and noise supression etc?

@florian-asche I don't remember what I changed, but it shouldn't have any impact on what is being discussed here.


[PyTorch] Add contiguous check for te_grouped_gemm

Description
The type of input and output of te_grouped_gemm is std::vector<at::Tensor>. If the tensor is not contiguous it will causes potential accuracy problem and it is hard to debug. It's a useful safe operator to check every tensor is contiguous.
Why use is_contiguous instead of contiguous?
If tensor is non-contiguous contiguous will call aten::clone to generate a new tensor. It will cause potential performance fallback and generally user is hard to find reason (maybe them need profile).
Fixes # (issue)
Type of change

[ ] Documentation change (change only to the documentation, either a fix or a new content)
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Infra/Build change
[ ] Code refractor

Changes
Please list the changes introduced in this PR:

Add contiguous check for te_grouped_gemm

Checklist:

[x] I have read and followed the contributing guidelines
[x] The functionality is complete
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes

This is a good idea. Can you sign your commit to pass the DCO check?

Done.

/te-ci pytorch


Converting circular structure to JSON

When I try to inject Cloudflare D1 with drizzle and it fails:
"TypeError: Converting circular structure to JSON\n    --> starting at object with constructor 'SQLiteText'\n    |     property 'table' -> object with constructor 'SQLiteTable'\n    --- property 'id' closes the circle"

API routes for Astro
import { qstash } from<EMAIL_ADDRESS>import { kvQueue, r2Queue } from<EMAIL_ADDRESS>import { qstashReceiver } from<EMAIL_ADDRESS>import { serveWorkflow } from '@sshare/lib'
import { links } from '@sshare/schema'
import { APP_HOMEPAGE } from 'astro:env/client'
import { inArray, isNull, lte, or, sql } from 'drizzle-orm'
import { drizzle } from 'drizzle-orm/d1'
import { chunk } from 'es-toolkit'

/**
 * Handles the workflow for verifying incoming requests, retrieving and processing links,
 * and performing a series of cleanup tasks such as deleting files, passwords, caches,
 * and database entries based on specific criteria.
 *
 * @param {Object} ctx - The context object containing metadata and runtime environment.
 * @param {Object} workflow - The workflow object for managing asynchronous tasks and operations.
 *
 * @returns {Promise<void>} - A promise that resolves when the entire workflow completes.
 */
export const { POST } = serveWorkflow(
  async (ctx, workflow) => {
    const { env } = ctx.locals.runtime

    // Get all links were accessed before 7 days from now or not access at all
    const results = await workflow.run('get-all-links', () =>
      drizzle(env.USER_DB)
        .select()
        .from(links)
        .where(
          or(
            isNull(links.lastAccessedAt),
            lte(
              links.lastAccessedAt,
              sql`DATETIME('now', 'start of day', '-7 days')`
            )
          )
        )
    )

    if (!results.length) {
      return
    }

    // Filter files from links
    const files = await workflow.run('filter-files-from-links', () =>
      results.filter((link) => link.type === 'file').map((link) => link.id)
    )

    // Delete files in R2 bucket
    await workflow.run('delete-files-r2', async () => {
      const filesChunks = chunk(files, 400_000) // DeleteObjectsCommand can handle up to 1000 objects
      for (const filesChunk of filesChunks) {
        await r2Queue.enqueueJSON({
          url: `${APP_HOMEPAGE}/api/upstash/qstash/receivers/delete-files`,
          method: 'DELETE',
          body: filesChunk,
          contentBasedDeduplication: true,
        })
      }
    })

    // Filter protected links
    const protectedLinkIds = results
      .filter((link) => link.passwordProtected)
      .map((link) => link.id)

    // Delete passwords in KV namespace by ids
    await workflow.run('delete-passwords-kv', async () => {
      const protectedLinkIdsChunks = chunk(protectedLinkIds, 400_000)
      for (const protectedLinkIdsChunk of protectedLinkIdsChunks) {
        await kvQueue.enqueueJSON({
          url: `${APP_HOMEPAGE}/api/upstash/qstash/receivers/delete-passwords`,
          method: 'DELETE',
          body: protectedLinkIdsChunk,
          contentBasedDeduplication: true,
        })
      }
    })

    // Get all slugs from links
    const linkSlugs = results.map((link) => link.slug)

    // Delete caches in KV namespace by slugs
    await workflow.run('delete-caches-kv', async () => {
      const linkSlugsChunks = chunk(linkSlugs, 400_000)
      for (const linkSlugsChunk of linkSlugsChunks) {
        await kvQueue.enqueueJSON({
          url: `${APP_HOMEPAGE}/api/upstash/qstash/receivers/delete-caches`,
          method: 'DELETE',
          body: linkSlugsChunk,
          contentBasedDeduplication: true,
        })
      }
    })

    // Filter all link ids
    const linkIds = results.map((link) => link.id)

    // Delete data in D1 database by ids
    await workflow.run('delete-data-db', () =>
      drizzle(env.USER_DB).delete(links).where(inArray(links.id, linkIds))
    )
  },
  { receiver: qstashReceiver.rawReceiver, qstashClient: qstash }
)

serveWorkflow
import type { APIContext, APIRoute } from 'astro'

import {
  serve as serveBase,
  type WorkflowContext,
  type WorkflowServeOptions,
} from '@upstash/workflow'

export function serveWorkflow<TInitialPayload = unknown>(
  routeFunction: (
    apiContext: APIContext,
    workflowContext: WorkflowContext<TInitialPayload>
  ) => Promise<void>,
  options?: WorkflowServeOptions<Response, TInitialPayload>
) {
  const POST: APIRoute = (apiContext) => {
    const { handler } = serveBase<TInitialPayload>(
      (workflowContext) => routeFunction(apiContext, workflowContext),
      options
    )

    return handler(apiContext.request)
  }

  return { POST }
}

Can you check it out? @CahidArda

By the way, I want to ask about how to use context.run. Should I put something like this
const linkIds = results.map((link) => link.id)

to inside the context block?

Hi there,
Ideally, the const linkIds = results.map((link) => link.id) should be inside a context.run statement. You could define the files, protectedLinkIds and linkIds inside the first step like:
const { files, protectedLinkIds, linkIds } = await context.run("get-all-links", ...)

This can solve the circular structure issue too maybe, but I will take a look.
Another note: I don't think @returns {Promise<void>} - A promise that resolves when the entire workflow completes. is correct. The promise will resolve when the workflow starts running, not when it finishes.

@CahidArda Opps, it's just generated comments from AI
Thanks for your support.

I give you some of my debug information:
When I try to code like this, it's run normally:
// Get all links were accessed before 7 days from now or not access at all
    const results = await workflow.run('get-all-links', async () => {
      return await drizzle(env.USER_DB)
        .select()
        .from(links)
        .where(
          or(
            isNull(links.lastAccessedAt),
            lte(
              links.lastAccessedAt,
              sql`DATETIME('now', 'start of day', '-7 days')`
            )
          )
        )
    })

But when I try to return the promise instead of make await inside the function, it throws circular error
// Get all links were accessed before 7 days from now or not access at all
    const results = await workflow.run('get-all-links', async () => {
      return drizzle(env.USER_DB)
        .select()
        .from(links)
        .where(
          or(
            isNull(links.lastAccessedAt),
            lte(
              links.lastAccessedAt,
              sql`DATETIME('now', 'start of day', '-7 days')`
            )
          )
        )
    })

As long as the async is presents, it works

This is my final implementation, thank you for your suggestion:
import type { PublishToUrlResponse } from '@upstash/qstash'

import { qstash } from<EMAIL_ADDRESS>import { kvQueue, r2Queue } from<EMAIL_ADDRESS>import { qstashReceiver } from<EMAIL_ADDRESS>import { serveWorkflow } from '@sshare/lib'
import { links } from '@sshare/schema'
import { APP_HOMEPAGE } from 'astro:env/client'
import { inArray, isNull, lte, or, sql } from 'drizzle-orm'
import { drizzle } from 'drizzle-orm/d1'
import { chunk } from 'es-toolkit'

/**
 * Handles the workflow for verifying incoming requests, retrieving and processing links,
 * and performing a series of cleanup tasks such as deleting files, passwords, caches,
 * and database entries based on specific criteria.
 *
 * @param {Object} ctx - The context object containing metadata and runtime environment.
 * @param {Object} workflow - The workflow object for managing asynchronous tasks and operations.
 *
 * @returns {Promise<void>} - A promise that resolves when the entire workflow completes.
 */
export const { POST } = serveWorkflow(
  async (ctx, workflow) => {
    const { env } = ctx.locals.runtime

    // Get all links were accessed before 7 days from now or not access at all
    const results = await workflow.run('get-all-links', async () =>
      drizzle(env.USER_DB)
        .select()
        .from(links)
        .where(
          or(
            isNull(links.lastAccessedAt),
            lte(
              links.lastAccessedAt,
              sql`DATETIME('now', 'start of day', '-7 days')`
            )
          )
        )
    )

    if (!results.length) {
      return
    }

    const { files, protectedLinkIds, linkSlugs, linkIds } = await workflow.run(
      'categorize-links',
      () => {
        const files = [],
          protectedLinkIds = [],
          linkSlugs = [],
          linkIds = []

        for (const link of results) {
          if (link.type === 'file') {
            files.push(link.id)
          }

          if (link.passwordProtected) {
            protectedLinkIds.push(link.id)
          }

          linkSlugs.push(link.slug)
          linkIds.push(link.id)
        }

        return { files, protectedLinkIds, linkSlugs, linkIds }
      }
    )

    // Delete files in R2 bucket
    await workflow.run('delete-files-r2', async () => {
      const results: PublishToUrlResponse[] = []
      const filesChunks = chunk(files, 400_000) // DeleteObjectsCommand can handle up to 1000 objects

      for (const filesChunk of filesChunks) {
        const result = await r2Queue.enqueueJSON({
          url: `${APP_HOMEPAGE}/api/upstash/qstash/receivers/delete-files`,
          method: 'DELETE',
          body: filesChunk,
          contentBasedDeduplication: true,
        })

        results.push(result)
      }

      return results
    })

    // Delete passwords in KV namespace by ids
    await workflow.run('delete-passwords-kv', async () => {
      const results: PublishToUrlResponse[] = []
      const protectedLinkIdsChunks = chunk(protectedLinkIds, 400_000)

      for (const protectedLinkIdsChunk of protectedLinkIdsChunks) {
        const result = await kvQueue.enqueueJSON({
          url: `${APP_HOMEPAGE}/api/upstash/qstash/receivers/delete-passwords`,
          method: 'DELETE',
          body: protectedLinkIdsChunk,
          contentBasedDeduplication: true,
        })

        results.push(result)
      }

      return results
    })

    // Delete caches in KV namespace by slugs
    await workflow.run('delete-caches-kv', async () => {
      const results: PublishToUrlResponse[] = []
      const linkSlugsChunks = chunk(linkSlugs, 400_000)

      for (const linkSlugsChunk of linkSlugsChunks) {
        const result = await kvQueue.enqueueJSON({
          url: `${APP_HOMEPAGE}/api/upstash/qstash/receivers/delete-caches`,
          method: 'DELETE',
          body: linkSlugsChunk,
          contentBasedDeduplication: true,
        })

        results.push(result)
      }

      return results
    })

    // Delete data in D1 database by ids
    await workflow.run('delete-data-db', async () =>
      drizzle(env.USER_DB).delete(links).where(inArray(links.id, linkIds))
    )
  },
  { receiver: qstashReceiver.rawReceiver, qstashClient: qstash }
)

I am glad to hear that it works!
I will investigate why it didn't work when you didn't write async.

Hi @CahidArda
Did you find any problem?


How Webview on Android can show progress bar like nprogress?

I'm an Android Developer, I want show progress on the top of WebView like nprogress. How to make it?

use stackoverflow not github


Mass Import for Exercises

Is your feature request related to a problem?
For the PGdP exercise preparation, I'd like to share the exercises of the two old courses with some new colleges, without adding them to the old courses (so they also don't have access to any student data). Basically I'd like to bulk-import a set of ~150 existing exercises from two existing courses into a single new course.
The new course would basically be the 'exercise repository' my colleagues can use to derive new exercises from.
Describe the solution you'd like
The best solution would be a button in the GUI that allows me to select multiple exercises to import.
Another option would be to just do it in a 'hacky' way on the server-side. This would solve my immediate problem and already be very helpful.
The third solution is to add all colleagues to the two old courses... but this grant access to student data to a lot of people.
A final solution might be to offer an 'export' feature for all exercises that could output all exercises as a zip file.
Describe alternatives you've considered
An option I have right now is to manually import each exercise one-by-by. However... we are talking about ~150 exercises.. so this would be a lot of work.
Additional context
No response

You can already do it the hacky way by using the API programmatically. There is an endpoint for exercise import. I think this would be a larger feature to properly implement, because some updates and setting changes are typically done on import (what is shown on the import page).

duplicate of #3765


Flutter Web Unclear/Blurry Images

Flutter Web
Steps to reproduce

Just take any screenshot.
Add it to assets.
display it using Image.asset() (even try setting FilterQuality to high)

Expected results

The actual image is sharp and is of high quality.
Actual results

Just look at what its rendering even with canvaskit or html.
Please do not ignore
This issues has been there since a very long time.
Its flutter 3.13.6 and still this hasn't been fixed.
Flutter Doctor output
[✓] Flutter (Channel stable, 3.13.6, on Ubuntu 22.10 5.19.0-46-generic, locale
    en_IN)
    • Flutter version 3.13.6 on channel stable at
      /home/omegaui/snap/flutter/common/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ead455963c (11 days ago), 2023-09-26 18:28:17 -0700
    • Engine revision a794cf2681
    • Dart version 3.1.3
    • DevTools version 2.25.0

[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /home/omegaui/Android/Sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/linux#android-setup for
      more details.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • clang version 10.0.0-4ubuntu1
    • cmake version 3.16.3
    • ninja version 1.10.0
    • pkg-config version 0.29.1

[✓] Android Studio (version 2022.3)
    • Android Studio at
      /home/omegaui/.local/share/JetBrains/Toolbox/apps/android-studio
    • Flutter plugin version 75.1.2
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      17.0.6+0-17.0.6b829.9-10027231)

[✓] IntelliJ IDEA Community Edition (version 2023.2)
    • IntelliJ at
      /home/omegaui/.local/share/JetBrains/Toolbox/apps/intellij-idea-community-
      edition
    • Flutter plugin version 75.1.4
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.83.0)
    • VS Code at /usr/share/code
    • Flutter extension version 3.74.0

[✓] Connected device (3 available)
    • SM E236B (mobile) • RZCT40NXK8Y • android-arm64  • Android 13 (API 33)
    • Linux (desktop)   • linux       • linux-x64      • Ubuntu 22.10
      5.19.0-46-generic
    • Chrome (web)      • chrome      • web-javascript • Google Chrome
      117.0.5938.149

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

In my case using BoxFit.cover, fixed the issue.


Add _w_long, _u_long to bootstrap which is requried by importlib

Interesting, I wonder where we got our version from that it doesn't have it. Feel free to update it with the full version of _bootstrap_external from CPython.

It seems the files came from python 3.8 dev


Wget already installed error

When installing after tapping I get this error:
=> Pouring gcc49-4.9.3.el_capitan.bottle.2.tar.gz
🍺  /usr/local/Cellar/gcc49/4.9.3: 1,160 files, 162.3M
Warning: homebrew/versions/gmp4-4.3.2 already installed
Warning: homebrew/versions/libmpc08-0.8.1 already installed
Warning: homebrew/versions/mpfr2-2.4.2 already installed
Warning: homebrew/versions/cloog018-0.18.0 already installed
Warning: homebrew/versions/isl011-0.11.1 already installed
Error: wget-1.17 already installed
To install this version, first `brew unlink wget`

I can reproduce this error locally by manually running brew install wget. Not sure why this is happening.
To fix, I ran brew unlink wget && brew install wget.
Is this an issue with this package or upstream? I don't know why it presented me with an error instead of just updating.

When installing after tapping

Unfortunately, I have no idea why this error happened.
Could you show complete reproduce steps?
Just tapping this repository? Or executing brew install install-mingw-w64?

I can reproduce this error locally by manually running brew install wget.

Really? I got following result:
% brew install wget
Warning: wget-1.17.1 already installed

It shows not error but warning.
Umm..., it's really curious.... :confounded:

Very strange! I had wget-1.17 and it wanted to upgrade to wget-1.17.1. For some reason this Error'd out within brew install-mingw-w64. I manually ran brew unlink wget && brew install wget to resolve this issue. This doesn't seem like an issue with your package. You didn't do anything wrong, but I figured that brew wouldn't fail to install a dependency like that.
We could probably close this issue.

OK. I close this issue.
If anyone meet same issue, I'll reopen this.


Fix the conda package build

By bumping the Python version used to 3.8

Hmm what is that?
failed to get install actions, retrying.  exception was: Invalid version '=': invalid operator
WARNING:conda_build.environ:failed to get install actions, retrying.  exception was: Invalid version '=': invalid operator
Failed to get install actions, max retries exceeded.
ERROR:conda_build.environ:Failed to get install actions, max retries exceeded.
ERROR conda_build.environ:get_install_actions(963): Failed to get install actions, max retries exceeded.

Leaving build/test directories:
  Work:
 /usr/share/miniconda3/envs/test/conda-bld/work
  Test:
 /usr/share/miniconda3/envs/test/conda-bld/test_tmp
Leaving build/test environments:
  Test:
source activate  /usr/share/miniconda3/envs/test/conda-bld/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p
  Build:
source activate  /usr/share/miniconda3/envs/test/conda-bld/_build_env

TESTS FAILED: nbsite-0.8.1a2.post2+g706f9c4-py_0.tar.bz2
TaskFailed - taskid:package_build
Command failed: 'conda build -c pyviz/label/dev -c defaults -c conda-forge conda.recipe/ -t --append-file conda.recipe//recipe_append--py38-unit-default-pkg.yaml && conda build purge' returned 1

Will resume this work later.

I think it is related to https://github.com/holoviz/holoviews/pull/5738

Indeed could be but it doesn't seem it's the urllib3 problem, so maybe so other change in conda-build.


Finalize flow measurement solution

The flow sensor was originally a pneumotachograph. However, the signal/noise ratio was too high and a venturi was selected as the next option. The venturi was 3D printed with a 0.5 in D and a 0.157 in throat. The venturi calculation spreadsheet is visible here. The major problem with venturi is concern over the results in one test, that may be more systemic.
These results came from one test that @inceptionev ran where we were not able to distinguish the inflow and outflow on exhale. In the plot below, the Orange is the inflow and the purple is the outflow dP. The blue trace is the command pressure and orange trace is measured pressure.

When the solenoid opens, the lungs are deflating (observation) but the plot would indicate that more inflow than exflow means the lungs are deflating. We should plan another test to explore this phenomenon since the spreadsheet indicates what we tested is close to optimized.

This ticket was in the "Done" column in Hardware. Moved it to the same column after changing repositories.

This ticket was in the "Done" column in Hardware. Moved it to the same column after changing repositories.


Feature request: Official way of creating external plugins

I have created a few plugins I would like to distribute seperately on PyPI.
For now I have created them in a new top-level namespace like slack_machine_plugin_<name>, but this seems inelegant, and the doc-strings are not picked up for the help command.
Thoughts?

I'm wondering why the doc-strings aren't picked up by the help command. I always assumed that external plugins distributed via PyPI would work out of the box.
I will do some research this week to see how to get it to work and get back to you on this issue.

Excellent - I tried to create a namespaced package in machine.plugins.external.<name>, but failed as I couldn't get it to load the module from within that package.

Update: Yesterday, I pushed a major update for Slack Machine. Sadly, it's not fully backwards compatible. I had to update quite some of the inner workings of Slack Machine because the underlying slack client library I'm using also had some big breaking changes.
I also took some time to create an example plugin to show people how it's done. You can find the repo here: https://github.com/DandyDev/sm-example-plugin. I didn't publish the package to PyPI (although I could, I guess), but you can easily install it by providing pip with the Github URL. It's all in the README of the example plugin.
Help texts are also confirmed to work.
Let me know if that clears things up for you, and feel free to ask any questions!

I see you also use a different top level name space for your plugin and plugins for other python projects also live out side the name space of the main project - guess it's just the Python way of doing things.