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

Add Updatecli integration with Udash Part 2 #1418

Merged
merged 22 commits into from
Jul 29, 2023

Conversation

olblak
Copy link
Member

@olblak olblak commented Jul 24, 2023

Follow up of #1344

This pullrequest introduces the following changes:

  • Move command updatecli login to updatecli udash login --experimental https://app.updatecli.io
  • Add udash logout command such as updatecli udash logout --experimental https://app.updatecli.io
  • Add udash config command to show the config file path updatecli udash config --experimental
  • Add changelog information to report, needed when publishing report to Udash
  • Add console output to report, needed when publishing report to Udash

None of the changes introduced in this PR or #1344 should affect the core behavior of Updatecli.

If Updatecli is executed in experimental mode and detected a config file in $DEFAULT_USER_CONFIG_DIR/updatecli/udash.json with a valid configuration such as `

{
  "Auths": {
    "api.udash.io:8080/api": {
      "Token": "oauth_access_token",
      "Api": "http://api.udash.io:8080/api",
      "URL": "http://localhost:8081"
    },  
  },  
  "Default": "api.udash.io:8080/api"
}

Then Updatecli automatically publish reports to http://localhost

An updatecli pipeline run looks like

Experimental Mode Enabled


+++++++++++
+ PREPARE +
+++++++++++

Loading Pipeline "updatecli/updatecli.d/golangci-lint.yaml"
WARNING: Updatecli binary version is unset. This means you are using a development version that ignores manifest version constraint.

SCM repository retrieved: 1


++++++++++++++++++
+ AUTO DISCOVERY +
++++++++++++++++++



++++++++++++
+ PIPELINE +
++++++++++++



##############################
# BUMP GOLANGCI-LINT VERSION #
##############################


SOURCES
=======

default
-------
Searching for version matching pattern "latest"
✔ GitHub release version "v1.53.3" found matching pattern "latest" of kind "latest"


CHANGELOG:
----------

Release published on the 2023-06-15 11:11:10 +0000 UTC at the url https://github.com/golangci/golangci-lint/releases/tag/v1.53.3

golangci-lint is a free and open-source project, built by people in their free time.
Also, the [linter authors](https://golangci-lint.run/product/thanks/) are an important part of golangci-lint.
If you use and appreciate golangci-lint please think to support us (golangci-lint maintainers and linters authors). :heart:

## Changelog
* 2dcd82f3 Add support for generating illumos/amd64 targeted builds (#3907)
* d3608718 build(deps): bump actions/setup-go from 3 to 4 (#3902)
* 01125212 build(deps): bump github.com/BurntSushi/toml from 1.3.0 to 1.3.2 (#3899)
* c2ccfe6a build(deps): bump github.com/alexkohler/nakedret/v2 from 2.0.1 to 2.0.2 (#3905)
* d6f3d714 build(deps): bump github.com/ashanbrown/forbidigo from 1.5.1 to 1.5.3 (#3904)
* 70c1e77c build(deps): bump github.com/bkielbasa/cyclop from 1.2.0 to 1.2.1 (#3888)
* ef909730 build(deps): bump github.com/nishanths/exhaustive from 0.10.0 to 0.11.0 (#3900)
* 829af927 build(deps): bump github.com/nunnatsa/ginkgolinter from 0.12.2 to 0.12.1 (#3892)
* c9d759e4 build(deps): bump github.com/sirupsen/logrus from 1.9.2 to 1.9.3 (#3886)
* 92f8abd3 build(deps): bump github.com/ykadowak/zerologlint from 0.1.1 to 0.1.2 (#3889)
* dfbc86ca build(deps): bump golangci/golangci-lint-action from 3.4.0 to 3.5.0 (#3890)
* 98b95a99 build(deps): bump golangci/golangci-lint-action from 3.5.0 to 3.6.0 (#3903)
* 8c519af8 codeclimate: less memory allocation (#3882)
* 4f4362c6 ineffassign: bump to HEAD (#3898)




CONDITIONS:
===========

default
-------
✔ key "$.jobs.build.steps[2].name", in YAML file ".github/workflows/go.yaml", is correctly set to "golangci-lint"


TARGETS
========

default
-------

**Dry Run enabled**

✔ - key "$.jobs.build.steps[2].with.version" already set to "v1.53", from file ".github/workflows/go.yaml", 


ACTIONS
========



REPORT
=======

Report available on:
	 * "http://localhost:8081/pipeline/reports/67da903e-0a2f-41c1-940f-9da89a26e9b8"

=============================

REPORTS:



✔ Bump golangci-lint version:
	Source:
		✔ [default] Get latest golangci-lint version
	Condition:
		✔ [default] 
	Target:
		✔ [default] Update Golangci-lint version to v1.53.3

	=> Report available on http://localhost:8081/pipeline/reports/67da903e-0a2f-41c1-940f-9da89a26e9b8

Run Summary
===========
Pipeline(s) run:
  * Changed:	0
  * Failed:	0
  * Skipped:	0
  * Succeeded:	1
  * Total:	1

Note the report url at the end of the pipeline execution

Test

No testing at this time

Additional Information

Udash is a new experiment around Updatecli to have a long live service to collect Updatecli pipeline reports and to provide different kind of visualisation than what is possible from a terminal.
More information on https://github.com/updatecli/udash

Tradeoff

Potential improvement

Instead of upatecli udash config, I am considering adding a subcommand to retrieve the token only such as updatecli udash show token https://app.updatecli.io

The motivation is to make it easier to retrieve the access token we configuring ci environment

olblak and others added 15 commits July 23, 2023 17:45
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
@olblak olblak added experimental Experimental feaure udash All things related to Udash labels Jul 28, 2023
olblak and others added 4 commits July 28, 2023 09:46
It appears that default logrus behavior is to log to stderr and not
stdout
-> https://github.com/sirupsen/logrus/blob/dd1b4c2e81afc5c255f216a722b012ed26be57df/logger.go#L89

I am reverting the stdout changes to stderr until a further discussion

Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Now that I created the udash package, it's just makes more sense to
move the publish method to the udash package.

Signed-off-by: Olblak <me@olblak.com>
@olblak olblak added this to the 0.55.0 milestone Jul 29, 2023
cmd/udash_login.go Outdated Show resolved Hide resolved
cmd/udash_logout.go Outdated Show resolved Hide resolved
@olblak olblak merged commit a9255bf into updatecli:main Jul 29, 2023
6 checks passed
@olblak olblak added the enhancement New feature or request label Jul 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request experimental Experimental feaure udash All things related to Udash
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant