Migrate Ingress from API extensions/v1beta1 to networking.k8s.io/v1beta1

Signed-off-by: Ruben Vargas<EMAIL_ADDRESS>

Q: should be extensions.ingresses removed from roles? Could auto-detection use the newer/older API based on the platform version as opposed to just disabling the ingress if we it runs on the old platform?

Could auto-detection use the newer/older API based on the platform version as opposed to just disabling the ingress if we it runs on the old platform?

About the role, I'm still not sure if we need to remove or may be have two versions, for your question about disabling the ingress, yes, the idea is to detect the platform and use the properly API. I added some code that does that, I still need to update the ingress code (and may be the tests).

Not sure if this is a good solution for use both APIs
I'm using the new Ingress type for all ingress code, but changed to old API just at the time of consuming it. (on create, delete, update etc..)

@rubenvp8510 sounds like a reasonable approach to me.

I added tests to this.
Not sure what should we do with roles, We can create the roles now because both APIs are present in the actual k8s versions, but once k8s removes the extension.ingresses, the role creation might fails.
Should we leave it as it is for now? or create two roles.yaml files one with extension and other with networking? @pavolloffay @objectiser

@rubenvp8510 I think, as this is for supporting older versions of k8s, then having a separate role.yaml (and cluster_role.yaml) is probably fine - just need to make it clear in the install instructions.

If the old API groups are noop in the new cluster versions (which I think they are) we can keep it in the single file. It's easier to maintain and easier to deploy for users.

According to this post, k8s 1.22 will stop serving the deprecated API (ingress) - so we still have a bit of time until that happens. So it should be fine to include both in the same file for now as @pavolloffay suggests.
However we would need to check if it is a noop, once 1.22 is out. Or do a test by trying to include a non-existent api.

If the old API groups are noop in the new cluster versions (which I think they are) we can keep it in the single file. It's easier to maintain and easier to deploy for users.

Definitely, will be easier to maintain, an is the option I would prefer, the only remain question is if it will work on 1.22.

the only remain question is if it will work on 1.22.

@rubenvp8510 Agree, but we have plenty of time before 1.22 is available, so for now we can have the two versions included.

the only remain question is if it will work on 1.22.

@rubenvp8510 Agree, but we have plenty of time before 1.22 is available, so for now we can have the two versions included.

Yes, just may be we would want to file a ticket to don't forget this?
Also I'm not very confident about tests I did here., those might could start failing when the old API won't be available. So Do you have any suggestions?

+1 on a ticket to remove it in 1.22
We can have an e2e test that checks that the API is available.

@kevinearls Could you give this PR a test?

@rubenvp8510 @objectiser Tests have passed on an OCP 4.4 cluster

@rubenvp8510 I ran into one small problem when running on OCP.  I get the following log messages every 5 seconds
time="2020-05-14T15:29:25Z" level=info msg="Auto-detected ingress api" ingress-api=networking
time="2020-05-14T15:29:30Z" level=info msg="Auto-detected ingress api" ingress-api=networking

@kevinearls I think this is due this logs:
https://github.com/jaegertracing/jaeger-operator/pull/1039/files#diff-c2bdb352258b22c51211b662ef5489fbR143
I can remove those log lines or change the detection to another place.

@kevinearls  @pavolloffay  @objectiser  I changed the detection place and address the comments.
Could you please review?
Thanks


Notification Position and Icon Configuration Options

Hey, I'm working on a project using your tool and it's very helpful! Thanks! But I have 2 concerns when creating notifications.
First off, how do I customize the notification in order to change its position on the screen to any of the 4 corners and not just the bottom-right one. I saw in the xaml file for setting the appearance of the notification that is was hardcoded to be bottom-right, but it'd be really helpful to let the user set that feature to any position of their choice, and that'd also really help with my project.
Secondly, when I am trying to set the Icon property for my notification, I can only seem to set Font Awesome icons, which really limits my ability to customize my toasts(notification). I would like the option to set an image or .ico file as the Icon for my notification, and I think that would solve a lot of people's problems when using toast notifications.
Thanks so much for reading and considering. Hope to hear feedback from you soon.

[x] add template for ImageSource for icon
if you know any other situation with icon source - welcome


Getting an error while executing this code

(x_train, y_train), (x_test, y_test), preproc = text.texts_from_folder('C:\Users\anand.nataraj\Downloads\aclImdb',
maxlen=500,
preprocess_mode='bert',
train_test_names=['train',
'test'],
classes=['pos', 'neg'])
ERROR:
File "", line 1
(x_train, y_train), (x_test, y_test), preproc = text.texts_from_folder('C:\Users\anand.nataraj\Downloads\aclImdb',
^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
Below is the dataset that I'm loading:
datset fil structure: http://prntscr.com/qng8k1
download link: https://ai.stanford.edu/~amaas/data/sentiment/

please let me know the dataset and the file structure that i'm using is correct.

I think the backslashes in your file path is causing the problem.  See this stackoverflow post.  Try putting r before the file path string or change backslashes to forward slashes, as described in the post.


The knmi integration is using deprecated forecast (2023.9 beta)

Did you read the instructions?

[X] I have read the README, including the known-limitations section.

The problem
Just leaving this here: if you get this error on b0 of the 2023.8 release, just wait for the final release: it's being fixed in core: https://github.com/home-assistant/core/issues/97290
Logger: homeassistant.components.weather
Source: components/weather/__init__.py:169
Integration: Weer (documentation, issues)
First occurred: 08:42:28 (1 occurrences)
Last logged: 08:42:28

custom_components.knmi.weather::KnmiWeather is overriding deprecated methods on an instance of WeatherEntity, this is not valid and will be unsupported from Home Assistant 2023.1. Please report it to the custom integration author.

Integration version
1.5.0
Home Assistant version
core-2023.8.0b0
Python version
3.11
Home Assistant log
No response
Diagnostics
No response
Additional information
No response

To stress: just wait for 2023.8 final release, it's fixed in core (will be deprecated later).
https://github.com/home-assistant/core/issues/97290

Should be fixed by implementing async_forecast_daily instead of forecast property,
I'll be able to do this before the new release.

I think the latest HA dev build has resolved this issue in https://github.com/home-assistant/core/pull/97292, can you confirm?

Yes

#88 is ready but should be merged after HA 2023.8 release

async_forecast_daily Doesn't seem to do anything at this moment, I had my PR merged and realized there was no longer a forecast, 20ee1dc fixes this, and now both methods are supported, once HA decides to make the switch the old one can be removed

https://developers.home-assistant.io/blog/2023/08/07/weather_entity_forecast_types/

Jep, and the newest beta is now (again) complaining about it, including a repairs issue:

I'll fix this somewhere next week after the next release, theoretically reverting 20ee1dc047c3193c82db38415515377e7a416470 should be enough

Yeah, and as far as I understand nothing will actually break now, it's just a warning

I've quickly drafted a PR #91 if anyone has time, feel free to test it locally and provide feedback.
I'll wait till the HA 2023.9 update to test (we should merge after the update anyway).

Eerst ff Formule 1, kan straks wel even testen

Error is gone, but I guess some more work is needed

By the way, the weather entity does not appear in the entity-chooser (I added it manually), and when calling te service, it errors out.

I missed a little thing, I've tested against 2023.9.0b3 and I think it should no work as expected, please let me know

Works!

Works!

Thanks. I'll release it in a couple of days. So most of the early updaters are on 2023.9

You should be good as your hacs.json indicates 2023.9 as minimum version, so people running older versions won't see the update

Fair enough; https://github.com/golles/ha-knmi/releases/tag/1.6.0

In case anyone uses forecast in templates/automations like state_attr("weather.knmi_purmerend", "forecast")[0]["temperature"], you now need to use a template sensor to get the forecast data.
(Some of the built-in weather providers are still setting the old/deprecated forecast attribute...)
eg:
template:
  - trigger:
      - platform: time_pattern
        minutes: /10
    action:
      - service: weather.get_forecast
        data:
          type: daily
        target:
          entity_id: weather.knmi_purmerend
        response_variable: forecast
    binary_sensor:
      - name: KNMI regen vandaag
        state: "{{ forecast.forecast[0].precipitation_probability > 0 }}"
    sensor:
      - name: KNMI max temp vandaag
        state: "{{ forecast.forecast[0].temperature }}"

I've extended the example a bit in my config, so it get's a value directly on restart & reload and with an unique_id, so you can more easily set icons from the frontend if you'd like:
  template:
    - trigger:
        - platform: time_pattern
          hours: /1
        - platform: homeassistant
          event: start
        - platform: event
          event_type: event_template_reloaded
      action:
        - service: weather.get_forecast
          data:
            type: daily
          target:
            entity_id: weather.knmi_home
          response_variable: forecast
      binary_sensor:
        - name: KNMI regen vandaag
          state: "{{ forecast.forecast[0].precipitation_probability > 0 }}"
          unique_id: knmi_regen_vandaag
      sensor:
        - name: KNMI max temp vandaag
          unique_id: knmi_max_temp_vandaag
          state: "{{ forecast.forecast[0].temperature }}"
          availability: "{{ is_number(forecast.forecast[0].temperature) }}"

@golles Maybe it's even worth thinking of to provide these two sensors directly from the integration - I think they'll be the most templated sensors anyways.

I'm very against duplicating unnecessary data, but I was actually considering this as well.
I think this new way of dealing with the forecast isn't great at all. Maybe it's faster for the ui, but I don't think I've ever noticed it to be slow in the first place and not having to add extra (template) sensors is defeating the whole purpose in my opinion.
I've also noticed that, at least one (Met.no), built in weather integration is still using the old forecast attribute (combined with the new service). I shouldn't do that as the code mentions not to overwrite that function anymore. Which makes this weather integration look worse than built in ones...

Geen speld tussen te krijgen.

I think you've seen it, but there is a nice discussion about this subject:
https://community.home-assistant.io/t/petition-dont-delete-the-forecast-attribute/609298
Providing these two sensors directly from the integration would be very helpful.

I know there are ideas to support service calls directly in templates, like
{% set forecast = service_call('calendar.get_events', {'entity_id': 'calendar.work', 'start_date_time': today_at(), 'duration': {'hours': 24}}) %} which would get the result directly. I know one of the HA contributors and templates experts want to implement this, but it requires a lot of coding. He mentioned he would like to have this implemented before the depreciation of the forecast attribute. (my example is for the calendar, but for the weather forecast service call it would be similar)
This will allow the response to be directly used in templates, and then no further (template) sensors would be required.
However, before that, to combine 2 weather forecasts I would have to write them to a template or mqtt sensor. It is not possible to iterate over them in a repeat  service call, because of the limited scope of the response (it will only be available in the repeat service call). So for now I would like to continue using the forecast attribute.

I think you've seen it, but there is a nice discussion about this subject:
https://community.home-assistant.io/t/petition-dont-delete-the-forecast-attribute/609298
Providing these two sensors directly from the integration would be very helpful.

I wasn't aware of this thread so many thanks for sharing. I'll try to read and comment if needed during the weekend

@TheFes I do understand your issue but adding support back for the deprecated attribute is maybe nice for the time being but not very future proof.
I was actually pretty surprised yesterday to see that built in weather integrations are still supporting the attribute. Even though it shouldn't be used anymore https://github.com/home-assistant/core/blob/dev/homeassistant/components/weather/init.py#L553
Let see in the coming days how the thread on the forums evolve, in my  opinion the decision should be taken by HA and this integration should simply follow.
Using the previous version of this integration is indeed maybe the best short therm solution

That's because he policy in HA is that things which are depreciated will be supported for 6 months before being removed. So the forecast attributes will be removed in 2024.3, giving people time to adjust

Damn, I was checking why my automations are not working, well now I know 👎 . Is there ANY chance that attributes forecast will return?

Yes you can by creating a template sensor.
A sensor will be created: sensor.knmi_weersverwachting
  template:
    - trigger:
        - platform: time_pattern
          hours: /1
        - platform: homeassistant
          event: start
        - platform: event
          event_type: event_template_reloaded
      action:
        - service: weather.get_forecast
          data:
            type: daily
          target:
            entity_id: weather.knmi_home
          response_variable: forecast
      sensor:
        - name: KNMI weersverwachting
          unique_id: knmi_weersverwachting
          state: "{{ now().isoformat() }}"
          attributes:
            forecast: "{{ forecast.forecast }}"

Yes you can by creating a template sensor. A sensor will be created: sensor.knmi_weersverwachting
  template:
    - trigger:
        - platform: time_pattern
          hours: /1
        - platform: homeassistant
          event: start
        - platform: event
          event_type: event_template_reloaded
      action:
        - service: weather.get_forecast
          data:
            type: daily
          target:
            entity_id: weather.knmi_home
          response_variable: forecast
      sensor:
        - name: KNMI weersverwachting
          unique_id: knmi_weersverwachting
          state: "{{ now().isoformat() }}"
          attributes:
            forecast: "{{ forecast.forecast }}"

Thanks, should this be added in the config or somewere else?

In your configuration.yaml

I see no reason why this integration would not follow the same approach as the core integrations and leave it in until 2024.3
This gives users time to adapt

I see no reason why this integration would not follow the same approach as the core integrations and leave it in until 2024.3 This gives users time to adapt

I agree it was a little rushed, also the communication from HA was not entirely clear plus it was announced for the 2023.8 release and then rolled back and redone in 2023.9.
For future updates, I'll take a bit more time to investigate and make sure to align with built-in integrations.


Testing issues

There is no requirement, just testing

Close Issue 📕
Después del clon y push local, antes del pull request online


list_remove fails with imdb_list on certain movies

2016-05-12 01:18 VERBOSE  utils.requests clean_movie_list Waiting 4.89 seconds until next request to imdb.com
2016-05-12 01:18 CRITICAL task          clean_movie_list BUG: Unhandled error in plugin list_remove: 400 Client Error: Bad Request for url: http://www.imdb.com/list/_ajax/watchlist_has
2016-05-12 01:18 CRITICAL manager       clean_movie_list An unexpected crash has occurred. Writing crash report to {{CRASH_REPORT_LOCATION}}. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.0.19
2016-05-12 01:18 WARNING  task          clean_movie_list Aborting task (plugin: list_remove)

The plugin seems to be crashing consistently on certain movie names.  When I remove one offending movie name from the search, it will crash consistently on another after several successful lookups of other movie names.  I suspect the task is crashing on values which it cannot locate in IMDB.  Examples of offending values are "7 Days in Hell (2015)", "Batman Under the Red Hood (2010)" and "Batman Apocalypse (2010)".

Can you paste the crash log?

''''
2016-05-12 10:31 CRITICAL task          clean_movie_list BUG: Unhandled error in plugin list_remove: 400 Client Error: Bad Request for url: http://www.imdb.com/list/_ajax/watchlist_has
Traceback (most recent call last):
File "/home/pi/.local/lib/python2.7/site-packages/flexget/task.py", line 442, in __run_plugin
return method(*args, **kwargs)
File "/home/pi/.local/lib/python2.7/site-packages/flexget/event.py", line 23, in call
return self.func(*args, **kwargs)
File "/home/pi/.local/lib/python2.7/site-packages/flexget/plugins/output/list_remove.py", line 41, in on_task_output
thelist -= task.accepted
File "/usr/lib/python2.7/_abcoll.py", line 356, in isub
self.discard(value)
File "/home/pi/.local/lib/python2.7/site-packages/flexget/plugins/list/imdb_list.py", line 185, in discard
status = self.session.post('http://www.imdb.com/list/_ajax/watchlist_has', data=data).json()
File "/home/pi/.local/lib/python2.7/site-packages/requests/sessions.py", line 518, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/home/pi/.local/lib/python2.7/site-packages/flexget/utils/requests.py", line 241, in request
result.raise_for_status()
File "/home/pi/.local/lib/python2.7/site-packages/requests/models.py", line 844, in raise_for_status
raise HTTPError(http_error_msg, response=self)
HTTPError: 400 Client Error: Bad Request for url: http://www.imdb.com/list/_ajax/watchlist_has
''''

This isn't good. Seems imdb changed something. Checking

I cannot reproduce this. does this happen all the time for you?
please post debug log of the task

2016-05-16 08:35 VERBOSE  utils.requests MYTASKNAME Waiting 4.90 seconds until next request to imdb.com
2016-05-16 08:36 CRITICAL task          MYTASKNAME BUG: Unhandled error in plugin list_remove: 400 Client Error: Bad Request for url: http://www.imdb.com/list/_ajax/watchlist_has
2016-05-16 08:36 CRITICAL manager       MYTASKNAME An unexpected crash has occurred. Writing crash report to /home/pi/.config/flexget/crash_report.2<IP_ADDRESS>604611559.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.0.23
2016-05-16 08:36 WARNING  task          MYTASKNAME Aborting task (plugin: list_remove)
2016-05-16 08:36 INFO     performance                   Performance results for task MYTASKNAME:
2016-05-16 08:36 INFO     performance                   urlrewriting    took 3.36 sec (0 queries)
2016-05-16 08:36 INFO     performance                   list_remove     took 331.12 sec (6441 queries)
2016-05-16 08:36 INFO     performance                   seen            took 7.55 sec (691 queries)
2016-05-16 08:36 INFO     performance                   remember_rejected took 0.13 sec (6 queries)
2016-05-16 08:36 INFO     performance                   imdb_lookup     took 0.81 sec (0 queries)
2016-05-16 08:36 INFO     performance                   metainfo_content_size took 1.02 sec (0 queries)
2016-05-16 08:36 INFO     performance                   retry_failed    took 4.92 sec (691 queries)
2016-05-16 08:36 INFO     performance                   version_checker took 0.16 sec (1 queries)
2016-05-16 08:36 INFO     performance                   accept_all      took 1.76 sec (0 queries)
2016-05-16 08:36 INFO     performance                   filesystem      took 4.94 sec (0 queries)
2016-05-16 08:36 INFO     performance                   backlog         took 30.92 sec (1387 queries)

This isn't a debug log, please run with -L debug

Below is a log run with -L debug
2016-05-18 08:16 VERBOSE  utils.requests clean_movie_list Waiting 4.89 seconds until next request to imdb.com
2016-05-18 08:16 CRITICAL task          MYTASKNAME BUG: Unhandled error in plugin list_remove: 400 Client Error: Bad Request for url: http://www.imdb.com/list/_ajax/watchlist_has
2016-05-18 08:16 CRITICAL manager       MYTASKNAME An unexpected crash has occurred. Writing crash report to CRASHLOG. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.0.25
2016-05-18 08:16 WARNING  task          clean_movie_list Aborting task (plugin: list_remove)

Please paste entire log. I wanna see which entry crashed it.

Have you tried the examples I posted above?
"Examples of offending values are "7 Days in Hell (2015)", "Batman Under the Red Hood (2010)" and "Batman Apocalypse (2010)"."

These are all movies that started being found by my PR that adds (TV Movie) and (Video) results from imdb searches, so it may be related somehow.
7 Days in Hell (2015) (TV Movie)
Batman: Under the Red Hood (2010) (Video)
Superman/Batman: Apocalypse (2010) (Video)

Hmm, important detail. I'll try to reproduce.

Just a guess, without actually looking at the code... Maybe the imdb lookup fail that was previously cached (assuming your DB is older than the code that made these results be found) is confusing the imdb_list plugin?

Maybe. Maybe the api call for imdb to remove these movies should be different.

I put the entries in quotes because that's how they exist in the directory with pathscrub: windows and the {{movie_title}} {{movie_year}} naming convention.
Drwyrm, since you mentioned you've changed the code, I think I've figured out the issue but I have not yet tested a possible solution.
The files were saved, I presume, when the old code was in effect.  The lookup was made and the files were named.  New look ups to IMDb based on the IMDb movie code will work (the watchlist).  This would explain why the first lookup to IMDb works.  But the filesystem plugin is looking at a directory named with the "old code".  Which is why the filesystem plugin crashes.
I was aware from prior testing that changing "Batman Apocalypse (2010)" to "Superman Batman Apocalypse (2010)" prevents a crash at this value.  I expect that manually correcting the offending values might be a sufficient workaround for me because the current code drwyrm described should prevent offending values from being created in the future.
However, please let me know if you would like me to do anything else to help squash the bug rather than workaround it.

try doing flexget database reset-plugin imdb_lookup and trying again (this will clear all the imdb cache). I think it's a long shot but worth checking. i'll test using a real watchlist with these movies shortly

Couldn't reproduce manually. movies are removed with no issue.
Please attach full debug logs for the task or issue will be closed.

I do think its the failed cache that is causing issues... The local(filesystem) entry was previously cached as failed and a bogus request somehow made it to imdb api.
If your movie collection is big and you want to avoid the full imdb_lookup reset, you can clear just the failed entries cache with 'echo "delete from imdb_search where failed = 1;" | sqlite3 db-config.sqlite'. You should provide us a full debug log as liiight requested first. I wasn't able to reproduce the issue here either.

@drwyrm,
echo "delete from imdb_search where failed = 1;" | sqlite3 db-config.sqlite
returns:
-bash: sqlite3: command not found
I did try flexget database reset-plugin imd_lookup but this did not work either.

Gimme the exact offending files names please

Make sure the log level is before the execute command: flexget - L debug execute - - tasks TASKNAME


Pressing rebound CommandMode binding crashes micro

I'm attempting to rebind Ctrl A/E to jump to start/end of line. I found that with just "CtrlA" and "CtrlE" set, in addition to jumping to the end of the line, it would also go into command mode. So, I attempted to move CommandMode to another key:
{ "CtrlA": "StartOfLine", "CtrlE": "EndOfLine", "CtrlP": "CommandMode" }

And Ctrl+E still seems to do both EndOfLine and CommandMode, and now when I test Ctrl+P, I get:
Micro encountered an error: runtime error: invalid memory address or nil pointer dereference
runtime.errorString runtime error: invalid memory address or nil pointer dereference
/usr/local/Cellar/go/1.5.3/libexec/src/runtime/panic.go:423 (0x616f9)
	gopanic: reflectcall(nil, unsafe.Pointer(d.fn), deferArgs(d), uint32(d.siz), uint32(d.siz))
/usr/local/Cellar/go/1.5.3/libexec/src/runtime/panic.go:42 (0x5fdb9)
	panicmem: panic(memoryError)
/usr/local/Cellar/go/1.5.3/libexec/src/runtime/sigpanic_unix.go:24 (0x761d9)
	sigpanic: panicmem()
/Users/jpillora/Code/Go/src/github.com/zyedidia/micro/cmd/micro/view.go:265 (0x2dfea)
	(*View).HandleEvent: relocate = action(v)
/Users/jpillora/Code/Go/src/github.com/zyedidia/micro/cmd/micro/micro.go:259 (0x14c96)
	main: view.HandleEvent(event)
/usr/local/Cellar/go/1.5.3/libexec/src/runtime/proc.go:111 (0x63be0)
	main: main_main()
/usr/local/Cellar/go/1.5.3/libexec/src/runtime/asm_amd64.s:1721 (0x91b71)
	goexit: BYTE	$0x90	// NOP

This is on the current OSX nightly build

I'm not having this issue at all.  Try running micro -version and see what that says.
It seems to me like you're on an old version, because the error is complaining about relocate = action(v) on line 256 in view.go. But that line is now on line 319 and is relocate = action(v) || relocate.

Bah, sorry! I did install the new binary into /usr/local/bin/ though my $GOPATH/bin is before my $PATH and was indeed using an old version compiled from source


Kmm build warning

Getting these warnings when building KMM Android app:
Dependencies:
com.github.skydoves:compose-stable-marker:1.0.3
Such dependencies are not applicable for Kotlin/Native, consider changing the dependency type to 'implementation' or 'api'.
To disable this warning, set the kotlin.native.ignoreIncorrectDependencies=true project property
A compileOnly dependency is used in the Kotlin/Native target 'iosSimulatorArm64':
Compilation: main

Hey @ponvig, sorry for the delayed response. Would you check out if the 1.0.4 release still faces the same issue?

Duplication of #9


Traditional Pipeline

Hi,
I read your paper. It is a wonderful work. I wonder how I can get the results of the traditional baselines. Could you provide the link of the software? or the detailed steps that you process it? Including traditional pipeline, L3,  and burst.  Thanks.

I think you can use Rawpy as one of the baselines as the traditional pipeline. Different cameras have their own ISPs.


feature/MON-344-add-artifactory-publishing

Over looks great! Just some nit changes to make things more generic and usable across variable Developer Platforms.


Error with exporting TF2.2.0 model with tf.lookup.StaticHashTable for Serving

I'm using StaticHashTable as in one Lambda layer after the output layer of my tf.keras model. It's quite simple actually: I've a text classification models and I'm adding a simple lambda layer that takes the model.output and convert the model_id to more general labels. I can save this version of model with model.save(... as H5 format..) without any issue, and can load it back and use it without any problem.
Issue is, when I try to export my TF2.2.0 model for TF-Serving, I can't find how I can export it. Here is what I can do with TF1.X or with TF2.X + tf.compat.v1.disable_eager_execution()
tf.compat.v1.disable_eager_execution()
version = 1
name = 'tmp_model'
export_path = f'/opt/tf_serving/{name}/{version}'
builder = saved_model_builder.SavedModelBuilder(export_path)

model_signature = tf.compat.v1.saved_model.predict_signature_def(
    inputs={
        'input': model.input
    },
    outputs={
        'output': model.output
    }
)

with tf.compat.v1.keras.backend.get_session() as sess:
    builder.add_meta_graph_and_variables(
        sess=sess,
        tags=[tf.compat.v1.saved_model.tag_constants.SERVING],
        signature_def_map={
            'predict': model_signature
        },
        # For initializing Hashtables
        main_op=tf.compat.v1.tables_initializer()
    )
    builder.save()

This will save my models with TF1.X format for serving and I can use it without any issue. Things is, I'm using LSTM layer and I want to use my model on GPU. By the documentation, if I disable the eager mode, I can't use the GPU-version of LSTM with TF2.2. And without going through above mentioned code, I can't save my model for serving wrt TF2.2 standard and StaticHashTables.
Here is how I'm trying to export my TF2.2 model which is using StaticHashTables in final layer; and which is giving error as below:
class MyModule(tf.Module):

    def __init__(self, model):
        super(MyModule, self).__init__()
        self.model = model

    @tf.function(input_signature=[tf.TensorSpec(shape=(None, 16), dtype=tf.int32, name='input')])
    def predict(self, input):
        result = self.model(input)
        return {"output": result}

version = 1
name = 'tmp_model'
export_path = f'/opt/tf_serving/{name}/{version}'

module = MyModule(model)
tf.saved_model.save(module, export_path, signatures={"predict": module.predict.get_concrete_function()})

Error:
AssertionError: Tried to export a function which references untracked object Tensor("2907:0", shape=(), dtype=resource).
TensorFlow objects (e.g. tf.Variable) captured by functions must be tracked by assigning them to an attribute of a tracked object or assigned to an attribute of the main object directly.

Any suggestion or am I missing anything on exporting TF2.2 model which is using the StaticHashTables in final Lambda layer for TensorFlow Serving?
Thanks!

@amahendrakar Added a new issue on tensorflow/serving.

@spate141,
Thank you for the update. Marking this issue as close since it is being tacked in the serving repo. Thanks!


Uncaught TypeError: markerLayer.clear is not a function

i can't close any tab because of that problem

Do you have a full stack trace?

I have the same problem with version 0.14.0 but with two error notifications opening. I copy-paste both of them below (second one in a separate message), feel free to ask for further information.
Thanks.
[Enter steps to reproduce below:]

...
...

Atom Version: 1.13.0
Electron Version: 1.3.13
System: Ubuntu 18.04.1
Thrown From: highlight-selected package, v0.14.0
Stack Trace
Failed to activate the highlight-selected package
At markerLayer.clear is not a function

TypeError: markerLayer.clear is not a function
    at HighlightedAreaView.module.exports.HighlightedAreaView.removeMarkers (/home/baris/.atom/packages/highlight-selected/lib/highlighted-area-view.coffee:234:17)
    at /home/baris/.atom/packages/highlight-selected/lib/highlighted-area-view.coffee:1:1
    at Array.forEach (native)
    at HighlightedAreaView.module.exports.HighlightedAreaView.removeAllMarkers (/home/baris/.atom/packages/highlight-selected/lib/highlighted-area-view.coffee:226:42)
    at HighlightedAreaView.removeAllMarkers (/home/baris/.atom/packages/highlight-selected/lib/highlighted-area-view.coffee:1:1)
    at HighlightedAreaView.module.exports.HighlightedAreaView.handleSelection (/home/baris/.atom/packages/highlight-selected/lib/highlighted-area-view.coffee:123:6)
    at HighlightedAreaView.handleSelection (/home/baris/.atom/packages/highlight-selected/lib/highlighted-area-view.coffee:1:1)
    at HighlightedAreaView.module.exports.HighlightedAreaView.subscribeToActiveTextEditor (/home/baris/.atom/packages/highlight-selected/lib/highlighted-area-view.coffee:109:6)
    at new HighlightedAreaView (/home/baris/.atom/packages/highlight-selected/lib/highlighted-area-view.coffee:33:6)
    at Object.activate (/home/baris/.atom/packages/highlight-selected/lib/highlight-selected.coffee:52:21)
    at Package.module.exports.Package.activateNow (/usr/share/atom/resources/app.asar/src/package.js:191:19)
    at /usr/share/atom/resources/app.asar/src/package.js:164:32
    at Package.module.exports.Package.measure (/usr/share/atom/resources/app.asar/src/package.js:94:15)
    at /usr/share/atom/resources/app.asar/src/package.js:157:26
    at Package.module.exports.Package.activate (/usr/share/atom/resources/app.asar/src/package.js:154:34)
    at PackageManager.module.exports.PackageManager.activatePackage (/usr/share/atom/resources/app.asar/src/package-manager.js:550:34)
    at /usr/share/atom/resources/app.asar/src/package-manager.js:531:29
    at Config.module.exports.Config.transactAsync (/usr/share/atom/resources/app.asar/src/config.js:337:18)
    at PackageManager.module.exports.PackageManager.activatePackages (/usr/share/atom/resources/app.asar/src/package-manager.js:526:19)
    at PackageManager.module.exports.PackageManager.activate (/usr/share/atom/resources/app.asar/src/package-manager.js:508:46)
    at /usr/share/atom/resources/app.asar/src/atom-environment.js:831:28

Commands

Config
{
  "core": {
    "disabledPackages": [
      "symbols-view"
    ],
    "telemetryConsent": "limited",
    "themes": [
      "atom-light-ui",
      "atom-light-syntax"
    ]
  },
  "highlight-selected": {
    "highlightInPanes": false
  }
}

Installed Packages
# User
atom-beautify, v0.30.6 (inactive)
atom-ctags, v5.1.2 (inactive)
emmet, v2.4.3 (inactive)
highlight-selected, v0.14.0 (inactive)
linter, v1.11.23 (inactive)
linter-gcc, v0.7.1 (inactive)
atom-dark-syntax, v0.28.0 (inactive)
atom-dark-ui, v0.53.0 (inactive)
atom-light-syntax, v0.29.0 (inactive)
atom-light-ui, v0.46.0 (inactive)
base16-tomorrow-dark-theme, v1.4.0 (inactive)
base16-tomorrow-light-theme, v1.4.0 (inactive)
one-dark-ui, v1.8.2 (inactive)
one-light-ui, v1.8.2 (inactive)
one-dark-syntax, v1.6.0 (inactive)
one-light-syntax, v1.6.0 (inactive)
solarized-dark-syntax, v1.1.1 (inactive)
solarized-light-syntax, v1.1.1 (inactive)
about, v1.7.2 (inactive)
archive-view, v0.62.0 (inactive)
autocomplete-atom-api, v0.10.0 (inactive)
autocomplete-css, v0.14.1 (inactive)
autocomplete-html, v0.7.2 (inactive)
autocomplete-plus, v2.33.1 (inactive)
autocomplete-snippets, v1.11.0 (inactive)
autoflow, v0.29.0 (inactive)
autosave, v0.23.2 (inactive)
background-tips, v0.26.1 (inactive)
bookmarks, v0.43.2 (inactive)
bracket-matcher, v0.85.1 (inactive)
command-palette, v0.39.1 (inactive)
deprecation-cop, v0.55.1 (inactive)
dev-live-reload, v0.47.0 (inactive)
encoding-selector, v0.22.0 (inactive)
exception-reporting, v0.40.0 (inactive)
find-and-replace, v0.204.5 (inactive)
fuzzy-finder, v1.4.0 (inactive)
git-diff, v1.2.0 (inactive)
go-to-line, v0.31.2 (inactive)
grammar-selector, v0.48.2 (inactive)
image-view, v0.60.0 (inactive)
incompatible-packages, v0.26.1 (inactive)
keybinding-resolver, v0.35.0 (inactive)
line-ending-selector, v0.5.1 (inactive)
link, v0.31.2 (inactive)
markdown-preview, v0.159.1 (inactive)
metrics, v1.1.2 (inactive)
notifications, v0.65.1 (inactive)
open-on-github, v1.2.1 (inactive)
package-generator, v1.0.2 (inactive)
settings-view, v0.244.0 (inactive)
snippets, v1.0.4 (inactive)
spell-check, v0.68.5 (inactive)
status-bar, v1.6.0 (inactive)
styleguide, v0.48.0 (inactive)
symbols-view, v0.113.1 (inactive)
tabs, v0.103.1 (inactive)
timecop, v0.33.2 (inactive)
tree-view, v0.211.1 (inactive)
update-package-dependencies, v0.10.0 (inactive)
welcome, v0.35.1 (inactive)
whitespace, v0.35.0 (inactive)
wrap-guide, v0.39.0 (inactive)
language-c, v0.54.0 (inactive)
language-clojure, v0.22.1 (inactive)
language-coffee-script, v0.48.1 (inactive)
language-csharp, v0.13.0 (inactive)
language-css, v0.40.1 (inactive)
language-gfm, v0.88.0 (inactive)
language-git, v0.15.0 (inactive)
language-go, v0.43.0 (inactive)
language-html, v0.47.1 (inactive)
language-hyperlink, v0.16.1 (inactive)
language-java, v0.24.0 (inactive)
language-javascript, v0.122.0 (inactive)
language-json, v0.18.3 (inactive)
language-less, v0.29.6 (inactive)
language-make, v0.22.2 (inactive)
language-mustache, v0.13.0 (inactive)
language-objective-c, v0.15.1 (inactive)
language-perl, v0.37.0 (inactive)
language-php, v0.37.3 (inactive)
language-property-list, v0.8.0 (inactive)
language-python, v0.45.1 (inactive)
language-ruby, v0.70.2 (inactive)
language-ruby-on-rails, v0.25.1 (inactive)
language-sass, v0.57.0 (inactive)
language-shellscript, v0.23.0 (inactive)
language-source, v0.9.0 (inactive)
language-sql, v0.25.0 (inactive)
language-text, v0.7.1 (inactive)
language-todo, v0.29.1 (inactive)
language-toml, v0.18.1 (inactive)
language-xml, v0.34.12 (inactive)
language-yaml, v0.27.1 (inactive)

# Dev
No dev packages

And the second one.
[Enter steps to reproduce below:]

...
...

 Are you able to reproduce it consistently?

On my Linux box (where I collected the error reports above) it happens all the time, I had to deactivate highlight-selected. On my Windows box it never happens.
I just noticed that Atom on my Linux (Ubuntu 18.04.1 LTS) is pretty old although the highlight-selected version is the same (both 0.14.0).
Windows> atom --version
Atom    : 1.31.2
Electron: 2.0.7
Chrome  : 61.0.3163.100
Node    : 8.9.3

Linux$ atom --version
Atom    : 1.13.0
Electron: 1.3.13
Chrome  : 52.0.2743.82
Node    : 6.5.0


nixos/goss: init

Description of changes
Add Goss NixOS module which starts a Goss SystemD service serving a /healthz endpoint to validate the server configuration. See https://goss.rocks
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[x] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

@ofborg test goss

@pbsds Hello. Thanks for your review! I have handled all your feedback.


use gather_nd to _gather_states in LSTMBlockWapper

no need for calculate mod_indices and reshape data .

@drpngx I have clean my commit .


ensure reactable works with react-hot-loader

closes #338

Based on other PR not getting attention - I will create a fork on NPM.

I went ahead and made a fork with this fix: https://www.npmjs.com/package/reactable-arc


Add missing backend dev-dependency

Since the default feature set of ndarray-linalg is empty, examples and tests were unable to build since no backend was selected. This commit adds a dev-dependency to use the OpenBLAS backend.
Steps to reproduce the issue that this PR fixes:
$ git clone https://github.com/termoshtt/ndarray-linalg.git
$ cd ndarray-linalg
$ cargo test
...
error: linking with `cc` failed: exit code: 1
...
error: Could not compile `ndarray-linalg`.
...

I'm surprised this hasn't come up earlier. Are other people able to run cargo test without this PR?

Oh, I see. CI is set up to pass the backed with the --features command line argument.


Feat: Customise offset highlight

It would be really cool if I was able to change the highlight of the offset text seperatley from the fill, so that it can fit in with the look I have going with the open buffers.
Does that seem like something you would support?

P.S. This is by far my favorite bufferline plugin.

Sorry for the late reply! Definitely would like to support this, that's a good idea.
For now, you can work around the highlight issue with:
{
--- ...
provider = function(cx)
  local win = require("cokeline.sidebar").get_win(cx.sidebar)
  local width = vim.api.nvim_win_get_width(win)
  local content = "File Explorer" -- your regular content
  return content .. string.rep(" ", width - #content)
end,
bg = function(cx)
  return "#000000"
end,
--- ...
}

Actually, you shouldn't need to do that. This should already be supported, the highlight shouldn't reset until the next section. Mind sharing your config?

I have this for the offset.
-- Set used colors
-- ...

require('cokeline').setup {
    default_hl = {
        fg = function(buffer) return buffer.is_focused and fg or inactive_fg end,
        bg = function(buffer) return buffer.is_focused and bg or inactive_bg end,
    },
    sidebar = {
        filetype = 'NvimTree',
        components = {
            {
                text = ' 󰙅  File Explorer ',
                fg = title,
                bg = dark_bg,
                style = 'bold',
            },
        },
    }
}

If I change the line bg = dark_bg to use my buffer background it sets the entire offset.

Oh, I see, I misunderstood what you were asking for. I'll add that in today!

My bad, forgot about this. I'll try to get this in sometime this week.


Update cas-compliance-trust.md

@batamig

Can you review this PR?
IMPORTANT: When this content is ready to merge, you must add #sign-off in a comment or the approval may get overlooked.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

#sign-off

@AmitMishaeli it looks like you opened this in the public repo instead of the private repo. Please open this in the private repo so that you can sign off. (review.learn.microsoft.com..)

I've created a new PR (in review.learn) but I cannot sign it off 🙁
PR: #4123

From: Batami Gold @.>
Sent: Sunday, March 10, 2024 11:24 AM
To: MicrosoftDocs/CloudAppSecurityDocs @.>
Cc: Amit Mishaeli @.>; Mention @.>
Subject: Re: [MicrosoftDocs/CloudAppSecurityDocs] Update cas-compliance-trust.md (PR #735)
@AmitMishaelihttps://github.com/AmitMishaeli it looks like you opened this in the public repo instead of the private repo. Please open this in the private repo so that you can sign off. (review.learn.microsoft.com..)
—
Reply to this email directly, view it on GitHubhttps://github.com/MicrosoftDocs/CloudAppSecurityDocs/pull/735#issuecomment-1987157143, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AXII5R365MAM5FOSCK6AE6LYXQRD5AVCNFSM6AAAAABEI4JIXSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBXGE2TOMJUGM.
You are receiving this because you were mentioned.

covered by https://github.com/MicrosoftDocs/CloudAppSecurityDocs-pr/pull/4123.
closing
#please-close


Uncaught Error: error: 126/?~\AppData\Local\atom\app-1.22.0\resources\app.asar.unpacked\node_mo...

[Enter steps to reproduce:]

...
...

Atom: 1.22.0 x64
Electron: 1.6.15
OS: Unknown Windows version
Thrown From: Atom Core
Stack Trace
Uncaught Error: error: 126\?\C:\Users\Lou\AppData\Local\atom\app-1.22.0\resources\app.asar.unpacked\node_modules\keyboard-layout\build\Release\keyboard-layout-manager.node
At ELECTRON_ASAR.js:173

Error: error: 126\\?\C:\Users\Lou\AppData\Local\atom\app-1.22.0\resources\app.asar.unpacked\node_modules\keyboard-layout\build\Release\keyboard-layout-manager.node
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:173:20)
    at Object.Module._extensions..node (module.js:598:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:187:18)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (/app.asar/static/index.js:47:45)
    at require (internal/module.js:20:19)
    at customRequire (~/AppData/Local/atom/app-1.22.0/resources/app/static/<embedded>:96:26)
    at get_KeyboardLayoutManager (~/AppData/Local/atom/app-1.22.0/resources/app/node_modules/keyboard-layout/lib/keyboard-layout.js:7:65)
    at get_manager (~/AppData/Local/atom/app-1.22.0/resources/app/node_modules/keyboard-layout/lib/keyboard-layout.js:16:42)
    at Object.getCurrentKeyboardLayout (~/AppData/Local/atom/app-1.22.0/resources/app/node_modules/keyboard-layout/lib/keyboard-layout.js:32:17)
    at exports.keystrokeForKeyboardEvent (~/AppData/Local/atom/app-1.22.0/resources/app/node_modules/atom-keymap/lib/helpers.js:201:42)
    at KeymapManager.module.exports.KeymapManager.keystrokeForKeyboardEvent (~/AppData/Local/atom/app-1.22.0/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:467:20)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (~/AppData/Local/atom/app-1.22.0/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:347:30)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (~/AppData/Local/atom/app-1.22.0/resources/app/src/window-event-handler.js:100:42)
    at HTMLDocument.<anonymous> (~/AppData/Local/atom/app-1.22.0/resources/app/src/window-event-handler.js:3:65)

Commands
     -0:34.4.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-always)

Non-Core Packages
advanced-open-file 0.16.7
atom-ternjs 0.18.3
emmet 2.4.3
file-icons 2.1.13
language-babel 2.77.3
nuclide 0.264.0
pigments 0.40.2

Just started typing section then pressed Tab

Thanks for taking the time to contribute!
We noticed that this is a duplicate of #14461. You may want to subscribe there for updates.
Because we treat our issues list as the Atom team's backlog, we close duplicates to focus our work and not have to touch the same chunk of code for the same reason multiple times. This is also why we may mark something as duplicate that isn't an exact duplicate but is closely related.
For information on how to use GitHub's search feature to find out if something is a duplicate before filing, see the How Can I Contribute? section of the Atom CONTRIBUTING guide.


[FIX] addon_name_to_distribution_name should replace '_' in addon_name by '-'

Example:
addon name: test_addon
odoo version: 16.0

How it was:
addon_name_todistribution_name returns: odoo-addon-test_addon

How it is now:
addon_name_todistribution_name returns: odoo-addon-test-addon

I prefer to keep as is, which is a valid name. You can normalize it as needed using packaging.util.canonicalize_name.


Readme fixes

Hi nvbn,
I added some info to the README to help others who run into similar problems.
Cheers,
tpltnt

learn to spell, dummy

Thank you for pointing it out. Since you seem to have a knack for it, I welcome a sincere pull request.

Hi tpltnt,
It's maybe a wrong steps, there's was a little error in app.
Is your error repeats with new version and without steps in diff?

@delasteve you are right. Thank you for correcting me.

@nvbn I am reinstalling thefuck (version 1.12.) directly via pip and it still fails.

@tpltnt what os and shell are you using?

I tested it on FreeBSD with zsh (in a VM).

Is it repeats with 1.29+?


test result parsing error

running UI tests looks like the parser had a issue on &#x27  which was used in one of the test steps.
/output/3/TEST-OmegaUITests-results.xml: Line 361: PCDATA invalid Char value 8
TEST-OmegaUITests-results.xml.zip

It seems Unicode is not properly handled in BPReporters.m, PR is welcomed :) cc @vargon

Any news on this still cant get a report because of this issue when it generated the report?

Is this still reproducible with latest Bluepill? In BPReporters.m, we have
+ (NSString *)xmlSimpleEscape:(NSString *)originalString {
    if(!originalString) {
        return nil;
    }
    NSMutableString *string = [[NSMutableString alloc] initWithString:originalString];
    [string replaceOccurrencesOfString:@"&"  withString:@"&"  options:NSLiteralSearch range:NSMakeRange(0, [string length])];
    [string replaceOccurrencesOfString:@"\"" withString:@""" options:NSLiteralSearch range:NSMakeRange(0, [string length])];
    [string replaceOccurrencesOfString:@"'"  withString:@"'" options:NSLiteralSearch range:NSMakeRange(0, [string length])];
    [string replaceOccurrencesOfString:@">"  withString:@">"   options:NSLiteralSearch range:NSMakeRange(0, [string length])];
    [string replaceOccurrencesOfString:@"<"  withString:@"<"   options:NSLiteralSearch range:NSMakeRange(0, [string length])];

    return [NSString stringWithString:string];
}```
To skip &#x27

I also have this problem.
I look the xml file, and it seems double single quote ('') caused this error

same, unfortunately i don't have the xml file anymore to validate which character caused the issue.

close old issues. feel free to reopen.


Apm troubleshooting demo 2

Fix for the error thrown by skaffold during qwiklabs practice using kubernetes v1.18
error: unable to recognize "deployment.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"

fix for error: unable to recognize "deployment.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"

thanks @Isaac-jay , this is really a great help for me !

On Fri, May 29, 2020, 09:41 pangs<EMAIL_ADDRESS>wrote:

thanks @Isaac-jay https://github.com/Isaac-jay , this is really a great
help for me !
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/blipzimmerman/microservices-demo-1/pull/1#issuecomment-635851027,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AJGCKIBO7LOR62Z44DEMUQ3RT5YMZANCNFSM4NDUKC5A
.

Thanks for this dude


Drink IBM's kool aid

Hey guys, just wondering if there any reason why you guys don't pull from IBM's work on SwiftyJSON which seems to going well https://github.com/SwiftyJSON/SwiftyJSON/compare/master...IBM-Swift:master

I wonder would it be a problem that IBM code has Apache 2.0 license? As far as I know it's more restrictive than current license SwiftyJSON uses - MIT.
I am not affiliated with anyone, just an user of the library, and want to raise the concern.

IBM's branch is Linux compatible since Swift 3.0, I believe this is a good consultation cause we are going to focus on Linux platform in the future.


Deduplicate keys between feature generation's ProjectInfo and model_training's FullConfigSchema

Allow them to be unified, or at least compositions of one another.

See https://github.com/Aarhus-Psychiatry-Research/psycop-common/pull/96/files/de4a2b4870714743fa51d937647862ddd76844fe#diff-f944fb77048ddbd4e1815d2090169c5cd5b5753ae9c232f091eb115eefcc1ffe for an overview.
The costs here are required refactoring in other projects. This is invisible to pyright, even in the monorepo, because of Hydra.


x/build/dashboard: remove linux-386-387 builder

The linux-386-387 builder has started to fail since CL 258957.
Support for GO386=387 is being dropped in Go 1.16, so the builder can be deleted.
/cc @cagedmantis @toothrot @randall77

Is this just https://go-review.googlesource.com/c/go/+/257963/ , or is there more to do?

@randall77 It's also CL 259449.


Fixed argument name in example

The output argument throws a TypeError: run() got an unexpected keyword argument 'output'.
The Library's documentation uses out instead, which works fine.

Thank you for noticing and opening a pull req, I'll merge this in a minute.


你好！请问有关于内存的操作部分的一些实际代码例子吗？

想知道一些实际的代码例子关于内存处理这一块的！谢谢你！

Hi,
You can refer to
https://github.com/Ascend/samples/tree/master/cplusplus/level1_single_api/1_acl/2_memory_management
This is the current memory management samples we currently have. Please see if this helps.
Best Regards

Hi,
You can refer to
https://github.com/Ascend/samples/tree/master/cplusplus/level1_single_api/1_acl/2_memory_management
This is the current memory management samples we currently have. Please see if this helps.
Best Regards

no any code！

sorry, the samples are still under development. You may find the official document useful https://support.huaweicloud.com/intl/en-us/devg-cpp-cann202infer/atlasdevelopment_01_0068.html
Could you specify about what kind of memory management you are looking for?


Error when trying to export project from virtual machine

Godot version:
Beta.1
OS/device including version:
Windows Server 2008
Issue description:
When trying to export a project from CMD using the following command godot.exe --export --no-window inside the project folder, i get ALERT: Your video card driver does not support any of the supported OpenGL versions. Please update your drivers or if you have a very old or integrated GPU upgrade it. The message makes sense since this is a virtual machine and does not have a graphics card that supports OpenGL. What doesn't make sense is why is why the check is happening when exporting, it should only run when starting the actual game.
I would guess that i need a headless (server) version of godot that does not have video support?
EDIT: Found this #11389. Guess i'm out of luck if thats what i need :grimacing:

Indeed, this is a duplicate of #11389. Note that you should be able to run Godot in a virtual machine by installing mesa-dist-win, which is a software OpenGL 3.3 implementation.

Indeed, this is a duplicate of #11389. Note that you should be able to run Godot in a virtual machine by installing mesa-dist-win, which is a software OpenGL 3.3 implementation.

That is great, thank you! I would've never imagined such a thing existed.

Just passing by to add a possible solution because I also wanted to run Godot 3.5 on a Virtual Box running Windows and I ended up using this DLL https://fdossena.com/?p=mesa/index.frag. You just have to copy it next to your Godot.exe and it works for me :)


Decide where Initializable should be placed

We've been thinking about moving Initializable from zos-lib to openzeppelin-zos since it is needed to make every provided contract upgradeable.
However, this means that every user willing to use zos to build an upgradeable application will have to install openzeppelin-zos as well. Then, they will be importing a whole library to use a single contract. This could be seen as a way to motivate users to use openzeppelin-zos for their projects too. But they may end extending from those contracts instead of using them on-chain tho.
Another option could be to move Initializable to a third repository shared between openzeppelin-zos and zos

We may want to consider that vouching and TPL also depend on this

@facuspagnuolo as I told you offline, I don't like the idea of Initializable being in openzeppelin-zos. Just making my opinion public here.

I don't think the problem is circular references. The main problem is that Truffle does not understand nested dependencies and this results in a bad user experience. What I mean is that if openzeppelin-zos contracts have an import 'zos-lib/...' statement (or whatever other package), Truffle will not resolve the import to openzeppelin-zos's zos-lib dependency but to the zos-lib that is installed in the user's project. So we have to tell users to install openzeppelin-zos and zos-lib side-by-side. This can be hinted at by defining a peerDependency (what we do now) but the user still has to manually install it.
Having Initializable in openzeppelin-zos works around the problem but is definitely not a good long-term solution.
I'm okay with keeping Initializable in zos-lib.

@spalladino Could you explain the circular dependencies problem a bit further?

@frangio I was thinking about zos-lib depending on oz-zos for using RBAC (or other mixin), and oz-zos depending on zos-lib for Initializable.
However, you make a good point about nested dependencies. With that in mind, maybe the best option would be to actually duplicate the Initializable contract for the time being in both repos. WDYT?

That works for me. Note that the initializer modifier also would need to have an obscured name, in case the user wants to extend an oz-zos contract and add custom initialization logic using zos-lib Initializable. I'll think about this a bit more tomorrow but I don't think there would be any further problems in that scenario.
It's somewhat interesting that oz-zos having its own Initializable sort of reinforces the idea that you don't need to use zos-lib Initializable, it is only a utility but you can implement similar behavior in other ways.

Now that I think of it: wouldn't having both Initializable contracts in a
single project open the door to double-initializations? Suppose I extend
from oz-zos/ERC20, and also from zos-lib/Initializable as the tutorials
recommend me to do. Then my contract may end up having two initializers,
one from each Initializable implementation, and one would probably be left
open for an attacker to call, right? Or this would not be an issue, as only
one Initializable would actually be used for setting up the contract?
On Mon, Oct 1, 2018 at 11:14 PM Francisco Giordano<EMAIL_ADDRESS>wrote:

That works for me. Note that the initializer modifier also would need to
have an obscured name, in case the user wants to extend an oz-zos
contract and add custom initialization logic using zos-lib Initializable.
I'll think about this a bit more tomorrow but I don't think there would be
any further problems in that scenario.
It's somewhat interesting that oz-zos having its own Initializable sort
of reinforces the idea that you don't need to use zos-lib Initializable,
it is only a utility but you can implement similar behavior in other ways.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/zeppelinos/zos/issues/143#issuecomment-426123930, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAaOJEOdlKqnXXrCsIn6dB_Cgfv_zIdJks5ugswfgaJpZM4W-tUJ
.

@spalladino I've been thinking about that too.
My understanding is that modifiers inherited multiple times (initializer in this case) behave like functions inherited multiple times, and only the most-derived one is used. This translates in every contract checking the same initialized and initializing variables, making initializer safe. But AFAIK this is undocumented behavior in solc. I'm pretty sure that Initializable's storage is reserved twice though.
Note that to inherit bot Initializables one has to be imported with an alias or the compilation process will fail.

Note that to inherit bot Initializables one has to be imported with an
alias or the compilation process will fail.

Yes, I was thinking about the case in which Initializable was renamed in
oz-zos.
On Tue, Oct 2, 2018 at 11:18 AM Patricio Palladino<EMAIL_ADDRESS>wrote:

@spalladino https://github.com/spalladino I've been thinking about that
too.
My understanding is that modifiers inherited multiple times (initializer
in this case) behave like functions inherited multiple times, and only the
most-derived one is used. This translates in every contract checking the
same initialized and initializing variables, making initializer safe. But
AFAIK this is undocumented behavior in solc. I'm pretty sure that
Initializable's storage is reserved twice though.
Note that to inherit bot Initializables one has to be imported with an
alias or the compilation process will fail.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/zeppelinos/zos/issues/143#issuecomment-426291337, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAaOJHp6aUdNb9E4GP11fiWou8bE4Z0Tks5ug3XCgaJpZM4W-tUJ
.

After all the discussion, I've come to the opinion that the safest option is to keep a single Initializable in zos-lib, and make it a peerDependency of oz-zos as @frangio mentioned, even if it's not the best UX. WDYT?

Agree, let's go with it. Could you add some details to this issue with the next steps to solve it?

wouldn't having both Initializable contracts in a single project open the door to double-initializations?

I'm not sure I understand this. In the scenario you described, if the user extends ERC20 they have to call ERC20.initialize() in their custom initialization logic. This should prevent any future calls of initialize. An attacker would be able to invoke ERC20.initialize externally only if the user doesn't invoke it themselves, in which case they'd have an uninitialized contract so wouldn't this situation be evident?

I'm not sure I understand this. In the scenario you described, if the user extends ERC20 they have to call ERC20.initialize() in their custom initialization logic. This should prevent any future calls of initialize. An attacker would be able to invoke ERC20.initialize externally only if the user doesn't invoke it themselves, in which case they'd have an uninitialized contract so wouldn't this situation be evident?

My concern is precisely if they forget to call ERC20.initialize() in the user contract initializer. In that case, only the ERC20 part of the contract would be left uninitialized, as the user will happily create a proxy and initialize it, without noticing that a different initializer was left out. The problem is that an attacker can still initialize that part afterwards.
If both the child and ERC20 share the same initializer, and the user forgets to call ERC20.initialize() from the user contract initializer, then the ERC20 part is also left uninitialized, but no one can initialize it afterwards.

Discussed offline with @frangio. We agreed on avoiding the chance of having two different isInitialized flags on the same contract, so we'll keep a single Initializable implementation on zos-lib, and declare it as a peer dependency of oz-zos. We may want to explore explicitly installing zos-lib as part of zos init to support this more easily.
Also, note that the Initializable from oz-zos has a small change, so we'll need to update zos-lib to reflect that change.

Closed via https://github.com/OpenZeppelin/openzeppelin-zos/pull/31 and https://github.com/zeppelinos/zos/pull/215.


Use cURL instead of file_get_contets for https API calls

For the record, it is completely possible to disable peer verification using stream context:
stream_context_create([
	'http' => [
		/* HTTP options */
	],
	'ssl' => [
		'verify_peer'      => FALSE,
		'verify_peer_name' => FALSE,
    ]
]);

This could still be used with file_get_contents while simultaneously not requiring curl as a module dependency.

Yes, @joeyrush can you provide any description about why you're switching to using cURL? It might be nice to at least wrap this functionality and check if the curl module is provided and fallback to file_get_contents if it isn't.

@mattsah, @khamer  I think that this may be the reason why file_get_contents wasn't working for me http://stackoverflow.com/a/9659169/5818271 but I couldn't say for sure. This was a rushed solution which worked for what I was working with without doing too much research

@joeyrush
So your fix is better, but my concern is still why google's SSL would need peer verification disabled.  This is usually only required with bad or self-signed certificates.  Are you able to test with CURL but removing the line which does this?
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
If that works, I'd be inclined to remove the verify peer flags but accept curl as an option for those who disable URL opens.  But there shouldn't be a need to disable peer verification.


Updated Actions workflow

Just a few minor things:

Updated the main.yml after orbitize was removed from the dependencies
Removed requirements.txt from the workflow folder
Added several URLs to the README and fixed an rst format issue

Is there a "t" missing here? https://github.com/wbalmer/backtracks/blob/9a8d4733bd0c3730f0e9b78f4444ebce75ebfc09/.github/workflows/main.yml#L27

I find Files changed quite handy, which shows the most recent "state".


[AMBARI-23382]  Ambari-server sync-ldap: Sync event creation failed

What changes were proposed in this pull request?
In ambari_server/serverUtils.py use socket.getfqdn() to obtain the fully qualified domain name of the host. This is needed to pass more recent ssl verification. Behavior in the non-ssl case does not change so kept the 'SERVER_API_HOST=<IP_ADDRESS>'
How was this patch tested?
Currently deployed in our clusters.
Updated code in ambari-server/src/test/python/TestServerUtils.py and ran python unit tests.
mvn -am -pl ambari-server -DskipSurefireTests test

PR #806 (same changes) was merged into trunk. I am thinking this PR is not needed. I will close it.


merge

Motivation:
Explain here the context, and why you're making that change.
What is the problem you're trying to solve.
Modification:
1
Describe the modifications you've done.
Result:
Fixes #.
If there is no issue then describe the changes introduced by this PR.

ok


Sprockets register_engine deprecated

Hello there!
I'm using the skim gem to convert hamljs templates to slim using the .jst.skim extension. It works perfectly but Sprockets as of version 3.7.0 deprecated the register_engine call in favor of a different approach using register_mime_type and either register_compressor or register_transformer.

An explanation on register_mime_type and register_transformer
An example of how the class passed in register_transformer should look

It shows that they added a deprecation notice in the 3.7.0 section in the release notes
This is the exact error I'm getting:
DEPRECATION WARNING: Sprockets method `register_engine` is deprecated.
Please register a mime type using `register_mime_type` then
use `register_compressor` or `register_transformer`.
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
 (called from <top (required)> at /Users/myusername/.rvm/gems/ruby-2.3.0/gems/skim-0.10.0/lib/skim/sprockets.rb:3)

From what I can find, there is no simple way to get around this deprecation warning due to the fact that version 3.7.0 deprecates the functionality but still requires you to use it :|
I would write something along these lines to fix the registering issue, however the Skim::Template class cannot handle Sprockets 4 yet (which is still in beta at the time of writing). Either way it might give you some inspiration!
if Sprockets.respond_to?(:register_engine)
  args = ['.skim', Skim::Template]
  if Sprockets::VERSION.start_with? '3'
    args << {silence_deprecation: true, mime_type: 'text/skim'}
  end

  Sprockets.register_engine *args
else
  Sprockets.register_mime_type 'text/skim', extensions: ['.skim', '.jst.skim']
  Sprockets.register_transformer 'text/skim', 'application/javascript', Skim::Template
end

Replicating this issue should be simple.
In a fresh Rails (5, using sprockets >= 3.7.0) app,
Gemfile
gem 'skim'
gem 'sprockets', '>= 3.7.0'

Run the bundle or bundle install command
Restart rails server (ctrl+c to stop rails s to start)
The message should appear when starting the server, if not try creating a template

Any fix to this ?

@mohsintahir the last commit was on 8th of July 2016, it's been stale for quite a while. Your best chance would be to look at forks to see if anyone continued maintenance.

Got it. Thanks!

It seems that this has been resolved in a118ab77a9299b532934d2853e13296ce9950a63, closing.


Finish the API specification for "Get recent observations"

Add a full specification for the end-point. This will be a useful template that can be used to generate the specification for the other end-points.

A Swagger API specification would be interesting but only as a way of learning the tool. The practical benefits to the project, particularly since the Postman docs can be used to generate client code, are less clear.