issue #1555: add equals and hashCode, to Seq, Set, Map, Multimap

Hi, I'm going to show some intermediate results, maybe you will have some comments and it will help me to tackle problems with tests.
Some explanations:

Despite the fact that IntMap and IntMultimap were written to be the replacement of the Map in tests they don't implement Traversable<Tuple2<Integer, T>>. It makes impossible to compare IntMap with real maps. To fix this problem I've overwritten equals and hashCode methods like this:

@Override
    public boolean equals(Object o) {
        Object map = o;
        if (o instanceof IntMap) {
            map = ((IntMap) o).original;
        }
        return Collections.equals(this.original, map);
    }

    @Override
    public int hashCode() {
        return Collections.hash(this.original);
    }

Tests as below are working only because equals and hashCode for IntMap were written using values() and ignoring keys.

@Test
    public void shouldPartitionIntsInOddAndEvenHavingOddAndEvenNumbers() {
        assertThat(of(1, 2, 3, 4).partition(i -> i % 2 != 0)).isEqualTo(Tuple.of(of(1, 3), of(2, 4)));
    }

Really we compare here [{0 -> 1, 2 -> 3}, {1 -> 2, 3 -> 4}] and [{0 -> 1, 1 -> 3},{0 -> 2, 1 -> 4}] and it is incorrect.
I'm going to remove such tests from AbstractTraversableTest class and put them in every child class. For AbstractMapTest and AbstractMultimapTest I'm going to rewrite these tests using mapOf() methods.

I decided to write equals method for Traversable class and using introspection methods isSequential and isDistinct. In this case, a value of type Set<Tuple<K, V>> will be equals to a value of type Map<K, V>.

#1555

@v1ctor

To fix this problem I've overwritten equals and hashCode methods like this: ...

Your IntMap.equals()/hashCode() overrides look great!

@danieldietrich @ruslansennov How I understand HashSet.of(1, 2, 3) should be equal to TreeSet.of(1, 2, 3), but what about LinkedHashSet? Do we need to check order or not?
If we check order it means that HashSet.of(1, 2, 3) won't be equal to LinkedHashSet.of(1, 2, 3) because first one isn't sequential.
What do you think?

Javaslang inspired by Scala...
var hm = mutable.HashSet(1, 2, 3, 1, 2)
var lhm = mutable.LinkedHashSet(3, 1, 2, 3, 1, 1, 1)
print(hm.equals(lhm))   // true

@danieldietrich @ruslansennov I've found that compareTo for Tuple2 throw npe if right or left is null. For now, I just switched shouldZipAllNonEmptyAndNil() test for TreeSet, but I believe we need to think how to compare Tuples with nulls correctly.
I've rewritten code, and fixed all the tests, but do not merge it yet, because I would like to write new tests to check different collections equality.

Codecov Report

Merging #1915 into master will decrease coverage by 0.01%.
The diff coverage is 86.15%.

@@             Coverage Diff              @@
##             master    #1915      +/-   ##
============================================
- Coverage     98.04%   98.02%   -0.02%
+ Complexity     5065     5064       -1
============================================
  Files            89       89
  Lines         11453    11419      -34
  Branches       1513     1504       -9
============================================
- Hits          11229    11194      -35
  Misses          114      114
- Partials        110      111       +1

Impacted Files
Coverage Δ
Complexity Δ

...in/java/javaslang/collection/AbstractMultimap.java
96.57% <0%> (+1.01%)
122 <0> (-1)
:x:

...ang/src/main/java/javaslang/collection/BitSet.java
99.41% <100%> (-0.01%)
78 <0> (ø)

...slang/src/main/java/javaslang/collection/List.java
99.61% <100%> (-0.01%)
257 <0> (ø)

...ang/src/main/java/javaslang/collection/Stream.java
98.56% <100%> (-0.04%)
253 <0> (ø)

...lang/src/main/java/javaslang/collection/Queue.java
95.94% <100%> (+0.01%)
191 <2> (-2)
:x:

...ng/src/main/java/javaslang/collection/TreeMap.java
97.39% <100%> (+1.22%)
150 <2> (ø)
:x:

...lang/src/main/java/javaslang/collection/Array.java
99.52% <100%> (-0.01%)
238 <2> (-2)

...ng/src/main/java/javaslang/collection/HashSet.java
95.72% <100%> (-0.09%)
135 <2> (-2)

...ng/src/main/java/javaslang/collection/TreeSet.java
100% <100%> (ø)
167 <2> (-2)
:x:

.../main/java/javaslang/collection/LinkedHashMap.java
98.51% <100%> (+0.93%)
127 <2> (-1)
:x:

... and 8 more

Continue to review full report at Codecov.

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

@v1ctor Please take a look at my proposal
The equals() impl for Map and Multimap should be roughly equivalent to the one for Set.

@v1ctor I made more tests. These implementations work fine for me (Seq and Set):
final class Collections {

    @SuppressWarnings("unchecked")
    static <T> boolean equals(Seq<T> seq1, Object o) {
        if (o == seq1) {
            return true;
        } else if (seq1 != null && o instanceof Seq) {
            final Seq<T> seq2 = (Seq<T>) o;
            return seq1.size() == seq2.size() && areEqual(seq1, seq2);
        } else {
            return false;
        }
    }

    @SuppressWarnings("unchecked")
    static <T> boolean equals(Set<T> set1, Object o) {
        if (o == set1) {
            return true;
        } else if (set1 != null && o instanceof Set) {
            final Set<T> set2 = (Set<T>) o;
            if (set1.size() != set2.size()) {
                return false;
            } else {
                try {
                    return set1.forAll(set2::contains);
                } catch(ClassCastException x) {
                    return false;
                }
            }
        } else {
            return false;
        }
    }

    ...

    // already existis!
    static boolean areEqual(Iterable<?> iterable1, Iterable<?> iterable2) { ... }
}

Note: We intentionally reduce the costs by don't putting the size equality check into the try/catch block.
The Map, Multimap equals impls are similar to the one for Set.

Open issue: We need a new hashing strategy for Set, Map and Multimap. Especially we need to ensure that equals(a, b) == true => a.hashCode() == b.hashCode(), e.g. if a is a Set/Map and b is a SortedSet/LinkedSet/SortedMap/LinkedMap.
Scala uses scala.util.hashing.MurmurHash3 but I think it is not part of this issue to implement a sophisticated new hashing algorithm. We must just ensure that the equals/hashCode contract is fulfilled.
Currently we do it in HashMap by summation of all elements starting with 0. But I think it is a better idea to start with 1 because

our empty collections always have a hashCode of 1
we can distinguish collections that contain empty collections

Please give this one a try for Set, Map, Multimap:
class Collections {
    public int hashUnordered(Iterable<?> iterable) {
        if (iterable == null) {
            return 0;
        } else {
            int hashCode = 1;
            for (Object o : iterable) {
                hashCode += Objects.hashCode(o);
            }
            return hashCode;
        }
    }
}

@v1ctor thank you for your ongoing effort and your long breath 👍🏼, this is not a trivial issue.

@danieldietrich You're doing a really great job! Thank you for the help. I am reading through your comments and I will come with new implementation soon. :)

@v1ctor take your time!

Hi @danieldietrich, I've rewritten equals methods and add the check that if collections are equal then they should have the same hashCode.
There are really a lot of information in this PR, and I feel a little bit lost.
The problem with hashCode that if we will compare SortedSet and non sorted Set if they have the same elements equals will return us true, but hashCode will be different for ordered and unordered Sets. I think that we should leave it like we have right know, because it conforms equals/hashCode contract – hashCode could be the same, but collections could not be equal.

Hi @v1ctor
thank you, you did a great job!
I will take the time this evening to check out you branch and play around with it. On a first sight the changes look good.

@v1ctor I already took a look but still need some time (I have too many open tasks).
You will receive a PR for your branch (if that is possible with git!?) the next days. It is necessary because this is a big change and it is easier to get the last few % right.

Replaced by a new PR: #1948


Callback incorrect

Previous SSO issue fixed, however, the callback URL does not work:
Callback setting in local.php:
'clientId'          => '',
'clientSecret'      => '**********',
'redirectUri'       => 'https://skylizer.thedoubled.org/auth/index',
Application settings:
APPLICATION SETTINGS:
Your applications authentication settings. The "Secret Key" should never be human-readable in your application.
Client ID: **************************************
Secret Key: ************************************************
Callback URL: https://skylizer.thedoubled.org/auth/index
Scopes:
publicData
esi-location.read_location.v1
After successfully logging in via SSO, callback returns this:
Not Found
The requested URL /index was not found on this server.
However, if I then go to https://skylizer.thedoubled.org I am logged in.

Quick Check:
https://skylizer.thedoubled.org/auth/index
is working fine.
If EVE SSO redirects you to https://skylizer.thedoubled.org/index then the "callback URL" you entered in the developer portal (https://developers.eveonline.com/applications) is most probably wrong.

As shown above and in the screen shot, the callback URL is entered as the wiki indicates.


Timeout during creating new process

not sure what happening, download BAS -> Click record.
stuck loading and show error like that.
[[0]](action://action0) [02:44:26] Thread #1 : Timeout during creating new process
is that mean my ISP blocked request to BAS server?

This is fixed in 27.4.1, anyway, please write to premium email.

im using that version


Change system_halt and system_reboot to REST API

Can you check the conflicts?

Done. May need to fix others as you merge these

Only this PR left.


[M001191] Rep. Patrick Murphy

Rep. Patrick Murphy:
http://patrickmurphy.house.gov
Likely contact form URL to start with:
http://patrickmurphy.house.gov/contact/officeinformation.htm

YMAL file not found. I am working on it.


SyncSqueakReply should not contain any result info

Because it runs asynchronously.

https://github.com/yzernik/squeaknode/pull/845


Files watcher problem on samba Volume

Hello I have a big problems files watcher.
I'm using VS Code 1.46 on Mac OS 10.15.5 and my work's folder is on samba server.
/Volumes/space/libs/
/Volumes/space/commons/
/Volumes/space/Works/project1/
/Volumes/space/Works/project2/

I work on "space" volume but I don't need to index all folders because there are too many files.
I tried configuring Watcher Exclude and Search Exclude but indexing go on and causing traffic congestion on server.
"search.exclude": {
    "**/Volumes/space/commons/**": true,
    "**/Volumes/space/libs/**": true,
},
"files.watcherExclude": {
    "**/Volumes/space/commons/**": true,
    "**/Volumes/space/libs/**": true,
},

Previously #67934 so cc @bpasero


bug: ReplaceWithRegister ReplaceWithRegisterOperator doesn't work with remote

Did you check docs and existing issues?

[X] I have read all the flash.nvim docs
[X] I have searched the existing issues of flash.nvim
[X] I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)
NVIM v0.9.1 Build type: RelWithDebInfo
Operating system/version
Ubuntu 22.04.2 LTS
Describe the bug
Using require("flash").remote() with <Plug>ReplaceWithRegisterOperator from ReplaceWithRegister doesn't work as expected. The text that is suppossed to be inserted in the selected location is also inserted at the starting location.
Steps To Reproduce

nvim -u repro.lua
Open example.txt with the following code:

remote

starting

foo

3.Put the cursor on foo and highlight the word (yiw).
4. Put the cursor at the beggining of starting
5. Press the keys <leader>r to start a replace
6. Press r to execute require("flash").remote()
7. Press re and select the label next to re on the word remote
8. Press iw
The result is the following:
foo

foostarting

foo

The text was replaced on the remote location, but it was also inserted at the starting location.
Expected Behavior
The result should be the following
foo

starting

foo

Repro
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
	vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
	vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
	"folke/tokyonight.nvim",
	{
		"folke/flash.nvim",
		opts = {},
		keys = {
			{
				"r",
				mode = "o",
				function()
					require("flash").remote()
				end,
				desc = "Remote Flash",
			},
		},
	},
	-- add any other plugins here
	{
		"vim-scripts/ReplaceWithRegister",
		keys = {
			{ "<leader>r", "<Plug>ReplaceWithRegisterOperator", mode = "n" },
		},
	},
}
require("lazy").setup(plugins, {
	root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here

This turned out to be a really tricky issue. I has to spend way too much time in solving this :)
The solution was eventually really simple, but not that straightforeward.
Either way, this should be fixed now :)
Thank you for the detailed bug reprort!


Initiative button in Combat Tracker actually makes the Actor's Dexterity check, vice just rolling 3d6

Is your feature request related to a problem? Please describe.
Currently rolling initiative in the Combat Tracker just rolls 3d6.
Describe the solution you'd like
When using the Combat Tracker to roll initiative for an Actor, it makes a Dexterity check using the Actor's Dexterity stat.  GM will still need to manually update if an Actor has the Dex(Initiative) Focus, or has an initiative modifier, but at least the check will be done using the Actor's stat value instead of just 3d6.  So will be correct for most Actors w/o the Focus or any init mods.
Describe alternatives you've considered
To do it correctly, current each player needs to make a Dex check manually, then the GM needs to update each Actor's initiative in the Combat Tracker.  This is time consuming and really slows down the 1st round of combat.
Additional context
The Expanse rule book, p.83, describes how Initiative is rolled

Works in 0.8.4...

Issue solved in 0.8.4


replace n_channels value retrieval

Currently, many situations that require the value of the total number of channels in the recording (.dat or .eeg) retrieve the value via procedures analogous to below
            n_channels = len([[int(channel.text)
                              for channel in group.find('channels')]
                              for group in root.find('spikeDetection').find('channelGroups').findall('group')])

whereas this parameter is also simply within the same .XML file the information is drawn from and should be retrieved by that O(1) operation. Will simply take a little bit of time to go through this repository as well as to_nwb.neuroscope to find them all.

Due to decreased reliance on the older functions, this is propagated upstream. I also think it's probably already been fixed there.


--fcc-actual-- and --fcc-expected-- not working in hints

--fcc-actual-- and --fcc-expected-- are not being replaced by their values in hints:

While in the console the actual and expected values are visible:

To reproduce, go to any challenge that uses --fcc-actual-- and/or --fcc-expected--:
https://www.freecodecamp.org/learn/2022/responsive-web-design/learn-css-transforms-by-building-a-penguin/step-74

Happening for me in hints for step 76: https://www.freecodecamp.org/learn/2022/responsive-web-design/learn-css-transforms-by-building-a-penguin/step-76

@revolving-leslie Thank you for mentioning, but the fix has not been deployed yet.


Assign creatorAddress in handleSubgraphPublishedV2

The creatorAddress field has not been assigned for subgraphs created after 2022-02-23, as the graphAccount param is no longer associated with the SubgraphPublished event for v2.  This PR uses event.transaction.from instead.
Demonstration:
https://thegraph.com/hosted-service/subgraph/mnlesane/graph-network-mainnet
  subgraphs(orderBy:createdAt, orderDirection:desc
  ) {
    id displayName creatorAddress
  }
}```

Hey @mnlesane!
Looks good! I'm going to merge it to mainnet-staging now that we got the workflows back to a state where it's only going to be deploying to staing on pushes there.
I'm also gonna merge #182 there, and check if everything works as expected afterwards, before moving it to production!
Thanks a ton for the contributions and sorry for the long delays!


"Spineni" , "Valea Mare" , "Valea Muierii de Jos" are listed in the drop-down menu

Description:
When user writes ”Spineni" , "Valea Mare" , "Valea Muierii de Jos" the locations appear in the drop-down menu next to the comune and the county which is a part according to the law.
Precondition:
The website is up an running.

Step 1
Write in the search bar "Spineni"

Expected results
The location appears in the drop-down menu as "Sat Spineni, DOLJ (Melinești)".

Step 2
Press "x" button.

Expected results
The location was deleted from the search bar.

Step 3
Write in the search bar "Valea Mare"

Expected results
The location appears in the drop-down menu as "Sat Valea Mare, DOLJ (Melinești)".

Step 4
Press "x" button.

Expected results
The location was deleted from the search bar.

Step 5
Write in the search bar "Valea Muierii de Jos"

Expected results
The location appears in the drop-down menu as "Sat Valea Muierii de Jos, DOLJ (Melinești)".


Authenticator implementation based on token cookie

closed in favor of https://github.com/rancher/auth/pull/8

@prachidamle I rolled back the changes in main.go you added for the fitler bc it was causing me cherry-picking problems. if you need those, you can add them in a separate PR


LogicRom - Arduino platform Blink example EC200U-EU

Dear Guys!
I've tryed test EC200U-EU module, with Arduino platform, but no thing happened when upload done and restart, pls help me this issue. Thank very much!

We need to update Arduino documentation. Please make sure you've followed the steps mentioned:
https://github.com/waybyte/platform-logicrom#get-free-personal-license
If device is already added then make sure to turn in on once (with SIM) and let it activate itself.

Dear
I've inserted the simcard, and module have get an IP OK. but i'dont know how to get license ok.

run getlic command on console

Dear Guys, which port? i send "getlic" but no thing to response :(

Port 0 to run all commands by default. If "devinfo" command shows UID value other than 100, then device is already active. try to flash your program again.
You can also confirm from your account under "Devices" menu -> Action column -> view logs
Also in your application program, make sure you select STDIO port as /dev/ttyUSB0 to see console prints. By default its set to None

I can't view any thing in console although choise configs as you ask.
:(

can you share current selection in Arduino IDE with screenshot?
Also share device IMEI last 5 digits.

Dear, the last part imei: xxxx5054592045

Device with xxxx5054592045 is already activated. Did you rebuild and flash your code after changing STDIO port?

i rebuild and reflash some time, but no happended in Buildin_led (GPIO_22).
below is things i receiver via serial port 2

you opened wrong port, Use an external terminal instead. Open "Unisoc Serial Port 0", which is COM32 in your case.

Sorry, We just realized that Arduino core is not updated after changes to SDK. Its still using old core which is incompatible with SDK. We are working on Arduino update to include network related features as well. I suggest you try Logicrom SDK instead via PlatformIO.
We will update this thread once Arduino update is released.

Many thanks. Pls update soon!!!!

Sorry, We just realized that Arduino core is not updated after changes to SDK. Its still using old core which is incompatible with SDK. We are working on Arduino update to include network related features as well. I suggest you try Logicrom SDK instead via PlatformIO.
We will update this thread once Arduino update is released.

Dear Guys!!
have any update for arduino platform?

Update process will take some time, We have released core update (0.2.0) right now, followed by SDK, Arduino and then platform update.

@Thieuqp please update your setup and verify if things are working with updated Arduino framework.

Thank for support, it is OK!!!!
Pls share more examples for IOT. Thánks

What examples are you looking for?

is the EC200U-EU is Support Interrupt Pins? @ajaybhargav

@moustafasaad1979 yes. interrupt is supported. Please open a different issue as this one is already closed.


Fix issue #831

Issue #831
Now on  scroll progress bar comes at top and fixed at top.

@vishwesh3 This doesn't look that good. You have changed the length of the toolbar by adding the progressbar to the appbarlayout. Please rectify this and squash changes here. Thanks

@mananwason please have a look.

@vishwesh3 Looks better but I believe the gap between toolbar and progress bar should be fixed as well. Please work on that.

@mananwason I tried
android:layout_marginBottom="-8dp" android:layout_marginTop="-4dp"
But i am not able to achieve that. Can you please help me out?

@vishwesh3 Away from my laptop for a few days. Will check and get back to you.

@vishwesh3 the base branch has been updated. Please make a fresh PR with your changes. Sorry for the inconvenience :sweat_smile:


Maintenance: Replace Parcel with kirbyup & more

Hi there, first of all: What a great plugin you have built! Amongst the Panel plugins the one I use mostly.
Without changing the functionality of your plugin, I have update some parts related to its architecture. Each update is split into its own commit.
For example, Parcel is replaced with (obviously 😉) kirbyup. Also, some Prettier rules where dropped, since they solely redefined default values.
I hope those changes appeal to you!

Thanks Johann, I'll check out your changes next week!

Glad to hear. No rush!

Thanks for all your updates to this plugin :+1:
I plan to review your changes later this week.

My refactors and fixes escalated quickly. 🙈 I just enjoyed learning from your codebase and tweaking a few things (hopefully positive for you) in the process. The pleasure was mostly mine. No rush. 🙂

Actually, it's quite interesting to see what you changed and how 😀
Building this plugin was quite a ride because I neither work a lot with Vue nor with PHP (besides what's needed for Kirby).

If you have any ideas on how to improve or extend the UI, feel free to post requests in the issues.

Wow, for your first plugin, it's quite good!
Of course. This (rather extensive) refactor doesn't change any core functionality.

Wow, for your first plugin, it's quite well written!

It's not the first plugin, but the most complex one. And thanks :)

My bad. Slipped through while refactoring. Fixed!
(On a side note, with kirbyup in dev mode, the final source won't be minified, thus I was able to track down the issue quickly.)


escacilhastejo.org

@1chi-13 This domain is already in the repository. I close this request as a duplicate to #16779


AWS Sources Wizard flow should specify report file format

User Story
As a user I want to create a a cost and usage report properly so that my data can be ingested by cost management.
Impacts

UI
Docs

Assumptions

We want to call out that we specifically do NOT want to enable report data integration for Amazon Athena
We want to call out that compression type should be GZIP

UI Details

Options in AWS

Acceptance Criteria

[ ] The wizard calls out not to use Athena
[ ] The wizard specifies GZIP compression

@adberglund do we need a doc update too?

@chambridge Yeah, we do.

Thanks for the heads-up, Andrew! I've created this JIRA to track the docs update: https://projects.engineering.redhat.com/browse/CRCDOCS-200

Created Jira issue https://issues.redhat.com/browse/COST-55


Use Babel transpilation for node-tests

This PR uses Babel to transpile the test code from ES2015 to something that even Node 0.10 can handle. Note that this is only used for the test code, not for the production code (.babelrc is in node-tests subfolder)!

Seems good to me.
@stefanpenner - r?

Abit strange to mix Babel 5 and 6 no?

@stefanpenner true, but then again I don't see a reason for using on an outdated Babel version if we can use the new one without pain here

I'm generally opposed to introducing Babel in node land for reasons of debugging and source maps. If those work nicely then I don't care nearly as much. I would want to limit it to things that aren't part of typical package usage, like tests (which you're already doing).
My opinion is informed by the relative ease with which we can update node to move the ecosystem to things which are already implemented in V8.

@nathanhammond I've limited the installed/enabled babel plugins to just transform-es2015-arrow-functions and transform-es2015-shorthand-properties now. From what I've experienced so far that isn't screwing up the stacktraces in any noticable way.

@Turbo87 With that limitation I'm in favor.

@stefanpenner @trabus r?


GPU and vGPU support for Kubevirt VMs

What this PR does / why we need it:
These are changes to pull pci ids or mdev uuid from the environment variable set by device plugin and create appropriate hostdev devices in libvirt VM xml.
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #2585
Special notes for your reviewer:
Release note:

Provides ability to request Nvidia GPU and vGPU exposed by Nvidia Kubevirt Device Plugin.

Hey @visheshtanksale, on a first very quick look this looks really good already, thanks!
Will do a deeper review later on, even though I'm not that familiar with devices. So additional reviews are welcome.
/ok-to-test

What about the "devices.kubernetes.io" or "devices.kubevirt.io" vendor name?
In the email thread it was discussed to define an interface (env vars and
behavior) that DPs will need to implement in order to work with the device
passthrough impl in kubevirt.
And we'd expect that devices requested with "devices.kubevirt.io" (or "
gpu.devices.kubevirt.io") will implement the defined interface.

What about the "devices.kubernetes.io" or "devices.kubevirt.io" vendor name? In the email thread it was discussed to define an interface (env vars and behavior) that DPs will need to implement in order to work with the device passthrough impl in kubevirt. And we'd expect that devices requested with "devices.kubevirt.io" (or " gpu.devices.kubevirt.io") will implement the defined interface.

+1 for gpu.devices.kubevirt.io

@fabiand and @vladikr
I think having vendor-domain/gpu-name as resource name is more appropriate to gpu.devices.kubevirt.io/<gpu-name> because

Kubernetes device plugin framework  expects resource name to be  vendor-domain/resourcetype. You can find example of some of device plugins developed by different vendors here. Even the Intel SRIOV DP which is used for SRIOV kubevirt implementation has resource name as intel.com/resourcetype
Having resource name as vendor-domain/gpu-name does not impose any vendor specific logic on kubevirt. The resource name is not the interface between kubevirt and device plugin. The env variables having PCI ids and mdev UUIDs is the interface.
Making device plugins expose resource name as gpu.devices.kubevirt.io/<gpu-name> makes device plugins lose their generic behavior. It will impose the specifics of kubevirt on to the device plugins.

2. Having resource name as vendor-domain/gpu-name does not impose any vendor specific logic on kubevirt. The resource name is not the interface between kubevirt and device plugin. The env variables having PCI ids and mdev UUIDs is the interface.

@vatsalparekh I will be fine with this approach only if there are no vendor specific checks in the kubevirt code. Nothing like func IsNvidiaGpuVmi(vmi *v1.VirtualMachineInstance) bool. In the case of SRIOV there is a no such distinguishment as well.

Yes there won't be a need for any vendor specific checks.

@vladikr and @fabiand updated with changes we discussed to make the implementation generic.
@SchSeba  Can you please take a look at the latest change. Now I am using vm spec to request GPU
devices and removed the use of limit & request resource.

Just a general thing regarding to devices, also didn't look into the code, so can be that this is already the case: every device needs a name and should be in the devices section.

@rmohr Yes every GPU device will have name and will be in devices section

@visheshtanksale I haven't dived in yet, but looks great overall.
I think there are several things we should poke at:

what's the testing strategy here? For SR-IOV we have a functional test suite and it's even running as part of the gate. I would at least hope to see a functional suite added for GPUs. Not sure if we can get GPUs delivered to CI hosts and plugged there though. But at least being able to run the suite manually against a compliant cluster would be great.
what's the plan of Nvidia in terms of this device plugin? With Intel SR-IOV DP, while initially it supported just intel.com/ vendor, other companies like Mellanox were accepted in the community and contributed support for their cards in the same code base. Is it similar to Nvidia one? I would hope that they allow contributions from other vendors so that we don't need to support different implementations from different vendors in the future. (They will probably have slightly different ways to pass PCI ID information etc.) It's of course not a blocker, but something that I would like to understand before we merge this code.

I will get back to this PR later with more rigor. Thanks!

@booxter

I will implement functional tests.
We made the interface between Device Plugin and Kubevirt very generic. So any other vendor can very easily integrate with Kubevirt. They can create their own device plugin and interface with Kubevirt. If they are willing to collaborate with Nvidia Device Plugin, we have an Open Source Software group through them will have to run it.

@booxter Added functional tests

/retest

/retest

@visheshtanksale can you please run make generate to fix travis?

I think one of the missing bits is to provide feature gate for the gpu/vgpu passthrough.
Here is an example of a SRIOV PR that also introduced a feature gate for sriov functionality [1]
[1] https://github.com/kubevirt/kubevirt/pull/1732

It might be worth adding an example in examples/vmi-gpu.yaml to see how to see how to show how to request a GPU for a VMI.

@vladikr , @fabiand and @davidvossel as discussed yesterday added feature gate and discoverable list of env variables set by device plugin.

would you mind to also provide an example?

@fabiand @booxter @vladikr Added example yamls and added a link to the device plugin comments above function where environment variables are parsed.

Please run make && make generate and commit the artifacts to make travis job pass.

@vladikr travis job is passing now

@rmohr and @booxter  Updated PR with the requested changes

/lgtm
Since there is no more name conflict in the api, and since it is behind a feature gate the current API works for me.

/hold
/approve
@booxter feel free to unhold the PR if your requests were addressed.

/retest

/retest

/unhold
/retest

/hold cancel

Hey folks, sorry if I missed it but were there docs accompanying this change?

@visheshtanksale I think we dropped the ball here in that we haven't provided documentation for the new feature. Would you mind posting a PR for kubevirt/user-guide repository that would briefly describe how to use the new feature?

@booxter Yes, I will create a PR with user guide.

@visheshtanksale please share the link to docs PR when it's up for review. Thanks!

@visheshtanksale : I'm testing GPU passthrough mode using latest release v0.22.0. However the VM cannot detect Nvidia graphic card. lspci shows:
05:00.0 Unclassified device [00ff]: Red Hat, Inc. Virtio RNG (rev 01)
I tried to install several graphic drivers but didn't help, so would like to ask you two questions:

What is correct definition for deviceName? Is it deviceName: nvidia.com/GeForce_GTX_1050 or deviceName: nvidia.com/gpu
Do I need Nvidia device plugin? Currently kubectl describe worker-node showing nvidia.com/gpu

Thanks a lot for this awesome feature.

05:00.0 Unclassified device [00ff]: Red Hat, Inc. Virtio RNG (rev 01)

This is just the virtio-random-number-generator device. You probably don't have virtio drivers installed.
Leaving the rest to answer for @visheshtanksale

@rmohr @kubevirt-bot
Hi, we have DP for our PCI (new accelerator no GPU), and I wondering if I can use it with the same API and Env Var that you already added to expose our PCI into VM .
please let me know, we really want to check kubevirt for our project.

@vladikr ^^

Any feedback Vladik?

was documentation ever made for this? i had a good dig


fix a few issues with the table filter pop up.

click on the dropdown button will cause the header to be clicked, the fix is to stop the click event propagation.
add a cell value extractor parameter so that we can handle the scenario when data are object.
align the checkbox and text, right now the checkbox is higher than the text.
make the buttons layout horizontally
set initial focus to the ok button when the menu is opened, currently the focus stays on the dropdown button and pressing tab won't move the focus to the filter pop up.
currently if the options can't take up all the available space, there will be whitespace added between the options, I am changing it to remove the extra space.

before

after

Pull Request Test Coverage Report for Build 585290398

0 of 16 (0.0%)  changed or added relevant lines in 1 file are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage decreased (-0.005%) to 43.293%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/sql/base/browser/ui/table/plugins/headerFilter.plugin.ts
0
16
0.0%

Files with Coverage Reduction
New Missed Lines
%

src/sql/base/browser/ui/table/plugins/headerFilter.plugin.ts
1
0.73%

Totals

Change from base Build 582995184:
-0.005%

Covered Lines:
24994

Relevant Lines:
52914

💛  - Coveralls


Update Set-LabelPolicy.md

OutlookDefaultLabel & DisableMandatoryInOutlook advanced settings now supported for built-in labeling

Docs Build status updates of commit 5c980cf:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

exchange/exchange-ps/exchange/Set-LabelPolicy.md
:white_check_mark:Succeeded
View (exchange-ps)

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Closing


Unclear about how to integrate AttentionWrapper with BeamSearchDecoder

TF Version: 1.2.1
I cannot find information about how to integrate AttentionWrapper with BeamSearchDecoder on website / nmt tutorial, in particular how to feed the beam-search-tiled (tf.contrib.seq2seq.tile_batch) states to the attention-cloned (zero_state(...).clone(...)) states.
In my attempt, there seems to be an inconsistency between the requirement of the batch_size of the zero states generated by AttentionWrapper  in the training stage and predicting stage. In training stage, initial state of decoder requires batch size, however in predicting stage it requires (batch_size * beam_width).
the minimal code to demonstrate this problem is:
import tensorflow as tf
from tensorflow.python.layers.core import Dense

BEAM_WIDTH = 5
BATCH_SIZE = 128

# INPUTS
X = tf.placeholder(tf.int32, [BATCH_SIZE, None])
Y = tf.placeholder(tf.int32, [BATCH_SIZE, None])
X_seq_len = tf.placeholder(tf.int32, [BATCH_SIZE])
Y_seq_len = tf.placeholder(tf.int32, [BATCH_SIZE])

# ENCODER
encoder_out, encoder_state = tf.nn.dynamic_rnn(
    cell = tf.nn.rnn_cell.BasicLSTMCell(128),
    inputs = tf.contrib.layers.embed_sequence(X, 10000, 128),
    sequence_length = X_seq_len,
    dtype = tf.float32)

# ATTENTION
attention_mechanism = tf.contrib.seq2seq.LuongAttention(
    num_units = 128,
    memory = encoder_out,
    memory_sequence_length = X_seq_len)

decoder_cell = tf.contrib.seq2seq.AttentionWrapper(
    cell = tf.nn.rnn_cell.BasicLSTMCell(128),
    attention_mechanism = attention_mechanism,
    attention_layer_size = 128)

# DECODER COMPONENTS
Y_vocab_size = 10000
decoder_embedding = tf.Variable(tf.random_uniform([Y_vocab_size, 128], -1.0, 1.0))
projection_layer = Dense(Y_vocab_size)

# TRAINING DECODER
training_helper = tf.contrib.seq2seq.TrainingHelper(
    inputs = tf.nn.embedding_lookup(decoder_embedding, Y),
    sequence_length = Y_seq_len,
    time_major = False)
training_decoder = tf.contrib.seq2seq.BasicDecoder(
    cell = decoder_cell,
    helper = training_helper,
    initial_state = decoder_cell.zero_state(BATCH_SIZE,tf.float32).clone(cell_state=encoder_state),
    output_layer = projection_layer)
training_decoder_output, _, _ = tf.contrib.seq2seq.dynamic_decode(
    decoder = training_decoder,
    impute_finished = True,
    maximum_iterations = tf.reduce_max(Y_seq_len))
training_logits = training_decoder_output.rnn_output

# PREDICTING_DECODER
predicting_decoder = tf.contrib.seq2seq.BeamSearchDecoder(
    cell = decoder_cell,
    embedding = decoder_embedding,
    start_tokens = tf.tile(tf.constant([1], dtype=tf.int32), [BATCH_SIZE]),
    end_token = 2,
    initial_state = decoder_cell.zero_state(BATCH_SIZE * BEAM_WIDTH,tf.float32).clone(
                    cell_state=tf.contrib.seq2seq.tile_batch(encoder_state, BEAM_WIDTH)),
    beam_width = BEAM_WIDTH,
    output_layer = projection_layer,
    length_penalty_weight = 0.0)
predicting_decoder_output, _, _ = tf.contrib.seq2seq.dynamic_decode(
    decoder = predicting_decoder,
    impute_finished = False,
    maximum_iterations = 2 * tf.reduce_max(Y_seq_len))
predicting_logits = predicting_decoder_output.predicted_ids[:, :, 0]

the error message is:
Traceback (most recent call last):
  File "test.py", line 58, in <module>
    initial_state = decoder_cell.zero_state(BATCH_SIZE*BEAM_WIDTH,tf.float32).clone(
  File "/Users/l2015005/anaconda2/lib/python2.7/site-packages/tensorflow/contrib/seq2seq/python/ops/attention_wrapper.py", line 659, in zero_state
    message=error_message)]):
  File "/Users/l2015005/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/check_ops.py", line 317, in assert_equal
    _assert_static(condition_static, data)
  File "/Users/l2015005/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/check_ops.py", line 100, in _assert_static
    raise ValueError('\n'.join(data_static))
ValueError: When calling zero_state of AttentionWrapper attention_wrapper: Non-matching batch sizes between the memory (encoder output) and the requested batch size.  Are you using the BeamSearchDecoder?  If so, make sure your encoder output has been tiled to beam_width via tf.contrib.seq2seq.tile_batch, and the batch_size= argument passed to zero_state is batch_size * beam_width.
Condition x == y did not hold element-wise:
x (AttentionWrapperZeroState_1/assert_equal/x:0) =
640
y (AttentionWrapperZeroState_1/assert_equal/y:0) =
128

@ebrevdo any insight about this?

@JerrikEph @Songweiping @pplantinga
any insight about this?

The error message seems to suggest a fix: tile the encoder output

hi @pplantinga
It is already tiled here:
    initial_state = decoder_cell.zero_state(BATCH_SIZE * BEAM_WIDTH,tf.float32).clone(
                    cell_state=tf.contrib.seq2seq.tile_batch(encoder_state, BEAM_WIDTH)),

I use clone method because of attention wrapper

I see:
Encoder out -> attention -> decoder cell -> beam search(cell=decoder cell)
Without ever getting tiled. I'm not sure of the correct place to tile, however.

I finally get the graph successfully compiled by the following, will further test the running environment and then close the issue if solved
import tensorflow as tf
from tensorflow.python.layers.core import Dense

BEAM_WIDTH = 5
BATCH_SIZE = 128

# INPUTS
X = tf.placeholder(tf.int32, [BATCH_SIZE, None])
Y = tf.placeholder(tf.int32, [BATCH_SIZE, None])
X_seq_len = tf.placeholder(tf.int32, [BATCH_SIZE])
Y_seq_len = tf.placeholder(tf.int32, [BATCH_SIZE])

# ENCODER
encoder_out, encoder_state = tf.nn.dynamic_rnn(
    cell = tf.nn.rnn_cell.BasicLSTMCell(128),
    inputs = tf.contrib.layers.embed_sequence(X, 10000, 128),
    sequence_length = X_seq_len,
    dtype = tf.float32)

# DECODER COMPONENTS
Y_vocab_size = 10000
decoder_embedding = tf.Variable(tf.random_uniform([Y_vocab_size, 128], -1.0, 1.0))
projection_layer = Dense(Y_vocab_size)

# ATTENTION (TRAINING)
attention_mechanism = tf.contrib.seq2seq.LuongAttention(
    num_units = 128,
    memory = encoder_out,
    memory_sequence_length = X_seq_len)

decoder_cell = tf.contrib.seq2seq.AttentionWrapper(
    cell = tf.nn.rnn_cell.BasicLSTMCell(128),
    attention_mechanism = attention_mechanism,
    attention_layer_size = 128)

# DECODER (TRAINING)
training_helper = tf.contrib.seq2seq.TrainingHelper(
    inputs = tf.nn.embedding_lookup(decoder_embedding, Y),
    sequence_length = Y_seq_len,
    time_major = False)
training_decoder = tf.contrib.seq2seq.BasicDecoder(
    cell = decoder_cell,
    helper = training_helper,
    initial_state = decoder_cell.zero_state(BATCH_SIZE,tf.float32).clone(cell_state=encoder_state),
    output_layer = projection_layer)
training_decoder_output, _, _ = tf.contrib.seq2seq.dynamic_decode(
    decoder = training_decoder,
    impute_finished = True,
    maximum_iterations = tf.reduce_max(Y_seq_len))
training_logits = training_decoder_output.rnn_output

# BEAM SEARCH TILE
encoder_out = tf.contrib.seq2seq.tile_batch(encoder_out, multiplier=BEAM_WIDTH)
X_seq_len = tf.contrib.seq2seq.tile_batch(X_seq_len, multiplier=BEAM_WIDTH)
encoder_state = tf.contrib.seq2seq.tile_batch(encoder_state, multiplier=BEAM_WIDTH)

# ATTENTION (PREDICTING)
attention_mechanism = tf.contrib.seq2seq.LuongAttention(
    num_units = 128,
    memory = encoder_out,
    memory_sequence_length = X_seq_len)

decoder_cell = tf.contrib.seq2seq.AttentionWrapper(
    cell = tf.nn.rnn_cell.BasicLSTMCell(128),
    attention_mechanism = attention_mechanism,
    attention_layer_size = 128)

# DECODER (PREDICTING)
predicting_decoder = tf.contrib.seq2seq.BeamSearchDecoder(
    cell = decoder_cell,
    embedding = decoder_embedding,
    start_tokens = tf.tile(tf.constant([1], dtype=tf.int32), [BATCH_SIZE]),
    end_token = 2,
    initial_state = decoder_cell.zero_state(BATCH_SIZE * BEAM_WIDTH,tf.float32).clone(cell_state=encoder_state),
    beam_width = BEAM_WIDTH,
    output_layer = projection_layer,
    length_penalty_weight = 0.0)
predicting_decoder_output, _, _ = tf.contrib.seq2seq.dynamic_decode(
    decoder = predicting_decoder,
    impute_finished = False,
    maximum_iterations = 2 * tf.reduce_max(Y_seq_len))
predicting_logits = predicting_decoder_output.predicted_ids[:, :, 0]

print('successful')

running is passed, this is closed, thanks.

One question about the code: you use two attention mechanism during training and predicting phase. Do they share the same parameters?

@applenob no they don't, here i just do a minimal example to demonstrate the workflow. You are right, we need to control variable scopes in practice.

Thanks for your reply. Do you have any code sharing? Since the two attention as two inputs with different shape, I don't think these two variables can be shared.

Hi, @applenob If you want to have a look at more complex and complete code, you can have a look on my repo (https://github.com/zhedongzheng/finch).

Cool project !

@zhedongzheng, Your complete code can actually work and make sense to me now. Thanks.

您好，我也遇到了同样的问题，为什么需要这个tile呢？

@zhedongzheng

@lmolhw5252  假设beam_width = 5，那么每次decode都需要保持5个最佳state，所以一开始就直接把初始化state复制5份，这就是tile的作用。

This is the minimal fix of code by @zhedongzheng that makes parameters of attention mechanism shared for train and predict decoders:
import tensorflow as tf
from tensorflow.python.layers.core import Dense

BEAM_WIDTH = 5
BATCH_SIZE = 128

# INPUTS
X = tf.placeholder(tf.int32, [BATCH_SIZE, None])
Y = tf.placeholder(tf.int32, [BATCH_SIZE, None])
X_seq_len = tf.placeholder(tf.int32, [BATCH_SIZE])
Y_seq_len = tf.placeholder(tf.int32, [BATCH_SIZE])

# ENCODER
encoder_out, encoder_state = tf.nn.dynamic_rnn(
    cell = tf.nn.rnn_cell.BasicLSTMCell(128),
    inputs = tf.contrib.layers.embed_sequence(X, 10000, 128),
    sequence_length = X_seq_len,
    dtype = tf.float32)

# DECODER COMPONENTS
Y_vocab_size = 10000
decoder_embedding = tf.Variable(tf.random_uniform([Y_vocab_size, 128], -1.0, 1.0))
projection_layer = Dense(Y_vocab_size)

# ATTENTION (TRAINING)
with tf.variable_scope('shared_attention_mechanism'):
    attention_mechanism = tf.contrib.seq2seq.LuongAttention(
        num_units = 128,
        memory = encoder_out,
        memory_sequence_length = X_seq_len)

decoder_cell = tf.contrib.seq2seq.AttentionWrapper(
    cell = tf.nn.rnn_cell.BasicLSTMCell(128),
    attention_mechanism = attention_mechanism,
    attention_layer_size = 128)

# DECODER (TRAINING)
training_helper = tf.contrib.seq2seq.TrainingHelper(
    inputs = tf.nn.embedding_lookup(decoder_embedding, Y),
    sequence_length = Y_seq_len,
    time_major = False)
training_decoder = tf.contrib.seq2seq.BasicDecoder(
    cell = decoder_cell,
    helper = training_helper,
    initial_state = decoder_cell.zero_state(BATCH_SIZE,tf.float32).clone(cell_state=encoder_state),
    output_layer = projection_layer)
with tf.variable_scope('decode_with_shared_attention'):
    training_decoder_output, _, _ = tf.contrib.seq2seq.dynamic_decode(
        decoder = training_decoder,
        impute_finished = True,
        maximum_iterations = tf.reduce_max(Y_seq_len))
training_logits = training_decoder_output.rnn_output

# BEAM SEARCH TILE
encoder_out = tf.contrib.seq2seq.tile_batch(encoder_out, multiplier=BEAM_WIDTH)
X_seq_len = tf.contrib.seq2seq.tile_batch(X_seq_len, multiplier=BEAM_WIDTH)
encoder_state = tf.contrib.seq2seq.tile_batch(encoder_state, multiplier=BEAM_WIDTH)

# ATTENTION (PREDICTING)
with tf.variable_scope('shared_attention_mechanism', reuse=True):
    attention_mechanism = tf.contrib.seq2seq.LuongAttention(
        num_units = 128,
        memory = encoder_out,
        memory_sequence_length = X_seq_len)

decoder_cell = tf.contrib.seq2seq.AttentionWrapper(
    cell = tf.nn.rnn_cell.BasicLSTMCell(128),
    attention_mechanism = attention_mechanism,
    attention_layer_size = 128)

# DECODER (PREDICTING)
predicting_decoder = tf.contrib.seq2seq.BeamSearchDecoder(
    cell = decoder_cell,
    embedding = decoder_embedding,
    start_tokens = tf.tile(tf.constant([1], dtype=tf.int32), [BATCH_SIZE]),
    end_token = 2,
    initial_state = decoder_cell.zero_state(BATCH_SIZE * BEAM_WIDTH,tf.float32).clone(cell_state=encoder_state),
    beam_width = BEAM_WIDTH,
    output_layer = projection_layer,
    length_penalty_weight = 0.0)
with tf.variable_scope('decode_with_shared_attention', reuse=True):
    predicting_decoder_output, _, _ = tf.contrib.seq2seq.dynamic_decode(
        decoder = predicting_decoder,
        impute_finished = False,
        maximum_iterations = 2 * tf.reduce_max(Y_seq_len))
predicting_logits = predicting_decoder_output.predicted_ids[:, :, 0]

print('successful')

To check sharing of trainable parameters execute the following code:
for var in tf.trainable_variables():
    print(var)

For the code above it will output:
<tf.Variable 'EmbedSequence/embeddings:0' shape=(10000, 128) dtype=float32_ref>
<tf.Variable 'rnn/basic_lstm_cell/kernel:0' shape=(256, 512) dtype=float32_ref>
<tf.Variable 'rnn/basic_lstm_cell/bias:0' shape=(512,) dtype=float32_ref>
<tf.Variable 'Variable:0' shape=(10000, 128) dtype=float32_ref>
<tf.Variable 'shared_attention_mechanism/memory_layer/kernel:0' shape=(128, 128) dtype=float32_ref>
<tf.Variable 'decode_with_shared_attention/decoder/attention_wrapper/basic_lstm_cell/kernel:0' shape=(384, 512) dtype=float32_ref>
<tf.Variable 'decode_with_shared_attention/decoder/attention_wrapper/basic_lstm_cell/bias:0' shape=(512,) dtype=float32_ref>
<tf.Variable 'decode_with_shared_attention/decoder/attention_wrapper/attention_layer/kernel:0' shape=(256, 128) dtype=float32_ref>
<tf.Variable 'decode_with_shared_attention/decoder/dense/kernel:0' shape=(128, 10000) dtype=float32_ref>
<tf.Variable 'decode_with_shared_attention/decoder/dense/bias:0' shape=(10000,) dtype=float32_ref>

But without wrapping of tf.contrib.seq2seq.LuongAttention and tf.contrib.seq2seq.BeamSearchDecoder into variable scopes it outputs:
<tf.Variable 'EmbedSequence/embeddings:0' shape=(10000, 128) dtype=float32_ref>
<tf.Variable 'rnn/basic_lstm_cell/kernel:0' shape=(256, 512) dtype=float32_ref>
<tf.Variable 'rnn/basic_lstm_cell/bias:0' shape=(512,) dtype=float32_ref>
<tf.Variable 'Variable:0' shape=(10000, 128) dtype=float32_ref>
<tf.Variable 'memory_layer/kernel:0' shape=(128, 128) dtype=float32_ref>
<tf.Variable 'decoder/attention_wrapper/basic_lstm_cell/kernel:0' shape=(384, 512) dtype=float32_ref>
<tf.Variable 'decoder/attention_wrapper/basic_lstm_cell/bias:0' shape=(512,) dtype=float32_ref>
<tf.Variable 'decoder/attention_wrapper/attention_layer/kernel:0' shape=(256, 128) dtype=float32_ref>
<tf.Variable 'decoder/dense/kernel:0' shape=(128, 10000) dtype=float32_ref>
<tf.Variable 'decoder/dense/bias:0' shape=(10000,) dtype=float32_ref>
<tf.Variable 'memory_layer_1/kernel:0' shape=(128, 128) dtype=float32_ref>
<tf.Variable 'decoder_1/attention_wrapper/basic_lstm_cell/kernel:0' shape=(384, 512) dtype=float32_ref>
<tf.Variable 'decoder_1/attention_wrapper/basic_lstm_cell/bias:0' shape=(512,) dtype=float32_ref>
<tf.Variable 'decoder_1/attention_wrapper/attention_layer/kernel:0' shape=(256, 128) dtype=float32_ref>

where there are extra memory_layer_1/ and decoder_1/attention_wrapper/ being trained.


UpdateSaltParameter

Using the current empty value in salt does not allow the connection to wac after install. Adding  salt:  """"  instead of the currrent salt: "" resolves the issue

@robinharwood, @Xelu86
Can you review the proposed changes?
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team


TypeScript error in config object of enable()

Describe the bug
VSCode gives me the following TypeScript error:
Object literal may only specify known properties, and 'customColorsForSystemBars' does not exist in type '{ config: Config; }'.ts(2353)
(property) customColorsForSystemBars: boolean

To Reproduce
Use the code from the usage example in README.md in a TS project
Expected behavior
There should be no TS error. So either the typings need to be fixed or the documentation.

Actually, the docs are wrong. Following the type hints, this is how the could should look like:
import { SafeArea } from '@capacitor-community/safe-area';

SafeArea.enable({
  customColorsForSystemBars: true,
  statusBarColor: '#00000000', // transparent
  statusBarContent: 'light',
  navigationBarColor: '#00000000', // transparent
  navigationBarContent: 'light',
});

Good catch. I'll update the docs accordingly

Thanks for fixing this so quickly :-)


getting only full words from MLVision text recognizer

Is there any way that I can guarantee that the words I'm getting is the full word? For instance, if I'm scanning a sum on an invoice that look like this "3554 28" can I somehow make sure that I don't get "554 28" or "54 28"? Since the words that are returned doesn't have a space before it.

Hi @GioPalusa,
I'm not an ML expert but the base APIs won't be able to detect that. I suggest you guide the user to put the image into a bounding box as in https://github.com/firebase/mlkit-material-ios/tree/master/TranslateDemo
Otherwise you'd need a custom model or object detection to detect such mistakes.


Add more profiling traces

What does this PR try to resolve?
Someone suggested I look at
zed.
It has some interesting performance characteristics compared to projects I looked at before:

A lot of workspace members
git dependencies
patching with git dependencies

This adds traces that help provide more context for those scenarios when looking at them.

How should we test and review this PR?
Additional information
Some of these areas might be of interest for
optimizing:

On every invocation, we do a git2 copy_to call for each git checkout
On every invocation, we do a du on each git checkout
It'd be great to avoid parsing every manifest in a git checkout but we need to do a full parse to make sure we find all packages (see https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/Redundant.20code.20in.20.60GitSouce.60.3F)
Its suspicious how much time we spend in the "poison" step of resolving when its a no-op

Thanks
@bors r+

:pushpin: Commit 89eb406e4751b80dada86c9c149a507ddd09e6ba has been approved by arlosi
It is now in the queue for this repository.

:hourglass: Testing commit 89eb406e4751b80dada86c9c149a507ddd09e6ba with merge 8519ad266d15bcbf5cd88deb273730c5b125f57e...

:sunny: Test successful - checks-actions
Approved by: arlosi
Pushing 8519ad266d15bcbf5cd88deb273730c5b125f57e to master...

:sunny: Test successful - checks-actions
Approved by: arlosi
Pushing 8519ad266d15bcbf5cd88deb273730c5b125f57e to master...

:eyes: Test was successful, but fast-forwarding failed: 422 Changes must be made through a pull request.


Lots of bogus intellisense errors

I'm not sure whether I have something misconfigured or if this is a "known issue" but when I open any of the C# files in either Visual Studio or VS Code I get tons of intellisense errors, including complaints about things like System.String and void not being found (screenshot below). I've mainly been working in https://github.com/yoDon/Electron.NET-React-Typescript-MobX but I also get the same errors when looking at the main Electron.NET repo.

Mhh.. Electron.NET-React-Typescript-MobX works on my system...
When does the mistake come?

So no intellisense errors when you open one of the C# files in Visual Studio to look at it? (like the above image)

No I get no intellisense errors.. I used your currently master sources:

Drat. I'll spend some time deleting my visual studio prefs and hope for the best. Close this as no repro or leave it open for a bit in case others have similar reports?


Move grafana export plugin to self hosted repository and register in the Plugin Registery

Rationale

With the deprecation of if-plugins we are required to move the grafana-exporter.
Implementation details

Move the grafana-exporter plugin to own repository. @perkss
Register the plugin with the new plugin registry
Remove the code from if-plugins

Priority

2
Scope

N/A
Size

6
What does "done" look like?

Plugin removed from this repository, hosted by @perkss and registered in plugin registry
Does this require updates to documentation or other materials??

Only applicable in this code
Deadline

Acceptance criteria

Plugin code copied into new repository and then this code can be removed
https://github.com/Green-Software-Foundation/if-plugin-website?tab=readme-ov-file#plugin-governance

@jmcook1186 can you assign this to me please?

sure - thanks @perkss
also added it to the IF project board just so we can keep track

You can just add a deprecation notice to the if-plugins version for now instead of actually removing anything from if-plugins. That way we don't break anything before we've had time to warn our users and give some grace period. @perkss

New plugin repo: https://github.com/perkss/grafana-export

@jmcook1186 do you have an example of the deprecation notice to put? Or the style I should use? Just in the docstring like this: https://jsdoc.app/tags-deprecated?


Download isn't working

If you click on the download tab and then on the button, it says 'downloading...' and stops there.
Safari 10.0.1
Mac OS 10.10.5
Cheers

Hi,
I've just tried to download some data using Safari Version 10.0.1 (116<IP_ADDRESS>.7) on MacOSX 10.11.6 without any problems. Could you please tell us which data set (search set) did you try to download? And in addition, could you try to download these data by using another browser like Firefox or Google Chrome? There is/was an issue (bug) in some Safari versions, maybe it's related.
Thanks, Hans

I tried using Firefox 50.0. The problem persists.
I picked up questions EA202,042,090 from the EA (pop size, subsistence, political complexity).
Thanks!

Thanks a lot for the hint!!
Now this bug should be fixed.
Could you please re-try to download the data in question?
Cheers, Hans

Seems to be fixed. Reopen if it's still an issue.


add dependencies to plugin model

fixes #424

Any updates?

@yogyagamage could you review and merge this one? thanks!

cleaning old PRs


Add privacy-policy and T&Cs pages

The privacy policy outlines what data we collect about requests to https://polyfill.io and what we do with that data.
The terms of service document describes what you can expect from us when you use Polyfill.io on your site, and the actions you as a user might take that would cause us to revoke your access to Polyfill.io.

:+1:


Maintenence

Hello, I am willing to take over maintaining this crate.

Hi @l1npengtul, thanks for your interest. Seems like you have a cool project going with nokhwa! How would you prefer the transfer? Would you like it transferred to yourself, or should you start an organisation?

Either works fine, I don't mind.
Thank you for the intrest in nokhwa!
I'm currently using it as a backend and it is in my intrest that this crate continue to be maintained. I'm currently writing a feature to add polling frames to the StreamHandle.

The approach I used for the StreamHandle is a bit unwieldy, I never got to changing this so one could change parameters on the camera, developments here are much needed, and I am happy to pass the torch on to see this happen.

To transfer the repository, your fork at l1npengtul/libuvc-rs needs to be deleted

I plan on consolidating the device, streamh, etc. and using a singleton for the Context. If you take a look at the nokhwa source (note: not built due to errors) it needs ouroboros and is generally unweildy to use. Consolidating should make it in line with other crates such as V4L.

Ok will do

Deleted my fork.

Hope you got the invites from crates.io so you can publish on there too

I did, thank you!

I'll proceed to close this now. Thank you!
My current priority is getting AVFoundation support in nokhwa, but after that I will definatly come back to more activly maintain uvc

Thank you so much for adopting it!


Error when use pretrained-glove embeddings

Hi Ruotian Luo, thank you for your excellent codes.
But I have a problem. I want to use pretrained-glove vectors as initial embeddings and set input_encoding_size=300(which is glove vector dim), and set embed[0].weight.requires_grad = False for theg first 10 epochs. But when the first 10 epochs in done, I set embed[0].weight.requires_grad = True. Here is the problem: when loading optimizer from optimizer.pth, it throws an error like this:ValueError: loaded state dict contains a parameter group that doesn't match the size of optimizer's group.
I guess it's because I set embed[0].weight.requires_grad = True , but I don't know how to fix the peoblem.Could you help me ? Thanks.

For now, you can remove loading optimizer part.


Add hint question buttons that explain or point to documentation for the terms / concepts.

Have question buttons that show hints about what a concept / object means in Service Fabric world or points to online documentation where we can read more.
For example, if a page (eg. the cluster essentials page) talks about seed nodes - what are those?
Or unhealthy evaluations - link to the Service Fabric health model that explains them in depth.

Sorry missed this when I created #117 - Can we close this and track on the other issue?


[Search] Should filter remote content via a setting

Steps

Create a standard search element as described in the docs.

  <input class="prompt" placeholder="Search" type="text">

Set the url in the apiSettings to an API's endpoint from where JSON data (in the same format as mentioned in the docs) will be received.$(document).ready(function () {
  $('.ui.search').search({
    apiSettings: {
      url: 'https://example.com/some/api/endpoint'
    },
    filterRemoteData: true,
    showNoResults: true,    // or false, not important
    fullTextSearch: 'exact' // or true, not important
  });
}

Type anything in the search input field.

Expected Result
The search results should have been filtered on the client-side based on what's typed in the input field.
Actual Result
All of the remote content is listed in the results, no matter what is typed in the search input. No filtering is done by Semantic on the client-side even though filterRemoteData: true is set as mentioned in the docs for dropdown. The same should work for the standard search element too.
Version
2.3.3
Testcase
(Will set up a sample JSFiddle later as my project isn't public yet.)

Try recreating the issue using this JSFiddle  then it doesn't harm your private project.


MinimalLib Build Issue

Describe the bug
was trying to build the MinimalLib and ran into a build fail with this error:
Seems like an issue with rapidjson.
rdkit-temp/src/rdkit/External/rapidjson-1.1.0/include/rapidjson/document.h:319:82: error: cannot assign to non-static data member 'length' with const-qualified type 'const SizeType' (aka 'const unsigned int')
[exec]   319 |     GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
[exec]       |                                                                           ~~~~~~ ^
Configuration (please complete the following information):

RDKit version:  2024.03.3
OS: macOS version 14.3.1 (23D60)

@Suganesh-repo This issue has already been fixed in master.
If you apply to Code/MinimalLib/docker/Dockerfile the last block in this patch:
https://patch-diff.githubusercontent.com/raw/rdkit/rdkit/pull/7550.diff
you will be able to build MInimalLib.
I am therefore closing this bug.


Use prefix instead of name

name - The unique name of the session. This is useful when applying multiple rate limiters with multiple stores.

The prefix property was added as an optional property in the Store interface in v6.11.1 for the same purpose, and is taken into account by the singleCount validator.
Renaming name to prefix (just the store interface property, no need to change the sql schemas/queries) will help avoid issues like #393.

Thanks,
Vedant

Hi, would https://github.com/adrianprelipcean/express-rate-limit-postgresql/commit/ce3bde2989b9b65f44b68525308f91c8b68174df be sufficient?

It's great!


[CB-7635] Moving RAZ deployment to main node

Moving RAZ deployment to main node
Closes https://jira.cloudera.com/browse/CB-7635

lgtm, tested it.


subclassing React.Component prevents property not found errors

In subclasses of React.Component, calling non-existent methods is not an error.
With Flow 0.18.1, this fails to type check:
/** @flow */

class Foo {
  hello() {
    return this.goodbye();
  }
}

hello.js:5
  5:     return this.goodbye();
                ^^^^^^^^^^^^^^ call of method `goodbye`
  5:     return this.goodbye();
                     ^^^^^^^ property `goodbye`. Property not found in
  3: class Foo {
           ^^^ Foo

Found 1 error

If I make Foo subclass React.Component, though, Flow has no complaints:
/** @flow */

var React = require('react');

class Foo extends React.Component {
  hello() {
    return this.goodbye();
  }
}

No errors!

Following https://github.com/facebook/flow/issues/277#issuecomment-152767982, I can fix this by using a more cumbersome type:
/** @flow */

var React = require('react');

class Foo extends (React.Component : typeof ReactComponent) {
  hello() {
    return this.goodbye();
  }
}

(yields same error as above)
I would expect the second example to produce errors, so that the complex subclass declaration isn't necessary. cc @cloudkite

Have you tried either a) adding .*/node_modules/react/.* to the [ignore] section of your .flowconfig or b) using a recent pull from GitHub (at least including 189b109c422fc3fcf8bec97a9598c40ca02add01) that should fix #447?

[ignore]-ing .*/node_modules/react/.* does fix this. Thanks for the tip!


NuxtJS 2.4.3 Project Build Error

I'm getting the following error on pretty much the same code as one of the running instances in now -- this has worked before. And any of the old code that has built in the past is still erroring out.
FATAL  Nuxt Build Error                                              02:56:33
  at WebpackBundler.webpackCompile (node_modules/@nuxt/webpack/dist/webpack.js:5263:15)
  at <anonymous>
  at process._tickDomainCallback (internal/process/next_tick.js:228:7)

[...]

Error: Exited with 1
    at ChildProcess.child.on (/tmp/utils/node_modules/@now/build-utils/dist/fs/run-user-scripts.js:15:22)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)

Sorry to hear! Would it be possible for you to share a project so we can reproduce this? You could for example remove codes or modules from your code until it's a minimal breaking build.

@juliangruber I posted this in spectrum.chat also... I bet there is some webpack error, but it seems that the build process is not recording the complete log output.

A lot of changes have been made to logs in the last year.
In particular, if a log output is over 4KB, you'll see a warning that it was truncated.
Are you still experiencing this problem?


Unable to use the connector with key-pair authentication

I am having the following settings :
passphrase=os.environ['PRIVATE_KEY_PASSPHRASE'].encode()
private_key_path=Path(os.environ['PRIVATE_KEY'])

DATABASES = {
    'default': {
        'ENGINE': 'Engine',
        'NAME': 'NAME',
        'SCHEMA': 'SCHEMA',
        'WAREHOUSE': 'WAREHOUSE',
        'USER': 'USER',
        'PASSWORD': '#',
        'ACCOUNT': 'ACCOUNT',
        'OPTIONS': {
            'role': 'ROLE',
            'private_key_file': str(private_key_path),
            'private_key_file_pwd': passphrase,
        },
    }
}

Getting the following error:
Object 'DJANGO_MIGRATIONS' does not exist or not authorized.

Where DJANGO_MIGRATIONS is one of the tables in snowflake, which I am able to access through console, the error is there even when I am not providing the password, otherwise I am facing the following error :
django.core.exceptions.ImproperlyConfigured: settings.DATABASES is missing 'PASSWORD' for 'django_snowflake'.

What version of this package are you using? You shouldn't get a password required error since django-snowflake 4.2 (with<PHONE_NUMBER>6e5b64e7c8aa944f341d3e877af38a).
What command are you running when you get the error?
How did you create the django_migrations table if you face this error? You can make sure it's not a database/table permissions issue by using manage.py dbshell as in #45.

Okay, let me know the results of your investigation. Currently, it's unclear whether django-snowflake is at fault.
It also seems as if you may have a typo in your configuration if you're getting the "missing PASSWORD" error while also specifying private_key_file (or else there's a subtle bug I'm missing). See:
https://github.com/Snowflake-Labs/django-snowflake/blob/1b867efa8924dc50c63149f099b8d084eaabc13e/django_snowflake/base.py#L93
https://github.com/Snowflake-Labs/django-snowflake/blob/1b867efa8924dc50c63149f099b8d084eaabc13e/django_snowflake/base.py#L115-L116

If you have any additional information, please leave a comment.


Fix "$dropdown-link-hover-color" variable color value in _variable.scss file

Issue no: #34746
Changed: $gray-900 to $dropdown-link-color variable in line number 1170

Okay! Thanks


Ceanna

About to merge the new changes

I just realized that I spelled sign up wrong. I don't want to mess it up more. When someone has access to it, can we change it.


US888078: Stop creating uber jar

https://internal.almoctane.com/ui/entity-navigation?p=131002*6001&entityType=work_item&id=888078

A developer build has not yet been created for this branch. Click here to go ahead and create the build...


CCLabel: border artefacts when initially rendering characters

Observed in Nibbles project here. On initial load, menu labels have borders around characters, however the label should be a solid white character.
When returning from another layer, the menu labels however are correctly rendered.

I have the same issue in my own project, and have also noticed those weird artifacts in the Nibbles project. It's even visible in the screenshots on the project page.
I don't see the same issue in the GoneBananas sample, but it's using CCLabelTtf (with packaged content).
Also, I've noticed that if I use BlendFunc = CCBlendFunc.AlphaBlend for a CCLabel, the result is much better (but not perfect, still a few artifacts appear).

The Unified Label rewrite of CCLabel has confirmed to fix this problem.  See issue https://github.com/mono/CocosSharp/issues/37


declare-stylable prefix

Firstly, good work! I'd love to try this on my latest project.
For the sake of future compatibility with some legacy custom views and code suggestion friendlier notation, can you prefix your custom declare-stylable with sw_ or something?

Thank you for the suggestion, I will add my own prefix on the next update.

I already push new update with a prefix for custom declare-styleable.
Thank you

Thank you, I'll give the library a shot and million thanks for beautiful control widgets with built-in custom font support!


Error while solidifying 1286798

2019/12/23 14:03:03 [ INFO ] Tangle: Run solidity check for Milestone (1286798)...
2019/12/23 14:03:03 [ INFO ] Tangle: Solidifier finished (10): passed: true, tx: 26, collect: 273.76µs, total: 688.355µs, entryTx: 0
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x99a032]

goroutine 406825 [running]:
sync.(*RWMutex).RLock(...)
        /usr/local/go/src/sync/rwmutex.go:48
github.com/gohornet/hornet/packages/syncutils.(*RWMutex).RLock(...)
        /__w/hornet/hornet/packages/syncutils/syncutils.go:15
github.com/gohornet/hornet/packages/model/tangle.(*Bundle).IsComplete(0x0, 0x0)
        /__w/hornet/hornet/packages/model/tangle/bundle.go:630 +0x32
github.com/gohornet/hornet/packages/model/tangle.(*Bundle).IsValid(0x0, 0xe97500)

YWWI9WKZ9999
2019/12/23 14:02:42 [ INFO ] Tangle: Run solidity check for Milestone (1286798)...
2019/12/23 14:02:42 [ INFO ] Tangle: Milestone couldn't be solidified! 1286798
reqQ: 00164, reqQMs: 1286819, processor: 00273, LSMI/LMI: 1286797/1286847, addrsMarked

all my nodes stopped/crashes because of this

I had the same problem and 3 of 4 nodes crashed at milestone 1286798.
hornet.log

none of my 3 hornet nodes crashed at 1286798, but one of them logged something interesting:
2019/12/23 04:03:11 [ INFO ] Tangle: Invalid milestone detected! Err: Index (1286798) older than solid milestone (1286798), Hash: CGK9MENROXXZGLMGFVQJVNSWUFOJWKNZDSKLHQMVHRIADVDLZPEAOTOLUXBGCNOCOIPQOUBDQMMUA9999: invalid milestone
attaching log from all nodes and matching 1286798
hornet nodes and LMI 1286798.txt


Exposing versions constants or enum

Hello @ramsey , I'd like to add an improvements suggestion for this amazing package.
It would be great if you can expose constants for algorithm versions in your package (the same as you use on the PeclUuidTestCase - eg, UUID_TYPE_TIME and UUID_TYPE_RANDOM.
My suggestion is to expose constants or an enum (using something like myclabs/enum package).
This would help us avoiding magic numbers in cases where we would like to enforce a certain version of UUID. Suppose I wanna enforce all my ids to be UUID4.
Right now it require me to enforce it using magic numbers, or implementing constants into my own application, or implemeting an enumeration with them.
Including this can make your package more self contained for that kind of situation.
Thank you in advance.

Hey @ramsey , thanks for replying so promptly.
I'm writing a tutorial about architecture best practices. One of the requests is to use UUID and make sure it is a UUID4 type for all of our entities. Cuurently I have this method implemented on our AbstractEntity class:
  const UUID_TYPE_RANDOM = 4;
...
    /**
     * @param UuidInterface $uuid
     * @return UuidInterface
     * @throws InvalidUuidStringException
     */
    private function isVersionValid(UuidInterface $uuid)
    {
        if ($uuid->getVersion() !== self::UUID_TYPE_RANDOM) {
            throw new InvalidUuidStringException('Not supported version: '.$uuid->getVersion());
        }

        return $uuid;
    }

So if a UUID5 for example is passed, the entity itself won't accept it.
I had an issue while writing this before, because PHPStorm used to highlight a constant with that name (UUID_TYPE_RANDOM), luckly my tests failed soon, and I realized that constant is valid only within a test. This lead me to suggest this implementation.

Hi. I've added 3 different ways to do this as pull requests.

Thanks for your help implementing this! I've merged #177 into master and have tagged the 3.7.0 release with these changes.

I thank you for accepting my contribution. I've learned a lot with this well curated and tested package.
Definitively we need more like these into php community.


Fixed-363: Rename cmd/tf_operator -> cmd/tf-operator

This change is

@googlebot I signed it!

/ok-to-test

@AK-ayush There is an error: http://testing-argo.kubeflow.io/timeline/kubeflow-test-infra/kubeflow-tf-operator-presubmit-tfjob-e2e-393-939f560-47-d93b;tab=workflow;node=kubeflow-tf-operator-presubmit-tfjob-e2e-393-939f560-47-d93b-1324692206:logs
Please slove it.

@gaocegege Thank you so much for your help. I have fixed the error, now only Travis CI is failing and I don't know what to do to resolve it.

@AK-ayush
Thanks for your contribution, the PR LGTM. But I think it is better to update the Directories Layout in developer_guide.md.

@AK-ayush No worry about the Travis CI, it is not caused by your code.

Thanks @gaocegege
I have updated the developer_guide.md as per your suggestion.

@AK-ayush LGTM. Thanks for your PR. Welcome to our slack channel and we have a topic #tf-operator. And feel free to pick up more issues and we are friendly to new contributors :)

Thanks!! @gaocegege, This made my day since it is my first PR to any opensource organisation. Looking forward to solve more issues. And I have joined the slack channel.


Remove Microsoft CLA and bot

I think that we should remove the section on Microsoft CLA and the bot validating PRs.
Same section is here as well: https://github.com/kedacore/keda/blob/master/CONTRIBUTING.md

+1 we should also install the DCO bot https://probot.github.io/apps/dco/

this should be done ASAP and along with dropping the MS CLA

I installed it now, feel free to tweak but it should be part of every repo: https://github.com/organizations/kedacore/settings/installations/7359869

@caniszczyk thanks, seems like I don't have enough permissions to see the link and tweak the setttings.

Same section is in here as well:
https://github.com/kedacore/keda/blob/master/CONTRIBUTING.md
@caniszczyk is there any recommendation on Contributing from CNCF side? Anything that we can put in that section to comply with CNCF standarts.

Paging @jeffhollan since I can't do this as well!

for CONTRIBUTING.md examples, you can see a fancy one from Envoy https://github.com/envoyproxy/envoy/blob/master/CONTRIBUTING.md

Ok if I assign this one to you @zroubalik as it looks like you'll pickup the contributing file?
I'll include @jeffhollan for the DCO app as well.

Re-opening until app is installed

@tomkerkhove if I am not mistaken, DCO app is already installed, but we need to remove the microsoft cla bot.

@zroubalik is it installed on all repos?
We'll need @jeffhollan to remove the Microsoft CLA bot as I'm nto an owner

DCO is installed on all repos

I have contributed the first time today and it was really easy and  straightforward to use DCO. I think it is a really nice integration! :+1:

Made request to open at microsoft to remove the CLA bot. Should be done within 24 hours. If it takes too long I can always just remove access from the org, but suspect should go through w/out issue

It's still here (at least on docs), how do we remove it @jeffhollan ?

I just found the confirmation from a few weeks ago that it has been removed from the org. Is it still popping in? Or do we just see it still has permissions? I'll just remove it from the org so should solve all

Ok, the deed is done. The CLA bot should be completely gone

Great, thanks! Will re-open if it shows back up!


Collects, persists and displays the status of a middleware deployment.

Fixes #9250

please follow this guide on how to link it to the issue it resolves (you are missing a keyword)
https://help.github.com/articles/closing-issues-via-commit-messages/
and please also add a screenshot of what you've added here

@miq-bot assign @abonas

@ammendonca please also review

Moved the code to be ready for HWKMETRICS-393. Not it does fetch all the availabilities on the fetch_availability method (still one per request, but ready to replace).

I have tested this locally and it seems there's an issue with fetching the availability, which makes the refresh fail and thus no servers are added.

Confirmed from wireshark that it is on availability endpoint:

I'm using Hawkular from master.

@ammendonca is this already working for you or the error still occurs?

Yes, I am still facing the issue, and it seems to be this issue: https://github.com/hawkular/hawkular-client-ruby/issues/69
After investigating, the header was forbidden when metrics were integrated with hawkular-accounts, but it is not integrated anymore (https://issues.jboss.org/browse/HWKMETRICS-399) and the header is required again in latest version.
I've tested with latest hawkular-services (which includes metrics 0.16.0.Final+) and with it, it works fine.
Other than that, would just fix the coherency in deployments list view, the row is called "Enabled/Disabled" and the values are "True" or "False". Would call the row "Status" (also would change it in deployment detail view) and show the value as "Enabled" and "Disabled" (or "Stopped", think that's what we used in Hawkular).

@ammendonca I'm having problems changing the display value on the list view. It doesn't seem to support something like 'app/helpers/middleware_deployment_helper/textual_summary.rb', do you know of way to achieve this?
I could change the database to use a string instead of a boolean and store 'enabled'/'disabled' (or 'stopped'). WDYT ?
// cc @abonas

I think it would be good to change it to string, since deployment status is actually a string as well and can be "OK" (deployed and enabled), "STOPPED" (deployed but not enabled) or "FAILED" (failed to deploy due to dependencies or other runtime error).

@ammendonca Hawkular-master (alpha11) is no longer supported. All work happens against hawkular-services now.

@josejulio @ammendonca if indeed the status can hold more than 2 values, then I think it would be more correct to convert it to string, otherwise we won't be able to reflect the status correctly in manageiq.

Ok, I'll change it to string and rename it to 'status' instead of 'enabled'

Did the following changes:

Renamed enabled to status and made it a string
Updated to use hawkular-client 2.2.0 (fetching all availabilities on one call)
Updated screenshots

@miq-bot assign @ammendonca

@ammendonca please give this a review since the code was updated. thanks!

LGTM

@miq-bot assign @chessbyte


[red-knot] Remove match pattern definition visitor

Summary
This PR is based on this discussion: https://github.com/astral-sh/ruff/pull/13147#discussion_r1739408653.
Todo

[x] Add documentation for MatchPatternState

Test Plan
cargo insta test and cargo clippy

Is there a need for CurrentMatchCase to be separate from CurrentAssignment, or could it just be an enum variant of CurrentAssignment?

Is there a need for CurrentMatchCase to be separate from CurrentAssignment, or could it just be an enum variant of CurrentAssignment?

That's a good point. The reason for using a separate struct is because the definition isn't based on ExprName but using an Identifier. We could include it in CurrentAssignment but it can't be used inside visit_expr and it would involve two unwrap call (a) for current_assignment being an Option and (b) for CurrentAssignment to get the expected variant (e.g., self.current_assignment.unwrap().as_match_case().unwrap()).

Makes sense! That seems like a solid enough reason to me.


License?

There is no mention in this repository of the license under which this software is provided.
For my own personal use, I have modified express_line a bit, so I would like to know if I can redistribute the code.

Yeah, sorry about that. It's MIT, so you can do whatever you like (or feel free to submit PRs and I will try and respond)

(I have added in latest commit)


[add-resource] New Plugin

I would like to add my new plugin to the Grav Repository.
Here are the project details: https://github.com/jimblue/grav-plugin-tinyseo
Thanks

Will add soon.. cheers.

Added.

thanks @rhukster

Hi @rhukster, I don't see the plugin in GPM, should I wait?


[mempool] Migrate old flaky Mempool tests to new test framework

Motivation
Several tests have break for no reason since they're based on an event system that's unreliable since they're serialized though, the order is indeterminate (MempoolNotifications).
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Current tests replace most of the old tests

:broken_heart: Test Failed - ci-test

/land


Display Better Error When API Host is not Set

Display an error message informing the user to set the API host if it is not set
Add test to ensure error message is displayed
Fixes https://github.com/openwhisk/openwhisk/issues/979

PG2 395.

I'm set to merge this. @mdeuser can you give it a quick look over?

@dubeejw - Can you help me understand why the property get and sdk install commands were exempted from displaying the "API host is not valid" error.

@mdeuser, only bashauto is exempt from sdk install as it does not require a connection the the API host. The auto-complete script is generated by Cobra. Only those property get commands that do not require the API host are exempt.

Deferring to @mdeuser.

@mdeuser, any other comments on this one?

@dubeejw - Minor follow up comment re: clarity.  Boolean variables with the names isPropertyGet and isPropertSet are slightly confusing as these do not really reflect if the property get and property set commands are used in all cases (i.e certain command options are excluded from this boolean for a particular reason)

@mdeuser, I made some changes based on your last comment.

@dubeejw - Would you please rebase.  I'll merge once the rebase is complete.


azure.storage.blob 12.x compatability

https://pypi.org/project/azure-storage-blob/ 12.x was recently released. Some things broke.
In [1]: import adlfs
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-fd1e7da2cebf> in <module>
----> 1 import adlfs

~/sandbox/dask-adlfs/adlfs/__init__.py in <module>
----> 1 from .core import AzureDatalakeFileSystem
      2 from .core import AzureBlobFileSystem, AzureBlobFile
      3
      4 __all__ = ["AzureBlobFileSystem", "AzureBlobFile", "AzureDatalakeFileSystem"]

~/sandbox/dask-adlfs/adlfs/core.py in <module>
      7 from azure.datalake.store import lib, AzureDLFileSystem
      8 from azure.datalake.store.core import AzureDLPath, AzureDLFile
----> 9 from azure.storage.blob import BlockBlobService
     10 from fsspec import AbstractFileSystem
     11 from fsspec.spec import AbstractBufferedFile

ImportError: cannot import name 'BlockBlobService' from 'azure.storage.blob' (/Users/taugspurger/.virtualenvs/filesystems/lib/python3.7/site-packages/azure/storage/blob/__init__.py)

I think I'll need to check this with my changes

For the time being, we've pinned the version of the azure-storage package to <3.0

Recent push to master uses azure storage blob.  Need to pin in requirements.


Create a Full LOB Demo Application

The biggest hangup for the adoption of new SPA frameworks / technologies is a lack of meaningful demo/reference applications.
Please consider developing AND maintaining a reference LOB app that:

Uses activity based security, not just role based
Has a menu system that reflects #1
Has complex CRUD forms that reflect real world complexity
Has reporting that reflects real world usage of BI. i.e. allows the user to enter Start and End Date, select options, etc.  This also needs to be exportable to Excel and PDF.
Uses SQL Azure or MS SQL Server 2016 (or later) for data storage
Has business logic / security checks on the SERVER as well as in the client.  Web API !
Does NOT require EntityFramework. NPoco or PetaPoco would be excellent.
Does NOT use Dependency Injection (DI) beyond what is required by ASP.NET / OWIN, etc.
DI makes apps harder to understand / debug and that is the opposite of what a reference app should embody.
Yes, this would require expressing an opinion on the best way to do things, but an "opinionated" demo will go a long way to getting developers PRODUCTIVE sooner rather than later.

A good chunk of developers prefer to learn by inspecting a working system.
Too many GitHub projects rely on developers learning from the unit tests, Wiki, overly simple demo apps.
Also, having a single well thought out reference app (either instead of or in addition to) the traditional sample apps repository with 50+ VS projects, will  make it faster for developers to understand the "How do I" questions.
Do this correctly and Blazor will see an uptake faster than Angular or React ever saw !

That's a really neat idea. I'd like to be able to contribute to this project.

@AZDeveloper777 @betimd lets create a repo Blazor-Enterprise-Demo and help out, although I disagree with point 8 as IMHO DI helps test and debug and allows swapping out components without major rework when testing or when need in debugging production issues

I disagree with item 7 and 8, but I think the idea is very good. On these items, they could assemble models with Entity Framework, and without, the same for Dependency Injection

This might be best done as a separate community project, but I'll tag it as backlog for now.

I agree with @SteveSandersonMS. So @grahamehorner let's create a repo and start working there, and from this topic we can invite people who wants to join. Agree?

@betimd I've just created a public org in git for this reason see https://github.com/aspnet-community-demos

@grahamehorner I would like to help with this as well

I'd love to help with the reference app but my time is quite limited for the next few months.  I'll contribute where I can.

I think DI definitely helps developers understand what's happening because it's a one-stop shop to go find all your components.  Entity Framework is fine PROVIDED it's not being used ASPNET Identity or anything else that abstracts and obscures the actual processes involved.
I would very much like to help with this project.

I have an idea for a project which is a gap in the existing templates and I believe would be a killer app which would be immediately useful to hundreds, if not thousands of users.
Currently there is no GUI for managing users/roles/claims in ASP.NET Identity Core and there are a lot of people trying to fill that gap - mainly by developing their own code in the absence of an official solution.
For ASP.NET membership there was ASP.NET Website Administration Tool (WSAT) and for ASP.NET Identity there was Identity Manager by Brock Allen and a port to .NET Core was attempted by Frantisek Skorunka.
I think this would be a great way to showcase the abilities of Blazor and could be used as a starter project for many in their own apps.  I know it would imply using EF Core and ASP.NET Identity Core, but these are Microsoft technologies which many .NET users are already familar with or are learning.

I think the users/roles/claims is a good start but Activity based security is what I'd like to see.

@AZDeveloper777 I would imagine that activity based security could be achieved using claims based authorization.  Something like a DeleteUser policy containing “Delete User” claim so only certain users can remove accounts.
Also I would suggest that initially the SQLite database provider be used as it would lower the setup barrier for new users as it's zero configuration and serverless.  It should be relatively trivial to change to SQL Server later if needed.

You do know that you can create a policy that has multiple claims and apply multiple policies to actions on controllers?  using these claims client side is possible by generating a JWT with these claims within the token; blazor clients can then evaluate the claims to change the UI, however it’s always best practices to server side validate claims for request regardless as client code isn’t secure

@grahamehorner I think that the point of the demo/reference application is to incorporate both client and server side code, i.e. a real world application.  Maybe I'm missing your point.  Yes, claims could be used to evaluate who sees what UI at the client, but they would also be enforced on the controller actions.
BTW, can point me to the user management tool in aspnet/security - it isn't easily located or advertised.

Apologies wrong repo https://github.com/aspnet/Identity is where the work is

Apologies wrong repo the UI code is https://github.com/aspnet/Identity/tree/dev/src/UI/Areas/Identity/Pages/Account/Manage

OK, but that's all user facing account management.  I'm talking about site account management, i.e. adding users, changing roles/claims, locking users etc.

Most of the claims based security guidance recommends declarative claims checks in your code.
i.e. https://docs.microsoft.com/en-us/aspnet/core/security/authorization/claims
Activity based security uses Attributes to decorate classes and methods.  At runtime, the system method calls against a database table of Users authorized for Activities to see if THIS user is authorized for the Activity attribute(s) on this method / class.
Hardcoding employee IDs into security checks a la the article I linked is a very bad "code smell" IMO.

Note the date 2016 see https://docs.microsoft.com/en-us/aspnet/core/security/authorization/policies

Also, can we PLEASE use INT instead of GUID for User ID's in the reference app ?
A proper LOB application will be storing User ID's for certain things in the system (i.e. authorizing a Purchase Order).  I do believe the "science" has been settled that doing joins between tables with INTs is faster than doing GUID joins.

can we please take these discussions onto the aspnet-community-demos as these are off topic and while they may use blazor they aren’t discussions for the development of blazor @d-dizhevsky and myself are happy to discuss the type of demo features you would like to see and work with you to provide good examples of secure client server business type application and using  blazor/mono web assembly for the front end logic and/or UI

I'd like to see if/how server side and client side code interact, and if it's possible to create Razor views in C# DLLs as components which are then added to the web client project - that's one of my biggest pain points with traditional MVC - where the tooling isn't really designed for this scenario. It prevents me building properly modular web applications. I've subscribed to the demo repo and will contribute where I can!

FWIW, I've created a simple user management website at https://github.com/mguinness/IdentityManager.  If someone is able to create similar functionality in a Blazor app that would be a great way to demonstrate the framework as it would be a real life application that many users could incorporate into their own websites.

Hi,
Shouldn't be a problem, right? All backend API is already done in
your project. Frontend its what you are missing. I assume the frontend -
nice to have with SPA Blazor. Is that your point?
On 28 March 2018 at 01:03, mguinness<EMAIL_ADDRESS>wrote:

FWIW, I've created a simple user management website at
https://github.com/mguinness/IdentityManager. If someone is able to
create similar functionality in a Blazor app that would be a great way to
demonstrate the framework as it would be a real life application that many
users could incorporate into their own websites.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/aspnet/Blazor/issues/68#issuecomment-376714652, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ASqGgmMarwJkR2GVsLB1Y0bnxw-lf2Ggks5titNdgaJpZM4R9lzU
.

Yeah, pretty much redo the f/end using Blazor.  The OP was asking for a reference application using Blazor and my suggestion was a user management app for Identity.  I think it would be a great starter app for a lot of devs that could be readily used as a real-world application and also showcase the abilities of Blazor.

lets do it. switch to prv.
On 28 March 2018 at 17:20, mguinness<EMAIL_ADDRESS>wrote:

Yeah, pretty much redo the f/end using Blazor. The OP was asking for a
reference application using Blazor and my suggestion was a user management
app for Identity. I think it would be a great starter app for a lot of devs
that could be readily used as a real-world application and also showcase
the abilities of Blazor.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/aspnet/Blazor/issues/68#issuecomment-376947189, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ASqGgu46kPlYtjYrNOnuYVUcsivUMsMfks5ti7hZgaJpZM4R9lzU
.

Add user Administration

how to add built in Identity in blazor asp.net core application?

I'll close this because the discussion about a LOB app ended a while ago, and if it is to be built, it would be in a different repo from this.

how to add built in Identity in blazor asp.net core application?

You can use various mechanisms for authenticating users, but we don't have any built-in template for it. I'd recommend talking to folks on the Gitter room for suggestions.


Icloud Calendar isn't loading

Raspberry PI 3
Magic Mirror 2.2
I have three calendars modules running on the MM interface.
The first one is a personal calendar from ical, this works perfectly, the second is a publicly available holiday calendar, and the third is a second personal calendar concerning something different.
The first two calendars work flawlessly, however, the third when using the same coding as the first two remains as "Loading"
This is the log error i get:
0|mm       | (node:1055) DeprecationWarning: sys is deprecated. Use util instead.
0|mm       | Error: dates lower than Thu Jan 01 1970 00:00:00 GMT-0500 (EST) are not supported
0|mm       |     at Object.toOrdinal (/home/pi/MagicMirror/node_modules/rrule-alt/lib/rrule.js:105:15)
0|mm       |     at Iterinfo.rebuild (/home/pi/MagicMirror/node_modules/rrule-alt/lib/rrule.js:1409:35)
0|mm       |     at RRule._iter (/home/pi/MagicMirror/node_modules/rrule-alt/lib/rrule.js:978:10)
0|mm       |     at RRule.between (/home/pi/MagicMirror/node_modules/rrule-alt/lib/rrule.js:794:21)
0|mm       |     at /home/pi/MagicMirror/modules/default/calendar/calendarfetcher.js:122:24
0|mm       |     at Request._callback (/home/pi/MagicMirror/modules/default/calendar/vendor/ical.js/node-ical.js:11:5)
0|mm       |     at Request.self.callback (/home/pi/MagicMirror/node_modules/request/request.js:188:22)
0|mm       |     at emitTwo (events.js:106:13)
0|mm       |     at Request.emit (events.js:191:7)
0|mm       |     at Request. (/home/pi/MagicMirror/node_modules/request/request.js:1171:10)
	{
		module: 'calendar',
		header: 'Personal',
		position: 'top_right',
		config: {
			calendars: [
				{
			url:'https://p33-calendars.icloud.com/published/2/private'
				},
					],
			},
	},

Just curious what could be causing this?

Please refer to http://forum.magicmirror.builders for support and troubleshooting.
I'm closing this issue for now. If you feel this issue should remain open, please let me know.