Cursor not aligned with text

Atom Version: 1.0.19
OS: Ubuntu 14.04.4 LTS
Hello,
I am currently having an issue where the cursor on atom will not keep aligned with the text.  Here is a gif:

This happens even when there are not repeating characters, getting worse the farther right the text is on the screen.  I should mention that I am not running any third party packages.  So far, I have tried closing atom, renaming the .atom file, and then opening again while running only the core packages in order to try to solve the issue.   I have even tried completely uninstalling atom to try to fix it, but the issue still persists.  Any and all help will be appreciated.

Hey @GreyFox48, thank you for reporting this issue!
Could you please post which theme you're using, your custom stylesheet and the font family you're working with as well? Seems like something is screwing up character measurement, which shouldn't happen unless some particular font properties are set either on your stylesheet or in the font itself.
Also, which packages are you using? (hint: running apm list in your terminal will show them)
It'd be great if you could also specify when you started observing this bizarre behavior: spotting a correlation with a specific Atom version could help us identifying the culprit.
Thank you! :bow:

Hello @as-cii and thank you for replying.
Thanks to you, I found the issue.  The font family for whatever reason was completely blank, like so:

I set it to Ubuntu Mono, and that seemed to fix the issue.  I also was able to recreate the problem:  If you close atom, rename the .atom folder, and then reopen atom the font family will always be set to blank, and the character measurement will be messed up again.  I don't know if one is intended to manually fill out the the font family during first time setup or not, but it seems to create issues.
In case you wanted to still know about the other information, here it is:
UI and Syntax Theme: One Dark
Font Family:  was blank, now Ubuntu Mono and fixed
Stylesheet: is whatever the default is:

Packages: according to apm list none, aka (empty), disregarding the built in packages.
I noticed the behavior Saturday, which is about when I installed atom for the first time.
Thank you so much for the help!  Really appreciate it.  Atom looks like an excellent text editor, and I'm glad to have it working.

I'm experiencing the same issue on a Dell XPS 13 with Ubuntu 15.04. I'm running 3200x1800 with a display scale setting of 2x (hidpi).
I did not experience the issue until I upgraded to 1.0.19 a few days ago from 1.0.11.
When I downgraded to 1.0.11, it fixed the issue for me.
I can confirm that "Font Family" is blank in the default configuration and switching to Ubuntu Mono does fix the issue. However, if I switch to my normal editor font Hack, I definitely still have the issue even with "Font Family" populated.
No packages installed. No stylesheets. Default theme. If you need more information, please let me know.

Thank you so much for the help! Really appreciate it. Atom looks like an excellent text editor, and I'm glad to have it working.

Glad you enjoy it! :green_heart:

I don't know if one is intended to manually fill out the the font family during first time setup or not, but it seems to create issues.

I am not sure if the configuration setting will be filled by default (I think it won't), but Atom should set for you a standard font out of the box nevertheless, so this still seems an anomalous behavior to me. Could you tell which font gets automatically picked up when the font-family box is empty?
It should default to a monospace character, but something is probably screwing that up. To check which font is being used, you could simply poke around in Chrome Developer Tools:

And check the computed styles of any line:

I think this potentially points a finger at the Chrome 43 update that went in during 1.0.12 (since 1.0.11 is the first version where I seem to not experience the issue)

That's interesting, @mark-adams. I wonder: are you able to reproduce this issue with a font that's not Hack? This should let us further discard/confirm the hypothesis that it's a font-related issue.
@atom/feedback: could anyone with an Ubuntu environment reproduce this problem?
Thanks everyone! :bow:

I run Linux Mint 17.3 on a Dell M3800 (HiDPI) and had exactly the same problem, which was fixed when I populated Font-family with Ubuntu Mono. It was blank on my OOTB install 1.0.19. I haven't tried any other fonts though

/cc @mnquintana

Testing in 1.0.19 (with the issue): font-family: Menlo, Consolas, 'DejaVu Sans Mono', monospace;
Testing in 1.0.11 (without the issue): font-family: Menlo, Consolas, 'DejaVu Sans Mono', monospace;

I tried switching to Source Code Pro to eliminate Hack being the issue and I experience the same thing with Source Code Pro (cursor is not aligned with the text)

I'm thinking this is related to HiDPI. I went ahead and tried changing my display scaling to 1.0 instead of 2.0 (2.0 is the norm for HiDPI) and the issue does not present itself anymore for the default (no font), Hack, or Source Code Pro.

Is it possible that Atom / Elecftron is not reading the system display scaling setting properly?

I experience this issue in v1.0.19 on a high DPI Cinnamon 17.2 Mint installation on certain text zoom levels. I can hold the ctrl key and scroll in Atom to find a level that works.

I take it back. The cursor positioning seems to be completely botched most of the time.

This seems to coincide with our recent electron upgrade. @zcbenz: as far as I remember, this area of the code hasn't changed from v1.0.11; do you think this could be an issue with electron/Chrome?
Unfortunately I cannot reproduce it (as it seems platform-dependent and somehow related to the font) but this should probably be solved after we :ship: #8811: our current measurement/positioning technique relies on measuring characters for a certain scope once and then reuse that width to compute coordinates for visual elements; this is probably having an impact on this issue as well, so I'd like to wait until we merge the new measurement mechanism before diving in.
@niedzielski @mark-adams: no pressure on this, but it would be awesome if you could test the aforementioned PR by building it locally: your feedback would be really appreciated! :pray:

When trying to reproduce, make sure you have display scaling set to "2" (see the screenshot above) as this appears to be important and may explain why the issue is hard to reproduce (usually users don't use display scaling unless  they have a hidpi screen)
I tried #8811 locally and it appears to fix this issue very nicely. :smile:

@as-cii It is probably because subpixel-font-scaling: false is not working on Linux, that option had been removed by Chrome very long ago and I have been patching Chromium to add it back, it possible that recent Chrome versions have added new code paths for rendering font on Linux and our patch didn't cover that.
Refs https://github.com/atom/atom/issues/6055.

I tried #8811 locally and it appears to fix this issue very nicely.

Awesome, thanks for trying that out! :bow:

It is probably because subpixel-font-scaling: false is not working on Linux, that option had been removed by Chrome very long ago and I have been patching Chromium to add it back, it possible that recent Chrome versions have added new code paths for rendering font on Linux and our patch didn't cover that.

Makes sense. We're enabling subpixel font scaling by default in #8811, thus we should be able to drop our patch to support the deprecated option as soon as that PR lands. :+1: Thanks @zcbenz!

Closing since #8811 has been merged.


When a second livechat is started there are no conversation update activities

Fixes # 1569
Changes made

We removed the line on the componentWillMount that checked with the function shouldStartNewConversation if a new chat should be started because this was causing the incorrect behaviour
We are adding some files that were commited with linting errors that prevented the branch from building.

Pull Request Test Coverage Report for Build 209

1 of 1 (100.0%)  changed or added relevant line in 1 file are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage decreased (-0.002%) to 57.639%

Files with Coverage Reduction
New Missed Lines
%

packages/sdk/ui-react/src/splitter/splitter.tsx
1
0.0%

Totals

Change from base Build 205:
-0.002%

Covered Lines:
5428

Relevant Lines:
8864

💛  - Coveralls

LGTM :shipit:


What would be the names of the market cap object key?

I'm building a node.js app that wants to compare the predicted price of a coin against what it's market cap would need to be to achieve that price. Do you have additional object key names for other metrics about that coin's object? Or would they be the same as the actual API?

It seems this project returns the raw response from coinmarketcap. Your best bet would be to check out their response object example.

@thebenlamm is correct. @skramzy please check out coinmarketcap docs. This library is just a simple wrapper on it.

I think this can be closed since there hasn't been any activity for over a year. Feel free to reopen.


Added ability to define a keycode as well as key value.

Changes as per my suggestion in #53

@dmacfarlane - Is this PR being looked at? I notice there isn't much activity recently on this repo.

I'm hoping this can be fixed in Selenium to avoid adding additional config options to this package. I was also wondering if there was a straightforward way to get the keyCode from the triggerChar to avoid the config and provide a more universal solution, but that doesn't seem possible either.

@dmacfarlane - agreed that Selenium should fix the issue. I took a look at it myself and it's quite a large job!
Would you accept my pull request instead if I change it so you can specify a keycode or key as the triggerChar?
Key as triggerChar
<input type="text" [mention]="items" [mentionConfig]="{triggerChar:'@',maxItems:10,labelKey:'name'}">

KeyCode as triggerChar
<input type="text" [mention]="items" [mentionConfig]="{triggerChar:192,maxItems:10,labelKey:'name'}">

I would then do a simple typeOf check so if the triggerChar is a number, then the keyCode is used, but if it's a string, the key will be used. I would obviously update the docs to reflect this. Let me know what you think!

If you leave the docs as they are (revert your change) and add the typeof check, I'll include it as a temporary (undocumented) fix until the issue with Selenium is fixed.

@dmacfarlane - I have just implemented the change I suggested and have reverted all doc changes I made so this can go under the radar. Tested it locally with the e2e tests and they worked with the default, a specified char, and specifying a keyCode. It would be great if this could be released soon I can stop setting the keyboard config to US on our Selenium Server.


Replace explicit imports with nuxt/component references

For instance:
https://github.com/BKWLD/cloak-customer/blob/9de35417bcea7fce4bd80f53911f201e88a76c19/pages/login.vue#L14-L15
This is so we have the option of using the overriding feature of nuxt/components to replace these at the project level.

I've gone through all the components and updated them, so now it's like:


Devise and easier way to edit guidance on funder (customisable) templates

Please complete the following fields as applicable:
What version of the DMPRoadmap code are you running? (e.g. v2.2.0)
v3.0.2
Expected behaviour:
Administrative users would like to be able to edit all guidance attached to a customisable template
Actual behaviour:
Administrative users can add sample answers and generic guidance to each question within a customisable template
Themed guidance relies on DMPonline admins (or local super-admins) editing a) the themes attached to a question within the funder template and/or b) the themed guidance itself. They feel this is a convoluted route.
Steps to reproduce:
Edit customisable funder template (on test/dev).

Issue arose out of the 2020 Usability Testing exercise

Also see issue https://github.com/DMPRoadmap/roadmap/issues/616 about adding guidance and guidance groups, which is relevant to the whole process of adding, editing guidance.

Org admins are able to create and manage their own guidance. If the user specifies the Org when creating the plan then the guidance for their org should automatically be selected.
The problem with allowing an Org Admin to modify themed guidance is that it is not specific to an individual template it applies to all templates.


Add inherit_docstring decorator to inherit docstring

Closes #9.

Hello and thank you for this PR!
Like for the metaclasses, would you mind creating one decorator per style?
For performance reasons, would you also mind preventing the decorator from changing the docstring after the first call?

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Files
Coverage Δ

src/docstring_inheritance/__init__.py
100.00% <100.00%> (ø)

:loudspeaker: Thoughts on this report? Let us know!.


Plugin development convenience

Intention

I'm submitting a feature request
Description
There are some things which - as far as I can see - will be repeated by anyone creating a Monterey plugin. I will attempt to list them here for discussion.
Screen creation
Screens share some functionality. For example, there's a header with a back button. If a screen doesn't have a back button (or equivalent) there's no way to return to the main screen.
Currently, every screen needs to implement the header (template) and the goBack() function (view model) itself.
Also IMO the back button should appear at the same position for every screen.
Providing a "static" header with back functionality would probably be a good thing.
Dependency injection
I've noticed that in a screen the selectedProject is injected by di while in a tile the project is injected via the model in the plugin's index file.
This is clever if you use multiple tiles per project. But I found it was a little confusing at first sight.

Screens share some functionality. For example, there's a header with a back button. If a screen doesn't have a back button (or equivalent) there's no way to return to the main screen.
Currently, every screen needs to implement the header (template) and the goBack() function (view model) itself.

Also IMO the back button should appear at the same position for every screen.
Providing a "static" header with back functionality would probably be a good thing.

Good points.  Although the screen has to implement the goBack() function itself, so that all screens can decide what to do when the user goes back. The screen would be able to save, or throw an error etc when the user clicks "back"
What we can do is create a custom element for the header part:

    <button class="returnToPluginListBtn btn btn-primary" click.delegate="goBack()" i18n="back"></button>

App launcher

${selectedProject.current.name}

Dependency injection

I've noticed that in a screen the selectedProject is injected by di while in a tile the project is injected via the model in the plugin's index file.
This is clever if you use multiple tiles per project. But I found it was a little confusing at first sight.

This is something we should change, yes.


Improve visual look of the highlight

Improve the visual look of the highlight with a colortrans (color transformation) node: https://groups.google.com/forum/?hl=en#!topic/scenejs/2RMt-TKVbPg
Or alternatively used proposed change to materials: https://github.com/xeolabs/scenejs/issues/131

Just a note that I'm about to remove the colortrans node and replace it with a custom shader - the effect will be the same, and you can always rewrite that shader to suit.

Thanks, so you're saying I should just create my own custom "highlight" shader right?

I've just created a custom shader example that replicates the exact
effect of the colortrans node (cut and pasted from that), so you
should be able to use that..I'm just about to switch Human over to use
it as well.
On Sun, Oct 9, 2011 at 7:24 PM, Rehno Lindeque
<EMAIL_ADDRESS>wrote:

Thanks, so you're saying I should just create my own custom "highlight" shader right?
--
Reply to this email directly or view it on GitHub:
https://github.com/bimserver/BIMsurfer/issues/36#issuecomment-2337419

Cool, that's great

Also need to highlight objects that are composed of many objects (should be a similar fix to issue #32)


from_qualified_name bug when column name starts with a number

@ayushdg pointed out that when doing Column::from_qualified_name("table_pq.a"), it uses SQLParser's Tokenizer to generate:
[
  Word(
    Word { value: "table_pq", quote_style: None, keyword: NoKeyword }),
    Period,
    Word(Word { value: "a", quote_style: None, keyword: NoKeyword }
  )
]

as expected, which can then return a Column { relation: "table_pq", name: "a" }. However, if the column name starts with a number, like Column::from_qualified_name("table_pq.1b"), we get:
[
  Word(
    Word { value: "table_pq", quote_style: None, keyword: NoKeyword }),
    Number(".1", false),
    Word(Word { value: "b", quote_style: None, keyword: NoKeyword }
  )
]

and we're not able to return the expected result (it ends up having to return a Column { relation: None, name: "table_pq.1b" } instead of a Column { relation: "table_pq", name: "1b" }).
I was wondering if it would be better to fix this on the SQLParser side, or if it would make more sense to add extra logic for from_qualified_name on the DataFusion side instead?

I think this might actually be intentional. The SQL dialect that DataFusion uses intentionally disallows having numbers start an identifier, and if you want to have that case then you'd need to quote the identifier, like so:
Column::from_qualified_name("table_pq.\"1b\"")
To indicate that it is an identifier as a whole, not a number preceding a word.
Postgres treats such identifiers in a similar way.

Thanks! This makes sense to me.
Since Dask-SQL wants to support column names starting with a number, we can just make some changes on our side rather than on the DataFusion side.


[python] Missing iree.compiler.version

This got dropped at some point. We should export an iree.compiler.version with similar contents as the iree.runtime.version.

@stellaraccident Old issue alert! Still active?


error for  pgrest command

hello,
its showing error for me when giving a command :- pgrest --db test

events.js:72
throw er; // Unhandled 'error' event
^
Error: fe_sendauth: no password supplied
at Connection.<anonymous> (/usr/lib/node_modules/pgrest/node_modules/plv8x/node_modules/pg/lib/native/index.js:202:17)
at Connection.emit (events.js:95:17)

hello, @arunr307 you find a way to get working?

@jelitox  no......Did you have any idea?


jerry_has_property () returns true even on a newly created object

The following test fails at jerry_has_property ():
#include "config.h"
#include "jerryscript.h"
#include "test-common.h"

int
main (void)
{
  TEST_INIT ();

  jerry_init (JERRY_INIT_EMPTY);

  jerry_value_t object = jerry_create_object ();
  jerry_value_t prop_name = jerry_create_string_from_utf8 ((jerry_char_t *) "something");

  TEST_ASSERT (!jerry_has_property (object, prop_name));
  TEST_ASSERT (!jerry_has_own_property (object, prop_name));

  jerry_release_value (object);
  jerry_release_value (prop_name);

  jerry_cleanup ();

  return 0;
} /* main */

Why would any prototype in object's prototype chain have the property "something"?
Either way, I think it'd be good to cover those two APIs with a test.

OK. NM. The documentation is wrong. jerry_has_property () and jerry_has_own_property () return jerry_value_t not bool.

Wrong button :) sorry


tew-712br : no lights come on

After my TrendNET TEW-712BR has booted, none of the LEDs (power, ports, wlan) light up.  This does not seem to affect normal functioning but does make it tricky to tell whether it's functioning

the hardware is deceased now anyway, closing this as unlikely ever to reproduce it


Add support to upgrade to the latest version

This commit:

Adds an option to upgrade to the latest version available
in the channel when set.
Fixes linting issues.


Add duplicate task name alert

-Add check for tasks with duplicate name within task list

Codecov Report

Merging #103 (e53b2d8) into master (ff74789) will decrease coverage by 0.08%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##             master     #103      +/-   ##
============================================
- Coverage     64.55%   64.47%   -0.09%
  Complexity      444      444
============================================
  Files            87       87
  Lines          1518     1520       +2
  Branches        154      155       +1
============================================
  Hits            980      980
- Misses          498      499       +1
- Partials         40       41       +1

Impacted Files
Coverage Δ
Complexity Δ

...a/seedu/address/logic/commands/AddTaskCommand.java
83.33% <0.00%> (-16.67%)
7.00 <0.00> (ø)

Continue to review full report at Codecov.

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


jsx-closing-bracket-location when returning directly

With default settings, this is considered warning. I am wondering how do you write this kind of code.
    render() {
        return (<Application
            {...defaultProps}
            {...this.props}
            {...options}
        />);
    }

This looks totally weird in my opinion...
    render() {
        return (
        <Application
            {...defaultProps}
            {...this.props}
            {...options}
        />);
    }

I personally write it this way:
    render() {
        return (
            <Application
                {...defaultProps}
                {...this.props}
                {...options}
            />
        );
    }

Ah I see, that doesn't look so bad except it's two extra lines. Hmm. Do you think it would be possible to extend the rule so it can recognize alignment to return ?

It is possible to add another location type, with the same behavior of tag-aligned except when the tag is preceded with return.
render() {
  return (<App
    <Component
      {...defaultProps}
      {...this.props}
      {...options}
    />
  </App>);
}

I think it's not just return.  (We are seeing this same issue, and would prefer not to have the extra parens.)  For instance, we'd like to be able to do
   var x = <App
      ...
   />;


Added missing spec tests

I filled in some spec tests that were missing, following the style of existing ones. These cover select, checkbox, radio_button, table, option, and file_field.

Wow, somehow I totally missed this pull request. I blame too many GitHub projects ;) This is awesome work, thank you so much!

No problem, glad to help out!


API for managing groups

Hi,
Is there a way to manage groups and users in group with the API?
Best regards
Blaise Drayer

It's available now in the version 1.0.24


Unify framebuffer location

This is a long-term concern.  Nothing needed immediately.
It is a not-insignificant perf hit to call getPxTftFramebuffer or to reach into and get a global pixel register value.  However, using file-static variables are fast.
It would be really good if we could avoid the function call, or global read.
I was seeing ~10% perf boosts on the flight sim by making these changes.

The framebuffer is malloc'd rather than being file static. I think if you want to static it, we'll also need to steal some memory from the heap in the linker.
if (NULL == pixels)
{
    pixels = (paletteColor_t*)malloc(sizeof(paletteColor_t) * TFT_HEIGHT * TFT_WIDTH);
}

No need to static it or not - its getting access to the pointer that's the hard/slow part.  Making a project-global variable takes an inordinate amount of time to load at the beginning of the function.

OK. If it's really that easy and impacts flightsim, do it in that branch?

Good to have a discussion on - I am doing it where it counts most for flightsim, but could improve wsg timing as well.

Is there any downside?

Closing until we need the perf boost.


meta is undefined

I'm using latest in gulpjs/gulp#4.0. When I try to use any of the commands like gulp --tasks or when WebStorm tries to run gulp --tasks-json I get an error.

 return meta.tree;
            ^

TypeError: Cannot read property 'tree' of undefined

I can post the full stack trace if needed. This may just be a known issue because it's in the middle of development but I thought I'd at least get it logged in case not.

I'm not getting this error, can you provide some more information?

I couldn't reproduce this on my personal computer tonight so I'll try it on my work computer again tomorrow which is the original computer I had the problem on.

I spent some time trying to track down the issue again. It seems to only be happening when I use a custom registry. I have a very basic custom registry which inherits from undertaker-registry.
'use strict';

var util = require('util');
var DefaultRegistry = require('undertaker-registry');

module.exports = BuildTasksRegistry;

util.inherits(BuildTasksRegistry, DefaultRegistry);
function BuildTasksRegistry() {
    DefaultRegistry.call(this);

    this.set('clean', function(done) {
        console.log('cleaning');
        done();
    });
}

My gulpfile is also very simple
'use strict';

var gulp = require('gulp');
var BuildTasksRegistry = require('./gulp/BuildTasksRegistry.js');

var buildTasks = new BuildTasksRegistry();
gulp.registry(buildTasks);

I can successfully run the command gulp clean. However, like I mentioned originally gulp --tasks results in that error being thrown.
I'm using undertaker-registry version 0.0.3
with gulpjs/gulp#4.0 branch
When I step into gulp and therefore into undertaker I notice the assignment to meta in tree.js.
var meta = metadata.get(task);

Looking at the contents of the metadata module that's being used in the line above, I can see it's simply a new instance of a WeakMap being returned. However, that WeakMap instance has never had any keys set. Therefore meta is undefined from the metadata.get(task) evaluation.
Does it look like I'm doing anything wrong or do you know what the metadata section is supposed to actually do?

Same error here

@mikehaas763 can you please check out https://github.com/phated/undertaker/issues/25 - we have a new way of defining custom tasks (in an init method on the registry).  The init method receives the undertaker instance so metadata can be tracked.  Please try this feature out with the https://github.com/phated/undertaker/tree/registry-init branch and let me know how things go.  I want to get as many people trying it out as possible before I cut a release.  Thanks.

Specific commit https://github.com/phated/undertaker/commit/21cafaa7981b1fc21d8a42debf10cf18e4308a6b

@mikehaas763 pinging

I believe this was closed by https://github.com/phated/undertaker/commit/e7bf5b3602e522e75d7bf964d8b70d9e7fa26a32 - Please reopen if changing to the init lifecycle hook doesn't solve this problem


Update monaco 0.39

based on https://github.com/CodinGame/monaco-vscode-api/pull/126

@CGNonofr Nitpicking here 🙂 Settings and Keybindings should resize when main editor view and the panel resizes

@CGNonofr Nitpicking here slightly_smiling_face Settings and Keybindings should resize when main editor view and the panel resizes

fine ! (: => 2faff7d57ee076fac5dd524017e1f6048cb42e5e
(We should probably review/merge both PRs at the same time)


Allow manual ordering of plans in additional_plans

 I want to specify a manual ordering of additional_plans on a Product.

@wlonk @jgerigmeyer I'm assigned here but not sure if there is any frontend needs on this pr. Can either confirm?

I don't know; does this only get ordered through the admin?

@wlonk @jgerigmeyer I'm assigned here but not sure if there is any frontend needs on this pr. Can either confirm?

@duggiemitchell I think Kit is correct that the front end is not actually doing any sorting here currently, but just displaying them in the order they're returned from the API. But, since we're storing these plans as an object, I'd rather not rely on object-entry ordering. Probably best to sort on the front end at display-time, listedAdditionalPlans in products/detail.tsx.


Support for promises broken?

This works:
export default function (req, res) {
  template.render({hello: (callback) => {
    callback(null,'world')
  }}, res)
}

This doesn't:
export default function (req, res) {
  template.render({hello: () => {
    return new Promise((resolve, reject) => {
      resolve('world?')
    })
  }}, res)
}

We have a few test cases that make use of promises and those tests are passing. I'll take a closer look to see what the problem might be.

Please see my commit. It's because of using the non-standard(?) .done
As soon as I removed .done, it works just fine with my rsvp/es6-promise promises. Thanks!


Document is corrupted

When opening the document in word it is reported as corrupted. The automatic recovery dialog is able to repair it, but it reports an error with "Styles 1".
I've tried both with contents and empty documents.
As an aside; when unzipping the document with 'unzip', I get the following warning:
test % unzip 10.docx
Archive:  10.docx
warning [10.docx]:  34710 extra bytes at beginning or within zipfile
  (attempting to process anyway)

I did try to downgrade RubyZip from 1.1.7 to 1.1.0, with no success.
Ruby 2.2.2, Rails 4.2, Caracal 1.3.0

Sorry, I was out of the country last week.  I'll try to help with your two issues today.  Caracal defers all zipping logic to RubyZip, so I doubt very much this is a Caracal issue per se.  I'll try to recreate using your specified stack.
What setup are you using? OSX, Linux, Windows?  We had an issue recently from a user who experienced a bug with RubyZip on a Windows server.  I've never had an issue with this on OSX or Linux.

OSX Yosemite in development, and ubuntu latest stable in production. Both versions report the error.

That's the same as me, and all my documents open fine.  Which version of Word are you using to view the documents?

I've tried with both MS Word 2013 on windows and Word for Mac Beta 2015.

Huh.  We've tested the library on a number of different versions of the software.  I thought MS Word 2013 was one of them, but there are so many versions of Word, it's hard to say.  I know it loads on Office365 and every 2010+ version we've tried.  You'd think if it uploads to Office365, it'd be compatible with all relatively recent versions, but maybe not.
I'll look at the gist tomorrow and see if anything jumps out at me.

I did a little digging and found this issue in Pandoc which may or may not shine some light on it:
https://github.com/jgm/pandoc/issues/414

My first instinct is to look at what jgm kept asking for--the xml we create vs. the xml Word creates when it "repairs" the document.
I'm guessing your gist is from the repaired version?  If so, can you also post the contents of all the other files to your gist?  I'm hopeful that we can just change a few namespaces and everything will be fine.

It was from the unrepaired version. I did a shallow comparison now:
unrepaired.docx: 30944 bytes
unrepaired % unzip unrepaired.docx
Archive:  unrepaired.docx
warning [unrepaired.docx]:  24952 extra bytes at beginning or within zipfile

repaired.docx: 11692 bytes
repaired % unzip repaired.docx
Archive:  repaired.docx
(no warning)

There are significant changes to the XML as well. I'll post the changes sometime later today.

Here is a gist with the XML from the repaired document: https://gist.github.com/spiffistan/0016ace92833f766225b

Had the chance to look at this yet? Perhaps we could compare the XML from our respective empty documents...

Sorry, I've been absolutely slammed at work the past few weeks.  I apologize.  I swear I have not forgotten about this.  I'm hoping to get it on my agenda this week.

No worries. I'll go another round on this myself to see if I can figure something out as well.

FYI: I haven't been able to find out anything. Have you been able to look at it?

I still haven't.  I'm really sorry.  If you don't mind, you might try an experiment for me.  The way I built Caracal was pretty naive.  I generated a Google document that contained all the functionality I considered essential, saved it as a .docx, and then unzipped it.  Most of the OOXML comes directly from Google's output.  I wonder if you followed those steps if:

The resulting .docx would open in your version of Word; and, if so,
How the Google Doc OOXML differs from Caracal's.

There might be some simple compatibility declarations we could make to fix the problem at the root.

Hello,
I have the same problem.
I just install the gem and i just put in my controller :
Caracal::Document.save 'example.docx' do |docx|
docx.h1 'Page 1 Header'
end
The document is create but is corrupted. Do I use the gem correctly ?

@theocapdet Yes, you did.  (Though, you might want to use caracal-rails to simplify usage in Rails.  I published the example Rails project I use for generating test documents yesterday.  You might view that for an example of what I would consider idiomatic Rails usage. https://github.com/trade-informatics/caracal-example)
Regarding the corruption issue, welcome to the maddening world of Microsoft product versions!  The library works perfectly in all the MSWord version to which I have personal access, but apparently every version available.  I had hoped achieving compliance in Office365 would put the library's output in good stead with all current versions of Word, but clearly that is not so.
Which version(s) are you using?

@jdugan  Thank you for your answer.
I try with open it with :

"Libre office, Version: <IP_ADDRESS>"
"Microsoft Word 2010 in Microsoft office Professional plus"

It definitely will not work with LibreOffice/OpenOffice.  Confusingly, while LO/OO are written to a specification named OOXML, this is a different OOXML than the OOXML that underwrites MSWord.  Despite using the same acronym, the specifications differ considerably.  So, for now, LO/OO is considered outside the scope of Caracal's intent--it is a library for generating MSWord documents.
Having written that, Caracal documents do generally open in OpenOffice 4.0 for me, though formatting is not point-perfect and not all features are supported.  I'm downloading 4.1 now to check compatibility there.
I'm a little frustrated by Word version support.  My coworkers have been able to open the documents in MSWord 2010 for Mac and I thought others had opened it on MSWord 2010 for Windows.  I'll need to double check the latter, I guess.  Would you mind trying the experiment I proposed above?  Generating an equivalent Google doc, saving as docx, and opening in your version of MSWord?

Huh.  Interestingly, the document generated by the example project opens perfectly fine in LibreOffice <IP_ADDRESS>, which appears to have a considerably better OOXML-to-OOXML converter than OpenOffice.  The document in LibreOffice looks pretty much exactly like what I would expect to see in MSWord.

I try "caracal-rails" same problem the caracal.docx is created but corrupted.
Maybe because I use ruby 1.9.3 or rails 4.2.1 ?
In controller :
format.docx { headers["Content-Disposition"] = "attachment; filename="caracal.docx"" }
In my routes :
resources :cvs,only: :show, format: 'docx'
In the cvs/show.docx.caracal I put the example code
I Download the docx with :
link_to 'WORD', cv_path(@cvmodif, :format => 'docx')
Does I have forgot something or maybe I need to upgrade version of rails or ruby?

Nope, definitely works fine with those versions of ruby and rails.  If you clone the https://github.com/trade-informatics/caracal-example project, you'll see that it references Rails 4.2.1.  I just ran that using ruby-1.9.3-p194 and everything opened fine.
Try this: Take the file you just created and change its extension from docx to zip.  Then extract the compressed file.  Does that work?  Do you see a directory structure of XML files?  If your development machine is a PC, there is a confirmed issue with RubyZip that might be your main problem.  Please see the discussion at the bottom of this issue: https://github.com/trade-informatics/caracal/issues/8.  AFAIK, RubyZip works fine on any *nix OS.  It certainly works on Ubuntu and OSX.

OK that work you are my hero  !!!!!! Thank you for your precious help !
It doesn't work because I work on windows. I install a VM with ubuntu, like you say, and that Work perfectly !
Thank you again for your work. :)

@jdugan Alright, I'll have a look and compare versions tonight!

Here's a starting point, a diff between an empty document.xml saved from word and saved from google docs:
https://gist.github.com/spiffistan/72f56edd019e104eceb9
green = google docs version

And here's styles.xml:
https://gist.github.com/spiffistan/da36d4ebd59f21058899
green = google docs version

By chance my colleague opened the docx file in sublime...and lo, a full html file. Unzipping the docx still works...but the problem has been including the layout when rendering.
Doing:
format.docx { render layout: false }

Solves the problem. D'oh!
Thanks regardless!


Shrewsbury Colleges Group

Interesting situation here, 2 colleges (Shrewsbury College and Shrewsbury Sixth Form College) merged - as far as I can tell, they used the infrastructure from Shrewsbury College. Up until recently both colleges retained their separate websites, though that is no longer the case and a single site is used for the group.
Currently emails are given out on the shrewsbury.ac.uk domain, though there may still be some students/staff on the ssfc.ac.uk domain. It may also be the case that they use scg.ac.uk in the future. Frankly, I don't know. Though I'd be willing to update the PR to include all 3, there's no rush on this - I'm just getting prepared for renewal in October :)
Group Site: https://www.scg.ac.uk/
Legacy SSFC Site: https://www.ssfc.ac.uk/ (redirects to the group site, not used for emails AFAIK)
Legacy SCAT Site: https://www.shrewsbury.ac.uk/ (redirects to the group site, used for (at least some) emails)
I'm fairly certain given the domain has the ac.uk tld there won't be must contention with merging the PR, though as the website is on a different domain - you might want some additional proof. The only use of a shrewsbury.ac.uk email I could find on there website is under the contact email, found in the sidebar. This can be seen on https://www.scg.ac.uk/about-us/governance-and-leadership/the-shrewsbury-colleges-group

@jamierocks Pull request merged. Thank you for the update!


sol-util: start using sol-util-$(PLATFORM) v4

Differences from v3:

do not use impl header and impl functions
remove sol-util-linux header and put the functions on sol-util header to be implemented on whichever platform

Differences from v2:

maintain util on libshared.mod instead of creating util.mod

Differences from v1:

fixed kbuild makefile

Since we were using a lot of platform #ifdefs in sol-util.c
Signed-off-by: Ricardo de Almeida Gonzaga<EMAIL_ADDRESS>

+1 but I think need one last tweak.

#537


MVP: Control-plane-operator does not properly reconcile when a component changes environment variables (upgrade blocker)

On 4.8 to 4.9 upgrades the CVO changes a env var that is critical to selecting the appropriate cluster operators that go into a given cluster. Links are provided below:
Release-4.8
https://github.com/openshift/hypershift/blob/release-4.8/control-plane-operator/controllers/hostedcontrolplane/cvo/reconcile.go#L217-L218
Release-4.9
https://github.com/openshift/hypershift/blob/main/control-plane-operator/controllers/hostedcontrolplane/cvo/reconcile.go#L217-L219
What is occurring is the following on an upgrade: the CVO is actually going through 3 unique versions
cluster-version-operator-549c6fdb5d         0         0         0       8m29s
cluster-version-operator-5c75f75967         0         0         0       41m
cluster-version-operator-7fc7fd49d7         1         1         1       7m14s

Let's look at the oldest replicaset which is the one done on the initial 4.8 deploy
apiVersion: apps/v1
kind: ReplicaSet
metadata:
  annotations:
    deployment.kubernetes.io/desired-replicas: "1"
    deployment.kubernetes.io/max-replicas: "2"
    deployment.kubernetes.io/revision: "1"
  creationTimestamp: "2022-01-31T22:37:31Z"
  generation: 2
  labels:
    app: cluster-version-operator
    hypershift.openshift.io/control-plane-component: cluster-version-operator
    hypershift.openshift.io/hosted-control-plane: master-63118433
    pod-template-hash: 5c75f75967
  name: cluster-version-operator-5c75f75967
  namespace: master-63118433
  ownerReferences:
  - apiVersion: apps/v1
    blockOwnerDeletion: true
    controller: true
    kind: Deployment
    name: cluster-version-operator
    uid: 4c4f3197-f145-4e9c-8f8f-fb5dd5f2300e
  resourceVersion: "220632468"
  uid: 02f67cc5-bcf9-4ae4-bb3d-ae829be07f86
spec:
  replicas: 0
  selector:
    matchLabels:
      app: cluster-version-operator
      hypershift.openshift.io/control-plane-component: cluster-version-operator
      hypershift.openshift.io/hosted-control-plane: master-63118433
      pod-template-hash: 5c75f75967
  template:
    metadata:
      annotations:
        hypershift.openshift.io/release-image: registry.ng.bluemix.net/armada-master/ocp-release:4.8.27-x86_64
        hypershift.openshift.io/restart-date: "2022-01-31T22:36:33Z"
      creationTimestamp: null
      labels:
        app: cluster-version-operator
        hypershift.openshift.io/control-plane-component: cluster-version-operator
        hypershift.openshift.io/hosted-control-plane: master-63118433
        pod-template-hash: 5c75f75967
    spec:
      affinity:
        nodeAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - preference:
              matchExpressions:
              - key: hypershift.openshift.io/control-plane
                operator: In
                values:
                - "true"
            weight: 50
          - preference:
              matchExpressions:
              - key: hypershift.openshift.io/cluster
                operator: In
                values:
                - master-63118433
            weight: 100
        podAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - podAffinityTerm:
              labelSelector:
                matchLabels:
                  hypershift.openshift.io/hosted-control-plane: master-63118433
              topologyKey: kubernetes.io/hostname
            weight: 100
      automountServiceAccountToken: false
      containers:
      - args:
        - start
        - --release-image
        - registry.ng.bluemix.net/armada-master/ocp-release:4.8.27-x86_64
        - --enable-auto-update=false
        - --enable-default-cluster-version=true
        - --kubeconfig
        - /etc/openshift/kubeconfig/kubeconfig
        - --listen=
        - --v=4
        command:
        - cluster-version-operator
        env:
        - name: PAYLOAD_OVERRIDE
          value: /var/payload
        - name: EXCLUDE_MANIFESTS
          value: internal-openshift-hosted
        - name: NODE_NAME
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: spec.nodeName
        image: registry.ng.bluemix.net/armada-master/ocp-release:4.8.27-x86_64
        imagePullPolicy: IfNotPresent
        name: cluster-version-operator
        resources:
          requests:
            cpu: 20m
            memory: 50Mi
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /etc/openshift/kubeconfig
          name: kubeconfig
        - mountPath: /var/payload
          name: payload
        - mountPath: /etc/cvo/updatepayloads
          name: update-payloads
      - args:
        - -c
        - |
          #!/bin/bash
          set -euo pipefail
          while true; do
            echo "Applying CVO bootstrap manifests"
            if oc apply -f /var/payload/manifests; then
              echo "Bootstrap manifests applied successfully."
              break
            fi
            sleep 1
          done

          # After bootstrap manifests have been applied, just sleep to keep the container alive.
          # The reason the container must be run in parallel (and not as an init container) is that
          # some manifests in the bootstrap directory depend on manifests from the release payload
          # that is applied by the main CVO container.
          while true; do
            sleep 1000
          done
        command:
        - /bin/bash
        env:
        - name: KUBECONFIG
          value: /etc/kubernetes/kubeconfig
        image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:388eb27c7a756a9caf6538915c4a3fe3a31a9cffd44e09180c0cd5b6a4e9188a
        imagePullPolicy: IfNotPresent
        name: apply-bootstrap
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /etc/kubernetes
          name: kubeconfig
        - mountPath: /var/payload
          name: payload
      dnsPolicy: ClusterFirst
      initContainers:
      - args:
        - -c
        - |-
          cp -R /manifests /var/payload/
          rm /var/payload/manifests/*_deployment.yaml
          rm /var/payload/manifests/*_servicemonitor.yaml
          cp -R /release-manifests /var/payload/
          rm /var/payload/release-manifests/0000_50_olm_00-pprof-config.yaml
          rm /var/payload/release-manifests/0000_50_olm_00-pprof-rbac.yaml
          rm /var/payload/release-manifests/0000_50_olm_00-pprof-secret.yaml
          rm /var/payload/release-manifests/0000_50_olm_01-olm-operator.serviceaccount.yaml
          rm /var/payload/release-manifests/0000_50_olm_02-services.yaml
          rm /var/payload/release-manifests/0000_50_olm_06-psm-operator.deployment.yaml
          rm /var/payload/release-manifests/0000_50_olm_06-psm-operator.deployment.ibm-cloud-managed.yaml
          rm /var/payload/release-manifests/0000_50_olm_07-olm-operator.deployment.ibm-cloud-managed.yaml
          rm /var/payload/release-manifests/0000_50_olm_07-olm-operator.deployment.yaml
          rm /var/payload/release-manifests/0000_50_olm_07-collect-profiles.cronjob.yaml
          rm /var/payload/release-manifests/0000_50_olm_08-catalog-operator.deployment.ibm-cloud-managed.yaml
          rm /var/payload/release-manifests/0000_50_olm_08-catalog-operator.deployment.yaml
          rm /var/payload/release-manifests/0000_50_olm_15-packageserver.clusterserviceversion.yaml
          rm /var/payload/release-manifests/0000_50_olm_99-operatorstatus.yaml
          rm /var/payload/release-manifests/0000_90_olm_00-service-monitor.yaml
          rm /var/payload/release-manifests/0000_90_olm_01-prometheus-rule.yaml
          rm /var/payload/release-manifests/0000_50_operator-marketplace_04_service_account.yaml
          rm /var/payload/release-manifests/0000_50_operator-marketplace_05_role.yaml
          rm /var/payload/release-manifests/0000_50_operator-marketplace_06_role_binding.yaml
          rm /var/payload/release-manifests/0000_50_operator-marketplace_07_configmap.yaml
          rm /var/payload/release-manifests/0000_50_operator-marketplace_08_service.yaml
          rm /var/payload/release-manifests/0000_50_operator-marketplace_09_operator-ibm-cloud-managed.yaml
          rm /var/payload/release-manifests/0000_50_operator-marketplace_09_operator.yaml
          rm /var/payload/release-manifests/0000_50_operator-marketplace_10_clusteroperator.yaml
          rm /var/payload/release-manifests/0000_50_operator-marketplace_11_service_monitor.yaml
          rm /var/payload/release-manifests/0000_50_cluster-ingress-operator_02-deployment-ibm-cloud-managed.yaml
          rm /var/payload/release-manifests/0000_50_cloud-credential-operator_01-operator-config.yaml
          rm /var/payload/release-manifests/0000_50_cluster-authentication-operator_02_config.cr.yaml
        command:
        - /bin/bash
        image: registry.ng.bluemix.net/armada-master/ocp-release:4.8.27-x86_64
        imagePullPolicy: IfNotPresent
        name: prepare-payload
        resources:
          requests:
            cpu: 10m
            memory: 20Mi
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /var/payload
          name: payload
      priorityClassName: hypershift-control-plane
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
      tolerations:
      - effect: NoSchedule
        key: hypershift.openshift.io/control-plane
        operator: Equal
        value: "true"
      - effect: NoSchedule
        key: hypershift.openshift.io/cluster
        operator: Equal
        value: master-63118433
      volumes:
      - emptyDir: {}
        name: payload
      - name: kubeconfig
        secret:
          defaultMode: 420
          secretName: service-network-admin-kubeconfig
      - emptyDir: {}
        name: update-payloads
status:
  observedGeneration: 2
  replicas: 0

That's the standard expected 4.8 CVO. So far everything is good. Then we proceed to trigger the upgrade to 4.9 by updating the releaseimage. Now let's look at the next iteration of that that occurs
apiVersion: apps/v1
kind: ReplicaSet
metadata:
  annotations:
    deployment.kubernetes.io/desired-replicas: "1"
    deployment.kubernetes.io/max-replicas: "2"
    deployment.kubernetes.io/revision: "2"
  creationTimestamp: "2022-01-31T23:10:55Z"
  generation: 2
  labels:
    app: cluster-version-operator
    hypershift.openshift.io/control-plane-component: cluster-version-operator
    hypershift.openshift.io/hosted-control-plane: master-63118433
    pod-template-hash: 549c6fdb5d
  name: cluster-version-operator-549c6fdb5d
  namespace: master-63118433
  ownerReferences:
  - apiVersion: apps/v1
    blockOwnerDeletion: true
    controller: true
    kind: Deployment
    name: cluster-version-operator
    uid: 4c4f3197-f145-4e9c-8f8f-fb5dd5f2300e
  resourceVersion: "220636083"
  uid: af41ed7b-ed65-41a0-81de-bc596095b9fd
spec:
  replicas: 0
  selector:
    matchLabels:
      app: cluster-version-operator
      hypershift.openshift.io/control-plane-component: cluster-version-operator
      hypershift.openshift.io/hosted-control-plane: master-63118433
      pod-template-hash: 549c6fdb5d
  template:
    metadata:
      annotations:
        hypershift.openshift.io/release-image: registry.ng.bluemix.net/armada-master/ocp-release:4.9.15-x86_64
        hypershift.openshift.io/restart-date: "2022-01-31T22:36:33Z"
      creationTimestamp: null
      labels:
        app: cluster-version-operator
        hypershift.openshift.io/control-plane-component: cluster-version-operator
        hypershift.openshift.io/hosted-control-plane: master-63118433
        pod-template-hash: 549c6fdb5d
    spec:
      affinity:
        nodeAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - preference:
              matchExpressions:
              - key: hypershift.openshift.io/control-plane
                operator: In
                values:
                - "true"
            weight: 50
          - preference:
              matchExpressions:
              - key: hypershift.openshift.io/cluster
                operator: In
                values:
                - master-63118433
            weight: 100
        podAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - podAffinityTerm:
              labelSelector:
                matchLabels:
                  hypershift.openshift.io/hosted-control-plane: master-63118433
              topologyKey: kubernetes.io/hostname
            weight: 100
      automountServiceAccountToken: false
      containers:
      - args:
        - start
        - --release-image
        - registry.ng.bluemix.net/armada-master/ocp-release:4.9.15-x86_64
        - --enable-auto-update=false
        - --enable-default-cluster-version=true
        - --kubeconfig
        - /etc/openshift/kubeconfig/kubeconfig
        - --listen=
        - --v=4
        command:
        - cluster-version-operator
        env:
        - name: PAYLOAD_OVERRIDE
          value: /var/payload
        - name: EXCLUDE_MANIFESTS
          value: internal-openshift-hosted
        - name: NODE_NAME
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: spec.nodeName
        image: registry.ng.bluemix.net/armada-master/ocp-release:4.9.15-x86_64
        imagePullPolicy: IfNotPresent
        name: cluster-version-operator
        resources:
          requests:
            cpu: 20m
            memory: 50Mi
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /etc/openshift/kubeconfig
          name: kubeconfig
        - mountPath: /var/payload
          name: payload
        - mountPath: /etc/cvo/updatepayloads
          name: update-payloads
      - args:
        - -c
        - |
          #!/bin/bash
          set -euo pipefail
          while true; do
            echo "Applying CVO bootstrap manifests"
            if oc apply -f /var/payload/manifests; then
              echo "Bootstrap manifests applied successfully."
              break
            fi
            sleep 1
          done

          # After bootstrap manifests have been applied, just sleep to keep the container alive.
          # The reason the container must be run in parallel (and not as an init container) is that
          # some manifests in the bootstrap directory depend on manifests from the release payload
          # that is applied by the main CVO container.
          while true; do
            sleep 1000
          done
        command:
        - /bin/bash
        env:
        - name: KUBECONFIG
          value: /etc/kubernetes/kubeconfig
        image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:426f99588fbce292824dba75372675b83daea64a1cf5d321fb5e4182fc43867e
        imagePullPolicy: IfNotPresent
        name: apply-bootstrap
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /etc/kubernetes
          name: kubeconfig
        - mountPath: /var/payload
          name: payload
      dnsPolicy: ClusterFirst
      initContainers:
      - args:
        - -c
        - |-
          cp -R /manifests /var/payload/
          rm /var/payload/manifests/*_deployment.yaml
          rm /var/payload/manifests/*_servicemonitor.yaml
          cp -R /release-manifests /var/payload/
          rm /var/payload/release-manifests/0000_50_olm_00-pprof-config.yaml
          rm /var/payload/release-manifests/0000_50_olm_00-pprof-rbac.yaml
          rm /var/payload/release-manifests/0000_50_olm_00-pprof-secret.yaml
          rm /var/payload/release-manifests/0000_50_olm_01-olm-operator.serviceaccount.yaml
          rm /var/payload/release-manifests/0000_50_olm_02-services.yaml
          rm /var/payload/release-manifests/0000_50_olm_06-psm-operator.deployment.yaml
          rm /var/payload/release-manifests/0000_50_olm_06-psm-operator.deployment.ibm-cloud-managed.yaml
          rm /var/payload/release-manifests/0000_50_olm_07-olm-operator.deployment.ibm-cloud-managed.yaml
          rm /var/payload/release-manifests/0000_50_olm_07-olm-operator.deployment.yaml
          rm /var/payload/release-manifests/0000_50_olm_07-collect-profiles.cronjob.yaml
          rm /var/payload/release-manifests/0000_50_olm_08-catalog-operator.deployment.ibm-cloud-managed.yaml
          rm /var/payload/release-manifests/0000_50_olm_08-catalog-operator.deployment.yaml
          rm /var/payload/release-manifests/0000_50_olm_15-packageserver.clusterserviceversion.yaml
          rm /var/payload/release-manifests/0000_50_olm_99-operatorstatus.yaml
          rm /var/payload/release-manifests/0000_90_olm_00-service-monitor.yaml
          rm /var/payload/release-manifests/0000_90_olm_01-prometheus-rule.yaml
          rm /var/payload/release-manifests/0000_50_operator-marketplace_04_service_account.yaml
          rm /var/payload/release-manifests/0000_50_operator-marketplace_05_role.yaml
          rm /var/payload/release-manifests/0000_50_operator-marketplace_06_role_binding.yaml
          rm /var/payload/release-manifests/0000_50_operator-marketplace_07_configmap.yaml
          rm /var/payload/release-manifests/0000_50_operator-marketplace_08_service.yaml
          rm /var/payload/release-manifests/0000_50_operator-marketplace_09_operator-ibm-cloud-managed.yaml
          rm /var/payload/release-manifests/0000_50_operator-marketplace_09_operator.yaml
          rm /var/payload/release-manifests/0000_50_operator-marketplace_10_clusteroperator.yaml
          rm /var/payload/release-manifests/0000_50_operator-marketplace_11_service_monitor.yaml
          rm /var/payload/release-manifests/0000_50_cluster-ingress-operator_02-deployment-ibm-cloud-managed.yaml
          rm /var/payload/release-manifests/0000_50_cloud-credential-operator_01-operator-config.yaml
          rm /var/payload/release-manifests/0000_50_cluster-authentication-operator_02_config.cr.yaml
        command:
        - /bin/bash
        image: registry.ng.bluemix.net/armada-master/ocp-release:4.9.15-x86_64
        imagePullPolicy: IfNotPresent
        name: prepare-payload
        resources:
          requests:
            cpu: 10m
            memory: 20Mi
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /var/payload
          name: payload
      priorityClassName: hypershift-control-plane
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
      tolerations:
      - effect: NoSchedule
        key: hypershift.openshift.io/control-plane
        operator: Equal
        value: "true"
      - effect: NoSchedule
        key: hypershift.openshift.io/cluster
        operator: Equal
        value: master-63118433
      volumes:
      - emptyDir: {}
        name: payload
      - name: kubeconfig
        secret:
          defaultMode: 420
          secretName: service-network-admin-kubeconfig
      - emptyDir: {}
        name: update-payloads
status:
  observedGeneration: 2
  replicas: 0

This is an unexpected replica set that should never be scheduled: Note how it has image: registry.ng.bluemix.net/armada-master/ocp-release:4.9.15-x86_64 AND has         image: registry.ng.bluemix.net/armada-master/ocp-release:4.9.15-x86_64
Then ultimately we get the expected replicaset. I believe this is due to the fact the 4.9 version of the control-plane-operator is rolled out which has the proper config to reconcile the cluster.

The main problem currently is there are two distinct steps that update the hosted cluster and the control-plane-operator image and they can occur at independent times: If this check is not in place (or some form of it): there will always exist the possibility for a control plane operator built for a different release to reconcile a newer release which can result in clusters entering a abnormal state.
In the example of the 4.8 to 4.9 upgrade the cluster ultimately gets orphaned operators that should not be deployed and will never get updated/managed for the life of the offering.

This also is likely occuring with the hosted-config-operator so we should determine a strategy for both.....

Key point: A 4.9 CVO should never have the env var
        - name: EXCLUDE_MANIFESTS
          value: internal-openshift-hosted

Which is the result produced when the 4.8 control plane operator reconciles a 4.9 release image per the top comment.

The requested diff between the two
diff /tmp/set1.yaml /tmp/set2.yaml
7,8c7,8
<     deployment.kubernetes.io/revision: "1"
<   creationTimestamp: "2022-01-31T22:37:31Z"
---
>     deployment.kubernetes.io/revision: "2"
>   creationTimestamp: "2022-01-31T23:10:55Z"
14,15c14,15
<     pod-template-hash: 5c75f75967
<   name: cluster-version-operator-5c75f75967
---
>     pod-template-hash: 549c6fdb5d
>   name: cluster-version-operator-549c6fdb5d
24,25c24,25
<   resourceVersion: "220632468"
<   uid: 02f67cc5-bcf9-4ae4-bb3d-ae829be07f86
---
>   resourceVersion: "220636083"
>   uid: af41ed7b-ed65-41a0-81de-bc596095b9fd
33c33
<       pod-template-hash: 5c75f75967
---
>       pod-template-hash: 549c6fdb5d
37c37
<         hypershift.openshift.io/release-image: registry.ng.bluemix.net/armada-master/ocp-release:4.8.27-x86_64
---
>         hypershift.openshift.io/release-image: registry.ng.bluemix.net/armada-master/ocp-release:4.9.15-x86_64
44c44
<         pod-template-hash: 5c75f75967
---
>         pod-template-hash: 549c6fdb5d
76c76
<         - registry.ng.bluemix.net/armada-master/ocp-release:4.8.27-x86_64
---
>         - registry.ng.bluemix.net/armada-master/ocp-release:4.9.15-x86_64
95c95
<         image: registry.ng.bluemix.net/armada-master/ocp-release:4.8.27-x86_64
---
>         image: registry.ng.bluemix.net/armada-master/ocp-release:4.9.15-x86_64
137c137
<         image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:388eb27c7a756a9caf6538915c4a3fe3a31a9cffd44e09180c0cd5b6a4e9188a
---
>         image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:426f99588fbce292824dba75372675b83daea64a1cf5d321fb5e4182fc43867e
187c187
<         image: registry.ng.bluemix.net/armada-master/ocp-release:4.8.27-x86_64
---
>         image: registry.ng.bluemix.net/armada-master/ocp-release:4.9.15-x86_64

Although the key point is there is no change from EXCLUDE_MANIFESTS to CLUSTER_PROFILE

Fixed in https://github.com/openshift/hypershift/pull/963
/close


internalLogFile Appdatadir on Linux & osx

NLog version: 4.7.15
Platform: .Net 6.0
Current NLog config only as an example, our config has many targets configured for different purposes
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      autoReload="true"
      internalLogLevel="Info"
      internalLogFile="${specialfolder:folder=ApplicationData}/ApplicationName/logs/internal.log">

  <targets>
    <target xsi:type="File" name="allfile" fileName="${specialfolder:folder=ApplicationData}/ApplicationName/logs/all.log"
            layout="${longdate}|${event-properties:item=EventId_Id}|${uppercase:${level}}|${logger}|${message} ${exception:format=tostring}"
            archiveEvery="Day"
            archiveFileName="${specialfolder:folder=ApplicationData}/ApplicationName/logs/all.{#}.log"
            archiveNumbering="DateAndSequence"
            archiveDateFormat="yyyy-MM-dd"
            archiveAboveSize="50857600"
            maxArchiveFiles="7"
            />
  </targets>
</nlog>

Hello, we are building an application for multiple operating systems.
Every logfile gets saved in ´´´fileName="${specialfolder:folder=ApplicationData}/ApplicationName/logs/*.log"´´´
but the internalLogFile seems to ignore that variable resolution intentionally (like mentioned in a few older issues).
Regarding to the documentation it is possible to use %appdata%, but this does only apply to windows and not to linux or osx.
Also ${currentdir}, ${basedir}, ${tempdir} or ${processdir} are not really options for us since this would also change the location on all the windows machines that are already running.
Do you see any way that an ${appdatadir} (or similar) could be implemented in the future to enable the same logging behavior within all operating systems?
Thanks!

Created #4863 that adds specialfolder support for InternalLogFile

Created #4863 that adds some specialfolder support for InternalLogFile

Thank you very much @snakefoot for such a fast action on this one :)

It has been rolled into the NLog 5.0 feature-list, so it will be available when NLog 5.0 is released.

Created #4868 that changes it to ${UserApplicationDataDir} to make it more explicit that it is the user-specific applicationdata-dir

NLog 5.0 has been released with support for ${UserApplicationDataDir}


refactor: Refactor the reader code with builder pattern

What changes were proposed in this pull request?
As the title
Why are the changes needed?
https://github.com/apache/incubator-uniffle/issues/1090
Does this PR introduce any user-facing change?
No.
How was this patch tested?
unit test

Codecov Report

Merging #1232 (575ca68) into master (77092e4) will increase coverage by 0.80%.
The diff coverage is 68.80%.

@@             Coverage Diff              @@
##             master    #1232      +/-   ##
============================================
+ Coverage     53.57%   54.37%   +0.80%
+ Complexity     2613     2140     -473
============================================
  Files           395      320      -75
  Lines         22648    14689    -7959
  Branches       1933     1370     -563
============================================
- Hits          12133     7987    -4146
+ Misses         9774     6252    -3522
+ Partials        741      450     -291

Files
Coverage Δ

...e/uniffle/client/factory/ShuffleClientFactory.java
93.26% <98.27%> (+27.69%)
:arrow_up:

...pache/hadoop/mapreduce/task/reduce/RssShuffle.java
0.00% <0.00%> (ø)

...che/uniffle/client/impl/ShuffleReadClientImpl.java
76.71% <56.86%> (-1.65%)
:arrow_down:

... and 79 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jerqi PTAL


fix: behavior path avoidance debug

Signed-off-by: tomoya.kimura<EMAIL_ADDRESS>Description
Fixed a bug that the cause of avoidance failure of a specific type is not output.
Cause of failure to output normally without merging the PR

Cause of failure to output normally only after merging the PR

Related links

Tests performed

Notes for reviewers

Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.

[x] I've confirmed the contribution guidelines.
[x] The PR follows the pull request guidelines.

In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.

[ ] The PR follows the pull request guidelines.
[ ] The PR has been properly tested.
[ ] The PR has been reviewed by the code owners.

Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.

[ ] There are no open discussions or they are tracked via tickets.
[ ] The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

@tkimura4
Thank you very much for the PR.
The following are the tested scenarios
Before PR: Normal scene (with approval) PASS - message not printed
After PR: Normal scene (with approval) PASS - message printed

Before PR: Normal scene (no approval) NOT PASS - message not printed
After PR: Normal scene (no approval) PASS - message printed

Before PR: TooLargeJerk scene (no approval) NOT PASS - message not printed
After PR: TooLargeJerk scene (no approval) PASS - message printed


Add minimal changes for Java10 build support.

When trying to compile izpack using Java 10 I found several small issues.
My changes to com.izforge.izpack.test.util.ClassUtils are not included as I don't have a final solution.

Closing due to no further replies.
Thank you anyway.


Large complex list poor performance

I have been testing size and complexity with Graphite. It's very performant up to a certain point, and it depends on the complexity of the edge connections. Have you run into any stress testing limits?

I think the issue relates to redunant calls of algorithm on each widget rebuild and redunant CustomPainter repaints.
Probably, even dump memoization of algorithm call may help. I'll look into it.
How many nodes/edges did you test ?

It gets weird when there are around 100 nodes and 120 edges. It could be the complexity too though.

It will stall during creation for 10 + seconds. Back off a little and it does great.

I was doing some flame graphs and looks like the main problem is Widgets amount - it forces rendering to underperform. I think we would need GridView.builder-like optimisation with conditional rendering for a big lists.
Also I found my List.fold to detect matrix width "on a fly" to have poor performance on my Android. I will get rid of it. Still, I can't such a huge lags (10+ sec) with my randomly generated graph with 100 nodes and 150 edges. Perhaps, it's not deep enough to cause performance issues.
Is it possible to get input you're using for your app as json or csv file? Also what OS are you using?

I am using Flutter web. If you really need json or csv I can see what I can do. This is an image of it:
https://drive.google.com/file/d/1MaKqODca9LtJMNSPOyzhN5gQjYL0xwbE/view?usp=sharing

These are all of the nodes:
1
1.001
1.001.001
<IP_ADDRESS>
<IP_ADDRESS>.001
<IP_ADDRESS>.002
<IP_ADDRESS>.003
<IP_ADDRESS>
<IP_ADDRESS>.001
<IP_ADDRESS>.002
<IP_ADDRESS>.003
<IP_ADDRESS>.004
<IP_ADDRESS>
<IP_ADDRESS>.001
<IP_ADDRESS>.002
<IP_ADDRESS>.003
<IP_ADDRESS>
<IP_ADDRESS>.001
<IP_ADDRESS>.002
<IP_ADDRESS>.003
1.001.002
<IP_ADDRESS>
<IP_ADDRESS>.001
<IP_ADDRESS>.002
<IP_ADDRESS>
<IP_ADDRESS>.001
<IP_ADDRESS>.002
<IP_ADDRESS>.003
<IP_ADDRESS>.004
<IP_ADDRESS>
<IP_ADDRESS>.001
<IP_ADDRESS>.002
<IP_ADDRESS>
<IP_ADDRESS>.001
<IP_ADDRESS>.002
<IP_ADDRESS>.003
<IP_ADDRESS>.004
<IP_ADDRESS>.005
<IP_ADDRESS>
<IP_ADDRESS>.001
<IP_ADDRESS>.002
<IP_ADDRESS>.003
<IP_ADDRESS>.004
1.001.003
<IP_ADDRESS>
<IP_ADDRESS>.001
<IP_ADDRESS>.002
<IP_ADDRESS>.003
<IP_ADDRESS>.004
<IP_ADDRESS>.005
<IP_ADDRESS>.006
<IP_ADDRESS>
<IP_ADDRESS>.001
<IP_ADDRESS>.002
<IP_ADDRESS>.003
<IP_ADDRESS>.004
<IP_ADDRESS>.005
1.001.004
<IP_ADDRESS>
<IP_ADDRESS>.001
<IP_ADDRESS>.002
<IP_ADDRESS>.003
<IP_ADDRESS>.004
<IP_ADDRESS>.005
<IP_ADDRESS>.006
<IP_ADDRESS>.007
<IP_ADDRESS>
<IP_ADDRESS>.001
<IP_ADDRESS>.002
<IP_ADDRESS>.003
<IP_ADDRESS>.004
<IP_ADDRESS>
<IP_ADDRESS>.001
<IP_ADDRESS>.002
<IP_ADDRESS>.003
<IP_ADDRESS>.004
<IP_ADDRESS>.005
<IP_ADDRESS>.006
<IP_ADDRESS>.007
<IP_ADDRESS>
<IP_ADDRESS>.001
<IP_ADDRESS>.002
<IP_ADDRESS>.003
<IP_ADDRESS>.004
1.001.005
<IP_ADDRESS>
<IP_ADDRESS>.001
<IP_ADDRESS>.002
<IP_ADDRESS>
<IP_ADDRESS>.001
<IP_ADDRESS>.002
<IP_ADDRESS>.003
<IP_ADDRESS>.004
<IP_ADDRESS>
<IP_ADDRESS>.001
<IP_ADDRESS>.002
<IP_ADDRESS>.003
<IP_ADDRESS>.004
1.002
This is how the arrows go:
1 - 1.001
1.001 - 1.002
1.001 - 1.001.001
1.001.001 - 1.001.002
1.001.001 - <IP_ADDRESS>
<IP_ADDRESS> - <IP_ADDRESS>
<IP_ADDRESS> - <IP_ADDRESS>.001
<IP_ADDRESS>.001 - <IP_ADDRESS>.002
<IP_ADDRESS>.002 - <IP_ADDRESS>.003
<IP_ADDRESS>.003 - <IP_ADDRESS>
<IP_ADDRESS> - <IP_ADDRESS>
<IP_ADDRESS> - <IP_ADDRESS>.001
<IP_ADDRESS>.001 - <IP_ADDRESS>.002
<IP_ADDRESS>.002 - <IP_ADDRESS>.003
<IP_ADDRESS>.003 - <IP_ADDRESS>.004
<IP_ADDRESS>.004 - <IP_ADDRESS>
<IP_ADDRESS> - <IP_ADDRESS>
<IP_ADDRESS> - <IP_ADDRESS>.001
<IP_ADDRESS>.001 - <IP_ADDRESS>.002
<IP_ADDRESS>.002 - <IP_ADDRESS>.003
<IP_ADDRESS>.003 - <IP_ADDRESS>
<IP_ADDRESS> - 1.001.002
<IP_ADDRESS> - <IP_ADDRESS>.001
<IP_ADDRESS>.001 - <IP_ADDRESS>.002
<IP_ADDRESS>.002 - <IP_ADDRESS>.003
<IP_ADDRESS>.003 - 1.001.002
1.001.002 - 1.001.003
1.001.002 - <IP_ADDRESS>
<IP_ADDRESS> - <IP_ADDRESS>
<IP_ADDRESS> - <IP_ADDRESS>.001
<IP_ADDRESS>.001 - <IP_ADDRESS>.002
<IP_ADDRESS>.002 - <IP_ADDRESS>
<IP_ADDRESS> - <IP_ADDRESS>
<IP_ADDRESS> - <IP_ADDRESS>.001
<IP_ADDRESS>.001 - <IP_ADDRESS>.002
<IP_ADDRESS>.002 - <IP_ADDRESS>.003
<IP_ADDRESS>.003 - <IP_ADDRESS>.004
<IP_ADDRESS>.004 - <IP_ADDRESS>
<IP_ADDRESS> - <IP_ADDRESS>
<IP_ADDRESS> - <IP_ADDRESS>.001
<IP_ADDRESS>.001 - <IP_ADDRESS>.002
<IP_ADDRESS>.002 - <IP_ADDRESS>
<IP_ADDRESS> - <IP_ADDRESS>
<IP_ADDRESS> - <IP_ADDRESS>.001
<IP_ADDRESS>.001 - <IP_ADDRESS>.002
<IP_ADDRESS>.002 - <IP_ADDRESS>.003
<IP_ADDRESS>.003 - <IP_ADDRESS>.004
<IP_ADDRESS>.004 - <IP_ADDRESS>.005
<IP_ADDRESS>.005 - <IP_ADDRESS>
<IP_ADDRESS> - 1.001.003
<IP_ADDRESS> - <IP_ADDRESS>.001
<IP_ADDRESS>.001 - <IP_ADDRESS>.002
<IP_ADDRESS>.002 - <IP_ADDRESS>.003
<IP_ADDRESS>.003 - <IP_ADDRESS>.004
<IP_ADDRESS>.004 - 1.001.003
1.001.003 - 1.001.004
1.001.003 - <IP_ADDRESS>
<IP_ADDRESS> - <IP_ADDRESS>
<IP_ADDRESS> - <IP_ADDRESS>.001
<IP_ADDRESS>.001 - <IP_ADDRESS>.002
<IP_ADDRESS>.002 - <IP_ADDRESS>.003
<IP_ADDRESS>.003 - <IP_ADDRESS>.004
<IP_ADDRESS>.004 - <IP_ADDRESS>.005
<IP_ADDRESS>.005 - <IP_ADDRESS>.006
<IP_ADDRESS>.006 - <IP_ADDRESS>
<IP_ADDRESS> - 1.001.004
<IP_ADDRESS> - <IP_ADDRESS>.001
<IP_ADDRESS>.001 - <IP_ADDRESS>.002
<IP_ADDRESS>.002 - <IP_ADDRESS>.003
<IP_ADDRESS>.003 - <IP_ADDRESS>.004
<IP_ADDRESS>.004 - <IP_ADDRESS>.005
<IP_ADDRESS>.005 - 1.001.004
1.001.004 - 1.001.005
1.001.004 - <IP_ADDRESS>
<IP_ADDRESS> - <IP_ADDRESS>
<IP_ADDRESS> - <IP_ADDRESS>.001
<IP_ADDRESS>.001 - <IP_ADDRESS>.002
<IP_ADDRESS>.002 - <IP_ADDRESS>.003
<IP_ADDRESS>.003 - <IP_ADDRESS>.004
<IP_ADDRESS>.004 - <IP_ADDRESS>.005
<IP_ADDRESS>.005 - <IP_ADDRESS>.006
<IP_ADDRESS>.006 - <IP_ADDRESS>.007
<IP_ADDRESS>.007 - <IP_ADDRESS>
<IP_ADDRESS> - <IP_ADDRESS>
<IP_ADDRESS> - <IP_ADDRESS>.001
<IP_ADDRESS>.001 - <IP_ADDRESS>.002
<IP_ADDRESS>.002 - <IP_ADDRESS>.003
<IP_ADDRESS>.003 - <IP_ADDRESS>.004
<IP_ADDRESS>.004 - <IP_ADDRESS>
<IP_ADDRESS> - <IP_ADDRESS>
<IP_ADDRESS> - <IP_ADDRESS>.001
<IP_ADDRESS>.001 - <IP_ADDRESS>.002
<IP_ADDRESS>.002 - <IP_ADDRESS>.003
<IP_ADDRESS>.003 - <IP_ADDRESS>.004
<IP_ADDRESS>.004 - <IP_ADDRESS>.005
<IP_ADDRESS>.005 - <IP_ADDRESS>.006
<IP_ADDRESS>.006 - <IP_ADDRESS>.007
<IP_ADDRESS>.007 - <IP_ADDRESS>
<IP_ADDRESS> - 1.001.005
<IP_ADDRESS> - <IP_ADDRESS>.001
<IP_ADDRESS>.001 - <IP_ADDRESS>.002
<IP_ADDRESS>.002 - <IP_ADDRESS>.003
<IP_ADDRESS>.003 - <IP_ADDRESS>.004
<IP_ADDRESS>.004 - 1.001.005
1.001.005 - <IP_ADDRESS>
<IP_ADDRESS> - <IP_ADDRESS>
<IP_ADDRESS> - <IP_ADDRESS>.001
<IP_ADDRESS>.001 - <IP_ADDRESS>.002
<IP_ADDRESS>.002 - <IP_ADDRESS>
<IP_ADDRESS> - <IP_ADDRESS>
<IP_ADDRESS> - <IP_ADDRESS>.001
<IP_ADDRESS>.001 - <IP_ADDRESS>.002
<IP_ADDRESS>.002 - <IP_ADDRESS>.003
<IP_ADDRESS>.003 - <IP_ADDRESS>.004
<IP_ADDRESS>.004 - <IP_ADDRESS>
<IP_ADDRESS> - <IP_ADDRESS>.001
<IP_ADDRESS>.001 - <IP_ADDRESS>.002
<IP_ADDRESS>.002 - <IP_ADDRESS>.003
<IP_ADDRESS>.003 - <IP_ADDRESS>.004

Fantastic, it's fast as ever. Thank you so much!!!


parallel world showing

shows the parallel world you spawned in

I think we want it to be a surprise.


tf.image.ssim_multiscale does not work in tf-2.0.0

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
OS Platform and Distribution: Linux Ubuntu 16.04
TensorFlow installed from: binary (pip)
TensorFlow version: 2.0.0
Python version: 3.5.2
CUDA version: 10.1
GPU model and memory: GTX 1060, 6GB

# example image batches
video1 = tf.random.uniform(shape=[8, 64, 64, 1], minval=0, maxval=1)
video2 = tf.random.uniform(shape=[8, 64, 64, 1], minval=0, maxval=1)

ssim works fine but when I use the multiscale ssim, I am getting the following error message. What am I doing wrong? How do I fix this?
SSIM
ssim_score = tf.image.ssim(img1=video1, img2=video1, max_val=1.0)
print(ssim_score) # tf.Tensor([1. 1. 1. 1. 1. 1. 1. 1.], shape=(8,), dtype=float32)

MS-SSIM
ms_ssim_score = tf.image.ssim_multiscale(img1=video1, img2=video2, max_val=1.0)

---------------------------------------------------------------------------
InvalidArgumentError                      Traceback (most recent call last)
<ipython-input-9-cc68ceec0921> in <module>
----> 1 ms_ssim_score = tf.image.ssim_multiscale(img1=video1, img2=video2, max_val=1.0)

~/.local/lib/python3.5/site-packages/tensorflow_core/python/ops/image_ops_impl.py in ssim_multiscale(img1, img2, max_val, power_factors, filter_size, filter_sigma, k1, k2)
   3405             filter_sigma=filter_sigma,
   3406             k1=k1,
-> 3407             k2=k2)
   3408         mcs.append(nn_ops.relu(cs))
   3409

~/.local/lib/python3.5/site-packages/tensorflow_core/python/ops/image_ops_impl.py in _ssim_per_channel(img1, img2, max_val, filter_size, filter_sigma, k1, k2)
   3174               math_ops.greater_equal(shape1[-3:-1], filter_size)),
   3175           [shape1, filter_size],
-> 3176           summarize=8),
   3177       control_flow_ops.Assert(
   3178           math_ops.reduce_all(

~/.local/lib/python3.5/site-packages/tensorflow_core/python/util/tf_should_use.py in wrapped(*args, **kwargs)
    196   """
    197   def wrapped(*args, **kwargs):
--> 198     return _add_should_use_warning(fn(*args, **kwargs))
    199   return tf_decorator.make_decorator(
    200       fn, wrapped, 'should_use_result',

~/.local/lib/python3.5/site-packages/tensorflow_core/python/ops/control_flow_ops.py in Assert(condition, data, summarize, name)
    154           op=None,
    155           message="Expected '%s' to be true. Summarized data: %s" %
--> 156           (condition, "\n".join(data_str)))
    157     return
    158

InvalidArgumentError: Expected 'tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: 8, 8, 8, 1
11

Issue is replicating on colab with TF 2.0. Please see the gist. Thanks!

+1
The following code reproduces the error:
a = np.random.randn(1, 10, 10, 1)
max_val = np.max(np.reshape(a, [-1]))

l = tf.image.ssim_multiscale(a, a, max_val, filter_size=11)

Any update on this.  Have the same issue with 2.1.0-rc2

Could replicate the issue with Tf-nightly == 2.2.0.dev20200316.
Please find the gist here. Thanks!

I was also able to verify with your gist that psnr() has the same issue and is also broke.

same here with tensorflow  2.2.0-rc3
interestingly it works for me on (255,255,1) shape tensors but got the same error with two (128,128,1) tensors

Could replicate the issue with TF 2.2.0-rc4.Please, find the gist here.Thanks!

The issue appears to be with assertion after spatial-dimension reduction. In  _ssim_per_channel , the H and W of images is asserted against filter_size . Whereas in ssim_multiscale, downsampling is performed len(power_factors)-1 times.
Here are two workarounds:

Make sure that filter_size is small enough to calculate ssim values for all the four spatial-scales(excluding first scale) after downsampling within ssim_multiscale. Contrarily, ensure both H and W  of your image are big enough such that H/(2**4) and W/(2**4) >= filter_size .

Since downsampling is performed len(power_factors)-1 times, you can also use lesser number of _MSSSIM_WEIGHTS or power_factors than default, which means H/(2**(len(power_factors)-1)) and W/(2**(len(power_factors)-1)) >= filter_size .

field1 = tf.random.uniform(shape=[8, 64, 64, 1], minval=0, maxval=1)
field2 = tf.random.uniform(shape=[8, 64, 64, 1], minval=0, maxval=1)
#Use smaller filter_size
ms_ssim_score = tf.image.ssim_multiscale(img1=field1, img2=field2, max_val=1.0,
                                         filter_size=4)
#Or use lesser number of power_factors
ms_ssim_score = tf.image.ssim_multiscale(img1=field1, img2=field2, max_val=1.0,
                                         power_factors=(0.0448, 0.2856, 0.3001),
                                         filter_size=11)

Hope this helps :-)

@AravindGanesh,
Sorry for the delayed response. Can you please let us know if this workaround helped you so that we can work towards closure of this issue? Thanks!

@AravindGanesh , The issue has been fixed in Tensorflow 2.5 version, please find the gist here.

@AravindGanesh , The issue has been fixed in Tensorflow 2.5 version, please find the gist here.

@sachinprasadhs the issue is not fixed even with tf2.5,  you have pasted my workaround in your gist. The issue still persists, please check by pasting what OP @AravindGanesh has mentioned or check the proper gist here.

@aakash30jan, There was some mistake, reopened the issue.

Hi! @AravindGanesh  and Thanks @aakash30jan . Was able to replicate the issue with TF v2.5  with different numbers of power factors starting with default  values as mentioned in official  tensorflow document .The program ran successfully only when power_factor was 2 or 3 , Please find the gist here ..Thanks!

dum dum

The error persists here using python 3.7 and tensorflow 2.9.1

The issue appears to be with assertion after spatial-dimension reduction. In _ssim_per_channel , the H and W of images is asserted against filter_size . Whereas in ssim_multiscale, downsampling is performed len(power_factors)-1 times.
Here are two workarounds:
1. Make sure that `filter_size` is small enough to calculate ssim values for all the four spatial-scales(excluding first scale) after downsampling within `ssim_multiscale`. Contrarily, ensure both `H` and `W ` of your image are big enough such that **`H/(2**4) and W/(2**4) >= filter_size`** .

2. Since downsampling is performed `len(power_factors)-1` times, you can also use lesser number of `_MSSSIM_WEIGHTS` or power_factors than default, which means `H/(2**(len(power_factors)-1)) and W/(2**(len(power_factors)-1)) >= filter_size` .

field1 = tf.random.uniform(shape=[8, 64, 64, 1], minval=0, maxval=1)
field2 = tf.random.uniform(shape=[8, 64, 64, 1], minval=0, maxval=1)
#Use smaller filter_size
ms_ssim_score = tf.image.ssim_multiscale(img1=field1, img2=field2, max_val=1.0,
                                         filter_size=4)
#Or use lesser number of power_factors
ms_ssim_score = tf.image.ssim_multiscale(img1=field1, img2=field2, max_val=1.0,
                                         power_factors=(0.0448, 0.2856, 0.3001),
                                         filter_size=11)

Hope this helps :-)

this workaround works great, but I think it's not the fix. I don't know if define the max filter_size and alert with an warning is an option, but is possible with this code and I can contribute with something like these if you agree:
filter_size = max(1, min(img1.shape[1]//(2**(len(power_factors)-1)), img1.shape[2]//(2**(len(power_factors)-1)), img2.shape[2]//(2**(len(power_factors)-1)), img2.shape[1]//(2**(len(power_factors)-1))))
For filter_size 11 do you need an image at least 176X176

Ok @dmvieira !
Thanks for the update. Re-opening as requested. Could you raise a PR from your end .
Thank you!

@dmvieira perhaps this is well suited
def suggest_filter_size(image1_batch,image2_batch,power_factors,filter_size):
      shape1= image1_batch.shape[1:-1]
      shape2= image2_batch.shape[1:-1]
      if not(shape1[-3:-1][0]/(2**(len(power_factors)-1)) and shape2[-3:-1][0]/(2**(len(power_factors)-1)) >= filter_size):
            H = tf.math.reduce_min((shape1,shape2))
            suggested_filter_size = int(H/(2**(len(power_factors)-1)))
      else:
            suggested_filter_size = filter_size
      return suggested_filter_size

For example:
suggest_filter_size(field1, field2,power_factors = (0.0448, 0.2856, 0.3001, 0.2363, 0.1333), filter_size = 11)
A good fix would be on the user side, something like:
H,W = 128,128
field1 = tf.random.uniform(shape=[8, H, W, 1], minval=0, maxval=1)
field2 = tf.random.uniform(shape=[8, H, W, 1], minval=0, maxval=1)
filter_size = 11 #default from tf.image.ssim_multiscale
power_factors = (0.0448, 0.2856, 0.3001, 0.2363, 0.1333)  #default from tf.image.ssim_multiscale
#get a new filter_size from default values
new_filter_size = suggest_filter_size(field1, field2,power_factors,filter_size)
#tf.image.ssim_multiscale would now work with new_filter_size
ms_ssim_score = tf.image.ssim_multiscale(img1=field1, img2=field1, max_val=1.0,filter_size=new_filter_size)

It's a good code example @aakash30jan ! And a great new feature, but my point was about how is the best Interface for the user. I don't know if build a new function to suggest filter_size is the best way, but perhaps just show a better error with the description explaining that the maximum filter_size should be the value returned by a code similar to suggest_filter_size, instead of a generic error.
Another option is create another param like auto_change_filter that uses suggest_filter_size or another one is filter_size accepts None and uses suggest_filter_size to determine one, but this last one should be very well documented.
My vote to close this issue is in the first one option that just show a better error and how to use. What do you think?

Hi,
Thank you for opening this issue. Since this issue has been open for a long time, the code/debug information for this issue may not be relevant with the current state of the code base.
The Tensorflow team is constantly improving the framework by fixing bugs and adding new features. We suggest you try the latest TensorFlow version with the latest compatible hardware configuration which could potentially resolve the issue. If you are still facing the issue, please create a new GitHub issue with your latest findings, with all the debugging information which could help us investigate.
Please follow the release notes to stay up to date with the latest developments which are happening in the Tensorflow space.


Link to "Install Integration Services" does not work

The link in the bullet point "A running instance of Microsoft SQL Server Integration Services" refers to "Install Integration Services", with the anchor http://go.microsoft.com/fwlink/?linkid=394975%26clcid=0x409
This doesn't work.  When following that link, one ends up on the MS home page.  The link should be this instead:
http://go.microsoft.com/fwlink/?linkid=394975

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

ID: 24ec7537-6fe6-a758-aee7-ad8af246419b
Version Independent ID: 6a7b0302-4f5f-9844-f9ed-a322603d7b6b
Content: Install the Data import/export framework (AX 2012 R3)
Content Source: dynamicsax2012-technet/install-the-data-import-export-framework-ax-2012-r3.md
Product: dynamicsax-2012
GitHub Login: @Khairunj

@danielzook, thanks for noting this. I've updated the link.


Delete unnecessary spaces

When copying from the web page, there is an unnecessary space after the code.

@changeworld : Thanks for your contribution! The author, @mikejo5000, has been notified to review your proposed change.

We're in the process of pulling this commit to the private repository so we can verify the updates on staging. We'll post a new private repo PR # shortly and then close this PR.

@changeworld As with the other similar pull requests, I'm reviewing these closely and merging as appropriate. Thank you for these changes!


Don't treat non-existent wallets as if they were connected

All non-existent wallets immediately enter NotExist state on init. Because of that, I think it needs to stop treating non-existent wallets as if they were once connected or are the current wallet. I'm not exactly sure how, but I think current being stuck on a non-existent wallet is preventing other wallets from connecting, and this seems to fix it.

i see this was reverted. did it break something @twhy ?

Yes. After I merged this, when I click on a non-exist wallet in the wallet list, it stops at the wallet list view instead of showing the "XXX Not Installed" view.
I tried to fix the same issue in the default modal in this PR
https://github.com/cosmology-tech/cosmos-kit/pull/386/files

Yes. After I merged this, when I click on a non-exist wallet in the wallet list, it stops at the wallet list view instead of showing the "XXX Not Installed" view. I tried to fix the same issue in the default modal in this PR https://github.com/cosmology-tech/cosmos-kit/pull/386/files

ah i see. i think new logic may be necessary, because the issue is that it is getting stuck with the first non existent wallet as current even when another wallet is connected or has been chosen more recently. it should at least be prioritizing wallets that are not disconnected and that do exist. also, there may need to be an explicit flag set for the is wallet connected once, because the nonexistent wallets shouldn't return true there unless they're clicked on.