extends enum test for use in conditional types

Search Terms
enum isEnum mapped-types conditional-types enum-test extends-enum
Suggestion
Rephrased from : https://stackoverflow.com/questions/50452032/typescript-enum-type-check-for-conditional-types
Here's what I kinda want, but it is not syntactically valid:
enum Features {
  "A" = 1,
  "B" = 2,
  "C" = 2
}

type EnumOrString<T> = T extends enum
  ? T | keyof T
  : T

declare function getData(featureFilter: EnumOrString<typeof Features>[]): Features[]

getData takes an array of the enum values or the enum keys but returns only the enum values.
I also would want to extend this to mapped types similar to DeepPartial so that any nested enums all get this treatment - without having to have separate hierarchies of types partitioned by Request and Response.  Example on Playground
Use Cases
I make calls to restful services that accept enum values as either the number value OR the string key, but the services always return just the number value.   I could ignore the ability to send strings, but some code would have to be rewritten because it happens to cache values by these key names.
Checklist
My suggestion meets these guidelines:

[x] This wouldn't be a breaking change in existing TypeScript / JavaScript code
[x] This wouldn't change the runtime behavior of existing JavaScript code
[x] This could be implemented without emitting different JS based on the types of the expressions
[x] This isn't a runtime feature (e.g. new expression-level syntax)

I am not sure i understand what you mean by keyof T in the above example.. keyof Feature is the same as keyof number, which is a list of "toString" | "toExponential" ..., so i am guessing Feature | "toString" is not what you want from this type..
I think you meant keyof typeof Feature, and for that, you have to remember to pass in the value type at use site, and if you are doing this for enums, why need to use a conditional type?

Fixed that in the example.  The case I'm going for is like this though:
export type DeepEnumish<T> =
    T extends any[] ? DeepEnumishArray<T[number]> :
    T extends enum ? T | keyof T :
    T extends object ? DeepEnumishObject<T> :
    T;

export interface DeepEnumishArray<T> extends Array<DeepEnumish<T>> {}

export type DeepEnumishObject<T> = {
    [P in keyof T]: DeepEnumish<T[P]>;
}

declare function roundtripPayload(criteria : DeepEnumish<Payload>): Payload

Where the nested enum members of Payload can be sent as numbers or strings, and will be returned from the server as numbers certainly.

this line still does not make much sense still.. T extends enum ? T | keyof T :  if T is an enum type, keyof T is keyof number | keyof string.. which is not what you want if i understand correctly..
I am guessing you want keyof typeof e, but to do that, you need the value reference, which you do not have.

This is such a common confusion (class and enum introducing both a named type and a named value where the named value is not of the named type) that I wonder if there's any use for a feature request that lets people get from the named type to the type of the named value.   Something like this for enums:
enum MyEnum {  A, B }

type TypeofMyEnum = EnumTypeof<MyEnum>; // typeof MyEnum

I'm thinking of something like the following synthetic enum code, which extends the type of each element of the enumeration with a design-time-only brand that points back to the enum object:
type EnumBrand<E> = { __enum: E };
type EnumTypeof<E extends EnumBrand<any>> = E['__enum'];

namespace MyEnum {
    const brand = <T>(x: T) => x as T & EnumBrand<typeof MyEnum>;
    enum _MyEnum { A, B }
    // ignoring reverse mapping as well as bitwise craziness
    export const A = brand(_MyEnum.A);
    export type A = typeof A;
    export const B = brand(_MyEnum.B);
    export type B = typeof B;
}
type MyEnum = typeof MyEnum[keyof typeof MyEnum];

Then the following works:
type TypeofMyEnum = EnumTypeof<MyEnum>;

and checking for the brand would meet the "detect an enum" requirement if needed, also:
type IsEnum<T> = T extends EnumBrand<any> ? true : false

I don't like phantom properties that don't exist at runtime, so maybe some other way would work?  Thoughts?


chore: setup rate-limiting

Related to https://github.com/Informasjonsforvaltning/fdk-issue-tracker/issues/873


add tests

[x] Add unit tests
[ ] Add integration tests
[x] Setup CI

Integration tests are out of scope for now


Mac M1 tensorflow installation error

System information

OS Platform and Distribution: Mac OS Big Sur Version 11.6 Apple M1 chip Memory 8G

Here is how I install:
conda create -n tensorflow python=3.9.5
conda activate tensorflow
conda install -c apple tensorflow-deps
conda install -c apple tensorflow-deps==2.6.0
python -m pip install tensorflow-macos
python -m pip install tensorflow-metal
brew install libjpeg
conda install -y matplotlib jupyterlab

Then I run:
python
import tensorflow as tf

Then I got error:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/zhangjing/miniforge3/envs/tf3.7/lib/python3.8/site-packages/tensorflow/__init__.py", line 449, in <module>
    _ll.load_library(_plugin_dir)
  File "/Users/zhangjing/miniforge3/envs/tf3.7/lib/python3.8/site-packages/tensorflow/python/framework/load_library.py", line 155, in load_library
    py_tf.TF_LoadLibrary(lib)
tensorflow.python.framework.errors_impl.NotFoundError: dlopen(/Users/zhangjing/miniforge3/envs/tf3.7/lib/python3.8/site-packages/tensorflow-plugins/libmetal_plugin.dylib, 6): Symbol not found: _OBJC_CLASS_$_MPSGraphCompilationDescriptor
  Referenced from: /Users/zhangjing/miniforge3/envs/tf3.7/lib/python3.8/site-packages/tensorflow-plugins/libmetal_plugin.dylib (which was built for Mac OS X 12.0)
  Expected in: /System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Versions/A/MetalPerformanceShadersGraph

@JingZhang918
We don't support the M1 chip.
Can you refer to similar issues:#42482,46178,48808
Can you please create this on Apple Developer Forum.

Can confirm that I was facing this issue on my M1 Mac with MacOS 12.0 and solved this issue after upgrading to MacOS 12.6.
Installation following this guide: https://www.mrdbourke.com/setup-apple-m1-pro-and-m1-max-for-machine-learning-and-data-science/


Buying TFT with BTC Mainnet (Add copy button to the amount)

This is not a bug, rather a UX issue,
When the amount to be sent is specified to the user, like in many other payment gateways - you can copy the address, but you cannot copy the amount, which makes the user type the amount that needs to be sent, and may possibly result in the wrong amount due to a human error:

Will be on the next live version


handle io.EOF on successful stream termination

Hi there! Cool project, thanks for working on it. It's nice to finally have an active SSE package in Go :) I am trying to make use of it at my work Sourcegraph to parse SSE streams from OpenAI-compatible API endpoints. In doing this, I ran into a limitation/bug with go-sse which I try to detail below.

Parser.Error is documented as always returning io.EOF at the end of normal input:
// Err returns the last read error. At the end of input
// it will always be equal to io.EOF.
func (r *Parser) Err() error {

And according to parser_test.go, the parser can return either io.EOF or parser.ErrUnexpectedEOF
Inherently, this means that Connection.read, which uses the parser internally, can also produce those two errors.
However, it only has a case at the end for io.EOF under a dirty case:
	err := p.Err()
	if dirty && err == io.EOF { //nolint:errorlint // Our scanner returns io.EOF unwrapped
		c.dispatch(ev)
	}

This means that Connection.read may return io.EOF at the end of a normal input stream. This is problematic because it means that Connection.doConnect will observe that io.EOF at the end of normal input here, and report it as connection to server lost:
	err = c.read(res.Body, setRetry)
	if errors.Is(err, ctx.Err()) {
		return false, err
	}

	return true, &ConnectionError{Req: c.request, Reason: "connection to server lost", Err: err}

Which will then trigger connection-retry logic, even though the stream just finished successfully.
And indeed, when I try using the client against some popular software which implements SSE, I encounter exactly that case via the OnRetry callback:
...all the valid events I would expect back in the stream...
"error": "request failed: connection to server lost: EOF"

...all the valid events I would expect back in the stream...
"error": "request failed: connection to server lost: EOF"

...all the valid events I would expect back in the stream...
"error": "request failed: connection to server lost: EOF"

...all the valid events I would expect back in the stream...
"error": "request failed: connection to server lost: EOF"

Now, I did see in the README that Connect always returning an error is an intentional design:

In other words, a successfully closed Connection will always return an error

But I think the tests do not experience this chronic-retry behavior because they set MaxRetries: -1, to disable retry logic.
TestConnection_reconnect does seem to observe this chronic-retry behavior, but due to cancellation in the OnRetry callback it doesn't fail the test:
		OnRetry: func(_ error, _ time.Duration) {
			retries++
			if retries == 3 {
				cancel() // this prevents infinite retries from happening
			}
		},

This PR fixes the issue in practice, but I wasn't able to fix TestConnection_reconnect correctly with the time I had to spend on this. Sorry about that. :) I hope this information is at least useful as a 'bug report' even if the PR is rejected :)

Hi there and thank you for putting in all this work for the PR!
Please confirm if my following observation is valid. There seems to be two ways in which an SSE stream may be used:

to keep a persistent channel for a long or undetermined timespan for pushing messages to clients
to send a one-off message which, due to the way it is generated, may take longer to do so and can be sent in fragments (for example, OpenAI responses)

When I've first designed the library – in the pre-ChatGPT era – I've only had the first use-case in mind. For the first use-case it's not really expected that the connection will be closed by the server; this is also validated by browser implementations of SSE clients, as on connection end they always attempt to reconnect.
Just successfully returning on io.EOF satisfies the second case but may not work for the first one. It seems as if the client should be able to be customized for each of these use-cases – in other words, the handling of io.EOF should be personalizable.
I'm planning on rewriting the client from scratch – see #25 for reasoning and an API outline. I will adapt that design to take differentiated io.EOF handling into consideration (note to self: see if #37 can also handled, should use browser's readyState handling as inspiration).
To work around this limitation, for now I think you could do something like this:
c := sse.Client{
    Backoff: sse.Backoff{MaxRetries: -1},
}
req, _ := http.NewRequestWithContext(ctx, ...)
conn := c.NewConnection(req)

var err error
for {
    err = conn.Connect()
    if err == ctx.Err() {
        break
    }
    if errors.Is(err, io.EOF) {
        err = nil
        break
    }
    // some waiting here before retrying or other backoff logic
}

if err != nil {
    // handle error
}

The disadvantage is that sadly you lose the builtin backoff functionality.
I'd be confortable also with merging some sort of TreatEOFAsSuccess bool field on sse.Client, which would change the behavior of the client to be the one implemented in this PR only when this field is true. If you wish to add this, make sure that you add a descriptive comment to the field and also update CHANGELOG.md.
Do not worry about the test – another reason I want to rewrite this is because some tests are kind of flaky and I want to redo them.
Let me know what you think and how you wish to proceed further.

to send a one-off message which, due to the way it is generated, may take longer to do so and can be sent in fragments (for example, OpenAI responses)

Correct

When I've first designed the library – in the pre-ChatGPT era – I've only had the first use-case in mind. For the first use-case it's not really expected that the connection will be closed by the server; this is also validated by browser implementations of SSE clients, as on connection end they always attempt to reconnect (i.e. they also "chronically" retry, as you've described).

This makes sense, yeah, I hadn't considered that use case :)

I'm planning on rewriting the client from scratch – see https://github.com/tmaxmax/go-sse/issues/25 for reasoning and an API outline (some feedback on it would be immensely appreciated – if you find time, I'd be very grateful if you'd leave a comment with some thoughts under that issue).

I had briefly skimmed that issue and thought what you were describing in there seemed like a big improvement from my POV :)

for now I think you could do something like this
The disadvantage is that sadly you lose the builtin backoff functionality.

Yeah, this is what I ended up doing after I sent this PR. And I think that works fine for my use-case; in fact backoff/retry logic is not super important in my use-case (though is kind of an interesting thing to have)
I am happy with go-sse and the workaround above so far, and am moving forward with using it as-is, thanks for making this package! Feel free to treat this entire PR as just feedback / a bug report :) I am also happy to have the PR closed.

Thank you too for your input! It is immensely appreciated.


reference-manual: preloaded-image: update

Signed-off-by: Raul Muñoz<EMAIL_ADDRESS>

Docs for 2600790c59b6cba11ff2096b505078ef186383fd are browesable at: https://ci.foundries.io/projects/fio-docs/builds/1127/docs/artifacts/html/index.html

Docs for 2600790c59b6cba11ff2096b505078ef186383fd are browesable at: https://ci.foundries.io/projects/fio-docs/builds/1128/docs/artifacts/html/index.html

Docs for d0a779de1c9011ed0cdb200680c14a566c87da31 are browesable at: https://ci.foundries.io/projects/fio-docs/builds/1129/docs/artifacts/html/index.html

I think I would mention somewhere in the doc that lmp configuration inherits from containers configuration and can be overridden as well as add  an example of it to the factory-config.yml of this section https://ci.foundries.io/projects/fio-docs/builds/1129/docs/artifacts/html/reference-manual/linux/preloaded-images.html?highlight=preloading#common-advanced-scenario.
For example, a user, for some reason, doesn't want to preload "debug-tools" App into images produced by a LmP build.
lmp:
 ....
  ref_options:
     refs/heads/devel:
       params:
         APP_SHORTLIST: "money-making-app"
....

Or, maybe it's too much. The point is to communicate to customers that lmp inherits containers configuration.

Docs for 5e008954c73700ce2f0a392fe9ae5c8bf207b187 are browesable at: https://ci.foundries.io/projects/fio-docs/builds/1130/docs/artifacts/html/index.html

Docs for 587d5cb229bb4321af4464d02621494d12bb57ca are browesable at: https://ci.foundries.io/projects/fio-docs/builds/1131/docs/artifacts/html/index.html

@doanac and @mike-sul  I think we are almost there.
I add two new commits (fixup).
1 -  adds the inherits examples
2 - fix yml spaces

+1 from me

Will wait for @mike-sul approvel.
@mike-sul  I'm converting it to a draft just to help me remember to squash it next monday.

Docs for bd7b1e72148a1bac6a8795cf13926b55fefceab7 are browesable at: https://ci.foundries.io/projects/fio-docs/builds/1133/docs/artifacts/html/index.html

Docs for 311577757e7d63899ff4b878a355fd340b3863c5 are browesable at: https://ci.foundries.io/projects/fio-docs/builds/1134/docs/artifacts/html/index.html


DHCPv4: Additional pool with MAC address control does not filter on MAC address

Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
[X] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
[X] I have searched the existing issues and I'm convinced that mine is new.
Describe the bug
Objective: I have bought myself some IoT devices (smart powerplugs) which I want to separate from my other devices, therefore I want to separate them in a separate IP Pool which is filtered on MAC address. MAC address range of the supplier is a good filter to 'group' the devices in a separate pool.
As it now seems, only 1 device ends up in the additional pool. All other devices with the same starting MAC end up in the main DHCP pool.
To Reproduce
Steps to reproduce the behavior:

Configure DHCP main pool and additional pool with separate IP ranges

Edit main DHCP Pool and add MAC device ranges that need to be in additional pool to the deny list under MAC address control

Edit additional DHCP pooland add MAC device ranges that need to be in additional pool to the allow list under MAC address control

Save and Restart DHCP; check ARP scan/leases table

Find only 1 MAC address as <IP_ADDRESS>. All others are in main pool in stead of additional pool

Expected behavior
Expected behaviour would be that all devices with a MAC address under DENY of main pool are DENIED an IP for that pool range and all the devices with MAC address under ALLOW of additional pool are given IP from that POOL
Screenshots
see above
Relevant log files
n/a
Additional context
Additional remark, not directly related to issue: MAC Address Control is an advanced feature which is in collapsed state by default. It stays in this state, although values are entered in the fields. It would be logical that once an "advanced" field is populated, the values are also shown by default. This logic would apply to all fields with the 'advanced' tag.
Environment
OPNsense 19.7.4_1-amd64
FreeBSD 11.2-RELEASE-p14-HBSD
OpenSSL 1.0.2s 28 May 2019
Platform
Manufacturer | PC Engines
Product Name | apu2
Version | 1.0
Serial Number |
Family | Not Specified
Vendor | coreboot
Version | v<IP_ADDRESS>
Release Date | 08/08/2019

Configuration from cat /var/dhcpd/etc/dhcpd.conf
option domain-name "localdomain";
option ldap-server code 95 = text;
option arch code 93 = unsigned integer 16; # RFC4578
option pac-webui code 252 = text;

default-lease-time 7200;
max-lease-time 86400;
log-facility local7;
one-lease-per-client true;
deny duplicates;
ping-check true;
update-conflict-detection false;
authoritative;
class "840d8e" {
  match if substring (hardware, 1, 3) = 84:0d:8e;
}
class "68572D" {
  match if substring (hardware, 1, 3) = 68:57:2D;
}
class "C44f33" {
  match if substring (hardware, 1, 3) = C4:4f:33;
}

subnet <IP_ADDRESS> netmask <IP_ADDRESS> {
  pool {
    deny members of "840d8e";
    deny members of "68572D";
    deny members of "C44f33";
    range <IP_ADDRESS> <IP_ADDRESS>;
  }

  pool {
    allow members of "840d8e";
    allow members of "68572D";
    allow members of "C44f33";
    deny unknown-clients;
    range <IP_ADDRESS> <IP_ADDRESS>;
  }

  option routers <IP_ADDRESS>;
  option domain-name-servers <IP_ADDRESS>;

}

Output of /var/log/dhcpd.log
Sep 23 22:05:33 OPNsense dhcpd: DHCPDISCOVER from 68:57:2d:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:05:37 OPNsense dhcpd: DHCPDISCOVER from 68:57:2d:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:05:39 OPNsense dhcpd: DHCPDISCOVER from c4:4f:33:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:05:41 OPNsense dhcpd: DHCPDISCOVER from c4:4f:33:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:05:42 OPNsense dhcpd: DHCPDISCOVER from 84:0d:8e:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:05:44 OPNsense dhcpd: DHCPDISCOVER from 84:0d:8e:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:05:45 OPNsense dhcpd: DHCPDISCOVER from c4:4f:33:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:05:45 OPNsense dhcpd: DHCPDISCOVER from 68:57:2d:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:05:53 OPNsense dhcpd: DHCPDISCOVER from c4:4f:33:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:06:03 OPNsense dhcpd: DHCPDISCOVER from 68:57:2d:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:06:04 OPNsense dhcpd: DHCPDISCOVER from 84:0d:8e:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:06:06 OPNsense dhcpd: DHCPDISCOVER from 84:0d:8e:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:06:07 OPNsense dhcpd: DHCPDISCOVER from 68:57:2d:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:06:08 OPNsense dhcpd: DHCPDISCOVER from 84:0d:8e:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:06:09 OPNsense dhcpd: DHCPDISCOVER from c4:4f:33:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:06:09 OPNsense dhcpd: DHCPDISCOVER from 84:0d:8e:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:06:10 OPNsense dhcpd: DHCPDISCOVER from 84:0d:8e:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:06:13 OPNsense dhcpd: DHCPDISCOVER from 84:0d:8e:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:06:15 OPNsense dhcpd: DHCPDISCOVER from 68:57:2d:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:06:18 OPNsense dhcpd: DHCPDISCOVER from 84:0d:8e:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:06:21 OPNsense dhcpd: DHCPDISCOVER from 84:0d:8e:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:06:31 OPNsense dhcpd: DHCPDISCOVER from 68:57:2d:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:06:34 OPNsense dhcpd: DHCPDISCOVER from c4:4f:33:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:06:34 OPNsense dhcpd: DHCPDISCOVER from 84:0d:8e:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:06:36 OPNsense dhcpd: DHCPDISCOVER from c4:4f:33:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:06:37 OPNsense dhcpd: DHCPDISCOVER from 84:0d:8e:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:06:40 OPNsense dhcpd: DHCPDISCOVER from c4:4f:33:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:06:48 OPNsense dhcpd: DHCPDISCOVER from c4:4f:33:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:06:59 OPNsense dhcpd: DHCPDISCOVER from 84:0d:8e:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:07:01 OPNsense dhcpd: DHCPDISCOVER from 84:0d:8e:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:07:03 OPNsense dhcpd: DHCPDISCOVER from 68:57:2d:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:07:04 OPNsense dhcpd: DHCPDISCOVER from c4:4f:33:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:07:04 OPNsense dhcpd: DHCPDISCOVER from 68:57:2d:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:07:05 OPNsense dhcpd: DHCPDISCOVER from 84:0d:8e:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:07:06 OPNsense dhcpd: DHCPDISCOVER from 68:57:2d:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases
Sep 23 22:07:08 OPNsense dhcpd: DHCPDISCOVER from 84:0d:8e:**:**:** via igb0: network <IP_ADDRESS>/24: no free leases

Hmm... added some additional info and unintentionally closed the issue. Issue is still valid

question is if it's intended to work this way, my first try would be to ditch the deny list and see if the client receives an address within the correct pool. The man page might help you out about preference in pool assignments, see https://www.freebsd.org/cgi/man.cgi?query=dhcpd.conf

Hi Ad, I already checked the man page and according to the Man page, the config as described above is perfectly valid.

       As you can see in the preceding example,	pools can  have	 permit	 lists
       that  control  which  clients  are allowed access to the	pool and which
       aren't.	Each entry in a	pool's permit list is introduced with the  al-
       low  or	deny  keyword.	  If a pool has	a permit list, then only those
       clients that match specific entries on the permit list will be eligible
       to  be  assigned	 addresses from	the pool.   If a pool has a deny list,
       then only those clients that do not match any entries on	the deny  list
       will  be	 eligible.     If both permit and deny lists exist for a pool,
       then only clients that match the	permit list and	do not match the  deny
       list will be allowed access.

 In second pool, the "deny unknown-clients;" field was ticked, which effectively blocked the devices on the "allow" list from registering in the appropriate range.
pool {
allow members of "840d8e";
allow members of "68572D";
allow members of "C44f33";
deny unknown-clients;
range <IP_ADDRESS> <IP_ADDRESS>;


Unused variable warnings and static analysis fixes

What steps will reproduce the problem?
1. Compile in release mode or
2. Perform static analysis

What version of the product are you using? On what operating system?
Revision 313, Mac OS X 10.9.4 (Xcode 5.1)

Please provide any additional information below.
I've attached a patch.

Original issue reported on code.google.com by<EMAIL_ADDRESS>on 29 Aug 2014 at 6:47
Attachments:

warning_fixes.patch

I fixed some of these. There were a couple changes I disagree with.


created dansegliode.html

Your pull request looks good, and is ready for merging!
Please be patient until a maintainer has time to merge your contribution.
Thank you for being a part of Open Source, I hope you continue to help other repositories in the future!
This is an automated response, beep boop.
if you think there is a mistake, contact a maintainer

1134d9fb7703504b2baa11cd0225af9eee98ed57


How I can store array of strings using gorm-spanner

Thanks for stopping by to ask us a question! Please make sure to include:

What you're trying to do
I'm trying to store a set of values in a column of type array string in Spanner using GORM, but I'm encountering an error.
What code you've already tried

type NewEntity struct {
	Field1 int64            `gorm:"primaryKey;autoIncrement:false;column:picture_key"`
	Field2 []string        `gorm:"type:ARRAY<STRING(MAX)>;column:models"`
	Field3 time.Time   `gorm:"column:updated_at"`
}

dbEntity := model.NewEntity(p)
err := db.Create(dbEntity).Error
if err != nil {
  panic(err)
}

Any error messages you're getting

spanner: code = \"InvalidArgument\", desc = \"Value has type STRUCT<STRING, STRING, STRING, ...> which cannot be inserted into column Field2, which has type ARRAY<STRING> [at 1:168]\\n...Field3`) VALUES (@p1,(@p2,@p3,@p4,@p5,@p6<EMAIL_ADDRESS>
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.

@nahuelmonserrat I think I have the same problem as yours but with floats.

spanner: code = "InvalidArgument", desc = "Value has type STRUCT<FLOAT64, FLOAT64> which cannot be inserted into column centroid, which has type ARRAY

What I've been doing to workaround this is to implement Valuer for my array types - it converts the []float64 to spanner.NullFloat64 type:
type Vector []float64

func (v Vector) Value() (driver.Value, error) {
	vector := make([]spanner.NullFloat64, 0, len(v))

	for _, f := range v {
		vector = append(vector, spanner.NullFloat64{Float64: f, Valid: true})
	}

	return vector, nil
}

type Entity struct {
	Data Vector `gorm:"not null;type:ARRAY<FLOAT64>""`
}

I think go-gorm-spanner should work with all array types, also with both []float64 and pq.Float64Array.


docs:improve description for GITHUB_OUTPUT

Why:
Improve description for GITHUB_OUTPUT and others
Closes: #31211

What's being changed (if available, include any code snippets, screenshots, or gifs):

Check off the following:

[ ] I have reviewed my changes in staging, available via the View deployment link in this PR's timeline (this link will be available after opening the PR).

For content changes, you will also see an automatically generated comment with links directly to pages you've modified. The comment won't appear if your PR only edits files in the data directory.

[ ] For content changes, I have completed the self-review checklist.

@ooooo-create Thanks so much for opening a PR with this fix! I'll update the branch and get this merged once tests are passing 🍏


Table view

Not sure if this is feasible: Table with sortable and filtered columns - option to choose which columns. Similar to the table view in FLEx. [What are the limitations on which columns would be allowed in this table view?]

@vernastutzman What would the columns be in this table view?

TableView1 shows a table view From FLEx with several columns, each column can be filtered and sorted.

TableView2 shows how to select the columns that show in the table view.


[SPARK-36850][SQL] Migrate CreateTableStatement to v2 command framework

What changes were proposed in this pull request?
Migrate CreateTableStatement to v2 command framework
Why are the changes needed?
Migrate to the standard V2 framework
Does this PR introduce any user-facing change?
no
How was this patch tested?
existing tests

Test build #143477 has started for PR 34060 at commit 1965f77.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47988/

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47988/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/47988/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143477/

Test build #143667 has finished for PR 34060 at commit 9e42d67.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143667/

Test build #144280 has started for PR 34060 at commit e146c17.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48759/

Test build #144280 has finished for PR 34060 at commit e146c17.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Hi @huaxingao , any update? I am trying to migrate ReplaceTableStatement by learn from your PR

@dchvn Sorry for the late reply. I will work on this now.

Test build #145346 has started for PR 34060 at commit 6ffae91.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49817/

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49817/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49817/

Test build #145346 has finished for PR 34060 at commit 6ffae91.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/145346/

@dchvn I need to work with @cloud-fan on this PR. Once this PR is done, you can continue your Migrate CreateTableAsSelectStatement PR. I will be extreme slow because I am taking off until 11/29.

Test build #145505 has started for PR 34060 at commit a2dd853.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49977/

Test build #145505 has finished for PR 34060 at commit a2dd853.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
case class TableProperties(

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/145505/

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49977/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49977/

Test build #145568 has started for PR 34060 at commit 29ba020.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50040/

Test build #145569 has started for PR 34060 at commit 6a3bc84.

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50040/

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50041/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/50040/

Test build #145568 has finished for PR 34060 at commit 29ba020.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
case class CreateTable(
case class TableSpec(

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/145568/

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50041/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/50041/

Test build #145569 has finished for PR 34060 at commit 6a3bc84.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/145569/

Test build #145591 has started for PR 34060 at commit 97481b3.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50063/

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50063/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/50063/

Test build #145591 has finished for PR 34060 at commit 97481b3.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/145591/

Test build #145661 has started for PR 34060 at commit 39320f4.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50131/

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50131/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/50131/

Test build #145661 has finished for PR 34060 at commit 39320f4.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/145661/

Test build #145733 has started for PR 34060 at commit 8fdf059.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50203/

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50203/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/50203/

Test build #145733 has finished for PR 34060 at commit 8fdf059.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/145733/

thanks, merging to master!

Thanks!


Suppress log output during tests

Currently
When the tests are run, this is the output.
.....................................................................................................................................................................................Capybara starting Puma...
* Version 3.12.0 , codename: Llamas in Pajamas
* Min threads: 0, max threads: 4
* Listening on tcp://<IP_ADDRESS>:59940
...........

Desired
If it's possible, it'd be better if this was quietly swallowed up and not displayed.
Capybara starting Puma...
* Version 3.12.0 , codename: Llamas in Pajamas
* Min threads: 0, max threads: 4
* Listening on tcp://<IP_ADDRESS>:59940

related https://github.com/rspec/rspec-rails/issues/1897


feat: Ability to call arbitrary command from a template

It would provide more flexibility to author your values.yaml files:
{{ exec "./myscript" | fromJson | toYaml }}

You can even exec an another template engine to dynamically generate your values.yaml. This way, our users won't need to wait until helmfile implements a bunch of template funcs to cover all the use-cases.

And it should take arbitrary number of args like {{ exec "./myscript" "--flag1" "val1" }}


[dashboard v2] logging updates

This PR updates Dashboard logging for dashboard v2. It

captures additional client events we want to analyze
updates how we capture performance (now more complicated because of Tabs and nested Tabs). specifically it introduces mount_dashboard, mount_explorer, and load_dashboard_pane events
it normalizes batch client logs, inserting one row per event, instead of logging a large blob containing an array of multiple events.

Some events are logged immediately, while others are "batched" similar to the current dashboard logging.
Event name changes (made for improved event name clarity)

page_load_perf => load_dashboard_pane (see below for details)
load_events => load_chart_data (dashboard + explorer views)

event now includes vis_type, has_extra_filters, and force_refresh fields

render_events => render_chart (dashboard + explorer views)

note: this event already included vis_type

New dashboard click events that are captured

force refresh chart
force_refresh_dashboard
change_dashboard_filter
explore_dashboard_chart*
export_csv_dashboard_chart*

*denotes dispatched immediately, the others cause page re-renders and therefore result in a batch event
Updated performance logs
Previously we captured a single page_load_perf event the first time all dashboard charts were loaded (or explore view loaded). To reduce the number of ajax calls, this was a "batch event" and included all chart data fetching + render events under the events. This event

does not capture subsequent page loads (e.g., when a filter is added, or an entire dashboard is refreshed)
no longer makes sense in the context of dashboard v2 tabs + nested tabs
does not explode the multiple events into their own log rows (arguably better for downstream analysis)

This PR replaces the single page_load_perf event with (potentially multiple) load_dashboard_pane events, each of which is a batched event. A dashboard "pane" is any of the following:

simply the dashboard page (if no tabs exist)
A top-level tab
A dashboard-level tab (a tab within the page)

A load_dashboard_pane event is dispatched every time all of the charts within a pane (not including any nested within another set of tabs!) go from an unloaded => loaded state. This includes when a filter changes or force refreshes. Every load_dashboard_pane event includes the following metadata about the pane:

start_offset ms offset from page load time when the pane began to load (if you click on a tab 2 minutes into a session, this would be (2 min * 60 s/min * 1000 min/s)
duration ms duration of all chart data requests
id the layout component id of the pane
type the layout type of the pane (grid or tab)
parentType parent pane type, null if the pane is a top-level tab or no top-level tabs exist
parentId id of the parent layout component (useful if you want to associate two tab panes with a common set of tabs)
index the index of the pane (0 for grid, 0-5 for tabs)
depth the depth of the pane (0 for grid or top-level tabs, 1 for nested tabs [you cannot nest tabs beyond this])
chartCount number of charts within the tab (not including any nested tabs)

New performance logging

A new mount_dashboard event was added and will be included in the first load_dashboard_pane batch event. The start_offset value in this event is effectively the amount of time it takes for a user to see something on their screen (so, bundle download + parsing time) and marks the point at which the Dashboard React component mounts and therefore chart queries begin.
A similar, new mount_explorer event was added with an equivalent start_offset value

General logger.js changes
I made the following changes/improvements to the logger util file

do not allow multiple ActionLoggers to handle the same event type (I'm not convinced this wasn't buggy previously, and seems unnecessary)
add source, source_id, ts, start_offset, event_name, and impression_id to all events within in a batch action (to support unrolling batched events into multiple rows and re-associating with the batch action)
batched log source value changed from client to dashboard or slice depending on its source
because batch events are now exploded and inserted as multiple single-event log rows, the following top-level batch event key/values were removed: duration and actionType

@graceguo-supercat let me know if you see any issues with this + the changes I made to logger.js
@john-bodley @michellethomas  @mistercrunch

Remaining TODO

[x] test / validate

[x] batching
[x] multiple types of tab layouts
[x] explore view
[x] add logger_spec

[x] filter render events that come from chart resizes?
[x] hook up refresh chart + refresh dashboard events
[x] add unravelling of batched logs on the backend
[ ] remove unnecessary start_offset values in Logger calls (now included in every event)

update: this is what explore logging looks like now

@john-bodley @graceguo-supercat I refactored to use bulk log insertions for batch evetns in Python, PTAL 👀

do you have a sample what each row look like (required attr, optional attrs) after bulk log insertion?

@graceguo-supercat yes, below each event becomes a row, this is the json column of that row (python also adds dttm, user, slice/dashboard id if it exists)
dashboard view

[
  {
    "source": "dashboard",
    "source_id": 10,
    "event_name": "mount_dashboard",
    "impression_id": "ry8ULDny7",
    "ts":<PHONE_NUMBER>214,
    "start_offset": 9859
  },
  {
    "source": "dashboard",
    "source_id": 10,
    "event_name": "load_chart_data",
    "impression_id": "ry8ULDny7",
    "ts":<PHONE_NUMBER>723,
    "start_offset": 47889,
    "slice_id": "slice_15",
    "is_cached": false,
    "force_refresh": false,
    "row_count": 50,
    "datasource": "7__table",
    "duration": 480,
    "has_extra_filters": false,
    "viz_type": "table"
  },
  {
    "source": "dashboard",
    "source_id": 10,
    "event_name": "load_chart_data",
    "impression_id": "ry8ULDny7",
    "ts":<PHONE_NUMBER>901,
    "start_offset": 47896,
    "slice_id": "slice_16",
    "is_cached": false,
    "force_refresh": false,
    "row_count": 50,
    "datasource": "7__table",
    "duration": 652,
    "has_extra_filters": false,
    "viz_type": "table"
  },
  {
    "source": "dashboard",
    "source_id": 10,
    "event_name": "load_chart_data",
    "impression_id": "ry8ULDny7",
    "ts":<PHONE_NUMBER>012,
    "start_offset": 47883,
    "slice_id": "slice_20",
    "is_cached": false,
    "force_refresh": false,
    "row_count": 1092,
    "datasource": "7__table",
    "duration": 775,
    "has_extra_filters": false,
    "viz_type": "line"
  },
  {
    "source": "dashboard",
    "source_id": 10,
    "event_name": "render_chart",
    "impression_id": "ry8ULDny7",
    "ts":<PHONE_NUMBER>878,
    "start_offset": 48380,
    "label": "slice_15",
    "vis_type": "table",
    "duration": 145
  },
  {
    "source": "dashboard",
    "source_id": 10,
    "event_name": "render_chart",
    "impression_id": "ry8ULDny7",
    "ts":<PHONE_NUMBER>988,
    "start_offset": 48574,
    "label": "slice_16",
    "vis_type": "table",
    "duration": 61
  },
  {
    "source": "dashboard",
    "source_id": 10,
    "event_name": "render_chart",
    "impression_id": "ry8ULDny7",
    "ts":<PHONE_NUMBER>022,
    "start_offset": 48667,
    "label": "slice_20",
    "vis_type": "line",
    "duration": 1
  },
  {
    "source": "dashboard",
    "source_id": 10,
    "event_name": "load_dashboard_pane",
    "impression_id": "ry8ULDny7",
    "ts":<PHONE_NUMBER>022,
    "start_offset": 48668,
    "id": "DASHBOARD_TAB_TYPE-HkZkwVkwTz",
    "type": "DASHBOARD_TAB_TYPE",
    "parentType": null,
    "parentId": null,
    "index": 0,
    "depth": 0,
    "chartCount": 3,
    "duration": 784
  }
]

explorer view

[
  {
    "source": "slice",
    "source_id": 6,
    "event_name": "mount_explorer",
    "impression_id": "HJwBLw3k7",
    "ts":<PHONE_NUMBER>483,
    "start_offset": 7892
  },
  {
    "source": "slice",
    "source_id": 6,
    "event_name": "load_chart_data",
    "impression_id": "HJwBLw3k7",
    "ts":<PHONE_NUMBER>080,
    "start_offset": 7885,
    "slice_id": "slice_6",
    "is_cached": false,
    "force_refresh": false,
    "row_count": 5,
    "datasource": "6__table",
    "duration": 1605,
    "viz_type": "table"
  },
  {
    "source": "slice",
    "source_id": 6,
    "event_name": "render_chart",
    "impression_id": "HJwBLw3k7",
    "ts":<PHONE_NUMBER>159,
    "start_offset": 9516,
    "label": "slice_6",
    "vis_type": "table",
    "duration": 52
  }
]

js code changes LGTM.

talked to @john-bodley offline, merging this 👍


README does not specify the deployment order

Description
The README implies that the deployment order starts with Tier 0, but does not explicitly state that. Deployment should start with the saca hub.
Steps to Reproduce
Steps to reproduce the behavior:

Read the README as a new user.

Expected behavior
The README defines a clear deployment order
Actual behavior
The README does not clearly define a deployment order.

Closing this issue as OBE because the deployment scripts define the order.


requirements.txt has a large scope

The instructions specify to install the requirements.txt in docs:
$ pip install -r docs/requirements.txt

but this list is quite extensive - if we look at setup.py we certainly don't need sphinx (and other docs dependencies) to run the library.
       install_requires = [
            "argcomplete",
            "PyYAML",
        "buildtest-configs=="+BUILDTEST_VERSION,
	    "Python-buildtest-config=="+BUILDTEST_VERSION,
	    "Perl-buildtest-config=="+BUILDTEST_VERSION,
	    "Ruby-buildtest-config=="+BUILDTEST_VERSION,
	    "R-buildtest-config=="+BUILDTEST_VERSION,
       ]

What is the reason for directing the user to this file?

It looks like there isn't instruction about the command register-python-argcomplete. The implication is that the user should know to follow the link to install something, but maybe this should be explicitly shown (it was confusing to me at first).
https://buildtest.readthedocs.io/en/latest/installing_buildtest.html#setting-up-auto-complete-on-buildtest-arguments

If there aren't instructions for the user to install it, they will hit this error:
$ buildtest --help
Traceback (most recent call last):
  File "/share/software/user/open/python/3.6.1/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/share/software/user/open/python/3.6.1/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/users/vsochat/SOFTWARE/buildtest-framework/buildtest/main.py", line 8, in <module>
    from buildtest.tools.menu import BuildTestParser
  File "/home/users/vsochat/SOFTWARE/buildtest-framework/buildtest/tools/menu.py", line 7, in <module>
    import argcomplete
ModuleNotFoundError: No module named 'argcomplete'

I'd suggest a separate requirements.txt to install actual required modules - I can PR this.

Hi @vsoch,
please ignore the section found in setup.py i dont have a pip package for buildtest-framework anymore
  install_requires = [
            "argcomplete",
            "PyYAML",
        "buildtest-configs=="+BUILDTEST_VERSION,
	    "Python-buildtest-config=="+BUILDTEST_VERSION,
	    "Perl-buildtest-config=="+BUILDTEST_VERSION,
	    "Ruby-buildtest-config=="+BUILDTEST_VERSION,
	    "R-buildtest-config=="+BUILDTEST_VERSION,
       ]

Seems like argcomplete was not installed. Can you confirm you are using python3.6 or higher.

This would be helpful to be able to install to a specific python, instead of just using from the bin like spack. On our cluster the default python (which I forgot about) is 2.7.5. To use python3 I have to explicitly use python3.

What are your reasons for not wanting a setup.py flow? Just to keep everything served from the repo? And if the setup.py isn't needed, should it be removed?

oh i just didnt get time to package up buildtest-framework into a pip package. I had this done initially and didnt both removing it thinking i would do it some point. I think it was bit more overhead during release since project was still beta release

ah okay, makes sense!

seems like you have may have both system python for python 2 and 3. I generally have a software stack that includes Anaconda3.
I use pipenv https://github.com/pypa/pipenv to setup my environment. I didnt specify the full details on how to setup virtualenv or pipenv its user preference personally.
I highly recommend pipenv to get the python3 environment its much easier but thats your call.

That's what I do locally too - but I'm mimicking a user that would want to shell into a cluster and install this. They are going to do the minimum number of steps - meaning likely they could run into this issue.

yea I know definitely the setup part for buildtest can be greatly improved. There is not much other than setting up PATH, installing pip deps and setting up argcomplete

I can work on these things! Let's move to slack.

Is this issue still relevant? considering my recent PR #160

Let me change the title so it's relevant to something I'll add to my PR - python packaging.

This is all done! I don't think there will be a release soon - there are more changes warranted before that, but we can close the issue here. @shahzebsiddiqui do you want help to manage the packages on pypi? I have an account here.


Add Dependabot file

Github offers functionality to automatically update dependencies for us. This PR add the dependabot file to the project to update the dependencies and helps with the security updates
More info : https://docs.github.com/en/code-security/dependabot/dependabot-alerts/viewing-and-updating-dependabot-alerts
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Codecov Report

Merging #188 (b678195) into main (4654c1e) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main     #188   +/-   ##
=========================================
  Coverage     73.91%   73.91%
  Complexity       15       15
=========================================
  Files             3        3
  Lines            46       46
  Branches          5        5
=========================================
  Hits             34       34
  Misses            8        8
  Partials          4        4

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Feat/interim storage page

Description
Jira Ticket
This PR implements the interimStorage step of the seedlot registration process.
To view the page: go to http://localhost:3000/seedlot/registration/<seedlot number> after you created A class seedlot and click on the Complete Registration button, then click on Interim Storage Step 3 on the progress bar.
The following page should render:

Type of change

[x] New feature (non-breaking change which adds functionality)

How Has This Been Tested?
Manually tested locally.
Checklist

[x] I have read the CONTRIBUTING doc
[x] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have already been accepted and merged

Thanks for the PR!
Any successful deployments (not always required) will be available below.
Frontend available
Once merged, code will be promoted and handed off to following workflow run.
Main Merge Workflow

SonarCloud Quality Gate failed.
  1 Bug   0 Vulnerabilities   0 Security Hotspots   2 Code Smells
 16.2% Coverage  0.0% Duplication

Bug and code smell(unused var and comments) detected

Validation does not seem to be working, I'm able to submit this form. One cause is when the checkbox is unchecked, the state value is unchanged even though the input looks empty.

 Validation does not seem to be working, I'm able to submit this form. One cause is when the checkbox is unchecked, the state value is unchanged even though the input looks empty.

Also the date input boxes do not have the same length as others

@craigyu If it's an easy enough fix (maybe 30min work?), I think it's worth fixing it. If not, let's live with it for now.


connection refused

Hello, I am having issues trying to setup the classifier with ff3 in a docker container.
I followed the installation directions but ffiiitc is unable to connect to the ff3 api.
FATAL {main.main} : Get "http://localhost:8080/api/v1/transactions?page=1": dial tcp <IP_ADDRESS>:8080: connect: connection refused
I am able to connect to the ff3 api through localhost, the hostname, or <IP_ADDRESS> using curl and the same PA Token.
I specified the FF_API_KEY and FF_API_URL in the compose.yml file with and without quotes. If I use http://app:8080 for FF_APP_URL, the connection attempt times out.
2024/01/20 13:54:29 INFO  {main.main} Firefly transaction classification started
2024/01/20 13:54:29 INFO  {main.main} getting config
2024/01/20 13:54:29 INFO  {main.main} loading classifier from model: data/model.gob
2024/01/20 13:54:29 ERROR {main.main} open data/model.gob: no such file or directory
2024/01/20 13:54:29 INFO  {main.main} looks like we need to do some training...
2024/01/20 13:54:29 ERROR {main.main} open data/model.gob: no such file or directory
2024/01/20 13:54:29 INFO  {firefly.(*FireFlyHttpClient).GetTransactionsDataset} get first page of transactions
2024/01/20 13:54:29 FATAL {main.main} : Get "http://localhost:8080/api/v1/transactions?page=1": dial tcp <IP_ADDRESS>:8080: connect: connection refused
2024/01/20 13:54:29 FATAL {main.main} : Get "http://localhost:8080/api/v1/transactions?page=1": dial tcp <IP_ADDRESS>:8080: connect: connection refused

I figured out the issue. The image I built locally was ffiiitc:latest but the image in the compose file was akopulko/ffiiitc:latest. The wrong container was trying to connect to ff3. The documentation may need to include the distinction between built and pulled images.

I figured out the issue. The image I built locally was ffiiitc:latest but the image in the compose file was akopulko/ffiiitc:latest. The wrong container was trying to connect to ff3. The documentation may need to include the distinction between built and pulled images.

Continuing this thread: Could you elaborate on how you managed to resolve the issue? I tried to replace the reference to akopulko/ffiiitc:latest in the compose file with just ffiiitc/latest so it would point to the locally built container, but that didn't work. I'm new to compose files, so further help would be appreciated.


Update docker image to use official xctest framework.

This depends on IBM-Swift/Kitura#194

Verified.


no-unused-modules hangs & overflows memory

In version 2.4.0
Running with the following rule:
"import/no-unused-modules": [
    "error",
    {"unusedExports": true}
]

eslint hangs for a minute, and then node prints a dump:

<--- Last few GCs --->
[13612:00000273A3998820]   138421 ms: Mark-sweep 1393.8 (1425.0) -> 1393.4 (1424.0) MB, 2458.2 / 0.0 ms  (average mu = 0.060, current mu = 0.008) allocation failure scavenge might not succeed
[13612:00000273A3998820]   138429 ms: Scavenge 1394.6 (1424.0) -> 1394.2 (1426.5) MB, 5.7 / 0.0 ms  (average mu = 0.060, current mu = 0.008) allocation failure
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 00000367C635C5C1]

Security context: 0x02cfc449e6e1
1: visitSingle [000001E8CE77CE21] [C:\Users\Ivan Rubinson\Documents\Software Engineering\Work\PROJECTNAME\Front\node_modules\babel-eslint\node_modules@babel\traverse\lib\context.js:~88] [pc=00000367C6C797DF](this=0x02e4eee45b41 ,node=0x02f0c5c7de69 ,key=0x02f78ec07d79 <String[2]: id>)
...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 00007FF79725ECE5
2: 00007FF797238196
3: 00007FF797238BA0
4: 00007FF7974C8D5E
5: 00007FF7974C8C8F
6: 00007FF797A069D4
7: 00007FF7979FD137
8: 00007FF7979FB6AC
9: 00007FF797A04627
10: 00007FF797A046A6
11: 00007FF7975A7767
12: 00007FF79763F44A
13: 00000367C635C5C1
npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR<EMAIL_ADDRESS>lint: eslint ./client/src/
npm ERR! Exit status 134
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR!      C:\Users\Ivan Rubinson\AppData\Roaming\npm-cache_logs\2019-05-20T16_10_57_005Z-debug.log

The log from npm-cache is:

0 info it
worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli   'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'lint' ]
2 info using<EMAIL_ADDRESS>3 info using<EMAIL_ADDRESS>4 verbose run-script [ 'prelint', 'lint', 'postlint' ]
5 info lifecycle<EMAIL_ADDRESS><EMAIL_ADDRESS>6 info lifecycle<EMAIL_ADDRESS><EMAIL_ADDRESS>7 verbose lifecycle<EMAIL_ADDRESS>unsafe-perm in lifecycle true
9 verbose lifecycle<EMAIL_ADDRESS>CWD: C:\Users\Ivan Rubinson\Documents\Software Engineering\Work\PROJECTNAME\Front
10 silly lifecycle<EMAIL_ADDRESS>Args: [ '/d /s /c', 'eslint ./client/src/' ]
11 silly lifecycle<EMAIL_ADDRESS>Returned: code: 134  signal: null
12 info lifecycle<EMAIL_ADDRESS>Failed to exec lint script
13 verbose stack Error<EMAIL_ADDRESS>lint: eslint ./client/src/
13 verbose stack Exit status 134
13 verbose stack     at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack     at EventEmitter.emit (events.js:182:13)
13 verbose stack     at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:182:13)
13 verbose stack     at maybeClose (internal/child_process.js:962:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid<EMAIL_ADDRESS>15 verbose cwd C:\Users\Ivan Rubinson\Documents\Software Engineering\Work\PROJECTNAME\Front
16 verbose Windows_NT 10.0.17134
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "lint"
18 verbose node v10.13.0
19 verbose npm  v6.4.1
20 error code ELIFECYCLE
21 error errno 134
22 error<EMAIL_ADDRESS>lint: eslint ./client/src/
22 error Exit status 134
23 error Failed at the<EMAIL_ADDRESS>lint script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 134, true ]

Similar issue here on last released version (2.17.3). Actually eslint does work but it takes an insane amount of time to complete, more than 10min on my current react-native project while downgrading the plugin to version 2.17.2 get things back to normal (~25sec)

Could you please provide a demo repo for this case?

@rfermann
It takes me over an hour to get back eslint results (its a large project, without this rule it takes 8 mins to run). It looks to me like this change:
https://github.com/benmosher/eslint-plugin-import/commit/bb686defa4199d5c1f77980b165907b9d3c0971b
may have done it.
Specifically refreshing source files.. it seems to add 2-3 seconds per check for me.
(But many thanks for the great rule, its been almost impossible to find dead code before this)

@lukeapage thanks for the context. I guess, reading files from the src folder multiple times (once per linted file) causes your issue. The time for this task seems to increase overproportional when having more files to lint.
I will try to find a solution for this issue within the next days.

What's the current algorithm? What's its time complexity?

@soryy708 the rule is building up a list of all files within the specified src folder by reading from the file system. It does so to prevent linting files which either have to be ignored or are located outside the src folder. Linting these files may lead to a crash of the rule as these haven't been analyzed before.
Currently this list is getting refreshed on each lint, e.g for 1000 linted files, this list is refreshed 1000 times.
One solution could be to only reread the src-files, if the currently linted file hasn't been found in the list of source files first.
So, instead of using this logic:
// refresh list of source files
const srcFiles = resolveFiles(getSrc(src), ignoreExports)

// make sure file to be linted is included in source files
if (!srcFiles.has(file)) {
  return
}

we could use this logic:
// refresh list of source files
// const srcFiles = resolveFiles(getSrc(src), ignoreExports)

// make sure file to be linted is included in source files
if (!srcFiles.has(file)) {
  srcFiles = resolveFiles(getSrc(src), ignoreExports)
  if (!srcFiles.has(file)) {
    return
  }
}

Tests are still passing with this logic, so there is no change in the logic of the rule.
Benchmarking this change brings down the execution time of this rule from more than 830ms to approx. 115ms using the files of our tests.
Taking out all tests creating new files during runtime (which makes it necessary to reread the list of relevant source files), reduces the execution time to something below 100ms.
This change takes the biggest effect, if the src specified in the rule options is congruent with the src eslint is going to lint.
If the src option of this rule is only a small subset of the files being linted, the execution time might not drop that much.
@lukeapage could you implement my change in your local version of this plugin and lint your project?
Ideally you could also benchmark the lint run before and after the change. export TIMING=1 before linting your project will give you an overview about the 10 most expensive rules.
@ljharb what do you think about my suggested change?

Your change sounds great.
Separately, I don't think we have to be concerned with the files changing during the same eslint run - so perhaps just reading it once is sufficient?

Reading these files not only on the startup of ESLint is basically to make this rule work in code editors. When ESLint is started as a plugin in e.g. VS Code, it reads the files once and does not refresh the list of files while the plugin is running. When creating some new files, this rule will not consider the new files, possibly reporting some exports as unused although they are used in one of the new files.

hmm, are you sure they don't invoke eslint fresh for each run? if they use something like eslint_d, i'd expect it to provide some kind of hook to tell plugins that it's a fresh run.

@ljharb That depends on the editor, and I imagine eslint wants to support as many as possible. While a naive implementation (like you suggested) exists, I'm sure there are editors out there that will go the extra mile for a more optimal but sophisticated solution.

I wonder if we could maybe shasum the file, and only refresh the file list when it’s changed, not just when it’s outside the src?

I don't know how expensive this will be and if it is even more expensive than rereading the file system under some circumstances. And I never worked with checksums before, so I would need support in implementing this.
Another possibility of not refreshing the file list too often could be a second Set containing all files which have already been looked up but are not within src:
// refresh list of source files
// const srcFiles = resolveFiles(getSrc(src), ignoreExports)

// make sure file to be linted is included in source files
if (filesOutsideSource.has(file)) {
  return
}

if (!srcFiles.has(file)) {
  srcFiles = resolveFiles(getSrc(src), ignoreExports)
  if (!srcFiles.has(file)) {
    filesOutsideSource.add(file)
    return
  }
}

This way we would only refresh the file list once per file outside the source folder.

I like that approach; that would work for long-running tasks as well, unless you’d changed the eslint config which generally requires an editor restart anyways.


Migrate V1 to V2 in Tag 1.0.0b1 prerelease

Hello @NiallRees
loving what you have done with the beta version. Just one small question. I tried to migrate from V1 to V2 with the beta prerelease version installed and all the migration macros weren't available.
Was this intentionally? Or maybe I just didn't read your release note not thoroughly...
Regards
FoxMulder

Hi @foxmulder4223 - the naming is a little confusing here so want to make sure I've understood.
In pre 1.0.0, there were two Snowflake upload mechanisms, a 'v1' and a 'v2'. Are you saying you're trying to switch from using the v1 upload mechanism to v2? If so, neither of those are available in the beta prerelease due to a complete redesign of the package.

Hey @NiallRees
yeah you understood correctly.
Well and that explains a lot. Thanks for the clarification. Much appreciated!

No worries!


Problems with contracts/current/escrow.sol

I was using the mentioned script, and I may have uncovered an error. The script throws() in the buyerOrSellerOnly modifier, when the buyer calls it.  Will you honor a pull request?

Sure, thanks for spotting!


[FEATURE] Authenticated users are able to access their submissions

User story:
Given a feature toggle is turned on for my particular account,
as an authenticated user
when I access the submissions page,
then I'm able to see all submissions related to my account.
Acceptance criteria:

/submissions page (name to be confirmed) is accessible by selected users
all submissions for the current user are shown on that page
a feature flag enabling/disabling this access is managed by staff in the admin panel
each submission has some data related to it (to be defined) and a status
submissions panel is accessible by staff in the admin panel, sorted by pending submissions first

Developer notes:

This is the first task related to the new supplier portal. The focus is to model the data on the backend and make minimal changes on the front-end to expose this functionality to selected users (staff for now).
As pointed out by Chris, we can utilize django-waffle to configure this new functionality behind a feature flag.
We need to decide on which domain to expose this new functionality, for example: portal.greenwebfoundation.org, app.greenwebfoundation.org, etc.

 New registration form: Authenticated users are able to access their submissions

 New registration form: Authenticated users are able to access their submissions

Today me and @mrchrisadams discussed the details of implementing this new feature. Here are some key decisions that we agreed on:

We're going to continue implementing this feature in the existing Django app. Should we run into any limitations of this approach, we'll evaluate this decision again.
There's a need for a new entity, like ProviderRequest, that will model the input to the system as we expect it. This current issue focuses on implementing it side by side to existing models in the back-end. In the following tasks we will tackle the translation layer: how does the ProviderRequest map to existing (and possibly new) objects, like HostingProvider, including validation. Choosing this approach allows us to decouple business logic from the presentation domain, and handle refactoring of the existing models independently of introducing a new feature on the provider request form.
In the ProviderRequest model, we want to allow users to specify locations, each of them having a set of services offered by the provider in that location. We also want to allow users to include supporting evidence and possibly IP ranges per location.
There's a foreseen need to introduce an audit trail ProviderRequest, which will allow us to track all the changes being made when the request is going back and forth between customer and support.
django-waffle is already installed and enabled, but it's hidden in the admin panel on production by a custom code snippet. @mrchrisadams will remove that and enable waffle for staff members only.

Thanks for writing this up Oliwia. I'll make the separate issue for exposing django waffle to end users to Green web staff again

On the domain front:
My preference would be to serve this from app.thegreenwebfoundation.org, and gradually find way to phrase out admin.thegreenwebfoundation.org to represent the wider set of users who might use this info.
I think it would make sense to keep the api.thegreenwebfoundation.org but eventually find a way to deploy and scale these separately, as they are likely to have very different usage patterns.

 Update listing of how providers list how they are associated with datacentres


Non verified emails can be used for authentication and uid may not be unique

Describe the bug

The strategy defaults to 'UPN' if no email is provided. However, if the 'email' claim is not provided in an ID tokens, this means the email address is not verified (At least: For recent app registrations with default settings).
The strategy uses 'oid' as the 'uid'. However, this identifier is only unique within a single tenant, meaning there's a chance of colisions for multi-tenant app registrations. Microsoft advises to use the combination of tid + oid as a unique identifier.

To Reproduce
In an Azure tenant that does not use office 365 (does not assign mailboxes):

Add a random verified domain (e.g. a domain for which actually Google Workspace email is used)
Add a new user on that domain to Entra ID
(Note that ownership of the email-inbox is never verified)
You can now login with this account (There's no 'email' claim in the token, but there's a 'upn' extracted from the access token)

Note that Microsoft also supports on-premise AD to Azure sync, so it may be possible to exploit this even without having the domain itself verified, I'm not in a position to check this
Expected behavior

Only people that have verified email address for their Microsoft Account are succesfully authenticated by the strategy
'uid' is still unique if the strategy is used with a multi-tenant app registration

Note that both these changes are not backwards compatible!

Sorry for the slow response here. Certainly can't see a way to fix this in a backwards-compatible way, so I suppose something like a deprecation or other warning on the current gem to try and alert existing users to a need to upgrade, followed by a major version bump, would be the way forward.
Leave it to Microsoft to have unverified users able to sign in via token auth, then making it everyone else's problem.
If I'm reading things correctly:

The fallback to upn should be dropped and an appropriate "cannot auth" error returned in its place
The uid call inside the strategy needs to concatenate TID and OID as you suggest

...except that (this part of the documentation from Microsoft)[https://learn.microsoft.com/en-us/entra/identity-platform/migrate-off-email-claim-authorization#using-the-xms_edov-optional-claim-to-determine-email-verification-status-and-migrate-users] seems to suggest that the first bullet point above isn't correct, and perhaps the gem needs to be checking xms_edov? Further, there appears to be a (giant list of additional things)[https://learn.microsoft.com/en-us/entra/identity-platform/claims-validation] that Microsoft seem to imply an OAuth client has to do - even though (via OAuth) a user has successfully logged in to a valid Microsoft account via e-mail address, password and OTP.
I'm probably missing some of the point here; I always find Microsoft documentation extremely verbose yet simultaneously obtuse and confusing. It's a strange combination of explaining things in great detail while also assuming the reader has a truly vast amount of Microsoft-specific knowledge and understanding of precise per-document domain background context.

@pond
Thanks for your response. I complete agree with your comments about Microsoft docs, and the way they handled email claims in the past. It all looks quite inconsistent on their side, and also their docs sometimes seem to conflict one-another. I mean, the entire goal of acting as an 'identity provider', is that you provide 'verified' email addresses right? Otherwise it's an identity provider that can't be trusted, making it a useless one...
Anyway, regarding your comment on checking xms_edov:

The article says: To secure applications from mistakes with unverified email addresses, all new multi-tenant applications are automatically opted-in to a new default behavior that removes email addresses with unverified domain owners from tokens as of June 2023, and there's a method to enable this for existing applications. So for new Azure app registrations this property is not needed as far as I can see, and for older ones, they can also be configured so that it's not needed.
If we would check the xms_edov value, all users of this package would have to enable it. It seems like this cannot easily be done from the azure portal, so I would not recommend making this attribute a requirement to be able to use this gem.

Hence I think the best way to go I think is to (1) include the first point in the readme and possibly link to it in the deprecation warning, and (2) use only the 'email' claim without the UPN as fallback.
Regarding your comment about claims validation: This is something for example 'omniauth-google-oauth2' already does, and is relatively straightforward to implement. Although we get the tokens in the back-end via a HTTPS connection, doing the additional claims validation can't hurt I think, and aligns better with the official OpenID Connect specification.
I can create a PR to implement the 3 changes (Remove UPN fallback, use tid + oid as UID, add the claims validation), but how do we want to handle the deprecation warning?
Another option, instead of creating a new major version of this package, which people may mindlessly update to (especially if they didn't implement strict version requirements in their gemfile), may I suggest actually renaming the package? Since the service is now called 'Microsoft Entra ID', perhaps a rename to 'omniauth-microsoft-entra-id' is in place?

Well...

On the one hand, renaming can create big problems for migration - e.g. in our own database we store the name of the auth provider with which a given user in a given tenancy has signed in (our local concept, I don't mean Azure's idea of tenancy). That'd need migration and it'd be a thorny thing to do without downtime.

On the other hand, I'm sure this gem faces a growing discovery issue as fewer and fewer people are going to know of it as Azure AD rather than Entra in the future.

So I think your idea is fundamentally correct. I think the answer is probably as simple as renaming this repo with a branch for a "new version" of the gem that includes its new name, since GitHub apparently just redirects everything for you:

https://docs.github.com/en/repositories/creating-and-managing-repositories/renaming-a-repository#

I'm certainly not going to say "no" to a PR that comes in here! I'm very short on time right now; we're rather under-resourced (to put it mildly) at present. I've created a target branch for a V3 gem which will include renaming to Entra - see https://github.com/RIPAGlobal/omniauth-azure-activedirectory-v2/tree/v3_with_entra_rename. Please target a PR there - no need to do the rename bits; just your preferred approach to resolve the issues.
If you find you might not have time or encounter difficulties please "@"-me in a comment on this thread & we can work together on it.

@pond
I've added a draft PR here. I've already added some tests for the code updates. Once we have agreed on the code itself, I can also do some manual tests with single-tenant and multi-tenant entra ID apps.
Regarding the name change: You could rename the Repo, but I think the more standard thing may be to actually (1)  fork it to a repo with the new name (2) keep this repo for reference, add a deprecation notice with a link to the new repo in the readme, (3) archive this repo. This way people are still able to find the gem & repo by the old name.
Perhaps we should also consider adding a 'migration guide' then (mainly to indicate that the uids have changed, and that the old 'uid', is basically the suffix of the new one).

OK, so I think I can close this now - believed fixed by http://rubygems.org/gems/omniauth-entra-id.


Support enabling Private Service Connections

What problem are you facing?
Right now, if you'd like to give access to your CloudSQL instance from your private VPC network, you have to create a Private Service Connection that will peer the network of CloudSQL instance and your VPC. See https://cloud.google.com/sql/docs/mysql/configure-private-ip
However, we don't have that as managed resource.

How could Crossplane help solve your problem?
We can either implement the creation of that connection as embedded to each service's managed reconciler logic or have a controller on its own. Short term, it's easier to just call Service Networking API to create it if spec.privateNetwork is specified in CloudSQL managed resource. But in the long term, we need to consider whether we want to implement CRD+controller for that type.

I believe this requires us to add two new API types and controllers; global addresses and service networking.
https://cloud.google.com/compute/docs/reference/rest/v1/globalAddresses
https://cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.connections
In order to plumb GKE to CloudSQL we must:

Create a VPC network.
Create a subnetwork within said network (or let GCP do so automatically).
Create a global address within said network.
Create a private service connection.

Step 4 is interesting, because there is no "delete private service connection" API call; you may only create or update them. A private service connection creates a VPC peering under the hood, so you delete the private service connection by deleting the VPC peering it creates. 🤔
(P.S. Thanks to terraform-provider-google-beta for illustrating how all these APIs actually fit together.)


Do I need to always upload root CA or intermidiates are enough?

We have the following certificate chain:
RootCA -> IntermProduction -> [leaf certificates]
RootCA -> IntermTest -> [leaf test certificates]
Does it make a difference if I:
a) Upload to IoT hub RootCA
b) Upload to IoT hub both IntermProduction and IntermTest (without RootCA)
Will there be any differences in how leaf device certificates are validated? Our RootCA is self-signed company root.

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

ID: 90f2e322-a9a1-8887-58ce-324eab7661d2
Version Independent ID: 20974d4d-f6d8-9ba5-9985-e8f803e9a36f
Content: Tutorial for X.509 security in Azure IoT Hub
Content Source: articles/iot-hub/iot-hub-security-x509-get-started.md
Service: iot-hub
GitHub Login: @wesmc7777
Microsoft Alias: wesmc

@maxiptah Thanks for reaching out. These issues are mainly to resolve documentation errors or for suggestions on improvements. Your question seems better suited for the developer forums like StackOverflow or MSDN were the community (plus the engineering team) can help. Would you please post your query there?

Thank you for the quick answer. I'll post to stackoverflow, however I don't agree it's not a docu question. Basically I went through your samples and uploaded our rootCA to IoT hub. Our security specialist however refused to validate the proof of posession. Reason: Our rootCA is locked and no sub-certs should be issued. He asked me to point to the documentation where it is said, that we MUST use the rootCA. I didn't find such a point, but IMHO that is precisely what is missing from this article. In your sample you generate root and intermideate, than upload the root, but don't say if it is required or if it is just one of the ways to go. I don't know the IoT Hub internals and therefore cannot say if the validation will behave differently with root or with intermidiate.

I've created a SO question, but it's dead more or less, because nobody knows how IoT hub would behave, but for IoT hub devs themselves...
https://stackoverflow.com/questions/55844044/iot-hub-certificate-validation

@maxiptah I escalated your StackOverflow thread internally. I am closing this issue for now. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.

@maxiptah I got an internal response and posted on StackOverflow reposting here for future reference:
https://stackoverflow.com/questions/55844044/iot-hub-certificate-validation/56025887#56025887
For your scenario, you can use option (b) with an intermediate CA uploaded to IoT Hub: • Use your IntermProduction for your production Hub, and IntermTest for your test Hub. • The leaf devices are validated starting with the intermediate CA, which is chained up through to your root CA. • Your security specialist should be able to allow Proof-of-Possession (PoP) for the intermediate CA.
Using this option gives you the security and flexibility of using an intermediate CA, while limiting the use of the root CA itself (i.e. root CA is not uploaded to the IoT Hub).


Khabiri-Shahnam-TL-Group-Serina-DS17

Foe assignment submission

Try to name your assignments something like 'Module 1' rather than 'skhabiri assignment' as they are all your assignments so it doesn't give any descriptive information.
Be careful when you're removing outliers. When you checked your shape afterward you might notice it is the same exact shape as before.
Nice work with the functions. And I'm sure your MAE will improve once you've removed extreme values. Overall great work!

Hi Serina,
Thanks for your feedback. Some explanation for file name:

the file name has 211 referring to unit2 sprint2 module1
since the name is used by lambdaschool account, I added a prefix of my
name so in my repository I can recognize which file has my work in it
without overwriting the original file. There are different ways to do it
but that is my preference for my own record keeping, and consistent with
previous name convention that I used in previous unit.
since you have multiple students in your group, having my name on the
file might help you to know which file belongs to which student.

Regards,
Shahnam
On Tue, Jul 7, 2020 at 11:17 AM Serina<EMAIL_ADDRESS>wrote:

Try to name your assignments something like 'Module 1' rather than
'skhabiri assignment' as they are all your assignments so it doesn't give
any descriptive information.
Be careful when you're removing outliers. When you checked your shape
afterward you might notice it is the same exact shape as before.
Nice work with the functions. And I'm sure your MAE will improve once
you've removed extreme values. Overall great work!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/LambdaSchool/DS-Unit-2-Linear-Models/pull/283#issuecomment-655038233,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AGANCSLZMATOJJ7PWV3YCY3R2NREFANCNFSM4OR777HQ
.

Please provide some comments to show your process! Nice work on the ridge regression portion!


Check alreadyUpdating before setting contentInset to prevent potential infinite loop

I'm using INSPullToRefresh in a UIWebView's scrollView, when I pull the webview for refresh, it will cause infinite recursive call on UIScrollView's setContentInset:. Turns out when INSPullToRefreshBackgroundView set the contentInset of scrollView, it's not really checking if it's already updating, and UIWebView somehow adjust the scrollView's contentInset internally when it detected it's contentInset is changed, and it create an infinite loop, so I added the checking code to break the loop.
It works, but I don't quite understand why the code was written like that before, maybe there're some pitfalls I didn't see, please review my changes.

Looks like there was some mistake here, i will check if rest of code works with that change and i will merge that, thanks.


Tapping a preference toggles other preferences

Hi,
the settings in Kore are almost unusable for me. When I tap on one of the preferences other preferences are toggled in some arbitrary order until the preference I'm actually tapping on is toggled. The only description of a similar problem I found was on Stack Overflow (Android SwitchPreferences change together in PreferenceActivity). A solution seems to be to use CheckBoxPreference instead of SwitchPreference or use a custom SwitchPreference as a workaround as described here.
Would it be ok for you to switch to CheckBoxPreference? This would even leave a little more space to display the description of the preferences.

I am unable to reproduce this. Which version of Android are you using and on what kind of device?

I'm using an HTC One mini 2 phone with the preinstalled Android 4.4.2.

I was able to reproduce this on 4.3.
I really think that switch preferences are more appropriate here, but given that this can potentially affect every device prior to lollipop (about 30% of the installed base) using checkboxes seems prudent.


Update package name from v3-anchorage to boba

:clipboard: Add associated issues, tickets, docs URL here.
Overview
Update the package names of boba-chain-ops and boba-bindings from v3-anchorage to boba.
Changes
Describe your changes and implementation choices. More details make PRs easier to review.

Update the package names

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 28.21%. Comparing base (fd7009f) to head (65ec62e).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #135      +/-   ##
===========================================
+ Coverage    18.95%   28.21%   +9.26%
===========================================
  Files          158      168      +10
  Lines         6226     7294    +1068
  Branches      1311     1311
===========================================
+ Hits          1180     2058     +878
- Misses        4971     5130     +159
- Partials        75      106      +31

Flag
Coverage Δ

cannon-go-tests
82.20% <ø> (?)

chain-mon-tests
27.14% <ø> (ø)

common-ts-tests
26.72% <ø> (ø)

contracts-bedrock-tests
0.62% <ø> (ø)

contracts-ts-tests
12.25% <ø> (ø)

core-utils-tests
44.03% <ø> (ø)

sdk-next-tests
38.59% <ø> (ø)

sdk-tests
38.59% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 10 files with indirect coverage changes


Improve PhishingController error handling

The PhishingController error handling for config updates has room for improvement. Currently config update failures are swallowed, so there is no opportunity for caller to discover this or retry. Some types of failure are not even logged.
We should ensure that config update failures are not suppressed with updatePhishingLists is called, so that the caller is aware when a failure has occurred. In any circumstance where it is necessary to suppress config update failures (e.g. in test), we should at least ensure the failure is logged, for debugging purposes.

Should revisit the description and how to implement.


Node monitoring v1

How to categorize this PR?
/area monitoring
/kind enhancement
What this PR does / why we need it:
Add new alert to monitor nodes that are in the NotReady state for more than 10 minutes due to the kubelet not responding
Which issue(s) this PR fixes:
Fixes # https://github.tools.sap/kubernetes/landscape-stability/issues/89
Special notes for your reviewer:
Release note:

The dashboard is at the bottom of the Node/Worker Pool Overview page


Hyper-V, XenServer: Verify host machine CPU, DISK and RAM

[ ] We should check that the Hypervisor hosts have enough resources to deploy the cluster before we actually do it.
[ ] Also verify that new node VMs don't conflict with any existing VMs

This might be a bit tricky for XenServer, especially if its using one ore more non-local storage repositories.
I'm not entirely sure that this is worthwhile for local Hyper-V since we're using the dynamic RAM option and I'm pretty sure we're doing the same for disks.  We'll probably want to do this for Windows Server Hyper-V though.
I'm putting this on the backlog.

DONE


How to use Bootstrap font icons on x-axis tick?

I want to use font icons on x-axis tick?

These GitHub issues are for bug reports and feature requests only, so can you ask in Google Group first as you can see here: https://github.com/masayuki0812/c3#using-the-issue-queue

let me close at the moment.


Live Preview just isn't worth it

While it's nice to be able to see the chrome preview change as I make edits in Brackets, the tradeoff of inconsistent behavior (often the preview just stops working), a second instance of chrome running, and the inability to use the chrome inspector make this feature useless.
Instead, Brackets should build live preview like Browsersync or Livereload do it, refreshing the browser when the page is loaded, and using a standard, local url to preview the page.

@dmaweb Thanks for using Brackets and sharing your concern regarding live preview feature.  Inconsistent behavior is definitely a niggling issue which we are looking at. The whole point of live preview is to leverage on live preview of the page which is being edited. In fact we are getting in a reverse inspect feature in next release to highlight a corresponding element in editor.  However I am in complete agreement with you that web inspector is a Savior for a web developer. We are also thinking in the same line where we could leverage the power of blink inspector. Rest assured all future releases of Brackets is going to make a web developers effort more streamlined.


[BUG] git submodule add https://github.com/Lruihao/FixIt.git (NOT A GIT REPOSITORY)

Describe the bug 描述你遇到的错误
Attempting to follow the documentation (both in the README.md and the docs site). It says (to install as a submodule):
git submodule add https://github.com/Lruihao/FixIt.git themes/FixIt
returns:
fatal: not a git repository (or any of the parent directories): .git
Expected behavior 期待的行为
No response
Screenshots 屏幕截图
No response
Build Environment 构建环境
Windows 10
Hugo v0.96.0 extended
Theme version: whatever version is current on 4/11/22 13:35 UTC
Preview Environment 预览环境
No response
Additional Information 补充信息
Thank you for developing this theme!
I love how well documented it is. I did not try to download the zip file and install that way, because I prefer to use the easily updatable git method.

Please add the step to run:
git init
in the project folder before the step to run:
git submodule add https://github.com/Lruihao/FixIt.git themes/Fixit
for those of us with little previous git experience! Thank you.
Issue is solved, but I will leave open so that the request to add the step in the README.md and installation documentation is seen by the developer(s).

Please add the step to run: git init in the project folder before the step to run: git submodule add https://github.com/Lruihao/FixIt.git themes/Fixit for those of us with little previous git experience! Thank you. Issue is solved, but I will leave open so that the request to add the step in the README.md and installation documentation is seen by the developer(s).

yeap!

Perhaps also consider offering the option to avoid git submodules and install as a Hugo Module:
Hugo Modules for Themes - Instead of git submodules


404 page

Description
We should have  a 404 page for modelina website currently it redirects to some netlify breakdown page .
not of that importance for now but we should have this in future:)
We can take inspiration from the website 404 page

/gfi design

/gfi website

/help

Hey @sambhavgupta0705 Can I work on this?

yess @Shurtu-gal go ahead 🚀


Support for custom CredentialStores

Just added the code to allow other credential stores that follow a behaviour to be used with plug_auth.
To used it, create your own CredentialStore that implement the PlugAuth.CredentialBehaviour, like so:
defmodule TestStore do
  @behaviour PlugAuth.CredentialBehaviour

  def get_user_data(_key), do: %{role: :secret_area}
  # use your db, agent, or other logic to get data.
  # Make sure to return a map that represent the realm that the user may access.

  # those two aren't really needed, but i've kept them to mimic current Store structure
  def put_credentials(_key, _value), do: :ok
  def delete_credentials(_key), do: %{role: :admin}
end

Not sure also if those two functions (put_credentials/2 and delete_credentials/1 should be there. What you think?
The test for the new feature repeated a lot of code of the existing test, if that is a problem we can talk about refactoring that!

Very nice! Thanks! The put_credentials/2 and delete_credentials/1 functions do not belong to the Behavior in my opinion, since the authentication modules should only rely on the get_user_data/1 function. The tests are ok.
Please remove the redundant functions from the Behavior, unless you see good reasons to keep them there, and I'll merge and release version 0.1.0

Done! :smile:


Update translations

need to manually fix some things.

@AaronVanGeffen created a few scripts to do this. These should be documented somewhere.
I was actually planning to do this - let me know if you need help.

Yeah looks like the scripts break if the hunk contains unrelated changes and the language changes annoyingly.


Make species and tissue required annotation properties

@allaway Any comments for making the templates somewhat stricter?

I think it would be fine to require both. species for sure - i would posit that most of our data has a "species." Tissue is a bit harder, I think that could be confusing for some data where tissue. As long as Not Applicable is an available option, it's probably fine to enforce both. Are you looking for feedback on other things that should be required?


Feature request: enhance plot_spatial_gene

Hi, it would be great to be able to add point_size and scale (log vs linear, etc) to plot_spatial_gene function. Tried to change the figsize to no avail.
Thanks!

Thanks for the suggestion, we'll try to incorporate it in the next released version.

Hi, we have updated the plot function; please check the updates in github. Please install our new version and check our tutorial for details in the following days. Thanks!


[GSK-2035] Added num_samples to prompt injection detector + refactoring

Random sampling across all prompt injections (disabled by default)

Let’s put this on hold

Superseded by https://github.com/Giskard-AI/giskard/pull/1602


Atom Beautify could not find a supported beautifier for this file

when i installed atom-beauty, and then try to format a json text
{"mapId": 601,"selfRank": 0,"gameRankInfo": [{"rank": 1,"name": "史密斯·克里","guid":<PHONE_NUMBER>926336,"rankValue": 6.0,"time": 0.0}],"characterInfo": {"characterGUID":<PHONE_NUMBER>926336,"characterName": "史密斯·克里","characterType": 1,"level": 50,"vipLevel": 10,"equipInfo": [{"itemGUID":<PHONE_NUMBER>835072,"itemCount": 1,"metaItemID": 10101,"enhanceLevel": 2,"affinageLevel": 0,"overdueTime": 0},{"itemGUID":<PHONE_NUMBER>835073,"itemCount": 1,"metaItemID": 10201,"enhanceLevel": 2,"affinageLevel": 0,"overdueTime": 0},{"itemGUID":<PHONE_NUMBER>835074,"itemCount": 1,"metaItemID": 10301,"enhanceLevel": 2,"affinageLevel": 0,"overdueTime": 0},{"itemGUID":<PHONE_NUMBER>228288,"itemCount": 1,"metaItemID": 10401,"enhanceLevel": 2,"affinageLevel": 0,"overdueTime": 0},{"itemGUID":<PHONE_NUMBER>228289,"itemCount": 1,"metaItemID": 10501,"enhanceLevel": 2,"affinageLevel": 0,"overdueTime": 0},{"itemGUID":<PHONE_NUMBER>228290,"itemCount": 1,"metaItemID": 10601,"enhanceLevel": 2,"affinageLevel": 0,"overdueTime": 0}],"battlePower": 29048,"curTitleId": 0}}

atom-beauty said
Atom Beautify could not find a supported beautifier for this file

Atom Beautify could not determine a supported beautifier to handle this file with grammar "Null Grammar" and extension "". If you would like to request support for this file and its language, please create an issue for Atom Beautify at https://github.com/Glavin001/atom-beautify/issues

how to fix it?

The problem is that you have not yet identified a language by name in Atom for the given code sample, evidenced by the "Null Grammar" and extension "".  Go to Edit -> Select Grammar from the main menu and pick a language option.

works! thanks!