Add (optional) support for requesting tags from the compare/runs and compare/benchmarks endpoints

This might be a super hacky implementation, but it seems to work in the tests at least. This info is (mostly) repeated in the benchmark name now, but I'm hoping to be able to pull something from the API and then parse the tags themselves for creating a diff report kind of like those I made when helping Romain

I can add the appropriate tests to not have the coverage drop — it shouldn't be too hard to construct test cases for them (though some will be more contrived than others i.e. getting the tags from the contender when the baseline doesn't have any)

This looks great, thanks! Rather than complicate the code and API, just go ahead and always include tags.


Toolbar buttons: add context awareness

Toolbar buttons: add context awareness
We need to enable/disable toolbar buttons not only based on number of items selected i a GTL view, but also based on type or other attributes of the selected item(s).
There was a number of BZ and there are many situations where this is needed.
Do do so we need

pass additional attributes along with items in GTL views. Use the HTML5 data-* attributes for that
write the custom javascripts what work with these attributes
attach particular javascript bits to the buttons

New attribute has to be added to the toolbar definitions that would hold the name of the function to call.
The functions would be static and would live under ManageIQ.toolbars. namespace.
Examples: Toolbar button "Clone VM" should by enabled for VMs but not for archived VMs.

/cc @durandom

We need to revisit this issue once we have the new angular GTL component.

#11114

Yes so once we have the GTL in and we have the toolbars talk to the new GTL via RxJS or somehow we can look into sending some more (invisible) attributes as the data from the get_view endpoint and making use of that to enable/disable toolbar buttons.
I'd say that right now I see the priority like this:

getting the GTL's work
make GTL's work through the API (report API)
anything else

number 1 plus making use of that in all the screens should be short-term goal now

@miq-bot remove_label stale

@miq-bot move_issue manageiq-ui-classic


Switch from Prettier to Biome

We may want to switch to Biome as Prettier through pre-commit can be quite slow.
Some disadvantages (for now):

The biome-check pre-commit hook takes a long time to install
The hook requires additional_dependencies, which is annoying when running pre-commit autoupdate
The VSCode extension requires a global installation of Biome.js

More motivators for switching to Biome:

The 'official' prettier pre-commit hook has been archived due to breaking changes
CI with Prettier seems not to have permanently broken: https://github.com/ComPWA/policy/actions/runs/10717219454/job/29716490598?pr=383

It seems that Biome will not support Markdown formatting: https://github.com/biomejs/biome/discussions/923#discussioncomment-7685873


Race conditions caused by accidental sharing client context among internal requests

Bug description
Sometimes, the header of an internal operation is not being forwarded properly. This leads to intermittent request failures in our own app's end-to-end testing in CI. It's a bit difficult to come up with a reproducible example since the bug is indeterministic.
After a bit of digging, I think I might know the cause. In this line, Object.create is inheriting the context from baseOperations. Thus we end up accidentally sharing client.context among all internal requests. This means that if we have two requests being made concurrently to two different backends, each requiring a different header, the wrong header might be sent to a backend.
If I change that Object.create to explicitly creating new objects:
const client = {
    context: { clientRequest, extraHeaders },
    queries: { ...baseOperations.queries },
    mutations: { ...baseOperations.mutations },
};
client.queries.context = client.context;
client.mutations.context = client.context;

then our CI pipeline no longer fails intermittently. Btw those last two lines ensure that this.context is bound to the correct context here. Looks a bit hacky though - maybe you guys have better ideas.
How to reproduce
See above
Expected behavior
No response
WunderGraph information

Environment & setup

OS:
Go version:
Database:
Node.js version:

WunderCtl Version

Hello @alasdairtran - We've decided to not fix this one because the internal client is now deprecated. You should use the operations instead. Please, check this for an example https://github.com/wundergraph/wundergraph/blob/6abfbf6b5766b8840a39f6f96593ee6e8efc05dd/packages/testsuite/apps/basic/.wundergraph/operations/functions/CountryWeatherViaInternal.ts#L8 - Thanks!

@fiam Thanks for the update. I tried migrating internalClient to operations but it seems that the feature is not quite ready yet. For example, I converted
  const { data: userData } = await internalClient.mutations.InternalUpsertUser({
      input: {
        user: {
          open_id: user.userId,
          name,
          username,
          nickname: user.nickName,
          email: user.email,
          email_verified: user.emailVerified,
          avatar: user.picture,
        },
        update_columns: [
          'name',
          'nickname',
          'email',
          'email_verified',
          'avatar',
        ],
      },
    });

to
    const { data: userData } = await operations.mutate({
      operationName: 'internal/UpsertUser',
      input: {
        user: {
          open_id: user.userId,
          name,
          username,
          nickname: user.nickName,
          email: user.email,
          email_verified: user.emailVerified,
          avatar: user.picture,
        },
        update_columns: [
          'name',
          'nickname',
          'email',
          'email_verified',
          'avatar',
        ],
      },
    });

but my Hasura backend now receives the mutation with no input variables (i.e. as if input is null).
I tried to debug it and found that although the variables are included in the body when the request is sent to http://<IP_ADDRESS>:9993/operations/internal/UpsertUser, it was somehow lost when Hasura receives the mutation. But I'm not familiar enough with the WunderGraph code base to figure out what happens in between. Do you know how I can debug this further?

@alasdairtran That's definitely unexpected and we want to fix that. Could you please open an issue for that bug in the operationsClient? If you could attach a repro that would be awesome. Thanks!


Investigate beacon intensity byte

For visible:

64  = Super bright
128 = Dim

Need to correlate to linear ish scale and also account for ir

Confirmed that range is 64 to 128


Rename overcloud_deploy.j2 to deploy_overcloud.j2

Fixes issue where deploy_overcloud.j2 is used in yml files, but the actual file is named overcloud_deploy.j2

Closing as was merged using gerrit review.


git bash crash on fresh git install

When launching git with right-click menu "Git Bash Here", the git bash (minTTY) doesn't launch.  Instead, a mintty.exe.stackdump file gets created with the following:
Exception: STATUS_ACCESS_VIOLATION at rip=001800BE66B
rax=000006FFFC9F9EF8 rbx=00000000000C9EE8 rcx=1FFFFFFFFFFD0000
rdx=FFFFFFFFFFE80000 rsi=000006FFFC6F9EF0 rdi=000006FFFC879EF0
r8 =0000000000180000 r9 =0000000000000000 r10=0000000100000000
r11=000000010040F5C4 r12=000000000000869F r13=000000000000869F
r14=0000000000010000 r15=0000000000000000
rbp=FFFFFFFFFFFF0000 rsp=00000000FFFFC568
program=C:\Program Files\Git\usr\bin\mintty.exe, pid 10176, thread main
cs=0033 ds=002B es=002B fs=0053 gs=002B ss=002B
I have tried reinstall  32-bit and 64-bit windows.
There have been several users who had the same issues online, but their resolutions didn't solve my issue.
Windows 7, Git 2.11.1 package.

Hey, this is the issue tracker for the git-scm.com website, not Git itself. If you still want to discuss this issue, you should reach out to the community.
Since this is specifically relevant to G4W, you might also want to follow up over at git-for-windows/git.
@peff this should be closed.

Alrighty, thanks!


Discussion: using HamburgerMenu from UWP Community Toolkit

I saw that UWPCommunityToolkit have a great HamburgerMenu control with NavigationView. Why we don't build NavViewEx on this implementation?
https://github.com/Microsoft/UWPCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/HamburgerMenu

That's not correct because the UWPCommunityToolkit's HamburgerMenu is obsolate: see.
They suggest to use NavigationView instead.


CP3108: Game Component

Maintain game component #857
(PR is not ready for review yet, waiting for some final items to be added.)
Our team focused on two main items:
Staff authoring experience
Teaching staff (profs and possibly avengers) are responsible for writing and publishing the story scripts that narrate the game. However, without a proper sandbox for testing bleeding edge stories, story authoring is extremely slow, especially during the semester when students are already going through the story in the live production environment.
We have extended the existing game system to enable the loading of stories from alternative locations for non-student users. We have also made use of the existing Materials component so that staff may easily save and load freshly edited story scripts. This allows staff to write and test stories which are saved to Materials, without affecting the stories currently experienced by students in the production environment.
Staff will also be able to test the story under various conditions. They will be able to customize the testing scenario, such as varying the user's game state data and simulating the current date to control which stories are unlocked.
Student game experience
Game state data for users (e.g. collectibles, quest progress) was previously stored locally. Should the user clear their browsing data or switch devices, this data is lost, causing the user to lose their progress and creating a discontinuity in the game experience.
We have extended the backend (cadet) to accommodate the storage of the user's game state data, and also tweaked the frontend to load and save data from the backend instead of local storage. The persistent storage of game data will provide a more cohesive game experience for students.

For further documentation, please see: https://github.com/source-academy/cadet-frontend/wiki/Game

Pull Request Test Coverage Report for Build 4381

62 of 264 (23.48%)  changed or added relevant lines in 21 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage decreased (-0.2%) to 36.898%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/components/academy/game/game.js
0
1
0.0%

src/components/academy/game/story-xml-player.js
0
1
0.0%

src/components/academy/game/backend/user.js
1
3
33.33%

src/components/academy/game/save-manager/save-manager.js
0
3
0.0%

src/components/academy/game/backend/hosting.js
0
5
0.0%

src/components/academy/game/index.tsx
1
6
16.67%

src/components/academy/game/create-initializer.js
0
6
0.0%

src/containers/game-dev/StoryUploadContainer.ts
7
14
50.0%

src/components/academy/game/story-manager/story-manager.js
0
8
0.0%

src/components/game-dev/DeleteCell.tsx
5
15
33.33%

Files with Coverage Reduction
New Missed Lines
%

src/components/academy/game/story-manager/story-manager.js
1
0%

Totals

Change from base Build 4377:
-0.2%

Covered Lines:
2875

Relevant Lines:
6983

💛  - Coveralls

Final internal PR has been merged. Ready to begin the review process.

Most features are up and working.


Async Generator Search Pages

Get multiple search pages at once with max number of pages using an async generator.

Hello @NadieFiind o7
After all, thank you very much for your contrib.
Why don't we use ensure_future to build asynchronous tasks instead building an async generator?
something like:
    async def search_pages(self, query: str, sort: str=None, max_pages: int=1) -> AsyncGenerator[SearchPage, None]:
        TASKS = []

        for page in range(1, max_pages + 1):
            task = asyncio.ensure_future(self.search(query=query, sort=sort, page=page))
            TASKS.append(task)

        return await asyncio.gather(*TASKS)

I did some testing to test which is faster. Obviously the ensure future is faster but it might hurt you network because it is making many requests at the same time.
This is my code:
import time
import asyncio
from NHentai.nhentai_async import NHentaiAsync

async def main():
	pages = 2
	nhentai = NHentaiAsync()

	print(f"Pages: {pages}")

	# test the speed of async generator
	start_time = time.time()
	async for page in nhentai.search_pages(query="a", max_pages=pages):
		pass
	print(f"Async Generator: {time.time() - start_time}")

	# test the speed of ensure future
	start_time = time.time()
	for page in await nhentai.list_search_pages(query="a", max_pages=pages):
		pass
	print(f"Ensure Future  : {time.time() - start_time}")

asyncio.run(main())

First, I requested 10 pages and then this happened:
Pages: 10
Async Generator: 9.494192361831665
Traceback (most recent call last):
  File "/home/nadie/MyFiles/Others/Playground/NHentai-API/run.py", line 21, in <module>
    asyncio.run(main())
  File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/home/nadie/MyFiles/Others/Playground/NHentai-API/run.py", line 17, in main
    for page in await nhentai.list_search_pages(query="a", max_pages=pages):
  File "/home/nadie/MyFiles/Others/Playground/NHentai-API/NHentai/nhentai_async.py", line 210, in list_search_pages
    return await asyncio.gather(*TASKS)
  File "/home/nadie/MyFiles/Others/Playground/NHentai-API/NHentai/nhentai_async.py", line 162, in search
    total_results = soup.find('div', id='content').find('h1').text.strip().split()[0]
AttributeError: 'NoneType' object has no attribute 'find'

Then, I tried it again but with a smaller number:
Pages: 2
Async Generator: 1.8263447284698486
Ensure Future  : 1.04958176612854

Pages: 2
Async Generator: 1.7395751476287842
Ensure Future  : 0.6928927898406982

I have no idea why the soup is returning NoneType with bigger number of pages.

Thanks for the report.
I'm working to migrate the api from a common webscrapper to an nhentai api wrapper. It will improve the consistency of the methods result.
About the ensure_future vs async generator. I understood your points.
I agree with you about ur changes to use the async generator. Let's continue with this strategy.
୧☉□☉୨

I made a new commit. Please read the description.
I played around with the concurrent_tasks argument. Under 7 concurrent tasks I don't get any None error. But with 7 and above concurrent tasks, that's where I start getting None error.


Add support for picklist fields

Currently, picklist fields are rendered as textboxes - they should instead be properly rendered as a dropdown. Requested by macmouse on SFXD - thanks for the feedback!

Good morning! It looks like this issue is still open. Would you be open for a contribution for this?

@ssk42 I would love a contribution for this! I had hoped to work on this a while ago, but the issue has been open for over a year 😅 If you're interested in working on this, I'm more than happy to review & merge your changes whenever it's ready.


MS Teams users are presented with a 6-digit magic code after sign-in

The documentation says in the section Securing the sign-in URL

Some channels such as Microsoft Teams, Direct Line, and WebChat are able to do this without the user noticing. For example, WebChat uses session cookies to ensure that the sign-in flow took place in the same browser as the WebChat conversation. However, for other channels the user is often presented with a 6-digit magic code.

However, we are getting reports from users of our app in MS Teams that they are getting a 6-digit code after sign-in in the app. The app only has a messaging extension and the bot is read only. The doc says that this shouldn't happen in a Microsoft Teams channel. Is this a doc error or an MS Teams app error?

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

ID: ddf2089c-a313-0abf-2ed3-8d7db5c4f677
Version Independent ID: f0b3a9ce-b1e3-7b3d-15a9-0b9e032aa4bd
Content: User authentication in the Azure Bot Service - Bot Service
Content Source: articles/v4sdk/bot-builder-concept-authentication.md
Service: bot-service
GitHub Login: @JonathanFingold
Microsoft Alias: iawilt

@fgarciachipi, thank you for your patience. Is this still an issue your customers are experiencing? If so, can you answer the following questions:

When you say "after sign-in in the app", are you referring to after signing into Teams or after your customers sign-in using the OAuthPrompt?
What functionality do you have built into the messaging extension?
What do you mean the bot is "read only"? Do you mean it is a notification bot, only? Or, something else?
Is this a new experience that previously wasn't happening or has it always happened but only intermittently?
Were there any changes made to the bot or its manifest that took place about when the issue started to occur?

Closing due to inactivity.


Update mesapy to fix FNS/MesaPy FFI issues

Description
This commit update mesapy and fix FFI calling convention. The MesaPy fix can be found here: https://github.com/mesalock-linux/mesapy/commit/2b7ea38773d337d106c613a239661a60a4fa7528
Fixes #63 (issue)
CI result can be seen here: https://ci.mesalock-linux.org/mssun/incubator-mesatee/1
Type of change (select applied and DELETE the others)

[x] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?
The py_file example.
Checklist (check ALL before submitting PR, even not applicable)

[x] Fork the repo and create your branch from master.
[x] If you've added code that should be tested, add tests.
[x] If you've changed APIs, update the documentation.
[x] Ensure the tests pass (see CI results).
[x] Make sure your code lints/format.

Hi， could you please also post the mesapy patch link?

Here: https://github.com/mesalock-linux/mesapy/commit/2b7ea38773d337d106c613a239661a60a4fa7528

CI failed (https://ci.mesalock-linux.org/mssun/incubator-mesatee/1) because of #70. I'll update this PR once #70 is merged.

CI for a205088: https://ci.mesalock-linux.org/mssun/incubator-mesatee/4

Sucess: https://ci.mesalock-linux.org/mssun/incubator-mesatee/6


Unittests on cursor needed

Need to update a list of unittest to verfy the cursor issues in issue 433.

Not  really can be done.


is_nether tag broken

Was making a KubeJs script, everything was working properly until i was trying to import ancient debris into the list. All of immersive engineering was working but for some reason the Nether tag is broken. Any fix? I noticed that is_end tag was working perfectly fine so idk whats going on.

You have to use minecraft:is_nether, forge doesn't have that tag only is_overworld and is_end.


Testing in CICO build script

Testing is moved from the buildGuides-CI.sh script to the cico_build_deploy.sh script before the build process, so if any book fails to validate, the process fails.
The buildGuides.sh script is deleted becauase it is no longer necessary.
Doesn't have to be included in Aug 14 release.
Resolves #471.

merged: 952ab633ee83ec1c4fc2dcaef43ccea24c7ed3df


Add books and podcasts

And fix spacing

the noble crusade to convert people to FP continues with this latest PR 👏

That's right.
It's also partly because many of the resources I'm familiar with and have personally used happen to be FP-related, as I've spent quite a while down the rabbit-hole.


@_implementationOnly: fix over-eager checking for vars in extensions

The logic I had here checked whether an extension used an implementation-only type whenever there was a declaration within that extension that needed checking...but unfortunately that included not just PatternBindingDecls (whose access is filtered at a later step) but things like IfConfigDecls (#if). Change this to only check extension signatures for ValueDecl members of extensions, where we can properly check access beforehand. Additionally, don't bother doing this checking for accessors, since we'll have already done it for the corresponding VarDecl or SubscriptDecl.
rdar://problem/50541589

@swift-ci Please test

New implementation per Slava's suggestion.
@swift-ci Please test

Diagnostics clarified per Brent's comment.
@swift-ci Please test

Build failed
Swift Test OS X Platform
Git Sha - 8eff48e26e5aceec976c88de690560fdc7d7b5a9

Build failed
Swift Test Linux Platform
Git Sha - 8eff48e26e5aceec976c88de690560fdc7d7b5a9


element-desktop: warning: "Element does not support this browser"

Describe the bug
After updating to 1.11.74 on the stable channel (24.05),
the following warning appears when launching Element desktop:

Element does not support this browser
If you continue, some features may stop
working and there's a risk that you may lose
data in the future. Update your browser to
continue using Element.
[Learn more] [Dismiss]

This is not blocking, but implies that something may break in the future (?)
Steps To Reproduce
Steps to reproduce the behavior:

Start element-desktop on the stable channel.
Notice warning.

Expected behavior
No warning.
Screenshots

Additional context

element-desktop 1.11.74
running with electron 30.3.1

Notify maintainers

@Ma27
@fadenb
@mguentner
@Ralith
@dali99
@sumnerevans
@NickCao
@teutat3s

Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
❯ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.32, NixOS, 24.05 (Uakari), 24.05.20240817.c42fcfb`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.5`
 - nixpkgs: `/nix/store/i1aw9jjgxcvyd642s12kw3iasmarwd42-source`

Add a :+1: reaction to issues you find important.

This warning should go away once https://github.com/NixOS/nixpkgs/pull/333907 and https://github.com/NixOS/nixpkgs/pull/336018 are merged and built by hydra:
https://nixpk.gs/pr-tracker.html?pr=333907
https://nixpk.gs/pr-tracker.html?pr=336018


Themes fro light and dark

Hey, me again.
Im looking at the new themes options and see it is based using prefers-color-scheme
While this is fine if you just want to flip between your system light and dark, what if you have a theme toggle? How can I now say to use this dark theme vs use this light theme?

I found the themeCssSelector which i am able to use


Window bar follow theme color (dark theme)

The top window/tab bar is always glaring white, regardless of selected theme.  This is very tough for photosensitive eyes, when using dark themes.  I do not see any way to customize that in the css settings.
Thanks,

Nevermind, found the setting under the dot menu..  Thanks.


CNV19659: Add migration donut chart

Signed-off-by: Aviv Turgeman<EMAIL_ADDRESS>📝 Description
This PR includes:

Adding a donut chart to status.phase of VMIM resources including chart legend (need to fix clickable legend to add filtering to the table)
fixing table filtering to target and source node
Bumping kubevirt-api version to 0.46
fixing Cancel migration behavior in VM actions

UX design
Sub-task
Issue
🎥 Demo

/lgtm


Templates

Hello,
I'm excited about using your softare with ADobe DPS, can you tell where and how I access your wordpress templates?  Thank you. V.

Hi @Venus72, this plugin isn't be updated, if you're using the new DPS 2015, please use the new plugin. We re-coded it from the ground up so it's faster and more modular:
http://studiomercury.github.io/digital-publishing-tools-for-wordpress/
There is a section on the site about working with templates. You can find a direct link here:
http://studiomercury.github.io/digital-publishing-tools-for-wordpress/#templates
thank you,
Mercury

Oh, thank you!  I appreciate the quick reply.  Keep up the fantastic work – we love it!
Venus
From: Studio Mercury<EMAIL_ADDRESS>Sent: Wednesday, September 2, 2015 3:54 PM
To: StudioMercury/folio-author-plugin-for-wordpress<EMAIL_ADDRESS>Cc: Venus72<EMAIL_ADDRESS>Subject: Re: [folio-author-plugin-for-wordpress] Templates (#15)
Hi @Venus72 https://github.com/Venus72 , this plugin isn't be updated, if you're using the new DPS 2015, please use the new plugin. We re-coded it from the ground up so it's faster and more modular:
http://studiomercury.github.io/digital-publishing-tools-for-wordpress/
There is a section on the site about working with templates. You can find a direct link here:
http://studiomercury.github.io/digital-publishing-tools-for-wordpress/#templates
thank you,
Mercury
—
Reply to this email directly or view it on GitHub https://github.com/StudioMercury/folio-author-plugin-for-wordpress/issues/15#issuecomment-137225805 .  https://github.com/notifications/beacon/ANcd2HoTbG6TcuJsLsTrXcES6-oFDy5Sks5ot0tAgaJpZM4F2uqz.gif

Is it possible to use my own style of wordpress templates to publish, or is one confined to using specific templates?
From: Studio Mercury<EMAIL_ADDRESS>Sent: Wednesday, September 2, 2015 3:54 PM
To: StudioMercury/folio-author-plugin-for-wordpress<EMAIL_ADDRESS>Cc: Venus72<EMAIL_ADDRESS>Subject: Re: [folio-author-plugin-for-wordpress] Templates (#15)
Hi @Venus72 https://github.com/Venus72 , this plugin isn't be updated, if you're using the new DPS 2015, please use the new plugin. We re-coded it from the ground up so it's faster and more modular:
http://studiomercury.github.io/digital-publishing-tools-for-wordpress/
There is a section on the site about working with templates. You can find a direct link here:
http://studiomercury.github.io/digital-publishing-tools-for-wordpress/#templates
thank you,
Mercury
—
Reply to this email directly or view it on GitHub https://github.com/StudioMercury/folio-author-plugin-for-wordpress/issues/15#issuecomment-137225805 .  https://github.com/notifications/beacon/ANcd2HoTbG6TcuJsLsTrXcES6-oFDy5Sks5ot0tAgaJpZM4F2uqz.gif

@Venus72,
Currently, the plugin uses it's own templates to give the author complete control over design and efficiency. Lots of templates use a large number of libraries and scripts which have the potential to interfere with Adobe's Viewer.
For speed and performance it's best to create your own template utilizing only essential libraries, efficient javascript and minimal scripts.
To make your own templates, copy the folder publish-templates from the plugin folder into your active theme folder. Once in your theme’s folder the plugin will look there first when searching for a source of templates. Duplicate the article.php file and you can use that as a starting point to make your own templates.
We hope this helps de-mistify why we set it up this way.
All our best,
Mercury

Thank you.  I appreciate it!
From: Studio Mercury<EMAIL_ADDRESS>Sent: Wednesday, September 2, 2015 4:55 PM
To: StudioMercury/folio-author-plugin-for-wordpress<EMAIL_ADDRESS>Cc: Venus72<EMAIL_ADDRESS>Subject: Re: [folio-author-plugin-for-wordpress] Templates (#15)
@Venus72 https://github.com/Venus72 ,
Currently, the plugin uses it's own templates to give the author complete control over design and efficiency. Lots of templates use a large number of libraries and scripts which have the potential to interfere with Adobe's Viewer.
For speed and performance it's best to create your own template utilizing only essential libraries, efficient javascript and minimal scripts.
To make your own templates, copy the folder publish-templates from the plugin folder into your active theme folder. Once in your theme’s folder the plugin will look there first when searching for a source of templates. Duplicate the article.php file and you can use that as a starting point to make your own templates.
We hope this helps de-mistify why we set it up this way.
All our best,
Mercury
—
Reply to this email directly or view it on GitHub https://github.com/StudioMercury/folio-author-plugin-for-wordpress/issues/15#issuecomment-137241827 .  https://github.com/notifications/beacon/ANcd2Kcv3NT9aF0NSb-Lr2UaFvbVo3Z9ks5ot1m-gaJpZM4F2uqz.gif

Hello,
Can you suggest a tutorial on how to set up CARDS using your template?  Any tutorials would be most appreciative.
Thank you.
V.
From: Studio Mercury<EMAIL_ADDRESS>Sent: Wednesday, September 2, 2015 4:55 PM
To: StudioMercury/folio-author-plugin-for-wordpress<EMAIL_ADDRESS>Cc: Venus72<EMAIL_ADDRESS>Subject: Re: [folio-author-plugin-for-wordpress] Templates (#15)
@Venus72 https://github.com/Venus72 ,
Currently, the plugin uses it's own templates to give the author complete control over design and efficiency. Lots of templates use a large number of libraries and scripts which have the potential to interfere with Adobe's Viewer.
For speed and performance it's best to create your own template utilizing only essential libraries, efficient javascript and minimal scripts.
To make your own templates, copy the folder publish-templates from the plugin folder into your active theme folder. Once in your theme’s folder the plugin will look there first when searching for a source of templates. Duplicate the article.php file and you can use that as a starting point to make your own templates.
We hope this helps de-mistify why we set it up this way.
All our best,
Mercury
—
Reply to this email directly or view it on GitHub https://github.com/StudioMercury/folio-author-plugin-for-wordpress/issues/15#issuecomment-137241827 .  https://github.com/notifications/beacon/ANcd2Kcv3NT9aF0NSb-Lr2UaFvbVo3Z9ks5ot1m-gaJpZM4F2uqz.gif

Hi V,
The plugin for wordpress doesn’t have built in card support. You’ll use the DPS Web Portal to set up and manage cards.
If you’re looking for tutorials Adobe has a great learning center for DPS:
https://helpx.adobe.com/digital-publishing-solution.html
all our best,
Studio Mercury

On Sep 7, 2015, at 10:54 AM, Venus72<EMAIL_ADDRESS>wrote:
Hello,
Can you suggest a tutorial on how to set up CARDS using your template? Any tutorials would be most appreciative.
Thank you.
V.
From: Studio Mercury<EMAIL_ADDRESS>Sent: Wednesday, September 2, 2015 4:55 PM
To: StudioMercury/folio-author-plugin-for-wordpress<EMAIL_ADDRESS>Cc: Venus72<EMAIL_ADDRESS>Subject: Re: [folio-author-plugin-for-wordpress] Templates (#15)
@Venus72 https://github.com/Venus72 ,
Currently, the plugin uses it's own templates to give the author complete control over design and efficiency. Lots of templates use a large number of libraries and scripts which have the potential to interfere with Adobe's Viewer.
For speed and performance it's best to create your own template utilizing only essential libraries, efficient javascript and minimal scripts.
To make your own templates, copy the folder publish-templates from the plugin folder into your active theme folder. Once in your theme’s folder the plugin will look there first when searching for a source of templates. Duplicate the article.php file and you can use that as a starting point to make your own templates.
We hope this helps de-mistify why we set it up this way.
All our best,
Mercury
—
Reply to this email directly or view it on GitHub https://github.com/StudioMercury/folio-author-plugin-for-wordpress/issues/15#issuecomment-137241827 . https://github.com/notifications/beacon/ANcd2Kcv3NT9aF0NSb-Lr2UaFvbVo3Z9ks5ot1m-gaJpZM4F2uqz.gif
—
Reply to this email directly or view it on GitHub https://github.com/StudioMercury/folio-author-plugin-for-wordpress/issues/15#issuecomment-138317959.

Thanks.  I’ve gotten advanced with all this!
From: Studio Mercury<EMAIL_ADDRESS>Sent: Friday, September 25, 2015 10:38 PM
To: StudioMercury/folio-author-plugin-for-wordpress<EMAIL_ADDRESS>Cc: Venus72<EMAIL_ADDRESS>Subject: Re: [folio-author-plugin-for-wordpress] Templates (#15)
Hi V,
The plugin for wordpress doesn’t have built in card support. You’ll use the DPS Web Portal to set up and manage cards.
If you’re looking for tutorials Adobe has a great learning center for DPS:
https://helpx.adobe.com/digital-publishing-solution.html
all our best,
Studio Mercury

On Sep 7, 2015, at 10:54 AM, Venus72<EMAIL_ADDRESS><EMAIL_ADDRESS>> wrote:
Hello,
Can you suggest a tutorial on how to set up CARDS using your template? Any tutorials would be most appreciative.
Thank you.
V.
From: Studio Mercury<EMAIL_ADDRESS>Sent: Wednesday, September 2, 2015 4:55 PM
To: StudioMercury/folio-author-plugin-for-wordpress<EMAIL_ADDRESS><EMAIL_ADDRESS>>
Cc: Venus72<EMAIL_ADDRESS><EMAIL_ADDRESS>>
Subject: Re: [folio-author-plugin-for-wordpress] Templates (#15)
@Venus72 https://github.com/Venus72 ,
Currently, the plugin uses it's own templates to give the author complete control over design and efficiency. Lots of templates use a large number of libraries and scripts which have the potential to interfere with Adobe's Viewer.
For speed and performance it's best to create your own template utilizing only essential libraries, efficient javascript and minimal scripts.
To make your own templates, copy the folder publish-templates from the plugin folder into your active theme folder. Once in your theme’s folder the plugin will look there first when searching for a source of templates. Duplicate the article.php file and you can use that as a starting point to make your own templates.
We hope this helps de-mistify why we set it up this way.
All our best,
Mercury
—
Reply to this email directly or view it on GitHub https://github.com/StudioMercury/folio-author-plugin-for-wordpress/issues/15#issuecomment-137241827 . https://github.com/notifications/beacon/ANcd2Kcv3NT9aF0NSb-Lr2UaFvbVo3Z9ks5ot1m-gaJpZM4F2uqz.gif
—
Reply to this email directly or view it on GitHub https://github.com/StudioMercury/folio-author-plugin-for-wordpress/issues/15#issuecomment-138317959.

—
Reply to this email directly or view it on GitHub https://github.com/StudioMercury/folio-author-plugin-for-wordpress/issues/15#issuecomment-143392698 .  https://github.com/notifications/beacon/ANcd2DEVK3mMJ5YoovwB9r6jFLoq8d7wks5o1fyMgaJpZM4F2uqz.gif


Steady bottombar between activities?

This is a question, more than an issue.
When I have multiple activities using the same bottom bar layout, how do I prevent a flicker of the bottom bar when starting a new activity? I mean, what do most people do?
I can use fragments so I can have one activity in my app, I can have just one activity period, or I can have a fragment that displays the bottombar that's shared between activities. None of these solutions sound appealing to me. So I'm wondering, what do you guys do?

You would have only one Activity that hosts the BottomBar. The activity then switches between different Fragments depending on the selected tab.


'Braket' object has no attribute 'get_device'

Describe the bug
When executing the example bell.py, the following error appears:

AttributeError                            Traceback (most recent call last)
 in
19 aws_account_id = boto3.client("sts").get_caller_identity()["Account"]
20
---> 21 device = AwsDevice("arn:aws:braket:::device/quantum-simulator/amazon/sv1")
22 s3_folder = (f"amazon-braket-output-{aws_account_id}", "folder-name")
23
~/braketvirtenv/lib/python3.7/site-packages/braket/aws/aws_device.py in init(self, arn, aws_session)
74         self._provider_name = None
75         self._type = None
---> 76         self.refresh_metadata()
77
78     def run(
~/braketvirtenv/lib/python3.7/site-packages/braket/aws/aws_device.py in refresh_metadata(self)
153         Refresh the AwsDevice object with the most recent Device metadata.
154         """
-->   155         metadata = self._aws_session.get_device(self._arn)
156         self._name = metadata.get("deviceName")
157         self._status = metadata.get("deviceStatus")
~/braketvirtenv/lib/python3.7/site-packages/braket/aws/aws_session.py in get_device(self, arn)
116             Dict[str, Any]: Device metadata
117         """
-->   118         return self.braket_client.get_device(deviceArn=arn)
~/braketvirtenv/lib/python3.7/site-packages/botocore/client.py in getattr(self, item)
573         raise AttributeError(
574             "'%s' object has no attribute '%s'" % (
--> 575                 self.class.name, item)
576         )
577
AttributeError: 'Braket' object has no attribute 'get_device'
To reproduce
Execute bell.py
Expected behavior
Get the result of the experiment
System information
A description of your system. Please provide:

Amazon Braket Python SDK version: v1.0.0.post1
Amazon Braket Python Schemas version: v1.0.0.post1
Amazon Braket Python Default Simulator version: v1.0.0.post1
Python version: 3.7.5

Thanks for reaching out. This probably has something to do with upgrading boto3 to have the braket client. Please run
pip install boto3 --upgrade
To troubleshoot further, please make sure that you can call get_device in boto3: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/braket.html#Braket.Client.get_device
Let us know if this has solved your problem.

Thank you for the answer.
I upgraded boto3 and this did not solve the problem, I have the same error when I call the get_device() method.
My version of boto3 is 1.14.46.

steps to reproduce
virtualenv braket
cd braket
source bin/activate
git clone https://github.com/aws/amazon-braket-sdk-python.git
pip install -e amazon-braket-sdk-python
python amazon-braket-sdk-python/examples/bell.py

error
Traceback (most recent call last):
  File "amazon-braket-sdk-python/examples/bell.py", line 21, in <module>
    device = AwsDevice("arn:aws:braket:::device/quantum-simulator/amazon/sv1")
  File "/Users/$(whoami)/git/braket/amazon-braket-sdk-python/src/braket/aws/aws_device.py", line 76, in __init__
    self.refresh_metadata()
  File "/Users/$(whoami)/git/braket/amazon-braket-sdk-python/src/braket/aws/aws_device.py", line 155, in refresh_metadata
    metadata = self._aws_session.get_device(self._arn)
  File "/Users/$(whoami)/git/braket/amazon-braket-sdk-python/src/braket/aws/aws_session.py", line 118, in get_device
    return self.braket_client.get_device(deviceArn=arn)
  File "/Users/$(whoami)/git/braket/lib/python3.7/site-packages/botocore/client.py", line 575, in __getattr__
    self.__class__.__name__, item)
AttributeError: 'Braket' object has no attribute 'get_device'

Thanks @jmp-aws, I'm still unable to reproduce the error. I think it's due to the AWS CLI not being up to date, because the get_device API isn't able to be called.
Another option is to uninstall and re-install boto3.
Or, to start from a new virtualenv and run:
pip install amazon-braket-sdk

commands executed
python3 -m venv braket
cd braket
source bin/activate
pip install amazon-braket-sdk

# created bell.py file from copying and pasting from the repo
python bell.py

output
Traceback (most recent call last):
  File "bell.py", line 8, in <module>
    device = AwsDevice("arn:aws:braket:::device/quantum-simulator/amazon/sv1")
  File "/Users/$(whoami)/git/braket/lib/python3.8/site-packages/braket/aws/aws_device.py", line 76, in __init__
    self.refresh_metadata()
  File "/Users/$(whoami)/git/braket/lib/python3.8/site-packages/braket/aws/aws_device.py", line 155, in refresh_metadata
    metadata = self._aws_session.get_device(self._arn)
  File "/Users/$(whoami)/git/braket/lib/python3.8/site-packages/braket/aws/aws_session.py", line 118, in get_device
    return self.braket_client.get_device(deviceArn=arn)
  File "/Users/$(whoami)/git/braket/lib/python3.8/site-packages/botocore/client.py", line 573, in __getattr__
    raise AttributeError(
AttributeError: 'Braket' object has no attribute 'get_device'

Have you tried running:
aws braket help in the command line and seeing if get-device appears in the list of available commands?
If not, the version of the AWS CLI you have needs to be updated.

commands executed
aws braket help

output
AVAILABLE COMMANDS
       o cancel-quantum-task

       o create-quantum-job

       o create-quantum-task

       o describe-qpus

       o describe-quantum-simulators

       o get-quantum-job

       o get-quantum-task

       o help

       o list-quantum-jobs

       o list-quantum-tasks

       o stop-quantum-job

working on trying to remove braket definition of aws cli installation

@NicoSchwaller does removal of any aws cli models, uninstallation, and re-installation help resolve the issue? These are the commands that solved the issue for myself
brew uninstall awscli
rm -rf ~/.aws/models/aqx
rm -rf ~/.aws/models/braket
brew install awscli
aws braket help

@NicoSchwaller does removal of any aws cli models, uninstallation, and re-installation help resolve the issue? These are the commands that solved the issue for myself
brew uninstall awscli
rm -rf ~/.aws/models/aqx
rm -rf ~/.aws/models/braket
brew install awscli
aws braket help

Yes, this did solve the problem, thanks a lot!


[Feature Request] Add Unit Tests

What do you want to request?
Adding unit tests

Do you have anything to tell us about your request?
Currently, harmony doesn't have any unit tests, which can make tests so much better and reliable.

https://docs.microsoft.com/ko-kr/visualstudio/javascript/unit-testing-javascript-with-visual-studio?view=vs-2019&tabs=mocha

Deno has built in test runner.

With unit tests you mean a set of tests that use the discord api right? I think we could easily look at discordeno's implementation and use that as a reference point

Yes, using the Discord API itself. It won't be hard to come up with our own implementation.

It won't be hard no. But it's handy to have a reference point. We shouldn't be leaking resources or ops like dd does tho.

We shouldn't be leaking resources or ops like dd does tho.

This is not possible for Discord bots unit testing. We can't reopen connection for each test, that's just a very easy to hit rate limits...

If you create the resource before the tests and not close it in the test then it works normally. It will only show a "leak" when you close it in the test

We shouldn't be leaking resources or ops like dd does tho.

This is not possible for Discord bots unit testing. We can't reopen connection for each test, that's just a very easy to hit rate limits...

Why not run the tests with github actions, and pass resources as a secret, and then a command line argument? Then load all the tests into a runner which is ran with deno run runner.ts TOKEN
Or is this just not viable?

Resources are the things in the resource table. Not tokens etc.
Stuff that is in Deno.resources() like files, child processes and other things. Ops are the interactions between Rust and JavaScript. So leaking those means that some of those interactions didn't finish when the test finished.

This is not possible for Discord bots unit testing. We can't reopen connection for each test, that's just a very easy to hit rate limits...

This is certainly possible. When trying to fix op + resource leaks in dd I found that their code only leaked them. Not the test code. So it's doable by alot

As this will be taken care of in v3, should this issue be closed? (can be tracked in #225 instead)

All new functions would need their own tests. So maybe add a comment to #225 and say that all functions require a test etc.
Then I guess we can close this yeah


Workaround: new regex pattern to find JS player signature function

Before submitting a pull request make sure you have:

[x] At least skimmed through adding new extractor tutorial and youtube-dl coding conventions sections
[x] Searched the bugtracker for similar pull requests
[ ] Checked the code with flake8

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

[x] I am the original author of this code and I am willing to release it under Unlicense
[ ] I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

[x] Bug fix
[ ] Improvement
[ ] New extractor
[ ] New feature

Description of your pull request and other information
Fix https://github.com/rg3/youtube-dl/issues/17457
Idea: The signature decrypt function body always start with a command like this a=a.split("");, I use this to find the entry.
https://regex101.com/r/L7kWtA/1

FWIW I can confirm this fix works with a problem video:

Log output
~/Downloads ❯❯❯ ydl --verbose 'https://www.youtube.com/watch?v=WgQHQ-KeUaw'
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--recode-video', u'mp4', u'--verbose', u'https://www.youtube.com/watch?v=WgQHQ-KeUaw']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.09.01
[debug] Python version 2.7.15 (CPython) - Darwin-18.0.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 4.0.2, ffprobe 4.0.2, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] WgQHQ-KeUaw: Downloading webpage
[youtube] WgQHQ-KeUaw: Downloading video info webpage
[youtube] {43} signature length 41.42, html5 player vflvABTsY
[youtube] WgQHQ-KeUaw: Downloading player https://www.youtube.com/yts/jsbin/player-vflvABTsY/en_US/base.js
[youtube] {18} signature length 41.42, html5 player vflvABTsY
[youtube] {36} signature length 41.42, html5 player vflvABTsY
[youtube] {17} signature length 41.42, html5 player vflvABTsY
[youtube] {135} signature length 41.42, html5 player vflvABTsY
[youtube] {244} signature length 41.42, html5 player vflvABTsY
[youtube] {134} signature length 41.42, html5 player vflvABTsY
[youtube] {243} signature length 41.42, html5 player vflvABTsY
[youtube] {133} signature length 41.42, html5 player vflvABTsY
[youtube] {242} signature length 41.42, html5 player vflvABTsY
[youtube] {160} signature length 41.42, html5 player vflvABTsY
[youtube] {278} signature length 41.42, html5 player vflvABTsY
[youtube] {140} signature length 41.42, html5 player vflvABTsY
[youtube] {171} signature length 41.42, html5 player vflvABTsY
[youtube] {249} signature length 41.42, html5 player vflvABTsY
[youtube] {250} signature length 41.42, html5 player vflvABTsY
[youtube] {251} signature length 41.42, html5 player vflvABTsY
[debug] Default format spec: bestvideo+bestaudio/best
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[debug] Invoking downloader on u'https://r2---sn-ab5l6ndy.googlevideo.com/videoplayback?dur=1765.360&id=o-AIH-Ev8OcVFwB3IHIr43p9xWcrp2IP0dNUrPsBy6vRvE&initcwndbps=1242500&ei=jcWSW93pJo-N8wT2prnACQ&c=WEB&gir=yes&requiressl=yes&sparams=aitags%2Cclen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&ms=au%2Conr&ipbits=0&pl=32&mv=m&mt=1536345348&aitags=133%2C134%2C135%2C160%2C242%2C243%2C244%2C278&mm=31%2C26&keepalive=yes&key=yt6&ip=2604%3A2000%3A12c0%3A6de%3Af487%3A4565%3Aa374%3A53&clen=91672120&mn=sn-ab5l6ndy%2Csn-vgqskn7l&source=youtube&fvip=6&lmt=1536344003156412&expire=1536367085&itag=135&mime=video%2Fmp4&signature=39B29CC2B59C43EDE4236CF1D7E4AD9D03B1620D.C993F726A361993E2DA44F31DB95A996E23FB4D1&ratebypass=yes'
[download] Destination: Liza & David (Unaired Pilot)-WgQHQ-KeUaw.f135.mp4
[download] 100% of 87.43MiB in 00:17
[debug] Invoking downloader on u'https://r2---sn-ab5l6ndy.googlevideo.com/videoplayback?dur=1765.941&id=o-AIH-Ev8OcVFwB3IHIr43p9xWcrp2IP0dNUrPsBy6vRvE&initcwndbps=1242500&ei=jcWSW93pJo-N8wT2prnACQ&c=WEB&gir=yes&requiressl=yes&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&ms=au%2Conr&ipbits=0&pl=32&mv=m&mt=1536345348&mn=sn-ab5l6ndy%2Csn-vgqskn7l&mm=31%2C26&keepalive=yes&key=yt6&ip=2604%3A2000%3A12c0%3A6de%3Af487%3A4565%3Aa374%3A53&clen=28420218&source=youtube&fvip=6&lmt=1493885804061473&expire=1536367085&itag=251&mime=audio%2Fwebm&signature=2C522DE6484E2A2AEEC193FAE11A805AF2734A32.983B55E7A9220095F4E36ADEC1EFCDDC4F229B4D&ratebypass=yes'
[download] Destination: Liza & David (Unaired Pilot)-WgQHQ-KeUaw.f251.webm
[download] 100% of 27.10MiB in 00:04

I can confirm this working. Merge it asap and release an update. Cheers!

YouTube seemed to change it back. I'm still using the 2018.09.01 version (because this is the one which is currently in my distribution repository)
and since today I can download videos again. All videos so far. And youtube-dl --version outputs:
2018.09.01
The same version that didn't work yesterday.


Scheduler Action

each time a cron job is triggered it should invoke one action
the action is a REST HTTP call

please see below some screens from Postman
we can have something similar
the example below calls an API that updates a certain extension to the latest version

the API does not exist yet, is for demo purposes only

we should not add support for OS wise actions (like rmdir) for now (keep it simple(r))
the result of the job execution should be saved in a table (HTTP success status and response body if any)

this way the user can check that the action was executed at the correct time with the correct params

Call Config:

Call Body

In the backend a call of this form will be made each time a job is executed:
async with httpx.AsyncClient() as client:
    resp = await client.get(    # action can be any HTTP verb (GET, PUT, POST, etc) set in the job config
        url,                    # from the job config
        headers,                # from the job config
    )
    save_job_execution(resp.status_code, resp.text())

@motorina0  OK. I think the directions are clear.
The python-crontabs module would store the X-API-Key values as environment variables in the crontab file, so each individual job will have its own set of env vars.
Assuming there is no need for global env vars, I'll remove the Global Environment variables box that is currently at the bottom of the extension right now.
Please do let me know if incorrect! thanks.

Working on testing the extension install now.
Any suggestions on where to put the dependency, would be helpful.
Right now the python-crontab dependency is in the requirements.txt file but the user has to install it themselves, its not on the LNBits main poetry toml.
Also the user must set the username that has access to system /usr/bin/crontab
and they need to specify their LNBITS Install, as the crontab script needs to call the API and does not inherit the LNBits environment. I've put these two variables in a .env file, but there is UI to edit this directly right now.
Implemented as you suggested using a run_cron_job.py script.

Any suggestions on where to put the dependency, would be helpful.

please open a PR on the lnbits/lnbits repo with the new dependency
this PR should be merged before releasing the extension

as the crontab script needs to call the API and does not inherit the LNBits environment

relative paths should be supported in the front-end
if a relative path is used then the back-end must add http://${HOST}/${PORT}

Also the user must set the username that has access to system /usr/bin/crontab

why is a OS user required? what happens on non-linux system?

According to the docs, there are three ways to do it, with Linux.
One of the ways requires the username.
Do we want to enable the username? I know for OSX, I needed it.

Do we want to enable the username?

we want to keep this as simple as possible for the users that install the extension
it looks like the username option is not mandatory, that is good

I know for OSX, I needed it.

you mean you had to take extra steps in order to use the lib?
we should limit/automate that as much as possible

OK I am testing this with both Ubuntu and OSX. Will try to have everything working with latest 0.11 this weekend. (this week has been a bit busy)

* if a relative path is used then the back-end must add `http://${HOST}/${PORT}`

Regarding - I have this script running when the cron job is triggered but is does not have the LNBits environment, I put it in as an env variable in .env but if you have a better way of accessing it, please suggest!
https://github.com/bitkarrot/scheduler/blob/2ceb03e4e14002d55c8ecd890afa3d3d654bde63/run_cron_job.py#L20
extension updated to allow for LNBits v0.11 but still need to do more testing.

Regarding - I have this script running when the cron job is triggered but is does not have the LNBits environment, I put it in as an env variable in .env but if you have a better way of accessing it, please suggest!

.env file has these properties:

HOST=<IP_ADDRESS>
PORT=5000

data can also be passes to the job in the comment field (or something similar), right?

HOST=<IP_ADDRESS>
PORT=5000

* data can also be passes to the job in the `comment` field (or something similar), right?

yes I know that the HOST/PORT is in the LNBits .env, but that cron script unfortunately runs outside of the LNBits environment as its called by system crontab which doesn't inherit the LNBits environment.
I can pass the HOST/PORT in, just like the job ID and adminKey is passed in right now (this is testnet example).
Perhaps this is better way to do it.
Ok I will test and get back to you. Thanks @motorina0

OK I fixed the above, made a release. It should be working with basic functionality now, validation can improve but please have a look. https://github.com/bitkarrot/scheduler/releases/tag/v0.0.9

tested with sqlitedb only so far, no postgres


initial commit of Set-DbaPrivilege

Changes proposed in this pull request:

finds SQL Service account and adds it to LPIM, IFI and/or BatchLogon privilege(s)

It would be nice to have -Whatif in this function, but I haven't found a way to implement that in Invoke-Command.
Maybe this function can be extended to allow other accounts to be granted privileges, or else a rename may be appropriate
How to test this code:

[ ]
[ ]

Has been tested on minimum requirements:

[ ]  Powershell 3
[ ]  Windows 7
[ ]  SQL Server 2000

Has been tested on maximum requirements:

[ ]  SQL Server vNext
[ ]  Windows 10
[ ]  Azure Database

Tests for tester:

[ ] Working/useful help content, including link to command on dbatools web site
[ ] All examples work as advertised
[ ] Does not contain template content
[ ] Does not contain excessive/unnecessary amounts of comments
[ ] Works remotely
[ ] Works locally
[ ] Works on lower versions or throws error specifying version not supported
[ ] Works with named instances
[ ] Works with clustered instances
[ ] Handles offline/read only databases
[ ] Supports multiple servers (at the command line or piped from Get-SqlRegisteredServerName)
[ ] No un-handled errors which stop the command working with multiple servers

@PowerDBAKlaas  - please add the required param help!
Describe : Test help for Set-DbaPrivilege
Context  : Test parameter help for Set-DbaPrivilege
Name     : It gets help for parameter: BatchLogon : in Set-DbaPrivilege
Result   : Failed
Describe : Test help for Set-DbaPrivilege
Context  : Test parameter help for Set-DbaPrivilege
Name     : It gets help for parameter: IFI : in Set-DbaPrivilege
Result   : Failed
Describe : Test help for Set-DbaPrivilege
Context  : Test parameter help for Set-DbaPrivilege
Name     : It gets help for parameter: LPIM : in Set-DbaPrivilege
Result   : Failed
merci! :belgium:

added parameter help 🚒

Did some testing and this failed for my local computer.

Does this need a RunAsAdmin check, @PowerDBAKlaas ? I built an internal command called  Test-RunAsAdmin

not so sure it's even usable locally.

I think this says that remoting isn't enabled. @gbargsley ?

I am running as windows admin on my laptop.  How do I know if remoting is running.  Other commands have been working on my laptop.
@PowerDBAKlaas

Test-WSMan
or
Enter-PSSession localhost

Not sure what this shows.

sessions like that won't work on localhost - our CM stuff or Invoke-Command2 handle if its localhost and just execute the commands directly - handles both empty credentials and localhost gracefully.

Ok, so I cannot run this test against my local.  I will need to perform against a remote server?

No, @PowerDBAKlaas needs to update the command - havent looked at the code. But i know Get-DbaPrivelege uses Invoke-Command2 so it shouldn't be too hard.

sessions work perfectly like that when remoting is enabled, @potatoqualitee , this is Invoke-command2 after Test-PSRemoting, exactly like Get-DbaPrivilege
@gbargsley  you need to enable-psremoting on your localhost.
remoting will use WSMan, even on localhost.

@potatoqualitee Test-RunasAdmin quits if the user doesn't run elevated on localhost, right?
I saw something that 'reloads' the console to run as administrator, I think. I'm not sure it was someone from the team or not. Have you seen that?

hey @PowerDBAKlaas - yeah I have a realoader in Install-DbaWatchUpdate
:O I had no idea you needed to enable remoting for Invoke-Command! 💩 How should I rewrite Invoke-Command2?

Weird I run as administrator then login with my admin account it works.  I run as different user and login with my admin account it does not work.    Let me try the test again.

I show the command running, but no output is generated.  And I do not show settings in the local security policy that was not there already.

@potatoqualitee I don't know if Invoke-Command2 needs a rewrite. If we use remoting, remoting needs to be enabled. With CIM we fall back to DCOM, wich works, but it's still a pity we silently work around remoting. To catch the same problem with Invoke-command would require an elaborate logic to repeat the ScriptBlock without Invoke-Command, just for localhost. That's not economic.
But maybe Test-RunasAdmin could lead to 'Do you want to elevate this session?[y/n]' or something. That's probably not for now, but something to think about. I will add Test-RunasAdmin tomorrow. It will clearly state the user is not running in elevated mode, and that's an improvement.
@gbargsley I'm not sure. Maybe there's a flaw in the function logic.
I do have to catch the situation where no privilege switch is given, since it will just export secpol and then remove it again. That's useless.
Other than that I would expect it always returns a message when using -Verbose.
I'll look at it in +/- 12 hours from now :-)

added check to:

stop if no privilege is chosen to be altered
stop if the user tries to execute on localhost and is not running with elevated permissions

@gbargsley can you repeat your tests, please?

Looks like it is getting stuck running.  This screen has been running for 2 minutes.  The output came after about 3 seconds and now it is just sitting there.

😮
better ctrl+c it
must be hanging on the secedit 😞

Is there any logging I can turn on to help troubleshoot?

Here is -verbose.

And a question for you.  When I run computer name actual computer name things fail.  When I use localhost I get further.  Is that supposed to be like that?

there should be a log in Get-ChildItem $env:SYSTEMROOT\security\logs
'scesrv.log'
but on my system it isn't created
yet the function executes 🤔
@gbargsley can you show an example of computername failing? What statement do you execute and what's the error?

@gbargsley seems as if remoting isn't enabled on L7DR15466

But it is on localhost?  Isn't that the same thing?

yes, and remoting needs to be enabled on localhost.
Invoke-Command uses the WSMan protocol, on localhost or to the other side of the world makes no difference 😄

But if it works on localhost without me doing anything.  What would I do different for computername.

those screenshots are all from the same computer?
do you get the same output for
Test-WSMan localhost
and
Test-WSMan L7DR15466
?

hey @PowerDBAKlaas - I'm about to add -Force too All Add-Member - if you have some addmemebers, please add -Force as well. I'm getting errors when piping without it.

The only way to test a group policy is with the GP analyzer. I'm not that is available in CLI form, have never tried or searched. You generally have that available within the GPMC that is only available one a server OS.
I don't see this being a command that will be stable in any environment. There are to many controls at the domain level that can either prevent this or revert 15 minutes later. I always ask this to be enabled via a GP and not manually done on a given server.

Where we at with this one, @PowerDBAKlaas ? Keep waiting?

I cannot test this based on my computer security restrictions.  Last convo I had with @PowerDBAKlaas he thought that the graceful errors I am getting is good.  Not sure what needs testing.

heyyyyyy go get some rest, @gbargsley ! 😷

@gbargsley I made a minor change. If you would be so kind to give it one more go with this new version, just repeating the same test, on 'localhost'. If it hangs again, can you see what's in $env:windir\security\logs\Scesrv.log ? If it fails and you get an error and your prompt back, that would be good news.
@potatoqualitee @wsmelton current status: the function works on my systems. It fails on some, as Garry demonstrated above. That's probably always because of user rights, and similar to other commands. The one that bothers me is when it just hangs. Maybe the /quiet can overcome that.
I find it a very useful function, but I really want to solve this problem.
It would also be nice if someone has an idea on a 'replacement' for ShouldProcess for Invoke-Command.

@PowerDBAKlaas
Ok, with the latest version I get failed to connect to computer name and it seems to try and work against localhost.  Is this valid for testing or is more work needed on this PR.

That's looking good, @gbargsley  Thanks!
So it wasn't a permissions issue after all, or did your security change?
@potatoqualitee I think this behaviour is acceptable, meaning it's probably the best we can make of it. As @wsmelton says, it'll always depend on some settings beyond our control.
Can you think of more tests?

I can't think of a test but can I request one design change? Have it be -Type with a validated set instead of -IFI etc.

Sure. I considered that and decided to go the other way, but I can't remember why. 🤔 Probably because of the structure it once had. Seems totally valid now.
Allthough, -Type doesn't seem to be the correct name; they're the same type.
-Privilege?

It's the Type of Privilege - Type is used a ton within Microsoft's modules and so we adopted it hardcore in ours as well.

OK, that's done.
I'm using Test-RunasAdmin, is that still right or should I replace that?
And what do I use for credential (Windows)
 		[PSCredential][System.Management.Automation.CredentialAttribute()] 		$Credential,

It is now [PSCredential]$Credential, until we can figure out a thorough solution.
It appears the new Test-RunAsAdmin is now $null = Test-ElevationRequirement -ComputerName $instance -Continue

I will merge and fix 💃 MERCI!


SPEC: Redundant "http" scheme in metadata URLs

https://github.com/appc/spec/blob/master/SPEC.md#metadata-server list examples for URL endpoints like "Retrievable at http://$AC_METADATA_URL/acMetadata/v1/container". The default for "AC_METADATA_URL" is listed as "http://<IP_ADDRESS>" (already includes a scheme).
This is at least confusing, but probably just wrong.

You're right, thanks for pointing that out. Patch posted.

You're right, thanks for pointing that out. Patch posted.

lgtm


Security fixes

This fixes chnm/systems#259. Tests are passing and builds completing.

Just kidding, I guess it doesn't fix it yet.

I see the problem with this currently failing, the govulncheck.yml is using the version in main for Go 1.19.


fix(consumer): fix stopping

Consumer was not properly waiting for consuming everything before stopping. It is fixed now.
Because Consumer was passed not as pointer, but value, done channel was always nil -> no waiting to finish consuming.

lgtm


Fix keystore permissions when saving

Resolves #105
The command wasn't executed as admin, and now, we are using standard ways to execute those commands with admin permissions
Changes:

Execute keystore password saving as admin using standard ways

Types of changes
What types of changes does your code introduce?
Put an x in the boxes that apply

[ ] Bugfix (non-breaking change which fixes an issue)

Testing
Requires testing

[x] Yes

In case you checked yes, did you write tests?

[x] No

Codecov Report
Base: 85.18% // Head: 84.05% // Decreases project coverage by -1.12% :warning:

Coverage data is based on head (44bfea0) compared to base (ae43f67).
Patch coverage: 18.18% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #135      +/-   ##
===========================================
- Coverage    85.18%   84.05%   -1.13%
===========================================
  Files           34       35       +1
  Lines         2012     2089      +77
===========================================
+ Hits          1714     1756      +42
- Misses         239      266      +27
- Partials        59       67       +8

Flag
Coverage Δ

unittests
84.05% <18.18%> (-1.13%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

cli/keys.go
60.97% <0.00%> (-1.53%)
:arrow_down:

internal/pkg/commands/commands.go
100.00% <ø> (ø)

test/test.go
70.83% <0.00%> (-11.43%)
:arrow_down:

internal/pkg/commands/cmd_runner_unix.go
92.22% <100.00%> (+0.36%)
:arrow_up:

cli/root.go
76.82% <0.00%> (-4.60%)
:arrow_down:

cli/cli_utils.go
88.88% <0.00%> (-1.94%)
:arrow_down:

cli/cli.go
68.25% <0.00%> (-1.20%)
:arrow_down:

cli/version.go
100.00% <0.00%> (ø)

configs/init.go
100.00% <0.00%> (ø)

internal/utils/version.go
83.33% <0.00%> (ø)

... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


[5.9] Add successfully resolved external references to reference index

Explanation: Tracks successfully resolved external references the same as successfully resolved local references, allowing the same code path to be used during rendering.
Scope: Externally resolved content.
Issue: rdar://108974747
Risk: Low. Isolated and limited scope.
Testing: New test verify that the external topic reference and its resolved content exist in the Render JSON for the page that linked to it.
Original PR: #582
Reviewers: @ethan-kusters

@swift-ci please test


Add product catalog query module

Summary and Scope
This adds a new module, query.py, which clients can use to query the cray-product-catalog Kubernetes ConfigMap to get information about the products installed on the system.
This new module is not exposed as an executable script in the Docker image like catalog_update and catalog_delete. Rather, it is meant to be used as a library in other Python projects.
This repository is a logical place for such a library because the query code must validate the product catalog data against the schema before processing, and this repository already contains the schema definition and validation code.
The catalog_update and catalog_delete scripts are mostly unaffected. One minor change was made to define the load_k8s function in a common util module since it is now used in 3 places.
This change is backwards compatible. Existing users of the catalog_update and catalog_delete scripts are not affected.
Issues and Related PRs
List and characterize relationship to Jira/Github issues and other pull requests. Be sure to list dependencies.

Resolves CRAYSAT-1314

Testing
Tested on:

Unit tests have been run in a local Python virtualenv on my macbook.
Testing in a Python virtualenv occurred on baldar.

Test description:
New unit tests have been added.
Tested by installing into a Python virtualenv on baldar and running a script which used the ProductCatalog class to print information about installed versions of products.
Still need to test by running catalog_update in the container with podman to ensure that products that update the product catalog data like this still work.
Still need to test by deploying a K8s job that updates the product catalog by calling catalog_update.py.
Would also like to test by deploying a job in K8s that runs a single python command to get installed versions of the SAT product to ensure that the load_k8s function works as expected to load the K8s config while running in a K8s pod. This is not an expected usage scenario, but it would be good to know the code works as expected.
How were the changes tested and success verified? If schema changes were part of this change, how were those handled in your upgrade/downgrade testing?
Risks and Mitigations
Risk should be minimal as this mostly adds new code that can be used by other Python projects.
Pull Request Checklist

[ ] Target branch correct
[ ] Testing is appropriate and complete, if applicable
[ ] Is a new version being released? Update https://github.com/Cray-HPE/cray-product-catalog/wiki/CSM-Compatibility-Matrix
[ ] HPC Product Announcement prepared, if applicable

There is still some testing I would like to do as noted in the PR description, but I'm trying to figure out how to get builds to work on this PR from my fork. Specifically, I have noted that the license check is missing, and I expect it may take issue with how I've done my license notices in Python module docstrings rather than comments.

Since builds don't work on forks, I'm going to close this PR from my fork and open a new pull request from a branch of this repo instead.


Fix Pachyderm links

Although the new links look good, I would wait to receive a confirmation about the desired links to use, because the same wrong ones are present in RHODS: RHODS-7424.

https://github.com/red-hat-data-services/odh-deployer/pull/310

please run the PR test in Jenkins

It worked https://opendatascience-jenkins-csb-rhods.apps.ocp-c1.prod.psi.redhat.com/job/rhods-ci-pr-test/1716/robot/report/files/test_report.html
I removed later the ProductBug


Bluetooth: controller: split: Assorted control procedure fixes

These are some of ported commits from legacy controller implementation to split controller.
See individual commits for details.

@wopu-ot @thoh-ot can I get some reviews here? How does this PR go with your internal testing?

@wopu-ot @thoh-ot can I get some reviews here? How does this PR go with your internal testing?

Internal testing looks okay, but I am struggling to find time to review the code.

@wopu-ot ok.
@aescolar do we need to merge before v2.1 code freeze or we can take the merge starting next week when I will concentrate on getting conformance test passing? I have few more commits waiting in my private branch due to dependencies that need to be sent as PR.

@aescolar do we need to merge before v2.1 code freeze or we can take

This is a fix, not a new feature, so it should be ok to merge it after feature freeze. But it is also quite extensive, so it would be nice to get it in relatively soon to have some more mileage before the release. Meaning, your call when to merge it :)

@carlescufi As agreed yesterday, this PR would then be mergable, If you still think so, please do the honors :)


Robust testing for prometheus metrics in Agent and Controller

Describe the problem/challenge you have
Extend the existing e2e test or add new unit tests if possible to check on the accuracy of metrics values.
Describe the solution you'd like
Currently, prometheus metrics are relying on manual tests. E2e test covers only whether metrics are available in output or not. The values of metrics should be checked for accuracy.
One possibility: testSetup in Prometheus e2e test can be extended to deploy/delete pods, create/delete network policies etc. At least metrics such as network policy, pod count can be covered. In addition, we may also antctl (tests/e2e/antctl_test) to get the expected values from the agent/controller to compare with metrics gathered by API.
Anything else you would like to add?
Testing is necessary to get the code right and will be easily maintainable if there are any future changes in existing code; it can be in non-metrics code as well that metrics depend on.
Please either extend the existing e2e test or have more integration/unit tests, but do not add new e2e test.

Can this be tested with unit tests / integration tests so that we keep the number of e2e tests under control?

Can this be tested with unit tests / integration tests so that we keep the number of e2e tests under control?

Sure, Antonin. I updated the comment.

Assigning this to Yuki as he was planning to add tests for the metrics he worked on. Please let me know if that doesn't work for you @yktsubo

Thank you, I'll add tests for newly added agents metrics.


Feature/ansible inventory

This PR implements an Ansible Inventory Plugin that allows users to use hosts from within Icinga 2 as hosts within Ansible. Using Icinga 2's API Ansible inventories are built dynamically
Features

Use of cache via Ansible Cache Plugins to reduce frequency of API calls (jsonfile was tested)
Filtering of hosts right when making the API call
Filter by

host name
zone
group membership
custom (write the filter yourself)
custom variables

Builds Ansible groups based on Icinga groups
Use of Ansible Constructed Plugin to build groups based on available host variables (keyed_groups)
Use of either host name, address or address6 as ansible_host
Use of arbitrary

Quick example of an inventory definition:
inventory-icinga.yml
---
plugin: icinga.icinga.icinga
url: https://example.com
user: root
password: root
validate_certs: true

# Create groups 'icinga_linux_distribution_debian', 'icinga_linux_distribution_rhel', etc.
keyed_groups:
  - prefix: "icinga_linux_distriubtion"
    key: vars.distribution

# Set 'ansible_user' equal to the host's custom variable 'vars.ansible_user'
ansible_user_var: "vars.ansible_user"

filters:
  # Only match hosts that are in zone 'satellite1'
  zone:
    - satellite1
  vars:
    match:
      # ... and run those distributions except 'ubuntu'
      linux_distribution:
        - '!ubuntu'
        - 'debian'
        - 'centos'
        - 'rhel'
        - 'suse'
    in:
      # ... and have on of those services in 'vars.services' array
      services:
        - 'dns'
        - 'database'
    is:
      # ... and have variable 'vars.ansible_managed' set to true AND have variable 'ansible_user' set
      ansible_managed: true
      ansible_user: set

I believe this to be a quite useful feature that many people could benefit from.
If any changes would need to be made to the structure, let me know and I will gladly change things around to fit the needs.

I think it's a very nice addition. I will give the code a closer look next week.
@Donien Just FYI, the coverage currently:
Name                                  Stmts   Miss  Cover   Missing
-------------------------------------------------------------------
plugins/inventory/icinga.py             264    149    44%   155-161, 189-190, 199-206, 280, 317-386, 390-417, 422-477, 487-488, 494-546

@mkayontour I think this is good to go.

Just a question: There is already an icinga2 inventory plugin in the ansible community repo: https://docs.ansible.com/ansible/latest/collections/community/general/icinga2_inventory.html
Why an additional one? :)

@MarcusCaepio @martialblog
First of all: Yes, there already is a plugin that achieves basically the same goal.
The 2 main differences are:

The way you call the plugin (especially looking at the filters)
The outputs the plugins produce

In the plugin from this PR, Icinga 2 API filters are abstracted for certain criteria ( e.g. zone: [ "main", "satellite1", "satellite2", ... ] ), (IMHO) making it easier to filter results without having to know the exact syntax the API needs.
The second aspect are the host variables. The community plugin creates the following host variables (underneath a common key):

address
address6
display_name
groups
name
state
state_type
templates
vars
zone

The plugin from this PR takes all attributes of any given Icinga 2 host and puts them into host variables (with a common prefix).
Some examples:

check_command
command_endpoint
last_check_result
notes_url

I personally believe that an Ansible Collection should include everything that is relevant to the topic of that collection.
In the case of the Icinga Collection, an inventory plugin fits neatly.
I also think that we (people that work on this collection) should consider ansible-core as the starting point. So if people install this collection, they should have access to an inventory plugin for Icinga without having to install ansible with its collections.
Of course this is just my opinion and I'm open to discussion.

What the community plugin serves and what not are in the user's hand and can be configured in the x.icinga2.yml config file. e.g. with the compose parameter and / or groups :) See the docs: https://docs.ansible.com/ansible/latest/collections/community/general/icinga2_inventory.html
# my.icinga2.yml
plugin: community.general.icinga2
url: http://localhost:5665
user: ansible
password: secure
host_filter: \"linux-servers\" in host.groups
validate_certs: false
inventory_attr: name
groups:
  # simple name matching
  webservers: inventory_hostname.startswith('web')

  # using icinga2 template
  databaseservers: "'db-template' in (icinga2_attributes.templates|list)"

compose:
  # set all icinga2 attributes to a host variable 'icinga2_attrs'
  icinga2_attrs: icinga2_attributes

  # set 'ansible_user' and 'ansible_port' from icinga2 host vars
  ansible_user: icinga2_attributes.vars.ansible_user
  ansible_port: icinga2_attributes.vars.ansible_port | default(22)

A result with the compose part enabled, for example, looks like this:
{
    "ansible_host": "<IP_ADDRESS>",
    "display_name": "myserver.domain.com",
    "hostname": "asdf.domain.com",
    "icinga2_attrs": {
        "address": "<IP_ADDRESS>",
        "address6": "",
        "display_name": "myserver.domain.com",
        "groups": [],
        "name": "asdf.domain.com",
        "state": "on",
        "state_type": 1,
        "templates": [
            "asdf.domain.com",
            "default-host"
        ],
        "vars": {
            "agent_endpoint": "asdf.domain.com",
            "icmp_cpl": 100,
            "icmp_crta": 500,
            "icmp_packets": 1,
            "icmp_wpl": 100,
            "icmp_wrta": 200,
            "tcp": {
                "22": {
                    "check_interval": 3600,
                    "notes": "ssh",
                    "tcp_port": "22"
            }
        },
        "zone": "master"
    },
    "state": "on",
    "state_type": 1
}

Don't get me wrong, I have nothing against your pull request. I just think that if there is already a plugin that is in and maintained by the ansible community, then one should get together and extend that plugin if necessary (e.g. add the check_command to the output), rather than reinventing the wheel entirely. Or there should be a discussion between the ansible community and icinga, which plugin should be the one and be placed in the icinga collection


distances_from_embeddings

Thanks for your awesome project for java using openai sdk.
I want to use embeddings but when I read open-ai https://platform.openai.com/docs/tutorials/web-qa-embeddings best practice
I don't know how  to use the offical  python function "distances_from_embeddings" for solve the problem
can you add the embedding-utils or other way to solve the problem

The same problem

如何搜索列表<嵌入>数据?

How to search List data?

How to search Embedding data?

Yes，I can request openAi embedding fine by your sdk.But my question is what I do when after request over.I see the documentation .
https://platform.openai.com/docs/tutorials/web-qa-embeddings
They use the function which 'distances_from_embeddings' .I think it's a important thing for tune the gpt.


Blog post 0003

A new blog post 0003 about domain name move between CloudFront distributions is introduced.
Hashtags of the blog post 0002 are also updated.

How about to include "CDK" in the hashtags?


Support localized home directories

Default directories in the home, such as Downloads and Documents, are localized by renaming them when the user logs in. This is currently incompatible with the whitelist definitions and should be addressed by looking up the dir names from XDG in the future.

Fixed in dfa03ffe


CanActivate Lifecycle hook is unable to protect Component from being accessed

The component is not restricted from unauthorized access, when trying to access it

Here is what my code looks like

import 'package:angular/angular.dart';
import 'package:angular_router/angular_router.dart';
import 'package:angular_components/angular_components.dart';
import 'package:migrate/src/dashboard_component/dashboard_component_service.dart';
import 'package:migrate/src/utils/config.dart';
import 'package:migrate/src/utils/validator.dart' as Validator;
import 'package:angular_forms/angular_forms.dart';

FutureOr<bool> authorizable(ComponentInstruction next, ComponentInstruction prev) {
    if (Config.token != null) return true;
    return false;
}

@Component(
  selector: 'root',
  templateUrl: 'dashboard_component.html',
  styleUrls: const ['dashboard_component.css'],
  directives: const [
      materialDirectives,
      CORE_DIRECTIVES,
      formDirectives,
      ROUTER_DIRECTIVES
  ],
  providers: const [DashboardComponentService],
)

class DashboardComponent implements OnInit, OnChanges, CanActivate {
  bool sourceSSL;
  bool destinationSSL;
  String srcEmail;
  String srcPassword;
  String srcServerName;
  String srcPort;
  String destEmail;
  String destPassword;
  String destServerName;
  String destPort;
  ValidityCheck get checkEmailValid => Validator.CheckEmailFormat;
  ValidityCheck get checkValid => Validator.CheckRequired;
  static List<Map<String, dynamic>> appServices = Config.services;
  // Providers
  final RouteParams _routeParams;
 final Location _location;
  //View Manipulation variables
  bool showSnackBar;
  String snackMessage;
  DashboardComponent(this._routeParams, this._location): sourceSSL = false,
                        destinationSSL = false,
                        srcEmail = "",
                        srcPassword = "",
                        srcServerName = "",
                        srcPort = "",
                        destEmail = "",
                        destPassword = "",
                        destServerName = "",
                        destPort = "";
 @override
  Future<Null> ngOnInit() async{
    // TODO: implement ngOnInit
    var _tempEmail = _routeParams.get('email');
    srcEmail = _tempEmail;
    updateSourceConfigurations();
    updateDestinationConfigurations();
  }

  Future<Null> checkConfiguration() async{}
  goBack() {
    _location.back();
  }

  bool checkValues(){
      bool isValid = false;
      RegExp exp = new RegExp(r'[0-9A-Za-z][-._0-9A-Za-z]*[0-9A-Za-z]@[0-9A-Za-z][-._0-9A-Za-z]*[0-9A-Za-z].[0-9A-Za-z]{2,5}');
      if ((!srcEmail.isEmpty) && (!destEmail.isEmpty) && (exp.hasMatch(srcEmail) == true) && (exp.hasMatch(srcEmail) == true) && (!srcPassword.isEmpty) && (!srcServerName.isEmpty) && (!srcPort.isEmpty) && (!destPassword.isEmpty) && (!destServerName.isEmpty) && (!destPort.isEmpty)) {
        isValid = true;
      }
      return isValid;
  }

  //Updating CheckState based on port value
  bool checkSourceState(){
    if (srcPort == '143') return false;
    return true;
  }

  bool checkDestinationState(){
    if (destPort == '143') return false;
    return true;
  }
  void destinationSSLStateChange(dynamic event) {
    destinationSSL = event;
    event == false ? destPort = '143' : '993';
  }

  void sourceSSLStateChange(dynamic event) {
    sourceSSL = event;
    event == false ? srcPort = '143' : '993';
  }

  @override
  ngOnChanges(Map<String, SimpleChange> changes) {
    // TODO: implement ngOnChanges
  }

 onSrcDropdownVisibleChange(event) {
    if((event is bool) && event == false) {
      updateSourceConfigurations();
    }
  }

  onDestDropdownVisibleChange(event) {
    if((event is bool) && event == false) {
      updateDestinationConfigurations();
    }
  }

 void updateSourceConfigurations(){}
 void updateDestinationConfigurations(){}
  // TODO: implement fn
@override
  Function get fn => authorizable;
}```

To get the code properly formatters use ``` instead of `
What is the actual behavior and what is the expected behavior?

The component above has implements CanActivate { but the implementation of canActivate() is not included.

Accroding to the doc, the fn function handle the CanActivate implementation
Can you provide me with an example?

This looks like version 1.0.x of package:angular_router, in which case components shouldn't implement CanActivate, rather it's used as an annotation on the route.
@CanActivate(authorizable)
@Component(...)
class DashboardComponent {
  ...
}

Note that support for this annotation was removed in version 1.0.1, so you'll have to explicitly pin version 1.0.0. That said version 1.0.0 of the router is deprecated and not maintained.
If you're willing to try out the latest Angular alpha version, there's a new router implementation where you can use CanActivate as an interface like this.
Note this requires changing your dependencies on angular and angular_router to include the latest alpha versions:
angular: ^5.0.0-alpha
angular_router: ^2.0.0-alpha


Question about converting mamba2 to onnx

Hi, I would like to ask how to convert a mamba2 model to onnx inference. When I try to convert, I encounter an error: cols = tl.array(0, BLOCK_N), where BLOCK_N=min(MAX_FUSED_SIZE, triton.next_power_of_2(N)) in the file layer_norm.py. Greatly looking forward to your reply, thanks.

Hello, I'm not very familiar with ONNX, but it seems that its doesnt like Pytorch models that are written in Triton.. (see https://github.com/state-spaces/mamba/issues/33)
And as of now, the mamba 2 implementation in this repo is exactly the same as the one in mamba_ssm (contrary to mamba1 which has been completely torchified). If you look into the closed issues, you will see people have successfully converted mamba1 models with ONNX.
But for mamba2, I don't know how to provide a solution for you problem. One of the next update for mamba.py is to actually torchify mamba2 so at that point I think the ONNX conversion will work.


Snippet gets "stuck" in certain situations

Make sure you have done the following

[X] I have updated to the latest version of blink.cmp
[X] I have read the README

Bug Description
I've noticed this happening mostly in this particular situation, so I don't know how "general" it is.  If I select an LSP completion for a React component prop, I get the associated "bracket" inserted as well (either quotes or brackets, depending).  If I swap over from the quotes to a bracket, the plugin enters snippet mode.  I'm not sure if that's even expected, but I'm fine with it.  If I then type something and press <Tab>, it doesn't complete the snippet.  It seems to get "stuck" until something happens?  I can't quite tell what triggers exiting the snippet.
Here is an example:
https://github.com/user-attachments/assets/068944c6-56c0-4a80-922c-77a8da58e6b6
Not sure what's going on, but any help would be appreciated 😄
Relevant configuration
opts = {
		highlight = {
			use_nvim_cmp_as_default = true,
		},
		keymap = {
			preset = "super-tab",
		},
		sources = {
			completion = {
				enabled_providers = { "lsp", "path", "snippets", "buffer", "lazydev" },
			},
			providers = {
				lsp = { fallback_for = { "lazydev" } },
				lazydev = { name = "LazyDev", module = "lazydev.integrations.blink" },
			},
		},
		trigger = {
			completion = {
				show_in_snippet = false,
			},
		},
		windows = {
			autocomplete = {
				draw = "minimal",
			},
			documentation = {
				auto_show = true,
			},
		},
	},

neovim version
NVIM v0.11.0-dev-1092+g0da4d89558
blink.cmp version: branch, tag, or commit
main

This seems like an issue with the built-in snippets rather than with blink.cmp. Are you able to reproduce this by using the built-in vim.snippet.expand and vim.snippet.jump?

Oh interesting, I didn't think about that... the only alternative nvim app I have is based on https://gist.github.com/MariaSolOs/2e44a86f569323c478e5a078d0cf98cc and I'm not totally sure how to replicate what's happening here with that 🤔
I tried just making a keymap for vim.snippet.expand and used tab within it with the setup I'm using from that gist, and it seemed to have no issue.  Just for clarity, like:

type the prop that's a string type
<C-n> to accept the LSP completion
put in open bracket
call vim.snippet.expand with a keybind in insert mode
press tab to to jump through snippet

That seemed to work fine 😕 I did also try adding nvim-autopairs to the mix, since I'm using that as well.  It didn't seem to change anything other than placing the brackets and my cursor after them 😬

Yeah, it looks like this is an issue with the built-in snippets. I was able to reproduce by creating two keybinds:
vim.snippet.expand('test = "$1"')

if vim.snippet.active({ direction = 1 }) then
  vim.snippet.jump(1)
end

and the behavior was the same. Lmk if you find a way around this though, I also find this behavior pretty confusing :smile:


Impossible to use the plugin

Hello,
I followed the installation doc and everything seems ok in my configuration but I can't get ansible-lint to work in intellij.

I've tried looking in the logs but I can't see anything.
Do you have a way of debugging the problem?
Thank you

As documented in the README file:

By default, the plugin will only start linting YAML-files if your project root contains one of these configuration files:
.ansible-lint
.config/ansible-lint.yml

Sorry; I'm afraid I can't help you fix your setup based on that information.

Ok I just found it!

:+1:

There's a conflict with this plugin: https://plugins.jetbrains.com/plugin/12626-orchide--ansible-language-support
As soon as I deactivate it, everything works perfectly. I'm not sure if I should also open an issue to the other plugin or if you have the means to solve this problem?

This plugin is not even open-source.
Sorry... but I neither have time nor interest to deal with it.
However, thanks for reporting back.


adding pdf OCR support

to create OCR support for .pdf documents besides images

Added OCR support for .pdf documents.
It remains to be added a preprocessing algorithm for better results.
For now, it stays as simple as is.


Vue productionTip in console

With the addition of vue components in HistomicsUI, we now see the vue production tip on the console (You are running Vue in development mode. Make sure to turn on production mode when deploying for production.), even when the girder client is built in production mode.
We could suppress this by doing import Vue from 'vue/dist/vue.min.js'; instead of import Vue from 'vue/dist/vue.js';, but I don't know if that makes developing too annoying.
@naglepuff Any thoughts on the right way to address this?  I'm fine with just switching to vue.min.js, but maybe there is a better solution.

I'm not sure what the best way to address this is, but I'm happy look into it and see what insight I can find.

I'm gonna leave this stack overflow post here so I don't lose it. Seems like it could be a valid option once I figure out how to add it to our webpack helper files.


Reference solution fails for scale_samples models greater equal 64

Running the Reference solution on scale_samples 1, 2, 4, 8, 16, 32 works just fine, the greater examples fail with:
Program exited with errorCalledProcessError(1, 'dotnet bin/netcoreapp3.1/NMFSolution.dll reference')
Running benchmark: tool = Reference, scenario = scale_samples, model = 256
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\zuend\IdeaProjects\TTC2021LabWorkflow\ttc21incrementalLabWorkflows\models\scale_samples\256\results\initialResult-Reference.xmi'.
at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at System.IO.File.Create(String path)
at TTC2021.LabWorkflows.Commandline.SolveVerbBase.Initial() in C:\Projects\ttc2021\solutions\Reference\Commandline\SolveVerbBase.cs:line 74
at TTC2021.LabWorkflows.Commandline.SolveVerbBase.ExecuteCore() in C:\Projects\ttc2021\solutions\Reference\Commandline\SolveVerbBase.cs:line 36
at TTC2021.LabWorkflows.Commandline.VerbBase.Execute() in C:\Projects\ttc2021\solutions\Reference\Commandline\VerbBase.cs:line 15

I will take a look into that.


[SPARK-44205][SQL] Extract Catalyst Code from DecimalType

What changes were proposed in this pull request?

DecimalType contains code that needs Expression and Literal from Catalyst which we can move out so simplify it.
Why are the changes needed?

To simplify DataType as a whole to make it a simpler interface.
Does this PR introduce any user-facing change?

No
How was this patch tested?

Existing UT

@hvanhovell @cloud-fan


Add basic TextRepresentable support to Text

Basic support with known limitations:

cannot control countryFlag size
concatenated Icon sizing is incorrect for accessibility sizes
concatenated Text does not support TextLinks (only formatting)

@PavelHolec we should have an issue tracking the limitations outlined in the description.

@PavelHolec we should have an issue tracking the limitations outlined in the description.

Added as #295


Navigation bar class expression

Fixes #5258
Should wait for #8622.

Hi @andy-ms, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

It looks like you're a Microsoft contributor (Andy Hanson). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

:+1:

This should wait on #8811 so we can add SyntaxKind.ClassExpression to the case there.

This should probably also wait on #8812.

Closed in favor of #8958


EXPORT_FOLDER doesn't support absolute paths

It was tested locally, but for Adoptium we need to be working with absolute paths.
See https://github.com/adoptium/installer/issues/559
export 'RESULTS_FOLDER=/cygdrive/e/workspace/Windows_Installer_Test/aqa-tests/functional/wintps/WindowsTPS/wrapper/../E:/workspace/Windows_Installer_Test/aqa-tests/\TKG\output_16775375532924\WinTPSTests_0/result'

@RadekCap  I commented on the same thing in PR fixing _INPUT. It can be fixed by canonizing paths, see:
https://github.com/rh-openjdk/WindowsTPS/pull/27#issuecomment-1450712766

Problem is following. Testsuite internally does not like relative paths. That's probably why workaround with interpreting them relative to script location was done (prefix is added to configured paths). This however, apart from being confusing also does not work, if absolute paths are configured. Doing canonization instead, will make this work with both absolute and relative paths.

Fixed by #30


Missing CloudSql Proxy Param for Provisioner and Migrator

Missing CloudSql Proxy for Provisioner and Migrator

Description
Changes proposed in this pull request:

Missing CloudSql proxy for provisioner and migrator.

Related issue(s)

/test pre-main-control-plane-reconciler-e2e-latest-release

/test pre-main-control-plane-reconciler-e2e-latest-release

/test pre-main-control-plane-reconciler-e2e-latest-release


Make Hook Tests Working again

make the hook test work again
i dont know why package.json always flips between NewLine and no NewLine

Note More changes to test (outsource, instead of a big file) will follow when other PR's are merged

Coverage increased (+0.8%) to 85.577% when pulling 2c8f2a62aa844777409293e48b37bf012dbea580 on hasezoey:hookfix into a6581a4780eb4068cdc51ac3c6c7e300c7564c5b on szokodiakos:master.