Consistency when retrieving Site Group by name (Closes #1721)

Consistency when retrieving Site Group by name.
Type

[X] Bug Fix
[ ] New Feature
[ ] Sample

Related Issues?
Fixes #1721
What is in this Pull Request ?
Added some consistency between Get-PnPGroup, Get-PnPGroupPermissions and Set-PnPGroupPermissions commandlets. When using the name parameter, the group is queried through the PnP Core SDK, which is case sensitive. Also added consistent null checks with PSArgumentExceptions when group was not found.

Awesome , thanks @martinlingstuyl for this update !
Much appreciated :)
Didn't think myself that a case sensitivity issue would go so far, earlier I just thought that maybe a ToLower or something would be enough 😂😊

It's new for me as well. Another solution would have been to load the titles of all sitegroups in memory, and then compare them clientside with Case Sensitivity disabled... but well, that just feels wrong, doesn't it? 😂 anyway, if there happens to be a better approach, we can change it again!


Immutable.Map comparison with not the same key order

Do you want to request a feature or report a bug?
bug
What is the current behavior?
Comparison between to identical Immutable.Map() but declared without the same key order fails.
If the current behavior is a bug, please provide the steps to reproduce and either a repl.it demo through https://repl.it/languages/jest or a minimal repository on GitHub that we can yarn install and yarn test.
What is the expected behavior?
All the specs on this example should pass.
describe('comparison with Immitable.Map', () => {
  const map1 = Immutable.Map({ a: 1, b: 2 });
  const map2 = Immutable.Map({ b: 2, a: 1 })

  it('should ignore key order with Immutable.is', () => {
    expect(Immutable.is(map1, map2)).toBe(true);
  });

  it('should ignore key order with Jest', () => {
    expect(map1).toEqual(map2);
  });
});

@leebyron are Immutable.Map ordered?

The behavior is consistent with normal JS Map.
describe('comparison with Map', () => {
  const map1 = new Map();
  const map2 = new Map();

  map1.set('a', 1);
  map1.set('b', 2);
  map2.set('b', 2);
  map2.set('a', 1);

  it('should ignore key order with Jest', () => {
    expect(map1).toEqual(map2);
  });
});

It's the same for plain arrays.
// Fails
expect(['foo', 'bar']).toEqual(['bar', 'foo']);

But objects don't care about insertion order
// Passes
expect({ a: 1, b: 2 }).toEqual({ b: 2, a: 1 });

I'm not sure what the correct solution is, but it feels like we should be more consistent?

Map is not ordered
On Sat, Oct 7, 2017 at 7:45 AM Simen Bekkhus<EMAIL_ADDRESS>wrote:

The behavior is consistent with normal JS Map.
describe('comparison with Map', () => {
const map1 = new Map();
const map2 = new Map();
map1.set('a', 1);
map1.set('b', 2);
map2.set('b', 2);
map2.set('a', 1);
it('should ignore key order with Jest', () => {
expect(map1).toEqual(map2);
});
});
[image: image]
https://user-images.githubusercontent.com/1404810/31307491-5a10f014-ab65-11e7-8885-48c3031b011b.png
It's the same for plain arrays.
// Failsexpect(['foo', 'bar']).toEqual(['bar', 'foo']);
[image: image]
https://user-images.githubusercontent.com/1404810/31307425-9dec3614-ab64-11e7-838b-255f446031ce.png
But objects don't care about insertion order
// Passesexpect({ a: 1, b: 2 }).toEqual({ b: 2, a: 1 });
I'm not sure what the correct solution is, but it feels like we should be
more consistent?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/facebook/jest/issues/4618#issuecomment-334929424, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AADD0kT6Mqjyx7zsQU1aFHGyNgrm5m4bks5sp2RigaJpZM4Pw2vL
.

Indeed, which makes me think that both Maps from Immutable and standard JS Maps should behave like Object when checking equality. That's up to @cpojer though.
(we can safely ignore what I said about arrays, it's not relevant here. I'll put it in details)

This is tricky because Jest doesn't have knowledge on how to sort two iterables to make them comparable. I think I'd be in favor of making toEqual work though if it isn't too big of a deal in the equality matcher.

Here my 2 cents: why not first use Immutable.is then fallback to current behaviour only if it's false?

Feels icky to have a dependency on immutable js in a generic assertion library. You can create your own assertion for that (and plug it in with expect.extend)

That's right. So toEqual only use the output from pretty-format? Maybe this package should reorder on all unordered types recursively?
const initialMap = Immutable.Map({b: 1, a: 2});
const orderedMap = initialMap.toSeq().sortBy((v, k) => k).toMap();
Immutable.Map({b: 1, a: 2}).toSeq().sortBy((v, k) => k).toMap()

POC

@dfournier, this is shorter/faster:
const orderedMap = initialMap.sortBy((_, k) => k)

There is no need to convert it to Seq.

we do a deep equality, pretty-format is used to try to show a pretty diff afterwards

The JS Map test given by @SimenB passes on the new Jest.
describe('comparison with Map', () => {
  const map1 = new Map();
  const map2 = new Map();

  map1.set('a', 1);
  map1.set('b', 2);
  map2.set('b', 2);
  map2.set('a', 1);

  it('should ignore key order with Jest', () => {
    expect(map1).toEqual(map2);
  });
});

Jest: 21.2.1
Node: 8.9.1
Yarn: 1.3.2
Should we make it consistent for Immutable Map?

Yeah, we should make it consistent if possible.


Missing loaders for images?

When I'm trying to build my app for the server, I'm getting a lot of errors like these:
ERROR in ../src/static-artling/ImageModalNewsletter.jpg
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type.

I guess this is because in my components I'm doing imports like this:
import ImageModalNewsletterJpg from '../../../../static/ImageModalNewsletter.jpg'

Since these kinds of imports are supported by CRA, shouldn't they be supported by cra-universal as well?

can you try to add image loader? If they don't use any hash or special transform, they should be compatible.
Not all file types are supported though, like svg.

Alright, somehow I didn't think that it was possible to change the webpack config for the server-side of things o_O
I added this:
      {
        exclude: [
          /\.html$/,
          /\.(js|jsx)$/,
          /\.css$/,
          /\.json$/,
          /\.bmp$/,
          /\.gif$/,
          /\.jpe?g$/,
          /\.png$/,
        ],
        loader: require.resolve('file-loader'),
        options: {
          name: '[name].[hash:8].[ext]',
        },
      },
      {
        test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
        loader: require.resolve('url-loader'),
        options: {
          limit: 10000,
          name: '[name].[hash:8].[ext]',
        },
      },

And now I am able to build the server bundle.

Just flagging that I ran into this issue with a fresh setup. @mbrochh solution unfortunately did not solve it for me and causes the following error:
throw new Error("Module build failed: TypeError: Cannot read property 'context' of undefined\n    at Object.loader (/Users/joelaguero/Projects/progressivelabs/ib-landing/node_modules/file-loader/dist/index.js:34:48)\n    at Object.module.exports (/Users/joelaguero/Projects/progressivelabs/ib-landing/node_modules/url-loader/index.js:37:25)");
^

Error: Module build failed: TypeError: Cannot read property 'context' of undefined
    at Object.loader (/Users/joelaguero/Projects/progressivelabs/ib-landing/node_modules/file-loader/dist/index.js:34:48)
    at Object.module.exports (/Users/joelaguero/Projects/progressivelabs/ib-landing/node_modules/url-loader/index.js:37:25)
    at eval (webpack:///../src/logo.png?:1:7)
    at Object.../src/logo.png (/Users/joelaguero/Projects/progressivelabs/ib-landing/server/build/bundle.js:110:1)
    at __webpack_require__ (/Users/joelaguero/Projects/progressivelabs/ib-landing/server/build/bundle.js:23:30)
    at eval (webpack:///../src/App.js?:14:13)
    at Object.../src/App.js (/Users/joelaguero/Projects/progressivelabs/ib-landing/server/build/bundle.js:99:1)
    at __webpack_require__ (/Users/joelaguero/Projects/progressivelabs/ib-landing/server/build/bundle.js:23:30)
    at eval (webpack:///./src/app.js?:11:16)
    at Object../src/app.js (/Users/joelaguero/Projects/progressivelabs/ib-landing/server/build/bundle.js:122:1)
    at __webpack_require__ (/Users/joelaguero/Projects/progressivelabs/ib-landing/server/build/bundle.js:23:30)
    at eval (webpack:///./src/index.js?:4:11)

However, I was able to make things go by doing the following:

Run yarn add url-loader
Add the following to server/webpack.config.js:

      {
        test: /\.(png$|jpe?g$|gif$|bmp$)?$/,
        loaders: 'url-loader'
      }

Yes, for now we can use url-loader although we get hydration warning on console.
Another alternative is using public path and store the images there (not using import syntax)

You can disable the warning using:
https://reactjs.org/docs/dom-elements.html#suppresshydrationwarning


Measure time for every level. Total time in game, time afk, time in combat, time moving, time on taxi, time as ghost

WowDiaryData[Nlevel].time.

total
standing
moving
afk
combat
...

Measure for:

current session current character
current level current character (and keep for finished levels)
all the time with current character
all the time for all characters
this day for current character
this week for current character
this month for current character


Renaming curriculum_task

Per discussion with Alex and Bruno (doc), I decided to rename curriculum_task to curriculum_name to avoid the confusion with (session) task.

Related to #40


Adding section on SRE-related Podcasts

Added a section and entries on SRE-related Podcasts

Hey @ingoa, that's a great addition. Would you mind removing the extra empty lines and rebase your branch?

Thanks @ingoa


Make MCScore Reactive

This PR makes MCScore reactive. I also create a function to serialize the mc_score for use in state_view from ScaffoldAlert. It also makes the gate in stage 5 work properly

Just curious, what was the reason for reordering the marker base classes and removing the MarkerBase metaclass?

Ahh, @Carifio24, I would get the following errors -
File ~/anaconda3/lib/python3.9/enum.py:611, in EnumMeta._get_mixins_(class_name, bases)
    609 first_enum = bases[-1]
    610 if not issubclass(first_enum, Enum):
--> 611     raise TypeError("new enumerations should be created as "
    612             "`EnumName([mixin_type, ...] [data_type,] enum_type)`")
    613 member_type = _find_data_type(bases) or object
    614 if first_enum._member_names_:

TypeError: new enumerations should be created as `EnumName([mixin_type, ...] [data_type,] enum_type)`

This would occur when Marker was declared using class Marker(enum.Enum, MarkerBase)
And the other error was,
ERROR:    Component react.component(hubbleds.pages.06-prodata.Page) raised exception AttributeError("'int' object has no attribute '_member_type_'")
Traceback (most recent call last):
  File "/Users/jal194/anaconda3/lib/python3.9/site-packages/reacton/core.py", line 1707, in _render
    root_element = el.component.f(*el.args, **el.kwargs)
  File "/Users/jal194/github/cosmicds_dev/hubbleds/src/hubbleds/pages/06-prodata/__init__.py", line 78, in Page
    f"""
  File "/Users/jal194/anaconda3/lib/python3.9/enum.py", line 772, in __format__
    return cls.__format__(val, format_spec)
  File "/Users/jal194/anaconda3/lib/python3.9/enum.py", line 765, in __format__
    if self._member_type_ is object or str_overridden:
AttributeError: 'int' object has no attribute '_member_type_'

This error occurs when you do something like solara.Markdown(f"{Marker.pro_dat0}"). I don't really understand metaclasses, but I think the way MarkerBase was defined left something out. The first error happens whether or not I included the metaclass

@johnarban Must be an issue between versions of the Python enum library - from the traceback it looks like you're on 3.9; I was using 3.11 locally when I set that up (and the referenced line in enum.py is something different on my end).
I was mostly just curious - if this works fine then we should use what's more generally compatible. The metaclass was mostly to ensure that any inheriting Marker classes were actually enums, but I don't think that really matters.

So I have reverted the changes in MarkerBase and Marker base classes and fixed a couple bugs that seemed to creep in when I updated my python version to 3.11. I have merge main into this branch, and fixed stage 5 to use the new MCScore.

This has been updated to fix all the guidelines with mc-radiogroup to use the new format and to allow advancing via the gates. There are few places where the mc-radiogroup is in a sub-component with, those can be done in a separate PR

Does anyone else get a flicker in the "explainer text" that appears in the box when going from wrong/neutral to right answers? I'm seeing this consistently for some questions but not others. This is Stage 4, rel_vel1. The questions in Stage 5 don't seem to have this flicker.
https://github.com/cosmicds/hubbleds/assets/12750048/63f71ecc-84e2-4b46-8ad0-b0492a2e6da2

The very last mc question in Stage 6 pro_dat9 is behaving especially strangely. I have to press all the radio buttons twice for them to respond to anything, and then the "next" button never appears. (It gets cut off in the video, so you can't see it).
https://github.com/cosmicds/hubbleds/assets/12750048/b53477bf-fca8-427a-9f2b-6980014d1c83


Profile Picture???

Subject: Profile Picture???
Description:
Can't find a place to upload a picture
Results:
Backend version: develop-c0f4e3f1
Frontend version: develop-c0f4e3f1
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36
Page: https://couchers.org/profile/edit/about
User: rcys (10091)

Thoughts @dommers-ux?

@aapeliv
something like this?

maybe use the text Upload if an image has not been added. and Edit if a user has one.

Doesn't seem to be an issue anymore


Update README instructions to include instructions to build linera storage service

Motivation
Fix the instructions so that they can be followed and work.
Proposal
Update README instructions on the simple Linera example setup to match the current requirements for the Linera Storage Service.
Test Plan
Didn't work with old instructions, works with new ones.
Release Plan

Nothing to do.

We might as well make the storage-service a default at this point.


CA: From Dusk...

🐛 Bug Report
GGs task checking for Demonic gorillas

Thank you - fixed here https://github.com/oldschoolgg/oldschoolbot/pull/5259


[WIP] quote hive column names

When columns have strange characters, not quoting them can lead to errors. THis PR quotes the column names to avoid such errors.

Codecov Report

Merging #5368 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #5368   +/-   ##
=======================================
  Coverage   61.31%   61.31%
=======================================
  Files         369      369
  Lines       23497    23497
  Branches     2715     2715
=======================================
  Hits        14407    14407
  Misses       9078     9078
  Partials       12       12

Impacted Files
Coverage Δ

superset/db_engine_specs.py
53.83% <ø> (ø)
:arrow_up:

Continue to review full report at Codecov.

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


Add automatic release workflow

This workflow can be used to release new versions of the backport-action automatically.

It sets the version in the package.json, and tags this commit.
It also creates (or moves) tags for the major and minor version.
It can also dry-run, meaning it does not push any commits or tags. The created commits are always logged.

This does not yet create new release branches (and corresponding backport labels) for backporting to major and minor releases. We can do that in another pull request.


Only one channel gets connectionResetException

Suppose you have multiple channels, each in one thread, sharing a unique connection, and consuming messages.
When the connection breaks (can be simulated by hitting the "Force close" button on rabbitMQ manager), only one channel gets the exception. The others are still waiting for messages :-(

I don't have a proposed fix for this behavior. I can't figure out what threads you're invoking what API methods from. I would probably implement some sort of exception management and shared state behavior. Do you know of any libraries that share a common base connection and raise an exception to all threads?

I support the following type of scenario.
https://github.com/eandersson/amqpstorm/blob/master/examples/scalable_consumer.py
Basically all channels share the same connection, while the main thread manages the connection. When a connection dies, all channels catch the exception and close, once that is done, a new connection is opened.
Although, not sure if my way of dealing with this would carry over easily to rabbitpy.

The way I read the issue is that I believe they're expecting the same exception to be raised in every thread, which I don't know which threads to raise it on. Instead different exceptions are raised based upon what's going on in each of the objects in the threads.
rabbity has a similar behavior, when the connection is closed, the channels are torn down, exceptions raised, etc. It just happens to be the active thread that gets the connection closed and the others will get other exceptions based upon the action they were taking.
Anyway, here's the output of a multi-threaded app that's consuming and doing stuff across threads with a remote close:
DEBUG:rabbitpy.base:Writing frame: Basic.Ack
DEBUG:rabbitpy.base:Waiting on <class 'pamqp.specification.Basic.Deliver'> frame(s)
DEBUG:rabbitpy.channel0:Received frame: 'Connection.Close'
WARNING:rabbitpy.channel0:RabbitMQ closed the connection (320): b'CONNECTION_FORCED - Closed via management plugin'
DEBUG:rabbitpy.base:Channel0 setting state to 'Closed'
DEBUG:rabbitpy.connection:State: 'Open'
DEBUG:rabbitpy.base:Connection setting state to 'Closing'
DEBUG:rabbitpy.base:IO setting state to 'Closing'
DEBUG:rabbitpy.events:Event is already set: Socket Closed
DEBUG:rabbitpy.base:IO setting state to 'Closed'
DEBUG:rabbitpy.base:Connection setting state to 'Closed'
DEBUG:rabbitpy.io:Exiting due to closed socket
DEBUG:rabbitpy.io:Exiting IOLoop.run
DEBUG:rabbitpy.io:Exiting IO.run
DEBUG:rabbitpy.base:Interrupting the wait on frame
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "example.py", line 60, in fill_queue
    rabbitpy.Message(self.channel, body_value="test?").publish(exchange="test_resp_enchange.e", routing_key="test_resp_queue")
  File "/Users/gmr/Source/rabbitpy/rabbitpy/message.py", line 284, in publish
    self.channel.write_frames(frames)
  File "/Users/gmr/Source/rabbitpy/rabbitpy/base.py", line 261, in write_frames
    if self._can_write():
  File "/Users/gmr/Source/rabbitpy/rabbitpy/base.py", line 283, in _can_write
    raise exceptions.ConnectionNotOpen()
rabbitpy.exceptions.ConnectionNotOpen: The connection is not open

Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "example.py", line 51, in get_rx
    for item in self.in_q:
  File "/Users/gmr/Source/rabbitpy/rabbitpy/amqp_queue.py", line 195, in consume
    message = self.channel._consume_message()
  File "/Users/gmr/Source/rabbitpy/rabbitpy/channel.py", line 311, in _consume_message
    frame_value = self._wait_on_frame([spec.Basic.Deliver])
  File "/Users/gmr/Source/rabbitpy/rabbitpy/base.py", line 467, in _wait_on_frame
    self._check_for_exceptions()
  File "/Users/gmr/Source/rabbitpy/rabbitpy/base.py", line 309, in _check_for_exceptions
    raise exception
rabbitpy.exceptions.AMQPConnectionForced: b'CONNECTION_FORCED - Closed via management plugin'

Traceback (most recent call last):
  File "example.py", line 87, in <module>
    test()
  File "example.py", line 81, in test
    tester.interrupt()
  File "example.py", line 64, in interrupt
    self.in_q.stop_consuming()
  File "/Users/gmr/Source/rabbitpy/rabbitpy/amqp_queue.py", line 324, in stop_consuming
    raise exceptions.NotConsumingError()
rabbitpy.exceptions.NotConsumingError: No active consumer to cancel


make totalUsers optional

Summary
The totalUsers prop expected by AddMembersButton isn't actually required, since the component has code to handle when the prop is falsy.  The property itself isn't available until after the background stats have loaded.
This removes a warning during development:

Ticket Link
None.

/cherry-pick cloud

Cherry pick is scheduled.


feature request

Hello,
Could you please add a public method to be able to destroy the carousel. So for example when a user resizes the window I want to disable/destroy the carousel on small screens.
Thank you for a great plugin.

Can you add a built-in option to pause the slider on hover?
Is there a way to overwrite it in the current version. I didn't see it being mentioned in the documentation.
Pause on hover and resume auto slide on hover out.
Thanks. Love your slider.


policySetDefinition Group Names should be Option<>

Based on the Azure REST API Spec, the groupNames should be marked as optional.
The Microsoft Docs also notate it as optional, see here.
https://github.com/Azure/azure-rest-api-specs/blob/master/specification/resources/resource-manager/Microsoft.Authorization/stable/2019-09-01/policySetDefinitions.json#L564-L574
        "groupNames": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The name of the groups that this policy definition reference belongs to."
        }
      },
      "required": [
        "policyDefinitionId"
      ],

It's rendered as in the models.rs for the 2019-09-01 version in this repo:
    #[serde(rename = "groupNames", default, skip_serializing_if = "Vec::is_empty")]
    pub group_names: Vec<String>,

https://github.com/Azure/azure-sdk-for-rust/blob/8d275a30e7cd857e38809c651516fc21e51c5ba0/services/mgmt/resources/src/package_policy_2019_09/models.rs#L204-L205
To fix this, would the lines just need to be adjusted to? If that sounds like the right path, I'm happy to look through the other API versions to make sure they align and contribute a PR.
    #[serde(rename = "groupNames", default, skip_serializing_if = "Option::is_none")]
    pub group_names: Option<Vec<String>>,

This same scenario will apply to the policyDefinitionGroups.

Hi @mdtro. By design, instead of  Option<Vec<String>>>, I chose to just do  Vec<String>. If it is empty, it will not be written. This makes the code much more pleasant to work with in my experience.

Ah, I understand, @ctaggart.
My use case was deserializing a policyset definition from a JSON/ARM template file. It did not have the policyDefinitionGroups or groupNames fields and thus resulted in a serde error.
[...] missing field `groupNames` at line 35 column 13

The fix was to just add in the empty arrays within the JSON file. Here's a snippet:
        "policyDefinitionGroups": [],
        "policyDefinitions": [
            {
                "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/0b60c0b2-2dc2-4e1c-b5c9-abbed971de53",
                "parameters": {
                    "effect": {
                        "value": "Audit"
                    }
                },
                "groupNames": []
            },

It wasn't much trouble to go through each of my initiatives adding these fields. :)

You may have run into bug https://github.com/Azure/azure-sdk-for-rust/pull/233, but the bug fix merged 25 days ago.


Fix user avatar name

Signed-off-by: Masudur Rahman<EMAIL_ADDRESS>Fix: #8176

Codecov Report

Merging #8547 into master will increase coverage by 0.02%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master    #8547      +/-   ##
==========================================
+ Coverage   41.72%   41.74%   +0.02%
==========================================
  Files         526      526
  Lines       68403    68407       +4
==========================================
+ Hits        28542    28558      +16
+ Misses      36213    36202      -11
+ Partials     3648     3647       -1

Impacted Files
Coverage Δ

models/user.go
50% <0%> (-0.18%)
:arrow_down:

modules/sync/unique_queue.go
78.57% <0%> (-10.72%)
:arrow_down:

modules/task/migrate.go
24.35% <0%> (-3.85%)
:arrow_down:

models/error.go
32.08% <0%> (-1.25%)
:arrow_down:

models/repo.go
48.94% <0%> (+0.05%)
:arrow_up:

routers/repo/view.go
40.95% <0%> (+0.95%)
:arrow_up:

models/repo_list.go
74.14% <0%> (+0.97%)
:arrow_up:

modules/log/event.go
65.64% <0%> (+1.02%)
:arrow_up:

modules/migrations/gitea.go
11.75% <0%> (+1.49%)
:arrow_up:

modules/migrations/migrate.go
22.9% <0%> (+1.67%)
:arrow_up:

... and 2 more

Continue to review full report at Codecov.

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

@masudur-rahman we need a migration to rename all the old avatars, otherwise all users' customize avatars will be broken.

@masudur-rahman we need a migration to rename all the old avatars, otherwise all users' customize avatars will be broken.

@lunny , If we rename all the old avatars, it will cause the same problem as deleting the avatar of  one user among multiple users having same avatar as there exists only one avatar in the storage.
Although we can copy the existing avatar with new name for each user & update the database and finally delete the old avatar from storage ( as we don't know how many users uploaded same image as their avatar ).
By the way, if we leave the existing avatars unchanged, it will work like before as the previous avatar name is stored in the database like they are in the file storage.

@masudur-rahman yeah. So we need a migration function and copy the avatars for that repositories which has same avatars.

@lunny , I completed the migration.
Please take a look if everything's okay.

@masudur-rahman Please resolve the conflicts.

@guillep2k conflicts are resolved.

@lunny, I think everything's okay now. Could you please review once again ?

@masudur-rahman resolve conflict (migration is from v104 -> v105)
If Bakport only posible after backport of https://github.com/go-gitea/gitea/pull/8483#event-2728733779

OK, sorry about merging my PR breaking the migration again.
I think we're doing the wrong thing by having to backport a migration.
For the backports we should simply stop removing avatars - we could add (yet) another admin task to just run through and clean-up.
In the 1.11 migration we simply run the cleanup task and do the name changes. The admin task can be removed at that point.

Instead of changing filenames another option for the migration is to count how many times an image is referenced and keep a count - however, there could be a race-condition where these might get out of sync - so naming per-id is possibly safer.
Finally, please could we check that the repository avatars are not affected by a similar bug.

@lafriks can you remove lable "backport/1.9" this isn't posible because of migrations ...

It's not possible to backport this to 1.10 also

@masudur-rahman resolve conflict (migration is from v104 -> v105)

@6543 , I resolved the conflicts. You may take a look now.

Instead of changing filenames another option for the migration is to count how many times an image is referenced and keep a count - however, there could be a race-condition where these might get out of sync - so naming per-id is possibly safer.
Finally, please could we check that the repository avatars are not affected by a similar bug.

@zeripath,for repo avatar it is already implemented.
https://github.com/go-gitea/gitea/blob/4089f680421f939ee8c6378796738d1fa2d4f6b5/models/repo.go#L2764
But there is some dissimilarity. For user avatar we are taking a final hash but for repo avatar the final hash isn't used.

@zeripath, could you please help me with the test failing ?
https://drone.gitea.io/go-gitea/gitea/14397/1/15
Before resolving the conflicts, tests were passing but now it's failing.
I figured you added those integration tests. That's why I thought may be you could help me with the failing test.

@masudur-rahman hey its funny but we have to mve migration from v104 -> v105 ...
And about https://github.com/go-gitea/gitea/pull/8547#issuecomment-544542059
can we make all avatar url generation the same way?

abut <uid>-<hash> i dont see any securety issues ...
but i dont mind if we make all avatar urls hash(<uid>,<content-hash>)

@masudur-rahman hey its funny but we have to mve migration from v104 -> v105 ...

@6543 , I have updated the migration.

And about #8547 (comment)
can we make all avatar url generation the same way?

We can but we will need another migration to rename all the old repo.Avatar. Someone may have  different opinion on how and what to do.
So, I think we should just skip that part in this pr. If we really want repo.Avatar to be same as u.Avatar, we can make another pr regarding the changes.

@lunny what do you mean with https://github.com/go-gitea/gitea/pull/8547#discussion_r338384780
I'm still learning about xorm D:

@masudur-rahman can you resolve conflicts

@6543, I am waiting for a response for https://github.com/go-gitea/gitea/pull/8547#discussion_r341840020.
I just wanted to resolve all the problems at once. :pensive:

@masudur-rahman migrations is now from v109 -> v110 and you shuld rename your file to v109.go
thx

what is the status?

@lunny please review

@masudur-rahman please resolve conflicts

@masudur-rahman I hope you don't mind that I resolved the conflicts for you
@lunny please review

@masudur-rahman See my comment on https://github.com/go-gitea/gitea/pull/8547#discussion_r354269707, I think current migration will not work.

Please resolve the conflicts.

@lunny, https://github.com/go-gitea/gitea/pull/8547#discussion_r358591456

@lunny, conflicts are resolved and also checkout https://github.com/go-gitea/gitea/pull/8547#discussion_r358591456 .

And resolved the conflicts for the second time in a single day. Hope it will be processed before another conflict.

code in migration often causes conflicts ...

Sorry for changing my opinion again.
Once the migration was failed on the middlew. You have to run it again. It will always change the md5
hash(-hash(-<file_md5_hash>)). Maybe we have to calculate the md5 from the file but not get from the database.

So we should use the same method as in UploadAvatar():
u.Avatar = fmt.Sprintf("%x", md5.Sum([]byte(fmt.Sprintf("%d-%x", u.ID, md5.Sum(data)))))

We will need to read the file into memory. That should not be a problem as we do that for all avatars anyway.

@lunny & @guillep2k, sorry for being late.
I've used avatar file hash for new avatar instead of old avatar from database as you suggested.
Hope it's okay.

@masudur-rahman can you 'update branch'

@masudur-rahman can you 'update branch'
or allow changes to it for maintainers?

@6543, I've updated the branch and also allowed edits from maintainers.

We can also delete the files as soon as the session commits - so I'll do that too.

I guess it's just a migration and if there is excess left over data after a fail that's fine.
What we cannot have is that there is a failure we lose data and we're now at the point that we cannot lose data whereas previously we could have.
So I'll take another quick look after the build has done it's job and if I can't think another way to break this then it can be merged.
Sorry that this has taken so long @masudur-rahman - this has been unexpectedly complex.

@zeripath yes - would say ready to merge :rock: from my side :+1:
@masudur-rahman thanks !
sometimes a PR needs a bit of patience

I guess it's just a migration and if there is excess left over data after a fail that's fine.
What we cannot have is that there is a failure we lose data and we're now at the point that we cannot lose data whereas previously we could have.
So I'll take another quick look after the build has done it's job and if I can't think another way to break this then it can be merged.
Sorry that this has taken so long @masudur-rahman - this has been unexpectedly complex.

It's okay. Thanks for handling the last faults for me.

@zeripath yes - would say ready to merge  from my side
@masudur-rahman thanks !
sometimes a PR needs a bit of patience

Thanks to you too. Although it took a long bit of patience, I hope it was worth.

~We can also delete the files as soon as the session commits - so I'll do that too.~
oh damn we can't
Yeah, we can't delete the the migrated avatars yet. I almost thought you've  changed that part.

This should also be back port to v1.10. But since there is a migration, it's some difficult.


[BUG]: In Apple TV mp4 video is not playing it's only fetching thumbnail of video

Version
^6.3.0
What platforms are you having the problem on?
Apple tvOS
System Version
MAC OS Ventura 13.6.4
On what device are you experiencing the issue?
Real device, Simulator
Architecture
New architecture with interop layer
What happened?
There aren't any issues in Console or anywhere.
On FireTV it's working fine.
but when we run in AppleTV loads and after loading get paused on first screen.
When we forward 10 seconds it fetches thumbnail of video of 10th second. but video down't plays
Reproduction
repository link
Reproduction
Integrate react-native-video package on
react-native-tvos
both are basic setups
Run Xcode and Open App in AppleTV or simulator
even sample video is not playing on apple TV.

I recently tested the appleTV sample included in this repo with 6.5.0 I don't have this issue, I can reopen the ticket, plus please provide a sample app which reproduce the issue


Allow any refspec to define scripts version

that fixes #241 partially, now you can set ph_scripts_refspec=pull/245/head to test PR 245


include py.typed in package

this should enable mypy to analyse the package and fix #100
@phoenixr-codes can you please confirm this fixes the issue? Use this to install the pre-release version:
pip install -U --pre readchar==4.0.4.dev0

This does not fix the issue for some reason - even after upgrading mypy and clearing the cache.
Following https://mypy.readthedocs.io/en/stable/installed_packages.html#creating-pep-561-compatible-packages, it might be neccessary to set zip_safe to False.

hm, thats anoying. I will look into this some more...

@phoenixr-codes it should work now, could you please try again? Use:
pip install -U --pre readchar==4.0.4.dev1

Coverage: 94.156%. Remained the same when pulling ee86c845747e487442db3bb6233704ee825ecaaf on py-typed into b05073b615820f2c4512df16324fd9ee115dd1f4 on master.

But I lade sure that this time the gile is included 7n both the .tar.gz and the wheel, wird.
But thanks for the hints from other packages, I will look how they handle it

Ok I found the problem. My release-pipeline is a bust and actually always releases master, so these changes are not in the pre-release versions...  -_-
If you have the time you could try installing directly from the repo, like this:
pip install -U<EMAIL_ADDRESS>
I will fix the pipeline...

@phoenixr-codes The pipeline is fixed and the newest pre-release version now actually containes the changes (also in the versions pushed to pypi). So installing this should work:
pip install -U --pre readchar==4.0.4.dev1


Moved from using a navigation drawer to bottom navigation, also added Kotlin support

Added Kotlin support
MainActivity has been converted from Java to Kotlin
MainActivity's permission request has been moved to RequestPermission contract
Moved from navigation drawer to bottom navigation

Pictures of new UI:

Rebased onto development

Cleaned up the UI and changed the icons for bottom navigation.
Everything else looks good. Merging this in.


Vault Setup info

Hi @DaspawnW ,
I found this link https://koudingspawn.de/how-vault-crd-can-help/ quite informative. I am using sealed-secrets for doing all the secrets management via GitOps process, which works quite good. I had only few questions.

How is the Vault setup in K8s? (Helm install or a Vault operator is setup)?  Could you elaborate on how the vault server is setup on K8s via your blog.
How is the persistence of secrets managed in Vault? Are you using a storage backend mentioned here https://www.vaultproject.io/docs/configuration/storage/ ?

Kevin

Hi @linuxbsdfreak,
For installation of Vault itself you can use for example the official Vault Helm chart provided by HashiCorp: https://www.hashicorp.com/blog/announcing-the-vault-helm-chart/
HashiCorp did not recommend in the past to run Vault itself in the Kubernetes cluster and not in Docker, but it seems this changed with the new announcement now.
For me I've never tried to run HashiCorp Vault in the cluster, because I also try to perform the authentication to Kubernetes via Vaults PKI secret engine. And if you then deploy Vault also in Kubernetes you'll run into a chicken egg problem (https://koudingspawn.de/secure-kubernetes-with-vault/ , https://koudingspawn.de/combine-vault-with-kubeadm/)
As persistence for HashiCorp Vault I typically use File-based for local workloads like DEV, but for everything else I use consul. This is also the recommended way and if you are interested in enterprise version I've heard that this is also a requirement.
One of the key features of consul is, that it is very easy to backup and restore. Only one command is required and you have a backup and can store it in some save location like s3. Same for the restore process, so you can very easily build an automation around it.
If you are starting as a "new" user I would also recommend to have a look at the new internal Backend via the Raft protocol. This one is not production ready yet, but looks very promising. (https://www.vaultproject.io/docs/configuration/storage/raft.html)
Björn


Provide Grafana dashboard

I made a dashboard, but I'm not sure if it's a good idea to publish it in its current form.
The problem is that if you run complicated enough queries, you can actually bring down your Prometheus instance (which might or might not have happened 🙈).
The main query that's currently causing trouble is the one that tries to show the functions with the highest 99th percentile latencies:
topk(5, histogram_quantile(0.99, sum by (le, function, module) (rate(function_calls_duration_bucket{function=~"${function}", function!~"${exclude_function}", module=~"${module}", module!~"${exclude_module}"}[5m]))))

A couple of potential options include:

Don't show latency in the dashboard
Require that you first load certain recording rules into Prometheus before the dashboard will work (so it can pre-calculate the results of this query and save those results as a dedicated time series)
Only show the latency for functions you've added SLOs to (in which case we might want to rename that parameter from alerts to something that indicates its broader scope)
... maybe there's something else?

@hatchan @IvanMerrill or anyone else have ideas?

Ouch, that query's a doozy. I've just got one remark, and one kernel of idea. Firstly, I've found that higher quantiles can be very noisy at lower rates, as there's simply not a lot of data to work with in the chosen time window.
One idea that I have (and I still need to investigate if that has any real merit at all) is to make use of the cumulative nature of the buckets and just look at the ratio of the "Le+Inf" bucket (aka "count") and some lower 'threshold' bucket, and calculate the ratio. If that ratio is just a solid 1.0 you know there aren't any outliers to worry about, but the further it deviates from that value, the more unwanted values there are in that metric. The advantage is that you now only have to query 2 time series per metric, instead of the, say, 20 for the entire bucket set. The disadvantages are that (1) you need to know the exact threshold bucket in the set, and (2)  that the calculation leaves you with a single number that has no obvious meaning until you learn to interpret it.

Thanks for the input @grainednoise!
That's an interesting idea for looking at the ratio of a lower-threshold bucket to the total. That's a little similar to how we ended up making the latency SLO work (look at the section "Attempt 3: Label renaming and set intersections" in An adventure with SLOs, generic Prometheus alerting rules, and complex PromQL queries). We use a label called objective.latency_threshold and compare the ratio of events where the value of that label equals the le to the total.
My current draft of the dashboard leaves out the chart showing the latencies for all functions. Instead, it has a row for each SLO and shows the latencies of functions that are included in an SLO. This reduces the number we're looking at and means that the user has expressed some particular interest in those functions.


Revert "Update data"

Reverts ParkingReformNetwork/mandates-map#171. Bad data.

I am going to close this because it doesn't actually help us at all to revert this pull.


Added Langfuse to developer tool list

Added Langfuse open-source LLM tracing to list
GH: https://github.com/langfuse/langfuse

Close for Merged in Last PR


Mister

Launching ShowKeyPlus gave me Product Key:  QKMNQ-9T2.....
Unfortunately, I got an error prompt that the number 2 is not acceptable in the product code.
Please note, I purchased the machine at the US Army West Point Post Exchange, at a Black Friday Door Buster  sale.   It was taken from a stack of all the same model.  So I don't believe it was a fraudulent machine.
Any help you can give me will be greatly appreciated.
Thank you,
Nick M.
<EMAIL_ADDRESS>

Hi Nick
Thanx for your feedback.
The number 2 is perfectly acceptable - eg. my system has Microsoft's default key for Pro for Workstations with a 2 as part of that key.

How did you get the message that it's not a valid key?
Cheers

Hi - While inputting the key, trying to get Windows 10 Home installed, it stopped at the numeral 2, saying that it was not OK.  The key probably works fine for Pro, but my original version was Home. For background info: The computer I bought at the US Army Exchange Service, (I am a retired veteran and have Exchange privileges) came with Windows 10 Home installed.  I was infected by a virus.  I took the computer to Compucity in Newburgh, NY.  Their solution; copy the data, wipe the computer, and re-install a legit copy, but of Pro, which is the only copy of 10 they had.
Except for a nag, "Activate Windows ,,,," in faint background, it worked fine, and even  accepted updates. The owner of the store was approached by a headhunter rep from a large Drug firm in Fishkill, NY, who made him an employment offer he couldn't refuse.  No recourse there. I  would like to get back to the original Windows 10, which two computer wizards claim is till in my computer.  Their advice, buy a new license.  At 85 years old, existing on a 1999 pension and my life savings, I would rather live with the nag. And therein is my problem. Thank you for taking the time from your busy day to help, but apparently, there is no help for this problem.  That's too bad, since the rumor is that Windows 11 will have a similar format to Windows 7, which many think is superior to the Windows 10 pictures format.  However, unless the US Army Exchange Service comes up with another Black Friday computer sale, I'll forgo the overpriced MS Windows 10program.  Kindly note, the HP Laptop computer cost me $150.00 with the Win 10 program.  Check out the price if a Win 10 program - obscene. Best regards,Nick M.
---------- Original Message ----------
From: Craig - Superfly<EMAIL_ADDRESS>To: Superfly-Inc/ShowKeyPlus<EMAIL_ADDRESS>Cc: nicholas1935<EMAIL_ADDRESS> Author<EMAIL_ADDRESS>Subject: Re: [Superfly-Inc/ShowKeyPlus] Mister (#25)
Date: Sat, 22 Feb 2020 17:32:51 -0800
Hi Nick
Thanx for your feedback.
The number 2 is perfectly acceptable - eg. my system has Microsoft's default key for Pro for Workstations with a 2 as part of that key.
How did you get the message that it's not a valid key?
Cheers
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Hello again
You may want to explore your problem in more depth at the ShowKeyPlus discussion forum.
https://www.tenforums.com/software-apps/2577-showkeyplus.html
There may be others that have encountered a similar problem, or we can explore in more depth yours in particular.
Regards


Docker build cache on some machines is getting large (quickly) and exhausting space

Recent issues:

https://github.com/adoptium/infrastructure/issues/2984
https://github.com/adoptium/infrastructure/issues/2985
https://github.com/adoptium/infrastructure/issues/3003

Between the last two issues there was about 2 weeks where the cache on the machine got up to 86Gb after being cleared out. We should look at understanding what is making it increase so much, whether it is expected or a problem, and the most appropriate way to mitigate it (cache's are generally helpful, but would we see use from a regular docker builder prune with a size limit on it e.g. docker builder prune -f --keep-storage<PHONE_NUMBER>0 to keep a couple of Gb.
@smlambert your input would be appreciated as this is on test systems - has something happened recently that has dramatically increased the amount of cache space that docker would be using (Perhaps the dev suites)? We've so far only ran into the issue on x64 and s390x but those may well just have been the first ones we've hit.

I do not think this is a new problem per se, as there is a history of issues where we hit this, some of that history summarized somewhat by this one: https://github.com/adoptium/infrastructure/issues/2510).
In terms of new dev level tests, none are currently being run regularly.
dev.openjdk includes openjdk container tests, though those should not be dispatched to static docker hosts (as they required sw.tool.docker label which should not be on any of the static docker hosts).  And in any case, we disabled those in January, presumably temporarily for the release, since currently release test list and weekly test lists are entwined (use the same config file, which needs to be changed to allow us to run dev level testing on weekends but not worry about it getting run during releases).
dev.system tests which include jcstress tests but are also currently not running regularly, though I would like to enable them for weekend runs.

I've run docker builder prune -f --keep-storage<PHONE_NUMBER>0 to reduce the size to 10Gb (Shows as 9.834GB) on all dockerhost systems with a view to checking in a week to see how they're all doing to evaluate how much space this is using. Here's a snapshot as of today:
[sxa@fedora ~]$ for A in ampere1 ampere2 xa xi <IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS>; do echo $A; ssh root@$A docker system df; done
ampere1
TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          32        15        15.9GB    15.81GB (99%)
Containers      19        4         22.22GB   19.12GB (86%)
Local Volumes   0         0         0B        0B
Build Cache     0         0         0B        0B
ampere2
TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          112       10        81.94GB   81.13GB (99%)
Containers      13        13        39.57GB   0B (0%)
Local Volumes   13        0         2.914GB   2.914GB (100%)
Build Cache     180       0         9.834GB   9.834GB
xa
TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          71        9         47.32GB   47.32GB (100%)
Containers      10        10        30.03GB   0B (0%)
Local Volumes   0         0         0B        0B
Build Cache     74        0         0B        0B
xi
TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          61        9         44.28GB   44.28GB (100%)
Containers      9         9         21.06GB   0B (0%)
Local Volumes   8         0         1.542GB   1.542GB (100%)
Build Cache     227       0         9.788GB   9.788GB
<IP_ADDRESS>
TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          27        4         16.64GB   13.51GB (81%)
Containers      4         3         1.811GB   0B (0%)
Local Volumes   0         0         0B        0B
Build Cache     115       0         7.138GB   7.138GB
<IP_ADDRESS>
TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          14        2         12.58GB   10.21GB (81%)
Containers      6         6         4.954GB   0B (0%)
Local Volumes   0         0         0B        0B
Build Cache     17        0         461.5MB   461.5MB
<IP_ADDRESS>
TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          12        9         4.141GB   500.8MB (12%)
Containers      12        3         2.688GB   361.5MB (13%)
Local Volumes   0         0         0B        0B
Build Cache     0         0         0B        0B
[sxa@fedora ~]$

I'm running a check at 5 minute intervals on one of the machines that's currently running the docker_build_multiarch job (ampere2 from the above list)

Today's output (compare with five days ago):
ampere1
TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          45        3         37.25GB   37.25GB (100%)
Containers      4         4         3.14GB    0B (0%)
Local Volumes   0         0         0B        0B
Build Cache     939       0         159.3GB   159.3GB
ampere2
TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          110       10        81.94GB   81.13GB (99%)
Containers      13        13        39.9GB    0B (0%)
Local Volumes   13        0         2.914GB   2.914GB (100%)
Build Cache     1327      0         209.8GB   209.8GB
xa
TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          71        9         47.55GB   47.55GB (100%)
Containers      10        10        14.49GB   0B (0%)
Local Volumes   0         0         0B        0B
Build Cache     4498      0         487GB     487GB
xi
TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          59        9         34.13GB   34.13GB (100%)
Containers      9         9         7.378GB   0B (0%)
Local Volumes   8         0         9.129GB   9.129GB (100%)
Build Cache     3895      0         436.8GB   436.8GB
<IP_ADDRESS>
TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          26        4         16.04GB   13.12GB (81%)
Containers      4         4         2.5GB     0B (0%)
Local Volumes   0         0         0B        0B
Build Cache     115       0         7.138GB   7.138GB
<IP_ADDRESS>
TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          14        2         12.58GB   10.21GB (81%)
Containers      6         6         4.73GB    0B (0%)
Local Volumes   0         0         0B        0B
Build Cache     17        0         461.5MB   461.5MB
<IP_ADDRESS>
TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          12        9         4.141GB   500.8MB (12%)
Containers      12        3         2.463GB   361.5MB (14%)
Local Volumes   0         0         0B        0B
Build Cache     0         0         0B        0B

TL;DR up to 200Gb extra have been consumed on some of the machines.
I've adjusted the repository for https://ci.adoptium.net/job/openjdk_build_docker_multiarch/ from AdoptOpenJDK/openjdk-docker to sxa/openjdk-docker purge-cache branch and if that keeps things happy for the next few days then we can merge that into the AdoptOpenJDK repo.

It's now behaving, other than on arm32 where for some odd reason if the number is larger than something just over 2.1GB you get e.g. Error response from daemon: keep-storage is in bytes and expects an integer, got<PHONE_NUMBER>: strconv.Atoi: parsing "2200000000": value out of range
Fixed with an armv7l specific check in the code (I could have just skipped it since the arm32 machines aren't having a problem with this), but the output on the other machines looks good:
[sxa@fedora ~]$ for A in ampere1 ampere2 xa xi <IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS>; do echo $A; ssh root@$A docker system df; done
ampere1
TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          43        3         28.34GB   28.34GB (100%)
Containers      4         4         2.957GB   0B (0%)
Local Volumes   0         0         0B        0B
Build Cache     131       0         9.672GB   9.672GB
ampere2
TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          111       10        82.91GB   82.1GB (99%)
Containers      13        13        39.99GB   0B (0%)
Local Volumes   13        0         2.914GB   2.914GB (100%)
Build Cache     210       4         9.455GB   9.455GB
xa
TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          70        9         35.54GB   35.54GB (100%)
Containers      11        11        6.581GB   0B (0%)
Local Volumes   0         0         0B        0B
Build Cache     220       5         10.09GB   9.868GB
xi
TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          61        10        44.48GB   44.33GB (99%)
Containers      10        9         2.57GB    385.1MB (14%)
Local Volumes   8         0         9.129GB   9.129GB (100%)
Build Cache     258       0         9.712GB   9.712GB
<IP_ADDRESS>
TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          28        4         17.24GB   14.32GB (83%)
Containers      4         4         10.98GB   0B (0%)
Local Volumes   0         0         0B        0B
Build Cache     115       0         7.138GB   7.138GB
<IP_ADDRESS>
TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          14        3         4.711GB   2.345GB (49%)
Containers      7         7         5.134GB   0B (0%)
Local Volumes   0         0         0B        0B
Build Cache     17        0         461.5MB   461.5MB
<IP_ADDRESS>
TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          13        3         3.862GB   1.137GB (29%)
Containers      3         3         2.105GB   0B (0%)
Local Volumes   0         0         0B        0B
Build Cache     0         0         0B        0B
[sxa@fedora ~]$


bug fix: "oldLogIdx == newLogIdx" always be false,beacase they both a…

What is the purpose of the change
In some extreme cases，linkis cli Print log stalled，until timeout。
bug fix: "oldLogIdx == newLogIdx" always be false,beacase they both are Object.
Brief change log
replace "oldLogIdx == newLogIdx" with oldLogIdx.equals(newLogIdx)
Verifying this change
Theoretically fine, without anyverification
Does this pull request potentially affect one of the following parts:
Dependencies (does it add or upgrade a dependency): no
Anything that affects deployment: no
The MGS(Microservice Governance Services), i.e., Spring Cloud Gateway, OpenFeign, Eureka.: no
Documentation
Does this pull request introduce a new feature? no
If yes, how is the feature documented? not applicable

Thanks for the fix!


CrossInAppBilling.Current.PurchaseAsync return exception "Invalid products found when querying product list"

Bug Information
Version Number of Plugin: 7.1.0
Device Tested On: iphone 14, ios 17.3.1 app via testflight
Steps to reproduce the Behavior

I created net maui blazor hybrid app
Created In-App Purchases consumable and Non-Renewing Subscriptions. Stored product ids.
Added method in the code to purchase an item for In-App Purchase (test01) and Non-Renewing Subscription (test02)
Published an app to app store
In test01 and test02 I always getting error InAppBillingPurchaseException and do not sure why. Product ids exists in app store. I was able publish app with correct provision profile. So not sure what is missing.

Expected Behavior
Method should allow to buy a product.
Actual Behavior
Error
Code snippet
//test01
try{
var productIdSub = "gfl_0299_1w_01";
var purchase = await CrossInAppBilling.Current.PurchaseAsync(productIdSub, ItemType.InAppPurchaseConsumable);
}
catch (InAppBillingPurchaseException purchaseEx)
{
}
//test02
try{
var productIdSub = "gfl_0299_1w_02";
var purchase = await CrossInAppBilling.Current.PurchaseAsync(productIdSub, ItemType.Subscription);
}
catch (InAppBillingPurchaseException purchaseEx)
{
}

ProductID on iOS uses this value.

I think I am using product id from proper place

The reason is that “Status = Ready To Submit”. It has not yet been approved by Apple.

But I am doing test on TestFlight. For that purpose I think I do not need to submit. Am I correct?

But I am doing test on TestFlight. For that purpose I think I do not need to submit. Am I correct?

It has nothing to do with the status of your app's TestFlight and subscription information.
Even if it's TestFlight, your subscription information must be marked as "Approved."

If you tell me your email address, I will send you a video of my settings screen.
my email<EMAIL_ADDRESS>

Are you saying to test app via TestFlight my subscription must be approved? Is there a way to test payments with sandbox account  when status is not approved?

Are you saying to test app via TestFlight my subscription must be approved? Is there a way to test payments with sandbox account when status is not approved?

Your subscription settings must be approved by Apple.

I also have this issue, but I was told by apple team that first you must test them and then submit app for aproval

you must sign the Paid Applications Agreement.
go to AppStoreConnect -> Businees

I have the same issue. Seems plugin is not able to pick up an in-app purchase until its approved by Apple. But in order to Approve I should initiate a new distribution which is always failing their review due to non functioning payment page

I'm also observing the same. I only have created one in-app purchase for testing purposes.


Support setting custom alignment heads for dtw

This PR adds the ability to configure a custom attention heads array to enable DTW time alignment when using non-standard Whisper models which don't have a named preset configured in WhisperAlignmentHeadsPreset enumeration. The standard models have these presets included in whisper.cpp but for any other model you must specify the model-specific values.
For example, for the model "Distil Large V3", you need to use use:
        RuntimeOptions.Instance.SetUseDtwTimeStamps(true);
        RuntimeOptions.Instance.SetHeadsPreset(WhisperAlignmentHeadsPreset.Custom);
        RuntimeOptions.Instance.SetAlignmentHeads(
            Enumerable.Range(0, 20).Select(i => new WhisperAlignmentHead(1, i)).ToArray()
        );

This one seems simple (array where TextLayer is always 1, and Head is 0...19), but that isn't the case for every model. E.g. look at the presets in whisper.cpp for g_aheads_large_v2:
static const whisper_ahead g_aheads_large_v2[]  = { {10, 12}, {13, 17}, {16, 11}, {16, 12}, {16, 13}, {17, 15}, {17, 16}, {18, 4}, {18, 11}, {18, 19}, {19, 11}, {21, 2}, {21, 3}, {22, 3}, {22, 9}, {22, 12}, {23, 5}, {23, 7}, {23, 13}, {25, 5}, {26, 1}, {26, 12}, {27, 15} };

Hey @jettoblack ,
Thanks for the contribution!
I think it makes sense for now (it follows the same patter as the rest). However, we might change it in the future to not grow these RuntimeOptions with stuff that can be moved and initialized per factory.
RuntimeOptions will keep only the options that cannot be set twice (e.g. defaultRuntimeOrder, bypassLoading etc) related to Runtime loading and we'll create new Options that can be defined for each factory.


Upgrade Guide From V3 to V4

Hi,
My app is using V3.7.2 of Redux but I am not sure how to upgrade to V4.0.0 . is there any guide for upgrade from v3 to v4 ?

There aren't major breaking changes, other than with the TypeScript typings. Any changes are edge case behaviors that are locked down now.


i2c infinite loop when building with optimizations

When I build with optimizations  (1 or 2) enabled
[profile.dev]
opt-level = 1

Then i2c read operations can get into an infinite loop in the busy_wait macro.
Bus speed = =100khz.
// Wait until address was sent
busy_wait!(self.i2c, busy);

Here the intention is to wait until the peripheral is not busy anymore and then break out of the loop.
} else if isr.$flag().bit_is_set() {
    break;
}

However, the busy flag is 1 if busy and will be cleared when not busy anymore. So the check should actually check for bit_is_cleared().
But I guess that's not true for all $flags that can be passed in.
Because optimization is on, the code is faster, the bit is already cleared so it ends up in an infinite loop.

Just tested 9697aef and it is not fixed yet.
For now I need to add a 'timeout' to the busy_wait loops
 ($i2c:expr) => {
        let mut count = 0;
        loop {
            let isr = $i2c.isr.read();
            if isr.berr().bit_is_set() {
                $i2c.icr.write(|w| w.berrcf().set_bit());
                return Err(Error::BusError);
            } else if isr.arlo().bit_is_set() {
                $i2c.icr.write(|w| w.arlocf().set_bit());
                return Err(Error::ArbitrationLost);
            } else if isr.nackf().bit_is_set() {
                $i2c.icr.write(|w| w.nackcf().set_bit());
                return Err(Error::Nack);
            } else if isr.busy().bit_is_clear() {
                break;
            }
            count += 1;
            if count > 1000 {
                break;
            }
        }
    };

I'll try to look into it further soon

Yes, I have the same problem.
At some point stuff from L0 https://github.com/stm32-rs/stm32l0xx-hal/blob/master/src/i2c.rs should be merged.
G0 and L0 are quite similar. However G0 uses modern DMAMUX.

I was just getting ready to tackle this issue, so I did a git pull and turns out it is already fixed 😃
Thanks @andresv, I just tested it and it also works with optimizations on now


Refresh eegbci code and docstrings

This PR

fixes an error in the example (run 6 instead of run 4),
expands the user's home directory if a path is supplied,
and reflows some lines so that we can get rid of #noqa.

Looks straightforward, thanks @cbrnr !


Feat: Add documentation to generated props

Is it possible to document the properties in the generated .tailor file?
For example
@tailor
class _$BoxTheme {
  /// Some documentation foo bar
  static List<Color> backgroundColor = [
    Colors.red,
    Colors.blue,
  ];
}

should lead to
class BoxTheme extends ThemeExtension<BoxTheme> {
  const BoxTheme({
    required this.backgroundColor,
  });

  /// Some documentation foo bar
  final Color backgroundColor;

  /// ...
}

Hey, thanks for the feature proposal, we've worked on this issue some time ago and it is pending for the next release
https://github.com/Iteo/theme_tailor/pull/51
If you want to try it now it's available on the develop branch:
dev_dependencies:
  theme_tailor:
    git:
      url: https://github.com/Iteo/theme_tailor.git
      path: packages/theme_tailor
      ref: develop


Error Saving Model Due to Incorrect Relative Import

Reminder

[X] I have read the README and searched the existing issues.

System Info

llamafactory version: 0.9.2.dev0
Platform: Linux-5.15.0-1064-azure-x86_64-with-glibc2.31
Python version: 3.10.14
PyTorch version: 2.5.1+cu124 (GPU)
Transformers version: 4.46.1
Datasets version: 3.1.0
Accelerate version: 1.0.1
PEFT version: 0.12.0
TRL version: 0.9.6
GPU type: NVIDIA A100-SXM4-80GB
DeepSpeed version: 0.14.4
vLLM version: 0.6.4.post1

Reproduction
Similar issues are found here: #6210 #6399, but none of the solutions work.
command:
llamafactory-cli train phi3.yaml

phi3.yaml:
### model
model_name_or_path: microsoft/Phi-3-mini-4k-instruct

### method
stage: sft
do_train: true
finetuning_type: full

### ddp
ddp_timeout: 180000000
deepspeed: examples/deepspeed/ds_z3_config.json

### dataset
dataset: wildfeedback-gpt4o-sft
template: phi
cutoff_len: 4096
max_samples: 10
overwrite_cache: true
preprocessing_num_workers: 16
mask_history: true

### output
output_dir: phi-wildfeedback-gpt4o-sft
logging_steps: 10
save_steps: 50000
plot_loss: true
overwrite_output_dir: true

### train
per_device_train_batch_size: 2
gradient_accumulation_steps: 8
learning_rate: 5.0e-6
num_train_epochs: 1
lr_scheduler_type: cosine
warmup_ratio: 0.1
fp16: true

### eval
val_size: 0.005
per_device_eval_batch_size: 8
eval_strategy: steps
eval_steps: 40

# report
report_to: wandb
run_name: phi-wildfeedback-gpt4o-sft

After training, when saving the model, I got the following error. It seems that the relative path is not constructed correctly.
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:05<00:00,  5.71s/it][INFO|trainer.py:3801] 2024-12-20 23:25:44,658 >> Saving model checkpoint to phi-wildfeedback-gpt4o-sft/checkpoint-1
Traceback (most recent call last):
  File "/app/src/llamafactory/launcher.py", line 23, in <module>
    launch()
  File "/app/src/llamafactory/launcher.py", line 19, in launch
    run_exp()
  File "/app/src/llamafactory/train/tuner.py", line 50, in run_exp
    run_sft(model_args, data_args, training_args, finetuning_args, generating_args, callbacks)
  File "/app/src/llamafactory/train/sft/workflow.py", line 101, in run_sft
    train_result = trainer.train(resume_from_checkpoint=training_args.resume_from_checkpoint)
  File "/opt/conda/envs/ptca/lib/python3.10/site-packages/transformers/trainer.py", line 2122, in train
    return inner_training_loop(
  File "/opt/conda/envs/ptca/lib/python3.10/site-packages/transformers/trainer.py", line 2541, in _inner_training_loop
    self._maybe_log_save_evaluate(tr_loss, grad_norm, model, trial, epoch, ignore_keys_for_eval)
  File "/opt/conda/envs/ptca/lib/python3.10/site-packages/transformers/trainer.py", line 3000, in _maybe_log_save_evaluate
    self._save_checkpoint(model, trial, metrics=metrics)
  File "/opt/conda/envs/ptca/lib/python3.10/site-packages/transformers/trainer.py", line 3090, in _save_checkpoint
    self.save_model(output_dir, _internal_call=True)
  File "/opt/conda/envs/ptca/lib/python3.10/site-packages/transformers/trainer.py", line 3706, in save_model
    self._save(output_dir, state_dict=state_dict)
  File "/opt/conda/envs/ptca/lib/python3.10/site-packages/transformers/trainer.py", line 3823, in _save
    self.model.save_pretrained(
  File "/opt/conda/envs/ptca/lib/python3.10/site-packages/transformers/modeling_utils.py", line 2809, in save_pretrained
    custom_object_save(self, save_directory, config=self.config)
  File "/opt/conda/envs/ptca/lib/python3.10/site-packages/transformers/dynamic_module_utils.py", line 623, in custom_object_save
    for needed_file in get_relative_import_files(object_file):
  File "/opt/conda/envs/ptca/lib/python3.10/site-packages/transformers/dynamic_module_utils.py", line 128, in get_relative_import_files
    new_imports.extend(get_relative_imports(f))
  File "/opt/conda/envs/ptca/lib/python3.10/site-packages/transformers/dynamic_module_utils.py", line 97, in get_relative_imports
    with open(module_file, "r", encoding="utf-8") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/opt/conda/envs/ptca/lib/python3.10/site-packages/transformers/models/phi3/..modeling_attn_mask_utils.py'

Expected behavior
I tried using absolute paths for both the model_name_or_path and output_dir, but it did not work. I can use the same script to train the LLaMA and Qwen models (also using relative paths) without any problems. The issue seems to be that Phi-3 uses a custom Python file for its model configuration (e.g., configuration_phi3.py), which triggers the get_relative_imports function in the Transformers library, resulting this error.
Do you have any other suggestions for this issue? Thanks!
Others
I used the same yaml config to train llama and qwen but received no error. I can also save the model using the following code, which supposedly uses the same save_pretrained method.
from transformers import AutoModel, AutoTokenizer

# Path to your model
model_path = "models/Phi-3-mini-4k-instruct"  # Update with your path
output_path = "models/phi-wildfeedback-gpt4o-sft"  # Directory to save the model

try:
    # Load the model and tokenizer
    model = AutoModel.from_pretrained(model_path)
    tokenizer = AutoTokenizer.from_pretrained(model_path)

    print("Model and tokenizer loaded successfully.")

    # Save the model and tokenizer
    model.save_pretrained(output_path)
    tokenizer.save_pretrained(output_path)

    print(f"Model and tokenizer saved successfully to {output_path}.")
except Exception as e:
    print(f"An error occurred: {e}")

Could anyone please help? Thank you!

My temporary solution is to comment out these lines in dynamic_module_utils.py


Won't open JSON files on Mac. 50MB file caused app's memory usage to baloon to >7GB before becoming non-responsive

Lapce Version
0.2.6
System information
MacOS 13.2 (22D49)
M1 16GB Ram
Describe the bug
Because there's no lapce path/to/project command line tool, I found the file in Finder, right clicked it, and found the Lapce app, but it was greyed out. I changed the dropdown to "All Applications" to enable me to open the file with Lapce, but that gives the following error message:
"The document XYZ could not be opened. Lapce cannot open files in the "JSON" format."
I instead tried to open Lapce and open the file via File -> Open. This did seem to at least work intially, as Lapce seemed to try to load the file, but after about 30 seconds of a spinning rainbow wheel, I opened Activity Monitor, and Lapce was at about 5GB and climbing. It got to about 7-8GB before Activity Monitor said it was not responding and I killed it. I tried anther time, and had the same issue.
Additional information
For a comparison, TextEdit also used a fair amount of memory to open it, about 2GB, and while it did hang on opening the file, it did eventually become responsive again. Sublime Text 4 took about 15-20 seconds to open it, and memory usage was right around 500-600MB.
The file size:
51,619,217 bytes (51.6 MB on disk)
Nothing about it that would make me think it's different or more difficult to open than any other JSON file of the same size.
https://gist.github.com/pejrich/7217d0cb0d0ca1892507ff01d6b8c60c

There is a lapce command line tool. Lapce is probably not in your $PATH. On MacOS, even if you have /Applications in $PATH, it won't detect executables that are nested in .app files. Instead, you could specifically add /Applications/Lapce.app/Contents/MacOS to your path. If you do this, you should be able to use the command line tool.

I'm having this issue in Windows. It doesn't have to be a large file. 1MB of unformatted JSON (everything in a sigle line) will make Lapce freeze 😢


ASGI HTTP protocol 2.4: send() may raise OSError

In the ASGI HTTP & WebSocket protocol version 2.4, calling send() on a closed connection should raise an error.
See also Disconnected Client - send exception:

If send() is called on a closed connection the server should raise a server-specific subclass of IOError. This is not guaranteed, however, especially on older ASGI server implementations (it was introduced in spec version 2.4).
Applications may catch this exception and do cleanup work before re-raising it or returning with no exception.
Servers must be prepared to catch this exception if they raised it and should not log it as an error in their server logs.

Do we need to adjust our code? Or do we just bubble this up to the app server?
Probably it is even more important to refine this for WebSocket?
See also:

#1483
#1808

I agree that the primary impact is likely the websocket, since in the other cases the sent is confined to the app class, allowing the orerror to be propagated without much issues to the api server.
For websocket we likely need to close it if send raises an os error

I don't think we need to close the websocket at hand, because closing is performed via send() by sending an appropriate ASGI event (which is moot since it is exactly what raises OSError).
However, we'll need to make sure that we properly reraise this exception as WebSocketDisconnected. (Probably we could even use the raise WebSocketDisconnected(...) from io_ex? :thinking:)

my closing I meant cleaning up the internal state, like the _BufferedReceiver. regarding the re-raise, seems like an appropriate behaviour

The last paragraph of Lost Connections also needs to be reworded:

Note also that some ASGI server implementations do not strictly follow the ASGI spec in this regard, and in fact will raise an error when the app attempts to send a message after the client disconnects. If testing reveals this to be the case for your ASGI server of choice, Falcon’s own receive queue can be safely disabled.

(emphasis mine)
:arrow_right: Conversely, these implementations do actually follow the spec version 2.4.

I split the HTTP part to another issue (#2323), and address only the WebSocket part for 4.0.


Joseph/map to buttom

#76 Put the employee map into the buttom of the page

Make sure you use a descriptive title when merging this PR so the commit message is clean.


Update zh_TW and zh_CN

Translation up to date.

Codecov Report

Merging #178 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #178   +/-   ##
=======================================
  Coverage   87.09%   87.09%
=======================================
  Files           5        5
  Lines         186      186
=======================================
  Hits          162      162
  Misses         18       18
  Partials        6        6

Continue to review full report at Codecov.

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


Add functions for a heatmap style charting system

Various data like this https://prop.kc2g.com/fof2/ lend themselves to being displayed as a heatmap.
Next goal for the roadmap is to implement a heatmap function in Badger2040W
For a matrix of data x,y provide values of z and draw heat as a pen colour from 0-15.
Needs some binning of data when continuous and with only 15 colours to choose from that needs to be scaled appropriately.
First version maybe just stick to deciles.

Added basic functions for some charts.
Need to make this a bit more coherent and to set everything up to run as generic functions.
It’s a start


Make HeadingBlockParser configurable

Hi,
First of all this is a great library, I've been using it a lot for my blog and other projects and absolutely love it. I've got a use case where I would like to use Markdig to parse user entered markdown into HTML, but only a limited subset. One of the things which I would like to limit is the header tags (e.g. user should only be able to create h3, h4, h5, and h6, but not h1 and h2).
I would like to propose the following change in the HeadingBlockParser:
Add an optional parameter to the constructor (this is pseudo code):
private readonly HashSet<int> _allowedHeaders;

public HeadingBlockParser(HashSet<int> allowedHeaders = null)
{
    OpeningCharacters = new[] {'#'};
    _allowedHeaders = allowedHeaders != null
        ? allowedHeaders // Probably validate that it only contains valid values (1-6) here
        : new HashSet<int>() { 1, 2, 3, 4, 5, 6 };
}

And then change this if statement:
Before
if (leadingCount > 0 && leadingCount <= MaxLeadingCount && (c.IsSpaceOrTab() || c == '\0'))

After
if (_allowedHeaders.Contains(leadingCount) && (c.IsSpaceOrTab() || c == '\0'))

Then I could configure the HeaderBlockParser to limit the allowed headers via the constructor when setting up BlockParsers.
What do you think?

I would like to give a +1 on @dustinmoris 's suggestion.
For use cases like Blogs or Support/Documentation pages, where multiple contributors write content intended for public facing pages, it's important from an SEO point of view, to only have one H1 tag, which describes the title of the document.
This H1 would typically be rendered outside the markdown by the wrapping page, and defined in a separate input field on the editing page.
And yes, I know you could "just tell your users" to only use one H1 tag, and always place it in the top of the page - but that defeats the purpose of using something like Markdown, where you would want to restrict the editing/design options in order to create a more uniform layout and result markup.
I think it would make great sense to make an option that restricts the use of certain tags.


feat: port Analysis.Calculus.ContDiffDef

[ ] depends on: #4114
[ ] depends on: #4241
[ ] depends on: #4239
[ ] depends on: #4221

This PR/issue depends on:

leanprover-community/mathlib4#4114
leanprover-community/mathlib4#4241
leanprover-community/mathlib4#4239
leanprover-community/mathlib4#4221
By Dependent Issues (🤖). Happy coding!

bors merge


MRP collect data TestScript

This doesn't yet have any test patients since we're still figuring that out, but should be otherwise reviewable/testable.
Run with:
brake crucible:execute[<base stu3 url>,stu3,mrp-collect-data]

Latest update rebases to incorporate the MRP evaluate-measure TestScript. I believe the issues you pointed out are fixed, so ready for re-review @mgramigna


Fix bug where test fails due to date error

There's a mock that expects exactly 4 indices however this test breaks during UTC [0:1) hours because during that time window we generate 5 indices. Mocking time.Now to always use a specific date for tests.

Coverage remained the same at 100.0% when pulling 52d8bb7d68e59df150ffb941a62f7830d029f201 on fix_date_bug into 43a18f4e73d97d0800f68e5b32001ad2702e06d9 on master.

Resolved in #301


Merge remote kernel finders.

Merge Universal Remote Kerner Finder logic with legacy remote kernel finder.

[x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
[x] Title summarizes what is changing.
[ ] Has a news entry file (remember to thank yourself!).
[ ] Appropriate comments and documentation strings in the code.
[ ] Has sufficient logging.
[ ] Has telemetry for feature-requests.
[ ] Unit tests & system/integration tests are added/updated.
[ ] Test plan is updated as appropriate.
[ ] package-lock.json has been regenerated by running npm install (if dependencies have changed).

Codecov Report

Merging #11879 (2b3f5d5) into main (4121f5a) will increase coverage by 0%.
The diff coverage is 70%.

:exclamation: Current head 2b3f5d5 differs from pull request most recent head b00aac5. Consider uploading reports for the commit b00aac5 to get more accurate results

@@           Coverage Diff           @@
##            main   #11879    +/-   ##
=======================================
  Coverage     62%      63%
=======================================
  Files        491      490     -1
  Lines      34729    34589   -140
  Branches    5647     5629    -18
=======================================
+ Hits       21872    21877     +5
+ Misses     10756    10610   -146
- Partials    2101     2102     +1

Impacted Files
Coverage Δ

src/kernels/jupyter/launcher/serverUriStorage.ts
61% <0%> (-1%)
:arrow_down:

src/kernels/jupyter/types.ts
100% <ø> (ø)

...er/finder/universalRemoteKernelFinderController.ts
55% <68%> (+32%)
:arrow_up:

...nels/jupyter/finder/universalRemoteKernelFinder.ts
86% <100%> (+74%)
:arrow_up:

src/kernels/jupyter/serviceRegistry.node.ts
100% <100%> (+2%)
:arrow_up:

src/kernels/variables/pythonVariableRequester.ts
55% <0%> (-4%)
:arrow_down:

...lPythonAndRelatedNonPythonKernelSpecFinder.node.ts
72% <0%> (-3%)
:arrow_down:

src/kernels/raw/launcher/kernelProcess.node.ts
72% <0%> (-2%)
:arrow_down:

.../notebooks/controllers/vscodeNotebookController.ts
80% <0%> (-1%)
:arrow_down:

src/platform/api/pythonApi.ts
68% <0%> (-1%)
:arrow_down:

... and 9 more


Does this train only for one epoch.

❓ Questions and Help
I went through the code. Does the code support only training for one epoch? Meaning in the defaults.py file MAX_ITER=40000 which is less than one epoch for coco dataset as it has more than 250k annotated images. I could, of course, change the max_iter value to something else for multiple epochs. But just wanted to check if I am understanding this correctly.

Thanks, I think it would be better if we refactor with config file having a number of epochs rather than the number of iterations since it is more natural to think in terms of a number of epochs. Let me know what do you think i can help with refactoring if you want.

To follow up on this. What is the recommended way to train on multiple epochs on your own dataset (Mine has ~44k images)?

Wrap do_train in a loop and iterate number of epoch times?
Modify the trainer.py accordingly?

@Nacho114 I'd just change the number of iterations to reflect a number of epochs that you want to go through.
For example, if you have 44k images and with a global batch size of bs, here is how many iterations I'd have for num_epochs epochs
one_epoch = 44000 / bs
max_iter = one_epoch * num_epochs

Some follow up questions:

Here bs refers to SOLVER.IMS_PER_BATCH? Or to the batch_size argument for the dataloader? (This part was not very clear to me when going over the code/doc).

I tried to increase the MAX_ITER value in the cfg, but that did not seem to increase the number of iterations. Looking at do_train it seems that it will simply go over the whole dataset once (starting from start_iter). (I feel like I am either looking at the wrong place, or seeing something wrong here, since I do not see where max_iter would allow to go over the dataset more than once)

1 - bs is global batch size, and thus SOLVER.IMS_PER_BATCH
2 - we have a custom batch_sampler that iterates over the data as many times as we specify, see this file for more information

and thus ```SOLVER.IMS_PER_BATCH```, and thus?
I see, I'll check out the batch_sample, that was the missing link.

sorry, I didn't finish my sentence. yes, SOLVER.IMS_PER_BATCH is what I meant as bs

does detectron2 supports Mixed precision training . ?

@jaideep11061982 checkout AMPTrainer class under the detectron2/engine/train_loop.py file


Kitura (-> KituraNet) is failing to build on 1st March dev swift release snapshot (i.e. swift 3.0).

MacBook-Pro:myFirstProject $ swift --version
Apple Swift version 3.0-dev (LLVM b361b0fc05, Clang 11493b0f62, Swift 24a0c3de75)

Compiling Swift Module 'KituraNet' (12 sources)
/Users/Apps/myFirstProject/Packages/Kitura-net-0.5.1/Sources/KituraNet/IncomingMessage.swift:173:9: error: 'guard' body may not fall through, consider using 'return' or 'break' to exit the scope }

Please let me know, if I am doing anything wrong here.
Thanks!

I see that problem. Working on it.
Thanks for reporting it. It seems

@swapsjadhav The problem is fixed. Please remove the Packages directory and do a  make to build the executable.

Validated.


Fixes #256. Fixed Enable Versioning and Encryption API calls failing …

The API calls for setting encryption and versioning require the Auth signature to be generated. For this the URL that is to be passed to authentication generator must have the query params as well. Made this change.

Fixes #282


type check before evaluating consts

const f = true in 3..2 will make it to the evaluation stage even though it should result in
Error: value type and array element type in range differ
   ╭─[test.pnt:7:22]
   │
 7 │     const f = true in [1, 2];
   │                        ┬
   │                        ╰── array element type mismatch; expecting `bool` type, found `int` type
───╯

...
A user can still write const f = true in 3..2; without an error occurring before this stage.
FWIW, if it is not a const then we type check the range. Ex.
predicate Test {
    var l = true in 1..2;
}

Error: value type and range type differ
    ╭─[test.pnt:18:21]
    │
 18 │     var l = true in 1..2;
    │                     ┬
    │                     ╰── range type mismatch; expecting `bool` type, found `int` type
────╯

Originally posted by @lethalgem in https://github.com/essential-contributions/pint/pull/911#discussion_r1790795496

WTF?  Are we not type checking const initialisers?

Haha yes we evaluate constants before type checking exprs.


[ADD] Extra visualization example

In preparation to move the refactor_development branch to be development, we were missing:

User details in the documentation
Examples with visualization

This PR aims to fix this.

Thanks a lot for the suggestions, I have committed them!

Actually could you also change the version here

Really nice example :)


Adding jest testing

This PR adds jest testing to the code base and it adds one Test that has full test coverage. The one test covers all of CoursesIndex.jsx. CoursesIndex.jsx was also changed from the old react state style of coding to the new hooks style. This was to start updating the code base to match the code bases from other courses (CS 156) and make it easier to write tests.
Note: The tests all pass but some of them still raise the warning below and this should be fixed in a later PR. The error comes from the UseEffects call. A possible solution to this warning would be to use useQuery to make api requests.
console.error
    Warning: An update to CoursesIndex inside a test was not wrapped in act(...).

    When testing, code that causes React state updates should be wrapped into act(...):

    act(() => {
      /* fire events that update state */
    });
    /* assert on the output */

    This ensures that you're testing the behavior the user would see in the browser. Learn more at https://fb.me/react-wrap-tests-with-act
        in CoursesIndex
        in Router (created by MemoryRouter)
        in MemoryRouter
        in QueryClientProvider

      87 |      const getCourses = async () => {
      88 |              axios.get(coursesRoute).then(response => {
    > 89 |                      setCourses(response.data);
         |                      ^
      90 |              });
      91 |      }
      92 |

      at printWarning (node_modules/react-dom/cjs/react-dom.development.js:88:30)
      at error (node_modules/react-dom/cjs/react-dom.development.js:60:5)
      at warnIfNotCurrentlyActingUpdatesInDEV (node_modules/react-dom/cjs/react-dom.development.js:23284:7)
      at setCourses (node_modules/react-dom/cjs/react-dom.development.js:15656:9)
      at app/javascript/components/Courses/CoursesIndex.jsx:89:4

We may want to add github workflow for running frontend tests and coverage now


x/tools/gopls: crash during internal/imports.scanDirForPackage (crash)

gopls version: v0.15.3/go1.21.6
gopls flags:
update flags: proxy
extension version: 0.41.4
environment: Visual Studio Code win32
initialization error: undefined
issue timestamp: Thu, 02 May 2024 17:33:19 GMT
restart history:
Thu, 02 May 2024 17:30:10 GMT: activation (enabled: true)
ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.
Describe what you observed.

panic: runtime error: slice bounds out of range [45:44]

goroutine 7611 [running]:
golang.org/x/tools/internal/imports.(*ModuleResolver).scanDirForPackage(0xc001898420, {{0xc004182665%3F, 0x81c8a92bb60e9ba5%3F}, 0x8%3F}, {0xc008108db0, 0x2c})
	  mod.go:727  0x705
golang.org/x/tools/internal/imports.(*ModuleResolver).scan.func3({{0xc004182665%3F, 0xdc5e20%3F}, 0xc0067f8f90%3F}, {0xc008108db0%3F, 0x17d12a8%3F})
	  mod.go:601  0x50
golang.org/x/tools/internal/gopathwalk.(*walker).walk(0xc0067b7830, {0xc0071f8100, 0x37}, 0x0, {0x1200af8, 0xc0071f0380})
	  walk.go:268  0x3d7
golang.org/x/tools/internal/gopathwalk.(*walker).walk(0xc0067b7830, {0xc004182665, 0x2c}, 0x0, {0x1200b30, 0xc0067f8f70})
	  walk.go:334  0x87b
golang.org/x/tools/internal/gopathwalk.walkDir({{0xc004182665%3F, 0xc0045a5f18%3F}, 0xc0045a5f18%3F}, 0xc0067f8f40, 0xc0067f8f30, {0x0%3F, 0x40%3F, 0x4%3F})
	  walk.go:120  0x366
golang.org/x/tools/internal/gopathwalk.WalkSkip(...)
	  walk.go:77
golang.org/x/tools/internal/imports.(*ModuleResolver).scan.func4()
	  mod.go:626  0x2db
created by golang.org/x/tools/internal/imports.(*ModuleResolver).scan in goroutine 4670
	  mod.go:610  0x465

gopls stats -anon
{
  "DirStats": {
    "Files": 2035,
    "TestdataFiles": 0,
    "GoFiles": 1626,
    "ModFiles": 2,
    "Dirs": 528
  },
  "GOARCH": "amd64",
  "GOOS": "windows",
  "GOPACKAGESDRIVER": "",
  "GOPLSCACHE": "",
  "GoVersion": "go1.21.6",
  "GoplsVersion": "v0.15.3",
  "InitialWorkspaceLoadDuration": "7.6558984s",
  "MemStats": {
    "HeapAlloc": 31132976,
    "HeapInUse": 41328640,
    "TotalAlloc": 79278536
  },
  "WorkspaceStats": {
    "Files": {
      "Total": 2207,
      "Largest": 1654271,
      "Errs": 0
    },
    "Views": [
      {
        "GoCommandVersion": "go1.21.6",
        "AllPackages": {
          "Packages": 417,
          "LargestPackage": 134,
          "CompiledGoFiles": 2217,
          "Modules": 49
        },
        "WorkspacePackages": {
          "Packages": 0,
          "LargestPackage": 0,
          "CompiledGoFiles": 0,
          "Modules": 0
        },
        "Diagnostics": 0
      }
    ]
  }
}

OPTIONAL: If you would like to share more information, you can attach your complete gopls logs.
NOTE: THESE MAY CONTAIN SENSITIVE INFORMATION ABOUT YOUR CODEBASE.
DO NOT SHARE LOGS IF YOU ARE WORKING IN A PRIVATE REPOSITORY.
<OPTIONAL: ATTACH LOGS HERE>

Thanks for the report @Sangwaniya
Transferring to the gopls issue tracker.

Looks like root.Path has the same length as dir, but is not a prefix of it.
func (r *ModuleResolver) scanDirForPackage(root gopathwalk.Root, dir string) directoryPackageInfo {
	subdir := ""
	if dir != root.Path {
		subdir = dir[len(root.Path)+len("/"):] // slice bounds out of range [45:44]
	}

Moving to the v0.17.0 milestone, since this seems to be affecting only one user (and in https://github.com/golang/vscode-go/issues/3401#issuecomment-2133246328, it appears that the cause may be related to a modified GOROOT).

hi @findleyr even after correcting the path and rebuilding gopls, still gopls is crashing
Here are the logs:
gopls version: v0.15.3/go1.21.6
gopls flags:
update flags: proxy
extension version: 0.41.4
environment: Visual Studio Code win32
initialization error: undefined
issue timestamp: Fri, 31 May 2024 05:05:47 GMT
restart history:
Fri, 31 May 2024 05:00:53 GMT: activation (enabled: true)
ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.
Describe what you observed.

panic: runtime error: slice bounds out of range [45:44]

goroutine 1561 [running]:
golang.org/x/tools/internal/imports.(*ModuleResolver).scanDirForPackage(0xc00099c210, {{0xc000580de5%3F, 0x336f25b8b5a7258c%3F}, 0x8%3F}, {0xc0007dd1d0, 0x2c})
	  mod.go:727  0x705
golang.org/x/tools/internal/imports.(*ModuleResolver).scan.func3({{0xc000580de5%3F, 0x1215e20%3F}, 0xc000737ca0%3F}, {0xc0007dd1d0%3F, 0x1c212a8%3F})
	  mod.go:601  0x50
golang.org/x/tools/internal/gopathwalk.(*walker).walk(0xc000770cf0, {0xc000617a00, 0x37}, 0x0, {0x1650af8, 0xc0001bac40})
	  walk.go:268  0x3d7
golang.org/x/tools/internal/gopathwalk.(*walker).walk(0xc000770cf0, {0xc000580de5, 0x2c}, 0x0, {0x1650b30, 0xc000737c60})
	  walk.go:334  0x87b
golang.org/x/tools/internal/gopathwalk.walkDir({{0xc000580de5%3F, 0xc000bdff18%3F}, 0xc000bdff18%3F}, 0xc000737bf0, 0xc000737be0, {0x0%3F, 0x0%3F, 0x4%3F})
	  walk.go:120  0x366
golang.org/x/tools/internal/gopathwalk.WalkSkip(...)
	  walk.go:77
golang.org/x/tools/internal/imports.(*ModuleResolver).scan.func4()
	  mod.go:626  0x2db
created by golang.org/x/tools/internal/imports.(*ModuleResolver).scan in goroutine 226
	  mod.go:610  0x465

gopls stats -anon
{
  "DirStats": {
    "Files": 2172,
    "TestdataFiles": 0,
    "GoFiles": 1626,
    "ModFiles": 2,
    "Dirs": 555
  },
  "GOARCH": "amd64",
  "GOOS": "windows",
  "GOPACKAGESDRIVER": "",
  "GOPLSCACHE": "",
  "GoVersion": "go1.21.6",
  "GoplsVersion": "v0.15.3",
  "InitialWorkspaceLoadDuration": "1.1454599s",
  "MemStats": {
    "HeapAlloc": 2580040,
    "HeapInUse": 5332992,
    "TotalAlloc": 36334560
  },
  "WorkspaceStats": {
    "Files": {
      "Total": 1,
      "Largest": 3429,
      "Errs": 0
    },
    "Views": [
      {
        "GoCommandVersion": "go1.21.6",
        "AllPackages": {
          "Packages": 0,
          "LargestPackage": 0,
          "CompiledGoFiles": 0,
          "Modules": 0
        },
        "WorkspacePackages": {
          "Packages": 0,
          "LargestPackage": 0,
          "CompiledGoFiles": 0,
          "Modules": 0
        },
        "Diagnostics": 0
      }
    ]
  }
}

OPTIONAL: If you would like to share more information, you can attach your complete gopls logs.
NOTE: THESE MAY CONTAIN SENSITIVE INFORMATION ABOUT YOUR CODEBASE.
DO NOT SHARE LOGS IF YOU ARE WORKING IN A PRIVATE REPOSITORY.
<OPTIONAL: ATTACH LOGS HERE>

https://github.com/golang/vscode-go/issues/3456 is another crash report. The report came from Linux. (@feldgendler by any chance, are you using a modified go, or GOROOT source?)

My Go comes from an official tarball, GOROOT is not set.

I tried adding debug prints just before the crash.
Just before the crashing subdir = dir[len(root.Path)+len("/"):] line,
root.Path is<EMAIL_ADDRESS>dir is /home/alexey/onboard/legio/_deps/go<EMAIL_ADDRESS>They just accidentally happen to have the same length.

Thanks @feldgendler, that's useful information that the paths are completely unrelated. That suggests the bug is elsewhere (in the code that expects scanned directories to be a subdirectory of the root...).
My first guess is that there's something related to symlinks, but we'll need to investigate.

In /home/alexey/onboard/legio/bin, I have a few symlinks like this: dlv -> ../tools/deps/trampoline.sh. None of the symlinks point to a directory, but some of them point ot a file under ../tools/deps, which might explain the /home/alexey/onboard/legio/bin/../tools/deps prefix. However, that deps directory doesn't contain any symlinks, just plain files.
Now, I'd very much like to help debugging this because this bug is making my IDE almost completely useless. I don't understand the idea behind the code here — what should it really do with symlinks? Does it need to resolve them at all?

Thanks, I will have more time to help investigate this later today.
In general, the philosophy around symlinks is:

Don't rewrite paths: treat symlink paths like any other path, but...
Keep track of symlinked directories to break cycles.

The code in question is very old, but has recently been modified to fix other bugs. It seems quite likely that some modification introduced a buggy handling of symlinks.

Thanks! Meanwhile, I tried replacing the crashing line with this:
	if s, ok := strings.CutPrefix(dir, root.Path+"/"); ok {
		subdir = s
	}

It seems to express the intent of the original line in a more robust way — assuming I understood it right.
This change seems to fix the issue for me — at least the scan now finishes without crashing.

@feldgendler yes, at a minimum we'll do something like that. Now that we have a someone reproducing the issue, it would be great if we could track down the root cause.
If you don't mind, later today or tomorrow I'm going to come up with a list of things for you to check, which will help us narrow this down. In the meantime, please use your patch to unblock your work.

Sure! Thanks a lot.

D'oh, I only just noticed that the scanned dir actually is a subdirectory of the root... if you clean the Root path.
Presumably you have a relative GOPATH, GOROOT, or replace directive, and that is being mishandled by goimports. I'm pretty confident that I can reproduce this -- peeking at the code indeed indicates that roots are not clean, and yet scanned directories are.
Thanks for taking the time to debug.

Is there anything else I can do to help you here?

@feldgendler I've reproduced this crash in a test, and will send a fix shortly. If you could confirm that go env GOMODCACHE is unclean (includes /../), that would help me confirm that the context of my reproducer is accurate.

@feldgendler yes correct

<EMAIL_ADDRESS>

I just tested v0.16.2-pre.1, and the crash still happens.

@feldgendler indeed we have not yet cherry-picked the fix to a prerelease (we were actually just testing our new release automation when we cut -pre.1. We will fix in a -pre.2, thanks.

I'm not good at this syntax — is there a Go version expression I could use with go install to test the fix?

@feldgendler the best way to test the fix would be to install gopls@master, which you can do with the following command (we need to install from source as there is a replace directive in the gopls go.mod file during development).
git clone go.googlesource.com/tools
cd tools/gopls
go install

No crash when installed in this way, thank you!

(we need to install from source as there is a replace directive in the gopls go.mod file during development)

Is this a leftover from before workspaces were added, or is there a reason to keep this replacement instead of go.work?

@dottedmag this is from before workspaces were added, but no we keep it because best practice is to not check in go.work files (see documentation here: https://go.dev/ref/mod#go-work-file).
In particular, while correctness requires that golang.org/x/tools/gopls imports the local golang.org/x/tools during development (because it uses the internals of x/tools), we want to support developers working on additional modules if they so choose. Checking in a go.work would circumvent that choice.