Pipeline resource validation does not account for Condition resources

Expected Behavior
It should be possible to have resources only used by a Condition. For instance the following pipeline should be valid:
apiVersion: tekton.dev/v1alpha1
kind: Pipeline
spec:
  resources:
    - name: src
      type: git
  tasks:
  - name: source-to-image-task
    taskRef:
      name: taskWithNoResources
    conditions:
      - conditionRef: conditionWithResource
        resources:
          - name: workspace
            resource: src

Actual Behavior
Validation of the pipeline fails:
Error from server (InternalError): error when creating "example.yaml": Internal error occurred: admission webhook "webhook.tekton.dev" denied the request: mutation failed: invalid value: Pipeline declared resources didn't match usage in Tasks: Provided extra values: [src]: spec.resources

Steps to Reproduce the Problem

Define a simple condition with a resource
Define a simple task that does not use the resource used by the condition
Define a pipeline like above

Additional Info
The validateDeclaredResource method in https://github.com/tektoncd/pipeline/blob/3950521325d4744760a96c18e3d0c67d86495af3/pkg/apis/pipeline/v1alpha1/pipeline_validation.go#L38-L60 only matches resources of the pipeline with resources of the tasks, it does not account for resources used by conditions.

/kind bug
/cc @dibyom

I can propose a fix for this myself, but I want to make sure folks agree that this is a bug :)

Yeah, I think this is a bug. I don't see a reason why we should limit the resources available to the condition to only the ones available to the task.

/assign


Map isn't working can anyone help.

Map to show player sprite and follow movement
Dropping me in Luxembourg City but the logs are still working but not auto scrolling.
also getting these errors in Terminal.

Run OpenPoGoBot from folder using
python2 pokecli.py -a ptc -u USER -p PASS --location "51.640513, -2.678127"
I'm new to all this so please bare with me.

I've noticed it is no longer writing data to the .json files in the web folder

Still not working for me is there still an issue?

Had the same kind of error when I closed my browser.
`[2016-07-31 18:23:18] [#] Walking from (50.6376086, 3.0689158) to (50.6379282, 3.0680208) for approx. 58.00 seconds
[2016-07-31 18:23:28] Web client connected
[2016-07-31 18:24:32] [#] Walking from (50.6379282, 3.0680208) to (50.6377464, 3.067708) for approx. 24.00 seconds
Exception in thread Thread-121:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 602, in process_request_thread
self.handle_error(request, client_address)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 599, in process_request_thread
self.finish_request(request, client_address)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 657, in init
self.finish()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 716, in finish
self.wfile.close()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 283, in close
self.flush()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 307, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
`

Yes, I will look into finding a way to hide that error since it's not really an error.


remove write option on project file.

Write option is not mandatory to read zip file and upload it.

lgtm


There is no validation added for Phone number while creating/updating patient details

Describe the bug
There is no validation( like length, format, special char, text) added for Phone number while creating/updating patient details
Component
reference app
To Reproduce
Steps to reproduce the behavior:

Install and launch the Demo App
Click on floating button to add new patient/ edit existing patient details
enter phone number
See error :  Phone number field allowed to enter text, special characters, no length restriction, format.

Expected behavior
Phone number field should not allow to enter text, special char except '-', should mention country code is expected , etc
Screenshots

Smartphone (please complete the following information):

Device: Nokia 3.4
Android version: 11
Build number: 00WW_2_410_SP01

@PallaviGanorkar I would like to work on this issue. Can you please assign me this issue?

What kind of validation do we need here? @fredhersch
@joiskash has written a phone number widget which may be useful here.

It depends on the implementation context. It could either be a combination of integers only and maxLength or it could use a regex pattern for validation.
For the purposes of the demo, we could just say it should be all numbers with minLength/maxLength of 8 digits?
We can use the phone number widget too. What validation is that using?


pulseaudio: enable by default in NixOS if sound is enabled

Motivation for this change
I think PulseAudio should be enabled by default. This is because I think it is the better supported option nowadays, and because it is easier to set up than ALSA.
Things done

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

[X] NixOS
[N/A] macOS
[N/A] Linux

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Fits CONTRIBUTING.md.

Feedback from IRC: Should this really be enabled by default on headless servers?
I think that's a valid concern, perhaps it should only be enabled if X11 is enabled?

Definitely don't want it on my headless servers. I use the minimal.nix profile on my servers, which uses the no-x-libs.nix module. Not sure if there are better places to latch into it all.

This was discussed multiple times and rejected. Just search the issues.
TL;DR You don't want PulseAudio by default too.
ALSA requires NO SETUP on systems with one sound card.
Placing
defaults.pcm.card "name"
defaults.ctl.card "name"

(see aplay -l for names) into /etc/asound.conf solves it for the rest
99%.
If your sound card needs special setup default ALSA configs don't
provide PulseAudio will need you to configure it too since it, surprise,
will play audio USING ALSA.
See /nix/store/*-alsa-lib-*/share/alsa if you want more features (like
device remapping, rate resample and any other stuff you will never ever
actually use for more than a day) or just want to know how it works and
what it can do (fun fact: ALSA has a LISP interpreter inside, you can do
almost anything you want with it).
The only legit thing you can't make it do with any config or LISP code
is dynamic input/output switching without application restart. That's a
library API limit. But this is only useful for pro audio setup you
perform on.
Also, ALSA doesn't listen on any network interfaces (which is a good
thing). This is the only use case for PulseAudio I know of: sound over
network. You can use JACK for that too, but sound other network will lag
anyway, so PulseAudio is probably ok for that.

Strange I cannot remember having configured something with pulseaudio except enabling it - Am I just lucky for the last 5 years?
Some ignorant question of mine since I did not use ALSA for a while:

Most laptops have at least 2 "soundcards" these days for HDMI and analog is switching between both easily possible?
Can ALSA in the configuration we have on NixOS set the volume level per application?
What about Bluetooth headset support for ALSA these days?

Unfortunately, whatever we do with Firefox build configuration, Pulseaudio is closer and closer to being required for sound support there. As I am running Firefox inside a separate UID, I run user-level Pulseaudio just for that user. (No opinion on NixOS setting beyond options being available, as I am not using that part of NixOS services in any case).

Jörg Thalheim<EMAIL_ADDRESS>writes:

Strange I cannot remember having configured something with pulseaudio except enabling it - Am I just lucky for the last 5 years?

Which means your ALSA is working perfectly without any config.
Congratulations.

Some ignorant question of mine since I did not use ALSA for a while:

Most laptops have at least 2 "soundcards" these days for HDMI and analog is switching between both easily possible?

Yes. ALSA will expose both to all applications. If you want to switch
between them without using application options ("ALSA output option
somewhere") you can do that with ALSA_PCM_CARD environment variable,
e.g.:
$ ALSA_PCM_CARD=PCH /bin/my-program
See
$ cat /nix/store/*-alsa-lib-<IP_ADDRESS>/share/alsa/pcm/default.conf
for how this implemented:
#
# Default output
#

pcm.!default {
	@args [ CARD ]
	@args.CARD {
		type string
		default {
			@func getenv
			vars [
				ALSA_PCM_CARD
				ALSA_CARD
			]
			default {
				@func refer
				name defaults.pcm.card
			}
		}
	}
	type empty
	slave.pcm {
		# use card-specific definition if exists
		@func refer
		name {
			@func concat
			strings [
				"cards."
				{
					@func card_driver
					card $CARD
				}
				".pcm.default:CARD=" $CARD
			]
		}
		default {
			# use plughw as default
			type plug
			slave.pcm {
				type hw
				card $CARD
			}
			hint.device 0
		}
	}
	hint {
		description "Default Audio Device"
		device_output {
			@func refer
			name defaults.pcm.dmix.device
		}
		device_input {
			@func refer
			name defaults.pcm.dsnoop.device
		}
	}
}

As I said, the only thing it can not do is switch on the fly. You have
to restart the application with another env (or use in-application
switcher, if it has one).
Once upon a time I looked at that code and decided I want to make
another bit of asound.conf hackery to do the same for pcms, not cards (I
have 3 sound cards and some very specific pcm setup). My asound.conf:
# Internal Intel PCH, headphones
pcm.internal "cards.pcm.default:CARD=PCH"
ctl.internal ctl.sysdefault

# External recorder
pcm.external {
  type asym
  playback.pcm {
    type plug
    slave.pcm "dmix:CARD=name"
  }
  # no dsnoop for security reasons
  capture.pcm {
    type plug
    slave.pcm {
      type hw
      card "name"
    }
  }
}
ctl.external {
  type hw
  card "name"
}

# External USB audio card, speakers
# "notify" because I mostly play notification sounds using it
pcm.notify "cards.pcm.default:CARD=USB"
ctl.notify ctl.sysdefault

# Normal operation: play with internal, capture with external card
pcm.normal {
  type asym
  playback.pcm "internal"
  capture.pcm "external"
}
ctl.normal ctl.internal

# ENV hackery so that one could do
#   ALSA_DEFAULT_PCM=notify /bin/some-program
# and have everything in that process subtree to play though notify pcm
pcm.!default {
    @func refer
    name { @func concat
           strings [ "pcm."
                     { @func getenv
                       vars [ ALSA_DEFAULT_PCM ]
                       default "normal"
                     }
           ]
    }
}

ctl.!default {
    @func refer
    name { @func concat
           strings [ "ctl."
                     { @func getenv
                       vars [ ALSA_DEFAULT_CTL
                              ALSA_DEFAULT_PCM
                       ]
                       default "normal"
                     }
           ]
    }
}

Can ALSA in the configuration we have on NixOS set the volume level per application?

Yes, you can create different pcms/plugs of "softvol" type. I don't use
it, though, I just configured volume using in-application softvol (mpv,
mplayer, cmus, almost anything has already it anyway) once and forgot.

What about Bluetooth headset support for ALSA these days?

No idea. Last time I tried 10 years ago it worked fine.
Michael Raskin<EMAIL_ADDRESS>writes:

Unfortunately, whatever we do with Firefox build configuration, Pulseaudio is closer and closer to being required for sound support there. As I am running Firefox inside a separate UID, I run user-level Pulseaudio just for that user. (No opinion on NixOS setting beyond options being available, as I am not using that part of NixOS services in any case).

I hoped tor-browser people will fork that part too (because PulseAudio
is a security risk), but they seem to be very passive about it :(
My only hope now is apulse. I will run firefox using apulse for the
rest of history (or just switch to Pale Moon or something) if they
remove ALSA.

Some more info on ALSA softvol:
https://bbs.archlinux.org/viewtopic.php?id=131853
Apparently you don't even need that, ttable is enough.

Re: Firefox — I think ALSA sound output works fine (and might continue
to work for some time even without maintenance), but audio capture for
WebRTC via ALSA has already degraded from slightly fiddly to either
broken or really tricky to configure.

Pulseaudio also supports some other things that ALSA doesn't, like Bluetooth Audio support (not sure how well that works right now, been a while since I've had a Bluetooth headset), and I've generally had the impression that it's better supported by applications nowadays - like @7c6f434c alludes to.
And dynamic source/sink switching is not an exotic feature at all.
Besides, @oxij - this PR is only about changing the default, nothing would prevent you from disabling it.

This latest change should disable it on headless machines that use minimal.nix, because for those, sound.enabled = false.

Aristid Breitkreuz<EMAIL_ADDRESS>writes:

Pulseaudio also supports some other things that ALSA doesn't, like
Bluetooth Audio support (not sure how well that works right now, been
a while since I've had a Bluetooth headset)

False. Bluez4 used ALSA directly, Bluez5 provides a generic interface
for sound streaming. PulseAudio uses it. ALSA has a plugin too
https://github.com/Arkq/bluez-alsa

and I've generally had the impression that it's better supported by
applications nowadays - like @7c6f434c alludes to.

It's true that there are some crazy people (like Skype developers and,
most recently, Mozilla) that really want you to run PulseAudio for some
reason. The problem, is that they give no rational technical reasons for
it while there are serious reasons against it (see below).
Systemd, Dbus and Avahi have exactly the same problem. And are shoved
down your throat exactly the same way ("Pst! Hey! Hey! Boy, am I seeing
you using physlock (ntpd) with systemd? Didn't you know systemd has its
own screen locker (timesyncd) already? What? You don't like it? You
know, funny thing, utmp (ntp) is depricated now. You know, actually, its
so old and outdated we completely removed the support for it (we made
timesyncd impossible to disable). Does physlock (ntp) still work? No?
Perfect! Ehem. I mean, we are always working hard to improve the Linux
software ecosystem. Thank you for your support!")
I have no other explanation for this except there exists The Church of
Poettering (if you didn't know: he is the primary author of all of those
daemons) that holds secret meetings where they plan how to spoil all
usable OSS software in the most gruesome way possible and how to
infiltrate other OSS projects to help in that noble goal.
They also do a lot of preaching of false facts like "libpulse is easier
to use that alsaLib" (subjective, if you don't like the generality of
alsaLib API use libao instead) and "libpulse is more stable than
alsaLib" (provably false) and similar.
Now to the falseness.
$ cd nixpkgs/pkgs
$ ag alsaLib | cut -d ':' -f1 | sort | uniq > alsa
$ ag libpulse | cut -d ':' -f1 | sort | uniq > pulse
$ cat alsa pulse | sort | uniq -d > both
$ wc -l alsa pulse both
  272 alsa
  139 pulse
   87 both

So, ~185 expressions mentioning ALSA without libpulse, ~52 expressions
mentioning libpulse without ALSA. I think we have a clear winner in
"better supported by applications" category.
Next, PulseAudio is demonstrably worse for applications.

ALSA just works.
PulseAudio plays audio using ALSA.
Its provides a useless level of abstraction because 99.9% of things
PulseAudio does can be done via pure ALSA (as demonstrated by my
previous messages). And you probably don't even want the last 0.01%.
But if you do want it, PulseAudio is the worst thing you can use for
that.

Because:

As with most Poettering inventions, it has shitty API and provides a
high attack surface.

I don't want my system to be hijacked from a browser via
JavaScript Audio API. Thanks but no thanks.

As most Poettering inventions, it's highly inefficient and eats CPU
cycles.

Last time I looked at the source it introduced latency by ignoring
hardware audiobuffer size and copied frames around the most
inefficient way possible. (I heard they tried to fix that, but I
haven't checked since.) As a consequence, it dropped frames from
time to time.

As most Poettering inventions, it only works well for orthodox system
setups. Anything Poettering doesn't use you shouldn't even think of
using.

Last time I looked, it resampled everything. ALSA changes sampling rate
of the hardware when possible (in ALSA the sample rate of first client
wins, which is not ideal, having priorities would be better, but
still, ALSA potentially butchers sounds of all but the first client,
while PulseAudio butchers everything). As a consequence, lossless
music is completely useless with PulseAudio (unless your FLACs are of
the sample rate Poettering uses).

And dynamic source/sink switching is not an exotic feature at all.

Did you use it today? This week? Month? Year? Anytime? I mean, the
part ALSA can't do. Do you seriously need to constantly switch between
sinks in a program that doesn't support it natively, but there's just
no way you can restart it with a different env? What is your use case?

Anyway. I'm not claiming that. I'm only claiming that

ALSA can do all the useful parts.
PulseAudio implements that feature in the most horrible way possible.
Its unusable for anything except watching YouTube videos (YouTube
butchers the sound anyway).
If you do use dynamic audio/MIDI source/sink switching and/or LADSPA
effect chains why, again, are you not using JACK which can do all of
that (can PulseAudio do midi? both ALSA and JACK can), actually works
as you would expect without dropping frames, introducing seconds of
latency (on long effect chains), resampling, and is better supported
by pro-audio software?

Besides, @oxij - this PR is only about changing the default, nothing
would prevent you from disabling it.

Yeah, right, let's promote the thing that's insecure, laggy, butchers
sound and makes multi-user systems with sound hard (and secure
multi-user systems with sound impossible) to the default, because The
Church of Poettering says so. Thanks, but no thanks.

I don't see why this should be default. I use NixOS on desktop and nothing requires me to enable Pulse Audio.

What is going on? PR closed without comment, then branch deleted and re-created?

@aristidb: I accidentally deleted many branches due to a typo and GitHub closed their associated PRs automatically. @grahamc was able to restore many of them but GitHub doesn't seem to have reopened this (or other?) PR(s). Furthermore, I don't even know which PRs were auto-closed, so I can't even reopen them until someone comments on it. Sorry for the trouble!

Furthermore, I don't even know which PRs were auto-closed, so I can't even reopen them until someone comments on it.

This was the only one.

@orivej nope, I've seen several, unfortunately

@copumpkin You are right, I've received the notifications and did not pay attention. There were six more issues, but they are handled already.

“@aristidb: I accidentally deleted many branches due to a typo and GitHub closed their associated PRs automatically. @grahamc was able to restore many of them but GitHub doesn't seem to have reopened this (or other?) PR(s). Furthermore, I don't even know which PRs were auto-closed, so I can't even reopen them until someone comments on it. Sorry for the trouble!” — @wizeman

https://github.com/NixOS/nixpkgs/commit/d81601065d57965767dd87590d93295e13e8fa49#commitcomment-25130391
https://github.com/NixOS/nixpkgs/commit/e01bb0c0d05e29b764fa090d85ec5babd03c84b8#commitcomment-24975428
— @peterhoeg

“Erm, why do we want to limit push access to the repo exactly? Liberal granting of the commit bit is a great policy IME.” — @shlevy

Because… people in general are not particularly good at being precise.
What do you think of these “two” cases, @shlevy? Should similar ones be consistently happening, or would it be better to limit them with help of a machine?

@michalrus PR backlog only grows with time. Less people with commit access → more load. Nobody would expect people under load to be more precise.
As for help of a machine — well, nobody so far has managed to convince people to move to a VCS that actually cares about integrity. At least all the branches anyone cares about long-term are force-push protected, or so I hope (but I only care about master and staging, so it is true for me).
I have no idea why people like to do PRs from branches inside NixOS/Nixpkgs, either. Member pushes can be allowed with one click for PR branches in forks anyway. One of the few things GitHub actually seems able to do w.r.t. permissions…

As for help of a machine — well, nobody so far has managed to convince people to move to a VCS that actually cares about integrity.

Maybe because people (with few notable exceptions) don’t seem to care about integrity. Programmers. ¯\_(ツ)_/¯
Let’s maybe look at our, oh, oh, so to say, neighbors. Tell me, people of Nixpkgs:

who has write access to Kernel’s master,
and whether you consider their development model scalable enough with:

15k contributors,
and millions of lines of code,
and, arguably, at least an order of magnitude harder problems than defining how to package some software.

Kernel development model is not scalable. It is not scalable down. (It is also what created git, which fits kernel development and only kernel development just because the things git cannot do sanely are infeasible at kernel scale anymore)

because the things git cannot do sanely
Which things do you mean? =) Just curious.

I’ve seen with my very own eyes, how properly configured Git can keep hordes of very junior developers from doing silly things—just like the ones that are consistently happening in Nixpkgs (cf. that IRC log).
Oh, but you cannot change server side behavior (hooks) on the proprietary GitHub®™©, which is the real problem w/ keeping larger (à propos scaling down) projects under reasonable control here…
People will make mistakes, it’s unavoidable. It seems to me like we could be better off, if those mistakes weren’t blindly accepted by our central repo of choice, nay?
(ﾉ^_^)ﾉ

Please talk about the git/github/other unrelated topics on IRC, the mailing list or anywhere else :) Back to the issue at hand. It seems like most people are in agreement that pulse audio as the default isn't a good idea, and that we need some documentation for enabling pulse audio. @aristidb are you interested in documenting this?

It seems like most people are in agreement that pulse audio as the default isn't a good idea

With 4 people against and 4 for the default pulseaudio (counting comments and likes) this question is not decided; this shows only the lack of interest. Personally I'm for pulseaudio by default because (1) it obsoleted the need to configure sound by editing configuration files, which is particularly valuable for the users who don't know what pulseaudio or ALSA are; (and I was also quite happy when I could delete my .asoundrc instead of tweaking it for another application that did not play well with the current configuration); (2) ditto for using the console to configure sound (alsamixer) and launch graphical applications: "If you want to switch between two sound cards without using application options you can do that with ALSA_PCM_CARD environment variable" — this is a ridiculous and terrible desktop experience.

we need some documentation for enabling pulse audio

Do you mean a new section in the NixOS manual about the audio configuration? The option hardware.pulseaudio.enable is certainly documented.

I was going off @Mic92 comment "Is it documented in our manual how to enable pulseaudio? I think this is what we should at least do." That's a good question if this is something we really want in the manual or not. Maybe it makes more sense for a more in-depth howto beyond just enabling it to go on the wiki, since it really isn't reference material. As for what the decision is here, if we're not at a consensus I guess we leave the issue open for debate until more people speak up one way or another.

@disassembler I don't think there is consensus either way (the opponents are louder, but the number of votes is in favor of it), which is why I'm not merging this. But I'm also not interested in patching over the lack of sane defaults with documentation.
I'll just close this particular pull request, but if somebody wants to take it up, feel free to.

In my opinion, we should agree on what the guiding principles are. And assuming we agree that we should be giving the user the best possible experience with the least number of surprises, then anything that helps make things "Just Work" should be enabled.
The one key feature we need from pulseaudio is mixing for which we will need a piece of software for all the hardware that doesn't support hardware mixing. At this point in time, pulseaudio is that software. Of course if something better comes along that solves that problem, we should probably use that.
But not being able to play multiple streams is a no-go.

The one key feature we need from pulseaudio is mixing for which we will need a piece of software for all the hardware that doesn't support hardware mixing.

AFAIK ALSA does software mixing by default (when necessary) and in our configuration.
I should probably disable pulseaudio on my system and see how far it could go. The main usability issues I expect are that:

some applications will not be able to play or record audio (e.g. Skype)
it will not remember per-application volume levels between application restarts
it will not have per-application volume controls at all
it will not have an easy way to switch between internal and HDMI sound cards
it will not have an easy way to switch between internal and a USB sound card, and it will not switch back to internal when the USB card is disconnected
I won't be able to play sound on multiple sound cards at once without editing configuration files

AFAIK ALSA does software mixing by default (when necessary) and in our configuration.

Are you sure about that? As I recall we need to set up a dmix device for that to happen and I cannot find any config that does that.
The other points you make are very valid - assuming we want sound to just work, pulseaudio really is our only option at this point in time.

Are you sure about that? As I recall we need to set up a dmix device for that to happen and I cannot find any config that does that.

@oxij has posted the config above (cat /nix/store/*-alsa-lib-<IP_ADDRESS>/share/alsa/pcm/default.conf), it setups dmix; and ALSA wiki says:

NOTE: For ALSA 1.0.9rc2 and higher you don't need to setup dmix for analogue output. Dmix is enabled by default for soundcards which don't support hardware mixing. You still need to set it up for digital outputs.

Orivej Desh<EMAIL_ADDRESS>writes:

(1) it obsoleted the need to configure sound by editing configuration
files, which is particularly valuable for the users who don't know
what pulseaudio or ALSA are;

I repeat. You don't need to know .asoundrc exists 99.9% of the time.
All proper GUI applications have their own ALSA device selectors for
playback and capture, and their own volume controls.
There's no need to edit .asoundrc unless

you have two or more sound cards, the default one is incorrect and
apps you use don't have the device selector (even then, you can add a
kernel cmdline, or udev rule, env variable, and not .asoundrc line)

you do device/channel remapping (see my comments above)

or insert sound effects (think, echo) into your audio output.

(and I was also quite happy when I could delete my .asoundrc instead
of tweaking it for another application that did not play well with the
current configuration);

Most likely you could as well just deleted your .asoundrc and it would
have worked with ALSA.
One upon a time I had such a problem too, but then I deleted my
copy-pasted from the Net .asoundrc and it just worked. Magic! I then
RTFMed ALSA docs and default configs and noticed that that random people
from the Net simply suck at configuring ALSA, which is why their
.asoundrc copy-paste usually doesn't work as expected. I switched to
using modifications of the default ALSA configs (they have everything
you will ever need) for my sound experiments, and all problems simply
vanished.
It is true that you had to configure .asoundrc (also xorg.conf) to
add dmix and solfvol stuff 10 years ago. People mostly forgot about xorg
now thanks to xrandr, but those broken ALSA configuration file snippets
still travel thru the Net, people mindlessly copy-paste them into their
.asoundrcs (when all they need 99.9% of the time is one line which
fixes the default sound card), ALSA does exactly what those snippets
ask, and people blame ALSA for it.

(2) ditto for using the console to configure sound (alsamixer) and

Most desktop environments have their own ALSA mixers built-in. For a GUI
alsamixer see aumix.

launch graphical applications: "If you want to switch between two
sound cards without using application options you can do that with
ALSA_PCM_CARD environment variable" — this is a ridiculous and
terrible desktop experience.

See above, also see below.

I should probably disable pulseaudio on my system and see how far it could go. The main usability issues I expect are that:

some applications will not be able to play or record audio (e.g. Skype)

Use apulse. Also, don't use Skype.

it will not remember per-application volume levels between application restarts
it will not have per-application volume controls at all

See the very top of this message. Use in-app volume control. Of course,
if the app sucks you can define a new softvol device in ALSA.

it will not have an easy way to switch between internal and HDMI sound cards

... without application restart when the app doesn't support it.
I agree that there might be a use-case here if you really need to switch
all applications from internal to HDMI at once. Yes, ALSA was not made
for this. Use jackd. It will do it without adding any latency (!, really
absolutely zero, because jackd authors know their shit), unlike
PulseAudio.

it will not have an easy way to switch between internal and a USB
sound card, and it will not switch back to internal when the USB card
is disconnected

Either you could restart the app with the new device (e.g. you play
notifications or only some apps like LMMS over USB sound card) or its
the above use case and you should use jackd.

I won't be able to play sound on multiple sound cards at once
without editing configuration files

Correct. Use jackd for that.
Personally, I prefer configuration files for this type of thing.
Configure once, use anytime. With GUI tools you have to click too much
to get the same old result every single time. Also, every sufficiently
powerful GUI configuration editor turns into a programming language. I
prefer to write programs in text editors, not to draw them with a mouse.
Thoughts
Having said all of the above, I agree that ALSA is shitty, but not
because alsa-lib is shitty, but because userspace-to-kernel interface is
too complicated (I would've loved them to simply do OSS dsp's with
alsa-lib/jackd-lib on top for userspace mixing, but alas).
I also agree that it would've been nice to have very simple app-to-mixer
interface and to be able to manage all volumes both on the mixer and in
each app (they have to share control or else pro audio software that can
do programmatic volume control like LMMS will go moot), but alas.
IMHO, jackd (simple userspace code) on top of OSS3 (simple kernel API)
would've been pretty much ideal.
Putting PulseAudio (extremely complicated userspace code) on top ALSA
(complicated kernel API) doesn't help. Which is why I argue for not
making already bad situation worse.
Peter Hoeg<EMAIL_ADDRESS>writes:

AFAIK ALSA does software mixing by default (when necessary) and in our configuration.

Are you sure about that? As I recall we need to set up a dmix device for that to happen and I cannot find any config that does that.

Yes. You had to do that 10 years ago (see above). Today ALSA will
automagically setup dmix for cards that don't support hardware mixing
and softvol for cards that don't support hardware volume control. If it
does not for your card: its a bug and you should report it.

The other points you make are very valid - assuming we want sound to just work, pulseaudio really is our only option at this point in time.

Assuming you're ok with it eating your frames and adding 300ms of
latency. Which I am not.
The only viable alternative to all this is jackd over OSS or ALSA hws
(which are, essentially, the same thing, but with million times more
code). But its one daemon more. And while it won't add latency it will
eat CPU cycles. Which is why I can't watch 720p videos with sound with
jackd on by Pentium 4, but I can with ALSA (yes, you can watch 720p fine
of P4 with mplayer). With PulseAudio even system notification sounds
laggg. (Why P4, you ask? Because it's a good usability test. If it works
fine on Pentium 4 it will work awesome on anything modern larger than a
thumb-drive-sized PC.  Its completely unusable now, which is why PaleMoon, whose authors
can't even code properly, is the only choice for low-power 32-bit
devices ATM.)

@oxij

I have no other explanation for this except there exists The Church of
Poettering (if you didn't know: he is the primary author of all of those
daemons) that holds secret meetings where they plan how to spoil all
usable OSS software in the most gruesome way possible and how to
infiltrate other OSS projects to help in that noble goal.

Is it possible to trim down systemd to just init system (just pid 1 and nothing more)? I mean say goodbye to

systemd-journald. Syslog should be used instead
systemd-udevd. Udev should be provided separately
systemd-logind. No real need for it

This conversation has become a little unproductive. Why don't we move this to the mailing list and stick to the issue at hand.

Is it possible to trim down systemd

To the best of my knowledge, it's not possible. You can only run some of
the more usable alternative daemons (like syslog) in parallel.

A kind suckless soul have sent me the following link [1]. It seems to be
a fork of apulse that implements/stubs-out all of the pulseaudio API.
I didn't even try to add it to nixpkgs (because I refuse to use software
that requires pulseaudio) but seems worth mentioning here.
[1] http://git.r-36.net/pressureaudio/tree/README.md


Fixed errors found by staticcheck

Staticcheck has probably been updated and is finding new errors.
They have been fixed.
Also, moved the run of staticcheck before running the test suite,
so if it fails, it fails sooner ;-).

Coverage increased (+0.2%) to 89.631% when pulling 27bfed541c2ad451179abcc84b9f850200ea027a on fix_staticcheck_errors into 63d6ef954611f4ff69a46e418bc7d3411517059b on master.


BUG Fix missing $_FILE_TO_URL_MAPPING;

See https://docs.silverstripe.org/en/3.1/getting_started/environment_management/ for reference on why this is necessary.
I have no idea why tests even passed up until now;

Found the cause at https://github.com/silverstripe/silverstripe-framework/pull/4428 :D


Stuffs

Merged, much appreciated.
On 08/01/2016 15:40, Sawyer X wrote:

    You can view, comment on, or merge this pull request online at:

https://github.com/gonzus/devel-cookie/pull/1
    Commit Summary

remove HTML element

test memory leak

benchmark

fix c89 compat
File Changes

M date.c
https://github.com/gonzus/devel-cookie/pull/1/files#diff-0 (3)

M lib/Devel/Cookie.pm
https://github.com/gonzus/devel-cookie/pull/1/files#diff-1 (2)

A t/memory_leak.t
https://github.com/gonzus/devel-cookie/pull/1/files#diff-2 (15)

A tools/bench.pl
https://github.com/gonzus/devel-cookie/pull/1/files#diff-3 (38)
Patch Links:

https://github.com/gonzus/devel-cookie/pull/1.patch

https://github.com/gonzus/devel-cookie/pull/1.diff

—
Reply to this email directly or view it on GitHub
https://github.com/gonzus/devel-cookie/pull/1.


Updates for 1.0 core libraries

cc @ethul

Looks great. Thanks for the update. I am happy to do the merge if you like.
Is the plan to bump this to version 1.0.0?
On Friday, 3 June 2016, Phil Freeman<EMAIL_ADDRESS>wrote:

cc @ethul https://github.com/ethul
You can view, comment on, or merge this pull request online at:
https://github.com/purescript-contrib/purescript-options/pull/16
Commit Summary

Updates for 1.0 core libraries

File Changes

M bower.json
https://github.com/purescript-contrib/purescript-options/pull/16/files#diff-0
(14)
M docs/Data/Options.md
https://github.com/purescript-contrib/purescript-options/pull/16/files#diff-1
(4)
M src/Data/Options.purs
https://github.com/purescript-contrib/purescript-options/pull/16/files#diff-2
(2)
M test/Test/Main.js
https://github.com/purescript-contrib/purescript-options/pull/16/files#diff-3
(2)

Patch Links:

https://github.com/purescript-contrib/purescript-options/pull/16.patch

https://github.com/purescript-contrib/purescript-options/pull/16.diff

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/purescript-contrib/purescript-options/pull/16, or mute
the thread
https://github.com/notifications/unsubscribe/AAVYy0JpysUx4k6aTvdNlACpjm68lzoJks5qH6pjgaJpZM4ItMHN
.

Is the plan to bump this to version 1.0.0?

That's what I've been doing with my contrib libraries, for the same reason as core - just to follow semver properly, not as any indication of doneness, but it's up to you.

Bumping to 1.0 sounds good to me. Thanks!


Add shortcut keys for command palette

https://help.sap.com/products/SAP Business Application Studio/9d1db9835307451daa8c930fbd9ab264/ba59cb69245443008d016690fd068fcf.html?locale=en-US&version=Cloud
We can add shortcut keys for VSCode Command Palette(Ctrl+shift+P) for new users to know and easily interact with new development environment.

Hi,
Could you please be more specific?
Are you asking us to add the shortcut for opening up the Command Palette?

Yeah! we can add shortcut keys for these. Like shown over in tutorial Step 8
https://developers.sap.com/tutorials/btp-app-set-up-local-development.html

Great idea! I have added the keyboard shortcut to the topic and it should appear with our next release. Thanks for your feedback!

https://people.sap.com/kushagratandon
On Wed, Dec 15, 2021, 17:15 sap-doc-bot[bot] @.***>
wrote:

Thank you for your valuable feedback contribution, @KushagraTandon02
https://github.com/KushagraTandon02! So that we can recognize your
contribution in SAP Community
https://github.com/SAP-docs/contribution-guidelines/blob/main/docs/recognition.md,
please tell us your SAP Community profile URL in a reply to this comment;
don't include any other text, just the URL on its own, like this:
https://people.sap.com/your-user-name
Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/SAP-docs/btp-business-application-studio/issues/115#issuecomment-994712562,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AWJD7OERXWY55HR24OAGQU3URB5VPANCNFSM5HCDFDAQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.


Process the dataset

Thanks for opening this repository and providing the dataset to download!
I have the following three questions:

In your paper, you mentioned that you used unimodal code to pretrain the task replaced token detection. Is it possible to download the unimodal code dataset? So far I found the data from codeSearchNet repo is bimodal Data.
You also provide here the cleaned codeSearchNet data. Did you use for the pretraining the original codeSearchNet data and only the cleaned one for the task Code Documentation Generation?
In you paper, you also carried out the task on C# using the dataset of CodeNN. In which way do you tokenize the C# code? In their repository, they replaced part of code to tokens like CODE_STRING, CODE_INTEGER. Did you also do such token replacement for C#?

Thanks a lot in advance for answering these questions!

Thanks for opening this repository and providing the dataset to download!
I have the following three questions:

In your paper, you mentioned that you used unimodal code to pretrain the task replaced token detection. Is it possible to download the unimodal code dataset? So far I found the data from codeSearchNet repo is bimodal Data.
You also provide here the cleaned codeSearchNet data. Did you use for the pretraining the original codeSearchNet data and only the cleaned one for the task Code Documentation Generation?
In you paper, you also carried out the task on C# using the dataset of CodeNN. In which way do you tokenize the C# code? In their repository, they replaced part of code to tokens like CODE_STRING, CODE_INTEGER. Did you also do such token replacement for C#?

Thanks a lot in advance for answering these questions!

CodeSearchNet has provided unimodal data in pickle file (https://github.com/github/CodeSearchNet#data-details). Please find it in the link. For unimodal data, the value of field “docstring_tokens” should be empty list.
The cleaned one is cleaned from original CodeSearchNet data. Therefore, only the training dataset is used to pretrain CodeBERT. Dev and test set of the cleaned one is unseen in the pre-training procedure.
We use the same pre-process script as CodeNN to tokenize the C# (https://github.com/sriniiyer/codenn/blob/0f7fbb8b298a84faf4a14a8f76199e39af685e4a/src/model/buildData.py#L81), including replacing some tokens with CODE_STRING, CODE_INTEGER. And then we use the same code as this repo for the task of Code Documentation Generation.

Thanks for the quick reply! Now I'm clear about 1. and 3., but still a bit unsure about the second point.

The cleaned one is cleaned from original CodeSearchNet data. Therefore, only the training dataset is used to pretrain CodeBERT. Dev and test set of the cleaned one is unseen in the pre-training procedure.

So for the pretraining CodeBert Masked Language Modeling task, is the training data size for example for python 251,820(only cleaned one training set) or 412,178(the original CodeSearchNet bimodel python training data)?

Thanks for the quick reply! Now I'm clear about 1. and 3., but still a bit unsure about the second point.

The cleaned one is cleaned from original CodeSearchNet data. Therefore, only the training dataset is used to pretrain CodeBERT. Dev and test set of the cleaned one is unseen in the pre-training procedure.

So for the pretraining CodeBert Masked Language Modeling task, is the training data size for example for python 251,820(only cleaned one training set) or 412,178(the original CodeSearchNet bimodel python training data)?

The training set of cleaned one is a subset of CodeSearchNet training data. In your example,  412,178 is used to pretrain CodeBert.

It's very clear now, thanks! I close this issue.


Unexpected relative path $ref behaviour when nearby absolute $ref

Relative paths like $ref: ./somefile are expected to load the file in the same directory as the file that is being dereferenced.
This behaviour is not obvious in the example:
{
  $ref: 'mine://host/folder/path',
  root: {
    child: {
      $ref: './relativefile'
    }
  }
}

I need to find a way for the relative link ./relativefile to load a file in the same folder... but instead it looks for mine://host/folder/relativefile
When there's a "peer" $ref though in a parent element, the relative file paths become relative to the "peer" reference. This is unexpected. I am trying to find either:

is this a bug in the code that imposes a basePath on a relative file link

or

is there a way to "break out" of a peer basePath and force a relative $ref to be applies as a file ref relative to the enclosing file?

Here's a self-contained example of the behaviour... that throws the error Error: Error resolving $ref pointer "mine://host/folder/relativefile".
'use strict';

const parser = require('json-schema-ref-parser');

const doc = {
  $ref: 'mine://host/folder/path',
  root: {
    child: {
      $ref: './relativefile'
    }
  }
};

const resolver = {
  canRead: file => file.url.startsWith('mine://'),
  read: (file) => {
    if (file.url !== 'mine://host/folder/path') {
      throw new Error(`Should not be asked to handle ${JSON.stringify(file)}`);
    }
    console.warn(`resolved ${JSON.stringify(file)}`)
    return {
      mine: file.url
    };
  }
};

const prom = parser.dereference(doc, { resolve: { mine: resolver } });

prom.then(
  () => console.error('Expected an error to say ./relativefile does not exist'),
  err => console.error(err.stack)
);

The full output of the above code is:
/tmp$ node bugref.js
resolved {"url":"mine://host/folder/path","extension":""}
Error: Error resolving $ref pointer "mine://host/folder/relativefile".
"mine://host/folder/relativefile" not found.
    at $Refs._resolve (/tmp/node_modules/@apidevtools/json-schema-ref-parser/lib/refs.js:152:11)
    at dereference$Ref (/tmp/node_modules/@apidevtools/json-schema-ref-parser/lib/dereference.js:99:23)
    at crawl (/tmp/node_modules/@apidevtools/json-schema-ref-parser/lib/dereference.js:58:26)
    at crawl (/tmp/node_modules/@apidevtools/json-schema-ref-parser/lib/dereference.js:64:28)
    at dereference$Ref (/tmp/node_modules/@apidevtools/json-schema-ref-parser/lib/dereference.js:112:24)
    at crawl (/tmp/node_modules/@apidevtools/json-schema-ref-parser/lib/dereference.js:46:22)
    at dereference (/tmp/node_modules/@apidevtools/json-schema-ref-parser/lib/dereference.js:19:22)
    at $RefParser.dereference (/tmp/node_modules/@apidevtools/json-schema-ref-parser/lib/index.js:247:5)

Nested $refs like that aren't currently supported.  See PR #146

I'm not sure this is particularly valid $ref usage anyhow. $ref and $id will be getting a bit of an overhaul for JSON Schema 2019-09 support, which is being handled by #145, so let's track all that work there.


Fixed broken isNonEmpty

isNonEmpty is currently doing the same check as isEmpty, which is obviously broken.
Added a test to make sure isEmtpy and isNonEmpty work as intended.

Thanks a lot @Linschlager this was merged and published as of v2.13 🚀


OmniSharp Error talking to localhost

Platform

[ ] Linux
[x] Windows
[ ] OSX

Type

[x] This is an issue
[ ] This is a feature request
[ ] Other

Checklist

[ ] It hasn't been fixed in the latest master
[x] I can reproduce this issue in a fresh Sublime Text install without other extensions

Versions
output of mono --version:
Mono JIT compiler version 6.12.0 (Visual Studio built mono)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com

output of msbuild /version:
Microsoft (R) Build Engine version 14.0.23107.0
Copyright (C) Microsoft Corporation. All rights reserved.

Details
What's the bug?
Error talking to localhost:XXXXX/checkready
How-To
How do I reproduce this issue?
Trying to open a project.
I know this issue has been raised quite a few times, but no matter what I do, I cannot get this to work. I am constantly getting the error of Error talking to localhost:XXXXX/checkready which eventually leads to Error loading project. I was rally hoping to use this as I do not have a great PC and it struggles to run Visual Studio due to only having 4GB RAM. I am really not sure what to try next.  Thank you.

I finally find a answer and its works FINE for me:
1 - check you have msbuild, mono, installed and added to the path,
2 - download one release from that https://github.com/OmniSharp/omnisharp-roslyn/releases (I see the bug is in the Omnisharp for Sublime)
3 - Locate your folder of omnisharp (Sublime 3 Plugins) in this case is C:\Users\MYUSER\AppData\Roaming\Sublime Text 3\Packages\OmniSharp\prebuilt-omnisharp-roslyn\prebuilt
4 - extract the omnisharp that you have download from the link below
5 - Replace the content from the prebuilt omnisharp with the new omnisharp release.
Just reopen Sublime and ENJOY.

Are there any detailed instructions on which MSbuild version is required and what path specifically to add?
I've tried adding a path in PATH to 5 different msbuild directories now, (restarted sublime text every time). No luck yet, still the same error as OP.


C++ compilation of rule '//tensorflow/core/kernels/image:extract_image_patches_op' failed (Exit 1): crosstool_wrapper_driver_is_not_gcc failed: error executing command

Click to expand!
Issue Type
Build/Install
Source
source
Tensorflow Version
tf2.7
Custom Code
Yes
OS Platform and Distribution
linux
Mobile device
No response
Python version
python3.7.12
Bazel version
3.7.2
GCC/Compiler version
7.3.1
CUDA/cuDNN version
rocm5.1
GPU model and memory
No response
Current Behaviour?
A bug happened!  when i compile TF2.7 form source code

Standalone code to reproduce the issue
bazel build -c opt --config=rocm //tensorflow/tools/pip_package:build_pip_package --verbose_failures

Relevant log output
ERROR: /data/jenkins_workspace/workspace/tensorflow2x_release_bak/tensorflow/core/kernels/image/BUILD:241:18: C++ compilation of rule '//tensorflow/core/kernels/image:extract_image_patches_op' failed (Exit 1): crosstool_wrapper_driver_is_not_gcc failed: error executing command
  (cd /root/.cache/bazel/_bazel_root/13db7a7ceaa19d7f3d62a2ad5999e2b1/execroot/org_tensorflow && \
  exec env - \
    LD_LIBRARY_PATH=/opt/dtk-22.04/hip/lib:/opt/dtk-22.04/llvm/lib:/opt/dtk-22.04/lib:/opt/dtk-22.04/lib64: \
    PATH=/data/jenkins_workspace/workspace/tensorflow2x_release_bak/Depend/bin:/opt/dtk-22.04/bin:/opt/dtk-22.04/llvm/bin:/opt/dtk-22.04/hip/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
    PWD=/proc/self/cwd \
    PYTHON_BIN_PATH=/usr/bin/python3 \
    PYTHON_LIB_PATH=/usr/local/python3.7.12/lib/python3.7/site-packages \
    ROCBLAS_TENSILE_LIBPATH=/opt/dtk-22.04/lib/library \
    ROCM_PATH=/opt/dtk-22.04 \
    TF2_BEHAVIOR=1 \
  external/local_config_rocm/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections -fdata-sections '-std=c++14' -MD -MF bazel-out/k8-opt/bin/tensorflow/core/kernels/image/_objs/extract_image_patches_op/extract_image_patches_op.pic.d '-frandom-seed=bazel-out/k8-opt/bin/tensorflow/core/kernels/image/_objs/extract_image_patches_op/extract_image_patches_op.pic.o' -fPIC -DTENSORFLOW_USE_CUSTOM_CONTRACTION_KERNEL -DTENSORFLOW_USE_MKLDNN_CONTRACTION_KERNEL '-DEIGEN_ALTIVEC_USE_CUSTOM_PACK=0' -DEIGEN_MPL2_ONLY '-DEIGEN_MAX_ALIGN_BYTES=64' -iquote . -iquote bazel-out/k8-opt/bin -iquote external/com_google_absl -iquote bazel-out/k8-opt/bin/external/com_google_absl -iquote external/nsync -iquote bazel-out/k8-opt/bin/external/nsync -iquote external/eigen_archive -iquote bazel-out/k8-opt/bin/external/eigen_archive -iquote external/gif -iquote bazel-out/k8-opt/bin/external/gif -iquote external/libjpeg_turbo -iquote bazel-out/k8-opt/bin/external/libjpeg_turbo -iquote external/com_google_protobuf -iquote bazel-out/k8-opt/bin/external/com_google_protobuf -iquote external/com_googlesource_code_re2 -iquote bazel-out/k8-opt/bin/external/com_googlesource_code_re2 -iquote external/farmhash_archive -iquote bazel-out/k8-opt/bin/external/farmhash_archive -iquote external/fft2d -iquote bazel-out/k8-opt/bin/external/fft2d -iquote external/highwayhash -iquote bazel-out/k8-opt/bin/external/highwayhash -iquote external/zlib -iquote bazel-out/k8-opt/bin/external/zlib -iquote external/local_config_rocm -iquote bazel-out/k8-opt/bin/external/local_config_rocm -iquote external/png -iquote bazel-out/k8-opt/bin/external/png -iquote external/mkl_dnn_v1 -iquote bazel-out/k8-opt/bin/external/mkl_dnn_v1 -iquote external/double_conversion -iquote bazel-out/k8-opt/bin/external/double_conversion -iquote external/local_config_cuda -iquote bazel-out/k8-opt/bin/external/local_config_cuda -iquote external/local_config_tensorrt -iquote bazel-out/k8-opt/bin/external/local_config_tensorrt -Ibazel-out/k8-opt/bin/external/local_config_cuda/cuda/_virtual_includes/cuda_headers_virtual -Ibazel-out/k8-opt/bin/external/local_config_tensorrt/_virtual_includes/tensorrt_headers -isystem external/nsync/public -isystem bazel-out/k8-opt/bin/external/nsync/public -isystem third_party/eigen3/mkl_include -isystem bazel-out/k8-opt/bin/third_party/eigen3/mkl_include -isystem external/eigen_archive -isystem bazel-out/k8-opt/bin/external/eigen_archive -isystem external/gif -isystem bazel-out/k8-opt/bin/external/gif -isystem external/com_google_protobuf/src -isystem bazel-out/k8-opt/bin/external/com_google_protobuf/src -isystem external/farmhash_archive/src -isystem bazel-out/k8-opt/bin/external/farmhash_archive/src -isystem external/zlib -isystem bazel-out/k8-opt/bin/external/zlib -isystem external/local_config_rocm/rocm -isystem bazel-out/k8-opt/bin/external/local_config_rocm/rocm -isystem external/local_config_rocm/rocm/rocm/include -isystem bazel-out/k8-opt/bin/external/local_config_rocm/rocm/rocm/include -isystem external/local_config_rocm/rocm/rocm/include/rocrand -isystem bazel-out/k8-opt/bin/external/local_config_rocm/rocm/rocm/include/rocrand -isystem external/local_config_rocm/rocm/rocm/include/roctracer -isystem bazel-out/k8-opt/bin/external/local_config_rocm/rocm/rocm/include/roctracer -isystem external/png -isystem bazel-out/k8-opt/bin/external/png -isystem external/mkl_dnn_v1/include -isystem bazel-out/k8-opt/bin/external/mkl_dnn_v1/include -isystem external/mkl_dnn_v1/src -isystem bazel-out/k8-opt/bin/external/mkl_dnn_v1/src -isystem external/mkl_dnn_v1/src/common -isystem bazel-out/k8-opt/bin/external/mkl_dnn_v1/src/common -isystem external/mkl_dnn_v1/src/common/ittnotify -isystem bazel-out/k8-opt/bin/external/mkl_dnn_v1/src/common/ittnotify -isystem external/mkl_dnn_v1/src/cpu -isystem bazel-out/k8-opt/bin/external/mkl_dnn_v1/src/cpu -isystem external/mkl_dnn_v1/src/cpu/gemm -isystem bazel-out/k8-opt/bin/external/mkl_dnn_v1/src/cpu/gemm -isystem external/mkl_dnn_v1/src/cpu/x64/xbyak -isystem bazel-out/k8-opt/bin/external/mkl_dnn_v1/src/cpu/x64/xbyak -isystem external/double_conversion -isystem bazel-out/k8-opt/bin/external/double_conversion -isystem external/local_config_cuda/cuda -isystem bazel-out/k8-opt/bin/external/local_config_cuda/cuda -isystem external/local_config_cuda/cuda/cuda/include -isystem bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include -w -DAUTOLOAD_DYNAMIC_KERNELS '-std=c++14' -DEIGEN_AVOID_STL_ARRAY -Iexternal/gemmlowp -Wno-sign-compare '-ftemplate-depth=900' -fno-exceptions '-DTENSORFLOW_USE_XLA=1' '-DTENSORFLOW_USE_ROCM=1' -DINTEL_MKL -msse3 -pthread '-DTENSORFLOW_USE_ROCM=1' '-DTENSORFLOW_USE_XLA=1' '-DINTEL_MKL=1' -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' '-DTENSORFLOW_USE_ROCM=1' -D__HIP_PLATFORM_HCC__ -DEIGEN_USE_HIP -no-canonical-prefixes -fno-canonical-system-headers -c tensorflow/core/kernels/image/extract_image_patches_op.cc -o bazel-out/k8-opt/bin/tensorflow/core/kernels/image/_objs/extract_image_patches_op/extract_image_patches_op.pic.o)
Execution platform: @local_execution_config_platform//:platform
In file included from external/eigen_archive/unsupported/Eigen/CXX11/Tensor:97:0,
                 from ./third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1,
                 from ./tensorflow/core/kernels/image/extract_image_patches_op.h:19,
                 from tensorflow/core/kernels/image/extract_image_patches_op.cc:21:
external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorImagePatch.h: In static member function 'static void Eigen::internal::EvalRange<Evaluator, StorageIndex, true>::run(Evaluator*, StorageIndex, StorageIndex) [with Evaluator = Eigen::TensorEvaluator<const Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<std::complex<float>, 4, 1, long int>, 16, Eigen::MakePointer>, const Eigen::TensorReshapingOp<const Eigen::DSizes<long int, 4>, const Eigen::TensorImagePatchOp<-1, -1, const Eigen::TensorMap<Eigen::Tensor<const std::complex<float>, 4, 1, long int>, 16, Eigen::MakePointer> > > >, Eigen::ThreadPoolDevice>; StorageIndex = long int]':
external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorImagePatch.h:546:7: internal compiler error: in emit_move_insn, at expr.c:3698
       values[i] = coeff(index+i);
       ^~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
Target //tensorflow/tools/pip_package:build_pip_package failed to build
INFO: Elapsed time: 4326.567s, Critical Path: 534.32s
INFO: 11449 processes: 1314 internal, 10135 local.

Thank you!

@sushreebarsa  I can try this, but TF v2.7.0 is the version  what I need despite the outcome of TF2.9,  on the same time ,I had build TF1.15 success with of the same environment of the TF v2.7.0 , So what  I want to solve is  this error on the version of TF v2.7.0, So can you help me to solve this error, thanks.

@sushreebarsa  I can try this, but TF v2.7.0 is the version  what I need despite the outcome of TF2.9,  on the same time ,I had build TF1.15 success with of the same environment of the TF v2.7.0 , So what  I want to solve is  this error on the version of TF v2.7.0, So can you help me to solve this error, thanks.

@south-ocean Tensorflow doesn't officially support ROCm. You can follow the instructions here. Also this is similar to these issues issue1 and issue2. Follow all the suggestions in issue2 but this is all I can do as we don't support AMD ROCm

@gowthamkpr Thanks, I will try it.

@south-ocean Also Please post this issue in this forum. Thanks!


Hot reload drive me to the initial route every time using GoRouter in flutter

Hello everybody,
I'm using GoRouter inside my application, but i don't understand why every time i save (hot reload), the app goes to the intial page. I share with you my code.
Any tips for this weird behavior?
Thanks in advance!
That's my AppRouter class:
class AppRoutes {
  static const initialPage = '/';
  static const welcomePage = '/welcome';
  static const loginPage = '/login';

  late final GoRouter router =
      GoRouter(debugLogDiagnostics: true, navigatorKey: navigatorKey, routes: [
    GoRoute(
      name: initialPage,
      path: '/',
      builder: (BuildContext context, GoRouterState state) => const InitialPageWrapper(),
    ),
    GoRoute(
      name: welcomePage,
      path: welcomePage,
      builder: (BuildContext context, GoRouterState state) => const WelcomePage(),
    ),
    GoRoute(
      name: loginPage,
      path: loginPage,
      builder: (BuildContext context, GoRouterState state) => LoginPage(),
    ),
]);
}

That's my myApp class:
class MyApp extends StatelessWidget {
  final String flavorName;
  const MyApp({
    Key? key,
    required this.flavorName,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return AppMultiProvider(
        child: MaterialApp.router(
      routerConfig: AppRoutes().router,
      localizationsDelegates: const [
        AppLocalizations.delegate,
        GlobalMaterialLocalizations.delegate,
        GlobalWidgetsLocalizations.delegate,
        GlobalCupertinoLocalizations.delegate,
      ],
      supportedLocales: const [
        Locale('it', ''),
      ],
      title: 'Flutter Demo',
      theme: ThemeData(
        scaffoldBackgroundColor: AppColorsImpl().greyBackground,
        primarySwatch: createMaterialColor(AppColorsImpl().teal),
        fontFamily: 'QuickSand',
        bottomSheetTheme: BottomSheetThemeData(backgroundColor: AppColorsImpl().white),
      ),
    ));
  }
}

@EdoardoPi Looks like you are hitting the same issue as this https://github.com/flutter/flutter/issues/106389, Please ensure you are using the latest version of go_router

Hello @EdoardoPi. Can you refactor your code to be like this? (Extracting the appRoutes variable)
class MyApp extends StatelessWidget {
  final String flavorName;
  const MyApp({
    Key? key,
    required this.flavorName,
  }) : super(key: key);

  late final appRoutes = AppRoutes();

  @override
  Widget build(BuildContext context) {
    return AppMultiProvider(
        child: MaterialApp.router(
      routerConfig: appRoutes.router,
      localizationsDelegates: const [
        AppLocalizations.delegate,
        GlobalMaterialLocalizations.delegate,
        GlobalWidgetsLocalizations.delegate,
        GlobalCupertinoLocalizations.delegate,
      ],
      supportedLocales: const [
        Locale('it', ''),
      ],
      title: 'Flutter Demo',
      theme: ThemeData(
        scaffoldBackgroundColor: AppColorsImpl().greyBackground,
        primarySwatch: createMaterialColor(AppColorsImpl().teal),
        fontFamily: 'QuickSand',
        bottomSheetTheme: BottomSheetThemeData(backgroundColor: AppColorsImpl().white),
      ),
    ));
  }
}

@EdoardoPi
do you experience the same issue
if you use routeInformationParser, routeInformationProvider, routerDelegate?
see code sample below

 code sample
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';

abstract class AppRoutes {
  static const initialPage = '/';
  static const welcomePage = '/welcome';
  static const loginPage = '/login';
}

void main() => runApp(const MyApp());

class MyApp extends StatefulWidget {
  const MyApp({
    super.key,
  });

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  late final GoRouter _router;

  @override
  void initState() {
    _router = GoRouter(debugLogDiagnostics: true, routes: [
      GoRoute(
        name: AppRoutes.initialPage,
        path: AppRoutes.initialPage,
        builder: (context, state) => const MyScaffold(
          message: AppRoutes.initialPage,
          goTo: AppRoutes.loginPage,
        ),
      ),
      GoRoute(
        name: AppRoutes.welcomePage,
        path: AppRoutes.welcomePage,
        builder: (context, state) => const MyScaffold(
          message: AppRoutes.welcomePage,
        ),
      ),
      GoRoute(
        name: AppRoutes.loginPage,
        path: AppRoutes.loginPage,
        builder: (context, state) => const MyScaffold(
          message: AppRoutes.loginPage,
          goTo: AppRoutes.welcomePage,
        ),
      ),
    ]);
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp.router(
      routeInformationParser: _router.routeInformationParser,
      routeInformationProvider: _router.routeInformationProvider,
      routerDelegate: _router.routerDelegate,
      backButtonDispatcher: RootBackButtonDispatcher(),
      title: 'Flutter Demo',
    );
  }
}

class MyScaffold extends StatelessWidget {
  final String message;
  final String? goTo;
  const MyScaffold({
    required this.message,
    this.goTo,
    super.key,
  });

  @override
  Widget build(context) => Scaffold(
        appBar: AppBar(),
        body: Center(child: Text(message)),
        floatingActionButton: goTo == null
            ? const SizedBox.shrink()
            : FloatingActionButton(
                child: const Icon(Icons.arrow_forward),
                onPressed: () => context.go(goTo!),
              ),
      );
}

Had same issue when hot reloading, but was solved after removing routerConfig: _router and adding
routeInformationParser: _router.routeInformationParser,
routeInformationProvider: _router.routeInformationProvider,
routerDelegate: _router.routerDelegate,

Thanks a lot guys for your help!


"General work item feature access" wrong default permission documentation

"Move work item to another project" permission is not set by default for "Contributor" group.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: a35602ee-9d11-9746-4b79-075e295a5fb8
Version Independent ID: dbea8e30-e80b-8f13-987e-ef0ad3ba9b83
Content: Default permissions and access quick reference - Azure DevOps
Content Source: docs/organizations/security/permissions-access.md
Product: devops
Technology: devops-security
GitHub Login: @KathrynEE
Microsoft Alias: kaelli

@jvincke Thank you for the feedback, please consider becoming a contributor.
The documentation has been updated and is pending review.


Customize whitelist/domain for specific services/endpoints

Is it currently possible to override the whitelist/domain for a particular service?
I have a server based on docker-compose with 35 services. Some of them I want them to be accessible but more people than me while the most part of them I would like them to keep private. Is there anything I can customize via labels or similar for such a case?
If not, is it possible to disable the OAuth2 on certain endpoints?

It's not currently possible to set different whitelists, but this is certainly something we could support via the new rules config!
I actually quite like the idea of making this and a few other variables editable under rules so I'll leave this issue open :)
In the meantime, you can disable OAuth2 with something like:
rule.1.action = allow
rule.1.rule = Path(`/public`)

See rule under: https://github.com/thomseddon/traefik-forward-auth#option-details

@thomseddon isn't this a dupe of my issue #57 ?

@Webunity agree :)


Deprecation warnings for ugettext_lazy

Lots of messages like these:
explorer/models.py:61: RemovedInDjango40Warning: django.utils.translation.ugettext_lazy() is deprecated in favor of django.utils.translation.gettext_lazy().

This appears to be a compat shim for Python 2 - but since this library has dropped Python 2 support, it should be safe to change uses of ugettext_lazy to gettext_lazy.

@brettdh yeah I didn't get chance to look into when gettext_lazy was introduced. I'd imagine they included it in 2.2 so I'd be happy to swap to it already.


Added documentation about Groups

Fixed #5.  Since react-visjs-timeline passes the options to vis.js and vis.js natively supports groups, this is simply a documentation change.

Awesome, thanks for doing that @ErinsMatthew! You're just missing the closing fence on the code block. Once that's in we can merge

Thanks. I've added the closing fence that I had missed.


hslToRgb function is wrong - Proposed fix.

🐛 Bug Report
The function that converts hslToRgb in this library looks like it originates from this stackoverflow answer:
https://stackoverflow.com/questions/2353211/hsl-to-rgb-color-conversion
However, This answer is wrong this method of converting hsl to rgb is fundamentally flawed the correct way is documented here
https://www.rapidtables.com/convert/color/hsl-to-rgb.html
in which a code-translation version of the math turns into the refined more accurate version:
function hslToRgb(h: number, s: number, l: number): [number, number, number] {
		const C = (1 - Math.abs(2 * l - 1)) * s;
		const X = C * (1 - Math.abs(((h / 60) % 2) - 1));
		const M = l - C / 2;
		const hueToRgb = () => {
			if (h < 60) return [C, X, 0];
			if (h < 120) return [X, C, 0];
			if (h < 180) return [0, C, X];
			if (h < 240) return [0, X, C];
			if (h < 300) return [X, 0, C];
			return [C, 0, X];
		};
		const [R1, G1, B1] = hueToRgb();
		return [Math.round((R1 + M) * 255), Math.round((G1 + M) * 255), Math.round((B1 + M) * 255)];
	}

hslToRgb(158, 0.83, 0.46)// [20, 215, 143] (new way)
hslToRgbOldWay(158, 0.83, 0.46) // [20, 20, 20] (old way);

To Reproduce
No steps needed to reproduce other than check the inputs/outputs of that function against any reputable online color converter.
Expected behavior
Expected behavior is that it swaps between hsl / rgb in an extremely "non-lossy" way
Link to repro
Source of problem is here.
https://github.com/react-spring/react-spring/blob/e73385837e7a75ef64e82d17a28e7c86fb5c0e49/src/shared/normalizeColors.ts
Environment
react-spring any version.
EDIT: Quick edit to say if this could be fixed on react-spring 8 aswell as 9 that would be amazing

Also ran some common sense checks against a known source of truth (the DOM) to double check the accuracy; Didn't run many of these but just a few just to make sure it wasn't unnecessarily lossy.
// Native DOM
const ele = document.createElement("div")
ele.style.color = "hsl(158, 83%, 46%)"
console.log(ele.style.color) // rgb(20,215,143)     (converted by DOM automatically)

// New HSL -> RGB javascript algorithm
hslToRgb(158, 0.83, 0.46)/
// [20, 215, 143]


ADE20k's label names are not appropriate

For example, the list ade20k_semantic_segmentation_label_names has two "tree"
https://github.com/chainer/chainercv/blob/master/chainercv/datasets/ade20k/ade20k_utils.py#L27
https://github.com/chainer/chainercv/blob/master/chainercv/datasets/ade20k/ade20k_utils.py#L95
Some values are different from the original in https://github.com/CSAILVision/sceneparsing.

https://github.com/CSAILVision/sceneparsing/blob/master/objectInfo150.txt
The current values may be extracted from the last column of this file, followed by split with a blank. So, class palm, palm tree is converted to tree.

I remember extracting label names from that text file. (also in csv format https://github.com/CSAILVision/semantic-segmentation-pytorch/blob/master/data/object150_info.csv)
I should have been more carefully with parsing names.


Create TransformingSource and BoundedSourceTester

R: @dhalperi

R: @jkff would you mind taking a look at this and sharing your thoughts?
My initial thoughts:

Why a transforming source vs a source + ParDo? Document.
BoundedSourceTester vs SourceTestUtils?

Agreed with Dan's both points. A source, philosophically, abstracts how to parallelize an input - applying a function to the elements is not part of that. And BoundedSourceTester seems fully redundant with SourceTestUtils (if not, please merge the missing functions into SourceTestUtils instead. If it's not discoverable enough, let's raise that as a separate issue - but it's mentioned in the docs of BoundedSource and on the public documentation page about sources and sinks; please let me know where you would have noticed it, so we can link it there too).

I am closing this PR.
TransformingSource will be added in BigQueryIO in the PR of BigQueryIO.Source


HDFS-15938. Fix java doc in FSEditLog

JIRA: HDFS-15938
Fix java doc in org.apache.hadoop.hdfs.server.namenode.FSEditLog#logAddCacheDirectiveInfo.

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Logfile
Comment

+0 :ok:
reexec
1m 33s

Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  0s

No case conflicting files found.

+0 :ok:
codespell
0m  0s

codespell was not available.

+1 :green_heart:
@author
0m  0s

The patch does not contain any @author tags.

-1 :x:
test4tests
0m  0s

The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.

_ trunk Compile Tests _

+1 :green_heart:
mvninstall
38m 46s

trunk passed

+1 :green_heart:
compile
1m 36s

trunk passed with JDK Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04

+1 :green_heart:
compile
1m 27s

trunk passed with JDK Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08

+1 :green_heart:
checkstyle
1m 12s

trunk passed

+1 :green_heart:
mvnsite
1m 41s

trunk passed

+1 :green_heart:
javadoc
1m  8s

trunk passed with JDK Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04

+1 :green_heart:
javadoc
1m 33s

trunk passed with JDK Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08

+1 :green_heart:
spotbugs
3m 37s

trunk passed

+1 :green_heart:
shadedclient
20m 43s

branch has no errors when building and testing our client artifacts.

_ Patch Compile Tests _

+1 :green_heart:
mvninstall
1m 25s

the patch passed

+1 :green_heart:
compile
1m 31s

the patch passed with JDK Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04

+1 :green_heart:
javac
1m 31s

the patch passed

+1 :green_heart:
compile
1m 18s

the patch passed with JDK Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08

+1 :green_heart:
javac
1m 18s

the patch passed

+1 :green_heart:
blanks
0m  0s

The patch has no blanks issues.

+1 :green_heart:
checkstyle
1m  7s

the patch passed

+1 :green_heart:
mvnsite
1m 31s

the patch passed

+1 :green_heart:
javadoc
0m 52s

the patch passed with JDK Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04

+1 :green_heart:
javadoc
1m 27s

the patch passed with JDK Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08

+1 :green_heart:
spotbugs
3m 49s

the patch passed

+1 :green_heart:
shadedclient
21m 13s

patch has no errors when building and testing our client artifacts.

_ Other Tests _

-1 :x:
unit
343m 28s
/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
hadoop-hdfs in the patch passed.

+1 :green_heart:
asflicense
0m 38s

The patch does not generate ASF License warnings.

448m 29s

Reason
Tests

Failed junit tests
hadoop.hdfs.server.namenode.snapshot.TestNestedSnapshots

hadoop.hdfs.TestPersistBlocks

hadoop.hdfs.server.namenode.TestDecommissioningStatus

hadoop.hdfs.server.namenode.TestDecommissioningStatusWithBackoffMonitor

hadoop.hdfs.TestDFSShell

hadoop.hdfs.server.datanode.TestBlockRecovery

hadoop.hdfs.server.datanode.TestDirectoryScanner

hadoop.hdfs.server.datanode.TestBlockScanner

hadoop.hdfs.server.datanode.fsdataset.impl.TestFsVolumeList

hadoop.hdfs.server.namenode.ha.TestEditLogTailer

hadoop.hdfs.server.namenode.ha.TestBootstrapStandby

hadoop.hdfs.server.namenode.TestAddOverReplicatedStripedBlocks

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2837/2/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hadoop/pull/2837

Optional Tests
dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell

uname
Linux 133c0364a69b 4.15.0-136-generic #140-Ubuntu SMP Thu Jan 28 05:20:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/bin/hadoop.sh

git revision
trunk / be1f401b2aae7313262f38e23d384bdfaa9e78d8

Default Java
Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08

Multi-JDK versions
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08

Test Results
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2837/2/testReport/

Max. process+thread count
2059 (vs. ulimit of 5500)

modules
C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs

Console output
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2837/2/console

versions
git=2.25.1 maven=3.6.3 spotbugs=4.2.2

Powered by
Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.

LGTM

Thanks @aajisaka for your review. Those failed unit tests are unrelated to the change, and they work fine locally.

Thanks @liuml07 for your review and merge.


How to include credential in GitRepo config

Seems config-examples.jason only provides session for SVN with creds.
How to modify for Git? Thanks.
"SomeGitRepo" : {
"url" : "http://server/scm/project/repo.git",
"vcs-config" : {
"username" : "username_for_ro_account",
"password" : "password_for_ro_account"
}
}

What are you trying to do? If you want to index a private Git repo you can follow the instructions here:
https://github.com/etsy/Hound#private-repositories

I'm going to close this, let us know if you still have an issue here.


[usecase-webapi] Resolve unstable issue in ResourceTiming.feature

When the device performance or network in poor, there is no enough
time for loading resource, this make the test result unstable.
Add waiting time for 5 second.
Impacted tests(approved): new 0, update 1, delete 0
Unit test platform: Crosswalk Project for Android 14.43.342.0
Unit test result summary: pass 1, fail 0, block 0
BUG=https://crosswalk-project.org/jira/browse/XWALK-4095

I don't like the magic timeout. Any confidence of the 5 seconds?  Perhaps there is another device needs 15 seconds.

This method would be more appropriate: I should see "{text}" in {timeout:d} seconds
It would always check the text until time's up, and stop checking when text is found.
Thus we can use an even longer timeout.

@zqzhang if we don't use magic number, it need the runner support asynchronous method.  now we only can set timeout for waiting action. And the time is decided by our test devices, and make it double.

@Honry I should see "{text}" in {timeout:d} seconds is not a good choice, we only need waiting at the beginning, not each step.

I guess you misunderstand my word, we don't need waiting if the text can be found.

But we also need check the {text} in {area}, so the exiting step cannot meet the request

All right, suggest to implement it in the future, no more comment for current solution. @cicili, any comment or concern?

As @cicili takes AL today, I would like to merge it.


requirements.txt missing terminado

(ipn)carl@twist:~/src/jupyter_notebook$ jupyter notebook
Traceback (most recent call last):
...
pkg_resources.DistributionNotFound: terminado>=0.3.3
pip install terminado
seems to fix it.

The requirements.txt is only for the not-yet released jupyter/ipython dependencies. setup.py expresses the terminado dependency. How did you install the notebook?

https://github.com/jupyter/jupyter_notebook#jupyter-notebook
Dev quickstart:
...
pip install -r requirements.txt

Yes, as mentioned above, the requirements.txt only gets the dependencies that pip install -e . will fail to get. pip install -e . will get terminado. Did you do pip install -e . or something else to install the notebook package?

pip install -e .
2021  git clone https://github.com/jupyter/jupyter_notebook.git
2022  cd jupyter_notebook/
2023  pip install -r requirements.txt
2024  pip install -e .
2025  jupyter notebook
2026  grep terminado requirements.txt
2027  pip install terminado
2028  jupyter notebook
2029  history
Hmm,  This shouldn't matter, but the VE is left over from attempting to follow
https://github.com/ipython/ipython#development-installation
pip install -e ".[notebook]" --user
Could not find any downloads that satisfy the requirement jupyter-notebook (from ipython==4.0.0-dev)
Tried to figure out how to fix, gave up, but did not clean up the VE.

Those exact steps worked for me. What version of pip?

and setuptools, perhaps.

(ipn)carl@twist:~/src/jupyter_notebook$ pip -V
pip 1.5.4 from /home/carl/.virtualenvs/ipn/local/lib/python2.7/site-packages (python 2.7)
(ipn)carl@twist:~/src/jupyter_notebook$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import setuptools
setuptools.version
'2.2'

I just tried again with a clean VE, still errors.
I also grepped the output of pip install -e . for terminado, found nothing.

Does it work if you pip install --upgrade setuptools pip first? Current setuptools is 15.1.
I ran this, for a clean env:
python2 -m virtualenv /tmp/test-req
source /tmp/test-req/bin/activate
pip install -r requirements.txt -e .

Which finished with:
Successfully installed appnope-0.1.0 backports.ssl-match-hostname-<IP_ADDRESS> certifi-14.5.14
decorator-3.4.2 ipython ipython-genutils ipython-kernel jinja2-2.7.3 jsonschema-2.4.0
jupyter-client jupyter-core jupyter-nbconvert jupyter-nbformat jupyter-notebook
markupsafe-0.23 mistune-0.5.1 path.py-7.3 pexpect-3.3 pickleshare-0.5 ptyprocess-0.4
pygments-2.0.2 pyzmq-14.5.0 simplegeneric-0.8.1 terminado-0.5 tornado-4.1 traitlets

And pip freeze:
appnope==0.1.0
backports.ssl-match-hostname==<IP_ADDRESS>
certifi==14.5.14
decorator==3.4.2
-e git+https://github.com/ipython/ipython.git@d538c7ac9dcee2e75ff5e670376ac4d3ad6715ee#egg=ipython-master
-e git+https://github.com/ipython/ipython_genutils.git@cd17ef4c300b63392738c673f41c09e5b4dfaa6d#egg=ipython_genutils-master
-e git+https://github.com/ipython/ipython_kernel.git@e02f13bfb74d1e8c82b1cf30b49e376b12fbc2c9#egg=ipython_kernel-master
Jinja2==2.7.3
jsonschema==2.4.0
-e git+https://github.com/jupyter/jupyter_client.git@67e7a98405c154c0f4f04024d5442af63b553dae#egg=jupyter_client-master
-e git+https://github.com/jupyter/jupyter_core.git@c0e8787e3c7e32ff632f7e6058ac083ffb9642e7#egg=jupyter_core-master
-e git+https://github.com/jupyter/jupyter_nbconvert.git@da1d3ee05ce3453bb2c5e2c0625160711f4419fa#egg=jupyter_nbconvert-master
-e git+https://github.com/jupyter/jupyter_nbformat.git@137926e731512b70fdf26266e9ad68254eec5b58#egg=jupyter_nbformat-master
-e git+git@github.com:jupyter/jupyter_notebook.git@68d41f59924939f42a538956f112f4682c5853b7#egg=jupyter_notebook-master
MarkupSafe==0.23
mistune==0.5.1
path.py==7.3
pexpect==3.3
pickleshare==0.5
ptyprocess==0.4
Pygments==2.0.2
pyzmq==14.5.0
simplegeneric==0.8.1
terminado==0.5
tornado==4.1
-e git+https://github.com/ipython/traitlets.git@4b26dff292a23b89976afa7732894c5bb1969f03#egg=traitlets-master

updating setuptools fixed it.
(test-req)carl@twist:~/src/jupyter_notebook$ pip install --upgrade setuptools pip

  Running setup.py install for ptyprocess
  Running setup.py install for terminado
  Running setup.py develop for jupyter-notebook
Successfully installed backports.ssl-match-hostname-<IP_ADDRESS> certifi-14.5.14 decorator-3.4.2 ipython ipython-genutils ipython-kernel jinja2-2.7.3 jsonschema-2.4.0 jupyter-client jupyter-core jupyter-nbconvert jupyter-nbformat jupyter-notebook markupsafe-0.23 mistune-0.5.1 path.py-7.3 pexpect-3.3 pickleshare-0.5 ptyprocess-0.4 pygments-2.0.2 pyzmq-14.5.0 simplegeneric-0.8.1 terminado-0.5 tornado-4.1 traitlets

before I updated:
(test-req)carl@twist:~/src/jupyter_notebook$ pip install -r requirements.txt -e .

Successfully installed ipython-genutils traitlets jupyter-core jupyter-nbformat jupyter-client ipython ipython-kernel jupyter-nbconvert jinja2 tornado jupyter-notebook decorator jsonschema pyzmq pickleshare simplegeneric pexpect mistune pygments markupsafe certifi backports.ssl-match-hostname path.py

(test-req)carl@twist:~/src/jupyter_notebook$ pip freeze
Jinja2==2.7.3
MarkupSafe==0.23
Pygments==2.0.2
argparse==1.2.1
backports.ssl-match-hostname==<IP_ADDRESS>
certifi==14.05.14
decorator==3.4.2
-e git+https://github.com/ipython/ipython.git@d538c7ac9dcee2e75ff5e670376ac4d3ad6715ee#egg=ipython-master
-e git+https://github.com/ipython/ipython_genutils.git@cd17ef4c300b63392738c673f41c09e5b4dfaa6d#egg=ipython_genutils-master
-e git+https://github.com/ipython/ipython_kernel.git@4e153d4f6a1fc6c5780f0c198c132d29c3e9532e#egg=ipython_kernel-master
jsonschema==2.4.0
-e git+https://github.com/jupyter/jupyter_client.git@67e7a98405c154c0f4f04024d5442af63b553dae#egg=jupyter_client-master
-e git+https://github.com/jupyter/jupyter_core.git@c0e8787e3c7e32ff632f7e6058ac083ffb9642e7#egg=jupyter_core-master
-e git+https://github.com/jupyter/jupyter_nbconvert.git@da1d3ee05ce3453bb2c5e2c0625160711f4419fa#egg=jupyter_nbconvert-master
-e git+https://github.com/jupyter/jupyter_nbformat.git@137926e731512b70fdf26266e9ad68254eec5b58#egg=jupyter_nbformat-master
-e git+https://github.com/jupyter/jupyter_notebook.git@68d41f59924939f42a538956f112f4682c5853b7#egg=jupyter_notebook-master
mistune==0.5.1
path.py==7.3
pexpect==3.3
pickleshare==0.5
pyzmq==14.5.0
simplegeneric==0.8.1
tornado==4.1
-e git+https://github.com/ipython/traitlets.git@4b26dff292a23b89976afa7732894c5bb1969f03#egg=traitlets-master
wsgiref==0.1.2

Weird and worrying. I wonder what version of setuptools has this fixed.


Compiler option "types" cannot be empty

The documentation states

Specify "types": [] to disable automatic inclusion of @types packages.

However that does not seem to work.
TypeScript Version:  3.7.3
Search Terms: typescript compiler option types empty
Code
{
    "compilerOptions": {
        "types": []
    }
}

Expected behavior:
Does not import types from node_modules.
Actual behavior:

Using tsc v3.7.3
error TS6044: Compiler option 'types' expects an argument.

I can't reproduce the issue:
D:\Throwaway>type tsconfig.json
{
    "compilerOptions": {
        "types": []
    },
    "files": ["a.ts"]
}
D:\Throwaway>tsc

D:\Throwaway>

Confirmed. Happens only when using grunt-ts, which seems to call tsc via command line, which then seems to hit #18581

I have reported the problem to the grunt-ts project. https://github.com/TypeStrong/grunt-ts/issues/442

This can be closed @RyanCavanaugh - it is grunt-ts specific.  Thanks.

Thanks!


Request: Person(s) Risk Profile modifier for "plus they do the precise thing I'm modeling once per day / week / month"

One of the relatively risk-averse profiles on the list describes me and my housemates pretty well. However, it won't describe us any more if we actually do any of the things we're using microcovid.org to model the risk of. I'd love for the risk profile to include a self-referential modification option that indicates "this profile, but they also engage in the activity I'm currently modeling with a given/selected specific frequency". This seems like it would produce more useful numbers when deciding as a group to change our behavior.

I might guess this isn't too hard to do in the spreadsheet, which is designed to make it possible to whip something up for use cases more complex than the calculator can currently handle. Give it a try and let us know if that works for you?

We actually have this in the Kaleidoscope version -- "Is part of a household that is using microcovid to manage their personal risk to 1%/person/year"  The cool thing about it is that the size of the house does not matter at that point.

@mattbell interesting. Just so I understand what you're saying: if someone is taking doing 1% risk budget, it doesn't matter if they live with 10 other people or by themselves because they're already keeping their risk at 1% (and reducing their budget based on their house). Am I getting your right?

Some clarification: I realized that the way we use the point system at our house is different from the set of features that is available in the default spreadsheet.
We separately model risk-to-self and risk-to-housemates of each activity you do in all our calculations, and the sum or risk-to-self and risk-to-housemates has to be less than 1% per week.  With 7 people in the house, about 2/3 of the points budget actually goes toward paying for risk-to-housemates.  Other group houses we know are using the same system.
If people are following a system like this, then it doesn't matter how big their house is.
However, the current system as described in the calculator does not directly address housemate risk, so we should perhaps add that before putting in anything other than "lives alone and uses MicroCOVID to follow the 1%-per-year risk rule"

now that there's a person risk profile for "keeps to 200/20 microcovid budget" and custom people in the risk tracker (rebranded spreadsheet v2), can we close this as obsolete?

I don't think this is obsoleted by those features.
To accomplish this using the custom people feature you would need to make a custom person, then look at your results, then change the custom person to match those results, then look at the new results, and repeat this process until the results converge on the value you're trying to find out.

Ok. I think I was slightly confused about what you wanted in your original request. Can I try to repeat it back to you to see if I understand?
Your situation is:

you have roommates
the specific question you want to answer is: if you/one of your roommates start doing  once per day/week/month, how will that affect you/your roommates?

If so, I think the new risk tracker does let you answer this more easily. Compared to the original spreadsheet, the new one is specifically designed for entire households/pods keeping track of their risk to each other.
To specifically answer the question of "how risky is it to me for my roommate Andy to start doing  once per week", this is what I would do:

Make a copy of the risk tracker here
Follow the Quickstart Guide to add me and my roommates to the blue box at/near cell C20 in the starting "Pod Overview" sheet, add those same names to the Pod Activity Log, then set my location in the "Locations" sheet
Since I'm only interested in the difference with and without this new activity right now, I don't need to fully model myself or Andy. I go to the pod activity log, and enter Andy's activity without a date.
I go back to the pod overview and note Andy's "points used" in that blue table. This is how much extra risk is exposed to me every week if Andy starts doing this activity once a week. This cuts into my weekly microcovid budget.

I think what I'd really suggest though is that if you and all your roommates feel confident about microcovids as a risk modelling tool and are willing to continuously track your out-of-house activities, that you all fill out the risk tracker. That way you can separately have a group policy of "you can't bring more than ___ risk into the house" but be able to individually decide where to "spend" that risk.

Alternatively, whatever the cost of the activity is, add 30% to account for them doing it as well.
Or if you mean it is an infinite chain of each person doing the activity with someone else doing that activity, that's given by sum( 0.3 * (1 + 0.3 * (1 + 0.3 * (...)))) = sum (0.3 + 0.09 + ...) = 0.3 / 0.7 = 0.43x more risk.
I... don't think we'll add this as a calculator feature, since it seems rather unlikely that everyone in an infinite chain is truly doing exactly the same activity once a week. But this should perhaps give you a sense of how much more expensive it might be.

It's not a chain but a loop. I am doing a bunch of things, including things with you, and you have an identical risk profile to me which includes doing those things with me who has an identical risk profile to you. I expect the loop to converge on some value, but it's not obvious the formula for that convergence.
Example: Assume an average person has an ongoing risk of 100 microcovids per day, doing all the things average people do. I do a bunch of specific things with ten random people and have a calculated risk of 50 microcovids per day. But one of those ten people is you, who has an identical risk profile to me, so you also have a risk of 50uc/day. But that means my risk profile is a little better than previously calculated (9 average people and one half-as-dangerous-as-average person)so my risk is now 47.5uc/day, which makes your risk 47.5 uc/day. But now my risk profile is yet again a little better, and eventually it converges that my risk (and yours) is 47.368421... uc/day.

I see, in that case it's actually much simpler; a person's microCOVID risk
to you doesn't include their risk from you. You can't get microCOVIDs
back from someone.
If you see 9 random people for 5 microCOVIDs each plus friend F, and F sees
9 random people for 5 microCOVIDs each plus you, each of your risks to each
other is 45. There's no convergence or looping.
The loop only makes sense if you can give COVID to your friend and then
they can give it back to you - and while we aren't quite sure how long
immunity lasts, we're pretty sure that you can't get COVID while you have
COVID!
Consider another case: Friend G is totally isolated. No contact with the
outside world whatsoever. Their microCOVID score is 0.  After
spending a day indoors together and waiting 2 days, G will have 30
microCOVIDs. You hang out with G again. What is G's risk to you? Still 0.
Why?
Break down the actual calculation:
You had a 1% chance of having COVID when you saw G last. If you had COVID,
G has a 30% chance of getting it from you.
In the universes where you didn't have COVID, G does not have COVID.
In the universes where you did have COVID, G maybe has COVID, but you
currently have COVID, so G can't give it back to you.
Also note that there is no "steady state" for microCOVIDs - 95% of
transmission happens 2 or more days after exposure, so your microCOVID
score lags your activities by 2 days. Additionally, we've published a
detailed decay window for microCOVIDs which means that your actual
microCOVID count changes daily:
https://www.microcovid.org/paper/14-research-sources#infectious-period
On Tue, Feb 16, 2021 at 1:04 AM sparr<EMAIL_ADDRESS>wrote:

It's not a chain but a loop. I am doing a bunch of things, including
things with you, and you have an identical risk profile to me which
includes doing those things with me who has an identical risk profile to
you. I expect the loop to converge on some value, but it's not obvious the
formula for that convergence.
Example: Assume an average person has an ongoing risk of 100 microcovids
per day, doing all the things average people do. I do a bunch of specific
things with ten random people and have a calculated risk of 50 microcovids
per day. But one of those ten people is you, who has an identical risk
profile to me, so you also have a risk of 50uc/day. But that means my risk
profile is a little better than previously calculated (9 average people and
one half-as-dangerous-as-average person)so my risk is now 47.5uc/day, which
makes your risk 47.5 uc/day. But now my risk profile is yet again a little
better, and eventually it converges that my risk (and yours) is
47.368421... uc/day.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/microcovid/microcovid/issues/225#issuecomment-779690402,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABM25LJY3RZBMUEYPJYWHGTS7IYJBANCNFSM4Q3DO5JQ
.


Add minimal support for on-device automated testing

Test should be driven from Mocha/JS, and be able to execute things on-device.
An environment variable or command-line switch should be used to select that
on-device tests should be run, and which device it should use.
A minimal test could be one that determines how many nodes we can instantiate on an Arduino, as we've had problems with hitting this out-of-memory condition several times already. Its also hard to debug and is an important measurement of how MicroFlo scales.
Tests should upload new firmware to the device as a setup-step.
Longer term, it should also be possible to run the same tests against the runtime on x86. More details found in https://github.com/jonnor/microflo/blob/master/doc/braindump.md#testing-strategy

We now use https://github.com/flowbased/fbp-spec for testing. It connects over the FBP runtime protocol. Currently wired up in http://github.com/microflo/microflo-core component test running on Emscripten/node.js.
This approach should work fine also for on-device testing, but this is currently untested. This is the last piece missing to close this issue.

After some security work on our protocol implemention, it should also be possible to run tests remotely from something like Travis CI, but this is a secondary issue.

fbp-spec against device tested working in 0.3.44 on an Arduino Leonardo.


Is there a convenient way to print output shape of every layer?

We don't have a built in way to do this, but you can monkey patch modules and add your own print statements. Here is an example that hooks every call method of every module class and prints input/output shapes:
https://colab.research.google.com/gist/tomhennigan/ebcee49d928c2c7f2e868d3552a8f85b/example-of-printing-call-method-input-and-output-shapes.ipynb

thanks, help a lot.