text:
"cannot find type MenuHash in this scope"

When using:
tauri = { version = "1.0.0-beta.5", features = ["api-all", "system-tray"] }

This error is being thrown:
   Compiling tauri-runtime-wry v0.1.4
error[E0412]: cannot find type `MenuHash` in this scope
   --> /Users/j/.cargo/registry/src/github.com-1ecc6299db9ec823/tauri-runtime-wry-0.1.4/src/menu.rs:269:35
    |
269 |   custom_menu_items: &mut HashMap<MenuHash, WryCustomMenuItem>,
    |                                   ^^^^^^^^ not found in this scope
    |
help: consider importing this type alias
    |
5   | use tauri_runtime::menu::MenuHash;
    |

error: aborting due to previous error

This PR fix it.

What kind of change does this PR introduce? (check at least one)

[x] Bugfix
[ ] Feature
[ ] Docs
[ ] New Binding Issue #___
[ ] Code style update
[ ] Refactor
[ ] Build-related changes
[ ] Other, please describe:

Does this PR introduce a breaking change? (check one)

[ ] Yes. Issue #___
[x] No

The PR fulfills these requirements:

[ ] When resolving a specific issue, it's referenced in the PR's title (e.g. fix: #xxx[,#xxx], where "xxx" is the issue number)
[ ] A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.

If adding a new feature, the PR's description includes:

[ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

Nice catch!
Could you add a change file please
There is an example;
https://github.com/tauri-apps/tauri/blob/764bc6631806ea1196e66e8045a7ce9a45e0f7ff/.changes/tauri-wry-migrate.md

@lucasfernog
Since we can have a system_tray without a menu.
I think it would be better to have 3 different feature flags.

menu for all menu creation whether it is with a menu_bar or a system_tray
menu_bar for the menu_bar itself and would include the menu feature flag
system_tray for the tray itself

So if users just want a system_tray without a menu, they won't have to bundle the extra code for menu

I agree with you @amrbashir

Updated @lemarier

Thanks @dizda we do appreciate a lot your contribution

Pleasure guys, tauri is fantastic to work with!

authors: amrbashir dizda lemarier lucasfernog


text:
chore(tauri.js): Update yarn.lock

What kind of change does this PR introduce? (check at least one)

[ ] Bugfix
[ ] Feature
[ ] New Binding Issue #___
[ ] Code style update
[ ] Refactor
[ ] Build-related changes
[x] Other, please describe: Chore

Does this PR introduce a breaking change? (check one)

[ ] Yes. Issue #___
[x] No

The PR fulfills these requirements:

[x] It's submitted to the dev branch and not the latest branch
[ ] When resolving a specific issue, it's referenced in the PR's title (e.g. fix: #xxx[,#xxx], where "xxx" is the issue number)
[ ] A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.

If adding a new feature, the PR's description includes:

[ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:
yarn.lock was out of sync

🤔 I thought we weren't shipping lock-files?

Right, libraries don't usually ship lockfiles. However, yarn audit requires either a lockfile or node_modules folder

source: gharchive/pull-request

repo: tauri-apps/tauri

license_type: permissive

license_source: github-api


text:
A TOC for examples

At that level, a list of all examples and what they do would help us a lot. Simply using the docstrings of the classes would be sufficient. For example:
Examples of WAMP with asyncio

basic: short description

rpc: short description

decorators: an application component registering RPC endpoints using decorators.

we have that now:

http://autobahn.ws/python/wamp/examples.html
http://autobahn.ws/python/websocket/examples.html

source: gharchive/issue

authors: Vayel oberstet

repo: tavendo/AutobahnPython

license: mit

license_source: bigquery


text:
Training with CPU mode

/home/sm/venv/lib/python3.6/site-packages/torch/cuda/init.py:118: UserWarning:
Found GPU0 Quadro K4200 which is of cuda capability 3.0.
PyTorch no longer supports this GPU because it is too old.
The minimum cuda capability that we support is 3.5.
warnings.warn(old_gpu_warn % (d, name, major, capability[1]))
Traceback (most recent call last):
File "train.py", line 90, in
main()
File "train.py", line 86, in main
diarization_experiment(model_args, training_args, inference_args)
File "train.py", line 44, in diarization_experiment
model = uisrnn.UISRNN(model_args)
File "/home/sm/Speaker-Diarization/uisrnn/uisrnn.py", line 99, in init
sigma2 * torch.ones(self.observation_dim).to(self.device))
RuntimeError: CUDA error: no kernel image is available for execution on the device
Can anyone suggest me any alternative to perform training?
Thanks in advance

Resolved by changing line 86 of uisrnn.py
self.device = torch.device(
'cuda:0' if torch.cuda.is_available() else 'cpu')
to
self.device = torch.device('cpu')

repo: taylorlu/Speaker-Diarization


text:
Adde Hanif's changes

Added the Koleo loss
Added the weighted sup t con
Switched Batchnorm from layernorm

thanks! runs with following changes: https://github.com/tbenst/silent_speech/compare/f88716...tbenst:silent_speech:tb/hanif#diff-afab5b47f3c9255cc34937f181df1eefac20a9e304f1c8756a37666cf1c8d1d9L862

license: MIT


text:
add export from example

The syntax allows that but I noticed that we were missing an example in the readme.

@MylesBorins do you mean adding
export { val } from './foo.js';

above?


text:
Why is JSON.rawJSON limited to primitives only?

Forgive me if this is the wrong spot to put this.
I think JSON.rawJSON is a really powerful API for performance-optimizing JSON serialization. But, because it is limited to only producing valid primitive JSON, it can't be used for "inline"-ing existing JSON.
I've got a couple use cases I want to use it for that requires feeding pre-serialized objects and arrays into the serialization of outer object trees. For example, in a typical REST API, you might retrieve 10 records from the database, and reply with one big JSON array of all of them. Each record might have a big JSON value on it, and if they are large, it performs poorly to de-serialize each record's JSON object to then just serialize it again to produce the REST API response holding all 10 records. Instead, it'd be great to leave the data as a string when fetching from the database, and then just insert it into the final JSON string produced by JSON.stringify using JSON.rawJSON to wrap each of these strings.
Without this capability, one has to resort to manually clobbering together JSON strings which is far less performant and correct than using the engine's built-in capabilities, or always deserializing just to serialize again. Userland implementations like json-stream-stringify are far, far slower, and at least in my case, the JSON objects are really big, so deserializing and reserializing is a major performance issue.
I presume there is a justification for limiting what can be go through a .rawJSON, but what is it? And, could there ever be a trusted mode, or some sort of escape hatch where for very performance sensitive use cases, any ole string could be sent along?
Also one other note: it seems that this low level API could really assist with performance optimization around avoiding re-serializing values you already have the source JSON string for, but as currently specified it can't because it does the safety check by parsing the string anyways. That seems correct but inefficient, again suggesting that it'd be great to have some sort of escape hatch for the brave. Notably, [[IsRawJSON]] being an internal slot means that userland can't create their own raw JSON objects and pay the complexity / reliability price.

@gibson042 apologies for the direct ping but it'd be super helpful to understand this and/or collaborate on widening the applicability!

Thanks for the ping. The reason for limiting to primitive values is cutting off what would otherwise be a bigger opportunity for surreptitious communication by varying representation details within JSON text representing the same data. See https://github.com/tc39/proposal-json-parse-with-source/issues/12#issuecomment-704441889 , https://github.com/tc39/proposal-json-parse-with-source/issues/19#issuecomment-951787505 , and also the extensive discussion at the October 2021 plenary that ultimately resulting in global availability with primitive-only constraints as a balance of convenience vs. integrity (the latter being a concern about the ability for an untrusted data-only input object to encode itself as arbitrary JSON text, originally raised in July 2020).

So the worry is that people would exfiltrate information through whitespace and/or repeated keys? Because as far as I can tell, toJSON already allows an object to replace itself with something completely different (or, more likely, something with some extra fields), and if that were a problem for some reason, rawJSON already gives us quite a few places to squeeze some information:

For strings:

which characters to escape (only control characters and " must be escaped)
in some cases, which escape to use

For numbers:

what exponent to use
for integers, whether to use an exponent at all
whether to precede an exponent with e or E
whether or not to place a + before the digits of a positive exponent
trailing zeros in the fractional part
leading zeros in the exponent

Or, getting back to things possible even without this proposal, you could just reorder the fields in objects.

authors: SamB airhorns gibson042


text:
Remove ngDevMode condition on error message

Error messages shouldn't differ like that based on environment. It's also useful outside of Angular.

Blocks #193. If #175 gets merged instead of #193, this will need redone.


text:
TestablePublisher failed after receiving subscriptions .

I tried to play with examples you cited in documentation and the testMap() example failed for me .
the program stop here :
func request(_ demand: Subscribers.Demand) {         _ = queue?.requestDemand(demand)  }
I'm using xcode 11.2.1

Maybe something to do with SR-11564 and described in issue #14?
Try setting ‘DEAD_CODE_STRIPPING = NO’ in your project build settings and see if that resolves the issue.

Thanks.
This resolve the issue .

authors: abdelmajidrajad tcldr

repo: tcldr/Entwine


text:
Allow install without duckdb

I’m trying to install Harlequin on a Raspberry Pi Zero 2 and the duckdb part takes hours and hours, I haven’t seen it actually complete yet.
I only want to use harlequin with SQLite, is it possible to get it without the duckdb support/adapter?

Sounds like there isn't a duckdb wheel for your platform, so you're compiling from source on your rpi. You could probably use a dev box to build a wheel for your rpi platform and install that wheel before installing harlequin.
You could also compute harlequin's dependencies with pip freeze (etc), create a requirements.txt, delete duckdb (which has no python deps), and install with pip install --no-deps -r requirements.txt
Harlequin should mostly work without DuckDb (the exporter will crash). In the future though, I'm planning on a deeper integration with DuckDb (for cross-database joins etc), so ripping it out doesn't make sense. I thought about moving it to an Extra, and I might do that if I could make it a default extra, but Python doesn't have such a thing.

Thanks!
That did help some, at least going the route where I would build it on my Mac in venv then freeze pip and run with --no-deps like you said.
However, I ran into more issues installing pyarrow, and also tree-sitter-languages if I recall correctly.

Yeah, those all require c extensions. Pyarrow is critical - you could do without tree-sitter and tree-sitter-languages (it's just for syntax highlighting and it degrades gracefully without)

authors: albertfilice tconbeer

repo: tconbeer/harlequin


text:
Authorization code does not come

calling the function: SetAuthenticationPhoneNumber
It returns: Ok.
The state changes to:

{@type: updateAuthorizationState, authorization_state: {@type: authorizationStateWaitCode, code_info: {@type: authenticationCodeInfo, phone_number: <some_number>, type: {@type: authenticationCodeTypeTelegramMessage, length: 5}, next_type: null, timeout: 0}}}

As a result message does not come to telegram. tried many times and from different phone numbers
This happens very often. This may occur when we decide to release our application.
What to do in such a situation?

Sorry, there is an issue with Telegram login system. Please wait until it's fixed.

I seem to have the same problem developing an alternative Android client (using tdlib's java bindings). The phone number is from a phone that has the official client installed and I'm connecting with the following settings:
deviceModel = "Phone"
applicationVersion = "1.0"
useFileDatabase = false
useChatInfoDatabase = false
useMessageDatabase = false
useSecretChats = false
enableStorageOptimizer = true
systemLanguageCode = "en"
useTestDc = true
I call setAuthenticationPhoneNumber(phoneNumber), receive an Ok, and the state is switched to AuthorizationStateWaitCode with the same contents as in the issue, but I get no notifications in Telegram. Is there something I'm doing wrong or is it something on Telegram's end?

@eugene2k You specified useTestDc = true. Are you sure that you are logged to the Test DC in the official client?
By the way, you can try to test authorization in Test DC with a test account first.

I haven't realized there's a need to log in to the test dc with the official client. I can't find any mention of this or how it can be done.

Test DC is a completely independent environment.

repo: tdlib/td


text:
how to get responce value in tdlib?

i have this code
td_api::make_object<td_api::some_function>()
i got responce in to_string(response)
user {
  ....
  pattern = 123
  some_other_parameters...
  .....

how i can get value of pattern from c++ tdlib?
Is there any ready-made method?
like this - check for error
if (response->get_id() == td_api::error::ID) {
what i need to do to get my pattern?
like
response->pattern

See documentation of the class ClientManager.

authors: levlam sip-for-telegram-com


text:
Clarification: stateProvince/county/municipality when georeference radius covers more than one

Using a point-radius (or a dwc:footprintWKT) for a georeference, and that radius encompasses several administrative divisions, what should go into these fields? The division that the points falls into, or a list of the divisions that the radius covers?
To illustrate, the Matroosberg mountains in South Africa fall into two districts, the Worcester Distr. and the Ceres Distr. Some specimens are recorded from the 'Matroosberg', with no extra information.
Should the answer to this be included in the documentation for these DwC properties?

I think they should be left blank. The answer is not available.
Yes, it would be useful have this better documented, but this is a general problem and no solution seems to have been found yet.

Hi Ian,
This question is interesting as it approaches the georeference from a perspective opposite to the normal one for retrospective georeferencing. Usually, one has a textual location as raw material from which the georeference is derived. That is usually something akin to Darwin Core's verbatimLocality, where all of the details could be written out. The principles of best practice suggest that the spatial representation should contain all of the possible interpretations of where that textual location can be. That interpretation often intersects multiple entities at the same administrative level (e.g., dwc:stateProvince). But the Darwin Core higher geography terms are meant to be singular, so that they could, in principle, but validated from a geographic authority. We capture that principle in the standardization of geography using the VertNet Geographic Lookup file (see https://github.com/VertNet/DwCVocabs/blob/master/vocabs/Geography.csv and the principles behind it at https://github.com/VertNet/DwCVocabs). Summarizing, to answer you question, I agree with @qgroom, the administrative levels that would have multiple values should be left blank, and the parent administrative level that contains all of the location should be provided. I have cross-referenced this issue in The Darwin Core Questions & Answers repository (see https://github.com/tdwg/dwc-qa/issues/141), where issues lead to documentation improvement.

Thank you for the responses John and Quentin. Blank it will be. Just another example, which may be useful for documentation, would be a verbatimLocality of '5km from Rust de Winter, Transvaal'. Our South African provinces were changed in 2004, with the Transvaal split into four. A radius of 5km around the small town of Rust de Winter includes three, namely Gauteng, Limpopo and Mpumalanga. To further complicate matters, our provincial boundaries are still somewhat fluid, with the last set of changes in 2016, which puts stateProvince values near but within provincial boundaries in peril too.

I am going to keep this one open, following our process to not close the issue until the answers have been incorporated in documentation.

The usage comments for country incorporate the recommendations covered here. The remaining administrative geography terms (continent, countrycode, stateProvince, county, municipality) should do the same.

Closing as having been answered.

authors: ianengelbrecht qgroom tucotuco

repo: tdwg/dwc


text:
消费者先启动，提供者后启动，消费者@reference就一直NullPointerException了

消费者先启动，提供者后启动，消费者@reference就一直NullPointerException了

这个问题太重要了    不然失去了  注册的意义

改造Dubbo，使其能够兼容Spring 4注解配置
https://my.oschina.net/roccn/blog/847635

解决了
还是得多看看源码就懂了

你好，请问您是怎么解决的，可以分享一下吗？ @15174834
我看到别的地方说在application.properties添加下面这条spring.dubbo.consumer.check=false可是并没有效果。

repo: teaey/spring-boot-starter-dubbo


text:
[Bug] Short Bug Description

Bug Category

[ ] Credential Login
[ ] Token Login
[ ] Local Audio Issue
[ ] Remote Audio Issue
[ ] Audio Device Switching
[ ] Mute / Unmute
[ ] Hold / Unhold
[ ] Performance issues
[x] Other

SDK Version
implementation 'com.github.team-telnyx:telnyx-webrtc-android:v1.2.12-alpha'
Describe the bug
The activity is not in the display state. After the mobile phone presses the home button, the mobile phone screen is on the home page. At this time, the SocketObserver does not return information. Only when the activity is displayed again, the information can be received.
Expected behaviour
In the non-display state of the activity, SocketObserver can return information normally
To Reproduce
Use the Git demo
Android Device (please complete the following information):

Emulator: (false)
Android Device: [SM-G9500]
Android Version: [ android 9 ]

Logs

Hi @tongsoftinfo
I will look into this. You should still receive socket messages even in the background, however the OS can sometimes kill this process (after an extended period of time). Does this happen immediately for you when the app is in the background? Or after some time?
Generally, when the OS kills this process, you should receive a Push Notification instead.

The background socket message has information, but onMessageReceived does not return information. In the telnyx_rtc.ringing state, it can be in the background. After a period of time, you can see that the socket message has telnyx_rtc.answer information, but onMessageReceived does not return the status information of telnyx_rtc.answer

This happens immediately when in the background

Okay, I will investigate and update this ticket.

The MediaPlayer in TelnyxClient.kt does not use release() at the end, only stop() and reset(), is this situation correct?

The same MediaPlayer instance is overwritten each time it is used, I don't believe release is necessary however I can test if adding it causes any issues.
Are you experiencing any issues relating to this?

app acquires a partial wake lock by calling acquire() with the PARTIAL_WAKE_LOCK flag. A partial wake lock becomes stuck if it is held for a long time while your app is running in the background (no part of your app is visible to the user). This information is the suggestion that Google returned to our APP. After I checked the corresponding code, I found this situation, so I asked your opinion on this. This is the document address given by Google :  https://developer.android. com/topic/performance/vitals/wakelock

Okay, I will look into this on top of the background related stuff

@tongsoftinfo in relation to the MediaPlayer release, we have an open PR here:
https://github.com/team-telnyx/telnyx-webrtc-android/pull/189
I will release a new version when it is reviewed and let you know here.

@tongsoftinfo we have released a version that releases the MediaPlayer. You can see the PR here:
https://github.com/team-telnyx/telnyx-webrtc-android/pull/189
This is available in the SDK here:
https://jitpack.io/#team-telnyx/telnyx-webrtc-android/v1.2.15-alpha
In regards to your original bug report. In testing I realized what you were describing. Messages come in the socket and the ringtone will play, but onMessageReceived is not fired. I initially thought you were talking about the socket receiving messages in general.
This is not a bug, and isn't something we will attempt to fix. This is actually how LiveData and MVVM works.
LiveData won't get new values if there isn't an active Observer and observers get paused when your application is minimized (they are lifecycle dependent). This is okay though because once the app is moved back to the foreground, the observer becomes active again and receives the latest posted data. This is how LiveData and Observers work.
This should be okay though, the SDK will ring and notify the user they are receiving a call (as long as a ringtone is set) and the activity will update immediately when resumed. I'm not sure why you would want the UI to update while the activity is not visible.
If you are developing your own app, there are a few things you can do here to make this more streamlined. You could look into using the ConnectionService to integrate with native OS Call UI (This is out of scope for an MVP sample app though) or alternatively an easier method would be to manually disconnect whenever the user enters the background so that they receive a Push Notification instead when the app is in the background (if you have set this up with the guide in the docs)
https://developers.telnyx.com/docs/v2/webrtc/push-notifications?lang=android

Some users are accustomed to placing the application in the background after making a call, and then using other applications, but in this case, LiveData has no information transmission, and cannot automatically perform the next operation. Place the front desk to operate, such a user experience is a very poor feeling

I have found the corresponding processing method, I will use mTelnyxClient.getSocketResponse().observeForever() for the corresponding operation

The SDK is still receiving socket messages and working in the background. The only thing that is not updating is the UI which is okay because it is in the background. Once the app is resumed the UI will immediately update. There is no poor user experience because there is nothing for the user to experience while it is in the background.
However, if .observeForever() works in your specific use case then that's great. Remember to manually remove the observer when you clear the view model though.

authors: Oliver-Zimmerman tongsoftinfo

repo: team-telnyx/telnyx-webrtc-android


text:
[#169988099] Vulnerable packages upgrade

This PR aims to remove the detected vulnerability issues by upgrading the vulnerable packages.

Affected stories

⚙ #169988099: Aggiornare i package del backend che presentano vulnerabiltà di sicurezza

  Generated by :no_entry_sign: dangerJS against fc576b92761c8f3ecdb9dff74f446cca4d173f80

authors: alexgpeppe digitalcitizenship

repo: teamdigitale/io-onboarding-pa-api


text:
🛑 API is down

In 753be1d, API (https://api.staging.greyfinch.com/healthz) was down:

HTTP code: 503
Response time: 74 ms

Resolved: API is back up in 75afc22.

repo: teamgreyfinch/staging-status


text:
Middleware should be able to take a 0 arity functions as arguments

For instance:
defmodule MyApp.Endpoint do
  use Tesla

  plug(Tesla.Middleware.BaseUrl, &hostname/0)

  def hostname, do: MyApp.Config.api_hostname()

  ...
end

Yes but with a Config module that pulls values dynamically from the env it will use the value from the first module eval

Are you 100% sure? :)

Yes

That's not true. It takes Elixir AST not evaluated value. Your function will be evaluated in runtime.
Example
defmodule Middleware do
  @behaviour Tesla.Middleware

  @impl true
  def call(env, next, opts) do
    IO.inspect(opts, label: "TEST")

    Tesla.run(env, next)
  end
end

defmodule Test do
  use Tesla

  plug Middleware, test()

  defp test do
    Process.get(:test)
  end
end

iex(1)> Test.get("http://example.com") |> elem(0)
TEST: nil
:ok
iex(2)> Process.put(:test, 2)
nil
iex(3)> Test.get("http://example.com") |> elem(0)
TEST: 2
:ok
iex(4)> Process.put(:test, :ok)
2
iex(5)> Test.get("http://example.com") |> elem(0)
TEST: :ok
:ok

Technically the issue i'm running into is with the adapter macro (which more or less looks the same as the plug macro) using:
defmodule Repo do
  use Tesla
  adapter Tesla.Adapter.Hackney, ssl_options()

  def ssl_options do
    [ssl_options: [
        certfile: Config.api_ssl_certfile(),
        password: Config.api_ssl_password(),
        versions: [:"tlsv1.2"]]]
  end
end

@sitch I still don't know what exactly is your issue.
As my example shows and @amatalai's one proved you can specify a function call and it will be evaluated on every request.

This is also not true for adapter macro
defmodule Test do
  use Tesla

  adapter Tesla.Adapter.Hackney, test()

  defp test do
    IO.inspect(Process.get(:test), label: "RUNTIME")

    []
  end
end

iex(1)> Test.get("http://example.com") |> elem(0)
RUNTIME: nil
:ok
iex(2)> Process.put(:test, 1)
nil
iex(3)> Test.get("http://example.com") |> elem(0)
RUNTIME: 1
:ok
iex(4)> Process.put(:test, :ok)
1
iex(5)> Test.get("http://example.com") |> elem(0)
RUNTIME: :ok
:ok

Are you sure that this Config module is working properly?

The Config calls are simple Application.get_env/3 calls
I was migrating an already working production implementation in HTTPoison to Tesla with hackney and this breaks non-async tests.  I'll look into this more on my end, but after the examples you gave you should be able close this ticket.

authors: amatalai sitch teamon

repo: teamon/tesla


text:
Make Fuse return original error when circuit is closed

Problem
Fuse middleware is returning {:error, :unavailable} when circuit is open (expected)
https://github.com/teamon/tesla/blob/master/lib/tesla/middleware/fuse.ex#L58
But also when the call has failed, hidden the original error.
https://github.com/teamon/tesla/blob/master/lib/tesla/middleware/fuse.ex#L73
I think it would be interesting to return the original error or maybe include a third element in the tuple including the original element.
For me, it's interesting to know when the circuit is open and the request never takes place, and know when the call has been performed with error as result.
Timeout middleware integration
I ask for this after using Timeout and Fuse middlewares. For me, it makes sense to keep the order Fuse -> Timeout, so that if there is a timeout error, Fuse is aware of this when calculating its circuit status. But doing it, the original {:error, :timeout} is hidden by Fuse, returning {:error, :unavailable}. And I'd like to know that timeout was the original problem.

Another point I've realised is that, if Tesla gets a 5xx error it returns {:ok, %Tesla.Env{status: 5xx} and it seems it's taken by Fuse as a successful response. So, it's not considered to melt the fuse. That is, to open the circuit.
Is it right? If so, is it the expected behaviour for a circuit breaker?
And maybe even http status 429 (Too many requests) should be considered by Fuse?
Thanks!

It's impossible to have one-size-fits-all answer for "to melt or not to melt".
For the same reasons Retry middleware exposes (should_retry function](https://github.com/teamon/tesla/blob/master/lib/tesla/middleware/retry.ex#L32), Fuse middleware could use the same.

Yes! It was just was I was about to propose. Having an optional configuration to let the client decide which http status you want to consider to melt.
If you agree, I'll submit an MR containing this proposal.
Not sure if do exactly the same as Retry of just passing a list of http status codes 🤔

Let's do the same as in Retry for consistency (also list of http status codes might not be enough)

Sure! It was just to make the clients simpler. But let's do the same way as Retry for consistency, yes :)

BTW, one thing is when the request should be melt according to the response (solved doing the same as Retry). And different one is what should we return if it happens. That's the original question of this issue.
For me, it makes sense to return the original error even it has been selected to melt. And only return specific circuit breaker error when it's open.
Because having another function as param to decide when to return original response is too much.
What do you think?

To clarify, this existing test would be:
test "unavailable endpoint" do
    assert {:error, :econnrefused} = Client.get("/unavailable")
    assert_receive :request_made
    assert {:error, :econnrefused} = Client.get("/unavailable")
    assert_receive :request_made
    assert {:error, :econnrefused} = Client.get("/unavailable")
    assert_receive :request_made

    assert {:error, :unavailable} = Client.get("/unavailable")
    refute_receive :request_made
    assert {:error, :unavailable} = Client.get("/unavailable")
    refute_receive :request_made
  end

The only drawback I see here is that it wouldn't be backward compatible, would it?
Unless we add a parameter to decide if we want to keep the original response when the circuit is close, keeping the current behaviour as default one.
IMHO, it should be the right behaviour. I want my response unless you don't perform the request because the circuit is open.

I don't see this as a huge backwards compatibility issue - let's go with this change.

authors: asniaire teamon


text:
'Timed out waiting for response' since Rails 4.2.0

While all my tests are passing with Rails 4.1.9, upgrading (only) Rails to 4.2.0 make all my tests failing with the following error:
Timed out waiting for response to {"name":"visit","args":["http://127.0.0.1:33290/"]}. It's possible that this happened because something took a very long time (for example a page load was slow). If so, setting the Poltergeist :timeout option to a higher value will help (see the docs for details). If increasing the timeout does not help, this is probably a bug in Poltergeist - please report it to the issue tracker. (Capybara::Poltergeist::TimeoutError)

I have tried to analyse which processes are running or the open ports in both cases but I can't figure out why it's not working.

Is there any way how to reproduce this?

I guess a fresh Rails application should be enough as I really encounter this issue just by upgrading Rails only.

Check it's not asset compilation taking ages: try doing a
RAILS_ENV=test rake assets:precompile

before running your tests. Worked for us.

@chuckd it was a clever trick but it doesn't fix my issue. I have also try to remove the public/assets folder in order to check if it is recreated while running my tests but it doesn't.

I barely think poltergeist is related

I'm trying to reproduce this with fresh rails applications (Version 4.1.9 and 4.2.0).

You may be running into a concurrency issue - rails 4.2 changed to not allowing concurrency in the default test environment setup (by injecting Rack::Lock into the middleware stack https://github.com/rails/rails/commit/112077c255879351edf4530791cc4bcc7bd4005b ), you can set config.allow_concurrency = true  in your test.rb to get back to the previous behavior although there are potential constant loading issues.

Thank you @twalpole for the suggestion but it's not working :(

@zedtux what about barebone application? Does it work?

@route I tried during half an hour to build a new Rails 4.1.9 and 4.2.0 application and wasn't able to reproduce the issue. It obviously need more time on order to integrates more and more the tools I'm using ... Like devise first.
I should try to find some time in my life to extend more and more this from-scratch-project in order to reproduce the bug.

@chuckd you should be right. I have the capybara-screenshot gem installed and when it's failing with the timeout error, and I open the print screen, I see the home page but with a lot of missing CSS.
As I'm using Docker (and Fig) the command should be integrated in my Dockerfile so I'm trying this...

Adding the following to the env.rb file make it working:
Capybara.register_driver :poltergeist do |app|
  Capybara::Poltergeist::Driver.new(app, timeout: 10000)
end

It's taking quite long time on the first visit call and then working. I have tried with calling rake assets:precompile in my Dockerfile but it's not working. The assets are generated but it is still taking a long time before to start.

So based on my previous comment, I guess we should close this issue and I should open a new one in the Rails project, right ?
(To try to determine what has changed which has increased the boot time)

Sounds correct to me, also try to run application in test env in order to debug or maybe play with environment/test.rb settings, because we have 4.2 application and it just works.

I did it. I've tried the solution from @twalpole, I tried to disable the asset compilation and so on but nothing worked.
I have also copy/past the environment/test.rb file from a fresh rails 4.2 application.
Do you have an example of Rails 4.2 environment/test.rb file ?

Well adding the following to the config/environments/test.rb make it no more waiting:
config.assets.compile = false

But then all scenario fail with:
No route matches [GET] "/assets/application.css" (ActionController::RoutingError)

So it's really about the assets...

My conf is standard. What if you precompile assets and set compile = false?

What if you precompile assets

As I'm using Docker (with Fig) I need to figure out how to do it. I will keep you informed.

@zedtux too much abstraction layers nowadays :)

@route it's fine for me... RVM or Docker is the same : )

authors: chuckd route simi twalpole zedtux

repo: teampoltergeist/poltergeist


text:
Convert README badge to SVG

Because raster badges make eyes bleed :sunglasses:

Thanks


text:
Api has been offline since yesterday evening "ERR_TUNNEL_CONNECTION_FAILED"

@lukvxx The API has been shut down due to lack of funds. I've created an alternative that runs on free hosting here: https://github.com/nfelger/gesetze-aus-dem-internet (hosted at https://gadi.netlify.app/)

@nfelger Sad to hear. I will look into hosting my own service. Thank you :)

authors: lukvxx nfelger


text:
Bug while creating new transaction from customer to credit note

[x]  creating new credit note from customer-error(reason id is required)

ISSUE FIXED!

repo: techgebra/polosys-books

license: Unlicense


text:
Copy update to Thank you page + add Fb buttons

sub-copy update:
Thank you for making calls for change. You have made a difference and your representatives will take notice. Now, spread the word!
[fb buttons]

https://github.com/technologists-for-progress/callsforchange/pull/82

authors: daybowbow jontg


text:
Request for 'circledsteps.sty' package

The rather new package circledsteps.sty (https://ctan.org/pkg/circledsteps) is missing in the bundle.
It would be nice if this could be added to the next version.

Thanks for asking! I'm currently working on updating to TeXLive 2020.0, so I'll see if I can add it as part of that. (Part of that update is/was the creation of this new repo for managing the bundle creation.)

authors: pkgw valkum


text:
default location overrides location specified via drag and drop

Hi,
At first, a very nice and simple extension but I got a little bug here, I believe.
When I drag a tab into the bookmarks sidebar and drop it at some folder "x" the bookmark always appears in the specified default bookmark location "y".
Drag and drop works as expected when "Override default location" setting is turned off.
FF 57.0 linux

Hello! Thank you for reporting this problem! And sorry I took a while to respond, I have been busy with life recently. 😃
You are not the first one to experience this issue, and it actually also happens when using the "Bookmarks All Tabs..." feature. In both cases, this behavior was due to the way I was handling the newly created bookmarks.
I have fixed this problem in a recent commit (ec106f5). I am planning to publish a new version on AMO (probably this week-end) that will include this fix. I will post here again when I do so!
Again, thank you for your help! 👍

I have just published the version 2.1.0 on AMO that should fix this problem. Please let me know if you are still experiencing issues after the update to the new version!

I am currently able to reproduce this bug in Firefox 71.0 running Default Bookmark Folder 2.10.1

Thanks for reporting this @SebiderSushi!
I was able to reproduce the issue, but only with the "Bookmarks Menu" or the "Other Bookmarks" folder. The other folders were behaving as expected.
After more digging, I have created a dedicated issue #136 regarding this problem. Unfortunately, this is not something I am able to fix for now (please refer to the issue for all the details).
While investigating this, I have also found another similar bug with manually created bookmarks via the bookmark sidebar or library context menu. They were being moved to the default bookmark location configured in the add-on settings. This has been solved by the recent commit cb1e8f7 and will be released with the next version of the add-on (which should hopefully be available next week).
If you are experiencing issues with the drag and drop on the bookmark sidebar with other folders than "Bookmarks Menu" or "Other Bookmarks", please feel free to open a new issue. 🙂

Thank you for your time and your explanations!

authors: SebiderSushi teddy-gustiaux tmalch

repo: teddy-gustiaux/default-bookmark-folder


text:
Current and future state of the project

It has been some time since I shared news about this project, and since the last release. This post intends on providing you with a quick update on both items.
TL;DR:

The project is not abandoned. A new major version 4.0.0 is coming soon, with a number of fixes and improvements. :rocket:
Development efforts on the project will continue (albeit at a pace that is compatible with my available time as the sole maintainer), and the priority will be given to bug fixes and quality-of-life improvements.

The last release of the add-on was back in 2021, on the heels of the internal bookmarking changes that happened back then in Firefox (see issue 399 for more details). This project is something I maintain in my spare time, and since that last release, it was difficult to find time to work on it. This was not made any easier by the fact that trying to resolve the issues introduced with these changes would be quite an involved task.
Thankfully, I eventually reached a solution that I considered reliable enough to bring to a public release. While the new system is not perfect, and will never be, a lot of work has been put in to rewrite the internal add-on logic to try and address issues introduced with the 3.x branch of the add-on (themselves related to the Firefox internal bookmarking changes aforementioned).
I consider the project to be mostly feature-complete at this point. While I may consider new features, my priority will be on bug fixes and quality-of-life improvements. I would also like to offer some of the capabilities of the add-on via their own standalone extension, as not everybody is interested in all of the features (I have started with quick-bookmarking last year). All of this will be happening at a pace that is compatible with my available time as the sole maintainer- hopefully with more regular releases.
Finally, I hope you will find this new version to be a positive improvement. Thank you for your continued interest and support! I will be updating this when the 4.0.0 version is submitted for review to Mozilla and published.

Update: version 4.0.0 has been submitted to Mozilla for review.

Update: version 4.0.0 was reviewed and approved by Mozilla, and has been published on AMO. The update should gradually happen automatically for users, or you can force it manually.

The drag and drop bug is still requiring me to remain on version 2.13.0, which still does not contain that bug. Apparently it's been decided that people who drag and drop into folders to organize their bookmarks are space aliens, and there's a limit to how much I can complain about something free, so I guess I just hope someone will eventually fork the working version and backport any important updates.

authors: nuenuewei teddy-gustiaux


text:
Remote plan with an invalid url gives a traceback

Reproducible easily:
plan:
    import:
        url: https://some.weird.url/

Exploring the tree with tmt gives:
Traceback (most recent call last):
  File "/home/psss/.virtualenvs/tmt/bin/tmt", line 7, in <module>
    exec(compile(f.read(), __file__, 'exec'))
  File "/home/psss/git/tmt/bin/tmt", line 20, in <module>
    tmt.cli.main()
  File "/home/psss/.virtualenvs/tmt/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/home/psss/.virtualenvs/tmt/lib/python3.10/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/home/psss/.virtualenvs/tmt/lib/python3.10/site-packages/click/core.py", line 1637, in invoke
    super().invoke(ctx)
  File "/home/psss/.virtualenvs/tmt/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/psss/.virtualenvs/tmt/lib/python3.10/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/psss/.virtualenvs/tmt/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/psss/git/tmt/tmt/cli.py", line 148, in main
    tmt.Plan.overview(tree)
  File "/home/psss/git/tmt/tmt/base.py", line 1218, in overview
    style(str(plan), fg='red') for plan in tree.plans()]
  File "/home/psss/git/tmt/tmt/base.py", line 2120, in plans
    return [plan.import_plan() or plan for plan in plans]
  File "/home/psss/git/tmt/tmt/base.py", line 2120, in <listcomp>
    return [plan.import_plan() or plan for plan in plans]
  File "/home/psss/git/tmt/tmt/base.py", line 1616, in import_plan
    node = fmf.Tree.node(
  File "/home/psss/git/fmf/fmf/base.py", line 634, in node
    tree = utils.fetch_tree(
  File "/home/psss/git/fmf/fmf/utils.py", line 653, in fetch_tree
    repository = fetch_repo(url, ref)
  File "/home/psss/git/fmf/fmf/utils.py", line 774, in fetch_repo
    raise FetchError("{0}".format(error), error)
fmf.utils.FetchError: Command 'git clone https://some.weird.url/ /home/psss/.cache/fmf/https:__some.weird.url_' returned non-zero exit status 128.

@adiosnb, interested to look into this?

Is this issue about gracefully skipping a plan with an invalid URL?

I'd say correctly terminating run with a nice error message.

authors: adiosnb lukaszachy psss

repo: teemtee/tmt


text:
Unexpected event 'FlagsChanged' when using complex-modifications for vim mode

This is my config:
{
    "global": {
        "check_for_updates_on_startup": true,
        "show_in_menu_bar": false,
        "show_profile_name_in_menu_bar": false
    },
    "profiles": [
        {
            "complex_modifications": {
                "rules": [
                    {
                        "manipulators": [
                            {
                                "description": "Change left_control + hjkl to arrow key",
                                "from": {
                                    "key_code": "h",
                                    "modifiers": {
                                        "mandatory": [
                                            "left_control"
                                        ],"optional":["any"]
                                    }
                                },
                                "to": [
                                    {
                                        "key_code": "left_arrow"
                                    }
                                ],
                                "type": "basic"
                            },
                            {
                                "description": "Change left_control + hjkl to arrow key",
                                "from": {
                                    "key_code": "j",
                                    "modifiers": {
                                        "mandatory": [
                                            "left_control"
                                        ],"optional":["any"]
                                    }
                                },
                                "to": [
                                    {
                                        "key_code": "down_arrow"
                                    }
                                ],
                                "type": "basic"
                            },
                            {
                                "description": "Change left_control + hjkl to arrow key",
                                "from": {
                                    "key_code": "k",
                                    "modifiers": {
                                        "mandatory": [
                                            "left_control"
                                        ],"optional":["any"]
                                    }
                                },
                                "to": [
                                    {
                                        "key_code": "up_arrow"
                                    }
                                ],
                                "type": "basic"
                            },
                            {
                                "description": "Change left_control + hjkl to arrow key",
                                "from": {
                                    "key_code": "l",
                                    "modifiers": {
                                        "mandatory": [
                                            "left_control"
                                        ],"optional":["any"]
                                    }
                                },
                                "to": [
                                    {
                                        "key_code": "right_arrow"
                                    }
                                ],
                                "type": "basic"
                            }
                        ]
                    }
                ]
            },
            "devices": [
                {
                    "disable_built_in_keyboard_if_exists": true,
                    "identifiers": {
                        "is_keyboard": true,
                        "is_pointing_device": false,
                        "product_id": 34050,
                        "vendor_id": 2652
                    },
                    "ignore": false
                },
                {
                    "disable_built_in_keyboard_if_exists": true,
                    "identifiers": {
                        "is_keyboard": true,
                        "is_pointing_device": false,
                        "product_id": 256,
                        "vendor_id": 2131
                    },
                    "ignore": false
                }
            ],
            "fn_function_keys": {
                "f1": "display_brightness_decrement",
                "f10": "mute",
                "f11": "volume_decrement",
                "f12": "volume_increment",
                "f2": "display_brightness_increment",
                "f3": "mission_control",
                "f4": "launchpad",
                "f5": "illumination_decrement",
                "f6": "illumination_increment",
                "f7": "rewind",
                "f8": "play_or_pause",
                "f9": "fastforward"
            },
            "name": "hyper + arrow",
            "selected": true,
            "simple_modifications": {
                "caps_lock": "left_control"
            },
            "virtual_hid_keyboard": {
                "caps_lock_delay_milliseconds": 0,
                "keyboard_type": "ansi"
            }
        }
    ]
}

When I use CTRL-J/CTRL-K, things goes fine, event log:
eventType:FlagsChanged    code:0x3b       name:left_control    flags:Ctrl                               misc:
eventType:FlagsChanged    code:0x3b       name:left_control    flags:                                   misc:
eventType:KeyDown         code:0x7d       name:down_arrow      flags:NumPad Fn                          misc:
eventType:KeyDown         code:0x7d       name:down_arrow      flags:NumPad Fn                          misc:
eventType:KeyDown         code:0x7d       name:down_arrow      flags:NumPad Fn                          misc:
eventType:KeyDown         code:0x7d       name:down_arrow      flags:NumPad Fn                          misc:
eventType:KeyDown         code:0x7d       name:down_arrow      flags:NumPad Fn                          misc:
eventType:KeyDown         code:0x7d       name:down_arrow      flags:NumPad Fn                          misc:
eventType:KeyDown         code:0x7d       name:down_arrow      flags:NumPad Fn                          misc:
eventType:KeyDown         code:0x7d       name:down_arrow      flags:NumPad Fn                          misc:
eventType:KeyDown         code:0x7d       name:down_arrow      flags:NumPad Fn                          misc:
eventType:KeyUp           code:0x7d       name:down_arrow      flags:NumPad Fn                          misc:

But when I use CTRL-H/CTRL-L, things goes different:
eventType:FlagsChanged    code:0x3b       name:left_control    flags:Ctrl                               misc:
eventType:FlagsChanged    code:0x3b       name:left_control    flags:                                   misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:NumPad Fn                          misc:
eventType:FlagsChanged    code:0x3b       name:left_control    flags:Ctrl                               misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:Ctrl NumPad Fn                     misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:Ctrl NumPad Fn                     misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:Ctrl NumPad Fn                     misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:Ctrl NumPad Fn                     misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:Ctrl NumPad Fn                     misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:Ctrl NumPad Fn                     misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:Ctrl NumPad Fn                     misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:Ctrl NumPad Fn                     misc:
eventType:KeyUp           code:0x7b       name:left_arrow      flags:Ctrl NumPad Fn                     misc:
eventType:FlagsChanged    code:0x3b       name:left_control    flags:                                   misc:

An FlagsChanged event unexpectedly happened and set the follow-up events with modifier 'Ctrl'.
I dont know whether it's a config mistake or a bug for karabiner. I need help...

Seems an unexpected 'Ctrl' flag change has taken place after 'H' key down, which makes long pressing 'H' key with unexpected 'Ctrl' modifier.

Another mistake:
When I type and holding CTRL-J or something like this to perform arrow actions, If I stop pressing CTRL, it continues to perform arrow actions instead of inputing 'J':
eventType:FlagsChanged    code:0x3b       name:left_control    flags:Ctrl                               misc:
eventType:FlagsChanged    code:0x3b       name:left_control    flags:                                   misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:NumPad Fn                          misc:
eventType:FlagsChanged    code:0x3b       name:left_control    flags:Ctrl                               misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:Ctrl NumPad Fn                     misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:Ctrl NumPad Fn                     misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:Ctrl NumPad Fn                     misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:Ctrl NumPad Fn                     misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:Ctrl NumPad Fn                     misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:Ctrl NumPad Fn                     misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:Ctrl NumPad Fn                     misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:Ctrl NumPad Fn                     misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:Ctrl NumPad Fn                     misc:
eventType:FlagsChanged    code:0x3b       name:left_control    flags:                                   misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:NumPad Fn                          misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:NumPad Fn                          misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:NumPad Fn                          misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:NumPad Fn                          misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:NumPad Fn                          misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:NumPad Fn                          misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:NumPad Fn                          misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:NumPad Fn                          misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:NumPad Fn                          misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:NumPad Fn                          misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:NumPad Fn                          misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:NumPad Fn                          misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:NumPad Fn                          misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:NumPad Fn                          misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:NumPad Fn                          misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:NumPad Fn                          misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:NumPad Fn                          misc:
eventType:KeyDown         code:0x7b       name:left_arrow      flags:NumPad Fn                          misc:
eventType:KeyUp           code:0x7b       name:left_arrow      flags:NumPad Fn                          misc:

I think this makes vim-mode absolutely unusable. Hope for fixing this.

Ctrl + HJKL are default macOS shortcuts. Would it help, if you use Fn + HJKL as arrow keys, and then make the letter S to be recognized as Fn if pressed alone?
This way you can use S + HJKL as arrow keys. This is actually the vi-mode on the old Karabiner.

Sweet, I was having the exact same problem and this seems to have fixed it for me.

Since version 0.91.5 is shipped, I've implemented a Vi mode for KE that can be directly imported into the app, which works fine.
http://yige.ch/vi-mode-for-karabiner-elements/

authors: apm1467 johnlindquist kyangc

repo: tekezo/Karabiner-Elements

license: unlicense


text:
Add structural OpenAPI schema to Tekton CRDs

Kubernetes 1.15 introduced structural OpenAPI schema which helps with validation, supporting kubectl explain and also building tools around it:
Structural schema should be added for all CRDs introduced by Tekton.

This PR is related: https://github.com/tektoncd/pipeline/pull/1179

Is this something that can be easily generated using existing tooling? I'm a bit worried we'll end up with structs and YAML validation out of sync, and I'm also a bit uncomfortable with maintaining code to generate one from the other. Is there something OpenAPI provides for this?

/kind feature
/kind question

/remove-lifecycle rotten
/remove-lifecycle stale
/reopen

/reopen
/lifecycle frozen
It would be still nice to be able to tackle this.

knative does this now, one try is available here : https://github.com/tektoncd/pipeline/compare/main...vdemeester:schema-gen.
The limitation, as of today, is that it doesn't work with multiple version CRDs (such as ours), it panics..

I've started playing around with this, and narrowed down the panic to something thinking the package github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1 should have a kind Pipeline in it. I haven't yet figured out why the heck it's thinking that, though.

I'm pretty sure there's something weird about our CRDs and/or our packages resulting in this...

EDIT AGAIN: My description of the problem may not be right, but I just tested and verified that if I just put config/300-task.yaml in config/300-resources/ and remove the v1alpha1 version from it, hack/update-schemas.sh works, but if I instead remove v1beta1 from 300-task.yaml, it fails. So it's not the multiple versions of a particular CRD that's the problem, it's definitely something with there being multiple v1alpha1 packages, because I can create the same failure by copying config/300-run.yaml (which only has a v1alpha1 version) in instead. I will continue digging tomorrow.

Arg.. I don't like that 😝… Seems like it's a bit too "tightly" coupled to the assumption that you put all your type in the same package.. 😅

PR opened for that fix - https://github.com/kubernetes-sigs/controller-tools/pull/627 - I'm now trying to determine if we need to filter some fields out, like the knative-specific branch does. I think at a minimum we need to only take the Spec field of PersistentVolumeClaim (used in the VolumeClaimTemplate field of WorkspaceBinding), since we definitely don't need the TypeMeta, ObjectMeta, or Status of PersistentVolumeClaim in the schema. The other corev1 types that could possibly need filtering are corev1.Container and corev1.Volume, but we need many fields in corev1.Volume, and I think we're ok with everything in corev1.Container.
So yeah, if we do need that filtering, we'll need a change to schemapatch to do what the knative-specific branch does in terms of allowing you to specify "only use these fields (or exclude these fields) in the schema for this type". I'll get going on that tomorrow.

/assign @abayer

Well, https://github.com/kubernetes-sigs/controller-tools/pull/627#issuecomment-931355857 - our layout is awfully nonstandard, and the not-unreasonable response from the maintainer is asking if we can restructure things rather than make a change to schemapatch. I think we could solve this by moving everything in pkg/apis/resource/v1alpha1 and pkg/apis/run/v1alpha1 into pkg/apis/pipeline/v1alpha1 - no changes to CRDs needed, just rearranging the packages. That said, I'm not sure what other possible ramifications could come out of doing that.

Started playing around with what would be involved in moving pkg/apis/resource/v1alpha1 and pkg/apis/run/v1alpha1 and...well, so far, I don't think it's viable without mucking up our types pretty thoroughly.

They are in separate packages because of « loop dependency ». We may want to go ahead and reorganize that by duplicating some code and make v1alpha1 and v1beta1 completely independent of each other (code wise) which could be beneficial for the future anyway 😇

I want to add that the OpenAPI schema also is really handy for users.  I tend to use kubectl explain for CRD to understand what fields are available and what they mean.  For Tekon CRs the result is rather uninformative.
$ kubectl explain tasks
KIND:     Task
VERSION:  tekton.dev/v1beta1

DESCRIPTION:
     <empty>

Compare the above to one that has a OpenAPI schema.  You can drill down into the spec as far as you like.
$ kubectl explain podmonitors
KIND:     PodMonitor
VERSION:  monitoring.coreos.com/v1

DESCRIPTION:
     PodMonitor defines monitoring for a set of pods.

FIELDS:
   apiVersion   <string>
     APIVersion defines the versioned schema of this representation of an
     object. Servers should convert recognized schemas to the latest internal
     value, and may reject unrecognized values. More info:
     https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

   kind <string>
     Kind is a string value representing the REST resource this object
     represents. Servers may infer this from the endpoint the client submits
     requests to. Cannot be updated. In CamelCase. More info:
     https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

   metadata     <Object>
     Standard object's metadata. More info:
     https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata

   spec <Object> -required-
     Specification of desired Pod selection for target discovery by Prometheus.

if we're not going to get common recipes for Tekton, we really need the autocomplete in our editors

/unassign

OpenAPI schemas will also help with managing Tekton through Terraform - without them Terraform doesn't know how to ignore the release annotation in a taskrun which causes Terraform to constantly want to destroy and create the manifest.

Just want to second this. Managing Tekton resources with kubernetes_manifest in Terraform is a world of pain due to the lack of a schema. kubectl_manifest is a workaround, but it has its own problems.

Adding my voice here, today, that I was looking for this documentation and discovered that not only was the structural schema missing, but there's also no standard Open-API generated schema documentation, only by-hand documentation which doesn't document (for example) status fields in a consistent way.

authors: ImJasonH abayer doctorpangloss evankanderson jbg ktarplee siamaksade vdemeester

repo: tektoncd/pipeline


text:
TaskRun Fails to Create Pod When ServiceAccount References Non-Existent Secret

Expected Behavior
When repairing a ServiceAccount that includes a reference to a non-existent secret, I expect the TaskRun to issue a warning and proceed with the creation of the Pod, similar to Kubernetes’ behavior of handling missing imagePullSecrets within a Pod’s service account configuration.
Log a warning if a ImagePullSecrets does not exist
Actual Behavior
Currently, if a ServiceAccount is referenced by a TaskRun and contains a non-existent secret, the TaskRun fails to create the associated Pod and results in an error.
Steps to Reproduce the Problem

Execute the following script:

kubectl apply -f - <<EOF
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: taskrun-sa
secrets:
- name: not-exist
---
apiVersion: tekton.dev/v1
kind: TaskRun
metadata:
  name: test-sa-has-not-found-secret
spec:
  serviceAccountName: taskrun-sa
  taskSpec:
    description: |
      A simple task that prints the date.
    steps:
      - name: echo
        image: bash:latest
        script: |
          #!/usr/bin/env bash
          echo "Hello, world!"
status:
  conditions:
  - message: 'failed to create task run pod "test-sa-has-not-found-secret": translating
      TaskSpec to Pod: secrets "not-exist" not found. Maybe invalid TaskSpec'
    reason: PodCreationFailed
    status: "False"
    type: Succeeded
EOF

Additional Info

Kubernetes version:
Output of kubectl version:

Client Version: v1.29.3
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.28.8

Tekton Pipeline version:
Output of tkn version or kubectl get pods -n tekton-pipelines -l app=tekton-pipelines-controller -o=jsonpath='{.items[0].metadata.labels.version}'

Client version: 0.35.1
Pipeline version: v0.57.0

/assign @l-qing

@l-qing I understand the idea of keeping it "consistent" with Kubernetes, but I think it may also be valid to error out. If the user specified a secret, and the secret is not present, then the "credential" handling (via service account) will fail or not work, and a warning (through events) is usually harder to find for users than their TaskRun or PipelineRun to fail…
I wonder what use-case this would cover (there is probably valid ones).
cc @tektoncd/core-maintainers

I wonder what use-case this would cover (there is probably valid ones).
cc @tektoncd/core-maintainers

In our environment, there are other controllers that synchronize secrets across multiple clusters and associate them with related service accounts. Sometimes it involves adding secrets, and sometimes it involves deleting them. I am not sure if the sequence of operations ensures that the secret exists before updating the service account, or if it removes the secret from the service account before deleting the secret.
However, the phenomenon I have encountered is that the pipeline TaskRuns intermittently fail due to the absence of certain credentials on some service accounts. This kind of problem is just a warning on the created k8s Pods and does not lead to an actual failure. I am also not sure if this issue is caused by the Tekton cache client not updating in a timely manner.

authors: l-qing vdemeester


text:
Bump knative.dev/pkg to 528ad1c 🔥

Changes
This brings some change on how to create the webhook, alongside import
change related to the injection packages.
One of the reason to do that, is to be able to update the k8s dependency in a cleaner way :angel: (otherwise it's gonna be hell to review I think :sweat_smile: )
Signed-off-by: Vincent Demeester vdemeest@redhat.com
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:

[ ] Includes tests (if functionality changed/added)
[ ] Includes docs (if user facing)
[x] Commit messages follow commit message best practices

See the contribution guide for more details.
Double check this list of stuff that's easy to miss:

If you are adding a new binary/image to the cmd dir, please update
the release Task to build and release this image.

Reviewer Notes
If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.

/cc @afrittoli @abayer

Will remove the hold once 0.8 is released :wink:

/hold cancel


text:
fix: panic may occur when calculating the final task timeout waiting time

When I was troubleshooting this issue: #7185, I also found another problem. Determining the final task timeout waiting time may cause panic
If you set the pipelinerun finally timeout and also set the pipeline timeout to 0s, this will cause the program to panic.
Changes
This commit no functional changes, it will avoid the panic caused by the above scenario.

Submitter Checklist
As the author of this PR, please check off the items in this checklist:

[x] Has Docs if any changes are user facing, including updates to minimum requirements e.g. Kubernetes version bumps
[x] Has Tests included if any functionality added or changed
[x] Follows the commit message standard
[x] Meets the Tekton contributor standards (including functionality, content, code)
[x] Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
[ ] Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings). See some examples of good release notes.
[ ] Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes
NONE

/kind bug

/kind bug

/remove bug

/assign @jerop


text:
Fix typo in auth.md

Changes
Fixed typo in auth configuration example
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:

[ ] Includes tests (if functionality changed/added)
[x] Includes docs (if user facing)
[ ] Commit messages follow commit message best practices

See the contribution guide
for more details.
Release Notes

release-note

/lgtm

/ok-to-test

@dtkachenko you're gonna need to sign the CLA :pray: :angel:

@dtkachenko you're gonna need to sign the CLA 🙏 👼

Any chance you can sign the CLA @dtkachenko ?

I'm going to close this out for now, feel free to reopen if you can sign the CLA!

authors: chmouel dlorenc dtkachenko vdemeester


text:
Tracking Issue Inline Mode

[X] Initial Support (#119)
[ ] rest of answerInlineQuery fields (https://core.telegram.org/bots/api#answerinlinequery)
[ ] rest of InlineQueryResult variants (https://core.telegram.org/bots/api#inlinequeryresult)
[ ] rest of InlineQueryResultArticle fields (https://core.telegram.org/bots/api#inlinequeryresultarticle)
[ ] rest of InputMessageContent implementation (https://core.telegram.org/bots/api#inputmessagecontent)

I'll pick this up. Also looking into implementing ChosenInlineResult in the near future.

authors: goweiwen gugahoa

repo: telegram-rs/telegram-bot


text:
No hints while extension is active

Just installed and don't see any hints (but keymaps like 'gg' seems to work)
It says that extension is enabled
Any ideas why I doesn't see any hints?
I'm on Mac mini, macOS Monterey 12.3.1

It seems to it doesn't appear automatically. Solved :)

repo: televator-apps/vimari


text:
telink: b92: update ble lib

Update 2m/3m/3.5m flash protect interface .

The following west manifest projects have been modified in this Pull Request:

Name
Old Revision
New Revision
Diff

hal_telink
https://github.com/telink-semi/hal_telink/commit/34700f71d3c69326595484c631853ca61fabf0af (develop)
https://github.com/telink-semi/hal_telink/commit/445c736548c2cd0a0f2553942fcc569f93072b72 (develop_b92_prot)
telink-semi/hal_telink@34700f71..445c7365

Note: This message is automatically posted and updated by the Manifest GitHub Action.

OK, i have updated the latest west.yml and are waiting for CI completion. Thank you !

authors: andriy-bilynskyy fengtai-telink

repo: telink-semi/zephyr


text:
docs: minor updates to readme

status badges;
document supported Ruby and GDAL versions.

@tindron @turboladen
May I ask to merge this one?

repo: telus-agcg/ffi-gdal


text:
🛑 Secret Site2 is down

In ddf94b6, Secret Site2 ($SECRET_SITE_2) was down:

HTTP code: 404
Response time: 31 ms

Resolved: Secret Site2 is back up in 7afc446 after 58 days, 42 minutes.

repo: templain/mywatcher


text:
🛑 Secret Site2 is down

In 0c48f32, Secret Site2 ($SECRET_SITE_2) was down:

HTTP code: 404
Response time: 113 ms

Resolved: Secret Site2 is back up in 0fad8d9 after 50 minutes.


text:
🛑 Secret Site2 is down

In cb4ebba, Secret Site2 ($SECRET_SITE_2) was down:

HTTP code: 404
Response time: 92 ms

Resolved: Secret Site2 is back up in 164eead after 10 minutes.


text:
🛑 QRCODE VIEWER is down

In 0bd86f4, QRCODE VIEWER (https://qrcode-viewer.onrender.com/qrcode-viewer/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: QRCODE VIEWER is back up in da334f8 after 21 minutes.


text:
🛑 MYSITE2 is down

In 04edeec, MYSITE2 ($SECRET_SITE_OBOERU) was down:

HTTP code: 0
Response time: 0 ms

Resolved: MYSITE2 is back up in cfc299c after 18 minutes.


text:
🛑 MYSITE2 is down

In 5a8bf91, MYSITE2 ($SECRET_SITE_OBOERU) was down:

HTTP code: 0
Response time: 0 ms

Resolved: MYSITE2 is back up in 692b92d after 9 minutes.


text:
Versioning3 proto updates for data plane APIs

What changed?

Added "deployment_name" field to WorkerVersionStamp and WorkerVersionCapabilities so this info is sent in the poll requests and task completion commands coming from SDK.
Added versioning_behavior and default_versioning_behavior fields to RespondWorkflowTaskCompletedRequest so SDK can sent the workflow versioning annotation to server when a workflow task completes.
Added build_id, versioning_behavior, and deployment_name fields to WorkflowExecutionInfo (Mutable State) so server can use the info for routing tasks.

Why?
Needed for versioning-3 API.

Breaking changes
None.

Server PR
None.

This all looks good to me from a syntax/consistency POV, but will defer SDK approval to @antlai-temporal.
If at all possible, would like to recommend that at least most of the implementation be done server side before this PR is merged to ensure there isn't anything missing.

Thanks @cretz, this is being merged to a feature branch right now. We'll merge it to main once the server implementation is ready.

authors: ShahabT cretz

repo: temporalio/api


text:
[Test] Speed up moving_average_test

Increase error: 1e-3 -> 5e-3
Reduce number of samples: 50000 -> 5000
Use a simpler optimizer: adam -> sgd
Reduce epochs: 10 -> 5
CPU Test time: 35s -> 8s
Related to #1143

Failure is unrelated. Thanks for the pull request!

authors: Squadrick gabrieldemarmiesse

repo: tensorflow/addons


text:
Download from http://mirror.tensorflow.org/github.com/tensorflow/runtime/archive/b570a1921c9e55ac53c8972bd2bfd37cd0eb510d.tar.gz failed:

bazel: 3.7.2
pip: 21.2.4
python: 3.9.9
Running setup.py install for tensorflow-gnn: started
Running setup.py install for tensorflow-gnn: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-f4zi6o4f/setup.py'"'"'; file='"'"'/tmp/pip-req-build-f4zi6o4f/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-wlsd6gr1/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/tensorflow-gnn
cwd: /tmp/pip-req-build-f4zi6o4f/
Complete output (46 lines):
running install
running build
running bazel_build
Loading:
Loading: 0 packages loaded
WARNING: Download from http://mirror.tensorflow.org/github.com/tensorflow/runtime/archive/b570a1921c9e55ac53c8972bd2bfd37cd0eb510d.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
DEBUG: /root/.cache/bazel/_bazel_root/b4d19525ca49b6ef2846f4f7e84a4744/external/tf_runtime/third_party/cuda/dependencies.bzl:51:10: The following command will download NVIDIA proprietary software. By using the software you agree to comply with the terms of the license agreement that accompanies the software. If you do not agree to the terms of the license agreement, do not use the software.
Analyzing: target //package:move_generated_files (0 packages loaded, 0 targets configured)
ERROR: /tmp/pip-req-build-f4zi6o4f/package/BUILD:10:10: no such target '//tensorflow_gnn/sampler:sampling_spec_pb2.py': target 'sampling_spec_pb2.py' not declared in package 'tensorflow_gnn/sampler' defined by /tmp/pip-req-build-f4zi6o4f/tensorflow_gnn/sampler/BUILD and referenced by '//package:move_generated_files'
ERROR: Analysis of target '//package:move_generated_files' failed; build aborted: Analysis failed
INFO: Elapsed time: 0.114s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
ERROR: Build failed. Not running target
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-req-build-f4zi6o4f/setup.py", line 152, in
setup(
File "/usr/local/lib/python3.9/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/local/lib/python3.9/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/lib/python3.9/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.9/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/local/lib/python3.9/distutils/command/install.py", line 546, in run
self.run_command('build')
File "/usr/local/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.9/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/local/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-req-build-f4zi6o4f/setup.py", line 86, in run
subprocess.check_call(
File "/usr/local/lib/python3.9/subprocess.py", line 373, in check_calld)
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/bazel', 'run', '-c', 'opt', '--experimental_repo_remote_exec', '//package:move_generated_files']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-f4zi6o4f/setup.py'"'"'; file='"'"'/tmp/pip-req-build-f4zi6o4f/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-wlsd6gr1/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/tensorflow-gnn Check the logs for full command output.
WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.

NoSuchKeyThe specified key does not exist.

Encountering the same problem, running on ubuntu

See the comment on how to resolve this on #7 . We're working on a fix soon.

This should now be fixed with the latest update!

authors: littleforce163 nodiz sibonli

repo: tensorflow/gnn


text:
Tensorflow 0.4.0 docs say it should be compatible with JAva 8 but it is not

System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04 x86_64): Windows x86_64, windows 10
TensorFlow installed from (source or binary): binary (maven)
TensorFlow version: 2.7.0 (Tf Java 0.4.0)
Java version (i.e., the output of java -version): 1.8.0_271 (Java 8)
Installed from Maven Central?: NO, downloaded from maven link directly
CUDA/cuDNN version: No cuda
GPU model and memory: NO gpu

Describe the problem
I am trying to load a JAva model using the TF JAva API 0.4.0 for Tf 2.7.0 but I encounter an error saying that it has been compiled for Java 11 and higher only (I am using JAva 8)
Provide the exact sequence of commands / steps that you executed before running into the problem
The error happens when I am trying to load with reflection:
Class< ? > c = engineClassloader.loadClass( className );
c.newInstance();

a class that uses the Tf2 0.4.0 Java dependencies.
The class that I want to load is: https://github.com/bioimage-io/tensorflow-2-java-interface/blob/main/src/main/java/io/bioimage/modelrunner/tensorflow/v2/api030/Tensorflow2Interface.java
And I am loading the classes on a URLClassloader
Any other info / logs
This is the error:
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/tensorflow/ndarray/Shaped has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

Solved I was using the wrong NDArray version.
Sorry for the inconveninece!

repo: tensorflow/java


text:
Support Anaconda package

Push TF similarity to anaconda after official annoucement.

Moving this to 0.15

@owenvallis hey I am new here can you provide me some resources to solve this issue

authors: AKACHI1 ebursztein owenvallis

repo: tensorflow/similarity


text:
Adding GlobalMaxPooling 1D, 2D, 3D

I've added the max operation to operators, since it wasnt defined earlier.

@dan-zheng I'm working on the test cases now, I will have a seperate PR for them, there are a lot of layers which do not have test cases and I will make a list of the same in #77, it would be easier to track them that way.

@rxwei  can this be merged?

Could you pull from master? I wanted to trigger a rebuild.

@rxwei the docker summary fails because it says the max function is not differentiable, is there any way correct that?

We could either add a VJP for the max op to the standard library, or just use the actual "max pooling" operation inside the global max pooling layers (set the pool size to the width & height of the input).

@tanmayb123 I was trying to do that when i initially added the max function to the batch normalized vjp, i just put it in the wrong place. I think we should rather put in the max function because it is actually used in multiple places, might come in as a handy operation.

@tanmayb123 any idea about how i could go about adding the vjp for the max function

@dan-zheng Could you guide me maybe, as to how i can add a max vjp function to the operators file?

@rxwei could you tell me how i could go about defining a vjp for the max function?
I think the vjp is the way to go since we'd need a max function for hinge loss as well.

I'm sorry for the delayed response! Recently the team has been busy with releasing v0.3 and getting some important core pieces like RNNs into the library. I'll definitely help you with defining derivatives for min and max later this week!

In the meantime, it would be useful to explore our custom differentiation tutorial, and see how other derivatives are defined, e.g. mean(alongAxes:). Feel free to post any questions you have.

@rxwei do you mind triggering a build on this? Thanks to @eaplatanios for adding the max and min vjps. With this, we are done with all the pooling layers.

@rxwei could you take a quick glance and trigger the build once more? This does pass locally now.
Also is there any way to keep updating the toolchain directly, instead of continuously downloading nightlies xD.

Also is there any way to keep updating the toolchain directly, instead of continuously downloading nightlies xD.

You can always build a toolchain from the tensorflow branch on apple/swift using the utils/build-toolchain-tensorflow script. However, it often takes quite a while.

@eaplatanios sorry to bother you with this. But could you tell me if the max function call i wrote for this is wrong? The error that pops is function not differentiable

@Shashi456 Could you post the full error trace? I can clone and take a look in a bit.

[17/36] Compiling TensorFlow Pooling.swift
/swift-apis/Sources/TensorFlow/Layers/Pooling.swift:375:22: error: expression is not differentiable
        return input.max(squeezingAxes: [1, 2])
                     ^
/swift-apis/Sources/TensorFlow/Layers/Pooling.swift:375:22: note: cannot differentiate functions that have not been marked '@differentiable' and that are defined in other files
        return input.max(squeezingAxes: [1, 2])
                     ^
/swift-apis/Sources/TensorFlow/Layers/Pooling.swift:359:22: error: expression is not differentiable
        return input.max(squeezingAxes: 1)
                     ^
/swift-apis/Sources/TensorFlow/Layers/Pooling.swift:359:22: note: cannot differentiate functions that have not been marked '@differentiable' and that are defined in other files
        return input.max(squeezingAxes: 1)
                     ^
/swift-apis/Sources/TensorFlow/Layers/Pooling.swift:391:22: error: expression is not differentiable
        return input.max(squeezingAxes: [1, 2, 3])
                     ^
/swift-apis/Sources/TensorFlow/Layers/Pooling.swift:391:22: note: cannot differentiate functions that have not been marked '@differentiable' and that are defined in other files
return input.max(squeezingAxes: [1, 2, 3])

I see. The Tensor.max(squeezingAxes:) function is not currently differentiable when the axes are int arrays. I'll make a PR to fix that now.

Done in #159.

#159 has been merged. Could you do a pull?

@rxwei done. pretty happy that finally done with pooling layers xD

@rxwei I'll take care of both the PRs, in a while. Sorry!

@rxwei built and tested with nightly. This PR passes as is. The build now takes substantially more time though somehow xD.
I'm not sure about the test since the linux error you've mentioned popped up, but i rectified the error you mentioned about GlobalMaxPooling1D.

@eaplatanios could you trigger a build on this?
Thank you.

@rxwei could you trigger a build on this?

@rxwei The errors aren't from these additions. I think this can be merged,

@rxwei I think this is ready to be merged.

repo: tensorflow/swift-apis


text:
t2t_datagen / translate_enzh_wmt32k - How long does it take? (attached log)

How long is this supposed to take?  It's been 8 hours now..
Attached log.txt

How many GPUs are you using?

I am using 8 GPUs, i ended up also taking 10-13 hours

How much memory did you use for t2t-datagen?

My mem is 68G, but it doesn't enough for the data of translate_enzh_wmt32k.

authors: Sc-TuDou echan00 lowblung


text:
Cannot load fashion_mnist dataset

Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template
System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10 Home 64bit
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
TensorFlow installed from (source or binary): binary
TensorFlow version: 1.12
Python version: 3.6.6
Installed using virtualenv? pip? conda?: pip
Bazel version (if compiling from source):
GCC/Compiler version (if compiling from source):
CUDA/cuDNN version: 9.0/7.5
GPU model and memory: GeForce 940M

Describe the problem
when I try to use the fashion_mnist dataset, it starts to read the data from the website, but after a while, the website shuts down my connection because I am connecting too often (WinError 10054).
Provide the exact sequence of commands / steps that you executed before running into the problem
import tensorflow as tf
from tensorflow import keras

fashion_mnist = keras.datasets.fashion_mnist

(train_images, train_labels),(test_images, test_labels) = fashion_mnist.load_data()

Any other info / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.
(it's loading...)
Traceback (most recent call last):
  File "C:\Users\admin\Desktop\working as intended\python pls\love_copying_code_instead_of_writing_it_urself.py", line 6, in <module>
    (train_images, train_labels),(test_images, test_labels) = fashion_mnist.load_data()
  File "C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\keras\datasets\fashion_mnist.py", line 52, in load_data
    paths.append(get_file(fname, origin=base + fname, cache_subdir=dirname))
  File "C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\keras\utils\data_utils.py", line 249, in get_file
    urlretrieve(origin, fpath, dl_progress)
  File "C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\urllib\request.py", line 277, in urlretrieve
    block = fp.read(bs)
  File "C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\http\client.py", line 449, in read
    n = self.readinto(b)
  File "C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\http\client.py", line 493, in readinto
    n = self.fp.readinto(b)
  File "C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\socket.py", line 586, in readinto
    return self._sock.recv_into(b)
  File "C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\ssl.py", line 1009, in recv_into
    return self.read(nbytes, buffer)
  File "C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\ssl.py", line 871, in read
    return self._sslobj.read(len, buffer)
  File "C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\ssl.py", line 631, in read
    v = self._sslobj.read(len, buffer)
ConnectionResetError: [WinError 10054] 远程主机强迫关闭了一个现有的连接。

Was able to execute the given code without any error on colab with Tensorflow 1.12.0. Please see the gist here. Thanks!

it's very weird because I can run the code in colab but not on my own computer, so do I just turn to colab from now on?

This looks like a proxy configuration issue where you are trying to connect from firewall corporate network.
The workaround can be;
You can download the data from this link
https://www.kaggle.com/zalando-research/fashionmnist
Later you can use tf.keras.utils.get_file to load the dataset.
See,
https://www.tensorflow.org/api_docs/python/tf/keras/utils/get_file

is this issue has solved?

no, when I run the code above with the newest version of tensorflow, it gives a different error:
OSError: Not a gzipped file (b'\x00\x00')

authors: gadagashwini matdadi ongoing0217 ymodak

repo: tensorflow/tensorflow


text:
logits and labels must have the same first dimension

System information

MAC OS 10.14.6
Tensorflow 1.14

Working model
input_layer=Input(shape=(X.shape[1],))
model=Embedding(input_dim=len(vocab)+1,output_dim=32,input_length=X.shape[1])(input_layer)
model = Bidirectional(LSTM(units = 50, return_sequences=True, recurrent_dropout=0.2))(model)
output_layer= Dense(3, activation="softmax")(model)

model = Model(input_layer,output_layer)
model.compile(optimizer="adam", loss="sparse_categorical_crossentropy", metrics=["acc"])
model.summary()

Trying to create same model with tf-lite layers of bi-directional LSTM

import os
os.environ['TF_ENABLE_CONTROL_FLOW_V2'] = '1'
import tensorflow as tf
import numpy as np
from tensorflow.lite.experimental.examples.lstm.rnn import bidirectional_dynamic_rnn

def build_LSTM_layer(num_layers):
    lstm_layers=[]
    for i in range(num_layers):
        lstm_layers.append(tf.lite.experimental.nn.TFLiteLSTMCell(num_units=50,name='rnn{}'.format(i),forget_bias=1.0))
    final_lstm_layer=tf.keras.layers.StackedRNNCells(lstm_layers)
    return final_lstm_layer
def build_bidirectional(inputs,num_layers,use_dynamic_rnn=True):
    lstm_inputs=transposed_inp=tf.transpose(inputs,[1,0,2])
    outputs,output_states=bidirectional_dynamic_rnn(build_LSTM_layer(num_layers),build_LSTM_layer(num_layers),lstm_inputs,dtype="float",time_major=True)
    fw_lstm_output,bw_lstm_output=outputs
    final_out=tf.concat([fw_lstm_output,bw_lstm_output],axis=2)

    final_out=tf.unstack(final_out,axis=0)

    resultant_out=final_out[-1]

    return resultant_out

tf.reset_default_graph()

model_tf = tf.keras.models.Sequential([
  tf.keras.layers.Input(shape=(X.shape[1],), name='input'),
  tf.keras.layers.Embedding(input_dim=len(vocab)+1,output_dim=32,input_length=X.shape[1]),
  tf.keras.layers.Lambda(build_bidirectional, arguments={'num_layers' : 2, 'use_dynamic_rnn': True}),
  tf.keras.layers.Flatten(),
  tf.keras.layers.Dense(3, activation=tf.nn.softmax, name='output')
])
model_tf.compile(optimizer='adam',loss='sparse_categorical_crossentropy',metrics=['accuracy'])
model_tf.summary()

Inputs are token sequence and output should be NER tags which i get from keras model but not from above model
X.shape = (30, 16)
y.shape = (30, 16, 1)

I/P = array([[15., 10., 38.,  4., 32., 57., 39.,  0.,  0.,  0.,  0.,  0.,  0., 0.,  0.,  0.],...])
O/P = array([[[1.],[1.],[1.],[1.],[2.],[1.],[1.],[0.],[0.],[0.],
         [0.],[0.],[0.],[0.],[0.],[0.]],...])

Output logs
Epoch 1/10
---------------------------------------------------------------------------
InvalidArgumentError                      Traceback (most recent call last)
<ipython-input-503-89e5191da57e> in <module>
      2 train_x,test_x,train_y,test_y = train_test_split(X,y,test_size=0.2)
      3
----> 4 history = model_tf.fit(train_x,train_y,epochs=10,batch_size=3)

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow/python/keras/engine/training.py in fit(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, validation_freq, max_queue_size, workers, use_multiprocessing, **kwargs)
    778           validation_steps=validation_steps,
    779           validation_freq=validation_freq,
--> 780           steps_name='steps_per_epoch')
    781
    782   def evaluate(self,

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow/python/keras/engine/training_arrays.py in model_iteration(model, inputs, targets, sample_weights, batch_size, epochs, verbose, callbacks, val_inputs, val_targets, val_sample_weights, shuffle, initial_epoch, steps_per_epoch, validation_steps, validation_freq, mode, validation_in_fit, prepared_feed_values_from_dataset, steps_name, **kwargs)
    361
    362         # Get outputs.
--> 363         batch_outs = f(ins_batch)
    364         if not isinstance(batch_outs, list):
    365           batch_outs = [batch_outs]

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow/python/keras/backend.py in __call__(self, inputs)
   3290
   3291     fetched = self._callable_fn(*array_vals,
-> 3292                                 run_metadata=self.run_metadata)
   3293     self._call_fetch_callbacks(fetched[-len(self._fetches):])
   3294     output_structure = nest.pack_sequence_as(

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow/python/client/session.py in __call__(self, *args, **kwargs)
   1456         ret = tf_session.TF_SessionRunCallable(self._session._session,
   1457                                                self._handle, args,
-> 1458                                                run_metadata_ptr)
   1459         if run_metadata:
   1460           proto_data = tf_session.TF_GetBuffer(run_metadata_ptr)

InvalidArgumentError: logits and labels must have the same first dimension, got logits shape [3,3] and labels shape [48]
	 [[{{node loss/output_loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits}}]]

Hi @gadagashwini ,
I tried your two codes, and I found out that there is no error under tensorflow==1.14.0. Could you give me more information?

Hi There,
We are checking to see if you still need help on this, as you are using an older version of tensorflow which is officially considered end of life . We recommend that you upgrade to the latest 2.x version and let us know if the issue still persists in newer versions. Please open a new issue for any help you need against 2.x, and we will get you the right help.
This issue will be closed automatically 7 days from now. If you still need help with this issue, please provide us with more information.

authors: BhavinSuthar25 jaeyoo tensorflowbutler


text:
TimeDistributed(Dropout()) with the same dropout mask

System information

TensorFlow version (you are using): 1.14
Are you willing to contribute it (Yes/No): Yes

Describe the feature and the current behavior/state.
Here is an example block of my code. I am trying to apply a time distributed dropout to the output of a many to many GRU. I would like to keep the dropout to have the same dropout mask for all time steps. However, I did not find a solution to this purpose based on the current API. Did I miss anything or is it a new feature on the roadmap? Thanks a lot!
from tensorflow.keras.layers import Dense, Input, GRU, Dropout, TimeDistributed
x= TimeDistributed(Dense(512, activation='relu', kernel_regularizer=l2(1e-5), \
                bias_regularizer=l2(1e-5), name='cam_fc'))(input_tensor)
out = GRU(
                512,
                dropout=0.1,
                recurrent_dropout=0.1,
                activation='relu',
                kernel_regularizer=l2(1e-5),
                bias_regularizer=l2(1e-5),
                return_sequences=True,
                name='intentNet_gru')(x, training=self.is_train)

out = TimeDistributed(Dropout(0.1))(out, training=self.is_train)

I think what TimeDistributed does is that it slide the inputs based on timestep, and feed each timestep one by one to the wrapped layer. Note that when feeding multiple input to a dropout layer, each of them will get different dropout mask, which is aligned with current behavior.
If you want to apply same mask across time steps, what you can do is just using one dropout layer, but with noise_shape param specified. See https://www.tensorflow.org/api_docs/python/tf/keras/layers/Dropout for more details.


text:
Clang host compiler support?

Hi all,
I couldn't help but notice that currently TensorFlow is tightly coupled with GCC. Is there a plan to make it more flexible with the choice for host compiler? like clang?
Is there any effort or plans for that?
Thanks,
Luke

This is a general question best suited to StackOverflow.  Please can you re-ask there.

Actually this question is probably not suited to StackOverflow as written...
However, ./configure does allow you to specify the choice of the host compiler, and on Macs it uses clang anyway, so I suspect it already works.

authors: lukeiwanski prb12 vrv