Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cockpit): compilation issues #496

Closed
petermetz opened this issue Jan 15, 2021 · 0 comments · Fixed by #502
Closed

fix(cockpit): compilation issues #496

petermetz opened this issue Jan 15, 2021 · 0 comments · Fixed by #502
Labels
bug Something isn't working Developer_Experience good-first-issue Good for newcomers Hacktoberfest Hacktoberfest participants are welcome to take a stab at issues marked with this label.
Milestone

Comments

@petermetz
Copy link
Contributor

Describe the bug

This is an issue that only manifests itself when running the ./tools/ci.sh script which compiles everything for every scenario.
The GH actions initially did not do this because it was much easier to test/refine them/their config by just including specific
npm tasks.
There will be another issue open for rectifying that which will depend on this having been fixed first.

To Reproduce

  1. Clone Cactus
  2. cd cactus
  3. ./tools/ci.sh

Expected behavior

Process exit code of 0

Logs/Stack traces

The API client's method names are outdated and that fails the Typescript compilation for some of the front-end components such as the cockpit or the supply-chain-app front-end.

Cloud provider or hardware configuration:

Dev machine.

Operating system name, version, build:

Use this command: printf "$(uname -srm)\n$(cat /etc/os-release)\n"

For example

$ printf "$(uname -srm)\n$(cat /etc/os-release)\n"
Linux 5.8.0-36-generic x86_64
NAME="Ubuntu"
VERSION="20.04.1 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.1 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

Hyperledger Cactus release version or commit (git rev-parse --short HEAD):

0.3.0 and main

cc: @takeutak @sfuji822 @hartm @jonathan-m-hamilton

@petermetz petermetz added bug Something isn't working good-first-issue Good for newcomers Developer_Experience Hacktoberfest Hacktoberfest participants are welcome to take a stab at issues marked with this label. labels Jan 15, 2021
@petermetz petermetz added this to the v0.4.0 milestone Jan 15, 2021
petermetz added a commit to petermetz/cacti that referenced this issue Jan 15, 2021
The full build with frontend components included are now working
once again.

1. The cockpit components no longer depend on the api-client package
shipping the standard typescript-axios client types such as DefaultApi,
Configuration and the likes. This is because we hollowed out the
client-api package to only contain the extensions to these generated
types mentioned above (provided via typescript-axios OpenAPI generator)

This is part of a larger ongoing effort where we decoupled the api-client
and the cmd-api-server packages where earlier there was some tangling
between the two in the form of the cmd-api-server exporting it's
openapi spec onto the api-client package which in hindsight didn't
make much sense to be honest. Mistakes were made, but now are being
fixed.

2. A related, but not strictly necessary, cleanup type of change is that
we also deleted the remnants of the generated code from the api-client
package, e.g. the whole ./generated/openapi/typescrit-axios/ folder is
now gone properly (it didn't have any actual Typescript code at this
point anyway due to the ongoing changes on other works streams
that were pointed out above as well.)

Fixes hyperledger-cacti#496

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz added a commit that referenced this issue Jan 19, 2021
The full build with frontend components included are now working
once again.

1. The cockpit components no longer depend on the api-client package
shipping the standard typescript-axios client types such as DefaultApi,
Configuration and the likes. This is because we hollowed out the
client-api package to only contain the extensions to these generated
types mentioned above (provided via typescript-axios OpenAPI generator)

This is part of a larger ongoing effort where we decoupled the api-client
and the cmd-api-server packages where earlier there was some tangling
between the two in the form of the cmd-api-server exporting it's
openapi spec onto the api-client package which in hindsight didn't
make much sense to be honest. Mistakes were made, but now are being
fixed.

2. A related, but not strictly necessary, cleanup type of change is that
we also deleted the remnants of the generated code from the api-client
package, e.g. the whole ./generated/openapi/typescrit-axios/ folder is
now gone properly (it didn't have any actual Typescript code at this
point anyway due to the ongoing changes on other works streams
that were pointed out above as well.)

Fixes #496

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Developer_Experience good-first-issue Good for newcomers Hacktoberfest Hacktoberfest participants are welcome to take a stab at issues marked with this label.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant