Fix Download Observations

To replicate:

Observation pattern search for a reasonable number of Obss. Ex: https://mushroomobserver.org/observations?pattern=user%3A4468+date%3A2024-10 (@JoeCohen's Obss for 2024-10)
Click Download Observations
Expected result: "Downloads" displayed Obss
Actual result: Flashes "You are trying to download too many Observations. Please see CSV Files for an alternative." because it's trying to download all Obss, rather than just the displayed Obss.

PS: I found this bug after:

noticing a post by Alan in the NAMA email group about a program (on the MO image server) which prints labels for iNat observations.
wondering why MO doesn't have something like that for MO Observations (without having to create a Species List).

The problem is that too_many_observations? is simply wrong:
    def too_many_results?
      @query.flavor == :all
    end

The :all flavor does not mean -- as I wrongly thought -- that the user is trying to download every Observation in the database. It's more like all Observations which meet the other search criteria, or something.
###NOTE

This means Download Observations has been broken for about 5 months (since #2214).
Nobody has complained to me or webmaster about it.
Ergo, nobody is using Download.

I do, however, want to fix it for possible use with MyCoPortal and GBIF.

I'm curious why you are not doing something like this:
def too_many_results?
  @query.num_results > xxx
end

On Wed, Dec 4, 2024 at 10:06 PM Joseph D. Cohen @.***>
wrote:

The problem is that too_many_observations? is simply wrong:
def too_many_results?
  @query.flavor == :all
end

The :all flavor does not mean -- as I wrongly thought -- that the user
is trying to download every Observation in the database. It's more like
all Observations which meet the other search criteria, or something.
###NOTE

This means Download Observations has been broken for about 5 months
(since #2214
https://github.com/MushroomObserver/mushroom-observer/pull/2214).
Nobody has complained to me or webmaster about it.
Ergo, nobody is using Download.

I do, however, want to fix it for possible use with MyCoPortal and GBIF.
—
Reply to this email directly, view it on GitHub
https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2518990281,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAYTNNLPMU5G2YSFIACI6IL2D67LJAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYHE4TAMRYGE
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Because I didn't know what I was doing.
I wrongly assumed that flavor :all meant that the user was trying to
download all the Obss in the db.
I'm now working on a fix: which will be
!inadmin_mode? && @query.num_results > xxx
What do you think is a good number?
On Wed, Dec 4, 2024 at 7:11 PM Jason Hollinger @.***>
wrote:

I'm curious why you are not doing something like this:
def too_many_results?
@query.num_results > xxx
end

On Wed, Dec 4, 2024 at 10:06 PM Joseph D. Cohen @.***>
wrote:

The problem is that too_many_observations? is simply wrong:
def too_many_results?
@query.flavor == :all
end
The :all flavor does not mean -- as I wrongly thought -- that the user
is trying to download every Observation in the database. It's more like
all Observations which meet the other search criteria, or something.
###NOTE

This means Download Observations has been broken for about 5 months
(since #2214
https://github.com/MushroomObserver/mushroom-observer/pull/2214).
Nobody has complained to me or webmaster about it.
Ergo, nobody is using Download.

I do, however, want to fix it for possible use with MyCoPortal and GBIF.
—
Reply to this email directly, view it on GitHub
<
https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2518990281>,

or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/AAYTNNLPMU5G2YSFIACI6IL2D67LJAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYHE4TAMRYGE>

.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

—
Reply to this email directly, view it on GitHub
https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2518995003,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAALDFF726KXU2VBQJCXX6T2D677XAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYHE4TKMBQGM
.
You are receiving this because you were assigned.Message ID:
@.***>

Haha, good reason!  No idea what a good number is.  Maybe start with 1000?
On Wed, Dec 4, 2024 at 10:16 PM Joseph D. Cohen @.***>
wrote:

Because I didn't know what I was doing.
I wrongly assumed that flavor :all meant that the user was trying to
download all the Obss in the db.
I'm now working on a fix: which will be
!inadmin_mode? && @query.num_results > xxx
What do you think is a good number?
On Wed, Dec 4, 2024 at 7:11 PM Jason Hollinger @.***>
wrote:

I'm curious why you are not doing something like this:
def too_many_results?
@query.num_results > xxx
end

On Wed, Dec 4, 2024 at 10:06 PM Joseph D. Cohen @.***>
wrote:

The problem is that too_many_observations? is simply wrong:
def too_many_results?
@query.flavor == :all
end
The :all flavor does not mean -- as I wrongly thought -- that the
user
is trying to download every Observation in the database. It's more
like
all Observations which meet the other search criteria, or something.
###NOTE

This means Download Observations has been broken for about 5 months
(since #2214
https://github.com/MushroomObserver/mushroom-observer/pull/2214).
Nobody has complained to me or webmaster about it.
Ergo, nobody is using Download.

I do, however, want to fix it for possible use with MyCoPortal and
GBIF.
—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2518990281>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAYTNNLPMU5G2YSFIACI6IL2D67LJAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYHE4TAMRYGE>

.
You are receiving this because you are subscribed to this
thread.Message
ID: @.***>

—
Reply to this email directly, view it on GitHub
<
https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2518995003>,

or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/AAALDFF726KXU2VBQJCXX6T2D677XAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYHE4TKMBQGM>

.
You are receiving this because you were assigned.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2518999445,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAYTNNIVD27G6SNQDX45WMT2D7ASTAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYHE4TSNBUGU
.
You are receiving this because you commented.Message ID:
@.***>

Is there a way to test the fix without xxx new Observations? (seems like an
expensive test)
On Wed, Dec 4, 2024 at 7:22 PM Jason Hollinger @.***>
wrote:

Haha, good reason! No idea what a good number is. Maybe start with 1000?
On Wed, Dec 4, 2024 at 10:16 PM Joseph D. Cohen @.***>
wrote:

Because I didn't know what I was doing.
I wrongly assumed that flavor :all meant that the user was trying to
download all the Obss in the db.
I'm now working on a fix: which will be
!inadmin_mode? && @query.num_results > xxx
What do you think is a good number?
On Wed, Dec 4, 2024 at 7:11 PM Jason Hollinger @.***>
wrote:

I'm curious why you are not doing something like this:
def too_many_results?
@query.num_results > xxx
end

On Wed, Dec 4, 2024 at 10:06 PM Joseph D. Cohen @.***>
wrote:

The problem is that too_many_observations? is simply wrong:
def too_many_results?
@query.flavor == :all
end
The :all flavor does not mean -- as I wrongly thought -- that the
user
is trying to download every Observation in the database. It's more
like
all Observations which meet the other search criteria, or something.
###NOTE

This means Download Observations has been broken for about 5
months
(since #2214
https://github.com/MushroomObserver/mushroom-observer/pull/2214).
Nobody has complained to me or webmaster about it.
Ergo, nobody is using Download.

I do, however, want to fix it for possible use with MyCoPortal and
GBIF.
—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2518990281>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAYTNNLPMU5G2YSFIACI6IL2D67LJAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYHE4TAMRYGE>

.
You are receiving this because you are subscribed to this
thread.Message
ID: @.***>

—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2518995003>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAALDFF726KXU2VBQJCXX6T2D677XAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYHE4TKMBQGM>

.
You are receiving this because you were assigned.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
<
https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2518999445>,

or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/AAYTNNIVD27G6SNQDX45WMT2D7ASTAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYHE4TSNBUGU>

.
You are receiving this because you commented.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2519004500,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAALDFHE62BZUETFSDJE6A32D7BHVAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGAYDINJQGA
.
You are receiving this because you were assigned.Message ID:
@.***>

How about make the limit a configuration which you can stub:
MO.max_download_observations
MO.stub(:max_download_observations, 5)
On Wed, Dec 4, 2024 at 10:26 PM Joseph D. Cohen @.***>
wrote:

Is there a way to test the fix without xxx new Observations? (seems like
an
expensive test)
On Wed, Dec 4, 2024 at 7:22 PM Jason Hollinger @.***>
wrote:

Haha, good reason! No idea what a good number is. Maybe start with 1000?
On Wed, Dec 4, 2024 at 10:16 PM Joseph D. Cohen @.***>
wrote:

Because I didn't know what I was doing.
I wrongly assumed that flavor :all meant that the user was trying to
download all the Obss in the db.
I'm now working on a fix: which will be
!inadmin_mode? && @query.num_results > xxx
What do you think is a good number?
On Wed, Dec 4, 2024 at 7:11 PM Jason Hollinger @.***>
wrote:

I'm curious why you are not doing something like this:
def too_many_results?
@query.num_results > xxx
end

On Wed, Dec 4, 2024 at 10:06 PM Joseph D. Cohen @.***>
wrote:

The problem is that too_many_observations? is simply wrong:
def too_many_results?
@query.flavor == :all
end
The :all flavor does not mean -- as I wrongly thought -- that
the
user
is trying to download every Observation in the database. It's more
like
all Observations which meet the other search criteria, or
something.
###NOTE

This means Download Observations has been broken for about 5
months
(since #2214
https://github.com/MushroomObserver/mushroom-observer/pull/2214).

Nobody has complained to me or webmaster about it.
Ergo, nobody is using Download.

I do, however, want to fix it for possible use with MyCoPortal and
GBIF.
—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2518990281>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAYTNNLPMU5G2YSFIACI6IL2D67LJAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYHE4TAMRYGE>

.
You are receiving this because you are subscribed to this
thread.Message
ID: @.***>

—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2518995003>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAALDFF726KXU2VBQJCXX6T2D677XAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYHE4TKMBQGM>

.
You are receiving this because you were assigned.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2518999445>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAYTNNIVD27G6SNQDX45WMT2D7ASTAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYHE4TSNBUGU>

.
You are receiving this because you commented.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
<
https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2519004500>,

or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/AAALDFHE62BZUETFSDJE6A32D7BHVAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGAYDINJQGA>

.
You are receiving this because you were assigned.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2519008240,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAYTNNM4GALEKNERZ5M7KSL2D7BXRAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGAYDQMRUGA
.
You are receiving this because you commented.Message ID:
@.***>

Wait. I think I can just create nnn Obss without saving them, which makes
it not expensive.
Is that right?
On Wed, Dec 4, 2024 at 7:45 PM Joseph Cohen @.***> wrote:

Good idea! I'll give it a try.
On Wed, Dec 4, 2024 at 7:42 PM Jason Hollinger @.***>
wrote:

How about make the limit a configuration which you can stub:
MO.max_download_observations
MO.stub(:max_download_observations, 5)
On Wed, Dec 4, 2024 at 10:26 PM Joseph D. Cohen @.***>
wrote:

Is there a way to test the fix without xxx new Observations? (seems
like
an
expensive test)
On Wed, Dec 4, 2024 at 7:22 PM Jason Hollinger @.***>
wrote:

Haha, good reason! No idea what a good number is. Maybe start with
1000?
On Wed, Dec 4, 2024 at 10:16 PM Joseph D. Cohen @.***>
wrote:

Because I didn't know what I was doing.
I wrongly assumed that flavor :all meant that the user was trying
to
download all the Obss in the db.
I'm now working on a fix: which will be
!inadmin_mode? && @query.num_results > xxx
What do you think is a good number?
On Wed, Dec 4, 2024 at 7:11 PM Jason Hollinger @.***>
wrote:

I'm curious why you are not doing something like this:
def too_many_results?
@query.num_results > xxx
end

On Wed, Dec 4, 2024 at 10:06 PM Joseph D. Cohen @.***>
wrote:

The problem is that too_many_observations? is simply wrong:
def too_many_results?
@query.flavor == :all
end
The :all flavor does not mean -- as I wrongly thought -- that
the
user
is trying to download every Observation in the database. It's
more
like
all Observations which meet the other search criteria, or
something.
###NOTE

This means Download Observations has been broken for about 5
months
(since #2214
<
https://github.com/MushroomObserver/mushroom-observer/pull/2214>).

Nobody has complained to me or webmaster about it.
Ergo, nobody is using Download.

I do, however, want to fix it for possible use with MyCoPortal
and
GBIF.
—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2518990281>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAYTNNLPMU5G2YSFIACI6IL2D67LJAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYHE4TAMRYGE>

.
You are receiving this because you are subscribed to this
thread.Message
ID: @.***>

—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2518995003>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAALDFF726KXU2VBQJCXX6T2D677XAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYHE4TKMBQGM>

.
You are receiving this because you were assigned.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2518999445>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAYTNNIVD27G6SNQDX45WMT2D7ASTAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYHE4TSNBUGU>

.
You are receiving this because you commented.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2519004500>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAALDFHE62BZUETFSDJE6A32D7BHVAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGAYDINJQGA>

.
You are receiving this because you were assigned.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
<
https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2519008240>,

or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/AAYTNNM4GALEKNERZ5M7KSL2D7BXRAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGAYDQMRUGA>

.
You are receiving this because you commented.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2519021969,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAALDFANV3MRFWAKSTNB5T32D7DSTAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGAZDCOJWHE
.
You are receiving this because you were assigned.Message ID:
@.***>

I don't think that's going to work.  Query needs to be able to find nnn
observations in the database, so they'll need to be saved.
On Wed, Dec 4, 2024 at 10:55 PM Joseph D. Cohen @.***>
wrote:

Wait. I think I can just create nnn Obss without saving them, which makes
it not expensive.
Is that right?
On Wed, Dec 4, 2024 at 7:45 PM Joseph Cohen @.***> wrote:

Good idea! I'll give it a try.
On Wed, Dec 4, 2024 at 7:42 PM Jason Hollinger @.***>
wrote:

How about make the limit a configuration which you can stub:
MO.max_download_observations
MO.stub(:max_download_observations, 5)
On Wed, Dec 4, 2024 at 10:26 PM Joseph D. Cohen @.***>
wrote:

Is there a way to test the fix without xxx new Observations? (seems
like
an
expensive test)
On Wed, Dec 4, 2024 at 7:22 PM Jason Hollinger @.***>
wrote:

Haha, good reason! No idea what a good number is. Maybe start with
1000?
On Wed, Dec 4, 2024 at 10:16 PM Joseph D. Cohen @.***>
wrote:

Because I didn't know what I was doing.
I wrongly assumed that flavor :all meant that the user was trying
to
download all the Obss in the db.
I'm now working on a fix: which will be
!inadmin_mode? && @query.num_results > xxx
What do you think is a good number?
On Wed, Dec 4, 2024 at 7:11 PM Jason Hollinger @.***>
wrote:

I'm curious why you are not doing something like this:
def too_many_results?
@query.num_results > xxx
end

On Wed, Dec 4, 2024 at 10:06 PM Joseph D. Cohen @.***>
wrote:

The problem is that too_many_observations? is simply wrong:
def too_many_results?
@query.flavor == :all
end
The :all flavor does not mean -- as I wrongly thought --
that
the
user
is trying to download every Observation in the database. It's
more
like
all Observations which meet the other search criteria, or
something.
###NOTE

This means Download Observations has been broken for about
5
months
(since #2214
<
https://github.com/MushroomObserver/mushroom-observer/pull/2214>).

Nobody has complained to me or webmaster about it.
Ergo, nobody is using Download.

I do, however, want to fix it for possible use with
MyCoPortal
and
GBIF.
—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2518990281>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAYTNNLPMU5G2YSFIACI6IL2D67LJAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYHE4TAMRYGE>

.
You are receiving this because you are subscribed to this
thread.Message
ID: @.***>

—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2518995003>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAALDFF726KXU2VBQJCXX6T2D677XAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYHE4TKMBQGM>

.
You are receiving this because you were assigned.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2518999445>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAYTNNIVD27G6SNQDX45WMT2D7ASTAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYHE4TSNBUGU>

.
You are receiving this because you commented.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2519004500>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAALDFHE62BZUETFSDJE6A32D7BHVAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGAYDINJQGA>

.
You are receiving this because you were assigned.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2519008240>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAYTNNM4GALEKNERZ5M7KSL2D7BXRAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGAYDQMRUGA>

.
You are receiving this because you commented.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
<
https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2519021969>,

or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/AAALDFANV3MRFWAKSTNB5T32D7DSTAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGAZDCOJWHE>

.
You are receiving this because you were assigned.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2519033891,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAYTNNJNXXG224IS4MRR7U32D7FEJAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGAZTGOBZGE
.
You are receiving this because you commented.Message ID:
@.***>

Interesting.
But the tests are passing if I use
(DownloadsController::MAX_DOWNLOADS - Observation.count + 1).times do
Observation.create(user: rolf)
end
I guess that does save to the db? The tests seem to be quick, and I don't
have to get involved with ugly stubs.

On Wed, Dec 4, 2024 at 8:05 PM Jason Hollinger @.***>
wrote:

I don't think that's going to work. Query needs to be able to find nnn
observations in the database, so they'll need to be saved.
On Wed, Dec 4, 2024 at 10:55 PM Joseph D. Cohen @.***>
wrote:

Wait. I think I can just create nnn Obss without saving them, which
makes
it not expensive.
Is that right?
On Wed, Dec 4, 2024 at 7:45 PM Joseph Cohen @.***> wrote:

Good idea! I'll give it a try.
On Wed, Dec 4, 2024 at 7:42 PM Jason Hollinger @.***>
wrote:

How about make the limit a configuration which you can stub:
MO.max_download_observations
MO.stub(:max_download_observations, 5)
On Wed, Dec 4, 2024 at 10:26 PM Joseph D. Cohen @.***>
wrote:

Is there a way to test the fix without xxx new Observations? (seems
like
an
expensive test)
On Wed, Dec 4, 2024 at 7:22 PM Jason Hollinger @.***>
wrote:

Haha, good reason! No idea what a good number is. Maybe start
with
1000?
On Wed, Dec 4, 2024 at 10:16 PM Joseph D. Cohen @.***>
wrote:

Because I didn't know what I was doing.
I wrongly assumed that flavor :all meant that the user was
trying
to
download all the Obss in the db.
I'm now working on a fix: which will be
!inadmin_mode? && @query.num_results > xxx
What do you think is a good number?
On Wed, Dec 4, 2024 at 7:11 PM Jason Hollinger @.***>
wrote:

I'm curious why you are not doing something like this:
def too_many_results?
@query.num_results > xxx
end

On Wed, Dec 4, 2024 at 10:06 PM Joseph D. Cohen @.***>
wrote:

The problem is that too_many_observations? is simply wrong:
def too_many_results?
@query.flavor == :all
end
The :all flavor does not mean -- as I wrongly thought --
that
the
user
is trying to download every Observation in the database.
It's
more
like
all Observations which meet the other search criteria, or
something.
###NOTE

This means Download Observations has been broken for
about
5
months
(since #2214
<
https://github.com/MushroomObserver/mushroom-observer/pull/2214>).

Nobody has complained to me or webmaster about it.
Ergo, nobody is using Download.

I do, however, want to fix it for possible use with
MyCoPortal
and
GBIF.
—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2518990281>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAYTNNLPMU5G2YSFIACI6IL2D67LJAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYHE4TAMRYGE>

.
You are receiving this because you are subscribed to this
thread.Message
ID: @.***>

—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2518995003>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAALDFF726KXU2VBQJCXX6T2D677XAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYHE4TKMBQGM>

.
You are receiving this because you were assigned.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2518999445>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAYTNNIVD27G6SNQDX45WMT2D7ASTAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYHE4TSNBUGU>

.
You are receiving this because you commented.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2519004500>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAALDFHE62BZUETFSDJE6A32D7BHVAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGAYDINJQGA>

.
You are receiving this because you were assigned.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2519008240>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAYTNNM4GALEKNERZ5M7KSL2D7BXRAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGAYDQMRUGA>

.
You are receiving this because you commented.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2519021969>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAALDFANV3MRFWAKSTNB5T32D7DSTAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGAZDCOJWHE>

.
You are receiving this because you were assigned.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
<
https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2519033891>,

or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/AAYTNNJNXXG224IS4MRR7U32D7FEJAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGAZTGOBZGE>

.
You are receiving this because you commented.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2519043161,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAALDFHLQ3WTPTTE2Z4BKRL2D7GI5AVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGA2DGMJWGE
.
You are receiving this because you were assigned.Message ID:
<MushroomObserver/mushroom-observer/issues/2553/2519043161
@.***>

Yes, create saves them.  Maybe it is somehow doing them in bulk.  Whatever
works.
On Wed, Dec 4, 2024 at 11:13 PM Joseph D. Cohen @.***>
wrote:

Interesting.
But the tests are passing if I use
(DownloadsController::MAX_DOWNLOADS - Observation.count + 1).times do
Observation.create(user: rolf)
end
I guess that does save to the db? The tests seem to be quick, and I don't
have to get involved with ugly stubs.

On Wed, Dec 4, 2024 at 8:05 PM Jason Hollinger @.***>
wrote:

I don't think that's going to work. Query needs to be able to find nnn
observations in the database, so they'll need to be saved.
On Wed, Dec 4, 2024 at 10:55 PM Joseph D. Cohen @.***>
wrote:

Wait. I think I can just create nnn Obss without saving them, which
makes
it not expensive.
Is that right?
On Wed, Dec 4, 2024 at 7:45 PM Joseph Cohen @.***> wrote:

Good idea! I'll give it a try.
On Wed, Dec 4, 2024 at 7:42 PM Jason Hollinger @.***>
wrote:

How about make the limit a configuration which you can stub:
MO.max_download_observations
MO.stub(:max_download_observations, 5)
On Wed, Dec 4, 2024 at 10:26 PM Joseph D. Cohen @.***>
wrote:

Is there a way to test the fix without xxx new Observations?
(seems
like
an
expensive test)
On Wed, Dec 4, 2024 at 7:22 PM Jason Hollinger @.***>
wrote:

Haha, good reason! No idea what a good number is. Maybe start
with
1000?
On Wed, Dec 4, 2024 at 10:16 PM Joseph D. Cohen @.***>
wrote:

Because I didn't know what I was doing.
I wrongly assumed that flavor :all meant that the user was
trying
to
download all the Obss in the db.
I'm now working on a fix: which will be
!inadmin_mode? && @query.num_results > xxx
What do you think is a good number?
On Wed, Dec 4, 2024 at 7:11 PM Jason Hollinger @.***>
wrote:

I'm curious why you are not doing something like this:
def too_many_results?
@query.num_results > xxx
end

On Wed, Dec 4, 2024 at 10:06 PM Joseph D. Cohen
@.***>
wrote:

The problem is that too_many_observations? is simply
wrong:
def too_many_results?
@query.flavor == :all
end
The :all flavor does not mean -- as I wrongly thought
--
that
the
user
is trying to download every Observation in the database.
It's
more
like
all Observations which meet the other search criteria, or
something.
###NOTE

This means Download Observations has been broken for
about
5
months
(since #2214
<
https://github.com/MushroomObserver/mushroom-observer/pull/2214>).

Nobody has complained to me or webmaster about it.
Ergo, nobody is using Download.

I do, however, want to fix it for possible use with
MyCoPortal
and
GBIF.
—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2518990281>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAYTNNLPMU5G2YSFIACI6IL2D67LJAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYHE4TAMRYGE>

.
You are receiving this because you are subscribed to this
thread.Message
ID: @.***>

—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2518995003>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAALDFF726KXU2VBQJCXX6T2D677XAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYHE4TKMBQGM>

.
You are receiving this because you were assigned.Message
ID:
@.***>

—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2518999445>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAYTNNIVD27G6SNQDX45WMT2D7ASTAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYHE4TSNBUGU>

.
You are receiving this because you commented.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2519004500>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAALDFHE62BZUETFSDJE6A32D7BHVAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGAYDINJQGA>

.
You are receiving this because you were assigned.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2519008240>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAYTNNM4GALEKNERZ5M7KSL2D7BXRAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGAYDQMRUGA>

.
You are receiving this because you commented.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2519021969>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAALDFANV3MRFWAKSTNB5T32D7DSTAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGAZDCOJWHE>

.
You are receiving this because you were assigned.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2519033891>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAYTNNJNXXG224IS4MRR7U32D7FEJAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGAZTGOBZGE>

.
You are receiving this because you commented.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
<
https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2519043161>,

or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/AAALDFHLQ3WTPTTE2Z4BKRL2D7GI5AVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGA2DGMJWGE>

.
You are receiving this because you were assigned.Message ID:
<MushroomObserver/mushroom-observer/issues/2553/2519043161
@.***>

—
Reply to this email directly, view it on GitHub
https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2519053312,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAYTNNLVR76FI75I3IUJFLT2D7HHDAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGA2TGMZRGI
.
You are receiving this because you commented.Message ID:
@.***>

@JoeCohen re flavor: :all
Note for the future that the goal we are halfway towards is for flavor: :all not to mean anything anymore. The flavor will be in the params.
:Article, flavor: :by_rss_log, rss_log: xyz is now :Article, flavor: :all, rss_log: xyz, and
a query like :Observations, flavor: :for_project, project: xyz will soon be :Observations, flavor: :all, project: xyz
When they're all converted to params, then we'll get rid of flavor entirely.

Maybe it's fast because I set nnn low. (120).
On Wed, Dec 4, 2024 at 8:16 PM Jason Hollinger @.***>
wrote:

Yes, create saves them. Maybe it is somehow doing them in bulk. Whatever
works.
On Wed, Dec 4, 2024 at 11:13 PM Joseph D. Cohen @.***>
wrote:

Interesting.
But the tests are passing if I use
(DownloadsController::MAX_DOWNLOADS - Observation.count + 1).times do
Observation.create(user: rolf)
end
I guess that does save to the db? The tests seem to be quick, and I
don't
have to get involved with ugly stubs.

On Wed, Dec 4, 2024 at 8:05 PM Jason Hollinger @.***>
wrote:

I don't think that's going to work. Query needs to be able to find nnn
observations in the database, so they'll need to be saved.
On Wed, Dec 4, 2024 at 10:55 PM Joseph D. Cohen @.***>
wrote:

Wait. I think I can just create nnn Obss without saving them, which
makes
it not expensive.
Is that right?
On Wed, Dec 4, 2024 at 7:45 PM Joseph Cohen @.***> wrote:

Good idea! I'll give it a try.
On Wed, Dec 4, 2024 at 7:42 PM Jason Hollinger @.***>
wrote:

How about make the limit a configuration which you can stub:
MO.max_download_observations
MO.stub(:max_download_observations, 5)
On Wed, Dec 4, 2024 at 10:26 PM Joseph D. Cohen @.***>
wrote:

Is there a way to test the fix without xxx new Observations?
(seems
like
an
expensive test)
On Wed, Dec 4, 2024 at 7:22 PM Jason Hollinger @.***>
wrote:

Haha, good reason! No idea what a good number is. Maybe start
with
1000?
On Wed, Dec 4, 2024 at 10:16 PM Joseph D. Cohen @.***>
wrote:

Because I didn't know what I was doing.
I wrongly assumed that flavor :all meant that the user was
trying
to
download all the Obss in the db.
I'm now working on a fix: which will be
!inadmin_mode? && @query.num_results > xxx
What do you think is a good number?
On Wed, Dec 4, 2024 at 7:11 PM Jason Hollinger @.***>
wrote:

I'm curious why you are not doing something like this:
def too_many_results?
@query.num_results > xxx
end

On Wed, Dec 4, 2024 at 10:06 PM Joseph D. Cohen
@.***>
wrote:

The problem is that too_many_observations? is simply
wrong:
def too_many_results?
@query.flavor == :all
end
The :all flavor does not mean -- as I wrongly thought
--
that
the
user
is trying to download every Observation in the
database.
It's
more
like
all Observations which meet the other search criteria,
or
something.
###NOTE

This means Download Observations has been broken for
about
5
months
(since #2214
<
https://github.com/MushroomObserver/mushroom-observer/pull/2214>).

Nobody has complained to me or webmaster about it.
Ergo, nobody is using Download.

I do, however, want to fix it for possible use with
MyCoPortal
and
GBIF.
—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2518990281>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAYTNNLPMU5G2YSFIACI6IL2D67LJAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYHE4TAMRYGE>

.
You are receiving this because you are subscribed to
this
thread.Message
ID: @.***>

—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2518995003>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAALDFF726KXU2VBQJCXX6T2D677XAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYHE4TKMBQGM>

.
You are receiving this because you were assigned.Message
ID:
@.***>

—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2518999445>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAYTNNIVD27G6SNQDX45WMT2D7ASTAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYHE4TSNBUGU>

.
You are receiving this because you commented.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2519004500>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAALDFHE62BZUETFSDJE6A32D7BHVAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGAYDINJQGA>

.
You are receiving this because you were assigned.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2519008240>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAYTNNM4GALEKNERZ5M7KSL2D7BXRAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGAYDQMRUGA>

.
You are receiving this because you commented.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2519021969>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAALDFANV3MRFWAKSTNB5T32D7DSTAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGAZDCOJWHE>

.
You are receiving this because you were assigned.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2519033891>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAYTNNJNXXG224IS4MRR7U32D7FEJAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGAZTGOBZGE>

.
You are receiving this because you commented.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
<

https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2519043161>,

or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AAALDFHLQ3WTPTTE2Z4BKRL2D7GI5AVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGA2DGMJWGE>

.
You are receiving this because you were assigned.Message ID:
<MushroomObserver/mushroom-observer/issues/2553/2519043161
@.***>

—
Reply to this email directly, view it on GitHub
<
https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2519053312>,

or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/AAYTNNLVR76FI75I3IUJFLT2D7HHDAVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGA2TGMZRGI>

.
You are receiving this because you commented.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
https://github.com/MushroomObserver/mushroom-observer/issues/2553#issuecomment-2519056066,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAALDFAKNJUQUWXL4Y3SOTT2D7HS3AVCNFSM6AAAAABSZ56AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJZGA2TMMBWGY
.
You are receiving this because you were assigned.Message ID:
@.***>


Work Item Filters Does not work with multiple filters

Describe the bug
When attempting to use workItemFilters for change logs, if you try to use multiple filters, it puts them all as one comma separated filter.
To Reproduce
Add multiple filters to your release definition.
Expected behavior
When the WorkItemUpdater is attempting to match the filters, the for of should loop the filters instead of just always finding one filter.
Screenshots
N/A
Platform Details (please complete the following information):

OS: Mac/Windows
Version [e.g. CLI Version  eg: 1.6.6]: Latest
Salesforce CLI(sfdx cli) Version: Latest
CI Platform: GitHub

Additional context
This line https://github.com/dxatscale/sfpowerscripts/blob/524c283992508adcb413e2f3303c39558400a31d/packages/sfpowerscripts-cli/src/impl/release/ReleaseImpl.ts#L82
Currently is:
workitemFilters.push(releaseDefinition.changelog?.workItemFilters);
Could be changed to:
workitemFilters.push(...releaseDefinition.changelog?.workItemFilters);
I don't have access to create a branch for a pull request but I think if you do this and update the WorkItemUpdater.test.ts to have two string values it should cover the code and a good test to see it not work before this change.

@brandonmikeska  you can create a PR from a fork, please feel to create one!

@azlam-abdulsalam done https://github.com/dxatscale/sfpowerscripts/pull/1429

Thanks @brandonmikeska , its merged


Support authorization type

What is the purpose of the change
XXXXX
Brief changelog
XX
Verifying this change
XXXX
Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
[ ] Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
[ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[ ] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist.
[ ] Run `mvn clean compile --batch-mode -DskipTests=false -Dcheckstyle.skip=false -Drat.skip=false -Dmaven.javadoc.skip=true to make sure basic checks pass.

Codecov Report

Merging #1018 (531ca5c) into refactor-with-go (7079d88) will decrease coverage by 0.81%.
The diff coverage is 40.90%.

@@                 Coverage Diff                  @@
##           refactor-with-go    #1018      +/-   ##
====================================================
- Coverage             83.02%   82.21%   -0.81%
====================================================
  Files                    13       13
  Lines                   960      973      +13
====================================================
+ Hits                    797      800       +3
- Misses                  126      134       +8
- Partials                 37       39       +2

Impacted Files
Coverage Δ

pkg/authority/security/server.go
66.11% <0.00%> (ø)

pkg/authority/v1alpha1/tools.go
76.92% <60.00%> (-4.90%)
:arrow_down:

pkg/authority/patch/javasdk.go
97.47% <66.66%> (-2.53%)
:arrow_down:

pkg/authority/webhook/server.go
82.35% <0.00%> (-2.53%)
:arrow_down:

pkg/authority/cert/storage.go
75.30% <0.00%> (-2.47%)
:arrow_down:

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


using conda python to create pipenv adds both python_version and python_full_version to pipfile

Hello,
If I use a miniconda environment's python for creating a pipenv environment, it adds BOTH, a python_version and python_full_version (e.g. 3.9 and 3.9.13) to  the pipfile, and that throws an error.
System details:
I am using Ubuntu 22.04 via WSL.
System python is: 3.10.6
Pip version is: 22.2.2
Pipenv installed via pip (outside of any environment): 2022.10.9
Conda version is: 22.9.0
All are the latest right now
Steps to reproduce the error:
(mlzoomcamp is a conda environment with python 3.9.13 (but I also used a conda env with python 3.10 and the same issue persisted))
(base) mona@Memoona-PC:~$ pipenv --python=/home/mona/miniconda3/envs/mlzoomcamp/bin/python
# runs fine, but when I install something:
(base) mona@Memoona-PC:~/extra$ pipenv install numpy

It installs numpy correctly, but then throws this error:
Installing numpy...
Adding numpy to Pipfile's [packages]...
✔ Installation Succeeded
Pipfile.lock not found, creating...
Traceback (most recent call last):
  File "/home/mona/.local/bin/pipenv", line 8, in <module>
    sys.exit(cli())
  File "/home/mona/.local/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/home/mona/.local/lib/python3.10/site-packages/pipenv/cli/options.py", line 57, in main
    return super().main(*args, **kwargs, windows_expand_args=False)
  File "/home/mona/.local/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/home/mona/.local/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/mona/.local/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/mona/.local/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/mona/.local/lib/python3.10/site-packages/pipenv/vendor/click/decorators.py", line 84, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/home/mona/.local/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/mona/.local/lib/python3.10/site-packages/pipenv/cli/command.py", line 236, in install
    do_install(
  File "/home/mona/.local/lib/python3.10/site-packages/pipenv/core.py", line 2389, in do_install
    do_init(
  File "/home/mona/.local/lib/python3.10/site-packages/pipenv/core.py", line 1303, in do_init
    do_lock(
  File "/home/mona/.local/lib/python3.10/site-packages/pipenv/core.py", line 1070, in do_lock
    lockfile = project._lockfile(categories=lockfile_categories)
  File "/home/mona/.local/lib/python3.10/site-packages/pipenv/project.py", line 581, in _lockfile
    plette.Pipfile.load(pf), categories=categories
  File "/home/mona/.local/lib/python3.10/site-packages/pipenv/vendor/plette/pipfiles.py", line 59, in load
    return cls(data)
  File "/home/mona/.local/lib/python3.10/site-packages/pipenv/vendor/plette/models/base.py", line 49, in __init__
    self.validate(data)
  File "/home/mona/.local/lib/python3.10/site-packages/pipenv/vendor/plette/pipfiles.py", line 43, in validate
    klass.validate(data[key])
  File "/home/mona/.local/lib/python3.10/site-packages/pipenv/vendor/plette/models/base.py", line 81, in validate
    return validate(cls, data)
  File "/home/mona/.local/lib/python3.10/site-packages/pipenv/vendor/plette/models/base.py", line 38, in validate
    raise ValidationError(data, v)
pipenv.vendor.plette.models.base.ValidationError: {'python_version': '3.9', 'python_full_version': '3.9.13'}
python_full_version: 'python_version' must not be present with 'python_full_version'
python_version: 'python_full_version' must not be present with 'python_version'

The pipenv file at this time looks like this:
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
numpy = "*"

[dev-packages]

[requires]
python_version = "3.9"
python_full_version = "3.9.13"

I looked at the pipfile before the install command, and it has already added the 2 versions as soon as the environment was created.
I did find a fix, to manually remove the python_version line from pipfile.
Also, if I use the system python to create an environment, this issue doesn't happen, so this is most likely a conda issue. Do I have to manually remove the python_version each time from the pipfile?

If a full_python_version is specified when the project is installed it will be added in the [requires] section of the Pipfile in addition to the python_version. But this is just a recently added feature.
@oz123 should I take a look at refactor to go to only python_version or python_full_version gets written, but not both?

@jerempy can you please submit this patch upstream in Plette?
https://github.com/sarugaku/plette/blob/master/src/plette/models/sections.py#L20

IMHO the rule should be oneof, but I am not familiar with
Cerberus. To say for 100%.

when you have a moment @oz123 : https://github.com/sarugaku/plette/pull/31

Thanks for the quick response! I made a comment there.

FYI: We're seeing the same issue with vanilla (i.e not conda) Python.

Hi @matteius and @oz123 while this is completed in the source it looks like we need a pipenv release to benefit from this change, any chance someone could cut and push a release?

Thanks @stewartmiles  -- I just pushed the buttons -- new release is building now.


feat: bit support removed

Checks

[x] Manual check in Codesandbox.

:tada: This PR is included in version 4.4.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


[MLLIB] Allow multiple pipelines when tuning

## What changes were proposed in this pull request?

Updated CrossValidator and TrainValidationSplit to be able to
accept multiple pipelines for testing different algorithms
and/or being able to better control tuning combinations.
Maintains backwards compatible API and reads legacy
serialized objects.

## How was this patch tested?

Unit tests

Author: David Leifker<EMAIL_ADDRESS>

Have a look at http://spark.apache.org/contributing.html first
So the idea is to search over pipelines with different components, potentially, not just one set of components but varying its parameters?
What you have here amounts to running n pipeline evaluations with n grid searches. That could just be done with the existing machinery, run n times. In this new model it seems hard to work out which pipeline was selected? except by inspecting it.
It makes some sense but the alternative isn't much code either, to just combine the results of n grid searches.

Yes re: JIRA
CC @MLNick or @jkbradley as well
I agree about reusing the cached folds, that's a good point. I think this is worth considering.

I commented on the linked JIRA also.
In principle I think this can be a useful enhancement and yes the better efficiency on the caching side is a good benefit. I'd actually been thinking about a (simpler) version that would allow multiplePredictors to be the last stages of a pipeline, and return the best from those - so evaluating a set of algorithms at the same time (but keeping the preceding pipeline stages common).
This is a generalization of that idea.
I think it gels with SPARK-19071 and the next phase of that work that would look at smarter caching & re-use of stages in the pipeline. Also related to the subtask of that ticket - the parallel CV work in SPARK-19357.
Since Spark 2.2 code freeze is imminent, I think this will have to be delayed a little but it would be good to coordinate with #16774 where appropriate.

Thanks @leifker for the PR, this is a good idea.  I think though it can already be accomplished with the current param grid builder.  Since the stages of a pipeline are actually a param, you can add these to the param grid and will evaluate the different pipelines, also reusing the cached splits in cross-val.  I tried this out by modifying the example ModelSelectionViaCrossValidation and it seems to work
    val tokenizer = new Tokenizer()
      .setInputCol("text")
      .setOutputCol("words")
    val hashingTF = new HashingTF()
      .setInputCol(tokenizer.getOutputCol)
      .setOutputCol("features")
    val lr = new LogisticRegression()
      .setMaxIter(10)
    val dt = new DecisionTreeClassifier()
      .setMaxDepth(5)
    val pipeline = new Pipeline()

    val pipeline1: Array[PipelineStage] = Array(tokenizer, hashingTF, lr)
    val pipeline2: Array[PipelineStage] = Array(tokenizer, hashingTF, dt)

    val paramGrid = new ParamGridBuilder()
      .addGrid[Array[PipelineStage]](pipeline.stages, Array(pipeline1, pipeline2))
      .addGrid(hashingTF.numFeatures, Array(10, 100, 1000))
      .addGrid(lr.regParam, Array(0.1, 0.01))
      .build()

Sorry of the delayed response @BryanCutler, that's pretty neat, however this will perform unneeded work as it will execute nonsensical combinations of parameters. For example, if pipeline2 is executed (decision tree), the code will run the pipeline with lr.regParam set to 0.1 and 0.01 which doesn't matter since we're using the decision tree algorithm.

Yeah, that's true in this case.  You could just build the grids separately and combine them like this
    val pipeline1_grid = new ParamGridBuilder()
      .baseOn(pipeline.stages -> pipeline1)
      .addGrid(hashingTF.numFeatures, Array(10, 100, 1000))
      .addGrid(lr.regParam, Array(0.1, 0.01))
      .build()

    val pipeline2_grid = new ParamGridBuilder()
      .baseOn(pipeline.stages -> pipeline2)
      .addGrid(hashingTF.numFeatures, Array(10, 100, 1000))
      .build()

    val paramGrid = pipeline1_grid ++ pipeline2_grid

Maybe not all that intuitive though...
It might be worth it to add some smarts in the ParamGridBuilder or CrossValidator to prune the grid if there is a pipeline and params not used in any of the stages.

Interesting, let me think about this a bit. I think that there is probably a better api around this approach for sure.

Closing this PR, will get back to this eventually, but dealing with some other priorities at the moment.


Consider adding GO15VENDOREXPERIMENT support

In 1.5 the go command will read the environment variable GO15VENDOREXPERIMENT. If enabled, it will use the local "/vendor/" folder for dependencies. This replaces the need to manage GOPATH variables as dependencies can be fetched directly into the vendor folder and resolved there when built. This allows the GOPATH to not be modified. The contents of the vendor folder can be ignored.
Will you consider supporting this approach?

Good question, I don't know, I'd have to have more information, I'm googling for it but can't find a clear specification of it, do you happen to have one?
To be honest I don't see changing the GOPATH as a problem, quite the opposite, it's a very inexpensive way to avoid the world of trouble involved in sharing dependencies across projects without any significant downsides, I'm a big fan.
What do you think would be involved in supporting this new workflow? How likely is this experiment to stick around and become a part of the standard workflow in Go? I would certainly need to know a lot more than I do right now in order to consider it properly,  I am skeptical of the proposed solutions to vendoring/versioning from the Go team, but I'm not opposed to thinking it through and consider whether it'd make sense to support it.

The CL for it is here: https://go-review.googlesource.com/#/c/10923/ and https://go-review.googlesource.com/#/c/10922 .
The note from rsc is here: https://groups.google.com/d/msg/golang-dev/74zjMON9glU/4lWCRDCRZg0J (slight change, not a flag but a env var).
I understand you may not see changing GOPATH to be a problem. However when building code on other services (CI, heroku, AppEngine, etc) they need to know how to build code. The vendor directory is a standard way to provide this. Feel free to only enable this when you see the flag for now, but I would highly encourage you to adopt it for the sake of the larger go community.

I think the key question here is: what does this allow that isn't possible already?
Building in environments like CI, Heroku, etc is perfectly possible today, as is requiring packages from a vendor directory, this only requires you to set a value in an env variable (GOPATH), the proposal is to set another value in another env variable (GO15VENDOREXPERIMENT) for a less flexible way to solve the same problem, if I understand correctly.
Am I missing anything?

I think the key question here is: what does this allow that isn't possible already?
Nothing.

But it plays nice with a single GOPATH. This is nice for developers. And more importantly, it takes many approaches people have been using and give a standard "blessed" approach.

What specific use case is blocked by the way gpm is currently implemented though? If you're using GO15VENDOREXPERIMENT to keep vendored packages in /vendor/ then it wouldn't make sense to also add that same package to  Godeps and have their version changed, correct? It'd be defeating the purpose of vendoring it in the first place.
This new approach pushed by google (vendoring) can be used interchangeably with gpm's approach (manifest file revision locking),  but there seems to be little to gain from mixing both of them instead of choosing one or the other.
As far as I can see there is no use case that isn't covered by the current implementation, unless that assertion is incorrect there is no reason to add code.

You don't have to check in the code found in "vendor". However by checking
out code into the vendor folder you preserve the developers GOPATH.
On Mon, Jun 29, 2015 at 11:14 AM Pablo Astigarraga<EMAIL_ADDRESS>wrote:

What specific use case is blocked by the way gpm is currently implemented
though? If you're using GO15VENDOREXPERIMENT to keep vendored packages in
/vendor/ then it wouldn't make sense to also add that same package to
Godeps and have their version changed, correct? It'd be defeating the
purpose of vendoring it in the first place.
This new approach pushed by google (vendoring) can be used interchangeably
with gpm's approach (manifest file revision locking), but there seems to be
little to gain from mixing both of them instead of choosing one or the
other.
As far as I can see there is no use case that isn't covered by the current
implementation, unless that assertion is incorrect there is no reason to
add code.
—
Reply to this email directly or view it on GitHub
https://github.com/pote/gpm/issues/79#issuecomment-116781466.

gpm uses go get in order to fetch the code, it puts it wherever the go tool thinks is appropriate. Are you saying I should modify that?

Because gpm changes the revision of the repository after "go get", I would
recommend yes, you should modify that. Or at least copy the fetched package
into the vendor folder before changing to a specific version.
On Mon, Jun 29, 2015 at 11:44 AM Pablo Astigarraga<EMAIL_ADDRESS>wrote:

gpm uses go get in order to fetch the code, it puts it wherever the go
tool thinks is appropriate. Are you saying I should modify that?
—
Reply to this email directly or view it on GitHub
https://github.com/pote/gpm/issues/79#issuecomment-116793426.

This experimental new feature tries to solve the same problem as gpm with a different approach, vendoring means that a manifest file and revision locking are redundant, so it wouldn't make sense for gpm to add code to tackle a use case that doesn't exist for gpm users.
Be that as it may, I thank you for bringing that feature to my attention and making me think about the whole thing, that is a contribution on itself!


Code Generation is not working

What happened:
I git cloned the repository and ran make all as according to the instructions. I ran into issues here
./hack/update_codegen.sh
Using cached code generator version: 8e001e5d1894
Generating deepcopy funcs
Generating clientset for kudo:v1beta1 at github.com/kudobuilder/kudo/pkg/client/clientset
Generating listers for kudo:v1beta1 at github.com/kudobuilder/kudo/pkg/client/listers
Generating informers for kudo:v1beta1 at github.com/kudobuilder/kudo/pkg/client/informers
golangci-lint run
WARN [runner] Can't run linter goanalysis_metalinter: vrp: failed prerequisites<EMAIL_ADDRESS>WARN [runner] Can't run linter unused: buildssa: analysis skipped: errors in package: [/home/faiq/go/src/github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1/zz_generated.deepcopy.go:188:26: in.client.DeepCopyClient undefined (type client.Client has no field or method DeepCopyClient) /home/faiq/go/src/github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1/zz_generated.deepcopy.go:193:9: (*in).DeepCopyInto undefined (type *admission.Decoder has no field or method DeepCopyInto) -: could not load export data: no export data for "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1"]
# developer convenience for platform they are running
go build -ldflags "-X github.com/kudobuilder/kudo/pkg/version.gitVersion=0.9.0 -X github.com/kudobuilder/kudo/pkg/version.gitCommit=61e21945 -X github.com/kudobuilder/kudo/pkg/version.buildDate=2019-12-21T00:42:09Z" -o bin/manager github.com/kudobuilder/kudo/cmd/manager
# github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1
pkg/apis/kudo/v1beta1/zz_generated.deepcopy.go:188:25: in.client.DeepCopyClient undefined (type client.Client has no field or method DeepCopyClient)
pkg/apis/kudo/v1beta1/zz_generated.deepcopy.go:193:8: (*in).DeepCopyInto undefined (type *admission.Decoder has no field or method DeepCopyInto)
make: *** [Makefile:61: manager] Error 2

my environment was set correctly. proof:
$ env | grep GO
GOPATH=/home/faiq/go

What you expected to happen:
I expected it to build.
How to reproduce it (as minimally and precisely as possible):
run make all on master
Anything else we need to know?:
I'm building on a linux 64 bit system. I'm happy to close this one if you chose to reopen #1051
Environment:

Kubernetes version (use kubectl version):
Kudo version (use kubectl kudo version):
Operator:
operatorVersion:
Cloud provider or hardware configuration:
OS (e.g. from /etc/os-release):
Kernel (e.g. uname -a):
Install tools:
Others:

thanks for the report... looking.

The issue was introduced on a refactor https://github.com/kudobuilder/kudo/pull/1207
with the inclusion of:
type InstanceValidator struct {
var _ kudo.Validator = &Instance{}		client  client.Client
	decoder *admission.Decoder
}

in pkg/apis/kudo/v1beta1/instance_validator.go

fixed with reverting refactor code: https://github.com/kudobuilder/kudo/pull/1229

Thanks @faiq !   fix is merged into master.


Size guide feature

As for now it can even be a static page linked to the product page

I already did it in #320, size guide is a router-link which leads to /size-guide static page created before.


Android Basics: Get data from the Internet

name: Android Basics Unit 4 issue
about: Report problems with the Android Basics Unit 4 codelabs
title: 'Android Basics Unit 4 issue:'
labels: ''
assignees: ''

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-getting-data-internet?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-4-pathway-2%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-getting-data-internet#7
In which task and step of the codelab can this issue be found?
8th Task and 5th Step
Describe the problem
interface MarsApiService {
@GET("photo")
fun getPhotos(): List
}
this throws an error
it will be fixed by adding suspend before fun
interface MarsApiService {
@GET("photo")
suspend fun getPhotos(): List
}
Steps to reproduce?

Go to...
Click on...
See error...

Versions
Android Studio version:
API version of the emulator:
Additional information
Include screenshots if they would be useful in clarifying the problem.

@sahalsm
Thank you for reaching out to us. The issue is fixed and published.


[Feature Reuqest] Using it like an API on our Github readme

Hi, how about slightly modify the project to host it, online hosts, like Netlify, Vercel and then use it as an API to list the repositories we have contributed to on our readme profiles?

Adding the functionality to use it like an API and to host the API somewhere is out of scope for now.
I can modify the project and publish it as a package on PyPI to allow other developers to easily resuse it in their projects, and then they can host their projects somewhere and use it however they want. An issue for this was created a long time ago by me at #2, but I haven't had the time to refactor and package it.

Adding the functionality to use it like an API and to host the API somewhere is out of scope for now.
I can modify the project and publish it as a package on PyPI to allow other developers to easily resuse it in their projects, and then they can host their projects somewhere and use it however they want. An issue for this was created a long time ago by me at #2, but I haven't had the time to refactor and package it.

Ok, that will be also helpful if you do so.


fix to work on browser

Somehow the package name was wrong and it was not working in the browser.
I'm sorry if it was my misunderstanding.
thanks.

Ok, I see.
The problem is that the same package has different names in bower and npm:
https://github.com/alexei/sprintf.js
In bower is registered as sprintf and in npm is sprintf-js. I've always related bower with AMD and npm with commonJS. This is why I use different names depending of the type of the module.
How are you loading this package?

well... At first I did
npm install --save gettext-translator

and I wrote this.
import Translator from 'gettext-translator'

but when I build it with webpack, it say "Module not found: Error: Can't resolve sprintf".
so I think that "Maybe If I change sprintf to sprintf-js, it will work". and it was correct.
Am I misunderstanding how to use it?

Your code is correct. The problem is webpack is loading the package as AMD and in AMD the package is named printf (because it's assumed to be installed with bower).
Maybe, a solution could be remove bower support.
Meanwhile, can you test if this works fine (load the library as CommonJS instead ES6)?:
var Translator = require('gettext-translator');

thanks. I tested your code.
const Translator = require('gettext-translator');

but webpack says same error again...

and I tried
bower install gettext-translator

but now webpack says
Module not found: Error: Can't resolve 'script-loader'

I found that
console.info(!!(typeof define === "function" && define.amd));
console.info(!!(typeof module === "object" && module.exports));

output
true
true

so I changed priority.
How do you feel ?

I think the problem is not in the priority, but in the different name if the package is loaded by npm or bower. I'm more inclined to your initial solution, and if the package is installed with bower, just use a alias to the module. And because bower is deprecated, we can sacrifice it.

well... organize information.
In my project, grttext-translator is installed by npm.
so npm install sprintf-js.
but code want to define sprintf because the code misunderstands that the environment is AMD.
right ?
Although resolve.alias is certainly one solution, I think that it is not the best.
I think the real problem is the priority of AMD and CommonJS.
why do you think the problem is not in the priority ?

https://github.com/oscarotero/gettext-translator/pull/2/commits/5968ac8542c450e7ef4604fe13bdce861eec5605
well, now this pr change it to only for npm.

Ok, thank you!

👍

Released the version 2.0.0 including this change.


Validator is not available during Angular testing

@skaterdav85, I am using validatorjs with Angular js, The application is working fine as expected, but during testing Validator  is not defined error I am facing. Because in Angular js we need to inject each and every plugin or library we are using in our module and controller. But we are not injecting here we are directly using:
var validation = new Validator(data, rules [, customErrorMessages]);
So inside all the controllers it is available globally, but how can I access it as a service or a factory?

Access it globally in the service or factory.

But we don't have access in testing. What can I do for it?

Is it getting loaded in your test harness?


Refactor basket tasks to take newsletters as input

Extend tasks to take newsletters as arg
Add new settings entry for NDA basket
When user changes email re-subscribe to all newsletters not only vouched

Coverage increased (+0.005%) to 92.622% when pulling 9b39fb700f686706c703bee4a7d1e1bf6c87d581 on johngian:1282808 into 5902bed5a51190b1d6e1e97a15cbac60db4c717f on mozilla:master.

Coverage increased (+0.005%) to 92.622% when pulling 1716a0e6097121a111cb1a422ae08dc3c80ce5de on johngian:1282808 into 5902bed5a51190b1d6e1e97a15cbac60db4c717f on mozilla:master.

r+wc, nice work :airplane:

Coverage increased (+0.007%) to 92.624% when pulling c90a8bd3d8a2f3455898871f4f301f37b6a797d9 on johngian:1282808 into f0a492fb8a4a377c67e75f64ecac4dcda4604333 on mozilla:master.

Coverage increased (+0.007%) to 92.624% when pulling 48a3341dd8243c50bae238b393d066fa3fbf4787 on johngian:1282808 into f0a492fb8a4a377c67e75f64ecac4dcda4604333 on mozilla:master.


Update events.md

When using capture mode , parent is being handled before the children is being handled

Thanks! This was changed a little while ago.


CFP: Add support for k8s Gateway API

Cilium Feature Proposal
This issue is to discuss and track for k8s API Gateway work mentioned in roadmap. Kindly note that the actual work or implementation might vary based on the discussion and requirements mentioned in this GitHub issue.
Pre-tasks v1.13.0-rc1
While it's not strictly required, it's best to complete all follow-up items in https://github.com/cilium/cilium/issues/19698 or at least the below-related tasks:

[x]  Allow sharing of External Load Balancer for multiple Ingresses (with non-overlapping hosts/paths)

The main reason is to re-use the same pattern for API gateway, as multiple HTTP routes can re-use the same APIGateway (i.e. same external load balancer) @sayboras. This is done as part of https://github.com/cilium/cilium/pull/21386

[x]  Prepend Envoy resource names with CEC/CCEC namespace (and name?) so that operator does not need to worry about that.

This is to simplify the logic of constructing envoy resources. @pippolo84. Done as part of https://github.com/cilium/cilium/pull/21500

Tasks (Mid October)
At the time of writing, the below APIs were just graduated to beta, it's making sense to start with these APIs as the first step.

GatewayClass @sayboras
Gateway @sayboras
HTTPRoute @sayboras
ReferenceGrant @sayboras

At the high level, the L7 HTTP route could be done the same way Cilium does with IngressController. Below items can be used as references or starting points:

[x] Add new APIs into the Cilium codebase and check if slim types are required.

[x] If slim types are not required, direct go import should be just sufficed.

[x] Add required watchers for Gateway, HTTPRoute objects.

[x] Watch only Gateway object with class name as cilium.

[x] Provision required envoy resources.

[x] no change in datapath is foreseen, but let's see how it's going.
[x] handle conflicts between HTTP routes. Please refer to API Spec.

[x] Add a feature flag like what we have with ingress controller or envoy config.
[x] Add installation support via helm chart

[x] Pre-configure Cilium GatewayClass if the feature flag is enabled.

[x] Make sure that upstream conformance tests are successfully running as part of CI.
[x] Add Getting Started Guide documentation. #21908

Optional
Below APIs are still under v1alpha2 at the time of writing. However, while implementing the above tasks, it's better to think forward to avoid any potential re-work in future.

GRPCRoute. Tracked in https://github.com/cilium/cilium/issues/21928.
TCPRoute. Tracked in https://github.com/cilium/cilium/issues/21929.
TLSRoute. Tracked in https://github.com/cilium/cilium/issues/21927.
UDPRoute. Tracked in https://github.com/cilium/cilium/issues/21930.

This would be really great for CD canary deployments via flagger.

envoy gateway might be useful for this.
https://github.com/envoyproxy/gateway

With the merging of #21386 and the closing of #21270, the obstacles to starting work on this are removed, so this will get started. @sayboras is going to lay the foundations, and then I will be able to round things out.

@youngnick a reminder to update https://gateway-api.sigs.k8s.io/implementations/#cilium !

Ah, yes, thanks!


ConnectionKey change at runtime

Is it possible to change ConnectionKey at runtime ?
Thanks a lot

@ZioZenigata This way may work for you
using System.Reflection;

var connectionKey = typeof(UserRow).GetCustomAttribute<ConnectionKeyAttribute>()?.Value;

I have not explained myself correctly. I would like to point a database based on the connected user.
In  my  file myModuleRow.cs
if connect User1
[ConnectionKey("connectionKeyUser1"), Module(myModule), TableName("myTable")]
if connect User2
[ConnectionKey("connectionKeyUser2"), Module(myModule), TableName("myTable")]
Thanks

Is better switch to multi tenant. If you want different DB for different user, you can see at this wiki entry (but this work for .Net, don't work if you use .Net Core)
https://github.com/volkanceylan/Serenity/wiki/Database:-One-application-with-different-database-per-customer

Very nice..... Thanks a lot!


fix: UI: Support importing kafka connect schema

Fixes: #3234
contains fixes for previous review

This commit contains solutions for all review comments.


[zh]Add a new rule and fix format

Add a new suggested rule "do not add new line between Chinese characters" to avoid the extra space between Chinese characters.
Only the following change is new added:
  * 不要在两个中文字符中间断行，因为这样会造成中文字符中间显示一个多余空格，
    如果句子太长，可以从中文与非中文符号之间断行

Other changes are to fix the line break issue.

This looks pretty good. Thanks.
/lgtm
/approve


Update dataframe.py

The original DataFrameLoader class has a limitation that only allows it to load one column out of all other columns in a dataframe. To overcome this limitation, a new class called DataFrameContentLoader has been implemented.
The DataFrameContentLoader class allows for the loading of all the columns in a dataframe by setting the index as the metadata, dropping the index from the iteration variable row, and then converting the row to a dictionary. Since the Document class does not expect a dictionary, the text is converted to a string that looks like a JSON object.
This implementation allows the DataFrameContentLoader to load all the contents of the dataframe rather than just one column. This is particularly useful when dealing with datasets that have multiple columns of relevant information.

Fixes # (issue)
Before submitting

Who can review?
Tag maintainers/contributors who might be interested:

Closing because the PR wouldn't line up with the current directory structure of the library (would need to be in /libs/langchain/langchain instead of /langchain). Feel free to reopen against the current head if it's still relevant!


[chore] drop support for adapter-begin

@brianleroux @antony I wanted to propose this change as the first step of Begin taking over adapter-begin. I think this adapter has only ever worked for very brief periods, so I doubt anyone is really using it

Seems aggressive. Goal is to fix it not remove. Are things stable enough to attempt fixes?

I think the goal is two fold: to fix it and to have it be maintained external to this repo. Moving it out of this repo will require removing it from here at some point or another. I'm happy to hold off until the code is up in a new location if that's on the horizon so that we can point users to it though.
It should be stable enough to take over at this point. The adapter API hasn't really changed in the past couple of months and none of the issues on the 1.0 milestone would really result in API changes

@benmccann maybe we can mark it as deprecated in the meantime?

What would be the point? It's broken, so I think it'd be clearer to tell users up front not to use it

hey @benmccann we really want to work with you here and are compiling a list of reasons its broken. appears largely due to unpublished api changes which is frustrating because we obviously can't fix that. when I have the complete list we'll loop back. (our stuff has no breaking changes and the static/function deployment functionality has been stable with no major breaking changes in four years so its mostly on this side)

Just a bit of info - I was talking to ryanb in discord earlier - is he
working with you?
The adapter worked except for static assets previously - the reason I
didn't have time to work on keeping it up to date in spite of this is
largely due to the amount of effort required to test the changes made - I
struggled to find a good way to get a quick feedback loop - resorting to
copying the module into my test project over and over, rewriting
dependencies etc.
However it worked - for serving the main lambda - so I think getting this
working again would be just a matter of studying the Vercel or netlify
adapters which the begin one is based on.
However I also have to note that after discussions with other maintainers,
we probably want to remove all "branded" adapters out of core - this is
because we feel they would be better served by being maintained by the
platforms themselves, taking advantage of the latest platform developments.
So I don't think it matters too much where it lives whilst we fix it up.
Let's get it working and then make that decision.
On Tue, 6 Jul 2021 at 22:05, Brian LeRoux @.***> wrote:

hey @benmccann https://github.com/benmccann we really want to work with
you here and are compiling a list of reasons its broken. appears largely
due to unpublished api changes which is frustrating because we obviously
can't fix that. when I have the complete list we'll loop back. (our stuff
has no breaking changes and the static/function deployment functionality
has been stable with no major breaking changes in four years so its mostly
on this side)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/sveltejs/kit/pull/1817#issuecomment-875080656, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AABVORLMAA4Q77Y4DR43NJLTWNVYDANCNFSM47YSB6LQ
.

--

ꜽ . antony jones . http://www.enzy.org

As @antony said, our goal has always been to have the adapters be maintained by folks other than ourselves. We created a few to demonstrate and test the API, but have always hoped to avoid maintaining as many as possible here long-term. E.g. the community has created a great Firebase adapter that we've also avoided publishing here. We'll point users to the various adapters that exist from our site. It's just a reality that I don't have test accounts on all these various platforms to be able to test them and it's not scalable to have the wide variety of adapters we'd like to support all maintained and reviewed by just one or two volunteers.
I totally understand that the API has not been stable. Whether folks want to create and maintain adapters now or wait until 1.0 is a decision based on how comfortable they are using unstable APIs though I do hope that we've passed much of that instability now.  Probably the easiest way to see what needs to change is to look at another adapter like adapter-vercel and make the same changes in adapter-begin: https://github.com/sveltejs/kit/blob/master/packages/adapter-vercel/CHANGELOG.md

I'll definitely keep this in mind in the future.

I'll go ahead and merge this now that I see the adapter on the Architect Github org. I'm not sure if there's more work to do there, but either way it would be better to point users at that one since this one doesn't work.
I've also sent a PR to add the adapter to the list of community adapters: https://github.com/svelte-society/sveltesociety.dev/pull/59. The SvelteKit docs point users to that section to find more adapters and it's where we've published the Firebase and Deno adapters as well.
Thanks for writing an adapter! There's only one potential change we're considering for the adapter API before 1.0 (https://github.com/sveltejs/kit/issues/1893), so the API should hopefully be pretty stable now. We'll be sure to let you know of any API changes, so that you can tweak the adapter if needed. Let me know at any point if there's any questions or concerns we can help with


Light menu bar when selected Breeze Dark in Kubuntu

Issue Type: Bug
While selecting Beeze Dark color scheme in Kubuntu window title bar changes properly from light to dark but menu bar stays light.
VS Code version: Code 1.38.0 (3db7e09f3b61f915d03bbfa58e258d6eee843f35, 2019-09-03T21:51:09.716Z)
OS version: Linux x64 5.0.0-27-generic

@vnikolai can you try our exploration builds and see if the issue appears there. Thanks!

macOS: Download
Linux (DEB): Download
Linux (RPM): Download
Windows: Download


The current pattern for Sublayer::Task doesn't generate well with Blueprints

Blueprints is very effective at generating Sublayer::Generators and Sublayer::Actions but the pattern I've been exploring with Sublayer::Tasks doesn't seem to work very well.
I tried to create a blueprint of the MakeRspecTestsPassTask here and generate a few variations, but it didn't jump to using and chaining actions and generators together.
Working to brainstorm ways to get it to reliably create new tasks and hallucinate the Sublayer::Actions and Sublayer::Generators it would need to complete the task...

After some conversations in the discord, it looks like we may have been too hasty breaking out this idea of Task. Going to close this for now and focus on creating a basic agent implementation with a simple feedback loop structure


Add or remove items in any column

This ticket is to ensure that the user is able to add or remove an item, with the scrollable feature. At the end of every column/tab, there should be a blank empty option with a center +. Pressing this, will open the New Entry dialog.

Update: I added a separate data and infrastructure model to manage all entries in tabs. This also includes a BLoC to manage it and a domain model. Unfortunately, this does not seem to work and will need to be reworked to use a Map to dynamically add tabs and items. I think the domain model can be left as well as the infrastructure? model, but the entries data model will need to be reworked with the tabs data model.


Not sure if I did something wrong but only the root TreeViewItem has a style

Here is an example of my styling issue:

Here is my xaml source for the tree view
<TreeView x:Name="NbtTreeElement" SelectedItemChanged="NbtTreeElement_SelectedItemChanged" >
    <TreeView.Resources>
        <Style TargetType="TreeView" BasedOn="{StaticResource {x:Type TreeView}}" />
    </TreeView.Resources>
</TreeView>

I am adding the items dynamically in the code using a class which extends TreeViewItem and edits the Header and other properties in the constructor.

Well I figured something out and it works even if it is a little hacky lol

Well I figured something out and it works even if it is a little hacky lol

What is your solution? I'm having the same problem and found no solution (I also searched online without success).

I recon it was probably this line:
ItemContainerStyle = (Style)Parent.GetValue(ItemContainerStyleProperty);

but I haven't worked on that project in so long so I have no idea if that was actually the fix?


Private/paulrmason/save local key

Provided code to use an existing project and removed the need for a key to be saved at ~/.ssh/id_rsa
resolves #8

need to cancel this. I realize there's a bug if the project name has a space in it.


Display issues

Describe the bug
The time is always set to 12hours even when it's not selected.
The wind direction is always there.
Translation date and day not working
To Reproduce
Steps to reproduce the behavior:

Add the options and test

Expected behavior
Time should be 24 hours by default since the option is 12hours.
Wind direction should hide when option is not selected.
Translate day of the week and months.
Better option would be to pick HA or user settings.
Screenshots

Desktop (please complete the following information):

WEATHER-CHART-CARD VERSION 2.2.7
HOME ASSISTANT VERSION AND INSTALLATION TYPE hacs 1.34.0
Core 2024.2.1
Supervisor 2024.01.1
Operating System 11.5
Frontend 20240207.1
OS: [e.g. 10.3, venv, etc.]
Browser HA android/chrome
Version latest

Additional context

Hi FilipeOS,
Thank you for the report! We'll update the code to default to 24-hour time, hide wind direction when not selected, fix translation, and consider user preferences for customization.

Days in PT-PT
SEG
TER
QUA
QUI
SEX
SÁB
DOM
months (11 Fev, not Fev 11)
JAN
FEV
MAR
ABR
MAR
JUN
JUL
AGO
SET
OUT
NOV
DEZ

Hi, I should have told you the days, it's showing wrong.
Monday = Segunda - SEG
Tuesday = Terça - TER
Wednesday = Quarta - QUA
Thursday = Quinta - QUI
Friday = Sexta - SEX
Saturday = Sábado - SÁB
Sunday = Domingo - DOM

Well, I think it's fine the days but it's selecting the wrong day?

Well, I think it's fine the days but it's selecting the wrong day?

What do you mean with " it's selecting the wrong day"

I don't understand why you selecting always this blue day

That is 20mm of rain that will fall that day…….


Static display and Horizontal Forms

Built this into v1.1.1.  Wondering if you thought it was interesting enough to rebase on 2.0.0 and merge.

Just pushed up some more changes to support horizontal forms.  I pretty much rewrote BootstrapField, splitting it up into a bunch of methods.

I like it! Would definitely be useful.

My attempt at rebasing your work vs 2.0 https://github.com/insin/newforms-bootstrap/pull/9


If app is moved from background to foreground, camera is permanently in use

Tested with the native_qr example code.
Steps to reproduce:

start example
move app to background
move app to foreground
green dot is visible permanently in top right corner or iOS asks for camera permission

also green dot won't disappear until you either kill the app or open the qr scanner once.
issue only appears on iOS.

Do I understand correctly, that the green dot is visible while the scanner preview is not presented?

that is correct, yes.
also, the app should not ask for camera permission when moved to foreground.
what I forgot to mention in the steps to reproduce, the example app is a fresh install without any permissions set

I am also experiencing this issue.  Same steps to reproduce in my app:

run my app
put the app in the background by running another app
bring the app back to the foreground
the green "camera in use" light comes on

The only way to fix it is to kill the app, but the problem continues to happen if I re-open the app, then put it into the background again.

@jeffreyerikson can you confirm this behavior with the sample app which you can find in this repo example directory? I tried to reproduce the issue with no luck. If I switch this example app to background, the green dot disappears and if I switch back I still see the camera preview and the green dot appears back.

that is correct, yes. also, the app should not ask for camera permission when moved to foreground.
what I forgot to mention in the steps to reproduce, the example app is a fresh install without any permissions set

I believe, you have to take care of permissions on your own. The plugin should not explain to user why the app is needed a camera access, as this can be completely different cases.

@jeffreyerikson can you confirm this behavior with the sample app which you can find in this repo example directory? I tried to reproduce the issue with no luck. If I switch this example app to background, the green dot disappears and if I switch back I still see the camera preview and the green dot appears back.

I'll try to get some time this week to see if I can reproduce with the example app on my hardware here; however, it appears the example is a single screen/view, but my case is more complex.  The green dot is showing up when I'm in screens that don't do anything with QR scanning at all (note, too, QR scanning is the only thing in the app using the camera).  The view that does the QR scanning has been disposed, the green dot disappeared, the app has navigated to a new route, then, when the app goes to background then is brought to the foreground again, the green dot reappears.


[QUESTION] Consumer sees no messages

Hello,
Using this code to consume a topic, that, using Kowl and kcat I can see has hundreds of messages in >20 partitions:
$consumer = Kafka::createConsumer(
	['topic'],
	'group-name',
	'server:9094'
)
  ->withHandler(
    function (KafkaConsumerMessage $message) {
	    dd($message);
    }
  )
  ->stopAfterLastMessage()
  ->withMaxMessages(1)
  ->build()
  ->consume();

The consumer prints no message (even tried writing to Log - still nothing) and exits (or just sits there without stopAfterLastmessage()).
This is my first time using Kafka, so what am I missing? Why does kcat read the messages, but my code does not?

Same here, when I don't chain ->stopAfterLastMessage() my consumer reads new messages and continues it's work (undesirable behavior, cause I want to start it by schedule).
But if I use ->stopAfterLastMessage() I just get null and messages doesn't handle

I think the deal is that ->stopAfterLastMessage() stops message handling not only when it's real last message, but also when the $message->err code is not 0 (Consumers\Consumer\handleMessage)
Because of something some of my Kafka messages gets error code -185

I get no messages – at all. My handler never gets triggered. But I know there are messages waiting.

Neither mine handlers, so I put var_dump in Consumer.php to see that I get
error on the very first message.
Anyway, I solve the issue by using Rdkafka directly with same
configuration.
Later I will try to provide two pieces of code when Rdkafka works and
Laravel Kafka is not
Пт, 24 марта 2023 г. в 18:17, Rok Andrée @.***>:

I get no messages – at all. My handler never gets triggered. But I know
there are messages waiting.
—
Reply to this email directly, view it on GitHub
https://github.com/mateusjunges/laravel-kafka/issues/183#issuecomment-1482977527,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABK5TA36YCIGCCUQ355U4BLW5W3HRANCNFSM6AAAAAAV5G4Q6Y
.
You are receiving this because you commented.Message ID:
@.***>

For anyone finding this later:
The issues was, that kafka tracks "read" status of messages based on "index" of the message tied to a group - so in group X all messages up to index Z have been read.
For some reason this library never showed any messages, even when I changed the group but acted like they are all read. Even with autocommit disabled. Never figured out why.
I'm now using the underlying library directly and have had no issues.

Hey folks, I'm late to the party but I discoverd a bug in the auto-commit feature. The DefaultCommitterFactory was creating the wrong committer, so if you use withAutoCommit(false) it was returning a KafkaCommitter instead of the VoidCommitter, that should be used in this case. I fixed it in version 1.13.0.
@Putr can you please try one more time with the latest version of this package?

Closing this for now. Feel free to open another issue or comment here if you are still facing issues with this package. Thanks for reporting!


400 Bad Request

I copy pasted your example, and run it with a node js server but it's giving me 400 bad request error

are you sure you fill your key in the env and name the env varriable correctly ?

yes, sorry for bothering you, i contacted the dev team and they told me it was a problem with sandbox.

yes, sorry for bothering you, i contacted the dev team and they told me it was a problem with sandbox,

sorry for bothering you, i contacted the dev team and they told me it was a problem with sandbox


Desktop Java builds with Gradle

Make it possible to build JavaThemis for desktop/server environment with Gradle.
./gradlew :desktop:build

will now build a JAR file with Java code in src/wrappers/themis/java/build/jar, currently called java-themis-0.12.jar.
This is not really used anywhere right now, but it is a stepping stone for properly published JavaThemis.
Note that this builds only Java code. It still requires a JNI library to run which has to be installed separately. Since Themis 0.13 it will be possible to install it as libthemis-jni via system package managers.
Deprecations and breaking changes
AndroidThemis builds now need to be qualified
Desktop Java build is added to the root Gradle project as a subproject :desktop. AndroidThemis build has been moved from the root into the :android subproject.
This means that to build AndroidThemis it is now recommended to use qualified form:
./gradlew :android:assembleRelease

The unqualified form still works:
./gradlew assembleRelease

but it may behave unexpectedly with other targets, acting on both desktop and mobile Themis. The documentation currently recommends this form, but we should revise this once Themis 0.13 is released.
Java 7 is no longer supported
Modern, supported versions of systems have updated their default Java version to 11. Unfortunately, Gradle 4 does not support Java 11 and fails to build on those systems. It is usually possible to install Java 8 there and switch to using it, but we ought to support out-of-the-box builds better.
Embedded Gradle version has been updated to Gradle 5.6 which requires Java 8 to run. This means that systems not having Java 8 are no longer able to build AndroidThemis with embedded Gradle. We no longer consider the following systems supported:

Debian 8 (“jessie”) — released in 2015, not supported by Debian since June 2018, extended LTS support by third-party vendors lapses in July 2020

If you still use these systems and need to build AndroidThemis from source, please upgrade your build environments. You can also try installing an older Gradle version (4.X) and use it instead of embedded Gradle wrapper, but that's not guaranteed to work from now on.
Checklist

[X] Change is covered by automated tests
[X] The coding guidelines are followed
[X] Public API has proper documentation
[X] Changelog is updated

I was pleasantly surprised to discover that we have already ported tests to JUnit in #557. It's a quick-and-dirty port, but it kinda works. So I only had to add them to Gradle for desktop Java.
Running
./gradlew :desktop:build

will also run tests now.
Note that JNI library must be in Java's search path. Since we install it to /usr/local/lib which is not in the default search paths of most Java installations, you typically have to manually tell Java where to look for the the library:
./gradlew :desktop:build -Djava.library.path=/usr/local/lib

I was pleasantly surprised to discover that we have already ported tests to JUnit in #557

You know that it was you who ported tests, right? :D

You know that it was you who ported tests, right? :D

Definitely! git blame blamed me after all. Though it was you who reviewed that PR!
Okay... Just to admit it, using “author's we” in commit comments and alike is a (bad?) habit of mine. I want to believe it's not ”royal we“, after all.

blamed me after all

I’m totally fine with your “using we” style, but I think that you deserve extra appreciation 🧡

Aww~ 🥺😭


Caching HLS video

Hi @eneim,
Big Thanks for Toro Library.
Working on HLS video streaming. How to cache HLS video for replaying video without streaming from the network. ExoPlayer support team published Downloading Streams.  Is it implemented in Toro library to incorporate this feature?

@sivakumar83 I suppose it would work. Toro 3.5.2 compiles with ExoPlayer 2.7.1 and it comes with Cache mechanism and you can use it for caching HLS video I think.

@eneim DownloadService, DownloadManager are added in ExoPlayer 2.8.0 for HLS Video. How can I get Toro library for ExoPlayer 2.8.0?

@sivakumar83 If you just need to cache for later playback (so next time it will use cache instead of using the Internet), I believe 2.7.1 works. DownloadManager and DownloadService will help you to download the media to save the whole file. If you really need 2.8.x, please wait a few days ...