raidemulator: Fix issue with LineEvent getter data passing postMessage boundary

After the conversion of LineEvent to use getters, that data was no longer capable of passing the postMessage boundary from the worker to the main window thread. This fixes the issue by iterating the getters on the lines and populating them on the passed generic object.
Note that, even if we were to get rid of the Worker threading, this would still be required as IndexedDB only stores plain objects.
This may make more sense to put directly in the EmulatorCommon.cloneData function as base functionality but the performance impact on that is noticeable.

Hmmmmmmmmmmmm.
If I had realized this was going to be an issue, I think I would have said no to the getters when you asked.  I think maybe it would make more sense to have public readonly member variables instead of trying to work around the getters.

Yeah, I didn't realize this issue until doing a full test after the changes to NetworkLogConverter in the other PR, they only show when trying to load an imported encounter, not on import. I can instead close this PR and change the LineEvent classes, but I think there are some properties that can't be readonly, basically anything being set from the convert method, since they require a fully populated repo object to do their lookup properly.

The convert method is called almost immediately after parsing though, right?  Could/should convert just be called directly in the constructor?

There's an important logic distinction here in that convert is called second in each batch. So the objects are constructed in batches of 1000, then converted in batches of 1000. In fact, it might even lead to an edge case bug that I didn't think of when moving things over to the worker setup, where if a line that needs its repo info is processed at the end of one batch, the info it needs won't be available.

Now that I've had time to investigate further, looking through the code, the only case where a name lookup absolutely has to happen is job gauge (31/0x1F) where that is, for some reason, sent absolutely first upon logging in.
I guess that we could just ignore that specific case (by marking the line as invalid if there's no entry in LogRepository when the line is constructed), at which point all member variables could be readonly?

Now that I've had time to investigate further, looking through the code, the only case where a name lookup absolutely has to happen is job gauge (31/0x1F) where that is, for some reason, sent absolutely first upon logging in.
I guess that we could just ignore that specific case (by marking the line as invalid if there's no entry in LogRepository when the line is constructed), at which point all member variables could be readonly?

You will always get the 0x02 line before 0x1F.  I think in some extreme error case, it'd be better to just mark the line as having a blank name than marking the whole line as invalid?

Every log file I have locally right now starts with:
249|2021-05-13T16:08:59.1714902-04:00|Language ID: 1, Disable Damage Shield: False, Disable Combine Pets: False, Parse Filter: None, DoTCrits: False, RealDoTs: False, Parse Potency: False|989345ddb19420d2c44ee731a516e11d
249|2021-05-13T16:08:59.1814905-04:00|Selected Process ID: 0, Disable Network Data: False, Enable HP Scan: False, Dump All Network Data: True, Disable Combat Log: False, Selected IP: , WinPcap: False, Socket
Filter: True|820d88da183f73944fddf5f933334931
31|2021-05-14T20:47:58.4930000-04:00|100ABCDE|18|00|00|00|bc4725cadebb6d423accb6b864e3f013
39|2021-05-14T20:47:59.9630000-04:00|100EDCBA||122634||10000||0|0||||||316eba1911bd687c9f11df40ebb86b0c
01|2021-05-14T20:48:01.2960000-04:00|155|The Goblet|1f43bd37b371c28656b49618c9f7396e
02|2021-05-14T20:48:01.2960000-04:00|100abcde|Some One|dbc852241900a67fd5faef44df03ff1f

The order is always 31, potentially misc other lines, 01, then 02, then 03 lines. This holds true for the 8 log files I have locally right now as well as the couple I have backed up elsewhere, across three different versions of the parser plugin.

Hmm! That's not my experience with log files.  I see a bunch of 253/249/251 and then 01/251/02/03 always.  All of my Network_20900_etc log files look like that.  Maybe I'm logging out on a crafter?
At any rate, I think it would be fine to mark any such lines as having a blank name.

Alright. I'll make the adjustments to readonly members instead. Is it alright to use this PR for the changes, given that all the conversation about the change is here?

Yeah, sounds good! This PR is about fixing the postMessage issue anyway, so seems like a great place.

Converted everything over to use readonly properties with the const field lookup as discussed in https://github.com/quisquous/cactbot/pull/2879#discussion_r637092942

Also did some full end-to-end testing after these changes to make sure they fully resolved the issue.

Thanks for all the changes back and forth to make this work!


How to keep only metadata in memory?

I would have thought that setting temp: true would store only the metadata in-memory, however it seems to store both the metadata AND all the files in memory, which seems to be confirmed by the docs - https://github.com/datproject/dat-node#storage-1
Is there a way to store only the metadata in-memory?
If you don't mind checking out my code, here's what I'm doing - https://github.com/tom-james-watson/dat-cp/blob/master/src/lib/dat-cp.js#L21. See https://github.com/tom-james-watson/dat-cp#dcp---dat-copy for context.
Note that I am manually adding files to the archive with dat.archive.createWriteStream and I never run importFiles. Changing the value of the dir provided (e.g. Dat('literally anything', ...) does not seem to have any affect with this setup, which is a little confusing.
Everything works fine with temp: true, however all files are stored in-memory. Removing temp: true alleviates the memory problem, however this then creates the .dat metadata directories, which I want to avoid.
It seems like it should be possible to keep only the contents of the .dat folder in memory. I get the impression that this could be done by writing my own storage function, but I wouldn't know where to start!
Is there anything I'm misunderstanding? Is there any way to achieve what I want? Thanks!

OK before anyone puts too much thought into this - I've made some progress, I'll get back to you soon.

OK, so I've managed to get this working how I expected, which is awesome.
Here's the custom storage that I have ended up writing: https://github.com/tom-james-watson/dat-cp/blob/master/src/lib/storage.js, and here's how it's passed into Dat https://github.com/tom-james-watson/dat-cp/blob/master/src/lib/dat-cp.js#L23
As you can see, this is basically a modified clone of dat-storage. I've outlined the differences in the file's docstring.
It looks like I'm basically needing to duplicate a bunch of core dat functionality in order to implement this, which is not ideal. I would have suggest that the createStorage part of dat-storage simply needs to be extracted into its own module, but I also needed to modify the way raf is called here to let me be able to specify a different directory.
It looks like this is because I am breaking dat's assumption that all files contained in an archive will exist at a single root. In the case of dcp that doesn't make sense.
So, two suggestions:

Modify dat-storage to handle paths that are not under a single root
Modularize createStorage so that it's easier to write your own custom storage.

Unless, of course, none of what I said made sense and I'm going about this in the wrong way, in which case please let me know!
Thanks!

I ran into the same problem today with sharing single files so I'm adding myself to this issue in the hope that a solution will emerge.
and btw. dcp looks great :)


Added error handling to transport.dial functionality when there is one multiaddr

Hey All,
Dialing an offline node does not currently return an error but simply returns a connection whether or not the connection was established. This PR ensures that it returns an error when there is one multiaddr for a given transport. The reason the same was not done for multiple multiaddrs is that it seems to me that code for multiple multiaddrs is not fully implemented <- will discuss in more detail by referencing code below.
NOTES

This PR currently fails tests since it requires the signaling error handling code in libp2p/js-libp2p-webrtc-star#39 which is not available in the current release of webrtc-star.
This PR fixes the race between signaling discovery by changing it into a simple dial error that way it is handled the same way other dial errors are. libp2p/js-libp2p-webrtc-star#5 <- this issue can be closed after this is mergerd

Thanks

Snippet from src/transport.js
      // b) if multiaddrs.length = 1, return the conn from the
      // transport, otherwise, create a passthrough
      if (multiaddrs.length === 1) {
        const conn = t.dial(multiaddrs.shift(), (err) => {
          if (err) return callback(err)
          callback(null, new Connection(conn))
        })
        return
      }

      // c) multiaddrs should already be a filtered list
      // specific for the transport we are using
      const proxyConn = new Connection()

      next(multiaddrs.shift())

      // TODO improve in the future to make all the dials in paralell
      function next (multiaddr) {
        const conn = t.dial(multiaddr, () => {
          proxyConn.setInnerConn(conn)
          callback(null, proxyConn)
        })
      }

looking at c), the callback is called on the first multiaddr regardless of succes status. If we want generic error handling code, we could simplify b) and c) to the following:
      // b) multiaddrs should already be a filtered list
      // specific for the transport we are using

      next(multiaddrs.shift())

      // TODO improve in the future to make all the dials in parallel
      function next (multiaddr) {
        const conn = t.dial(multiaddr, (err) => {
          if (err && multiaddrs.length === 0) return callback(err)
          else if (err) return next(multiaddrs.shift())
          const proxyConn = new Connection()
          proxyConn.setInnerConn(conn)
          callback(null, proxyConn)
        })
      }

^ This would provide generic error handling for both cases of b) and c) together which also passes all tests.
Just a suggestion, let me know what you think.

@michaelfakhri your added test is failing, could you check?

@diasdavid It needs code from libp2p/js-libp2p-webrtc-star#39 which is not available in latest release v0.6.0 of webrtc-star. It passes locally with these changes manually added. Do you want to bump webrtc-star to v0.6.1 and publish?
Have you had a look at the code in https://github.com/libp2p/js-libp2p-swarm/pull/133#issuecomment-263500622. Is this what the code is supposed to be doing? Or is it something completely different?

@michaelfakhri released :)

Closing and reopening to re-trigger tests

@diasdavid Tests are passing locally on my machine but circleci is failing on a apt-get update command while travis is failing on SAUCE connection. Not sure how do you want to proceed?

@michaelfakhri you need to update to version 0.7.0

@diasdavid done


Use hostname defined in all.yml for main hostname in traefik template

What this PR does / why we need it:
Change to use the variable defined hostname instead of hardcoded "ansible-nas"
Which issue (if any) this PR fixes:
Fixes # n/a
Any other useful info:
None, simple and concise.

Please help me understand the failure. Something about the trailing space removed? Or testing problem?

Nice change, thanks!

Is this a "me thing?"

It was caused by an update to mkdocs-material - the theme I use for the docs pages. I've fixed it on master so happy to merge this in :-)


Combobox component [NDS-44]

We need a combobox that allows the user to begin typing and then select an option from a list. While a combobox describes a generic pattern that could potentially be used for things like a date picker, this component should narrowly allow for text input and dropdown selection.
Anatomy

Text field - the input field where the user can type. This should have the same anatomy as our Text Field.
Dropdown list box - a listbox that populates its contents based on user input in the text field.

Note: our BaseListbox accomplishes this.

References
Our first priority should be mimicking or using existing standards.

MDN - <datalist> - the native HTML way to do this is to associate an <input> with a <datalist>. Relevant attributes:

list - refers to the id of the <datalist>.
autocomplete - defines how autocomplete should work.

ARIA Authoring Practices - Combobox - how to do the same thing with <input> + <ul role="listbox">. Note that there are six examples documented, but the non-editable ones and the non-listbox ones (grid & datepicker) are out of scope.

List and inline autocomplete
Only list autocomplete
No autocomplete

Our second priority should be to look at how other design systems implement this pattern and finding commonality.

Lightning - Combobox
Atlassian - Select
Ant Design - Select
Bold - Select

NDS-44

Issue linked to JIRA Story: [NDS-44]


More of helm

Nice to see you added some helm support as well. A tool like things shouldn't try to compete, but compliment.
It would be extremely useful if you where able to parse helm and then get a bunches of objects back that you can continue to work on using starlark..
This might be difficult to do using helm 2, and tiller.. but I think this is doable in helm v3.
There are many times I want to use helm as a base, but then do some additional parsing, stuff that you usually need the template to support..

Under the hood, Isopod's Helm support render the manifests from the chart. So implementing Helm 3's tiller-less ability to read objects back during apply might be non-trival.
You can use kube.get in Isopod today to read a resource back after you use the built-in Helm support to apply though.


Recipe with KubeJS not working

Hi !
I actually tried to add recipes through KubeJS in create_mechanical_extruder-1.18.2-1.4.4.e-318
But even if kubejs confirm it's been loaded with no error, none of the recipes appears.
Here is a small one I tried with only minecraft items to be the more accurate, and I confirm it does not appear:
onEvent('recipes', event => {

	event.custom({
		"type": "create_mechanical_extruder:extruding",
		"ingredients": [
			{"fluid": "minecraft:water", "amount": 1000},
			{"fluid": "minecraft:lava", "amount": 1000}
		],
		"result": { "item": "minecraft:obsidian" }
	})
})

I found a workaround for now, which consist of using the KubsJS format of that code :
event.recipes.createMechanicalExtruderExtruding(
	Item.of("minecraft:obsidian"),
	[
		Fluid.of("minecraft:water"),
		Fluid.of("minecraft:lava")
	]
);

Hopping it can still help.

I've been trying to get this to work for two days, can you show the full doc? Because I can't seem to get it going and I'm losing it...


Warning: Ignoring URL since it exceeds Excel's limit

Hi again Dominik,
After the step Combining results with additional data and sort by input order, I got thousands of warnings like this for different URLs:
/home/joel/.conda/envs/boldigger/lib/python3.12/site-packages/xlsxwriter/worksheet.py:1261: UserWarning: Ignoring URL 'https://portal.boldsystems.org/record/GBCM6651-17' since it exceeds Excel's limit of 65,530 URLS per worksheet.
  warn(

I would like to know what this means, and if I should do something about it. My FASTA file contains >48k records, so it's pretty large. The *_bold_results_part_1.xlsx output file contains 643067 rows.
Also, since BOLDigger now only yields single-sheet workbooks, I wonder whether we could have the option of just writing to plain tsv files instead? Might avoid some potential problems and unnecessary library calls that way, also downstream.

Hi there,
Apparently an Excel sheet can only contain 65k urls, the remaining urls are
just saved as strings, so this message can safely be ignored.
The reason I use Excel is that it is human readable and can quickly be
filtered without having to import it or something.
For downstream analysis I recommend using the parquet file that is also
returned. I moved away from saving plain text, since I don't see any
advantage. Parquet has insane read and write speed, is highly compressed so
does not use a lot of space, can be read as data frame directly for further
processing.
Joel Hjärne Kokk @.***> schrieb am So., 10. Nov. 2024,
23:01:

Hi again Dominik,
After the step Combining results with additional data and sort by input
order, I got thousands of warnings like this for different URLs:
/home/joel/.conda/envs/boldigger/lib/python3.12/site-packages/xlsxwriter/worksheet.py:1261: UserWarning: Ignoring URL 'https://portal.boldsystems.org/record/GBCM6651-17' since it exceeds Excel's limit of 65,530 URLS per worksheet.
warn(
I would like to know what this means, and if I should do something about
it. My FASTA file contains >48k records, so it's pretty large. The
*_bold_results_part_1.xlsx output file contains 643067 rows.
Also, since BOLDigger now only yields single-sheet workbooks, I wonder
whether we could have the option of just writing to plain tsv files
instead? Might avoid some potential problems and unnecessary library calls
that way, also downstream.
—
Reply to this email directly, view it on GitHub
https://github.com/DominikBuchner/BOLDigger3/issues/15, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AJH6ILDBZNXM5PFYDWNXPD3Z77JSNAVCNFSM6AAAAABRQT4OI6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGY2DONZQGA2DCOA
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

You're right, I missed the parquet file! I agree that this is a better solution, having both options. Closing this issue.


If number of slides and slidesToShow is equal it is showing nothing.

Replication link
If a number of slides is equal to slidesToShow property then it is showing nothing in the slides. If they are not equal then it is working properly. Please fix this.

It has been fixed, will be released soon.


Junk props in $scopedSlots

Version
2.6.0
Reproduction link
https://codesandbox.io/s/5xx3jz48qn
Steps to reproduce

follow the codesandbox link attached
open the App.vue
see lines 13, and 19
see console output

What is expected?
$scopedSlots contains slot functions only (or empty if there are no slots at all)
What is actually happening?
$scopedSlots has _normalized and $stable fields

If these special props added to the $scopedSlots by intention - where can I find documentation on them?

Do you have a legit case where you need to dynamically inspect slots being passed in? These are internal/special flags used for optimizations.

Iterating through slots is used for integrating with 3rd-party libraries (here is an example of how slots are used to define 3rd-party templates)
So, as I got it - these props will remain and are for internal use only, right?

Yes, if you have control over the implementation you can simply ignore anything that is not a function.

Ok
Thank you for clarification.


[for each dataset] fails on table names containing whitespaces

Problem
Applies to SQL Server: when for each dataset is used on a table name containing whitespaces (example: Contact Type), the following syntax error is thrown:
Soda Core 3.0.10
Query execution error in nav.Contact Type.aggregation[0]: ('42S02', "[42S02] [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Invalid object name 'Contact'. (208) (SQLExecDirectW)")
SELECT
  COUNT(*)
FROM dbo.Contact Type

Suspected cause
I think this happens because of omitted object identifiers in the SQL-statements (the sqlserver-dialect of) Soda generates here. MSSQL expects dbo.Contact Type to be enclosed with (preferably) brackets, like [dbo].[Contact Type]. Seen this issue before in Soda <-> MSSQL (https://github.com/sodadata/soda-sql/issues/171, https://github.com/sodadata/soda-sql/issues/181).
Steps to reproduce

Have a Microsoft SQL Server instance with a table containing a column with a white-space character in it's name.
Configure checks.yml with at least:

for each dataset T:
  datasets:
    - "Contact Type"
    - Country
  checks:
...

Run soda scan

System
Docker version: 20.10.17
Soda Core version: 3.0.10
Data source type: Microsoft SQL Server 2019 (15.0.2080.9)
Let me know if I can test anything for you on sqlserver! ✋🏼

SODA-1291

@geertvanzoest
Can you try with :
for each dataset T:
  datasets:
    - "[Contact Type]"
    - Country

Does soda core version matter?

Nope, it is just YAML - so any soda-core-sqlserver should work.

This is the result:
2022-12-16T11:02:46.4366094Z Pull docker image of Soda Core with tag 'v3.0.16' if not locally available.
2022-12-16T11:02:47.7652281Z v3.0.16: Pulling from sodadata/soda-core
2022-12-16T11:02:47.7684000Z Digest: sha256:ae631c9a28531ddda8594b49363bb1e97ecf17ef64fdcbcd31387f46f73f15b2
2022-12-16T11:02:47.7685102Z Status: Image is up to date for sodadata/soda-core:v3.0.16
2022-12-16T11:02:47.7724314Z docker.io/sodadata/soda-core:v3.0.16
2022-12-16T11:02:47.7999642Z Run Soda Core container and execute checks as configured in YAML-files.
2022-12-16T11:02:48.7365536Z [11:02:48] Soda Core 3.0.16
2022-12-16T11:02:49.3850683Z Instantiating for each for ['Country']
2022-12-16T11:02:49.6810203Z [11:02:49] Scan summary:
2022-12-16T11:02:49.6810595Z [11:02:49] 2/2 checks PASSED:
2022-12-16T11:02:49.6810943Z [11:02:49]     Country in nav
2022-12-16T11:02:49.6811149Z [11:02:49]       Minimum row count check [PASSED]
2022-12-16T11:02:49.6811349Z [11:02:49]       Schema changes [PASSED]
2022-12-16T11:02:49.6811550Z [11:02:49] All is good. No failures. No warnings. No errors.
2022-12-16T11:02:49.6811756Z [11:02:49] Sending results to Soda Cloud
2022-12-16T11:02:50.0187176Z [11:02:50] Soda Cloud Trace:<PHONE_NUMBER>593017275
2022-12-16T11:02:50.8500909Z ##[debug]$LASTEXITCODE: 0

Soda doesn't evaluate the table when using for each "[Table Name]" because it tries to fetch the objectname from the information_schema using this query:
SELECT table_name
FROM information_schema.tables
WHERE (table_name like 'Country' OR table_name like '[Contact Type]')
      AND lower(table_schema) = 'dbo'

As you can see, the brackets are parsed as being part of the objectname instead of being parsed as object identifiers. Therefore, no result is returned from information_schema and the table isn't checked by Soda.
So just for funzies, when I use this checks.yml:
for each dataset T:
  datasets:
    - "[Contact Type]"
    - "[Country]"

This is the result :)
2022-12-16T10:58:41.1006674Z Pull docker image of Soda Core with tag 'v3.0.16' if not locally available.
2022-12-16T10:58:42.2888831Z v3.0.16: Pulling from sodadata/soda-core
2022-12-16T10:58:42.2922884Z Digest: sha256:ae631c9a28531ddda8594b49363bb1e97ecf17ef64fdcbcd31387f46f73f15b2
2022-12-16T10:58:42.2925430Z Status: Image is up to date for sodadata/soda-core:v3.0.16
2022-12-16T10:58:42.2961387Z docker.io/sodadata/soda-core:v3.0.16
2022-12-16T10:58:42.3217617Z Run Soda Core container and execute checks as configured in YAML-files.
2022-12-16T10:58:43.3045956Z [10:58:43] Soda Core 3.0.16
2022-12-16T10:58:43.9951143Z Instantiating for each for []
2022-12-16T10:58:43.9951974Z [10:58:43] Scan summary:
2022-12-16T10:58:43.9952597Z [10:58:43] No checks found, 0 checks evaluated.
2022-12-16T10:58:43.9953129Z [10:58:43] Sending results to Soda Cloud
2022-12-16T10:58:44.2559101Z [10:58:44] Soda Cloud Trace:<PHONE_NUMBER>266021427
2022-12-16T10:58:45.0607743Z ##[debug]$LASTEXITCODE: 0

Let me know if I can do anything else to help.

@geertvanzoest  Ah, Indeed we have to separate "quoting" in metadata queries and normal queries. I'll see how to fix it in 3.0.17


Use the namespace prefix for more files

The following files should be "prefixed" or at least separated into multiple folders to stop overwriting:

[x] Factories
[x] Language files
[x] model_schemas

Fixed in 92479fdd0c37dcb4fd97ebe72e0dbdcea92339cc


test_messages: Add test for invalid markdown format.

Hi! I'm new to zulip. Just adding to code coverage for message.py. :-)

Automated message from Dropbox CLA bot
@susansls, thanks for the pull request! It looks like you haven't yet signed the Dropbox CLA. Please sign it here.

Welcome!  Thanks for working on this :)

Automated message from Dropbox CLA bot
@susansls, thanks for signing the CLA!

Merged, thanks @susansls!


Failed to bind to address https://<IP_ADDRESS>:5001: address already in use

Trying to run a freshly created project I get the following. Seems like a race condition because port 5001 is not in use on my system.
[41mcrit: Microsoft.AspNetCore.Server.Kestrel[0]
      Unable to start Kestrel.
System.IO.IOException: Failed to bind to address https://<IP_ADDRESS>:5001: address already in use. ---> Microsoft.AspNetCore.Connections.AddressInUseException: Address already in use ---> System.Net.Sockets.SocketException: Address already in use
   at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
   at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Bind(EndPoint localEP)
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransport.BindAsync()
   --- End of inner exception stack trace ---
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransport.BindAsync()
   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.<>c__DisplayClass22_0`1.<<StartAsync>g__OnBind|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context)
   --- End of inner exception stack trace ---
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context)
   at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.AddressesStrategy.BindAsync(AddressBindContext context)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IServerAddressesFeature addresses, KestrelServerOptions serverOptions, ILogger logger, Func`2 createBinding)
   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
Microsoft.AspNetCore.Server.Kestrel:Critical: Unable to start Kestrel.

System.IO.IOException: Failed to bind to address https://<IP_ADDRESS>:5001: address already in use. ---> Microsoft.AspNetCore.Connections.AddressInUseException: Address already in use ---> System.Net.Sockets.SocketException: Address already in use
   at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
   at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Bind(EndPoint localEP)
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransport.BindAsync()
   --- End of inner exception stack trace ---
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransport.BindAsync()
   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.<>c__DisplayClass22_0`1.<<StartAsync>g__OnBind|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context)
   --- End of inner exception stack trace ---
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context)
   at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.AddressesStrategy.BindAsync(AddressBindContext context)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IServerAddressesFeature addresses, KestrelServerOptions serverOptions, ILogger logger, Func`2 createBinding)
   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
The thread 1215731 has exited with code 0 (0x0).
The thread 1215727 has exited with code 0 (0x0).
Exception thrown: 'System.IO.IOException' in System.Private.CoreLib.dll

There is already this issue logged.  Did you check the solution of checking Port Usage (by some other application) and killing it?
https://github.com/dotnet/core/issues/948
Are you on HTTPS on localhost?

Duplicate of #948

Okay, but what is the solution?

@jenyckee did you check the primary issue?

Yes

This also happens to me

I had the same issue on a dotnet generate web project recently. But I can fix the issue by editing Properties\launchSettings.json to modify the applicationUrl in your app config.
From this
"applicationUrl": "https://localhost:5001;http://localhost:5000",

to this
"applicationUrl": "http://localhost:5000",

I suspect it could be an issue of the dotnet boilerplate project "ASP.NET Core Web API".

@reevelau This doesn't help for

@jenyckee  did you check the primary issue?
...
Yes, when I "Start Without Debugging" the application even crashes

See https://github.com/dotnet/core/issues/948#issuecomment-336284252 ... unless the right team knows about the problem and understands the root-cause, they can't provide solutions.

@karelz That's very unfortunate, what kind of information do you need in order to understand the root-cause?

I had the same issue on a dotnet generate web project recently. But I can fix the issue by editing Properties\launchSettings.json to modify the applicationUrl in your app config.
From this
"applicationUrl": "https://localhost:5001;http://localhost:5000",

to this
"applicationUrl": "http://localhost:5000",

I suspect it could be an issue of the dotnet boilerplate project "ASP.NET Core Web API".

Still can't

on CentOS 7 ，I had the same issue on a dotnet generate web project recently.

{
  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:56271/",
      "sslPort": 0
    }
  },

  "profiles": {
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    },
    "Logging": {
      "LogLevel": {
        "Default": "Warning"
      }
    },
    "CategoryProjectCore": {
      "commandName": "Project",
      "launchBrowser": true,
      "launchUrl": "http://localhost:5000",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Production"
      }
    }
  },
  "ConnectionStrings": {
    "SopContext": "server=<IP_ADDRESS>;port=3306;database=sopcce;uid=root;pwd=123456;Charset=utf8mb4;SslMode = none;"
  }
}

I do not know ,try other way
#948 not help me.

@Sopcce please do not comment on close issues. We rarely monitor them.
I would suggest to file a new issue with details - it would be good to summarize what EXACTLY you tried that did not help you. The issues are now too long and too messy to make heads and tails clearly. Thanks!

If people are still commenting on a closed issue, it's probably because it's what they are most directed to which likely means the issue shouldn't be closed in the first place. We have 948 (closed), this ticket (closed). I'm not sure opening yet another one makes sense.
For those who want another experience report: this exact same issue currently happens to me all the time as well, with a fresh install of dotnet. The project is here:
https://github.com/jeffnyman/testing-aspnet-core
Running dotnet run works just fine with this project on Windows, not at all on Mac (either Sierra, High Sierra or Mojave).
It initially tells me port 5000 is in use. It's not; I've checked. But I did run the kill steps on anything on the port as provided by seba-i. I then added the following line to Startup.cs:
.UseUrls("http://*:5001")

When I do that, then it tells me port 5001 is already in use. I realize the issue is closed but a lot of people are going to probably end up here as they experiment.

fix the issue by editing Properties\launchSettings.json to modify the applicationUrl in your app config.
From this
"applicationUrl": "https://localhost:5001;http://localhost:5000",

to this
"applicationUrl": "http://localhost:5000",

I suspect it could be an issue of the dotnet boilerplate project "ASP.NET Core Web API".

I just tried to create a new project on .net core 2.2 and had the same issue.
dotnet new mvc --auth Individual -o AspNetCoreTodo
dotnet run
making this change worked for me.

If you use Visual Studio Code you need to close application in terminal. Maybe you run your application using dotnet run command. Then it started. Even you close your tab in browser it still works. You need to go to terminal tab in your Visual Studio Code and then press "ctrl + c" to stop the application. After that you should have problem with starting it using debug or withoud debug command.

I solved it here by deleting the "applicationUrl" in launchSettings.json

I created a new project in VSCode with dotnet new mvc command
Then run the app through terminal using dotnet run.
It just froze after a few info statements.
I ran using the debugger.
Gave me the error -  Failed to bind to address https://<IP_ADDRESS>:5001: address already in use.
Here's what I did -
Stopped the debugger.
Hit Ctrl+C on terminal.
Reran using the Debugger.
Worked fine for me.

I 'm not sure if someone else has been facing the same issue. If that is the case, simply end the .Net Core Task running on your computer. Run your dotnet App afterwards.

None of the previous suggestions have worked for me so far. I've tried running and using ctrl + c in the terminal like MayurSapaliga suggested. I've edited the applicationUrl in the launchSettings.json file like tuliopaim suggested. I've edited the Program.cs file as suggested on the Microsoft docs page here https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/web-host?view=aspnetcore-3.1
None of this works. I tried changing the port my app runs on, but I keep getting "No webpage was found for the web address: http://localhost:5000/", and the same message for every other port I tried, which include 5002, 5003, 5004, 5005, 5050, 5051, and 5052. I have no idea which ports are the common second choice for such purposes. I basically just trying random ports I think aren't in use.
All of this happened because I started a new dotnet project. I ran it a couple of times, and then went back to the previous project I was working on, and now it absolutely will not run. I can go back to the other project (the new one I started), and it runs fine. It looks like VS Code just will not release the port. I've done ctrl + c both in VS Code and in the terminal. Interestingly enough, dotnet run works in VS Code (for the new program that's causing this whole mess), but the same command won't run in the terminal. I'll get the same error I get when trying to run my first program,
Unable to start Kestrel.
System.IO.IOException: Failed to bind to address http://<IP_ADDRESS>:5000: address already in use.
 I've killed the processes running on the ports. Absolutely nothing works. What do you want from me, VS Code?!?!?!
Not sure how this would be relevant, but it may be worth mentioning that I'm running Linux Mint 18.

Eu troquei de porta, e funcionou

Damn, I had my firewall turned off and when I turned it back on it started to work. Weird.

I had the same issue on a dotnet generate web project recently. But I can fix the issue by editing Properties\launchSettings.json to modify the applicationUrl in your app config.
From this
"applicationUrl": "https://localhost:5001;http://localhost:5000",

to this
"applicationUrl": "http://localhost:5000",

I suspect it could be an issue of the dotnet boilerplate project "ASP.NET Core Web API".
This fixed my issue it looks like it tries to start this on http and https not sure though.

Kill dotnet host in Task Manager and it worked.

So here is the solution, if you are working on linux
while running the dotnet run if you stop the server  using ctr + z then it Ctrl+z sends the SIGTSTP (Signal Tty SToP) signal to the foreground job but don't actually stop the running kestrel server, so you have to mannualy end the process of the kestrel server.
SOLLUTION  Only use ctr + c to stop the kestrel server, actually its even displayed on the shell while you run dotnet run.
To mannually kill the kestrel server use this command to see the running process and it pid on the port 5000
sudo lsof -iTCP -sTCP:LISTEN -P | grep :5000
then kill it with

why make this simple thing so complicated ???
why not just provide a server.listen(port)  API, so not the framework don't need to care other stuffs. and in user land code, we can do the config stuff or hard code a port here

I had the same issue on a dotnet generate web project recently. But I can fix the issue by editing Properties\launchSettings.json to modify the applicationUrl in your app config.
From this
"applicationUrl": "https://localhost:5001;http://localhost:5000",

to this
"applicationUrl": "http://localhost:5000",

I suspect it could be an issue of the dotnet boilerplate project "ASP.NET Core Web API".

that really helped! thank you

So here is the solution, if you are working on linux
while running the dotnet run if you stop the server using ctr + z then it Ctrl+z sends the SIGTSTP (Signal Tty SToP) signal to the foreground job but don't actually stop the running kestrel server, so you have to mannualy end the process of the kestrel server.
SOLLUTION Only use ctr + c to stop the kestrel server, actually its even displayed on the shell while you run dotnet run.
To mannually kill the kestrel server use this command to see the running process and it pid on the port 5000
sudo lsof -iTCP -sTCP:LISTEN -P | grep :5000
then kill it with
sudo kill -9 PID

fix the issue. thanks

My issue was caused by a docker container keeping the port in a CLOSE_WAIT state
Using Windows 10 with .NET Core 2.1 web api.
I tried killing the PID I found with netstat -aon | more, but received the message ERROR: The process "xxxx" not found.
After hours of investigation, netstat -b yielded a clue:

Docker Desktop comes with a standalone Kubernetes server and client, so I tried restarting Docker Desktop.
Fixed it right away. Hope it helps someone !

This is a problem with the Windows operating system. You can use commands
netsh interface ipv4 show excludedportrange protocol=tcp
to view the ports reserved by the system. Note that these reserved ports are not static. It will change with windows updates.You may find that there are 5000 or 5001 in the reserved ports

Solved
So when using docker I said
docker run -p 5000:5003 tag/name
Now its listening on that port.
I typed

and guess what... the container was still up (for 17 hours lol)

```docker kill ContainerID```

helped then I could run it

thanks to you'll!. the problem is your https request is insecure all you need do is go to your web browser and click on the advance button then click continue, or check for a running project on your terminal stop it and the run it again  thank you

I had the same issue on a dotnet generate web project recently. But I can fix the issue by editing Properties\launchSettings.json to modify the applicationUrl in your app config.
From this
"applicationUrl": "https://localhost:5001;http://localhost:5000",

to this
"applicationUrl": "http://localhost:5000",

I suspect it could be an issue of the dotnet boilerplate project "ASP.NET Core Web API".

That actually did help me, thanks!

"applicationUrl": "http://localhost:5000",

This worked! Thanks for the tip!

http://localhost:5000

this worked for me. by changing the port

This may happen when you're running Multiple Startup Projects.
You have to check that the single projects are not running on the same engine, such as IIS Express.
Let's say you have 2 projects running, if both are starting on IIS Express they'll both use port 5001 and the second to start will be blocked by the first.
To check, select every single project you need to run. After selecting each project as if it was a single startup, choose the engine (the light green arrow next to the project's name points to the engine).
There must not be two projects running both on IIS Express or you'll get the conflict.
After selecting a different engine for each project, just reconfigure the Multiple Startup as it was before and it should work.

This fixed my issue:
net stop winnat
docker start ...
net start winnat

See https://stackoverflow.com/questions/54010365/how-to-see-what-is-reserving-ephemeral-port-ranges-on-windows and https://github.com/microsoft/WSL/issues/5306.

HI
This works:
Select Kesteal as the project Run instead of IIS express from drop down.
Website project (Start up)
=> Starts another Owin project hosting API
This does not work:
Select IIS express as the project Run instead of Kesteal from drop down.
Website project (Start up)
=> Starts another Owin project hosting API
Throws and error saying it cant bind to <IP_ADDRESS>:"random port"
Under both, tell it which ports to run under... IIS express is assigned for me,
but it defo! not the port which the hosted Owin project is, plus it complains about some random port of which either are configure for.
Owin project hosting API has .UseKestrel();
Owin project hosting API:
public static IHostBuilder CreateHostBuilder(string[] args)
        {
            return Host.CreateDefaultBuilder(args)
                .ConfigureWebHostDefaults(webBuilder =>
                {
                    var port = args[0].Replace("port=", "");
                    var sslport = args[1].Replace("sslport=", "");

                    webBuilder.UseStartup<Startup>()
                    .UseUrls($"http://localhost:{port}", $"https://localhost:{sslport}")
                    .UseKestrel();
                });
        }

This should work running under iis express but it does not.

The op's error message is very frustrating for people trying to debug ASP.NET web apps under Docker as well.
No matter which port number/s you choose to use in ASPNETCORE_URLS the same error message gets thrown in the debugger quoting the newly chosen port number/s. For example, using Visual Studio Code...
.vscode/launch.json
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Docker: Debug web app",
            "type": "docker",
            "request": "launch",
            "preLaunchTask": "docker-debug-task",
            "dockerServerReadyAction": {
                "uriFormat": "%s://localhost:%s/.well-known/openid-configuration"
            },
            "netCore": {
                "appProject": "${workspaceFolder}/projectName/projectName.csproj"
            }
        }
    ]
}

.vscode/tasks.json
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "docker-build-task",
            "type": "docker-build",
            "dockerBuild": {
                "dockerfile": "${workspaceFolder}/projectName/Dockerfile",
                "context": "${workspaceFolder}/projectName",
                "tag": "project-name:dev",
                "buildArgs": {
                    "CONFIG": "Debug"
                }
            }
        },
        {
            "label": "docker-debug-task",
            "type": "docker-run",
            "dependsOn": "docker-build-task",
            "dockerRun": {
                "containerName": "project-name-dev",
                "env": {
                    "ASPNETCORE_URLS": "http://+:12345"
                },
                "image": "project-name:dev",
                "ports": [
                    {
                        "containerPort": 12345,
                        "hostPort": 44306
                    }
                ],
                "remove": true
            },
            "netCore": {
                "appProject": "${workspaceFolder}/projectName/projectName.csproj",
                "enableDebugging": true,
                "configureSsl": false
            }
        }
    ]
}

Since we're in the context of Docker containers the error message is complaining about port availability inside the containers, nothing to do with ports on the Docker host, and it's because the Visual Studio Remote Debugger is trying (and failing) to launch a second instance of the web application for debugging purposes. It cannot do this because a first instance of the web application has already been launched by the container image's ENTRYPOINT.
I was able to get VS Remote Debugging working correctly by preventing the first (natural) instance of the web application from launching from the ENTRYPOINT. This is achieved by setting dockerRun.customOptions to execute something else instead (since this is a dotnet-alpine image I'm using ash instead of bash):
.vscode/tasks.json
            "dockerRun": {
                "customOptions": "--entrypoint /bin/ash",
            }

I wasted far too much time figuring this out. Hope it helps somebody else.

I had the same issue, but only on docker environment... To resolve, i just needed add "Urls": "http://localhost:5000", in appsettings.json

@arauujoiago 's point worked for me on mac.

Just putting the solution to my problem here: I had multiple appsettings (appsettings.json, appsettings.Development.json) with Kestrel endpoints, where one was meant to override the previous endpoint, but since I accidentally had different names, I had two different Kestrel endpoints trying to bind to the same port.

In my case Im on windows and nothing so far has worked

This fixed my issue:
net stop winnat
net start winnat

See https://stackoverflow.com/questions/54010365/how-to-see-what-is-reserving-ephemeral-port-ranges-on-windows and microsoft/WSL#5306.

This also solves the issue for me


[Travis] Test lowest version dependencies

To avoid BC breaks its best to test the normal dependencies and the lowest dependencies

Sorry wrong repo


Remove direct sha3 dependency

zkevm_opcode_defs properly pins sha3 it to a specific version. This is important because we rely on the internal representation used in the library, so even minor changes can break our code.
I'm not sure if v1.3.2 is the best branch for this.

@joonazan  can you check version pls


Check number of qubits in PauliOp.eval

Summary
Raise an error in PauliOp.eval if the number of qubits in the operator is not equal to the number of qubits in the state function.
closes #1103
Details and comments
Without this check, a nonsense answer may be returned silently for
invalid input. For example, applying a Pauli Y operator to two qubits,
Y.eval('11') flips both qubits, but returns the wrong coefficient.
This behavior seems to be an unintended accident.

✅ I have added the tests to cover my changes.
✅ I have read the CONTRIBUTING document.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Working on CI issues.

Could you add a short releasenote? Otherwise this looks good to me 👍

Should eval more generally be checked once its an OperatorBase, but after the ListOp part, for this condition? At present the PR change is just when its eval'd with a DictStateFn. Maybe some of the others fail with some error raised already depending on what happens in the underlying code - but the msg in the change is clear, whereas some underlying failure may not be. And in the other parts might we not fail and end up with bogus return value as it being corrected here?

If other types are passed there already is a somewhat meaningful error message, e.g. for MatrixOp/VectorStateFns
ValueError: matmul: Input operand 1 has a mismatch in its core dimension 0, with gufunc signature (n?,k),(k,m?)->(n?,m?) (size 4 is different from 2)

or for CircuitOp/CircuitStateFns:
ValueError: Composition is not defined over Operators of different dimensions, 1 and 2, respectively.

The first above is a little bit more obscure. Since we can do an explicit test for all the other OperatorBase types, and the message is clear, would it just not be better to reposition the check to do it for all the OperatorBase types that are not a ListOp. Yes it would refactor that if else block a little but otherwise its a better guarantee/message I think. Same goes I would think for other evals in other primitive ops

I agree the error messages are a bit more obscure. I am not sure where or how you are suggesting to move this check. Where specifically are you thinking of when you say

checked once its an OperatorBase, but after the ListOp part ...
?

If I can make just one check, in a place that catches more cases, then I agree its probably a good idea. (Except that one can no longer see that this is check is made for PauliOp just by looking at the code there.)


pyenv activate doesn't always properly remove old virtualenvs from path

Here's my environment, starting without an active virtualenv
 $ pyenv versions
  system
  2.7.10
  anaconda-2.3.0
  myworkspace *THIS IS A VIRTUALENV*

$ pyenv virtualenvs
  anaconda-2.3.0 (created from /home/vagrant/.pyenv/versions/anaconda-2.3.0)
  myworkspace (created from /home/vagrant/.pyenv/versions/2.7.10)
  miniconda-3.9.1 (created from /home/vagrant/.pyenv/versions/miniconda-3.9.1)
  miniconda-3.9.1/envs/condavirtualenv (created from /home/vagrant/.pyenv/versions/miniconda-3.9.1)

  ...

$ env | grep PATH
PATH=/home/vagrant/.pyenv/shims:/home/vagrant/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

Confirm that activate/deactivate non-anaconda/miniconda backed virtualenv works:
$ pyenv activate myworkspace
$ env | grep 'PATH'
PATH=/home/vagrant/.pyenv/versions/myworkspace/bin:/home/vagrant/.pyenv/shims:/home/vagrant/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
$ pyenv deactivate
$ env | grep 'PATH'
PATH=/home/vagrant/.pyenv/shims:/home/vagrant/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

activate/deactive miniconda-backed conda env and note how miniconda remains in the path even though miniconda is not the activate python.
vagrant@ubuntu-14:~$ pyenv activate miniconda-3.9.1/envs/condavirtualenv
discarding /home/vagrant/.pyenv/versions/miniconda-3.9.1/bin from PATH
prepending /home/vagrant/.pyenv/versions/miniconda-3.9.1/envs/condavirtualenv/bin to PATH
$ env | grep 'PATH'
PATH=/home/vagrant/.pyenv/versions/miniconda-3.9.1/envs/condavirtualenv/bin:/home/vagrant/.pyenv/shims:/home/vagrant/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
CONDA_ENV_PATH=/home/vagrant/.pyenv/versions/miniconda-3.9.1
$ pyenv deactivate
discarding /home/vagrant/.pyenv/versions/miniconda-3.9.1/envs/condavirtualenv/bin from PATH
$ env | grep 'PATH'
PATH=/home/vagrant/.pyenv/versions/miniconda-3.9.1/bin:/home/vagrant/.pyenv/shims:/home/vagrant/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
$ pyenv version
2.7.10 (set by /home/vagrant/.pyenv/version)

Activate a python interpreter after activating a virtualenv and note how both the the previously activated virtualenv AND the interpreter are now in the path.
$ pyenv activate myworkspace
$ env | grep PATH
PATH=/home/vagrant/.pyenv/versions/myworkspace/bin:/home/vagrant/.pyenv/shims:/home/vagrant/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
$ pyenv activate anaconda-2.3.0
discarding /home/vagrant/.pyenv/versions/anaconda-2.3.0/bin from PATH
prepending /home/vagrant/.pyenv/versions/anaconda-2.3.0/bin to PATH
$ env | grep PATH
PATH=/home/vagrant/.pyenv/versions/anaconda-2.3.0/bin:/home/vagrant/.pyenv/versions/myworkspace/bin:/home/vagrant/.pyenv/shims:/home/vagrant/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
CONDA_ENV_PATH=/home/vagrant/.pyenv/versions/anaconda-2.3.0

EDIT: Fixed markdown syntax.

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/25445801-pyenv-activate-doesn-t-always-properly-remove-old-virtualenvs-from-path?utm_campaign=plugin&utm_content=tracker%2F335155&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F335155&utm_medium=issues&utm_source=github).

Hi @jimmywan! Thanks for reporting this issue.
Do you have eval "$(pyenv virtualenv-init -)" in your .bashrc / .zshrc file? I had a similar issue to yours where pyenv-virtualenv was not truly deactivating the virtualenvs. I discovered that if I commented out that line from my rc file (I use zsh so .zshrc) and resourced it, the activate/deactivate began working as expected.

Hi @jacobbridges ,  I should be covered as I've got this in my .profile:
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"

export WORKON_HOME=${HOME}/.virtualenvs
# pyenv virtualenvwrapper

@yyuu , any thoughts on this?

source could be typo, it should be eval'd. I have no idea what is happening in your installation. Probablly the 'deactivate' script might be not working properly.

@jimmywan I just removed that line altogether, then it started working.

@jacobbridges , Thanks for the suggestion, but it didn't seem to fix the problem for me:
This is what I got after commenting out the eval line for virtualenv-init.
Starting from a clean shell, confirm that system is my default and setting the shell interpreter to system has no effect:
$ pyenv version
2.7.10 (set by /home/user/.pyenv/version)
$ env | egrep '^PATH='
PATH=/home/user/.pyenv/shims:/home/user/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
$ pyenv shell system
$ pyenv version
system (set by PYENV_VERSION environment variable)
$ env | egrep '^PATH='
PATH=/home/user/.pyenv/shims:/home/user/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

Set shell interpreter to a version of miniconda:
$ pyenv shell miniconda-3.10.1
$ env | egrep '^PATH='
PATH=/home/user/.pyenv/shims:/home/user/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

Activate env using same miniconda interpreter. Seems to work fine.
$ pyenv activate miniconda-3.10.1/envs/myenv
# Load pyenv-virtualenv automatically by adding
# the following to ~/.bash_profile:

eval "$(pyenv virtualenv-init -)"

discarding /home/user/.pyenv/versions/miniconda-3.10.1/bin from PATH
prepending /home/user/.pyenv/versions/miniconda-3.10.1/envs/myenv/bin to PATH
(myenv)$ env | egrep '^PATH='
PATH=/home/user/.pyenv/versions/miniconda-3.10.1/envs/myenv/bin:/home/user/.pyenv/shims:/home/user/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
CONDA_ENV_PATH=/home/user/.pyenv/versions/miniconda-3.10.1/envs/myenv
(myenv)$ pyenv version
miniconda-3.10.1/envs/myenv (set by PYENV_VERSION environment variable)

Upon calling deactivate, the env's bin dir is successfully removed from the path, but /home/user/.pyenv/versions/miniconda-3.10.1/bin is prepended to the path and the version gets reset to system and not whatever it was set to before I activated my conda env.
Instead of  /home/user/.pyenv/versions/miniconda-3.10.1/bin, I expected to find /home/user/.pyenv/shims:
(myenv)$ pyenv deactivate
discarding /home/user/.pyenv/versions/miniconda-3.10.1/envs/myenv/bin from PATH
$ pyenv version
2.7.10 (set by /home/user/.pyenv/version)
$ env | egrep '^PATH='
PATH=/home/user/.pyenv/versions/miniconda-3.10.1/bin:/home/user/.pyenv/shims:/home/user/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

@yyuu I'll see if I can debug the issue with the deactivate script.

Did some more research and this is a bug with the *conda deactivate script:
https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/opMLiGnjymE
Thanks for the advice and I'm closing this issue.


error when i try to download playlist

error when i try to download playlist

error when i try to download playlist

Thanks for the report, I encountered the same error yesterday and fixed it regards to downloading videos, but haven't had time to release a new executable yet.
Regarding the download of playlists, I know how to fix it, but it will take a few days.
Explanation for the error:
At least one video in the playlist you tried to download, didn't support the resolution you selected.
Temporary solution:
Select another resolution.
I will try to fix it as soon as possible!

Should now be fixed. Just download version 1.3.


Optimizer does not operate

Looks like the board was wiped completely clean but I'm still having an issue with this sooooo repost!
Expected Behavior
PokemonOptimizer transfers pokemon that do not meet the criteria given in "rules"
"rules": [
                    {
                        "mode": "by_family",
                        "top": 2,
                        "sort": ["ivcp"],
                        "evolve": true,
                        "upgrade": false
                    },
                    {
                        "mode": "by_pokemon",
                        "top": 2,
                        "sort": ["attack_perfection"],
                        "evolve": false,
                        "upgrade": {"ivcp": 0.8}
                    },
                    {
                        "mode": "by_pokemon",
                        "top": 2,
                        "sort": ["defense_perfection"],
                        "evolve": false,
                        "upgrade": {"ivcp": 0.8}
                    }
                ]

Actual Behavior
No pokemon are being transferred.
Config
http://pastebin.com/rW7vStGC
Output
http://pastebin.com/GeFgfaqG
Other Information
OS: Mint 18

Branch: Dev

Git Commit: fbe0507ab538d715cf250df5fe8ac8d4c4852bd3
Python Version: 2.7.12

People are contacting github staff to ask for the possibility of restoring all the issues and pull requested we had. (just saying)

@douglascamata No worries. If this gets thrown out, I'll just update my previous post.

@RedViper9 Your configuration looks OK, but you are keeping up to 4 Pokemon of each name + 2 per family, which goes way over the 250 of your bag.
Maybe you do not need to keep the 2 best attack and defense of every Pokemon since they reroll their moves when they evolve. You might just want to target the evolved ones for that, or the one with a minimum cp.

Did you reach min slot free value?

@Anakin5 I was concerned about the number of pokemon kept, but I believe Selection of Rule 1 and Selection of Rule 2 are allowed to overlap. That would mean that those top 2 by ivcp and those top 2 by attack_perfection may overlap?
The issue at present is that PokemonOptimizer will not use attack_perfection and defense_perfection sorting methods. When I changed these to dps_attack and dps_defense, respectively, the task started working just fine.

Why is it an issue ?


Add edited file in the title of "Assets Info" window

Is your feature request related to a problem? Please describe.
Please add in the Assets Info window title the filename you're editing in that window. It can be confusing with many UABEA open at the same time.
Describe the solution you'd like
Add the filename in use to the title of that window, near the Assets Info:

Additional context

I'm not adding new features to this version of UABEA, but the new version will put the file names in the tab header.

I mean the bundle/3d filename (same of main window), to remember what asset are you working with

level9 was the name of the file I opened above (not part of a bundle). If you open a bundle, it would show the bundle file name instead.


having trouble seeing draft up UI colors

For what it's worth, ^^ only appears when using the default command prompt. It looks fine when using cmder.

For what it's worth, I've found 2 ways to do this (but it's been awhile so there must be a better way now)...

Have an interface for messaging and something to display for *nix or windows. On windows use the instance for that and just skip the colors. Build flags mean you can skip building the display you don't need. This is what glide does.
There are libraries for multi-platform colors. I either didn't like the size or license when I last looked at these.

If you find a good way to do this I'd love to see it.

This is at least partly addressed by #721.


add form actions to command palette

Now form actions are available on command palette too.
E.g. commit page

E.g. settings page

Works well 👍
Only "Help" button is missing, which is an href but not in the toolbar:

Yeah, I try to address that and others in follow up PRs :-)


[docs] Missing valid PageRuleAction values from documentation

I suppose because this library just passes them straight through without validation, and because the documentation is generated, valid values for PageRuleAction.Value (depending on PageRuleAction.ID are not given.
The majority of them can be easily guessed from the web UI, but not all of them, and some of them would be guessed incorrectly; for example:

TTLs can be given as any int (this might be guessed, but from the web UI you might think only the dropdown values are acceptable)
SSL > Full Strict is just "strict"
Cache levels are way different! 'No Query String' is "basic", 'Ignore Query String' is `"simplified", etc.

It's discoverable, but docs would be helpful. (I just set them no the web UI, then curled to see what it should be.)
I suppose they wouldn't even need to be on cloudflare-go docs if the options were fully enumerated on the main API docs - which, as far as I can tell, they're not.

I'll discuss this with some people internally and see how we want to handle this. We could update the comments in the code here but it would keep getting out of sync with the API.
I'll try and find out if it's possible for the api.cloudflare.com docs to have an exhaustive list of actions and values.

@OJFord @jamesog I'm not sure when (if ever) this will help with v4, but as we move towards the next generation of APIs we plan to publish the JSON Schemas used to generated the documentation so that clients can be driven from the same descriptions of the API.  This will ensure that clients and the API docs are always in sync going forward, and the the schemas correctly validate all JSON representations.
We may or may not be able to retrofit this for v4- some of the v4 design decisions are not conducive to easily supporting a fully schema-driven approach.  We also want to get feedback on the idea on a few new APIs before going all-in on it across the board.
Look for some blog posts that I'll be publishing in the coming few weeks with more details.
In the meantime, I don't know the specifics of these exact fields but assuming nothing unusual is going on, we should definitely enumerate sets of values correctly in the docs.

Thanks @handrews! I'll raise another internal ticket to track this.


Add download_blob to container client

Fixes Azure#8025
Fixes Azure#8366

Can one of the admins verify this patch?


Timestamps should be normalized to UTC and formatted by reporters

🚀 Feature Request
Is your feature request related to a problem? Please describe.
Right now, timestamps are generated using the time zone of the computer that's running it. This makes it somewhat variable and, especially when we create a Datadog reporter as discussed in #45, we will want it to be normalized and consistent.
Describe the solution you'd like
When we generate the reportTime in internal/scan.go, we should make sure that it is in UTC. Additionally, we should send just the raw timestamp to the reporters and let them handle formatting. This allows each reporter to format it in a way that is appropriate to that individual reporter.
Additional context
This is a follow-up to https://github.com/underdog-tech/vulnbot/pull/56#discussion_r1206055742

/assign


Saml2p: CorrelationCookie.Expiration not taking effect

This is the current config for our Saml2pAuthenticationOptions:
samlOptions.CallbackPath = $"/external/{provider.Name}";
samlOptions.CorrelationCookie.Expiration = TimeSpan.FromSeconds(300);
samlOptions.Events = new RemoteAuthenticationEvents
{
    OnRemoteFailure = context => context.HandleRemoteFailure()
};

Unfortunately, the expiration of the Saml2pCorrelation cookie is always 15 minutes (900 seconds) despite the fact that we are manually changing it to 300 seconds.
Can you tell me if this cookie is being overwritten somehow? The CorrelationCookie.Expiration specification works perfectly for OAuthOptions and OpenIdConnectOptions

What assembly/package is Saml2pAuthenticationOptions from?

See the other issue. Please send an email to the SAML product support.


Enhancements in golang client library.

Support for connection pooling.
Added API for client to pass in a func to get TLS config.
Cleaned up API.
Added pkg/client/README.md

closed


Shortened title

Hi there!
Can you please check why the titles are not completely used for the downloaded file?
I have already set up a shorter path for the destination of the download to check if the previous (longer) one was the cause of the shorter title, but this wasn't the case.
Thank you for your support!

First of all thanks for the testing.
This is a known problem with handling file extensions.
Since most of them are used by individuals and no one has reported them, they have not been dealt with.
Very sorry for the inconvenience
The revised executable file has been released.
Hope you will like this GUI
https://github.com/kannagi0303/yt-dlp-gui/releases/download/2022.09.17/yt-dlp-gui.exe

The dot-issue has been solved. Thanks for the quick fix and the already impressive work!
It could be that it become my favourite downloading-tool quite soon.
Still there are features on which maybe I have to work on myself sooner or later like:

Automatic analyzing of the copied/pasted URL
A limit regarding the quality of the video. I tend to download max 1080p 60fps videos. yt-dlp already considers a config file for this purpose which could come in handy for such an implementation. I've attached my current one.
A list of URL's to download them one after another (advanced: simultaneously)

Thank you for your positive support
I was also unable to meet my convenience with other tools (GUI), so I started to make this GUI
Now I almost only use my own GUI for downloading :)
Regarding the first two points you mentioned, I have already answered them in the previous issue
As for batch downloads, I have considered that there will be a need for this, but I have not yet thought of maintaining a simple, easy-to-use and reliable design. If you have good ideas, please help me, thank you

I have released a new version.
Right now, You can use config.txt for limit regarding the quality of the video.
Also supported output template.
Currently only supported -f, -o.
If you are interested, you can test it.

As for batch downloads, I have considered that there will be a need for this, but I have not yet thought of maintaining a simple, easy-to-use and reliable design. If you have good ideas, please help me, thank you

Hi!
My config.txt isn't considered when analyzing new Videos.
In which folder does the config-file you can select under Options>Configuration has to be placed?
Regarding the batch-download I propose to implement a simple list as a first step.

Regarding the usage of Aria2 (which is new to me): The downloaded build already comes with quite some attachments which messes up the bin folder (in which yt-dlp.exe and ffmpeg.exe are stored so far). A solution could be to require aria2.exe (including its other files) to be placed in a bin/aria2 folder
Thanks for the work so far!

I'm not sure if it's a bug in the program that can't be used.
I have put instructions on how to use the configuration file in the README
That is, put the configuration file in the subfolder of configs
It will be reflected in the drop-down options in Options → Configuration
This design is convenient to switch to another setting immediately under different conditions.

About batch download
I have found a project with a good interface design stacher.io

I will add your valuable ideas as future improvement directions :)

About attaching files
you are right
Maybe I can have the GUI automatically scan the subfolders, so that the user can place them the way they like
Or add the option of setting to let people customize the path where the attached file is located.

Hi!
I haven't read the readme part regarding the config file (and necessary folder). It works now as intended.
Regarding stacher.io.
I didn't use(know) that software so far. I have used VideoProc, which seems to be similar regarding its video downloads. Both share the Thumbnail in the yet to be downloaded area/section and each line of it, thus making it pretty thick. I suggest to not add it in the list in order to have a more compact/useful URL/Songtitle-listing.
Regarding the attached files.
I think your solution with the config-file is the way to go.
Following this the README could soon be like:
Use Configuration (refer to configuration)

Create a Folder configs in location of executable file
Put configuration file(s) into Folder configs (text file)

Need Restart for scan configuration file(s)

Use Aria2

Create a Folder aria2c in location of the yt-dlp.exe
Unpack all files from the latest archive into the newly created folder (containing the aria2c.exe file)

I have added the function of automatically scanning attached files,
Put it in the subfolder, you can organize these files arbitrarily, let executable files keep origin filename, it can be automatically found and used. (even nested folders)
This should work for your needs :)

About batch download interface
In the current version of the thumbnail, you can download the thumbnail separately by right-clicking the mouse. I want to keep this function.
I will try to achieve a compact and practical presentation, possibly through settings to provide different needs.
Anyway, this is the goal for the future.


Squigualiser will not accept slow5 file created by squigualator

Squigualiser would not accept slow5 file for an ideal signal produced by the current version of squigualator:
'. At src/slow5.c:732R] Malformed slow5 header. Bad minor version '0
[slow5_init::ERROR] Parsing slow5 header of file 'BC1_54mer_ideal_signal_290mer.slow5' failed. At src/slow5.c:153
./squigualiser: line 35:  2386 Segmentation fault      squigualiser "$@"
This is the header to the file in question.
#slow5_version	0.2.0
#num_read_groups	1
@asic_id	asic_id_0
@exp_start_time	2022-07-20T00:00:00Z
@experiment_type	genomic_dna
@flow_cell_id	FAN00000
@run_id	run_0
@sequencing_kit	sqk-lsk114
#char*	uint32_t	double	double	double	double	uint64_t	int16_t*	char*	double	int32_t	uint8_t	uint64_t
#read_id	read_group	digitisation	offset	range	sampling_rate	len_raw_signal	raw_signal	channel_number	median_before	read_number	start_mux	start_time
S1_1!Barcode!0!278!+	0	8192	13.380569	1536.598389	4000	2700

That's strange. Could you copy paste the commandline you used on squigulator so I can try?

Also could you please run slow5tools quickcheck on the input slow5 file so we can see if something is wrong with the slow5 file?
If it is not too big, you can share the file with us to investigate.

Hasindu,
Thanks for looking into this.  I have attached all the files I used for this run.  The slow5 file was produced with -ideal and -full-contigs.  I reran everything, and now get the following errors:
@.***:~/squigualiser$   ./squigualiser plot -f BC1_290mer.fa -s BC1_290mer_out.slow5 -a BC1_290mer_align.sam -o /home/taylor/squigualiser --tag_name "BC1"
sequence file: BC1_290mer.fa
alignment file: BC1_290mer_align.sam
signal file: BC1_290mer_out.slow5
Info: Signal to reference method using SAM/BAM ...
Traceback (most recent call last):
File "/home/taylor/squigualiser/bin/squigualiser", line 8, in
sys.exit(main())
File "/home/taylor/squigualiser/lib/python3.8/site-packages/src/init.py", line 56, in main
args.func(args)
File "/home/taylor/squigualiser/lib/python3.8/site-packages/src/plot.py", line 784, in run
if args_ref_start < reference_start + 1:
TypeError: '<' not supported between instances of 'NoneType' and 'int'
From: Hasindu Gamaarachchi @.>
Sent: Thursday, January 04, 2024 6:55 PM
To: hiruna72/squigualiser @.>
Cc: Taylor, John-Stephen @.>; Author @.>
Subject: Re: [hiruna72/squigualiser] Squigualiser will not accept slow5 file created by squigualator (Issue #52)
That's strange. Could you copy paste the commandline you used on squigulator so I can try?

Reply to this email directly, view it on GitHubhttps://github.com/hiruna72/squigualiser/issues/52#issuecomment-1877966408, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BEVIT5KQBHVIPGLKYX6ZLI3YM5FPVAVCNFSM6AAAAABBNXAQZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZXHE3DMNBQHA.
You are receiving this because you authored the thread.Message ID<EMAIL_ADDRESS>

Hasindu,
Sorry to taking up your time.  I have gotten your program to work. I finally more carefully read the instructions and realized that I had included a sam alignment file and not a paf file (I only paid attention to the -a ).  Also I did not include a read file that I now produced with squigulator.   There still seems to be an error concerning an index file (see below) that might be related to an issue relating to assignment.  See attached pdf which shows that the alignment of the nucleotides based on the files created from squigualator appear to be 6 nucleotides off.  I used the read file created by squigualator.    The sequence above is the one that I am working with along with another sequence containing a 6-mer deletion of AATTAG.  I used squigulator to simulate both ideal signals and squigualiser to align the sequence with the signal.  What I find, however, is that the alignment created by squigualiser is off by 6 nucleotides (I also found this to be true simply reading the sam file and comparing it to the signal).  The part of the signal that disappears is not the one assigned to AATTAG.  Somehow an offset of 6 nucleotides has not been incorporated. How in the future do I get squigualizer to align the signal properly with the sequence?  If there something that I am missing?  Sorry, I am new to all this.  I am working with DNA photomodifications and trying to understand how they affect nanopore signals.
sequence file: BC1_278mer_read.fa
alignment file: BC1_278mer_align.paf
signal file: BC1_278mer_out.slow5
Info: Signal to read method using PAF ...
plot region: 1-278      read_id: S1_1!Barcode!0!278!+
[slow5_idx_init::INFO] Index file not found. Creating an index at 'BC1_278mer_out.slow5.idx'.
output file: /home/taylor/squigualiser/S1_1!Barcode!0!278!+_BC1minus6.html
John-Stephen Taylor<EMAIL_ADDRESS>Professor of Chemistry           Web: chemistry.wustl.edu/people/john-stephen-taylorhttps://chemistry.wustl.edu/people/john-stephen-taylor
Department of Chemistry       Dept. website: chemistry.wustl.edu/https://chemistry.wustl.edu/
Washington University<PHONE_NUMBER> Voice
Campus Box 1134<PHONE_NUMBER> FAX
St. Louis, MO 63130<PHONE_NUMBER> Chemistry Office
From: Hasindu Gamaarachchi @.>
Sent: Thursday, January 04, 2024 7:04 PM
To: hiruna72/squigualiser @.>
Cc: Taylor, John-Stephen @.>; Author @.>
Subject: Re: [hiruna72/squigualiser] Squigualiser will not accept slow5 file created by squigualator (Issue #52)
Also could you please run slow5tools quickcheck on the input slow5 file so we can see if something is wrong with the slow5 file?
If it is not too big, you can share the file with us to investigate.

Reply to this email directly, view it on GitHubhttps://github.com/hiruna72/squigualiser/issues/52#issuecomment-1877971594, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BEVIT5JGJS6CIOAWJINHNKTYM5GOLAVCNFSM6AAAAABBNXAQZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZXHE3TCNJZGQ.
 The error regarding 'NoneType' and 'int' was fixed in the latest release. This happened when the user did not provide a region. Could you please check if you have the latest version (v0.5.1) installed?
Slow5 index file missing is a warning. It will create an index when it is not found. Hence, can be ignored.

I guess since you replied to the email, the file is not attached. Could you reply on github and attach the two html files (with and without deletion)?
If you can attach the two .fa files I can produce the results from my end as well.

Squigulator V. 0.2.2 Squigualiser 0.3.0.  I think these were the precompiled binaries avalable on Github which were downloaded recently.  I have attached the two fasta files in question as a zipfile.  A 290mer and a 278mer.  The 290mer is a dimer of a 145mer containing the AATTAG sequence.
squigulator.zip

Hello @jsthv,
Thanks for the files.
There are couple of ways to achieve the objective.
The easiest is to add Ns to fill the deletions in the 278 fasta file and generate the plots.
The best method is to use a .vcf file and generate a reference. Then use that reference with squigulator to simulate reads with variants (https://github.com/hasindu2008/squigulator#examples).
I wrote a script to perform the first method. The script and the plots can be found in the attached zip file.
jsthv.zip
Let me know if there are many such sequences you are anaylsing. Then I can write a proper script.

Hi @jsthv,
Hope your issues are resolved.
Please feel free to reopen the issue should you need further help.


Lambda controller removing code: block

Describe the bug
I have a single Function resource defined (see below). The problem I'm having is that after the function is successfully created the code: block gets removed from the Function object and ArgoCD will show this resource as out-of-sync again. What's the recommended way of indicating there is a new version available? At first I was embedding the gitsha in the zip file name but then learned that the controller doesn't like it when the zip file name changes so I switched to updating the s3ObjectVersion for every new release. Any ideas what causes the code: block to get mutated?
Helm manifest
  apiVersion: lambda.services.k8s.aws/v1alpha1
  kind: Function
  metadata:
    name: REDACTED
  spec:
    code:
      s3Bucket: REDACTED_bucket
      s3Key: REDACTED/REDACTED.zip
      s3ObjectVersion: BYpVrqCPxd6yEZQ.bsZBlLuB9S_creyY
    memorySize: 128
    name: {{ .Release.Name }}
    description: "REDACTED Release: {{ .Values.gitsha }}"
    packageType: Zip
    handler: index.handler
    publish: true
    role: {{ .Values.roleARN }}
    runtime: {{ .Values.runtime }}
    timeout: {{ .Values.timeout }}

Live K8s object post creation:
apiVersion: lambda.services.k8s.aws/v1alpha1
kind: Function
metadata:
  labels:
    argocd.argoproj.io/instance: REDACTED
  name: REDACTED
  namespace: aws-staging
spec:
  architectures:
  - x86_64
  code: {}
  description: 'REDACTED Release: 313d869226b56635b2257116891dbc68a9f82c85'
  handler: index.handler
  memorySize: 128
  name: REDACTED
  packageType: Zip
  publish: true
  role: arn:aws:iam::REDACTED:role/REDACTED-role
  runtime: nodejs16.x
  timeout: 3
  tracingConfig:
    mode: PassThrough
status:
  ackResourceMetadata:
    arn: arn:aws:lambda:us-east-1:REDACTED:function:REDACTED
    ownerAccountID: "REDACTED"
    region: us-east-1
  codeSHA256: OR5V0WC2XajpJ0QR03SphjFMTtisMpqDkUeGtgpIE7A=
  codeSize: 60466309
  conditions:
  - lastTransitionTime: "2022-07-25T23:28:49Z"
    message: Resource synced successfully
    reason: ""
    status: "True"
    type: ACK.ResourceSynced
  lastModified: 2022-07-25T23:28:49.000+0000
  lastUpdateStatus: InProgress
  lastUpdateStatusReason: The function is being created.
  lastUpdateStatusReasonCode: Creating
  revisionID: 8512d1c8-eba7-4730-a5f9-8f37370995e7
  state: Active
  version: $LATEST

Steps to reproduce
Install the above object in a cluster.
Expected outcome
The controller should not edit the code: block of an existing Function object.
Environment
aws eks

Kubernetes version:  v1.21.12-eks-a64ea69
Using EKS (yes/no), if so version?: yes,  v1.21.12-eks-a64ea69
AWS service targeted (S3, RDS, etc.): Lambda with zip files from s3 using versioning

Forgot to add details on the version im using:
image:
  repository: public.ecr.aws/aws-controllers-k8s/lambda-controller
  tag: v0.0.16

I'm trying to figure out whether to continue with my proof-of-concept. Did I misconfigure something? My understanding was that operators should not mutate anything in the spec and only edit the status section. Any idea what could be going on here @A-Hilaly ?

Hi @bjoernw, so most of the lambda controllers create/delete code paths are fully generated and the reason why the fields don't stay in sync is that the Lambda API returns different code.s3bucket and code.s3key fields than the ones originally submitted. We will have to add some custom code to keep the original code.s3bucketandcode.s3key` content.

@bjoernw this issue have been fixed in v0.0.17 release


Get-Secret errors on converting JSON string

Hey Chris, good work on this module! You've got a hell of a lot farther than me! I've run into two issues that I'll file separately:
I'm not able to retrieve a secret from my vault (setting it works perfectly, I can see it in the GUI)
Set-Secret -Name 'PS Test' -Secret 'this is text'
Get-Secret -Name 'PS Test'

# also tested
Get-Secret -Name 'PS Test' -AsPlainText

ConvertFrom-Json: C:\Program Files\WindowsPowerShell\Modules\SecretManagement.1Password\<IP_ADDRESS>\SecretManagement.1Password.Extension\SecretManagement.1Password.Extension.psm1:63
Line |
  63 |  … ems --categories Login,Password --vault $VaultName | ConvertFrom-Json
     |                                                         ~~~~~~~~~~~~~~~~
     | Cannot convert the JSON string because it contains keys with different casing. Please use the -AsHashTable switch instead. The key
     | that was attempted to be added to the existing key 'B5UserUUID' was 'b5UserUUID'.

Get-Secret: The secret PS Test was not found.

Environment
Get-Module *SecretManagement*

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Binary     0.5.5      preview6   Microsoft.PowerShell.SecretManagem… {Get-Secret, Get-SecretInfo, Get-SecretVault, Register-SecretVault…}
Manifest   <IP_ADDRESS>               SecretManagement.1Password

$PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.2.0-preview.1
PSEdition                      Core
GitCommitId                    7.2.0-preview.1
OS                             Microsoft Windows 10.0.19042
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

op -v

1.8.0

Thanks for the feedback. Are there any usage scenarios that you covered or feel are important this version is still missing? Besides the basics actually working. :)

I haven't looked at what sort of additional metadata is possible to feed through SecretManagement...  but being able to add URLs, OTPs, notes, etc would be sweet

OTP. That's an interesting scenario.
Definitely agree on setting other fields.

Strictly speaking, if I'm using that in code I'd probably just store the OTP secret as its own secret and use GoogleAuthenticator to get the pin if needed (yes... I have some APIs I use that ask for the OTP pin 🤦♂)

For the original issue, it looks like an error in Get-SecretInfo. The SecretsModule doesn't like duplicate keys, but 1Password has no problem having duplicate Titles. I can't reproduce the same message you got, but I added duplicate items to 1Password with different casing and got the following error from SecretsManagement. I try to filter out duplicates and return only the first item, but Contains() of ArrayList is case sensitive comparison so it doesn't work in this case (haha).
Get-SecretInfo: An item with the same key has already been added. Key: [B5UserUUID, Microsoft.PowerShell.SecretManagement.SecretInformation]

Ok, duh, reproduced in Get-Secret. I don't know of a good way to disambiguate duplicate 1Password items.

It's easy to get a totp from op, but not sure how to handle that with Get-Secret. 🤔
op get totp <item>

maniacal laughing The trouble you can get into with Powershell.


Pattern for complex routes (hierarchical sub-routes, resources...)

Hello!
I understand the documentation is still in its infantry, so this might end up being in v3, but do you have best practices for more complex routing patterns?
EG.
/api/vision/classify
/api/vision/train
/api/admin/
/api/sound/classify
/api/sound/train

(maybe one of the answers is the /api/ at the beginning should be in a reverse proxy frontend such as nginx, but a hierarchical pattern is still useful)
Also there is little suggestions on best way to deal with resource patterns such as
/api/resources/{resourceId}
but also
/api/resources/{resourceId}/somethingelse/{}
My files are growing a bit wild trying to put something together...!
I'm used to django way of dealing with routes and resources, which I find clean and flexible, but I find overkill bringing in the full framework for many modern projects with a leaner api and no need for complex database layer and templating system; and was seduced by the different approach Hug is taking; but without more documentation (or a larger sample project maybe?) I am really struggling with more complex scenarios...
thx!

I agree that the documentation for this sort of thing is a bit sparse right now. There is a thing called extend_api which might help. See the following snippets from the test cases:
def test_extending_api():
    """Test to ensure it's possible to extend the current API from an external file"""
    @hug.extend_api('/fake')
    def extend_with():
        import tests.module_fake
        return (tests.module_fake, )

    assert hug.test.get(api, 'fake/made_up_api').data

def test_extending_api_simple():
    """Test to ensure it's possible to extend the current API from an external file with just one API endpoint"""
    @hug.extend_api('/fake_simple')
    def extend_with():
        import tests.module_fake_simple
        return (tests.module_fake_simple, )

    assert hug.test.get(api, 'fake_simple/made_up_hello').data == 'hello'

(Also see module_fake.py and module_fake_simple.py in the test cases.)

There is an example at https://github.com/timothycrosley/hug/blob/develop/examples/secure_auth_with_db_example.py using
@hug.get(('/api/job', '/api/job/{job_id}/'), requires=api_key_authentication)

showing that /api/resources/{resourceId} works. (Note that https://github.com/timothycrosley/hug/pull/449 must be merged for the full example to work.)

@bernhardreiter thanks, that's not what I'm after - I understand how a to use a variable from the REST url but I was after ways to extend a the paths, basically what Django calls "including" other URL confs (https://docs.djangoproject.com/en/1.10/topics/http/urls/#including-other-urlconfs).
@cag answer is on topic, and I still think it deserves full space in the documentation! (and it's a bit unusual :-) )

Support for this is now in develop and will make it's way into the next release:
see: https://github.com/timothycrosley/hug/issues/464 for more details.
Essentially you can now include parent URLs simply by using relative paths:
    my_router = hug.urls('/base_route')

    @my_router.get('sub_route')
    def my_method(*args, **kwargs):
        pass

would result in my_method being accessible via the url /base_route/sub_route.
Let me know if this doesn't fully address your issue.
Thanks!
~Timothy