Can we use org.sso_response to identify active users that don't commit changes to our repos?

Background

We have an automated process for removing inactive user accounts. This strengthens our access management process and helps keep on top of licences.
However, every month we have to add users back on after they have been removed. This would appear to happen because we have users who don't make changes to code, however they have access to GH for read-only access to repos, access to workflow tools such as Zenhub that needs a GH account, and we also use GH for SSO purposes for various tools.
We need a way to be able to also identify that group of users so that we don't erroneously remove their access. That will create a better user experience and reduce all the end of month support tickets to add a handful of users back onto GH.
Perhaps be can use org.sso_response from the audit logs to identify these active users?
CAUTION - We need to be care how we use the audit log data as it may contain secrets and PII.
Questions / Assumptions

Can we user these new features to address this problem.
Acceptance Criteria

[ ] User removal process can be updated to avoid removing users who don't commit to repos.

Reference
How to write good user stories

org.sso_response is used when SSO is enabled on a GH Org. Half of the MoJ users have SSO setup. AP Org doesn't have SSO setup. This option wont work. But have found an API call that can get that last audit log entry per user and read the date of that entry. This will work on both MoJ and AP Org and tell us when the user was last active on GH.

using audit log in updated script: https://github.com/moj-analytical-services/inactive-users/blob/3ddc2eeeb49f8da34d8be8e21ae2b79671ebd7a1/scripts/python/delete-dormant-users.py#L264


dependabot integration for keep track of segmentio cron libs

https://github.com/dependabot

I think we can look this one https://github.com/renovatebot/renovate too


Add CSP and related headers

📚 Context
Let's harden our security policies!
🧠 Description of Changes
This PR adds the following headers to both next.config.js (for local development) and netlify.toml (for prod):

Strict-Transport-Security - to force HTTPs
X-Content-Type-Options - to turn off content type sniffing (helps avoid injection of script and css hacks)
Content-Security-Policy - to specify which external content we allow in our site, via an allow-list.

👀 How to review

Review the code as usual
MOST IMPORTANTLY, review the deploy preview, clicking through all links you can find. Make sure the JS console is open. CSP errors will appear in red.

💥 Impact

Size:

[x] Small
[ ] Not small

🌐 References

More info: https://www.notion.so/snowflake-corp/Streamlit-domain-vulnerabilities-32533973882d429daeb981ed53173d85

Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

The preview link is non-functional for me.

Oh, I know 😃 . I spent some time debugging yesterday and found the problem: it's at markdown library we're using in the GDPR banner. I'll try to replace it.

I'm getting errors on these pages:

/get-started/installation/anaconda-distribution (POST)
/library/api-reference (uncaught)
/library/api-reference/write-magic/st.write (POST)
/library/api-reference/write-magic/st.write_stream (POST)
(I checked several other Autofunction pages, and got POST errors, too.)
/library/advanced-features (uncaught)
/library/advanced-features/dataframes (POST)
/library/advanced-features/forms (POST)
/library/advanced-features/multipage-apps/custom-navigation (POST)
/library/advanced-features/widget-behavior (POST)

Let me know if you want more @sfc-gh-tteixeira.

I'm getting errors on these pages:

Chiming in to say the listed errors occur on the live site today and may likely be unrelated to changes from this PR. The 403 response is from embedded apps denying /api/v1/app/event/open requests to sites not adhering to Cloud's strict-origin-when-cross-origin policy.

I'm getting new red errors, even on the home page:

Refused to connect
Failed to fetch
Failed to load Analytics.js
Refused to connect

There is also a yellow error:

Your CSP policy is missing permissions required in order to run Analytics.js 2.0.

I don't really know what I'm looking for besides opening each of the pages and reporting what I see in red in the console. So I'll mark the PR approved for you to merge when you get to the correct threshold. Let me know if you want me to click through more pages.

I'm getting new red errors, even on the home page

@sfc-gh-dmatthews you're right!! Turns out my ublock Origin extension was blocking segment requests, so I didn't see the segment-specific CSP errors. I do see them now 👍 (thanks for mentioning Analytics.js; got me thinking about adblock extensions).
The POST errors and uncaught exceptions from https://github.com/streamlit/docs/pull/980#issuecomment-1980100445 are unrelated to this PR, but these segment ones are definitely CSP issues.

@sfc-gh-dmatthews I think I have everything covered now. PTAL!

Definitely related to CSP headers:

auryc.worker.js:6 Refused to connect to 'https://mt.auryc.com/v1/event' because it violates the following Content Security Policy directive: "connect-src 'self' https://*.streamlit.app/ wss://*.streamlit.app/ https://streamlit.ghost.io/ghost/api/ https://api.segment.io/ https://cdn.segment.com/ https://client-api.auryc.com/ https://www.google-analytics.com/ https://stats.g.doubleclick.net/".

Things that are probably not related to CSP headers:

Errors related to embedded apps. (POST ... 403 Forbidden)
Uncaught Error: Minified React error #418 on the API reference page and generally on most pages with RefCards. Also shows on other pages with a hard refresh, but not if navigating there from another page. 🤔
Prism doesn't support this language: none on /streamlit-community-cloud/deploy-your-app/app-dependencies (I think I can fix that one myself. 😄)


Custom validations not running if default types fail.

May be a copy of https://github.com/colinhacks/zod/issues/68 but I'm still seeing this issue. Using version: 2.0.0-beta.26
const someSchema = z
  .object({
    name: z.string().nonempty("name required."),
    lower_bound: z.number(),
    upper_bound: z.number(),
  })
  .refine((val) => val.lower_bound < val.upper_bound, {
    message: "Upper bound must be greater than lower bound.",
    path: ["lower_bound", "upper_bound"],
  });

  console.log(
    someSchema
    .safeParse({name: "", lower_bound: 100, upper_bound: 0})
    .error
    .issues
  );

  // OUTPUT:
  // [
  //   {
  //     "code": "too_small",
  //     "minimum": 1,
  //     "type": "string",
  //     "inclusive": true,
  //     "message": "name required.",
  //     "path": [
  //       "name"
  //     ]
  //   }
  // ]

Having the same issue using 2.0.0-beta.29. The desired result is to have all errors output at the same time.

This is a hard issue to solve. Refinements assume that the input has already been validated properly. It's why Zod is able to strongly type val. If a type error has already occurred during type checking, Zod can't guarantee that val is of type { name: string, lower_bound: number, upper_bound: number }. Which means the refinement will possibly throw.
A few potential solutions:

Currently Zod doesn't catch errors thrown in refinements. Perhaps it should. This way I could "safely" run all refinements and
Zod could try to look at the errors and guess if its safe to run the refinement based on the codes of the issues that have been detected so far. For instance ZodIssueCode.invalid_type could be considered "fatal" but ZodIssueCode.custom_issue would not. Not a perfect solution.

I'll probably do with #1 but that likely won't arrive until Zod 3.

This is a hard issue to solve. Refinements assume that the input has already been validated properly. It's why Zod is able to strongly type val. If a type error has already occurred during type checking, Zod can't guarantee that val is of type { name: string, lower_bound: number, upper_bound: number }. Which means the refinement will possibly throw.
A few potential solutions:

Currently Zod doesn't catch errors thrown in refinements. Perhaps it should. This way I could "safely" run all refinements and
Zod could try to look at the errors and guess if its safe to run the refinement based on the codes of the issues that have been detected so far. For instance ZodIssueCode.invalid_type could be considered "fatal" but ZodIssueCode.custom_issue would not. Not a perfect solution.

I'll probably do with #1 but that likely won't arrive until Zod 3.

@colinhacks

But you don't want all the refinement errors to appear if a completely incorrect value is passed into schema.

Could refinements catch all errors except for that single case?

@colinhacks

But you don't want all the refinement errors to appear if a completely incorrect value is passed into schema.

Could refinements catch all errors except for that single case?

Possibly. I could consider certain issues "fatal" and others non-fatal. For instance, the issue thrown by z.string().nonempty("name required.") is a ZodTooSmallIssue which is usually non-fatal. It's not a very elegant solution though.

Possibly. I could consider certain issues "fatal" and others non-fatal. For instance, the issue thrown by z.string().nonempty("name required.") is a ZodTooSmallIssue which is usually non-fatal. It's not a very elegant solution though.

I've also faced this issue. A workaround which I found was to split the original schema into 2 and intersect them:
const schema1 = z.object({
  name: z.string().nonempty("name required."),
})

const schema2 = z
  .object({
    lower_bound: z.number(),
    upper_bound: z.number(),
  })
  .refine((val) => val.lower_bound < val.upper_bound, {
    message: "Upper bound must be greater than lower bound.",
    path: ["lower_bound", "upper_bound"],
  });

const someSchema = z.intersect(schema1, schema2);

The main issue with this approach is that intersect accepts only 2 arguments and sometimes I need to intersect more than 2 objects. union accepts an array and I would expect intersect and union to have the same API. @colinhacks is there a limitation that doesn't allow intersect to accept an array?
Also, I was wondering if I could use merge or extend the objects but the final object acts as in the original example. refine is invoked only when the whole object is valid, not the sub-object.

I've also faced this issue. A workaround which I found was to split the original schema into 2 and intersect them:
const schema1 = z.object({
  name: z.string().nonempty("name required."),
})

const schema2 = z
  .object({
    lower_bound: z.number(),
    upper_bound: z.number(),
  })
  .refine((val) => val.lower_bound < val.upper_bound, {
    message: "Upper bound must be greater than lower bound.",
    path: ["lower_bound", "upper_bound"],
  });

const someSchema = z.intersect(schema1, schema2);

The main issue with this approach is that intersect accepts only 2 arguments and sometimes I need to intersect more than 2 objects. union accepts an array and I would expect intersect and union to have the same API. @colinhacks is there a limitation that doesn't allow intersect to accept an array?
Also, I was wondering if I could use merge or extend the objects but the final object acts as in the original example. refine is invoked only when the whole object is valid, not the sub-object.

I also just run into this problem :(

This is a hard issue to solve. Refinements assume that the input has already been validated properly.

Another idea that comes to my mind is to add a new method that would be like .superRefine except it wouldn't guarantee that the input will have correct type/shape (the callback could even accept unknown). Since it would be a new method it would not cause a breaking change. WDYT @colinhacks?


nautobot-server loaddata errors

Environment

Nautobot version (Docker tag too if applicable): 34c06ba7a177 (v2.0.0b1)
Python version: 3.8
Database platform, version:
Middleware(s):

Steps to Reproduce

dumpdata as per Nautobot documentation (https://docs.nautobot.com/projects/core/en/v2.0.0-beta.1/administration/nautobot-server/?h=dumpdata#dumpdata)
loaddata as per Nautobot documentation

Expected Behavior
loaddata works

Observed Behavior
loaddata errors :
root@34c06ba7a177:/source# nautobot-server dumpdata --natural-foreign --natural-primary --exclude contenttypes --exclude auth.permission --format json --indent 2 --traceback  > /tmp/nautobot_dump.json
08:17:03.254 DEBUG   nautobot.core.celery __init__.py        import_jobs_as_celery_tasks() :
  Importing system Jobs
08:17:03.449 DEBUG   nautobot.core.celery __init__.py                      register_jobs() :
  Registering job nautobot.core.jobs.GitRepositorySync
08:17:03.455 DEBUG   nautobot.core.celery __init__.py                      register_jobs() :
  Registering job nautobot.core.jobs.GitRepositoryDryRun
08:17:04.736 DEBUG   nautobot.core.celery __init__.py                      register_jobs() :
  Registering job example_plugin.jobs.ExampleDryRunJob
08:17:04.737 DEBUG   nautobot.core.celery __init__.py                      register_jobs() :
  Registering job example_plugin.jobs.ExampleJob
08:17:04.737 DEBUG   nautobot.core.celery __init__.py                      register_jobs() :
  Registering job example_plugin.jobs.ExampleHiddenJob
08:17:04.738 DEBUG   nautobot.core.celery __init__.py                      register_jobs() :
  Registering job example_plugin.jobs.ExampleLoggingJob
08:17:04.738 DEBUG   nautobot.core.celery __init__.py                      register_jobs() :
  Registering job example_plugin.jobs.ExampleJobHookReceiver
08:17:04.739 DEBUG   nautobot.core.celery __init__.py                      register_jobs() :
  Registering job example_plugin.jobs.ExampleSimpleJobButtonReceiver
08:17:04.740 DEBUG   nautobot.core.celery __init__.py                      register_jobs() :
  Registering job example_plugin.jobs.ExampleComplexJobButtonReceiver

root@34c06ba7a177:/source# nautobot-server loaddata --traceback /tmp/nautobot_dump.json
08:17:26.171 DEBUG   nautobot.core.celery __init__.py        import_jobs_as_celery_tasks() :
  Importing system Jobs
08:17:26.378 DEBUG   nautobot.core.celery __init__.py                      register_jobs() :
  Registering job nautobot.core.jobs.GitRepositorySync
08:17:26.385 DEBUG   nautobot.core.celery __init__.py                      register_jobs() :
  Registering job nautobot.core.jobs.GitRepositoryDryRun
08:17:28.808 DEBUG   nautobot.core.celery __init__.py                      register_jobs() :
  Registering job example_plugin.jobs.ExampleDryRunJob
08:17:28.809 DEBUG   nautobot.core.celery __init__.py                      register_jobs() :
  Registering job example_plugin.jobs.ExampleJob
08:17:28.809 DEBUG   nautobot.core.celery __init__.py                      register_jobs() :
  Registering job example_plugin.jobs.ExampleHiddenJob
08:17:28.810 DEBUG   nautobot.core.celery __init__.py                      register_jobs() :
  Registering job example_plugin.jobs.ExampleLoggingJob
08:17:28.810 DEBUG   nautobot.core.celery __init__.py                      register_jobs() :
  Registering job example_plugin.jobs.ExampleJobHookReceiver
08:17:28.811 DEBUG   nautobot.core.celery __init__.py                      register_jobs() :
  Registering job example_plugin.jobs.ExampleSimpleJobButtonReceiver
08:17:28.812 DEBUG   nautobot.core.celery __init__.py                      register_jobs() :
  Registering job example_plugin.jobs.ExampleComplexJobButtonReceiver
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/django/core/serializers/json.py", line 70, in Deserializer
    yield from PythonDeserializer(objects, **options)
  File "/usr/local/lib/python3.8/site-packages/django/core/serializers/python.py", line 148, in Deserializer
    obj = base.build_instance(Model, data, using)
  File "/usr/local/lib/python3.8/site-packages/django/core/serializers/base.py", line 263, in build_instance
    natural_key = Model(**data).natural_key()
  File "/source/nautobot/core/models/__init__.py", line 90, in natural_key
    for lookups in [lookup.split("__") for lookup in self.natural_key_field_lookups]:
  File "/usr/local/lib/python3.8/site-packages/django/utils/functional.py", line 61, in __get__
    return self.fget(cls)
  File "/source/nautobot/core/models/__init__.py", line 146, in natural_key_field_lookups
    raise AttributeError(
AttributeError: Unable to identify an intrinsic natural-key definition for ObjectChange. If there isn't at least one UniqueConstraint, unique_together, or field with unique=True, you probably need to explicitly declare the 'natural_key_field_names' for this model, or potentially override the default 'natural_key_field_lookups' implementation for this model.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/nautobot-server", line 6, in <module>
    sys.exit(main())
  File "/source/nautobot/core/cli/__init__.py", line 54, in main
    run_app(
  File "/source/nautobot/core/runner/runner.py", line 263, in run_app
    management.execute_from_command_line([runner_name, command] + command_args)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/commands/loaddata.py", line 78, in handle
    self.loaddata(fixture_labels)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/commands/loaddata.py", line 123, in loaddata
    self.load_label(fixture_label)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/commands/loaddata.py", line 181, in load_label
    for obj in objects:
  File "/usr/local/lib/python3.8/site-packages/django/core/serializers/json.py", line 74, in Deserializer
    raise DeserializationError() from exc
django.core.serializers.base.DeserializationError: Problem installing fixture '/tmp/nautobot_dump.json':

Looks like a miss in #1574, as ObjectChange isn't mentioned in #2907/#2908/#2909. More fuel for us needing to do #3752 though.

Are you dumping and loading between different Nautobot versions?

Both on same container instance from  34c06ba7a177 (v2.0.0b1)

If there is such a thing as priority on beta code, this would be one I would vote for. We are using similar constructs for our data generation processes and it is not working, which means it is more difficult to test, and given the amount of changes that is obviously problematic.

It's also worth being aware of #3666 in that case, which may take some time longer to resolve than this specific issue.

Resolved by #3896.


Header Increment Issue

version: v0.13.4

Is this on mobile?

Is this on mobile?

no~it's on destop

I see, the logic in the header increment rule has issues.

Is this still an issue @liangzh-404 ? If so, could you include an example that causes the issue and your data.json to help debug the issue?
Thanks!

Is this still an issue @liangzh-404 ? If so, could you include an example that causes the issue and your data.json to help debug the issue?
Thanks!

I believe the issue is in the header increment rule. I didn't clearly define its behavior, and the logic isn't clear, leading to some bad behavior on some cases. It needs better documentation or a full rewrite.

This is likely due to not checking that the value of the header repeat is greater than 0: https://github.com/platers/obsidian-linter/blob/master/src/rules.ts#L1524-L1533

When you go from a larger heading to a smaller heading where the decrement value is larger than the current header, the new header level becomes negative. For example:
#### Heading 4
# Heading 1

I will see about fixing this tomorrow.

I believe the issue should be fixed now, but I am not sure it catches all scenarios. I am hopeful that the fix will catch most scenarios and we can iron out anymore edge cases as they arise.


Improve Policy discoverability

What type of PR is this?
/kind cleanup
/kind documentation
/kind gep
What this PR does / why we need it:
This PR updates GEP-713 - Policy Attachment - to clarify how implementations using the pattern should handle the discoverability problems it creates.
Some solutions need further GEPs - these are marked as EXPERIMENTAL DO NOT USE (to prevent similar problems from arising in the future).
Additionally, this PR removes most content from the existing "Policy Attachment" documentation page and adds a link to this GEP so that there's only one place to keep up to date.
Which issue(s) this PR fixes:

Updates #2014
Does this PR introduce a user-facing change?:

The Policy Attachment pattern has new requirements and recommendations to help with Policy discoverability.

I've just removed the change to the site page about Policy Attachment, I'll split that into a seperate PR.

Thanks for the comments @frankbu, I'm about to go on leave until July 18, so I will address them when I'm back.
I'd encourage others to take a look at this proposal too in the meantime.

/check-cla

/check-cla

/hold cancel


Fixed spelling error in pixi.js

The documentation didn't match the implementation.

@webbiesdk Thanks mate!


Error joining multiple domains using Picos_fifos

Hey! I encountered a weird error when trying to run the Picos_fifos scheduler on multiple domains and then waiting for them to complete
TID 0
TID 0
Fatal error: exception Invalid_argument("must be called from the main thread on the main domain")

The assertions say that we're on the main thread and domain, and it seems to only happen when I run the picos scheduler in the domain. I'm wondering if something could be escaping from the scheduler that's causing this bug.
let () =
  let show_tid () = Printf.printf "TID %d\n" (Thread.id (Thread.self ())) in
  show_tid ();
  let domains =
    List.init 4 (fun _ -> Domain.spawn (fun () -> Picos_fifos.run ignore))
  in
  assert (Domain.is_main_domain ());
  show_tid ();
  List.iter Domain.join domains

That error comes from Picos_select, which needs to configured.  Add a call to Picos_select.configure () from the main domain before spawning other domains.

Thanks @polytypic! That fixes it.

The potential need to configure Picos_select should be mentioned more clearly in the documentation of Picos_fifos.

I agree, probably something like this will be useful:
"This scheduler internally uses Unix.select. If running multiple domains that each run this scheduler, Picos_select.configure must be called by the main domain before spawning other domains. Alternatively, spawn new domains within the main domains scheduler which automatically calls configure"
I see this is also the case with Picos_threaded scheduler, so it would be good to add it there too. I can help to add this if you like


Відсутня документація по розгортуванню платформи на Azure

Замість документації по розгортуванню на Azure наявне посилання на документацію по розгортуванню на AWS.
https://github.com/epam/edp-ddm-architecture/blob/5127201c9fee2db3cbec7e30936b9b8bf06d1957/docs/ua/modules/admin/pages/installation/platform-deployment/platform-azure-deployment.adoc?plain=1#L11-L12

The Platform for state registries is cloud-agnostic, allowing for deployment across any cloud environment or even on-premises.
At present, we've tested and verified deployments on AWS and vSphere. Should there be a demand for Azure installation, we'll provide comprehensive instructions.
For now, you can refer to the official OKD documentation for guidance: Installing OKD on Azure. For comparison, we also offer instructions for AWS deployment: Deploying the Platform in a public AWS cloud environment.
All these points have been discussed and confirmed in our stakeholder meetings.


Content principle writing: Know your audience and meet them where they are

Write full documentation for the content principle Know your audience and meet them where they are.
Work will take place in this Google Doc.

Team has finalized this principle.


Descriptor: do not implement Describable interface

Commit cb6f0023500c3d2afb8c9f3ee4a0097526192156 (https://github.com/distribution/distribution/pull/1268) implemented a generic Manifest interface to represent manifests in the registry and remove references to schema specific manifests.
As part of this refactor, the Describable interface was introduced, which allowed for a single ManifestBuilder interface to handle both schema1 and schema2 manifests. Implementations of Describable are generally objects which can be described, not simply descriptors, but for convenience, this interface was also implemented on Descriptor in 2ff77c00bad887928be04367f0dd58f6aed5b756 (https://github.com/distribution/distribution/pull/1281).
This interface served its purpose, but no longer needed for most cases; schema2 (and OCI) descriptors do not need this method, making it only needed for schema1.Reference, which is now deprecated.
Requiring this interface to be implemented limits interoperability between distribution's Descriptor and the OCI Descriptor types, which are identical in every other way, except for the presence of the Describable interface.
This patch:

Removes the Descriptor.Descriptor() method (no longer implementing the Describable interface).
Updates ManifestBuilder interface and implementations to accept either a Descriptor, a Describable, or (for schema1), a schema1.Reference.

Codecov Report
Patch coverage: 51.61% and project coverage change: -0.06 :warning:

Comparison is base (29b5e79) 56.63% compared to head (4b146db) 56.58%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3886      +/-   ##
==========================================
- Coverage   56.63%   56.58%   -0.06%
==========================================
  Files         106      106
  Lines       10674    10696      +22
==========================================
+ Hits         6045     6052       +7
- Misses       3955     3967      +12
- Partials      674      677       +3

Impacted Files
Coverage Δ

manifest/schema1/config_builder.go
69.94% <44.44%> (-1.71%)
:arrow_down:

manifest/ocischema/builder.go
62.29% <50.00%> (-3.75%)
:arrow_down:

manifest/schema2/builder.go
66.00% <50.00%> (-5.43%)
:arrow_down:

manifest/schema1/reference_builder.go
94.00% <100.00%> (ø)

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

Since schema1 is in the process of being removed is this PR still relevant?

Can you rebase @thaJeztah

@corhere Squashed that last commit, and I included your commit to remove the ManifestBuilder interface altogether; I had to slightly modify if now that Schema1 was removed

And as far as I can tell, the ManifestBuilder interface is not needed. If we were to throw away that interface, the builders could accept the concrete types directly.


Ceedling options issue..

Hello,
I stumbled onto a very interesting thing while trying to redo the exercises of the second course over at udemy.
I pulled the docker image and made a folder and setup the course quite a while ago.. maybe an year plus.... All well and good.. I was trying to recollect how I tested the different iterations earlier and spent some time searching around.. and I sort of eventually got there..
However, this is where the behavior gets interesting.
When I run 'ceedling options:*' in the Logger folder, I get this error.
root@97f1866c8419:/lab/Logger# ceedling options:*
ERROR: Found no file '*.yml' in search paths.
rake aborted!

/var/lib/gems/2.4.0/gems/ceedling-0.30.0/lib/ceedling/file_finder_helper.rb:45:in `blow_up'
/var/lib/gems/2.4.0/gems/ceedling-0.30.0/lib/ceedling/file_finder_helper.rb:30:in `find_file_in_collection'
/var/lib/gems/2.4.0/gems/ceedling-0.30.0/lib/ceedling/file_finder.rb:146:in `find_file_from_list'
/var/lib/gems/2.4.0/gems/ceedling-0.30.0/lib/ceedling/tasks_base.rake:92:in `block (2 levels) in <top (required)>'
/var/lib/gems/2.4.0/gems/ceedling-0.30.0/bin/ceedling:346:in `block in <top (required)>'
/var/lib/gems/2.4.0/gems/ceedling-0.30.0/bin/ceedling:333:in `<top (required)>'
/usr/local/bin/ceedling:23:in `load'
/usr/local/bin/ceedling:23:in `<main>'
Tasks: TOP => options:*
(See full trace by running task with --trace)
ERROR: Ceedling Failed
root@97f1866c8419:/lab/Logger#

However, running 'ceedling options:iteration2 test:all' runs correctly.
This is what I see on the console
root@97f1866c8419:/lab/Logger# ceedling options:iteration2 test:all

Test 'TestAnalogConductor.c'
----------------------------
Running TestAnalogConductor.out...

Test 'TestAnalogHardware.c'
---------------------------
Running TestAnalogHardware.out...

Test 'TestAnalogModel.c'
------------------------
Running TestAnalogModel.out...

Test 'TestDigital.c'
--------------------
Running TestDigital.out...

Test 'TestExecutor.c'
---------------------
Running TestExecutor.out...

Test 'TestFilter.c'
-------------------
Running TestFilter.out...

Test 'TestLED.c'
----------------
Running TestLED.out...

Test 'TestMain.c'
-----------------
Running TestMain.out...

Test 'TestTimer.c'
------------------
Running TestTimer.out...

Test 'TestUtils.c'
------------------
Running TestUtils.out...

--------------------
IGNORED TEST SUMMARY
--------------------
[TestMain.c]
  Test: test_Main_NeedToImplement
  At line (15): "Main Not Implemented"

--------------------
OVERALL TEST SUMMARY
--------------------
TESTED:  48
PASSED:  47
FAILED:   0
IGNORED:  1

And I thought that it has been quite a while and maybe I made some change and forgot about it.. so I started from scratch and redid the same steps..
Created a new folder, ( after exiting the docker container of course.)
ran the docker command and mapped the volume correctly.
Inside the container, ran the 'course setup' command and then entered the Logger folder.
Then ran the 'ceedling options:*' command and received the same error.
However, this time, when I ran the 'ceedling options:iteration2 test:all' The tests did not run successfully and gave this error.
root@069d8a45d2c8:/lab/Logger# ceedling options:iteration2 test:all

Test 'TestAnalogConductor.c'
----------------------------
Linking TestAnalogConductor.out...
build/test/out/c/MockAnalogModel.o: In function `MockAnalogModel_Destroy':
/lab/Logger/build/mocks/MockAnalogModel.c:95: undefined reference to `GlobalExpectCount'
/lab/Logger/build/mocks/MockAnalogModel.c:95: undefined reference to `GlobalVerifyOrder'
build/test/out/c/MockAnalogModel.o: In function `AnalogModel_Init':
/lab/Logger/build/mocks/MockAnalogModel.c:116: undefined reference to `GlobalVerifyOrder'
build/test/out/c/MockAnalogModel.o: In function `AnalogModel_Init_CMockExpect':
/lab/Logger/build/mocks/MockAnalogModel.c:138: undefined reference to `GlobalExpectCount'
build/test/out/c/MockAnalogModel.o: In function `AnalogModel_AddReading':
/lab/Logger/build/mocks/MockAnalogModel.c:167: undefined reference to `GlobalVerifyOrder'
build/test/out/c/MockAnalogModel.o: In function `AnalogModel_AddReading_CMockExpect':
/lab/Logger/build/mocks/MockAnalogModel.c:196: undefined reference to `GlobalExpectCount'
build/test/out/c/MockAnalogModel.o: In function `AnalogModel_GetChannel':
/lab/Logger/build/mocks/MockAnalogModel.c:225: undefined reference to `GlobalVerifyOrder'
build/test/out/c/MockAnalogModel.o: In function `AnalogModel_GetChannel_CMockExpectAndReturn':
/lab/Logger/build/mocks/MockAnalogModel.c:264: undefined reference to `GlobalExpectCount'
build/test/out/c/MockAnalogHardware.o: In function `MockAnalogHardware_Destroy':
/lab/Logger/build/mocks/MockAnalogHardware.c:115: undefined reference to `GlobalExpectCount'
/lab/Logger/build/mocks/MockAnalogHardware.c:115: undefined reference to `GlobalVerifyOrder'
build/test/out/c/MockAnalogHardware.o: In function `AnalogHardware_Init':
/lab/Logger/build/mocks/MockAnalogHardware.c:136: undefined reference to `GlobalVerifyOrder'
build/test/out/c/MockAnalogHardware.o: In function `AnalogHardware_Init_CMockExpect':
/lab/Logger/build/mocks/MockAnalogHardware.c:158: undefined reference to `GlobalExpectCount'
build/test/out/c/MockAnalogHardware.o: In function `AnalogHardware_SetChans':
/lab/Logger/build/mocks/MockAnalogHardware.c:183: undefined reference to `GlobalVerifyOrder'
build/test/out/c/MockAnalogHardware.o: In function `AnalogHardware_SetChans_CMockExpect':
/lab/Logger/build/mocks/MockAnalogHardware.c:211: undefined reference to `GlobalExpectCount'
build/test/out/c/MockAnalogHardware.o: In function `AnalogHardware_IsReady':
/lab/Logger/build/mocks/MockAnalogHardware.c:241: undefined reference to `GlobalVerifyOrder'
build/test/out/c/MockAnalogHardware.o: In function `AnalogHardware_IsReady_CMockExpectAndReturn':
/lab/Logger/build/mocks/MockAnalogHardware.c:281: undefined reference to `GlobalExpectCount'
build/test/out/c/MockAnalogHardware.o: In function `AnalogHardware_GetReading':
/lab/Logger/build/mocks/MockAnalogHardware.c:310: undefined reference to `GlobalVerifyOrder'
build/test/out/c/MockAnalogHardware.o: In function `AnalogHardware_GetReading_CMockExpectAndReturn':
/lab/Logger/build/mocks/MockAnalogHardware.c:349: undefined reference to `GlobalExpectCount'
collect2: error: ld returned 1 exit status
ERROR: Shell command failed.
> Shell executed command:
'arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -T test/support/qemu.ld build/test/out/c/TestAnalogConductor_runner.o build/test/out/c/TestAnalogConductor.o build/test/out/c/MockAnalogModel.o build/test/out/c/MockAnalogHardware.o build/test/out/c/unity.o build/test/out/c/AnalogConductor.o build/test/out/c/startup.o build/test/out/c/syscalls.o build/test/out/c/uart.o build/test/out/c/cmock.o -o build/test/out/TestAnalogConductor.out -lm'
> And exited with status: [1].

NOTICE: If the linker reports missing symbols, the following may be to blame:
  1. Test lacks #include statements corresponding to needed source files.
  2. Project search paths do not contain source files corresponding to #include statements in the test.
  3. Test does not #include needed mocks.

rake aborted!

/var/lib/gems/2.4.0/gems/ceedling-0.30.0/lib/ceedling/generator.rb:151:in `rescue in generate_executable_file'
/var/lib/gems/2.4.0/gems/ceedling-0.30.0/lib/ceedling/generator.rb:155:in `generate_executable_file'
/var/lib/gems/2.4.0/gems/ceedling-0.30.0/lib/ceedling/rules_tests.rake:39:in `block in <top (required)>'
/var/lib/gems/2.4.0/gems/ceedling-0.30.0/lib/ceedling/task_invoker.rb:107:in `invoke_test_results'
/var/lib/gems/2.4.0/gems/ceedling-0.30.0/lib/ceedling/test_invoker.rb:124:in `block in setup_and_invoke'
/var/lib/gems/2.4.0/gems/ceedling-0.30.0/lib/ceedling/test_invoker.rb:51:in `setup_and_invoke'
/var/lib/gems/2.4.0/gems/ceedling-0.30.0/lib/ceedling/tasks_tests.rake:11:in `block (2 levels) in <top (required)>'
/var/lib/gems/2.4.0/gems/ceedling-0.30.0/bin/ceedling:346:in `block in <top (required)>'
/var/lib/gems/2.4.0/gems/ceedling-0.30.0/bin/ceedling:333:in `<top (required)>'
/usr/local/bin/ceedling:23:in `load'
/usr/local/bin/ceedling:23:in `<main>'

Caused by:
ShellExecutionException: ShellExecutionException
/var/lib/gems/2.4.0/gems/ceedling-0.30.0/lib/ceedling/tool_executor.rb:88:in `exec'
/var/lib/gems/2.4.0/gems/ceedling-0.30.0/lib/ceedling/generator.rb:136:in `generate_executable_file'
/var/lib/gems/2.4.0/gems/ceedling-0.30.0/lib/ceedling/rules_tests.rake:39:in `block in <top (required)>'
/var/lib/gems/2.4.0/gems/ceedling-0.30.0/lib/ceedling/task_invoker.rb:107:in `invoke_test_results'
/var/lib/gems/2.4.0/gems/ceedling-0.30.0/lib/ceedling/test_invoker.rb:124:in `block in setup_and_invoke'
/var/lib/gems/2.4.0/gems/ceedling-0.30.0/lib/ceedling/test_invoker.rb:51:in `setup_and_invoke'
/var/lib/gems/2.4.0/gems/ceedling-0.30.0/lib/ceedling/tasks_tests.rake:11:in `block (2 levels) in <top (required)>'
/var/lib/gems/2.4.0/gems/ceedling-0.30.0/bin/ceedling:346:in `block in <top (required)>'
/var/lib/gems/2.4.0/gems/ceedling-0.30.0/bin/ceedling:333:in `<top (required)>'
/usr/local/bin/ceedling:23:in `load'
/usr/local/bin/ceedling:23:in `<main>'
Tasks: TOP => build/test/results/TestAnalogConductor.pass => build/test/out/TestAnalogConductor.out
(See full trace by running task with --trace)
ERROR: Ceedling Failed

Has something changed or am I doing something wrong??
I pulled the latest image from docker hub before attempting to run the commands.. so both the folders must be running from the same docker image anyway..
Thanks in advance!!!

Did you handle permissions (owners) as well? Although error is strange, I would also assume it is timestamp based

I am working on a Mac, I have not needed to explicitly set any permissions or remember having needing to tinker with it earlier.
But I am game if you do have some suggestions on what I can try..
Anything I can do to make it a reproducible issue and help isolate the cause?
Thanks again!! 😄

I would start with clean directory every time before you run docker. That means do not have a cascading build, but rather a fresh mapping without exporting artifacts back.
I don't know mac, but there is --user command to docker so that you do not get root owned files in your drive. What then happens is that files are readable and there, but cannot be overwritten which leads to strange leftovers of "old" object files.

I did.. I created a separate folder and tried the commands afresh. That is the behavior I was reporting.
The error while running the "ceedling options:iteration2 test:all" is what I observed when trying to run the commands in a new, empty directory.
When i reran the commands on the old, existing repository then I was able to run the tests.
In both the cases "ceedling options:*" returns the same error.

But I assume you confirmed that /lab/Logger contains project.yml ?

Umm.. sorry.. Let me have a do over..
When I did the second course at udemy, I created a folder ( lets call it folderA ) on my system, pulled the docker image.. ran the requisite commands and finished the course.. that's done.
I wanted to refresh my memory about the "options_path" and did a docker pull and tried to rerun the "ceedling options:" and the "ceedling options:iteration2 test:all" in the same folderA. Now the "options:" failed with the no file found message.. while the tests ran.
To verify that I did not change anything on the folderA and forgot about it.. I created another folderB on the same directory level as folderA. I entered the folder, executed the docker command and upon entering the container, executed the "course setup" which created the requisite files and directories.. I then re-ran the "ceedling options:*" and "ceedling options:iteration2 test:all" commands.. except in this case, both the commands failed and gave an error.
All this while I was in folderB.
I hope this is a lot more clearer than the obvious mess I made while trying to explain earlier.. :-P
Both the folders - folderA and folderB have the same contents.. and yet exhibit different behaviors.. the only difference is that the folderA was created quite a while ago.. while I was taking the course.. folderB is what I have created today..

The option ceedling options:* isn't really an option. It's a notation used to show that you can enter any of the option file names after options: and get the option you want. You'll see the same notation used for running individual tests. To clear up this confusion, the latest version of ceedling lists the individual options (as there likely aren't many).
Given this information, the first error becomes more clear. When you specify ceedling options:* test:all it attempts to find a file named *.yml in your options folder and doesn't find one. When you issue ceedling options:iteration1 test:all it CAN find the option iteration1.yml in the options folder, and so it runs just fine.
For the second error, I suspect that if you do a diff between your two project.yml files (the MAIN project.yml file, not the options files) you will see that they have a differences in global ordering (and possibly other cmock features). It's working in the first case because you would have been keeping up with these changes as the course progressed. When you check out the latest version, it does NOT have these changes to the main project.yml and therefore it's not quite fully able to run them.

@mvandervoord
Thanks.. I assumed the "ceedling options:*" would list all the options available.. My mistake.. Thank you for clarifying that.
It is possible that the docker image might be a version or two behind.
Spot on with the second question..
I did a diff between the different project.yml files and I see that several cmock options are commented out in the newer project folder.
 diff tdd/Logger/project.yml throwtheswitch_2/Logger/project.yml
72,76c72,76
<     - :array
<     - :expect_any_args
<     - :return_thru_ptr
<     - :ignore_arg
<     - :callback
---
>     #- :array
>     #- :expect_any_args
>     #- :return_thru_ptr
>     #- :ignore_arg
>     #- :callback

To be clear , in the code block above.. the "tdd" folder is the old project folder that I created at the time of doing the course.. and the "throwtheswitch_2" is what I created a couple of days ago.
However, I did uncomment those options and reran "ceedling options:iteration2 test:all" and still see the same errors.. That made me check if the iteration2.yml file was different between the different project folders and I ran a diff to check the differences if any.
15a16,35
> :cmock:
>   :mock_path: 'build/mocks/'
>   :includes:
>     - stdint.h
>     - Defs.h
>     - LPC1768.h
>   :includes_h_pre_orig_header:
>     - stdint.h
>     - Defs.h
>     - LPC1768.h
>   :enforce_strict_ordering: TRUE
>   :verbosity: 1
>   :plugins:
>     - :expect
>     - :ignore
>     #- :array
>     #- :expect_any_args
>     #- :return_thru_ptr
>     #- :ignore_arg
>     #- :callback

The new iteration2.yml file has quite a few cmock options defined in it, that for some reason do not allow the tests to compile. Removing the cmock section from the iteration2.yml file in the new project folder allowed the tests to run and compile successfully like the old project folder. Does it work for you guys??
So thanks again @mvandervoord  and @Letme , it is always a positively wonderful experience to ask for help and be guided to the correct answer here!! 😄 .
I am closing the issue now..


Upload Images

I am looking to any documentation explaining how to use ImageUpload with supabase, but I can´t found.. Do you can help me?

ATM we don't have documentation nor code examples for this feature.
You may have more success asking the community, for instance on our Discord server or on StackOverflow.
I'll close this issue since we use Github to track bugs and feature requests only.


feature request: runtime privacy

Search Terms
runtime privacy
Suggestion
It'd be great there was a compiler option to enable runtime privacy.
When this mode is enabled, the compiled output would use simple WeakMap-based privates.
Alternatively, a builtin decorator could turn it on/off on a per/class basis.
Use Cases
It happens often that someone writes a library in TypeScript, but the end user consumes the library in plain JavaScript without the intended privacy.
Examples
Nothing changes syntactically. For example:
export class Foo {
  private foo = 'foo'
  private bar() {
    console.log(this.foo)
  }
  test() {
    this.bar()
  }
}

consumer code:
import {Foo} from './Foo'

const f: any = new Foo() as any

console.log(f.foo) // undefined
f.test() // it works
f.bar() // runtime error, undefined is not a function.

Checklist
My suggestion meets these guidelines:

[x] This wouldn't be a breaking change in existing TypeScript/JavaScript code, because the new option defaults to false.
[x] This wouldn't change the runtime behavior of existing JavaScript code, because the new option defaults to false.
[ ] This could be implemented without emitting different JS based on the types of the expressions
[ ] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
[x] This feature would agree with the rest of TypeScript's Design Goals, because it does not add new or modify existing syntax, it only extends privacy to runtime when an option is set to true.

More
There are already private fields with # that are potentially coming to the language, but many people won't want to use it over private syntax, plus many source codes already use private and it may be inconvenient to convert them all over once # lands.
An option would be great, and the implementation can be light-weight, with a simple WeakMap implementation as follows:
The above snippet could compile to something like the following, using a single WeakMap per module scope no matter how many classes are inside the file (unlike Babel's which uses one WeakMap per private field which is a bit excessive):
const privates = new WeakMap()

function _(inst) {
  let priv = privates.get(inst)
  if (!priv) privates.set(inst, priv = {})
  return priv
}

export class Foo {
  constructor() {
    _(this).foo = 'foo'
    _(this).bar = () => {
      console.log(_(this).foo)
    }
  }
  test() {
    _(this).bar()
  }
}

consumer code:
import {Foo} from './Foo'

const f = new Foo()

console.log(f.foo) // undefined
f.test() // it works
f.bar() // runtime error, undefined is not a function.

That's the simplest implementation with clean class-like output.
Here's another one that makes one method per class, instead of one per instance:
const privates = new WeakMap()

function _(inst) {
  let priv = privates.get(inst)
  if (!priv) privates.set(inst, priv = {})
  return priv
}

function Foo_bar() {
  console.log(_(this).foo)
}

export class Foo {
  constructor() {
    _(this).foo = 'foo'
  }
  test() {
    Foo_bar.call(this)
  }
}

it may be inconvenient to convert them all over once # lands.

I'm sure someone will write something that trivializes this, whether in a quick fix or elsewhere.

Part of the reason that # is a required prefix in ECMAScript privates is that it indicates it's tied to the lexically contained declaration. private is meant to be erasable type-level syntax for property accesses.

but many people won't want to use it over private syntax,

Can you elaborate on this? I understand migration costs, but we can make that easier with refactorings.

Can you elaborate on this?

https://github.com/tc39/proposal-class-fields/issues/100

private is meant to be erasable type-level syntax for property accesses.

It doesn't have to be meant that way, and because it is exclusive to TS, it would be fine to do it a new way.

Honestly, my guess a lot of people would like private making private properties.
One benefit they have over #, for example`, is they are normal properties and can be iterated on, etc.
Object.keys(this) // should also return private keys if in private scope.

The EcmaScript fields are not as flexible, they can't be treated as regular props.

The technical justifications behind # are extremely strong. That thread is perhaps the saddest I've ever seen in terms of loud and angry voices shouting down people calmly explaining the necessary reasons behind #.

It is sad for both sides. The # is tangential to this feature request anyways.
TypeScript could use WeakMaps to make runtime privates, and it'd be awesome (as long as it is optional).


Onboard .NET Source-Build Bot to Secret Manager

Instructions here: https://github.com/dotnet/arcade-services/tree/main/src/Microsoft.DncEng.SecretManager#onboarding-a-new-repo

[Triage] @lbussell - is this something you can fix for source-build since you are also doing this work for .NET docker?

@oleksandr-didyk - please describe what is being done here and link it to the appropriate issues describing the migration to the dotnet-releases repo, thanks.

@oleksandr-didyk - please describe what is being done here and link it to the appropriate issues describing the migration to the dotnet-releases repo, thanks.

Done, added a description, tasks performed and pre-requisite work on moving to dotnet-release


I get in the console :  SyntaxError: illegal character

i should not include : 'jquery.minicolors.png'


Use mkl-dnn v1.0 or v0.x depending on compilation flag.

Modify CPU backend  to use mkldnn v1.0.
Support both v1.0 and v0.x for DEX and only v1.0 for CODEGEN.
Default is not mkldnn v1.0.
Use -NGRAPH_USE_LEGACY_MKLDNN=FALSE to build mkldnn v1.0.
Some notes:

mkldnn v1.0 does not depend on mkl. But we still build mkl because we use cblas_sgemm_batch from mkl.
mkldnn v1.0 splits hidden state and cell state, so Rnn/Lstm has one more input and one more output for v1.0.
mkldnn v1.0 does not keep format info like "nchw" in its memory descriptor any more. The visualized graph would only have "blocked" in the node. If desired, we could  get strides information from memory descriptor and put it there in a future PR.

I share the same concern as Nagy wrt if/else and code replication (sorry, I didn't follow all the details of this discussion and if you reached a conclusion. Disregard my comments if they are not aligned with that). Is having support for multiple MKLDNN versions something temporal?

I will come back to mkldnn_emitter after finishing all the other files. Don't know for how long we will support both versions.

@nmostafa @rkimballn1 @aslepko Please review.

Blocking for now for follow ups on performance impact in onnxrt and ngtf.

There are still some performance degradation in onnxrt, caused by mkldnn int8 convolution regression. Mkldnn team is working on that.


Release 0.8.1 to master

Related Issue(s): None
Proposed Changes:

Release STAC 0.8.1

PR Checklist:

[x] This PR has no breaking changes.
[x] I have added my changes to the CHANGELOG or a CHANGELOG entry is not required.
[x] API only: I have run npm run generate-all to update the generated OpenAPI files.

5 reviews, this release will be so stable 😁


Add explicit imports across files inside of polymer

This PR adds back missing imports. These explicit references are needed for some automated tooling.
/cc @justinfagnani

@justinfagnani @sorvell PTAL, PR is now a single line

LGTM from my end


Added DansTonChat to sites.json

DansTonChat is a popular french quote database, similar to bash.org

Thanks for your contribution!


Delete after read exclusion categories not respected by manual Delete after Mark as Read

Steps to reproduce

Have an entry in a category
Make sure this category is selected for exclusion in Downloads > Delete chapters > Excluded
Download a chapter in the entry
Mark the chapter as read via the menu, not by opening it and scrolling to the end
Observe the chapter being deleted even though it is in an Excluded category

Expected behavior
Possible & reasonable user expectation: The chapter does not get deleted.
Actual behavior
The chapter is deleted.
Crash logs
No response
Mihon version
0.17.0
Android version
any
Device
any
Other details
It's not clear whether the Excluded categories are supposed to apply to the "After manually marked as read" setting above it. The section structure easily suggests to even an attentive user that these settings are all interconnected.
If the intention is for manual marking to always delete a chapter regardless of exclusions further down, I believe this should be communicated to users in some way, possibly with a text above the setting or by visually separating it from the "After reading automatically delete" setting.
If the intention was for manual marking to respect the excluded categories, this is a bug that should be fixed.
Acknowledgements

[X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
[X] I have written a short but informative title.
[X] I have gone through the FAQ and troubleshooting guide.
[X] I have updated the app to version 0.17.0.
[X] I have updated all installed extensions.
[X] I will fill out all of the requested information in this form.

Something with the Excluded Categories setting is bugged. If you set a category, leave settings, and return; the setting just shows 'null' instead of the selected category name. If you select three categories, it becomes; 'null, null, null' etc.

That is an unrelated problem.


Connect to Nextcloud API with enabled 2-factor auth

Unable to connect to Nextcloud API with enabled 2-factor auth with App Nextcloud Template.

Not sure if you still need this, but you can modify the template to use the following Key for the Nextcloud Monitoring API item:
system.run[curl -s -H "NC-Token: {$NC_TOKEN}" {$HTTP_OR_HTTPS}://{$FQDN_NEXTCLOUD}/ocs/v2.php/apps/serverinfo/api/v1/info]
Then, instead of setting a user and password macro on the host, set the nc_token macro. You can find more information on the system page of your Nextcloud instance on how to set the token used by the monitoring API. Something like:
occ config:app:set serverinfo token --value yourtoken where yourtoken is an app password token (which you can optionally disable file access for).


feat: add code execution status to chat messages.

This PR adds code_executions as an array of code execution statuses to chat messages. The intent of this data is to be displayed in a similar manner as citations: at the bottom of the message, with buttons that open a modal for more info. As a point of reference, here is how similar data looks in ChatGPT when it executes code:
ChatGPT code execution status:

ChatGPT code execution modal:

Why not use the existing "citations" modals? Code execution data doesn't fit well in that, because it fundamentally differs in its formatting. Code execution status includes the code that was run (which benefits from being syntax-highlighted), and the output and generated files. This differs from citations which are just list of document names and links.
Additionally, code execution is a process, whereas citations are only emitted once. This is why code execution data uses an ID-based approach, where each code execution instance is identified by a unique ID and can be updated by emitting a new code_execution message with the same ID. This allows the code execution status to be updated as code runs.
Pull Request Checklist
Before submitting, make sure you've checked the following:

[x] Target branch: dev
[x] Description: See above.
[x] Changelog: OK.
[x] Documentation: No documentation to update.
[x] Dependencies: No new dependencies.
[x] Testing: Manually tested to produce buttons similar to citations at the bottom of messages.
[x] Code review: OK.
[x] Prefix: feat

Changelog Entry
Description
Citation messages can now be used to convey code execution status.
Added

New type of citation to display code execution status.

Screenshots or Videos

PR updated to include the modal dialog for code execution status. Also added video of the feature.

LGTM, Thanks!

@EtiennePerot did some refac (notably uuid -> id, but mostly styling changes), testing wanted with dev here!

Looks great and works great, thanks! Tested from dev.


Normkoh add icons for fields

fixes #99
let's add icons beside the fields in the personCard, namely the phone, email, GitHub, location and officHours fields.
This is how the Ui looks like after changes:

Let me know what you guys think (are the colours and icons ok, does something feel off).
Feel free to also suggest other icons or colours that you think will look better.

Codecov Report

Merging #100 (6a5ea16) into master (08594db) will decrease coverage by 0.11%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##             master     #100      +/-   ##
============================================
- Coverage     57.02%   56.90%   -0.12%
  Complexity      553      553
============================================
  Files            96       96
  Lines          2506     2511       +5
  Branches        355      355
============================================
  Hits           1429     1429
- Misses          846      851       +5
  Partials        231      231

Impacted Files
Coverage Δ

src/main/java/seedu/address/ui/PersonCard.java
0.00% <0.00%> (ø)

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

Colors of icons look fine it matches the black theme that we have.

LGTM! Colours blend well and positioning looks good.


Tracking hashstack dependency more effectively

Right now we don't automatically set the hashstack commit that we're using in any way.  The default behavior is to pull the latest commit on one of our tracking branch, and to commit this on builds.
One big issue is that when make is called in the future, there is no warning that a commit is possibly out of date.  There have been a few proposed ideas and solutions for this:

Switch to .gitmodules for hashstack.

Add a .txt file that is manually updated by developers when they want to point to the most recent version of the repository.

Switch from the in-repository profile format to an external repository profile format, such as https://github.com/hashdist/hashstack/blob/master/examples/mpi4py.linux.yaml

Embed the hashstack repository into proteus branches, and put the maintenance work for communicating information between the repositories on developers comfortable with git subtree operations.

Other ideas?

There are merits and cons to each approach.  I'm opening this issue just to get the discussion started.  I'll try to summarize discussion in this top-level comment, and we should use the comments for discussion.

refs to hashdist and hashstack commits are stored in .hashdist_default and .hashstack_default now.


Move c-s-s to new js messaging framework

Task/Issue URL: https://app.asana.com/0/488551667048375/1205885707721116/f
Description
Steps to test this PR
Feature 1

[ ]
[ ]

UI changes

Before
After

!(Upload before screenshot)
(Upload after screenshot)

Current dependencies on/for this PR:

develop

PR #3811   👈

This stack of pull requests is managed by Graphite.


[Snyk] Security upgrade axios from 1.5.1 to 1.6.0

This PR was automatically created by Snyk using the credentials of a real user.Snyk has created this PR to fix one or more vulnerable packages in the `npm` dependencies of this project.
Changes included in this PR

Changes to the following files to upgrade the vulnerable dependencies to a fixed version:

package.json
package-lock.json

Vulnerabilities that will be fixed
With an upgrade:

Severity
Priority Score (*)
Issue
Breaking Change
Exploit Maturity

748/1000  Why? Proof of Concept exploit, Recently disclosed, Has a fix available, CVSS 7.1
Cross-site Request Forgery (CSRF) SNYK-JS-AXIOS-6032459
No
Proof of Concept

(*) Note that the real score may have changed since the PR was raised.

Commit messages

Package name: axios
    The new version differs by 8 commits.

f7adacd chore(release): v1.6.0 (#6031)
9917e67 chore(ci): fix release-it arg; (#6032)
96ee232 fix(CSRF): fixed CSRF vulnerability CVE-2023-45857 (#6028)
7d45ab2 chore(tests): fixed tests to pass in node v19 and v20 with `keep-alive` enabled; (#6021)
5aaff53 fix(dns): fixed lookup function decorator to work properly in node v20; (#6011)
a48a63a chore(docs): added AxiosHeaders docs; (#5932)
a1c8ad0 fix(types): fix AxiosHeaders types; (#5931)
2ac731d chore(docs): update readme.md (#5889)

See the full diff

Check the changes in this PR to ensure they won't cause issues with your project.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
🛠 Adjust project settings
📚 Read more about Snyk's upgrade and patch logic

Learn how to fix vulnerabilities with free interactive lessons:
🦉 Cross-site Request Forgery (CSRF)

Can be closed.
Superseded by : https://github.com/tycrek/ass/pull/246

@tycrek can be closed now

@Gauvino Technically not since this targets master which still has axios

That's why I knew I was dumb when I say it


Sync with cuteant/main and setup internal CI

/azp run SpanNetty - CI

/azp run "SpanNetty - CI"

/azp run "SpanNetty - CI (.NET Framework)"

Results:

https://msazure.visualstudio.com/One/_build/results?buildId=71605558&view=ms.vss-test-web.build-test-results-tab&runId=1425225140&resultId=109759&paneView=debug
https://msazure.visualstudio.com/One/_build/results?buildId=71605560&view=results

/azp run

/azp run

/azp run

/azp run

PR to skip known issues which we agreed: https://github.com/maksimkim/SpanNetty/pull/12

/azp run

@maksimkim @nimakamoosi I think we can close this one?


spyder  1>nul 2>nul

Description
What steps will reproduce the problem?

Get Anaconda Version2.0.3
Get Spyder version 4.2.5
Launch Spyder
Issue-> It appears a comment 'spyder 1>nul 2>nul' in 'cmd.exe' window. The windows does not get close.

 Have you tried to install Spyder using the installers for Windows?

Hey @mazalgarab-git, this problem happens only with Anaconda Navigator. It doesn't occur if you start Spyder from the Anaconda Prompt or using our installers, as @steff456 mentioned.
Since we can't make changes in Navigator because it's an Anaconda product, please report this problem in
https://github.com/ContinuumIO/anaconda-issues/

No. I tried to install Spyder using Anaconda.

Get Anaconda 2.0.3
Get Spyder 4.2.5
Run Spyder
---> A windows of cmd.exe appears with the message “spyder 1>nul 2>nul”; if one tries to close the windows, the Spyder window closes along with the cmd.exe window.

Regards,
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10
From: Stephannie Jimenez @.>
Sent: Monday, May 24, 2021 11:29 AM
To: @.>
Cc: Mauricio @.>; @.>
Subject: Re: [spyder-ide/spyder] spyder 1>nul 2>nul (#15688)
Hi @mazalgarab-githttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmazalgarab-git&data=04|01||79d48557a1e64a28e52108d91ed12671|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637574705900585082|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=2hWiENkfnOYLNOfEnfzhPMzfBeKPYoYDuzVUZ7nLWEc%3D&reserved=0,
Can you please give me some steps to try to reproduce this issue? Have you tried to install Spyder using the installers for Windows?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fspyder-ide%2Fspyder%2Fissues%2F15688%23issuecomment-847167892&data=04|01||79d48557a1e64a28e52108d91ed12671|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637574705900585082|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=R%2FLDP3k6pAxgr8eIeHXpDGAdJQHC5aq0w0nud1c5Hcc%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAN76FWEP23OQWA7CZGRRSBTTPJ5HZANCNFSM45NOIKWQ&data=04|01||79d48557a1e64a28e52108d91ed12671|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637574705900595083|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=wKU4KJ0bC%2BoheO3Skq1SP9OC2%2FRjK4oDMMV1fRO7DLA%3D&reserved=0.

Hi! I have the same issue. Did you @mazalgarab-git find out how to fix it?

@lauracami0742, this is not a problem with Spyder so we can't solve it here. It's a problem with Anaconda Navigator.

No, we can't fix here, sorry.

Try this in anaconda.navigator:

go to File >> Preferences >> Configure Conda >> Reset to defaults
go to File >> Preferences >> Configure Navigator >> Reset to defaults
This worked for me.

Thanks @aleksandar-anastasov
It worked for me too and launching time of anaconda also reduced significantly

@aleksandar-anastasov thank you ıt worked !

@aleksandar-anastasov still works as of Nov 23. Thanks!


Can't pull more than 100 tweets

I am trying to collect users' liked tweets and I can only gather the most recent 100, I am very new to web scraping so I am struggling a little bit figuring out what to do to fix this error. If it isn't possible to gather more than 100 at a time, is there a way to gather them in batches (meaning I would get the first most recent hundred then the second most recent hundred and so on and so forth)? I've put my code below if anyone could help!
`from twikit import Client
import json
import pandas as pd
client=Client('en-US')
client.login(
auth_info_1='username,'
password='password'
)
client.save_cookies('cookies.json')
client.load_cookies(path='cookies.json')
user=client.get_user_by_screen_name('username')
tweets=user.get_tweets('Likes',count=500)
tweets_to_store=[]
for tweet in tweets:
tweets_to_store.append({
'created_at':tweet.created_at,
'favorite_count':tweet.favorite_count,
'full_text':tweet.full_text
})
df=pd.DataFrame(tweets_to_store)
df.to_csv('liked_tweets.csv', index=False)`

@KirenCO123
You can retrieve more tweets by calling next method. Below is an example of the code.
from twikit import Client
import json
import os
import pandas as pd

client=Client('en-US')

if os.path.exists('cookies.json'):
    client.load_cookies(path='cookies.json')
else:
    client.login(
        auth_info_1='username',
        auth_info_2='email'
        password='password'
    )
    client.save_cookies('cookies.json')

user = client.get_user_by_screen_name('username')

limit = 500
tweets_ = []
tweets = user.get_tweets('Likes', count=500)

while len(tweets_to_store) < limit and len(tweets) > 0:
    tweets_ += tweets
    try:
        tweets = tweets.next()  # Call next method to retrieve more tweets
    except:
        break

tweets_to_store=[]

for tweet in tweets:
    tweets_to_store.append({
        'created_at': tweet.created_at,
        'favorite_count': tweet.favorite_count,
        'full_text': tweet.full_text
    })

df=pd.DataFrame(tweets_to_store)
df.to_csv('liked_tweets.csv', index=False)

Thank you for the suggestion! Unfortunately when I run this code I still only get 100 tweets - i'm really not sure why since the next function seems to work for most people on this server. Is there another way I can get more than 100 to scrape?

Thank you so much! Here is the code that ended up working for me in the end :)
`from twikit import Client
import json
import os
import pandas as pd
client = Client('en-US')
if os.path.exists('cookies.json'):
client.load_cookies(path='cookies.json')
else:
client.login(
auth_info_1='your_auth_info_1',
auth_info_2='your_auth_info_2',
password='your_password'
)
user = client.get_user_by_screen_name('username')username
limit = 500
tweets_to_store = []
tweets = user.get_tweets('Likes', count=500)
while len(tweets_to_store) < limit and len(tweets) > 0:
for tweet in tweets:
tweets_to_store.append({
'created_at': tweet.created_at,
'favorite_count': tweet.favorite_count,
'full_text': tweet.full_text
})
if len(tweets_to_store) >= limit:
break
try:
    tweets = tweets.next()
except:
    break

df = pd.DataFrame(tweets_to_store)
df.to_csv('tweets.csv', index=False)
`

@KirenCO123 , @d60 Did you encounter rate limits while using this? Is it possible to use it without my account getting suspended

@KirenCO123 , @d60 Did you encounter rate limits while using this? Is it possible to use it without my account getting suspended

I didn’t run into any rate limits or get suspended, but X has changed to make Likes private so this code doesn’t work anymore :/ Not sure how to get around it now that Likes aren’t publicly viewable

I'm using this to scrape tweets. Can't seem to get mote than 500 tho


[dbus] Add leader takeover and local leader weight API

Adds DBus APIs to takeover leader role and to set the local leader weight

This depends on if/when this OT PR merges https://github.com/openthread/openthread/pull/9186


Support 5 parameter easing functions

Like this
var jumper = new Jumper({
  easing: function (x, t, b, c, d) {
    if ((t/=d/2) < 1) return c/2*t*t*t + b;
    return c/2*((t-=2)*t*t + 2) + b;
  }
});

Actually just make it clear that if you use the recommended easing functions, you need to drop x. or just support x param.

per the new API custom easing isn't support. easeInOutQuad for the win


Wave Array

Question asked on Amazon SDE (intern) coding round.
Given a sorted array arr[] of distinct integers. Sort the array into a wave-like array and return it. In other words, arrange the elements into a sequence such that a1 >= a2 <= a3 >= a4 <= a5..... (considering the increasing lexicographical order).

Answer verified from trustworthy sources

hi @amith-ghub, Please have a look at the contributing guidelines. Currently there is no provision for solutions in this repo.

hi @amith-ghub, Please have a look at the contributing guidelines. Currently there is no provision for solutions in this repo.

Thanks for pointing out @rishabh115 . Edited!


frequent crashes

I'm loving the app, its extremely light weight and the animations feel very stock and fluid, but I'm having a few problems
The app crashes frequently when changing settings,
also is it possible to change the base size of the notch while keeping its extended size? its way too big by default but decreasing the size in the settings to match the 14" macbook notch, some of the content becomes covered by the physical notch.
using the gui version off gumroad, not sure how to send logs and helpful info about the crashes.

Fixed with v1.0.4


proposal: x/crypto/ssh: add ParseAllowedSigners

While x/crypto/ssh has at present ParseKnownHosts and ParseAuthorizedKey functions, it lacks support for parsing the allowed_signers format as documented in the ssh-keygen(1) manual page.
Proposal is to add a ParseAllowedSigners function, with a likewise signature as ParseKnownHosts:
// ParseAllowedSigners parses an entry in the format of the allowed_signers file.
//
// The allowed_signers format is documented in the ssh-keygen(1) manual page.
// This function will parse a single entry from in. On successful return,
// principals will contain the list of principals that this entry matches,
// options will contain the list of options that this entry matches (i.e.
// "cert-authority", "namespaces=file,git"), and pubKey will contain the
// public key. See the ssh-keygen(1) manual page for the various forms that a
// principal string can take, and further details on the options.
//
// The unparsed remainder of the input will be returned in rest. This function
// can be called repeatedly to parse multiple entries.
//
// If no entries were found in the input then err will be io.EOF. Otherwise, a
// non-nil err value indicates a parse error.
func ParseAllowedSigners(in []byte) (principals []string, options []string, pubKey ssh.PublicKey, rest []byte, err error)

Adding this would compliment the existing API, and would help facilitate working with the SSH signing features the library has to offer. While leaving the implementation of the actual SSH Signature format as an exercise for another time.

CC @golang/security


Unknown symbol error when compacting Head block

What did you do?
Ran TSDB inside Cortex
What did you expect to see?
No errors when compacting the Head block.
What did you see instead? Under which circumstances?
Compaction from Head failing with the following error
persist head block: 2 errors: write compaction: add series: symbol entry for \"2020-06-08T07:02:36.407Z\" does not exist, unknown symbol \"2020-06-08T07:02:36.407Z\"; series not 16-byte aligned at 147394303
And the same error repeats.
This error is not related to any disk corruption as all the data is from the memory.
The main components involved in this compaction operations are the Head index reader and the Head block itself. It needs some investigations on how is it possible - whether some bug in the compaction code (or) some race somewhere when ingesting data which causes the symbols to be lost (or) something else.
Though this is seen inside Cortex when using TSDB, it might be very much possible while running Prometheus too.

Prometheus version: v2.16.0

Hey,
we are seeing the same issue on Prometheus (v2.15.2).
level=error ts=2020-06-17T19:04:17.039Z caller=db.go:609 component=tsdb msg="compaction failed" err="persist head block: 2 errors: write compaction: add series: symbol entry for \"bbbe9aa8-254f-44f6-b5a0-09c0ea64fd9f\" does not exist, unknown symbol \"bbbe9aa8-254f-44f6-b5a0-09c0ea64fd9f\"; series not 16-byte aligned at 22979295"
It's causing compaction to fail, and disk usage to slowly increase (until it reaches 100%).

I also had a private report of this in Prometheus, not sure which version.

Hey @codesome  we just got it and we are on exact commit that was suppose to fix it ):
level=error ts=2020-07-11T13:30:09.772232559Z caller=db.go:685 component=receive tenant=XXX msg="compaction failed" err="persist head block: 2 errors: write compaction: add series: symbol entry for \"olm-operator-666b97bf6d-f6mrj\" does not exist, unknown symbol \"olm-operator-666b97bf6d-f6mrj\"; series not 16-byte aligned at 112720367"
level=error ts=2020-07-11T13:31:43.428332983Z caller=db.go:685 component=receive tenant=XXX msg="compaction failed" err="persist head block: 2 errors: write compaction: add series: symbol entry for \"olm-operator-666b97bf6d-f6mrj\" does not exist, unknown symbol \"olm-operator-666b97bf6d-f6mrj\"; series not 16-byte aligned at 112723471"

We are exactly on https://github.com/prometheus/prometheus/pull/7526

This is from Thanos version: master-2020-07-10-1ae66b96
Which has clearly this fix commit: https://github.com/thanos-io/thanos/blob/1ae66b96c887485822b1b46ad2d3db2627df77f5/go.mod

BTW: We did not see this, before TSDB upgrade "with fix" :thinking:

We saw it in Cortex too after this PR, looks like the "fix" was not actually a fix but maybe amplifies the problem. Additionally, initial assumption was it's because of a race between adding a series and compaction. But, as the same error repeats (i.e. for the same symbol), it cannot be a race but some other underlying issue. I will take a look at it on Monday, until then maybe we should revert back the "fix".

Yes, I will revert it.
Also next time please make sure to notify here us about Cortex issue it would save us some time =D
Enjoy the weekend!

Also next time please make sure to notify here us about Cortex issue it would save us some time =D

We sure would do that, just that we noticed it today after you commented :)

Haha :heart: https://github.com/prometheus/prometheus/pull/7556

Looked a little bit, and yea in theory "fix" makes sense. Adding first symbols then postings, in theory, looks good as we are fine with one symbol more, but not fine with posting without its symbol...
Side bug race I found by accident: https://github.com/prometheus/prometheus/pull/7557
I reproed this bug in current version without reverted "fix" in a hacky way (injected mutexes): https://github.com/prometheus/prometheus/pull/7558
With your fix I tried as well and couldn't as a quick try, so we need to look deeper.

OK I repro-ed the problem with fix as well: https://github.com/prometheus/prometheus/pull/7559
Actual fix (hopefully): https://github.com/prometheus/prometheus/pull/7560 Please feel free @codesome to commander this PR


Added a compiler API #64

🎯 Title and Issue Number
Add a compiler API #64
Closes #64
Added a compiler API.A new addition to our APIverse.
🗒 Checklist:

[Y] I have mentioned the issue number in my Pull Request.
[Y]  I have gone through rules of when PR will get merged.
[Y] I have commented my code, particularly in hard-to-understand areas
[Y] I have created a helpful and easy to understand README.md
[Y] I have followed proper file structure.
[Y] I have gone through

Thank you for contributing!❤
Don't forget to show some support by ⭐ the repository!

Hey @sanjay14073! We're excited to let you know that your pull request has been merged into the APIverse🚀🎁
Your commitment, effort, and expertise have greatly influenced our project, and we're incredibly thankful for your contributions.😇
Your code is now part of our expanding ecosystem, assisting developers worldwide in creating exceptional APIs.❣🔥
Happy Coding! ✨ We look forward to seeing you again soon!❣


Add support for dropchopping a zipped shapefile

Sorry about the weird diff...apparently Atom likes to add a line break to the end of files and mess around with whitespace.
Added the ability to drag and drop a zipped shapefile using shapefile-js. Fortunately it was already a dependency and mostly coded, just had to wire a couple of things together.
The shapefile-js function previously used forwardToGeoJsonIo as a callback, which I modified to instead trigger a file:added event. Not sure if that breaks anything or not, but it didn't seem like it.
Also had to tweak the gulpfile to make sure that shapefile-js is compressed into the dependencies.
Hopefully closes #10. Let me know what you think!

Excellent work! Just pulled it down and it works great (and really fast).
The forwardToGeoJsonIo was leftover from toying around with some other examples, going with the file:added trigger is exactly right.
:clap: for putting this together!


[resotocore][feat] Implement user login

Description

To-Dos

[ ] Add test coverage for new or updated functionality
[ ] Lint and test with tox
[ ] Document new or updated functionality (someengineering/resoto.com#XXXX)

Code of Conduct
By submitting this pull request, I agree to follow the code of conduct.

Codecov Report
Patch coverage: 65.51% and project coverage change: -0.26 :warning:

Comparison is base (48ccf03) 89.03% compared to head (a96199c) 88.78%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1551      +/-   ##
==========================================
- Coverage   89.03%   88.78%   -0.26%
==========================================
  Files          82       84       +2
  Lines       12918    13036     +118
==========================================
+ Hits        11502    11574      +72
- Misses       1416     1462      +46

Flag
Coverage Δ

resotocore
88.78% <65.51%> (-0.26%)
:arrow_down:

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

Impacted Files
Coverage Δ

resotocore/resotocore/web/api.py
67.14% <34.88%> (-2.23%)
:arrow_down:

resotocore/resotocore/user/user_management.py
59.09% <59.09%> (ø)

...esotocore/resotocore/config/core_config_handler.py
86.80% <83.33%> (-0.42%)
:arrow_down:

resotocore/resotocore/user/__init__.py
96.29% <96.29%> (ø)

resotocore/resotocore/__main__.py
89.18% <100.00%> (+0.11%)
:arrow_up:

resotocore/resotocore/db/entitydb.py
87.09% <100.00%> (ø)

resotocore/resotocore/query/query_parser.py
98.57% <100.00%> (+<0.01%)
:arrow_up:

resotocore/resotocore/report/inspector_service.py
88.78% <100.00%> (ø)

... and 5 files with indirect coverage changes
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 in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Add addtional string meta fields for S3 output

This pretty much covers all the S3 fields, expect Expires since I'm not sure the best way to pass though time-type fields from the yaml config and parse into go

// The date and time at which the object is no longer cacheable. For more information,
// see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21).
Expires *time.Time location:"header" locationName:"Expires" type:"timestamp"

Thanks @razor-x, I think for *time.Time the best option would probably be to use an interpolation string but enforce that users define an interpolation that creates either a valid ISO 8601 string or a unix timestamp. It'd need a bit of extra boilerplate to do the parse for each object but that's probably the best we can do for now.
If it's okay with you I'm going to modify the docs for these fields so that they're marked as advanced, it'll mean they don't show up in common config examples.


typo?

Hey I'm downloaded your encoder to use.
Trying to run it, the load.lua function tries to "require" pl.data which you don't explicitly ask for, I traced the problem to function 'loadBinarizedMNIS'(lines 40-55).
I think you got confused between dataset and data when defining new variables. Maybe you can check if thats okay?
Sorry in advance if this confusing.

I believe penlight is a requirement of the torch7 file reading tools. I didn't mention it as a requirement since it is installed with torch7 itself: https://github.com/torch/ezinstall/blob/c33da5962a1398428d5c068c0f227e57d609399d/install-luajit%2Btorch#L61
The code looks ok to me. Please try again with an official install of torch7 and let me know if you have any issues. Closing for now.


Module API improvements

After writing the first module, a couple of take-aways:
Todo:

[ ] new helper: isPackageInstalled - Could be useful to automatically setup unimport presets when the related packages are already installed.

See https://github.com/wxt-dev/wxt/pull/720 as an example

Completed:

[x] second arg options should be optional https://github.com/wxt-dev/wxt/pull/719
[x] new helper: addImportPreset https://github.com/wxt-dev/wxt/pull/720
[x] Export WxtModule type from 'wxt/modules' to avoid "TS2742: The inferred type of 'default' cannot be named without a reference to '../node_modules/wxt/dist/index-q2ZwJBs6'. This is likely not portable. A type annotation is necessary." https://github.com/wxt-dev/wxt/pull/721
[x] type augmentation to add the option types does not work without an import to the module's package https://github.com/wxt-dev/wxt/pull/722

Originally posted by @aklinker1 in https://github.com/wxt-dev/wxt/issues/716#issuecomment-2164425167

For the last problem, fixing module augmentation, I just need to include a reference to all installed modules in the .wxt/wxt.d.ts file.
// Generated by wxt
/// <reference types="wxt/vite-builder-env" />
/// <reference types="./types/imports.d.ts" />
/// <reference types="./types/paths.d.ts" />
/// <reference types="./types/i18n.d.ts" />
/// <reference types="./types/globals.d.ts" />
+/// <reference types="@wxt-dev/module-vue" />

That will cause the module to be included in the project, and for TS to process the module augmentation.

Released all fixes except for isPackageInstalled in v0.18.6

I'm gonna go ahead and close this, I don't think the isPackageInstalled helper function is necessary right now. But if someone sees this and whats to add it, feel free to open a PR.


Change postgresql default port

We are working with this template for a while. And we are now bringing it into production.
We are deploying our code based on this template in Alibaba Cloud so we will be using the ApsaraDB RDS for PostgreSQL. For security reasons, we would like to change the default port from 5432 to another port. We have tried to set the environment variable $POSTGRES_PORT but the variable is ignored.
Can anyone point us how to customize the postgres port?

We are having the same issue here. We need to be able to change the default port. It would be nice to implement an environment variable like POSTGRES_PORT or something like that as mentioned above.

Thanks! This was solved here: https://github.com/tiangolo/full-stack-fastapi-postgresql/pull/333


Filecoin Integration

Filecoin integration from core tech earmarks.
Complements PR to provider https://github.com/oceanprotocol/provider/pull/513
Changes proposed in this PR:

Create StorageProvider class for uploading to decentralized storage
Integrate HuggingFace Hub library and create HuggingFaceHub class for uploading to data science platforms
Modify encrypt function to encrypt file content (as well as urls and ddos)
Create an environmental variable for Filecoin urls
Add class for Filecoin file structures
Readme tutorial flow for uploading to storage and HuggingFace
Add tests for uploading to and downloading from decentralized storage and HuggingFace

Nope, we can remove it. I wasn't aware about the DBS progress. @richardblythman disregard my comments, this can be closed


[WIP]Metric registry

MetricRegistry works in shell, but not with purest --> Need to investigate further.

You mean pytest instead of purest?

You mean pytest instead of purest?

Jup :)

I added some comments but those don't need to be addressed right now, they're more of a reminder for the future


All Activities except Custom Status not properly being shown

When playing an activity or even just playing Spotify on the application, it appears that Lanyard isn't catching my Discord Activities at all, just my Custom Status only.
Here's a working one

And now here's a broken one (Provided By @bohd4nx)

Not sure why you felt the need to post both here and the support channel, there’s zero chance this is something internal so the support channel is the better place for this.

Sorry for opening this, the issue was a "me" issue that accidentally had one of the Activity Privacy Disabled.


Field with resolver (strawberry_django.field(resolver=resolver)) returns incorrect type

Describe the Bug

When using strawberry_django.field with resolve in this style,
def resolver(root: "FruitType") -> str:
    return f"{root.id} - {root.name}"

@strawberry_django.type(model=Fruit)
class FruitType:
    id: int
    name: str
    id_name: str = strawberry_django.field(resolver=resolver)

the type returned is going to be StrawberryDjangoField instead of str.
This happens only for resolvers with arguments. When the resolver uses no arguments, the correct type is returned.
This is similar to this issue reported at strawberry-graphql/strawberry
As proposed by the above issue, a fix could be replacing this (https://github.com/strawberry-graphql/strawberry-graphql-django/blob/main/strawberry_django/fields/field.py#L387):
@overload
def field(
    *,
    ...
    resolver: Callable[[], _T],
    ...
) -> _T: ...

for this
@overload
def field(
    *,
    ...
    resolver: Callable[..., _T],
    ...
) -> _T: ...

Another options is to take the same approach used by strawberry here
_RESOLVER_TYPE = Union[
    StrawberryResolver[T],
    Callable[..., T],
    Callable[..., Coroutine[T, Any, Any]],
    Callable[..., Awaitable[T]],
    "staticmethod[Any, T]",
    "classmethod[Any, Any, T]",
]

@overload
def field(
    *,
    ...
    resolver: _RESOLVER_TYPE[T],
    ...
) -> _T: ...

System Information

Operating system: macOS Sonoma 14.1
Strawberry version (if applicable): not applicable

Additional Context
I can create a PR with the preferred solution if this is indeed an issue.

Hey @guizesilva ,
Feel free to create the PR for that :)
And I think the best option is to use the same approach as strawberry does


Support meta list when checking for attributes

🌟 What is the purpose of this PR?
Currently, only attributes like #[mutants::skip] are supported to skip mutation of a function. This implies, that mutants needs to be a dependency.
🔗 Related links

Closes https://github.com/sourcefrog/cargo-mutants/issues/34

🔍 What does this change?
Support recursive lookup for attributes, so attributes like #[cfg_attr(test, mutants::skip)] will be picked up as well. This implies, that mutants isn't needed as a dependency but at most a dev-dependency.
📜 Does this require a change to the docs?
The README was adjusted to reflect these changes
⚠ Known issues
Attributes are not taken into account currently; only the AST is checked for mutants::skip.
❓ How to test this?

Put an attribute like #[cfg_attr(test, mutants::skip)] at a function
Check that this isn't mutated

Hi, thanks for the PR!
I do wonder if this is a bit too broad, but I also can't think of a case where someone would have mutants::skip inside an attribute and not want to trigger this.
I'd like to add one or trees in testdata that check that this works as intended. You could just copy the factorial tree, add that line, and then add a test like this that runs mutants --list --json:
https://github.com/sourcefrog/cargo-mutants/blob/a97cbd7155f45a343d3457879306d060d2dec5d3/tests/cli.rs#L137-L145
Thanks for updating the README. We should also mention this in NEWS.

Thanks for the review, I added a test and applied your suggestion to the README.

Thanks. It looks like these tests now fail https://github.com/sourcefrog/cargo-mutants/runs/7063651809?check_suite_focus=true#step:6:26
error[E0433]: failed to resolve: use of undeclared crate or module `mutants`
--> testdata/tree/meta_tree/src/bin/main.rs:8:18
|
8| #[cfg_attr(test, mutants::skip)]
| ^^^^^^^use of undeclared crate or module `mutants`

I think you'd need it as a dev dependency for this one.
It might be worth having one test with it as a dev dependency and one tree with no dependency at all...

Weird, somehow it worked locally. Will push the changes tomorrow 👍

Just checking, do you currently want me to do something, or didn't you have the time to look at this again? 🙂


Custom exception handling not updating OpenAPI status code

Hi, I'm trying to override the 422 status code to a 400 across every endpoint on my app, but it keeps showing as 422 on the openapi docs.
Description
This is how i override the 422.
from fastapi import FastAPI, status
from fastapi.encoders import jsonable_encoder
from fastapi.exceptions import RequestValidationError
from fastapi.responses import JSONResponse

app = FastAPI()

app.include_router(my_router, prefix="/log")

@app.exception_handler(RequestValidationError)
async def validation_exception_handler(request, exc):
    """
    Overrides FastAPI default status code for validation errors
    from 422 to 400
    """
    return JSONResponse(
        status_code=status.HTTP_400_BAD_REQUEST,
        content=jsonable_encoder({"detail": exc.errors(), "body": exc.body}),
    )

It returns 400 successfully but, the OpenAPI shows:

What's the correct way to override the 422 and update the OpenAPI docs schema?
Thank you
Environment

OS: Linux
FastAPI Version: 0.61.1

It's been some time since: #643 and #1376.
And actually no solution was provided on both issues, so I think it's time.
Following the idea on: https://fastapi.tiangolo.com/advanced/extending-openapi/?h=+swagger#override-the-method
from fastapi import FastAPI, status
from fastapi.encoders import jsonable_encoder
from fastapi.exceptions import RequestValidationError
from fastapi.openapi.utils import get_openapi
from fastapi.responses import JSONResponse
from pydantic import BaseModel

app = FastAPI()

class Potato(BaseModel):
    name: str
    color: str

@app.post("/items/")
def post_potato(potato: Potato):
    return potato

@app.get("/schemas")
def get_schemas():
    return app.openapi_schema

@app.exception_handler(RequestValidationError)
async def validation_exception_handler(request, exc):
    """Overrides FastAPI default status code for validation errors from 422 to 400."""
    return JSONResponse(
        status_code=status.HTTP_400_BAD_REQUEST,
        content=jsonable_encoder({"detail": exc.errors(), "body": exc.body}),
    )

def custom_openapi():
    if app.openapi_schema:
        return app.openapi_schema
    openapi_schema = get_openapi(
        title="Custom title",
        version="2.5.0",
        description="This is a very custom OpenAPI schema",
        routes=app.routes,
    )
    for path in openapi_schema["paths"]:
        for method in openapi_schema["paths"][path]:
            if openapi_schema["paths"][path][method]["responses"].get("422"):
                openapi_schema["paths"][path][method]["responses"][
                    "400"
                ] = openapi_schema["paths"][path][method]["responses"]["422"]
                openapi_schema["paths"][path][method]["responses"].pop("422")
    app.openapi_schema = openapi_schema
    return app.openapi_schema

app.openapi = custom_openapi

Images from swagger:
Missing name!

Response!

Documentation!

Feel free to improve the given solution :)

Thanks for this solution, hopefully we get something a little less hacky soon.

Thanks for this solution, hopefully we get something a little less hacky soon.

@Kludex thanks for the great start! I wanted to have both a custom error code (400) as well as a custom error schema that I already defined as a Pydantic model. Building off of what you did, here's my workaround:
class ErrorSource(BaseModel):
    """The source of the error in the request, either in the request body or a query parameter"""

    parameter: Optional[str] = Field(
        None, description="Which query parameter caused the issue, such as an invalid page size"
    )
    pointer: Optional[str] = Field(
        None,
        description="Which part of the request body caused the error, expressed as a JSON Pointer([RFC6901](https://tools.ietf.org/html/rfc6901)) (examples - '/' for the primary data object or '/attributes/title' to indicate a problem with the 'title' field)",
    )

class Error(BaseModel):
    """Information about an error that occurred"""

    title: str = Field(
        description="Human readable description of what went wrong, can be localized (example: 'Validation Error')"
    )
    status: str = Field(
        description="HTTP Status code describing the problem (example: '503' or '400')"
    )
    code: Optional[str] = Field(
        None,
        description="Similar to 'title' in describing the general error but in machine-readable form (example: 'validation_error')",
    )
    detail: Optional[str] = Field(
        None,
        description="Human readable description specific to this occurrence, can be localized (example: 'Start time cannot be after end time')",
    )
    source: Optional[ErrorSource] = Field(
        None, description="Which part of the request the error occurred"
    )
    meta: Optional[Any] = Field(
        None, description="Contains non-standard meta-information about the error"
    )

class ErrorResponse(BaseModel):
    errors: List[Error] = Field(..., description="What went wrong in the request")

def custom_openapi():

    if app.openapi_schema:
        return app.openapi_schema
    openapi_schema = get_openapi(
        title="Custom title",
        version="2.5.0",
        description="This is a very custom OpenAPI schema",
        routes=app.routes,
    )

    # not quite the ideal scenario but this is the best we can do to override the default
    # error schema. See
    from fastapi.openapi.constants import REF_PREFIX
    import pydantic.schema

    paths = openapi_schema["paths"]
    for path in paths:
        for method in paths[path]:
            if paths[path][method]["responses"].get("422"):
                paths[path][method]["responses"]["400"] = {
                    "description": "Validation Error",
                    "content": {
                        "application/json": {"schema": {"$ref": f"{REF_PREFIX}ErrorResponse"}}
                    },
                }
                paths[path][method]["responses"].pop("422")

    error_response_defs = pydantic.schema.schema(
        (ErrorResponse,), ref_prefix=REF_PREFIX, ref_template=f"{REF_PREFIX}{{model}}"
    )
    openapi_schemas = openapi_schema["components"]["schemas"]
    openapi_schemas.update(error_response_defs["definitions"])
    openapi_schemas.pop("ValidationError")
    openapi_schemas.pop("HTTPValidationError")

    app.openapi_schema = openapi_schema

Which produces:


Fix bug saving images beyond 8192 x 8192 on Linux.

Description
Resolves #5966
There were some buffer sizes in the llvmpipe renderer in Mesa that only supported saving images up to 8192 x 8192. I patched Mesa to increase the sizes of those buffers to support saving images up to 16384 x 16384. I added the patches to both bv_mesagl.sh and bv_osmesa.sh. I also noticed that some patches were missing form bv_osmesa.sh that were in bv_mesagl.sh, so I added those to bv_osmesa.sh. I rebuilt Mesa on quartz with the patched Mesa.
Type of change

[X] Bug fix
[ ] New feature
[ ] Documentation update
[ ] Other

How Has This Been Tested?
I rebuilt mesagl on quartz using the new build_visit. I then tested image saving up to 16384 x 16384 on quartz and added a test to the regression suite for saving an image at 16384 x 16384. Saving images at that size with VisIt 3.2.1 crashed the viewer on quartz.
Checklist:

[X] I have followed the style guidelines of this project.~~
[X] I have performed a self-review of my own code.~~
[X] I have commented my code where applicable.~~
[X] I have updated the release notes.~~
[ ] I have made corresponding changes to the documentation.
[ ] I have added debugging support to my changes.
[x] I have added tests that prove my fix is effective or that my feature works.~~
[x] I have confirmed new and existing unit tests pass locally with my changes.~~
[ ] I have added new baselines for any new tests to the repo.
[x] I have NOT made any changes to protocol or public interfaces in an RC branch.~~
[x] I have assigned reviewers (see VisIt's PR procedures for more information).~~

thanks for fixing this @brugger1, found my self wanting to create images larger than 8Kx8K this morning ...


SUBMARINE-894. Reduce the image size of submarine-operator

What is this PR for?
The original submarine-operator docker image is 906 MB, and thus it will be very time-consuming for users who want to pull the image from DockerHub. Hence, a light submarine-operator image is needed. In addition, although the original Docker image is large, it is suitable for development, so we will not remove the Dockerfile.
In addition, the new docker image will replace the deprecated operator image (submarine-cloud).
Reference:
(1) https://github.com/kubeflow/pytorch-operator/blob/master/Dockerfile
(2) https://github.com/kubeflow/tf-operator/blob/master/build/images/tf_operator/Dockerfile
What type of PR is it?
[Improvement]
Todos
What is the Jira issue?
https://issues.apache.org/jira/browse/SUBMARINE-894
How should this be tested?

Github action (deploy-image)

Screenshots (if appropriate)

Questions:

Do the license files need updating? No
Are there breaking changes for older versions? No
Does this need new documentation? No

@KUAN-HSUN-LI Can you help review this PR?


Reduce pad size in rolling

[ ] Closes #N.A.
[x] Tests added (for all bug fixes or enhancements)
[ ] Tests N.A.
[x] Fully documented, including whats-new.rst for all changes and api.rst for new API

I noticed rolling with dask array and with bottleneck can be slightly improved by reducing the padding depth in da.ghost.ghost(a, depth=depth, boundary=boundary).
@jhamman , can you kindly review this?

This looks good to me, thanks

Thanks for this @fujiisoup!