Skip to content

Conversation

@dcermak
Copy link
Collaborator

@dcermak dcermak commented Jun 8, 2022

Currently container-suseconnect will print errors to the console when it fails
to obtain the SLE credentials. This is however causing UX issues in the SLE BCI
containers, which work perfectly fine without a SLE subscription.

Thus a new flag is introduced: --log-credentials-errors. When this flag is set
or if the environment variable CONTAINER_SUSECONNECT_LOG_CREDENTIALS_ERR is
set, then container-suseconnect will continue printing errors as it did, but
the default is now that errors with obtaining the credentials will be silently
swallowed so that users of SLE BCI don't get confused by this error message.

This fixes #62

@dcermak dcermak force-pushed the dont-fail-as-zypp-plugin branch from 3c54bf4 to fd1fcf9 Compare June 8, 2022 13:22
Copy link

@djoreilly djoreilly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dirkmueller
Copy link
Member

As a user/customer, the behavior I would expect is

  • if a registration credential is available, and the requestProducts is failing, then I'm a registered customer with some kind of issue (network accessibility, or expired/invalid key or the like). I totally want to see errors by default, and maybe optionally have the option to suppress the error with --ignore-whatever-is-wrong-with-my-key option
  • if no registration credentials are available, the product service listing can fail because there is an authentication issue, but that's okay in the BCI case because there is a fall back repository that does not require a credential.

This patch is putting the burden of finding out which case it is on the user, and it changes the default to the second, unregistered option. Following the 'supported customers first' principle I am wondering if we can do something to make the first option also as convenient. can we keep the default of the behavior, but handle only the case of "BCI repository available and no registration code provided" silently instead?

Detecting whether "BCI repository available" could be done by calling this via a new name that enables the new behavior, so existing invocations remain unaffected.

@dcermak dcermak force-pushed the dont-fail-as-zypp-plugin branch from fd1fcf9 to 2f1a83c Compare November 2, 2022 10:57
@dcermak dcermak requested a review from dirkmueller November 2, 2022 10:58
@dcermak dcermak changed the title Add flag --fail-on-error to zypp-plugin-mode Add flag --log-credentials-errors Nov 2, 2022
@dcermak dcermak requested review from djoreilly and jlausuch and removed request for djoreilly November 2, 2022 10:58
Copy link
Member

@dirkmueller dirkmueller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. thank you for addressing the previous feedback!

I'm highly suspicous that tests do not need adjustment, but lets not look there

Currently container-suseconnect will print errors to the console when it fails
to obtain the SLE credentials. This is however causing UX issues in the SLE BCI
containers, which work perfectly fine without a SLE subscription.

Thus a new flag is introduced: `--log-credentials-errors`. When this flag is set
or if the environment variable `CONTAINER_SUSECONNECT_LOG_CREDENTIALS_ERR` is
set, then `container-suseconnect` will continue printing errors as it did, but
the default is now that errors with obtaining the credentials will be silently
swallowed so that users of SLE BCI don't get confused by this error message.

This fixes SUSE#62
@dcermak dcermak force-pushed the dont-fail-as-zypp-plugin branch from 2f1a83c to 1173fbd Compare November 8, 2022 12:25
@dcermak dcermak merged commit a9127f1 into SUSE:master Nov 8, 2022
@dcermak dcermak deleted the dont-fail-as-zypp-plugin branch November 8, 2022 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Un-necessary warning: Problem retrieving the repository index file for service 'container-suseconnect-zypp'

4 participants