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

[format] Use thousands separator to improve readability #222

Closed
wants to merge 2 commits into from

Conversation

strongly-typed
Copy link
Collaborator

After looking too long for a 10x error in frequency, I discovered this nice new feature.

How to deal with the inconsistency in the comment of vl53l0.hpp?

@strongly-typed strongly-typed force-pushed the feature/format branch 2 times, most recently from 7660e69 to 224a945 Compare June 1, 2019 19:22
@strongly-typed
Copy link
Collaborator Author

Any more changes suggested?

@salkinium
Copy link
Member

No, but the CI is broken. It appears to be running on your CircleCI instance, which isn‘t useful since yours doesn‘t have all the secret deploy keys etc.

@salkinium
Copy link
Member

Ping?

@strongly-typed
Copy link
Collaborator Author

Ping?

Yes, what can I do?

@salkinium
Copy link
Member

The CI is broken, because it runs on your CircleCI instance. Not sure why.

@strongly-typed
Copy link
Collaborator Author

The CI is broken, because it runs on your CircleCI instance. Not sure why.

I think this is the default as it is still my branch and not (yet) part of github.com/modm-io/modm.

You could pull the branch from me and then push it to modm-io. Then modm-io's CircleCI instance will build it.

Alternatively, you probably could have a read here.

@strongly-typed
Copy link
Collaborator Author

I meanwhile rebased to current develop

@strongly-typed
Copy link
Collaborator Author

So what is happening with CircleCI?

I have an account with CircleCI, so my branches from Github are built with CircleCI, even without me having opened a PR here at Github. These jobs are named after my Github branches:

image

In a PR, Github is reusing these jobs to avoid rerunning the same jobs again.

I assume: For PRs from contributors without a CircleCI account, the jobs are created in the modm-io account of CircleCI, like with #228

https://circleci.com/gh/modm-io/modm/11870

image

As modm's CircleCI config instructs CircleCI to run the build-docs job only if the job name matches pull it is not run for my feature branch in my CircleCI instance, which are named after my branches.

@salkinium How to deal with it? What was the motivation to build docs only for branches with name beginning with pull/?

@strongly-typed
Copy link
Collaborator Author

Yeah!
image

@salkinium
Copy link
Member

salkinium commented Jun 20, 2019

There are two docs related jobs, the build-docs builds the docs without depending on the long running compile-all jobs (f4 and f7) so it is up to 3mins faster, due to improved parallel utilization.
The build-docs-upload job depends on all compile-all jobs and uploads the docs as well.

I utterly disagree with github/circleci that they should be reusing build jobs from another account, that makes absolutely no sense and is a complete liability. I’ve never heard of a CI where the user provides the passing checks. I cannot check the environment of your instance, neither should I need to check your instance for conformity. And I am most certainly not sharing the commit key to modm.io.

There must be a setting for this, I just haven‘t found it yet.

@@ -354,9 +354,6 @@ workflows:
- stm32g0-compile-all
- stm32l4-compile-all
- build-docs:
filters:
branches:
only: /^pull\/.*$/
Copy link
Member

Choose a reason for hiding this comment

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

No.

@strongly-typed
Copy link
Collaborator Author

There must be a setting for this, I just haven‘t found it yet.

image

Might this enable building the PRs inside of the modm-io organisation on CircleCI?
What is the setting current of this for modm-io?

Still a very interesting config. What if I PR'ing something with echo $CI_SECRET? What is the environment in my PR is then build? Is it the one of modm-io or mine?

Questions, questions, questions ...

@salkinium
Copy link
Member

What is the setting current of this for modm-io?

It's set to On otherwise it would build no pull requests at all (yes I've tested this).

What if I PR'ing something with echo $CI_SECRET?

The access to modm.io is done via SSH key. From the docs:

The private keys of the checkout keypairs we generate never leave our systems (only the public key is transmitted toGitHub), and are safely encrypted in storage. However, since they are installed into your build containers, any code that you run in CircleCI can read them. You shouldn't push untrusted code to CircleCI!

Lolwut? I guess anyone can just echo out the private key?

add_ssh_keys
cat ~/.ssh/*

Why do I even bother with this shit?

@salkinium
Copy link
Member

I'm just going to ignore this CI issue for now… *pouts*

salkinium
salkinium previously approved these changes Jun 20, 2019
Copy link
Member

@salkinium salkinium left a comment

Choose a reason for hiding this comment

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

Thanks

@strongly-typed
Copy link
Collaborator Author

I'm just going to ignore this CI issue for now… pouts

A better condition for build-docs might include something from the CircleCI environment. Let me try this before merging.

@strongly-typed
Copy link
Collaborator Author

@salkinium Would you accept the reformulated condition for the pull request in CircleCI?

There is no guarantee that PR branches in CircleCI are called /pull/*
@salkinium
Copy link
Member

salkinium commented Jun 20, 2019

I think the canonical fix would be to change the branch regex to include feature/ and fix/ name prefixes, or to use the negated version, ie. run iff not develop (which I couldn‘t get to work, probably too dumb for it).

@salkinium
Copy link
Member

Specifically, I could not get the ignore key working.

@strongly-typed
Copy link
Collaborator Author

I think the canonical change would be to change the branch regex to include feature/ and fix/ name prefixes, or to use the negatesd version, ie. run iff not develop (which I couldn‘t get to work, probably too dumb for it).

Could you describe when the build-doc job should run? For every commit while developing a feature (on a feature or fix branch) or only when the PR is opened? I did not yet get your use case

@salkinium
Copy link
Member

salkinium commented Jun 20, 2019

The build-doc could be run in parallel to the compile all jobs, except for develop where it must run last in order to NOT push to modm.io in case something does fail in compile all. It‘s a last defense in that sense. I like the way it is now, since the build docs jobs is visually separated from the compile all jobs but still runs in parallel.

It‘s a matter of defining the right dependencies, which can only be done with two separate jobs.

@strongly-typed
Copy link
Collaborator Author

Btw, is the if [ "$CIRCLE_BRANCH" = "develop" ]; then redundant with the only: develop option?

build-docs-upload and build-docs share some code.

Shall we have the build-docs-upload "just" do the upload and have it depended on everything plus build-docs and have the only: develop option?

Then no condition for build-docs is required and it can always run.

@salkinium
Copy link
Member

Yes the branch check is redundant. You cannot share state or data across jobs, due to the container thing. So you still have to build even if you only upload.

@strongly-typed
Copy link
Collaborator Author

There are artifacts and workspaces.

Let me take a look soon.

@salkinium
Copy link
Member

I'm going to merge the PR without your changes to the CI, since you can work on that independently of the (code) changes in this PR.

@salkinium
Copy link
Member

Merged manually.

@salkinium salkinium closed this Jun 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants